Skip to content

Commit

Permalink
#99 - Add Strict Typing - add DataProviders
Browse files Browse the repository at this point in the history
  • Loading branch information
chrom committed Nov 10, 2017
1 parent 4571d70 commit d72fca7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
############################################
## adjust memory limit

php_value memory_limit 2048M
php_value memory_limit 768M
php_value max_execution_time 18000

############################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Inventory\Ui\DataProvider\Product\Form\Modifier;

use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Inventory\Ui\DataProvider;

use Magento\InventoryApi\Api\Data\SourceInterface;
Expand Down Expand Up @@ -81,7 +83,7 @@ public function getData()
// It is need for support of several fieldsets.
// For details see \Magento\Ui\Component\Form::getDataSourceData
if ($data['totalRecords'] > 0) {
$sourceId = $data['items'][0][SourceInterface::SOURCE_ID];
$sourceId = (int) $data['items'][0][SourceInterface::SOURCE_ID];
$sourceGeneralData = $data['items'][0];
$sourceGeneralData['carrier_codes'] = $this->getAssignedCarrierCodes($sourceId);
$dataForSingle[$sourceId] = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Inventory\Ui\DataProvider;

use Magento\InventoryApi\Api\Data\SourceInterface;
Expand Down Expand Up @@ -91,7 +93,7 @@ public function getData()
// It is need for support of several fieldsets.
// For details see \Magento\Ui\Component\Form::getDataSourceData
if ($data['totalRecords'] > 0) {
$stockId = $data['items'][0][StockInterface::STOCK_ID];
$stockId = (int) $data['items'][0][StockInterface::STOCK_ID];
$stockGeneralData = $data['items'][0];
$dataForSingle[$stockId] = [
'general' => $stockGeneralData,
Expand Down

0 comments on commit d72fca7

Please sign in to comment.