Skip to content

Commit

Permalink
#24005: Static test fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
engcom-Foxtrot committed Aug 6, 2019
1 parent 77942a5 commit 2110afd
Show file tree
Hide file tree
Showing 23 changed files with 271 additions and 160 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ protected function getProductOptionTypes()

if (count($group['optgroup'])) {
$options[] = $group;
$groupIndex += 1;
$groupIndex++;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

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

use Magento\Catalog\Api\Data\ProductAttributeInterface;
use Magento\Catalog\Model\Locator\LocatorInterface;
use Magento\Eav\Api\AttributeRepositoryInterface;
use Magento\Ui\Component\Form;
use Magento\Framework\Stdlib\ArrayManager;
use Magento\Ui\Component\Form;

/**
* Data provider for main panel of product page
Expand Down Expand Up @@ -60,10 +61,10 @@ public function __construct(
/**
* Customize number fields for advanced price and weight fields.
*
* @since 101.0.0
* @param array $data
* @return array
* @throws \Magento\Framework\Exception\NoSuchEntityException
* @since 101.0.0
*/
public function modifyData(array $data)
{
Expand Down Expand Up @@ -125,7 +126,7 @@ protected function customizeAdvancedPriceFormat(array $data)
$value[ProductAttributeInterface::CODE_TIER_PRICE_FIELD_PRICE] =
$this->formatPrice($value[ProductAttributeInterface::CODE_TIER_PRICE_FIELD_PRICE]);
$value[ProductAttributeInterface::CODE_TIER_PRICE_FIELD_PRICE_QTY] =
(float) $value[ProductAttributeInterface::CODE_TIER_PRICE_FIELD_PRICE_QTY];
(float)$value[ProductAttributeInterface::CODE_TIER_PRICE_FIELD_PRICE_QTY];
}
}

Expand All @@ -135,9 +136,9 @@ protected function customizeAdvancedPriceFormat(array $data)
/**
* Customize product form fields.
*
* @since 101.0.0
* @param array $meta
* @return array
* @since 101.0.0
*/
public function modifyMeta(array $meta)
{
Expand Down Expand Up @@ -234,9 +235,13 @@ protected function customizeWeightField(array $meta)
null,
'children'
);
$meta = $this->arrayManager->merge($containerPath . static::META_CONFIG_PATH, $meta, [
'component' => 'Magento_Ui/js/form/components/group',
]);
$meta = $this->arrayManager->merge(
$containerPath . static::META_CONFIG_PATH,
$meta,
[
'component' => 'Magento_Ui/js/form/components/group',
]
);

$hasWeightPath = $this->arrayManager->slicePath($weightPath, 0, -1) . '/'
. ProductAttributeInterface::CODE_HAS_WEIGHT;
Expand Down Expand Up @@ -438,8 +443,13 @@ protected function formatNumber($value)
$precision = strlen(substr(strrchr($value, "."), 1));
$store = $this->locator->getStore();
$currency = $this->getLocaleCurrency()->getCurrency($store->getBaseCurrencyCode());
$value = $currency->toCurrency($value, ['display' => \Magento\Framework\Currency::NO_SYMBOL,
'precision' => $precision]);
$value = $currency->toCurrency(
$value,
[
'display' => \Magento\Framework\Currency::NO_SYMBOL,
'precision' => $precision
]
);

return $value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
use Magento\Framework\App\State;

/**
* Checks visibility status.
*
* Defines status of visibility of form elements on Stores > Settings > Configuration page
* in Admin Panel in Production mode.
* @api
Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ protected function enhanceTotalData(
$total->setShippingTaxAmount($shippingTaxAmount);
$total->setDiscountTaxCompensationAmount($discountTaxCompensation); // accessed via 'discount_tax_compensation'
$total->setSubtotalInclTax($subtotalInclTax);
return;
}

/**
Expand Down
64 changes: 42 additions & 22 deletions app/code/Magento/Weee/Block/Item/Price/Renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ public function getIncludeWeeeFlag()
}

/**
* Get display price for unit price including tax. The Weee amount will be added to unit price including tax
* depending on Weee display setting
* Get display price for unit price including tax.
*
* The Weee amount will be added to unit price including tax depending on Weee display setting.
*
* @return float
*/
Expand All @@ -107,8 +108,9 @@ public function getUnitDisplayPriceInclTax()
}

/**
* Get base price for unit price including tax. The Weee amount will be added to unit price including tax
* depending on Weee display setting
* Get base price for unit price including tax.
*
* The Weee amount will be added to unit price including tax depending on Weee display setting.
*
* @return float
*/
Expand All @@ -128,8 +130,9 @@ public function getBaseUnitDisplayPriceInclTax()
}

/**
* Get display price for row total including tax. The Weee amount will be added to row total including tax
* depending on Weee display setting
* Get display price for row total including tax.
*
* The Weee amount will be added to row total including tax depending on Weee display setting.
*
* @return float
*/
Expand All @@ -149,8 +152,9 @@ public function getRowDisplayPriceInclTax()
}

/**
* Get base price for row total including tax. The Weee amount will be added to row total including tax
* depending on Weee display setting
* Get base price for row total including tax.
*
* The Weee amount will be added to row total including tax depending on Weee display setting.
*
* @return float
*/
Expand All @@ -170,8 +174,9 @@ public function getBaseRowDisplayPriceInclTax()
}

/**
* Get display price for unit price excluding tax. The Weee amount will be added to unit price
* depending on Weee display setting
* Get display price for unit price excluding tax.
*
* The Weee amount will be added to unit price depending on Weee display setting.
*
* @return float
*/
Expand All @@ -191,8 +196,9 @@ public function getUnitDisplayPriceExclTax()
}

/**
* Get base price for unit price excluding tax. The Weee amount will be added to unit price
* depending on Weee display setting
* Get base price for unit price excluding tax.
*
* The Weee amount will be added to unit price depending on Weee display setting.
*
* @return float
*/
Expand All @@ -218,8 +224,9 @@ public function getBaseUnitDisplayPriceExclTax()
}

/**
* Get display price for row total excluding tax. The Weee amount will be added to row total
* depending on Weee display setting
* Get display price for row total excluding tax.
*
* The Weee amount will be added to row total depending on Weee display setting.
*
* @return float
*/
Expand All @@ -239,8 +246,9 @@ public function getRowDisplayPriceExclTax()
}

/**
* Get base price for row total excluding tax. The Weee amount will be added to row total
* depending on Weee display setting
* Get base price for row total excluding tax.
*
* The Weee amount will be added to row total depending on Weee display setting.
*
* @return float
*/
Expand All @@ -260,7 +268,9 @@ public function getBaseRowDisplayPriceExclTax()
}

/**
* Get final unit display price including tax, this will add Weee amount to unit price include tax
* Get final unit display price including tax.
*
* This will add Weee amount to unit price include tax.
*
* @return float
*/
Expand All @@ -276,7 +286,9 @@ public function getFinalUnitDisplayPriceInclTax()
}

/**
* Get base final unit display price including tax, this will add Weee amount to unit price include tax
* Get base final unit display price including tax.
*
* This will add Weee amount to unit price include tax.
*
* @return float
*/
Expand All @@ -292,7 +304,9 @@ public function getBaseFinalUnitDisplayPriceInclTax()
}

/**
* Get final row display price including tax, this will add weee amount to rowTotalInclTax
* Get final row display price including tax.
*
* This will add weee amount to rowTotalInclTax.
*
* @return float
*/
Expand All @@ -308,7 +322,9 @@ public function getFinalRowDisplayPriceInclTax()
}

/**
* Get base final row display price including tax, this will add weee amount to rowTotalInclTax
* Get base final row display price including tax.
*
* This will add weee amount to rowTotalInclTax.
*
* @return float
*/
Expand Down Expand Up @@ -362,7 +378,9 @@ public function getBaseFinalUnitDisplayPriceExclTax()
}

/**
* Get final row display price excluding tax, this will add Weee amount to rowTotal
* Get final row display price excluding tax.
*
* This will add Weee amount to rowTotal.
*
* @return float
*/
Expand All @@ -378,7 +396,9 @@ public function getFinalRowDisplayPriceExclTax()
}

/**
* Get base final row display price excluding tax, this will add Weee amount to rowTotal
* Get base final row display price excluding tax.
*
* This will add Weee amount to rowTotal.
*
* @return float
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ public function getRequiredExtensions()
/** @var CompletePackageInterface $package */
foreach ($this->getLocker()->getLockedRepository()->getPackages() as $package) {
$requires = array_keys($package->getRequires());
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
$allPlatformReqs = array_merge($allPlatformReqs, $requires);
}
}
Expand Down
3 changes: 3 additions & 0 deletions lib/internal/Magento/Framework/Composer/MagentoComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*/
namespace Magento\Framework\Composer;

/**
* Magento component.
*/
class MagentoComponent
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public function __construct(
}

/**
* Prepare data.
*
* @param EntityMetadata $metadata
* @param array $data
* @return array
Expand All @@ -36,7 +38,7 @@ protected function prepareData(EntityMetadata $metadata, $data)
{
$output = [];
foreach ($metadata->getEntityConnection()->describeTable($metadata->getEntityTable()) as $column) {
if ($column['DEFAULT'] == 'CURRENT_TIMESTAMP' /*|| $column['IDENTITY']*/) {
if ($column['DEFAULT'] == 'CURRENT_TIMESTAMP') {
continue;
}
if (isset($data[strtolower($column['COLUMN_NAME'])])) {
Expand All @@ -52,6 +54,8 @@ protected function prepareData(EntityMetadata $metadata, $data)
}

/**
* Create entity row.
*
* @param string $entityType
* @param array $data
* @return array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

use Magento\Framework\EntityManager\MetadataPool;

/**
* Delete entity row.
*/
class DeleteEntityRow
{
/**
Expand All @@ -24,6 +27,8 @@ public function __construct(
}

/**
* Delete entity row.
*
* @param string $entityType
* @param array $data
* @return bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
interface ProcessEntityRelationInterface
{
/**
* Process entity relation.
*
* @param string $entityType
* @param object $entity
* @return object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public function __construct(
}

/**
* Prepare data.
*
* @param EntityMetadata $metadata
* @param array $data
* @return array
Expand All @@ -48,6 +50,8 @@ protected function prepareData(EntityMetadata $metadata, $data)
}

/**
* Read entity row.
*
* @param string $entityType
* @param array $data
* @return bool
Expand Down
Loading

0 comments on commit 2110afd

Please sign in to comment.