diff --git a/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php b/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php index 312394787ef82..fce3f6b105dc5 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php @@ -9,7 +9,7 @@ use Magento\Store\Model\Store; /** - * @deprecated + * @deprecated */ class Baseurl implements \Magento\Framework\Notification\MessageInterface { diff --git a/app/code/Magento/AdminNotification/Setup/InstallSchema.php b/app/code/Magento/AdminNotification/Setup/InstallSchema.php index 01c447b9cc2db..d3f9dd2e0c7be 100644 --- a/app/code/Magento/AdminNotification/Setup/InstallSchema.php +++ b/app/code/Magento/AdminNotification/Setup/InstallSchema.php @@ -120,6 +120,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php index 6a0fd28ac7466..edec01a8af4ac 100644 --- a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php +++ b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php @@ -13,7 +13,7 @@ class WebsiteTest extends \PHPUnit_Framework_TestCase /** * @var \Magento\Store\Model\WebSite|\PHPUnit_Framework_MockObject_MockObject */ - protected $webSiteModel; + protected $webSiteModel; /** * @var \Magento\CatalogImportExport\Model\Import\Product\StoreResolver|\PHPUnit_Framework_MockObject_MockObject diff --git a/app/code/Magento/Analytics/Controller/Adminhtml/Subscription/Postpone.php b/app/code/Magento/Analytics/Controller/Adminhtml/Subscription/Postpone.php index b87730132e3d4..8c4183150d0f5 100644 --- a/app/code/Magento/Analytics/Controller/Adminhtml/Subscription/Postpone.php +++ b/app/code/Magento/Analytics/Controller/Adminhtml/Subscription/Postpone.php @@ -55,7 +55,6 @@ public function __construct( $this->notificationTime = $notificationTime; $this->logger = $logger; parent::__construct($context); - } /** diff --git a/app/code/Magento/Analytics/Model/ReportWriter.php b/app/code/Magento/Analytics/Model/ReportWriter.php index c16253305965f..9b787bb3bf9c5 100644 --- a/app/code/Magento/Analytics/Model/ReportWriter.php +++ b/app/code/Magento/Analytics/Model/ReportWriter.php @@ -84,7 +84,6 @@ public function write(WriteInterface $directory, $path) if (!$headers) { $headers = array_keys($row); $stream->writeCsv($headers); - } $stream->writeCsv($row); } diff --git a/app/code/Magento/Analytics/ReportXml/Config/Mapper.php b/app/code/Magento/Analytics/ReportXml/Config/Mapper.php index cd64867984530..190e84c434182 100644 --- a/app/code/Magento/Analytics/ReportXml/Config/Mapper.php +++ b/app/code/Magento/Analytics/ReportXml/Config/Mapper.php @@ -31,7 +31,6 @@ public function execute($configData) $entityData = array_shift($queryData['source']); $queries[$queryData['name']] = $queryData; $queries[$queryData['name']]['source'] = $entityData; - } return $queries; } diff --git a/app/code/Magento/Analytics/ReportXml/DB/ColumnsResolver.php b/app/code/Magento/Analytics/ReportXml/DB/ColumnsResolver.php index 57f08c236116a..59cfac595a6f3 100644 --- a/app/code/Magento/Analytics/ReportXml/DB/ColumnsResolver.php +++ b/app/code/Magento/Analytics/ReportXml/DB/ColumnsResolver.php @@ -61,7 +61,6 @@ public function getColumns(SelectBuilder $selectBuilder, $entityConfig) if (isset($attributeData['group'])) { $group[$columnAlias] = $expression; } - } $selectBuilder->setGroup(array_merge($selectBuilder->getGroup(), $group)); return $columns; diff --git a/app/code/Magento/Analytics/ReportXml/Query.php b/app/code/Magento/Analytics/ReportXml/Query.php index 2cd8cea722da0..729cf55ffdaf5 100644 --- a/app/code/Magento/Analytics/ReportXml/Query.php +++ b/app/code/Magento/Analytics/ReportXml/Query.php @@ -25,7 +25,7 @@ class Query implements \JsonSerializable private $selectHydrator; /** - * @var string + * @var string */ private $connectionName; diff --git a/app/code/Magento/Analytics/ReportXml/ReportProvider.php b/app/code/Magento/Analytics/ReportXml/ReportProvider.php index 363679eebf245..87b9108bcc713 100644 --- a/app/code/Magento/Analytics/ReportXml/ReportProvider.php +++ b/app/code/Magento/Analytics/ReportXml/ReportProvider.php @@ -52,6 +52,5 @@ public function getReport($name, SearchCriteria $criteria = null) $connection = $this->connectionFactory->getConnection($query->getConnectionName()); $statement = $connection->query($query->getSelect()); return new \IteratorIterator($statement); - } } diff --git a/app/code/Magento/Analytics/Test/Unit/Model/Config/Backend/Enabled/SubscriptionHandlerTest.php b/app/code/Magento/Analytics/Test/Unit/Model/Config/Backend/Enabled/SubscriptionHandlerTest.php index 9eb0535580dff..7f4dd8528c0a8 100644 --- a/app/code/Magento/Analytics/Test/Unit/Model/Config/Backend/Enabled/SubscriptionHandlerTest.php +++ b/app/code/Magento/Analytics/Test/Unit/Model/Config/Backend/Enabled/SubscriptionHandlerTest.php @@ -98,7 +98,7 @@ protected function setUp() /** * @param int|null $value null means that $value was not changed * @param bool $isTokenExist - * + * * @dataProvider processDataProvider */ public function testProcess($value, $isTokenExist) diff --git a/app/code/Magento/Authorizenet/Model/Directpost.php b/app/code/Magento/Authorizenet/Model/Directpost.php index 1dc4e79c0bdad..5782cdd041445 100644 --- a/app/code/Magento/Authorizenet/Model/Directpost.php +++ b/app/code/Magento/Authorizenet/Model/Directpost.php @@ -281,15 +281,14 @@ protected function processCapture($result, $payment) switch ($result->getXResponseCode()) { case self::RESPONSE_CODE_APPROVED: case self::RESPONSE_CODE_HELD: - if ( - in_array( - $result->getXResponseReasonCode(), - [ + if (in_array( + $result->getXResponseReasonCode(), + [ self::RESPONSE_REASON_CODE_APPROVED, self::RESPONSE_REASON_CODE_PENDING_REVIEW, self::RESPONSE_REASON_CODE_PENDING_REVIEW_AUTHORIZED ] - ) + ) ) { if (!$payment->getParentTransactionId() || $result->getXTransId() != $payment->getParentTransactionId() @@ -534,8 +533,7 @@ public function validateResponse() { $response = $this->getResponse(); //md5 check - if ( - !$this->getConfigData('trans_md5') + if (!$this->getConfigData('trans_md5') || !$this->getConfigData('login') || !$response->isValidHash($this->getConfigData('trans_md5'), $this->getConfigData('login')) ) { @@ -802,8 +800,7 @@ protected function declineOrder(\Magento\Sales\Model\Order $order, $message = '' { try { $response = $this->getResponse(); - if ( - $voidPayment && $response->getXTransId() && strtoupper($response->getXType()) + if ($voidPayment && $response->getXTransId() && strtoupper($response->getXType()) == self::REQUEST_TYPE_AUTH_ONLY ) { $order->getPayment()->setTransactionId(null)->setParentTransactionId($response->getXTransId())->void(); diff --git a/app/code/Magento/Backend/Model/Config/SessionLifetime/BackendModel.php b/app/code/Magento/Backend/Model/Config/SessionLifetime/BackendModel.php index 2fc8eeac8c994..a4e828dafcc0e 100644 --- a/app/code/Magento/Backend/Model/Config/SessionLifetime/BackendModel.php +++ b/app/code/Magento/Backend/Model/Config/SessionLifetime/BackendModel.php @@ -26,7 +26,7 @@ public function beforeSave() throw new LocalizedException( __('Admin session lifetime must be less than or equal to 31536000 seconds (one year)') ); - } else if ($value < self::MIN_LIFETIME) { + } elseif ($value < self::MIN_LIFETIME) { throw new LocalizedException( __('Admin session lifetime must be greater than or equal to 60 seconds') ); diff --git a/app/code/Magento/Backend/Model/Locale/Manager.php b/app/code/Magento/Backend/Model/Locale/Manager.php index 7f2fa2d5e5a4c..52a5eeb401ec3 100644 --- a/app/code/Magento/Backend/Model/Locale/Manager.php +++ b/app/code/Magento/Backend/Model/Locale/Manager.php @@ -70,7 +70,7 @@ public function switchBackendInterfaceLocale($localeCode) } /** - * Get general interface locale + * Get general interface locale * * @return string */ diff --git a/app/code/Magento/Backend/Model/Menu/Item/Validator.php b/app/code/Magento/Backend/Model/Menu/Item/Validator.php index 720ef840986f3..33e14b4cbc346 100644 --- a/app/code/Magento/Backend/Model/Menu/Item/Validator.php +++ b/app/code/Magento/Backend/Model/Menu/Item/Validator.php @@ -82,8 +82,7 @@ public function validate($data) } foreach ($data as $param => $value) { - if ( - $data[$param] !== null + if ($data[$param] !== null && isset( $this->_validators[$param] ) && !$this->_validators[$param]->isValid( diff --git a/app/code/Magento/Backend/Model/View/Layout/ConditionInterface.php b/app/code/Magento/Backend/Model/View/Layout/ConditionInterface.php index 033ce511d8ec7..a1d59b151d802 100644 --- a/app/code/Magento/Backend/Model/View/Layout/ConditionInterface.php +++ b/app/code/Magento/Backend/Model/View/Layout/ConditionInterface.php @@ -19,7 +19,7 @@ * * * - * + * * Registered condition can be used by ui component declaration in layout * * diff --git a/app/code/Magento/Backend/Model/View/Layout/ConditionPool.php b/app/code/Magento/Backend/Model/View/Layout/ConditionPool.php index ff73b8c519824..8daff46271744 100644 --- a/app/code/Magento/Backend/Model/View/Layout/ConditionPool.php +++ b/app/code/Magento/Backend/Model/View/Layout/ConditionPool.php @@ -10,7 +10,7 @@ /** * Class ConditionPool - * + * * Registry for \Magento\Backend\Model\View\Layout\ConditionInterface * @see usage details in \Magento\Backend\Model\View\Layout\ConditionInterface description * diff --git a/app/code/Magento/Backend/Model/View/Layout/FilterInterface.php b/app/code/Magento/Backend/Model/View/Layout/FilterInterface.php index a1b0a302c0f66..2312cff829264 100644 --- a/app/code/Magento/Backend/Model/View/Layout/FilterInterface.php +++ b/app/code/Magento/Backend/Model/View/Layout/FilterInterface.php @@ -23,7 +23,7 @@ * * * - * + * */ interface FilterInterface { diff --git a/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/AuthenticationTest.php b/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/AuthenticationTest.php index 8f626dba2d024..6010cc78d8b8b 100644 --- a/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/AuthenticationTest.php +++ b/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/AuthenticationTest.php @@ -120,7 +120,7 @@ public function testProcessNotLoggedInUser($isIFrameParam, $isAjaxParam, $isForw if ($isIFrameParam) { $getParamCalls = 1; $actionName = 'deniedIframe'; - } else if ($isAjaxParam) { + } elseif ($isAjaxParam) { $getParamCalls = 2; $actionName = 'deniedJson'; } else { diff --git a/app/code/Magento/Backend/Test/Unit/Block/Page/System/Config/Robots/ResetTest.php b/app/code/Magento/Backend/Test/Unit/Block/Page/System/Config/Robots/ResetTest.php index 2eba4779d91e6..59a6b3463f582 100644 --- a/app/code/Magento/Backend/Test/Unit/Block/Page/System/Config/Robots/ResetTest.php +++ b/app/code/Magento/Backend/Test/Unit/Block/Page/System/Config/Robots/ResetTest.php @@ -11,7 +11,7 @@ /** * Class ResetTest - * @deprecated + * @deprecated * @package Magento\Backend\Test\Unit\Block\Page\System\Config\Robots */ class ResetTest extends \PHPUnit_Framework_TestCase diff --git a/app/code/Magento/Braintree/Block/Adminhtml/Form/Field/Countries.php b/app/code/Magento/Braintree/Block/Adminhtml/Form/Field/Countries.php index 3483e081cf0c9..3be50ef2f8702 100644 --- a/app/code/Magento/Braintree/Block/Adminhtml/Form/Field/Countries.php +++ b/app/code/Magento/Braintree/Block/Adminhtml/Form/Field/Countries.php @@ -47,7 +47,7 @@ protected function _toHtml() /** * Sets name for input element - * + * * @param string $value * @return $this */ diff --git a/app/code/Magento/Braintree/Block/Adminhtml/Form/Field/CountryCreditCard.php b/app/code/Magento/Braintree/Block/Adminhtml/Form/Field/CountryCreditCard.php index c5f2ae5c73da5..8974e2d050f1a 100644 --- a/app/code/Magento/Braintree/Block/Adminhtml/Form/Field/CountryCreditCard.php +++ b/app/code/Magento/Braintree/Block/Adminhtml/Form/Field/CountryCreditCard.php @@ -25,7 +25,7 @@ class CountryCreditCard extends AbstractFieldArray /** * Returns renderer for country element - * + * * @return Countries */ protected function getCountryRenderer() @@ -42,7 +42,7 @@ protected function getCountryRenderer() /** * Returns renderer for country element - * + * * @return CcTypes */ protected function getCcTypesRenderer() diff --git a/app/code/Magento/Braintree/Controller/Payment/GetNonce.php b/app/code/Magento/Braintree/Controller/Payment/GetNonce.php index 5d771c3189a5e..cd767123c67c9 100644 --- a/app/code/Magento/Braintree/Controller/Payment/GetNonce.php +++ b/app/code/Magento/Braintree/Controller/Payment/GetNonce.php @@ -65,7 +65,6 @@ public function execute() $customerId = $this->session->getCustomerId(); $result = $this->command->execute(['public_hash' => $publicHash, 'customer_id' => $customerId])->get(); $response->setData(['paymentMethodNonce' => $result['paymentMethodNonce']]); - } catch (\Exception $e) { $this->logger->critical($e); return $this->processBadRequest($response); diff --git a/app/code/Magento/Braintree/Model/Adminhtml/Source/PaymentAction.php b/app/code/Magento/Braintree/Model/Adminhtml/Source/PaymentAction.php index 7d35b00e5715d..d4b38807537a3 100644 --- a/app/code/Magento/Braintree/Model/Adminhtml/Source/PaymentAction.php +++ b/app/code/Magento/Braintree/Model/Adminhtml/Source/PaymentAction.php @@ -15,7 +15,7 @@ class PaymentAction implements ArrayInterface { /** * Possible actions on order place - * + * * @return array */ public function toOptionArray() diff --git a/app/code/Magento/Braintree/Model/Paypal/Helper/ShippingMethodUpdater.php b/app/code/Magento/Braintree/Model/Paypal/Helper/ShippingMethodUpdater.php index 55f48c95de271..171cb3565044b 100644 --- a/app/code/Magento/Braintree/Model/Paypal/Helper/ShippingMethodUpdater.php +++ b/app/code/Magento/Braintree/Model/Paypal/Helper/ShippingMethodUpdater.php @@ -53,10 +53,8 @@ public function execute($shippingMethod, Quote $quote) } if (!$quote->getIsVirtual()) { - $shippingAddress = $quote->getShippingAddress(); if ($shippingMethod !== $shippingAddress->getShippingMethod()) { - $this->disabledQuoteAddressValidation($quote); $shippingAddress->setShippingMethod($shippingMethod); diff --git a/app/code/Magento/Braintree/Model/Report/ConditionAppliers/MultipleValue.php b/app/code/Magento/Braintree/Model/Report/ConditionAppliers/MultipleValue.php index df4700d4c25aa..17fb8e0190f3b 100644 --- a/app/code/Magento/Braintree/Model/Report/ConditionAppliers/MultipleValue.php +++ b/app/code/Magento/Braintree/Model/Report/ConditionAppliers/MultipleValue.php @@ -24,7 +24,7 @@ public function apply($field, $condition, $value) { $result = false; - switch($condition) { + switch ($condition) { case ApplierInterface::IN: $field->in($value); $result = true; diff --git a/app/code/Magento/Braintree/Model/Report/ConditionAppliers/Range.php b/app/code/Magento/Braintree/Model/Report/ConditionAppliers/Range.php index 5937425ee7a7f..bfe1120642003 100644 --- a/app/code/Magento/Braintree/Model/Report/ConditionAppliers/Range.php +++ b/app/code/Magento/Braintree/Model/Report/ConditionAppliers/Range.php @@ -24,7 +24,7 @@ public function apply($field, $condition, $value) { $result = false; - switch($condition) { + switch ($condition) { case ApplierInterface::QTEQ: $field->greaterThanOrEqualTo($value); $result = true; diff --git a/app/code/Magento/Braintree/Model/Report/ConditionAppliers/Text.php b/app/code/Magento/Braintree/Model/Report/ConditionAppliers/Text.php index fa7272be7f15e..ab27f117d89f1 100644 --- a/app/code/Magento/Braintree/Model/Report/ConditionAppliers/Text.php +++ b/app/code/Magento/Braintree/Model/Report/ConditionAppliers/Text.php @@ -25,7 +25,7 @@ public function apply($field, $condition, $value) $result = false; $value = trim($value, "% \r\n\t"); - switch($condition) { + switch ($condition) { case ApplierInterface::EQ: $field->is($value); $result = true; diff --git a/app/code/Magento/Braintree/Model/Report/Row/TransactionMap.php b/app/code/Magento/Braintree/Model/Report/Row/TransactionMap.php index bb9c807c530ea..de1c4afc74434 100644 --- a/app/code/Magento/Braintree/Model/Report/Row/TransactionMap.php +++ b/app/code/Magento/Braintree/Model/Report/Row/TransactionMap.php @@ -119,7 +119,7 @@ public function getCustomAttributes() $output = []; foreach ($this->getMappedValues() as $key => $value) { $attribute = $this->attributeValueFactory->create(); - if(in_array($key, $shouldBeLocalized)) { + if (in_array($key, $shouldBeLocalized)) { $value = __($value); } $output[] = $attribute->setAttributeCode($key)->setValue($value); diff --git a/app/code/Magento/Braintree/Test/Unit/Gateway/Request/PaymentDataBuilderTest.php b/app/code/Magento/Braintree/Test/Unit/Gateway/Request/PaymentDataBuilderTest.php index 40d62a64790e7..21fbea73a3fb7 100644 --- a/app/code/Magento/Braintree/Test/Unit/Gateway/Request/PaymentDataBuilderTest.php +++ b/app/code/Magento/Braintree/Test/Unit/Gateway/Request/PaymentDataBuilderTest.php @@ -15,7 +15,7 @@ /** * Class PaymentDataBuilderTest - * + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class PaymentDataBuilderTest extends \PHPUnit_Framework_TestCase diff --git a/app/code/Magento/Braintree/Test/Unit/Model/Report/TransactionsCollectionTest.php b/app/code/Magento/Braintree/Test/Unit/Model/Report/TransactionsCollectionTest.php index 7ceaadf40e644..c18b75d8a4986 100644 --- a/app/code/Magento/Braintree/Test/Unit/Model/Report/TransactionsCollectionTest.php +++ b/app/code/Magento/Braintree/Test/Unit/Model/Report/TransactionsCollectionTest.php @@ -187,7 +187,7 @@ public function testGetItemsWithNullLimit() /** * Add fields to filter - * + * * @dataProvider addToFilterDataProvider */ public function testAddToFilter($field, $condition, $filterMapperCall, $expectedCondition) @@ -211,7 +211,7 @@ public function testAddToFilter($field, $condition, $filterMapperCall, $expected /** * addToFilter DataProvider - * + * * @return array */ public function addToFilterDataProvider() diff --git a/app/code/Magento/Braintree/Test/Unit/Ui/Component/Report/Filters/Type/DateRangeTest.php b/app/code/Magento/Braintree/Test/Unit/Ui/Component/Report/Filters/Type/DateRangeTest.php index 1b55e222895f2..8be689f7db24e 100644 --- a/app/code/Magento/Braintree/Test/Unit/Ui/Component/Report/Filters/Type/DateRangeTest.php +++ b/app/code/Magento/Braintree/Test/Unit/Ui/Component/Report/Filters/Type/DateRangeTest.php @@ -181,12 +181,12 @@ public function testPrepare($name, $filterData, $expectedCondition) /** * Gets Filter mock - * + * * @param string $name * @param string $expectedType * @param string $expectedDate * @param int $i - * + * * @return Filter|\PHPUnit_Framework_MockObject_MockObject */ private function getFilterMock($name, $expectedType, $expectedDate, &$i) diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php index 8253d84f07363..aae15b9ded321 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php @@ -115,7 +115,6 @@ public function isDisabledField() && $this->getAttribute()->getAttributeCode() === 'price' ) || $this->getElement()->getReadonly(); - } /** diff --git a/app/code/Magento/Bundle/Model/OptionRepository.php b/app/code/Magento/Bundle/Model/OptionRepository.php index fa4a363f168c9..b86e41f1a43b0 100644 --- a/app/code/Magento/Bundle/Model/OptionRepository.php +++ b/app/code/Magento/Bundle/Model/OptionRepository.php @@ -276,8 +276,7 @@ private function compareLinks( } foreach ($firstArray as $obj) { foreach ($secondArray as $objToCompare) { - if ( - $obj->getId() != $objToCompare->getId() + if ($obj->getId() != $objToCompare->getId() && $obj instanceof \Magento\Bundle\Api\Data\LinkInterface && $objToCompare instanceof \Magento\Bundle\Api\Data\LinkInterface ) { diff --git a/app/code/Magento/Bundle/Setup/UpgradeSchema.php b/app/code/Magento/Bundle/Setup/UpgradeSchema.php index d80a7d5837a62..f0310c37431d5 100755 --- a/app/code/Magento/Bundle/Setup/UpgradeSchema.php +++ b/app/code/Magento/Bundle/Setup/UpgradeSchema.php @@ -23,7 +23,6 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con $setup->startSetup(); $connection = $setup->getConnection(); if (version_compare($context->getVersion(), '2.0.1', '<')) { - $fields = [ ['table' => 'catalog_product_index_price_bundle_opt_idx', 'column' => 'alt_group_price'], ['table' => 'catalog_product_index_price_bundle_opt_tmp', 'column' => 'alt_group_price'], diff --git a/app/code/Magento/CacheInvalidate/Observer/InvalidateVarnishObserver.php b/app/code/Magento/CacheInvalidate/Observer/InvalidateVarnishObserver.php index d3b6f5451b197..47c54a5a2c893 100644 --- a/app/code/Magento/CacheInvalidate/Observer/InvalidateVarnishObserver.php +++ b/app/code/Magento/CacheInvalidate/Observer/InvalidateVarnishObserver.php @@ -65,7 +65,6 @@ public function execute(\Magento\Framework\Event\Observer $observer) if (!empty($tags)) { $this->purgeCache->sendPurgeRequest(implode('|', array_unique($tags))); } - } } diff --git a/app/code/Magento/Captcha/Model/DefaultModel.php b/app/code/Magento/Captcha/Model/DefaultModel.php index a977ad6923611..da72abb862b6f 100644 --- a/app/code/Magento/Captcha/Model/DefaultModel.php +++ b/app/code/Magento/Captcha/Model/DefaultModel.php @@ -117,8 +117,7 @@ public function getBlockName() */ public function isRequired($login = null) { - if ( - $this->isUserAuth() + if ($this->isUserAuth() && !$this->isShownToLoggedInUser() || !$this->isEnabled() || !in_array( @@ -425,8 +424,7 @@ private function isShowAlways() return true; } - if ( - (string)$this->captchaData->getConfig('mode') == \Magento\Captcha\Helper\Data::MODE_AFTER_FAIL + if ((string)$this->captchaData->getConfig('mode') == \Magento\Captcha\Helper\Data::MODE_AFTER_FAIL && $this->getAllowedAttemptsForSameLogin() == 0 ) { return true; diff --git a/app/code/Magento/Captcha/Observer/CheckGuestCheckoutObserver.php b/app/code/Magento/Captcha/Observer/CheckGuestCheckoutObserver.php index 045397988a467..85ee15f7f61d8 100644 --- a/app/code/Magento/Captcha/Observer/CheckGuestCheckoutObserver.php +++ b/app/code/Magento/Captcha/Observer/CheckGuestCheckoutObserver.php @@ -69,8 +69,7 @@ public function execute(\Magento\Framework\Event\Observer $observer) if ($checkoutMethod == \Magento\Checkout\Model\Type\Onepage::METHOD_GUEST) { if ($captchaModel->isRequired()) { $controller = $observer->getControllerAction(); - if ( - !$captchaModel->isCorrect($this->captchaStringResolver->resolve($controller->getRequest(), $formId)) + if (!$captchaModel->isCorrect($this->captchaStringResolver->resolve($controller->getRequest(), $formId)) ) { $this->_actionFlag->set('', \Magento\Framework\App\Action\Action::FLAG_NO_DISPATCH, true); $result = ['error' => 1, 'message' => __('Incorrect CAPTCHA')]; diff --git a/app/code/Magento/Captcha/Observer/CheckRegisterCheckoutObserver.php b/app/code/Magento/Captcha/Observer/CheckRegisterCheckoutObserver.php index 2c9f698f835a9..fc0dc515a1806 100644 --- a/app/code/Magento/Captcha/Observer/CheckRegisterCheckoutObserver.php +++ b/app/code/Magento/Captcha/Observer/CheckRegisterCheckoutObserver.php @@ -69,8 +69,7 @@ public function execute(\Magento\Framework\Event\Observer $observer) if ($checkoutMethod == \Magento\Checkout\Model\Type\Onepage::METHOD_REGISTER) { if ($captchaModel->isRequired()) { $controller = $observer->getControllerAction(); - if ( - !$captchaModel->isCorrect($this->captchaStringResolver->resolve($controller->getRequest(), $formId)) + if (!$captchaModel->isCorrect($this->captchaStringResolver->resolve($controller->getRequest(), $formId)) ) { $this->_actionFlag->set('', \Magento\Framework\App\Action\Action::FLAG_NO_DISPATCH, true); $result = ['error' => 1, 'message' => __('Incorrect CAPTCHA')]; diff --git a/app/code/Magento/Captcha/Observer/CheckUserForgotPasswordBackendObserver.php b/app/code/Magento/Captcha/Observer/CheckUserForgotPasswordBackendObserver.php index f4e20045156d7..a262b0afa09c6 100644 --- a/app/code/Magento/Captcha/Observer/CheckUserForgotPasswordBackendObserver.php +++ b/app/code/Magento/Captcha/Observer/CheckUserForgotPasswordBackendObserver.php @@ -71,8 +71,7 @@ public function execute(\Magento\Framework\Event\Observer $observer) $params = $observer->getControllerAction()->getRequest()->getParams(); if (!empty($email) && !empty($params)) { if ($captchaModel->isRequired()) { - if ( - !$captchaModel->isCorrect($this->captchaStringResolver->resolve($controller->getRequest(), $formId)) + if (!$captchaModel->isCorrect($this->captchaStringResolver->resolve($controller->getRequest(), $formId)) ) { $this->_session->setEmail((string)$controller->getRequest()->getPost('email')); $this->_actionFlag->set('', \Magento\Framework\App\Action\Action::FLAG_NO_DISPATCH, true); diff --git a/app/code/Magento/Captcha/Setup/InstallSchema.php b/app/code/Magento/Captcha/Setup/InstallSchema.php index 9d2f843da686d..52c2cfc7b41d2 100644 --- a/app/code/Magento/Captcha/Setup/InstallSchema.php +++ b/app/code/Magento/Captcha/Setup/InstallSchema.php @@ -56,6 +56,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Catalog/Api/Data/ProductAttributeMediaGalleryEntryInterface.php b/app/code/Magento/Catalog/Api/Data/ProductAttributeMediaGalleryEntryInterface.php index 5bd1ca06ea969..76cd5bbfd9e1a 100644 --- a/app/code/Magento/Catalog/Api/Data/ProductAttributeMediaGalleryEntryInterface.php +++ b/app/code/Magento/Catalog/Api/Data/ProductAttributeMediaGalleryEntryInterface.php @@ -139,7 +139,7 @@ public function getContent(); * Set media gallery content * * @param $content \Magento\Framework\Api\Data\ImageContentInterface - * @return $this + * @return $this */ public function setContent($content); diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.php index f4f0154e0dedd..1c27a8a7f7d0f 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.php @@ -364,7 +364,6 @@ protected function getRedirectParams($isNewCategory, $hasError, $categoryId, $pa } else { $path = 'catalog/*/edit'; $params['id'] = $categoryId; - } return ['path' => $path, 'params' => $params]; } diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Edit.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Edit.php index 0b1df5ec4d1a6..77c0c88678fa2 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Edit.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Edit.php @@ -54,7 +54,7 @@ public function execute() $resultRedirect = $this->resultRedirectFactory->create(); $this->messageManager->addError(__('This product doesn\'t exist.')); return $resultRedirect->setPath('catalog/*/'); - } else if ($productId === 0) { + } elseif ($productId === 0) { /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */ $resultRedirect = $this->resultRedirectFactory->create(); $this->messageManager->addError(__('Invalid product id. Should be numeric value greater than 0')); diff --git a/app/code/Magento/Catalog/Cron/RefreshSpecialPrices.php b/app/code/Magento/Catalog/Cron/RefreshSpecialPrices.php index 5e04b026db3d4..dd1e7d38ec0fb 100644 --- a/app/code/Magento/Catalog/Cron/RefreshSpecialPrices.php +++ b/app/code/Magento/Catalog/Cron/RefreshSpecialPrices.php @@ -169,7 +169,6 @@ protected function _refreshSpecialPriceByStore($storeId, $attrCode, $attrConditi if (!empty($selectData)) { $this->_processor->getIndexer()->reindexList($selectData); } - } /** diff --git a/app/code/Magento/Catalog/Helper/Data.php b/app/code/Magento/Catalog/Helper/Data.php index 15813eebb969f..ec8190c695263 100644 --- a/app/code/Magento/Catalog/Helper/Data.php +++ b/app/code/Magento/Catalog/Helper/Data.php @@ -272,7 +272,6 @@ public function setStoreId($store) public function getBreadcrumbPath() { if (!$this->_categoryPath) { - $path = []; $category = $this->getCategory(); if ($category) { diff --git a/app/code/Magento/Catalog/Helper/Image.php b/app/code/Magento/Catalog/Helper/Image.php index 6fa3ec2adb7cf..fcd6de3c11389 100644 --- a/app/code/Magento/Catalog/Helper/Image.php +++ b/app/code/Magento/Catalog/Helper/Image.php @@ -432,7 +432,7 @@ public function placeholder($fileName) * * @param null|string $placeholder * @return string - * + * * @deprecated Returns only default placeholder. * Does not take into account custom placeholders set in Configuration. */ @@ -543,7 +543,7 @@ public function getResizedImageInfo() /** * @param null|string $placeholder * @return string - * + * * @deprecated Returns only default placeholder. * Does not take into account custom placeholders set in Configuration. */ diff --git a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php index 455a006098932..a061f34e54d85 100644 --- a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php +++ b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php @@ -97,7 +97,7 @@ public function beforeSave($object) if ($imageName = $this->getUploadedImageName($value)) { $object->setData($this->additionalData . $attributeName, $value); $object->setData($attributeName, $imageName); - } else if (!is_string($value)) { + } elseif (!is_string($value)) { $object->setData($attributeName, ''); } diff --git a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php index d18146ebae85e..fcaaff7502504 100644 --- a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php +++ b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php @@ -121,7 +121,6 @@ public function afterLoad($object) } else { $object->setData($attributeCode, $data); } - } } return $this; diff --git a/app/code/Magento/Catalog/Model/Category/DataProvider.php b/app/code/Magento/Catalog/Model/Category/DataProvider.php index 3718ce85e1681..ee0a3f65925e8 100644 --- a/app/code/Magento/Catalog/Model/Category/DataProvider.php +++ b/app/code/Magento/Catalog/Model/Category/DataProvider.php @@ -209,8 +209,7 @@ private function addUseDefaultValueCheckbox(Category $category, array $meta) && $category->getStoreId(); $attributePath = $this->getArrayManager()->findPath($attributeCode, $meta); - if ( - !$attributePath + if (!$attributePath || !$canDisplayUseDefault || in_array($attributeCode, $this->elementsWithUseConfigSetting) ) { diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Category/Action/Rows.php b/app/code/Magento/Catalog/Model/Indexer/Product/Category/Action/Rows.php index f622e7b6bb32b..25347d5dd7c46 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Category/Action/Rows.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Category/Action/Rows.php @@ -47,7 +47,7 @@ public function execute(array $entityIds = [], $useTempTable = false) /** * Register affected products - * + * * @param array $entityIds * @return void */ diff --git a/app/code/Magento/Catalog/Model/Product.php b/app/code/Magento/Catalog/Model/Product.php index 4098558d0d0b0..ab2f666d30f4c 100644 --- a/app/code/Magento/Catalog/Model/Product.php +++ b/app/code/Magento/Catalog/Model/Product.php @@ -2571,7 +2571,6 @@ public function setMediaGalleryEntries(array $mediaGalleryEntries = null) ->convertFrom($entry); } $this->setData('media_gallery', ['images' => $images]); - } return $this; } diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Weight.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Weight.php index 49835fb10a9ed..6be70d3d0bcfd 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Weight.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Weight.php @@ -26,7 +26,6 @@ public function __construct( \Magento\Framework\Locale\FormatInterface $localeFormat ) { $this->localeFormat = $localeFormat; - } /** diff --git a/app/code/Magento/Catalog/Model/Product/Price/Validation/TierPriceValidator.php b/app/code/Magento/Catalog/Model/Product/Price/Validation/TierPriceValidator.php index b39423c8894de..054129cd7d00f 100644 --- a/app/code/Magento/Catalog/Model/Product/Price/Validation/TierPriceValidator.php +++ b/app/code/Magento/Catalog/Model/Product/Price/Validation/TierPriceValidator.php @@ -214,8 +214,7 @@ private function checkSku( */ private function checkPrice(\Magento\Catalog\Api\Data\TierPriceInterface $price, $key, Result $validationResult) { - if ( - null === $price->getPrice() + if (null === $price->getPrice() || $price->getPrice() < 0 || ($price->getPriceType() === \Magento\Catalog\Api\Data\TierPriceInterface::PRICE_TYPE_DISCOUNT && $price->getPrice() > 100 @@ -260,14 +259,13 @@ private function checkPriceType( $key, Result $validationResult ) { - if ( - !in_array( - $price->getPriceType(), - [ + if (!in_array( + $price->getPriceType(), + [ \Magento\Catalog\Api\Data\TierPriceInterface::PRICE_TYPE_FIXED, \Magento\Catalog\Api\Data\TierPriceInterface::PRICE_TYPE_DISCOUNT ] - ) + ) || (array_search(\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE, $ids) && $price->getPriceType() !== \Magento\Catalog\Api\Data\TierPriceInterface::PRICE_TYPE_DISCOUNT) ) { diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Price.php b/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Price.php index a8b7bf2960185..0c3d0a3937bfa 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Price.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Price.php @@ -115,10 +115,10 @@ protected function _getSelect() // remove join with main table $fromPart = $select->getPart(\Magento\Framework\DB\Select::FROM); if (!isset( - $fromPart[\Magento\Catalog\Model\ResourceModel\Product\Collection::INDEX_TABLE_ALIAS] - ) || !isset( - $fromPart[\Magento\Catalog\Model\ResourceModel\Product\Collection::MAIN_TABLE_ALIAS] - ) + $fromPart[\Magento\Catalog\Model\ResourceModel\Product\Collection::INDEX_TABLE_ALIAS] + ) || !isset( + $fromPart[\Magento\Catalog\Model\ResourceModel\Product\Collection::MAIN_TABLE_ALIAS] + ) ) { return $select; } diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/CategoryLink.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/CategoryLink.php index 6b481c95583f7..52ecfa064f4f9 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/CategoryLink.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/CategoryLink.php @@ -30,8 +30,7 @@ class CategoryLink * @param \Magento\Framework\EntityManager\MetadataPool $metadataPool * @param ResourceConnection $resourceConnection */ - public function __construct - ( + public function __construct( \Magento\Framework\EntityManager\MetadataPool $metadataPool, ResourceConnection $resourceConnection ) { diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Option.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Option.php index da3227da75087..a9917df4c5c61 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Option.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Option.php @@ -260,7 +260,6 @@ protected function _saveValueTitles(\Magento\Framework\Model\AbstractModel $obje if ($existInCurrentStore) { if ($isDeleteStoreTitle && (int)$storeId != \Magento\Store\Model\Store::DEFAULT_STORE_ID) { $connection->delete($titleTableName, ['option_title_id = ?' => $existInCurrentStore]); - } elseif ($object->getStoreId() == $storeId) { $data = $this->_prepareDataForTable( new \Magento\Framework\DataObject(['title' => $object->getTitle()]), @@ -277,8 +276,7 @@ protected function _saveValueTitles(\Magento\Framework\Model\AbstractModel $obje } } else { // we should insert record into not default store only of if it does not exist in default store - if ( - ($storeId == \Magento\Store\Model\Store::DEFAULT_STORE_ID && !$existInDefaultStore) || + if (($storeId == \Magento\Store\Model\Store::DEFAULT_STORE_ID && !$existInDefaultStore) || ( $storeId != \Magento\Store\Model\Store::DEFAULT_STORE_ID && !$existInCurrentStore && diff --git a/app/code/Magento/Catalog/Setup/InstallSchema.php b/app/code/Magento/Catalog/Setup/InstallSchema.php index 31cb143396dd4..642970de44609 100644 --- a/app/code/Magento/Catalog/Setup/InstallSchema.php +++ b/app/code/Magento/Catalog/Setup/InstallSchema.php @@ -4273,6 +4273,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con ->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Catalog/Setup/UpgradeData.php b/app/code/Magento/Catalog/Setup/UpgradeData.php index 374f831890cfe..57d55d2b5794f 100644 --- a/app/code/Magento/Catalog/Setup/UpgradeData.php +++ b/app/code/Magento/Catalog/Setup/UpgradeData.php @@ -378,7 +378,6 @@ private function changePriceAttributeDefaultScope($categorySetup) 'is_global', \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL ); - } } } diff --git a/app/code/Magento/Catalog/Test/Unit/Model/CustomOptions/CustomOptionProcessorTest.php b/app/code/Magento/Catalog/Test/Unit/Model/CustomOptions/CustomOptionProcessorTest.php index 8977a332684e2..fac7bb72a653b 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/CustomOptions/CustomOptionProcessorTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/CustomOptions/CustomOptionProcessorTest.php @@ -104,7 +104,6 @@ protected function setUp() $this->customOptionFactory, $this->serializer ); - } public function testConvertToBuyRequest() diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/Backend/Media/ImageEntryConverterTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/Backend/Media/ImageEntryConverterTest.php index fecb0f6b62035..41059022f786c 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/Backend/Media/ImageEntryConverterTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/Backend/Media/ImageEntryConverterTest.php @@ -207,7 +207,7 @@ public function testConvertFrom() 'name' => '/s/a/sample_3.jpg' ] ], - 'media_type' => null, + 'media_type' => null, ]; $this->assertEquals($expectedResult, $this->modelObject->convertFrom($this->mediaGalleryEntryMock)); diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/Link/ResolverTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/Link/ResolverTest.php index 9ce3ca804531c..b05424b9e5c44 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/Link/ResolverTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/Link/ResolverTest.php @@ -35,7 +35,6 @@ public function testGetLinksEmpty() ->with('links', []) ->willReturn($someLinks); $this->assertEquals($someLinks, $this->resolver->getLinks()); - } public function testGetLinksOverridden() @@ -46,6 +45,5 @@ public function testGetLinksOverridden() $this->resolver->override($overriddenLinks); $this->assertEquals($overriddenLinks, $this->resolver->getLinks()); - } } diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/Website/LinkTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/Website/LinkTest.php index a01fbc4d2e386..2363559096a9d 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/Website/LinkTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/Website/LinkTest.php @@ -93,7 +93,7 @@ public function testSaveWebsiteIds() ->method('insertMultiple') ->with('catalog_product_website', [ ['product_id' => $productId, 'website_id' => 3] - ]); + ]); $this->connection->expects($this->once()) ->method('delete') diff --git a/app/code/Magento/Catalog/Test/Unit/Plugin/Block/TopmenuTest.php b/app/code/Magento/Catalog/Test/Unit/Plugin/Block/TopmenuTest.php index 3a17233deb2e4..50d076490432a 100644 --- a/app/code/Magento/Catalog/Test/Unit/Plugin/Block/TopmenuTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Plugin/Block/TopmenuTest.php @@ -10,7 +10,7 @@ /** * Class TopmenuTest - * + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class TopmenuTest extends \PHPUnit_Framework_TestCase diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AbstractModifier.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AbstractModifier.php index f568c0909b7dc..c882d76263658 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AbstractModifier.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AbstractModifier.php @@ -106,8 +106,7 @@ private function _getNextAttributeSortOrder(array $meta, $attributeCodes, $defau $defaultSortOrder, $iteration ); - } elseif ( - in_array($attributeCode, $attributeCodes) + } elseif (in_array($attributeCode, $attributeCodes) && isset($attributeMeta['arguments']['data']['config']['sortOrder']) ) { $defaultSortOrder = $attributeMeta['arguments']['data']['config']['sortOrder'] + $iteration; @@ -161,8 +160,7 @@ protected function getFirstPanelCode(array $meta) $name = null; foreach ($meta as $fieldSetName => $fieldSetMeta) { - if ( - isset($fieldSetMeta['arguments']['data']['config']['sortOrder']) + if (isset($fieldSetMeta['arguments']['data']['config']['sortOrder']) && (null === $min || $fieldSetMeta['arguments']['data']['config']['sortOrder'] <= $min) ) { $min = $fieldSetMeta['arguments']['data']['config']['sortOrder']; @@ -183,8 +181,7 @@ protected function getFirstPanelCode(array $meta) protected function getGroupCodeByField(array $meta, $field) { foreach ($meta as $groupCode => $groupData) { - if ( - isset($groupData['children'][$field]) + if (isset($groupData['children'][$field]) || isset($groupData['children'][static::CONTAINER_PREFIX . $field]) ) { return $groupCode; diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php index 687f6349146c2..cf8112d83d843 100755 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php @@ -798,8 +798,7 @@ private function getValue(ProductAttributeInterface $attribute) */ private function getScopeLabel(ProductAttributeInterface $attribute) { - if ( - $this->storeManager->isSingleStoreMode() + if ($this->storeManager->isSingleStoreMode() || $attribute->getFrontendInput() === AttributeInterface::FRONTEND_INPUT ) { return ''; diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Images.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Images.php index e7b3e86083a8e..e47a62868c2b5 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Images.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Images.php @@ -54,8 +54,7 @@ public function modifyData(array $data) /** @var \Magento\Catalog\Api\Data\ProductInterface $product */ $product = $this->locator->getProduct(); $modelId = $product->getId(); - if ( - isset($data[$modelId][self::DATA_SOURCE_DEFAULT]['media_gallery']) + if (isset($data[$modelId][self::DATA_SOURCE_DEFAULT]['media_gallery']) && !empty($data[$modelId][self::DATA_SOURCE_DEFAULT]['media_gallery']) && !empty($data[$modelId][self::DATA_SOURCE_DEFAULT]['media_gallery']['images']) ) { diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/ScheduleDesignUpdate.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/ScheduleDesignUpdate.php index f9421b5154bed..40bb0dfc9cd39 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/ScheduleDesignUpdate.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/ScheduleDesignUpdate.php @@ -57,8 +57,7 @@ public function modifyData(array $data) */ protected function customizeDateRangeField(array $meta) { - if ( - $this->getGroupCodeByField($meta, self::CODE_CUSTOM_DESIGN_FROM) + if ($this->getGroupCodeByField($meta, self::CODE_CUSTOM_DESIGN_FROM) !== $this->getGroupCodeByField($meta, self::CODE_CUSTOM_DESIGN_TO) ) { return $meta; diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator.php index 0416a5640337b..621acac6cc5e7 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator.php @@ -229,7 +229,6 @@ public function isAttributeValid($attrCode, array $attrParams, array $rowData) } return (bool)$valid; - } /** diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator/SuperProductsSku.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator/SuperProductsSku.php index 54275e861366e..249e52a5109ad 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator/SuperProductsSku.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator/SuperProductsSku.php @@ -40,14 +40,13 @@ public function isValid($value) $this->_clearMessages(); $oldSku = $this->skuProcessor->getOldSkus(); if (!empty($value['_super_products_sku']) && (!isset( - $oldSku[$value['_super_products_sku']] - ) && $this->skuProcessor->getNewSku($value['_super_products_sku']) === null + $oldSku[$value['_super_products_sku']] + ) && $this->skuProcessor->getNewSku($value['_super_products_sku']) === null ) ) { $this->_addMessages([self::ERROR_SUPER_PRODUCTS_SKU_NOT_FOUND]); return false; } return true; - } } diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator/TierPrice.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator/TierPrice.php index cd360f1f873f9..dac82838580c5 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator/TierPrice.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator/TierPrice.php @@ -44,40 +44,40 @@ public function isValid($value) { $this->_clearMessages(); if (isset( + $value['_tier_price_website'] + ) && strlen( + $value['_tier_price_website'] + ) || isset( + $value['_tier_price_customer_group'] + ) && strlen( + $value['_tier_price_customer_group'] + ) || isset( + $value['_tier_price_qty'] + ) && strlen( + $value['_tier_price_qty'] + ) || isset( + $value['_tier_price_price'] + ) && strlen( + $value['_tier_price_price'] + ) + ) { + if (!isset( $value['_tier_price_website'] - ) && strlen( - $value['_tier_price_website'] - ) || isset( + ) || !isset( $value['_tier_price_customer_group'] - ) && strlen( - $value['_tier_price_customer_group'] - ) || isset( - $value['_tier_price_qty'] - ) && strlen( + ) || !isset( $value['_tier_price_qty'] - ) || isset( + ) || !isset( $value['_tier_price_price'] - ) && strlen( + ) || !strlen( + $value['_tier_price_website'] + ) || !strlen( + $value['_tier_price_customer_group'] + ) || !strlen( + $value['_tier_price_qty'] + ) || !strlen( $value['_tier_price_price'] ) - ) { - if (!isset( - $value['_tier_price_website'] - ) || !isset( - $value['_tier_price_customer_group'] - ) || !isset( - $value['_tier_price_qty'] - ) || !isset( - $value['_tier_price_price'] - ) || !strlen( - $value['_tier_price_website'] - ) || !strlen( - $value['_tier_price_customer_group'] - ) || !strlen( - $value['_tier_price_qty'] - ) || !strlen( - $value['_tier_price_price'] - ) ) { $this->_addMessages([self::ERROR_TIER_DATA_INCOMPLETE]); return false; @@ -87,8 +87,8 @@ public function isValid($value) $this->_addMessages([self::ERROR_INVALID_TIER_PRICE_SITE]); return false; } elseif ($value['_tier_price_customer_group'] != self::VALUE_ALL && !isset( - $this->customerGroups[$value['_tier_price_customer_group']] - ) + $this->customerGroups[$value['_tier_price_customer_group']] + ) ) { $this->_addMessages([self::ERROR_INVALID_TIER_PRICE_GROUP]); return false; diff --git a/app/code/Magento/CatalogInventory/Model/Plugin/FilterCustomAttribute.php b/app/code/Magento/CatalogInventory/Model/Plugin/FilterCustomAttribute.php index 05240781211e1..880d62225bc0c 100644 --- a/app/code/Magento/CatalogInventory/Model/Plugin/FilterCustomAttribute.php +++ b/app/code/Magento/CatalogInventory/Model/Plugin/FilterCustomAttribute.php @@ -30,7 +30,7 @@ public function __construct(array $blackList = []) * @param Repository $repository * @param array $attributes * @return \Magento\Eav\Model\AttributeRepository - * + * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterGetCustomAttributesMetadata(Repository $repository, array $attributes) diff --git a/app/code/Magento/CatalogInventory/Setup/InstallSchema.php b/app/code/Magento/CatalogInventory/Setup/InstallSchema.php index 3a343e9029cb3..1af1980bf8985 100644 --- a/app/code/Magento/CatalogInventory/Setup/InstallSchema.php +++ b/app/code/Magento/CatalogInventory/Setup/InstallSchema.php @@ -457,6 +457,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con ->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/CatalogInventory/Ui/Component/Product/Form/Element/UseConfigSettings.php b/app/code/Magento/CatalogInventory/Ui/Component/Product/Form/Element/UseConfigSettings.php index 9e510ff1e7bad..a662486211def 100644 --- a/app/code/Magento/CatalogInventory/Ui/Component/Product/Form/Element/UseConfigSettings.php +++ b/app/code/Magento/CatalogInventory/Ui/Component/Product/Form/Element/UseConfigSettings.php @@ -21,8 +21,7 @@ class UseConfigSettings extends Checkbox public function prepare() { $config = $this->getData('config'); - if ( - isset($config['keyInConfiguration']) + if (isset($config['keyInConfiguration']) && isset($config['valueFromConfig']) && $config['valueFromConfig'] instanceof ValueSourceInterface ) { diff --git a/app/code/Magento/CatalogRule/Model/CatalogRuleRepository.php b/app/code/Magento/CatalogRule/Model/CatalogRuleRepository.php index 70bab6f0dee7a..82c1c29c63ad0 100644 --- a/app/code/Magento/CatalogRule/Model/CatalogRuleRepository.php +++ b/app/code/Magento/CatalogRule/Model/CatalogRuleRepository.php @@ -54,8 +54,7 @@ public function save(Data\RuleInterface $rule) unset($this->rules[$rule->getId()]); } catch (ValidatorException $e) { throw new CouldNotSaveException(__($e->getMessage())); - } - catch (\Exception $e) { + } catch (\Exception $e) { throw new CouldNotSaveException(__('Unable to save rule %1', $rule->getRuleId())); } return $rule; diff --git a/app/code/Magento/CatalogRule/Setup/InstallData.php b/app/code/Magento/CatalogRule/Setup/InstallData.php index e679d324de66f..86ebebcd8d51c 100644 --- a/app/code/Magento/CatalogRule/Setup/InstallData.php +++ b/app/code/Magento/CatalogRule/Setup/InstallData.php @@ -41,6 +41,5 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $installer->doUpdateClassAliases(); $setup->endSetup(); - } } diff --git a/app/code/Magento/CatalogRule/Setup/InstallSchema.php b/app/code/Magento/CatalogRule/Setup/InstallSchema.php index d8e3d8295ff3b..3a9d90f0a4b81 100644 --- a/app/code/Magento/CatalogRule/Setup/InstallSchema.php +++ b/app/code/Magento/CatalogRule/Setup/InstallSchema.php @@ -513,6 +513,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php index 4873bf22e1b1e..4d9eeb6a221c8 100644 --- a/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php +++ b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php @@ -146,13 +146,11 @@ private function processQueryWithField(FilterInterface $filter, $isNegation, $qu $this->connection->quoteIdentifier($alias . '.' . $attribute->getAttributeCode()), $query ); - } elseif ( - $filter->getType() === FilterInterface::TYPE_TERM && + } elseif ($filter->getType() === FilterInterface::TYPE_TERM && in_array($attribute->getFrontendInput(), ['select', 'multiselect'], true) ) { $resultQuery = $this->processTermSelect($filter, $isNegation); - } elseif ( - $filter->getType() === FilterInterface::TYPE_RANGE && + } elseif ($filter->getType() === FilterInterface::TYPE_RANGE && in_array($attribute->getBackendType(), ['decimal', 'int'], true) ) { $resultQuery = $this->processRangeNumeric($filter, $query, $attribute); diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProvider.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProvider.php index 7decbdf62cd0c..f4e0f94eda13a 100644 --- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProvider.php +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProvider.php @@ -422,7 +422,6 @@ public function prepareProductIndex($indexData, $productData, $storeId) $attributeCode = $attribute->getAttributeCode(); if (isset($productData[$attributeCode])) { - if ('store_id' === $attributeCode) { continue; } diff --git a/app/code/Magento/CatalogSearch/Model/Layer/Filter/Attribute.php b/app/code/Magento/CatalogSearch/Model/Layer/Filter/Attribute.php index d4a35920b8230..557ccef621104 100644 --- a/app/code/Magento/CatalogSearch/Model/Layer/Filter/Attribute.php +++ b/app/code/Magento/CatalogSearch/Model/Layer/Filter/Attribute.php @@ -105,8 +105,7 @@ protected function _getItemsData() ? (int)$optionsFacetedData[$value]['count'] : 0; // Check filter type - if ( - $this->getAttributeIsFilterable($attribute) === static::ATTRIBUTE_OPTIONS_ONLY_WITH_RESULTS + if ($this->getAttributeIsFilterable($attribute) === static::ATTRIBUTE_OPTIONS_ONLY_WITH_RESULTS && (!$this->isOptionReducesResults($count, $productSize) || $count === 0) ) { continue; diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Indexer/Fulltext/Plugin/Store/GroupTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Indexer/Fulltext/Plugin/Store/GroupTest.php index 5af9fe078e4f7..210960c444aa8 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Indexer/Fulltext/Plugin/Store/GroupTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Indexer/Fulltext/Plugin/Store/GroupTest.php @@ -115,7 +115,7 @@ public function testAfterDelete() /** * Prepare expectations for indexer - * + * * @param int $invalidateCounter * @return void */ diff --git a/app/code/Magento/CatalogUrlRewrite/Observer/CategoryProcessUrlRewriteSavingObserver.php b/app/code/Magento/CatalogUrlRewrite/Observer/CategoryProcessUrlRewriteSavingObserver.php index dd0250049a426..528f678cae848 100644 --- a/app/code/Magento/CatalogUrlRewrite/Observer/CategoryProcessUrlRewriteSavingObserver.php +++ b/app/code/Magento/CatalogUrlRewrite/Observer/CategoryProcessUrlRewriteSavingObserver.php @@ -93,6 +93,5 @@ private function resetUrlRewritesDataMaps($category) foreach ($this->dataUrlRewriteClassNames as $className) { $this->databaseMapPool->resetMap($className, $category->getEntityId()); } - } } diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Map/HashMapPoolTest.php b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Map/HashMapPoolTest.php index b9efdb01f2e1d..f7a99541a9025 100644 --- a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Map/HashMapPoolTest.php +++ b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Map/HashMapPoolTest.php @@ -63,7 +63,7 @@ public function testGetDataMap() ['category' => 2], $dataProductMapMockOtherCategory ] - ] + ] ); $this->assertSame($dataCategoryMapMock, $this->model->getDataMap(DataCategoryHashMap::class, 1)); $this->assertSame($dataProductMapMock, $this->model->getDataMap(DataProductHashMap::class, 1)); diff --git a/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php b/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php index d9ea8196ab975..589a5d312d5a3 100644 --- a/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php +++ b/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php @@ -132,7 +132,7 @@ protected function _construct() $this->addData([ 'cache_lifetime' => 86400, 'cache_tags' => [\Magento\Catalog\Model\Product::CACHE_TAG, - ], ]); + ], ]); } /** @@ -369,6 +369,5 @@ private function getPriceCurrency() ->get(PriceCurrencyInterface::class); } return $this->priceCurrency; - } } diff --git a/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php b/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php index 4d9aaa7f9177b..d257a5206ff93 100644 --- a/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php +++ b/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php @@ -385,7 +385,6 @@ protected function orderCountryOptions(array $countryOptions) } else { array_push($tailOptions, $countryOption); } - } return array_merge($headOptions, $tailOptions); } diff --git a/app/code/Magento/Checkout/Block/Checkout/LayoutProcessor.php b/app/code/Magento/Checkout/Block/Checkout/LayoutProcessor.php index 19d35060b37a4..6ec3b1add408d 100644 --- a/app/code/Magento/Checkout/Block/Checkout/LayoutProcessor.php +++ b/app/code/Magento/Checkout/Block/Checkout/LayoutProcessor.php @@ -151,8 +151,7 @@ public function process($jsLayout) $elements = $this->convertElementsToSelect($elements, $attributesToConvert); // The following code is a workaround for custom address attributes if (isset($jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children'] - ['payment']['children'] - )) { + ['payment']['children'])) { $jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children'] ['payment']['children'] = $this->processPaymentChildrenComponents( $jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children'] @@ -161,8 +160,7 @@ public function process($jsLayout) ); } if (isset($jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children'] - ['step-config']['children']['shipping-rates-validation']['children'] - )) { + ['step-config']['children']['shipping-rates-validation']['children'])) { $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children'] ['step-config']['children']['shipping-rates-validation']['children'] = $this->processShippingChildrenComponents( @@ -172,8 +170,7 @@ public function process($jsLayout) } if (isset($jsLayout['components']['checkout']['children']['steps']['children']['shipping-step'] - ['children']['shippingAddress']['children']['shipping-address-fieldset']['children'] - )) { + ['children']['shippingAddress']['children']['shipping-address-fieldset']['children'])) { $fields = $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step'] ['children']['shippingAddress']['children']['shipping-address-fieldset']['children']; $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step'] diff --git a/app/code/Magento/Checkout/Block/Registration.php b/app/code/Magento/Checkout/Block/Registration.php index 0efd58dcc3273..1249932e368a7 100644 --- a/app/code/Magento/Checkout/Block/Registration.php +++ b/app/code/Magento/Checkout/Block/Registration.php @@ -96,8 +96,7 @@ public function getCreateAccountUrl() */ public function toHtml() { - if ( - $this->customerSession->isLoggedIn() + if ($this->customerSession->isLoggedIn() || !$this->registration->isAllowed() || !$this->accountManagement->isEmailAvailable($this->getEmailAddress()) || !$this->validateAddresses() diff --git a/app/code/Magento/Checkout/Controller/Cart/Add.php b/app/code/Magento/Checkout/Controller/Cart/Add.php index a1ec6ca1b01f4..ecfa5d948fe0e 100644 --- a/app/code/Magento/Checkout/Controller/Cart/Add.php +++ b/app/code/Magento/Checkout/Controller/Cart/Add.php @@ -152,7 +152,6 @@ public function execute() } return $this->goBack($url); - } catch (\Exception $e) { $this->messageManager->addException($e, __('We can\'t add this item to your shopping cart right now.')); $this->_objectManager->get(\Psr\Log\LoggerInterface::class)->critical($e); diff --git a/app/code/Magento/Checkout/CustomerData/DirectoryData.php b/app/code/Magento/Checkout/CustomerData/DirectoryData.php index 909fa0fee7437..f9cb731f080c1 100644 --- a/app/code/Magento/Checkout/CustomerData/DirectoryData.php +++ b/app/code/Magento/Checkout/CustomerData/DirectoryData.php @@ -46,7 +46,6 @@ public function getSectionData() $output[$code]['regions'][$key]['name'] = $region['name']; } } - } return $output; } diff --git a/app/code/Magento/Checkout/Model/Cart.php b/app/code/Magento/Checkout/Model/Cart.php index 5d7cd9e51a862..06d6024a4b08d 100644 --- a/app/code/Magento/Checkout/Model/Cart.php +++ b/app/code/Magento/Checkout/Model/Cart.php @@ -14,7 +14,7 @@ /** * Shopping cart model * @SuppressWarnings(PHPMD.CouplingBetweenObjects) - * @deprecated + * @deprecated */ class Cart extends DataObject implements CartInterface { diff --git a/app/code/Magento/Checkout/Model/DefaultConfigProvider.php b/app/code/Magento/Checkout/Model/DefaultConfigProvider.php index b70348aa15225..5e16f093dd5c8 100644 --- a/app/code/Magento/Checkout/Model/DefaultConfigProvider.php +++ b/app/code/Magento/Checkout/Model/DefaultConfigProvider.php @@ -368,7 +368,6 @@ private function getQuoteData() 'quote_id' )->getMaskedId(); } - } return $quoteData; } diff --git a/app/code/Magento/Checkout/Test/Unit/Block/Checkout/TotalsProcessorTest.php b/app/code/Magento/Checkout/Test/Unit/Block/Checkout/TotalsProcessorTest.php index 235cc1b5893bc..e0b9d9443ec70 100644 --- a/app/code/Magento/Checkout/Test/Unit/Block/Checkout/TotalsProcessorTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Block/Checkout/TotalsProcessorTest.php @@ -38,18 +38,18 @@ public function testProcess() 'sub-total' => [], 'grand-total' => [], 'non-existant-total' => null - ]; - $expectedResult['components']['checkout']['children']['sidebar']['children']['summary'] + ]; + $expectedResult['components']['checkout']['children']['sidebar']['children']['summary'] ['children']['totals']['children'] = [ 'sub-total' => ['sortOrder' => 10], 'grand-total' => ['sortOrder' => 20], 'non-existant-total' => null - ]; - $configData = ['sub_total' => 10, 'grand_total' => 20]; + ]; + $configData = ['sub_total' => 10, 'grand_total' => 20]; - $this->scopeConfigMock->expects($this->once())->method('getValue')->with('sales/totals_sort') + $this->scopeConfigMock->expects($this->once())->method('getValue')->with('sales/totals_sort') ->willReturn($configData); - $this->assertEquals($expectedResult, $this->model->process($jsLayout)); + $this->assertEquals($expectedResult, $this->model->process($jsLayout)); } } diff --git a/app/code/Magento/Checkout/Test/Unit/CustomerData/DefaultItemTest.php b/app/code/Magento/Checkout/Test/Unit/CustomerData/DefaultItemTest.php index 354fdcd3458da..1532504ead973 100644 --- a/app/code/Magento/Checkout/Test/Unit/CustomerData/DefaultItemTest.php +++ b/app/code/Magento/Checkout/Test/Unit/CustomerData/DefaultItemTest.php @@ -90,4 +90,3 @@ public function testGetItemData() $this->assertArrayHasKey('canApplyMsrp', $itemData); } } - diff --git a/app/code/Magento/CheckoutAgreements/Setup/InstallSchema.php b/app/code/Magento/CheckoutAgreements/Setup/InstallSchema.php index a2e070a787e02..c555811e6fb08 100644 --- a/app/code/Magento/CheckoutAgreements/Setup/InstallSchema.php +++ b/app/code/Magento/CheckoutAgreements/Setup/InstallSchema.php @@ -110,6 +110,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php index de209e88782e5..e83ca108bc8c5 100644 --- a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php +++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php @@ -245,7 +245,6 @@ protected function removeItemFromCollection($collection, $conditions) if (array_key_exists($rootChildParts[1], $conditions['plain']) || ($regExp && preg_match($regExp, $value->getFilename()))) { - $collection->removeItemByKey($key); } } diff --git a/app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/DataProviderTest.php b/app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/DataProviderTest.php index 533e5be4cd61d..78a64e154320b 100644 --- a/app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/DataProviderTest.php +++ b/app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/DataProviderTest.php @@ -129,6 +129,5 @@ public function testPrepareMetadata() $metadata, $this->dataProvider->prepareMetadata() ); - } } diff --git a/app/code/Magento/Config/App/Config/Source/DumpConfigSourceAggregated.php b/app/code/Magento/Config/App/Config/Source/DumpConfigSourceAggregated.php index e19a832efc2de..b8e95f77b734f 100644 --- a/app/code/Magento/Config/App/Config/Source/DumpConfigSourceAggregated.php +++ b/app/code/Magento/Config/App/Config/Source/DumpConfigSourceAggregated.php @@ -86,8 +86,7 @@ private function filterChain($path, &$data) $newPath = $path ? $path . '/' . $subKey : $subKey; $filteredPath = $this->filterPath($newPath); - if ( - $filteredPath + if ($filteredPath && !is_array($data[$subKey]) && $this->excludeList->isPresent($filteredPath) ) { diff --git a/app/code/Magento/Config/Block/System/Config/Form.php b/app/code/Magento/Config/Block/System/Config/Form.php index e677ce42278e0..ba06f941d0f2c 100644 --- a/app/code/Magento/Config/Block/System/Config/Form.php +++ b/app/code/Magento/Config/Block/System/Config/Form.php @@ -436,7 +436,6 @@ private function getFieldData(\Magento\Config\Model\Config\Structure\Element\Fie ->afterLoad(); $data = $backendModel->getValue(); } - } elseif ($field->getConfigPath() !== null) { $data = $this->getConfigValue($field->getConfigPath()); } else { diff --git a/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php b/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php index 2e867d49c7df4..ddb7d6f4a20d1 100644 --- a/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php +++ b/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php @@ -239,8 +239,7 @@ protected function _getExtraJs($element) */ protected function _isCollapseState($element) { - if ( - $element->getExpanded() || + if ($element->getExpanded() || ($element->getForm() && $element->getForm()->getElements()->count() === 1) ) { return true; diff --git a/app/code/Magento/Config/Model/Config/Backend/File.php b/app/code/Magento/Config/Model/Config/Backend/File.php index 7dcf1e1dd012c..404a3db902a3f 100644 --- a/app/code/Magento/Config/Model/Config/Backend/File.php +++ b/app/code/Magento/Config/Model/Config/Backend/File.php @@ -188,8 +188,7 @@ protected function _getUploadDir() if (is_array($fieldConfig['upload_dir'])) { $uploadDir = $fieldConfig['upload_dir']['value']; - if ( - array_key_exists('scope_info', $fieldConfig['upload_dir']) + if (array_key_exists('scope_info', $fieldConfig['upload_dir']) && $fieldConfig['upload_dir']['scope_info'] ) { $uploadDir = $this->_appendScopeInfo($uploadDir); diff --git a/app/code/Magento/Config/Setup/InstallData.php b/app/code/Magento/Config/Setup/InstallData.php index 0b11d3be66103..811826c82bd27 100644 --- a/app/code/Magento/Config/Setup/InstallData.php +++ b/app/code/Magento/Config/Setup/InstallData.php @@ -34,6 +34,5 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $installer->doUpdateClassAliases(); $setup->endSetup(); - } } diff --git a/app/code/Magento/Config/Test/Unit/Model/_files/converted_config.php b/app/code/Magento/Config/Test/Unit/Model/_files/converted_config.php index fb14e864b4fb0..d9b44a29037e1 100644 --- a/app/code/Magento/Config/Test/Unit/Model/_files/converted_config.php +++ b/app/code/Magento/Config/Test/Unit/Model/_files/converted_config.php @@ -163,7 +163,7 @@ 'type' => 'text', 'label' => '', '_elementType' => 'field', - ], + ], ], '_elementType' => 'group', ], diff --git a/app/code/Magento/ConfigurableProduct/Pricing/Price/ConfigurableRegularPrice.php b/app/code/Magento/ConfigurableProduct/Pricing/Price/ConfigurableRegularPrice.php index e593cfda9ce43..a7940bcc4f4b9 100644 --- a/app/code/Magento/ConfigurableProduct/Pricing/Price/ConfigurableRegularPrice.php +++ b/app/code/Magento/ConfigurableProduct/Pricing/Price/ConfigurableRegularPrice.php @@ -100,7 +100,6 @@ public function getMaxRegularAmount() $this->maxRegularAmount = $this->doGetMaxRegularAmount() ?: false; } return $this->maxRegularAmount; - } /** diff --git a/app/code/Magento/ConfigurableProduct/Setup/InstallSchema.php b/app/code/Magento/ConfigurableProduct/Setup/InstallSchema.php index fb2b3c80e8e09..f35d33c4c6a62 100644 --- a/app/code/Magento/ConfigurableProduct/Setup/InstallSchema.php +++ b/app/code/Magento/ConfigurableProduct/Setup/InstallSchema.php @@ -221,6 +221,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/ConfigurableProduct/Ui/DataProvider/Product/Form/Modifier/Data/AssociatedProducts.php b/app/code/Magento/ConfigurableProduct/Ui/DataProvider/Product/Form/Modifier/Data/AssociatedProducts.php index 9529172cbdcc2..bee100541f352 100644 --- a/app/code/Magento/ConfigurableProduct/Ui/DataProvider/Product/Form/Modifier/Data/AssociatedProducts.php +++ b/app/code/Magento/ConfigurableProduct/Ui/DataProvider/Product/Form/Modifier/Data/AssociatedProducts.php @@ -359,7 +359,6 @@ protected function getVariationKey(array $options = []) asort($result); return implode('-', $result); - } /** diff --git a/app/code/Magento/Cron/Setup/InstallSchema.php b/app/code/Magento/Cron/Setup/InstallSchema.php index 1001a4d487205..3e0502e8d70c8 100644 --- a/app/code/Magento/Cron/Setup/InstallSchema.php +++ b/app/code/Magento/Cron/Setup/InstallSchema.php @@ -89,6 +89,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Customer/Controller/Adminhtml/File/Address/Upload.php b/app/code/Magento/Customer/Controller/Adminhtml/File/Address/Upload.php index 8f70dee5ad66f..cbf250f505492 100644 --- a/app/code/Magento/Customer/Controller/Adminhtml/File/Address/Upload.php +++ b/app/code/Magento/Customer/Controller/Adminhtml/File/Address/Upload.php @@ -114,7 +114,7 @@ public function execute() */ private function convertFilesArray() { - foreach($_FILES['address'] as $itemKey => $item) { + foreach ($_FILES['address'] as $itemKey => $item) { foreach ($item as $value) { if (is_array($value)) { $_FILES['address'][$itemKey] = [ diff --git a/app/code/Magento/Customer/Model/Address/AbstractAddress.php b/app/code/Magento/Customer/Model/Address/AbstractAddress.php index 475116fb94272..bae46345cde48 100644 --- a/app/code/Magento/Customer/Model/Address/AbstractAddress.php +++ b/app/code/Magento/Customer/Model/Address/AbstractAddress.php @@ -584,21 +584,18 @@ public function validate() if ($this->isTelephoneRequired()) { if (!\Zend_Validate::is($this->getTelephone(), 'NotEmpty')) { $errors[] = __('%fieldName is a required field.', ['fieldName' => 'telephone']); - } } if ($this->isFaxRequired()) { if (!\Zend_Validate::is($this->getFax(), 'NotEmpty')) { $errors[] = __('%fieldName is a required field.', ['fieldName' => 'fax']); - } } if ($this->isCompanyRequired()) { if (!\Zend_Validate::is($this->getCompany(), 'NotEmpty')) { $errors[] = __('%fieldName is a required field.', ['fieldName' => 'company']); - } } diff --git a/app/code/Magento/Customer/Model/Metadata/Form/File.php b/app/code/Magento/Customer/Model/Metadata/Form/File.php index c0a3d195f971e..31a1d2593521d 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/File.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/File.php @@ -127,7 +127,7 @@ public function extractValue(\Magento\Framework\App\RequestInterface $request) $value[$fileKey] = $scopeData[$attrCode]; } } - } else if (isset($extend[0]['file']) && !empty($extend[0]['file'])) { + } elseif (isset($extend[0]['file']) && !empty($extend[0]['file'])) { /** * This case is required by file uploader UI component * diff --git a/app/code/Magento/Customer/Observer/AfterAddressSaveObserver.php b/app/code/Magento/Customer/Observer/AfterAddressSaveObserver.php index 89cd1758c6462..c02abd9e8ee51 100644 --- a/app/code/Magento/Customer/Observer/AfterAddressSaveObserver.php +++ b/app/code/Magento/Customer/Observer/AfterAddressSaveObserver.php @@ -190,8 +190,7 @@ protected function _canProcessAddress($address) return true; } - if ( - $this->_coreRegistry->registry(BeforeAddressSaveObserver::VIV_CURRENTLY_SAVED_ADDRESS) != $address->getId() + if ($this->_coreRegistry->registry(BeforeAddressSaveObserver::VIV_CURRENTLY_SAVED_ADDRESS) != $address->getId() ) { return false; } diff --git a/app/code/Magento/Customer/Setup/InstallSchema.php b/app/code/Magento/Customer/Setup/InstallSchema.php index bba058cde8319..efe926479683d 100644 --- a/app/code/Magento/Customer/Setup/InstallSchema.php +++ b/app/code/Magento/Customer/Setup/InstallSchema.php @@ -1273,6 +1273,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Customer/Setup/UpgradeSchema.php b/app/code/Magento/Customer/Setup/UpgradeSchema.php index c4ab78f362fec..fdd776aa09a29 100755 --- a/app/code/Magento/Customer/Setup/UpgradeSchema.php +++ b/app/code/Magento/Customer/Setup/UpgradeSchema.php @@ -187,13 +187,11 @@ private function getForeignKeys(SchemaSetupInterface $setup) $keysTree = $setup->getConnection()->getForeignKeysTree(); foreach ($keysTree as $indexes) { foreach ($indexes as $index) { - if ( - $index['REF_TABLE_NAME'] == $setup->getTable('customer_group') + if ($index['REF_TABLE_NAME'] == $setup->getTable('customer_group') && $index['REF_COLUMN_NAME'] == 'customer_group_id' ) { $foreignKeys[] = $index; } - } } return $foreignKeys; diff --git a/app/code/Magento/Customer/Test/Unit/Ui/Component/DataProvider/DocumentTest.php b/app/code/Magento/Customer/Test/Unit/Ui/Component/DataProvider/DocumentTest.php index ccea8265365cf..48adc02aa6d90 100644 --- a/app/code/Magento/Customer/Test/Unit/Ui/Component/DataProvider/DocumentTest.php +++ b/app/code/Magento/Customer/Test/Unit/Ui/Component/DataProvider/DocumentTest.php @@ -20,7 +20,7 @@ /** * Class DocumentTest - * + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class DocumentTest extends \PHPUnit_Framework_TestCase diff --git a/app/code/Magento/CustomerImportExport/Model/Import/Address.php b/app/code/Magento/CustomerImportExport/Model/Import/Address.php index c137475e7d6f6..85f677e79c4e5 100644 --- a/app/code/Magento/CustomerImportExport/Model/Import/Address.php +++ b/app/code/Magento/CustomerImportExport/Model/Import/Address.php @@ -527,7 +527,6 @@ protected function _prepareDataForUpdate(array $rowData) continue; } } elseif ($newAddress && !strlen($rowData[$attributeAlias])) { - } elseif ('select' == $attributeParams['type']) { $value = $attributeParams['options'][strtolower($rowData[$attributeAlias])]; } elseif ('datetime' == $attributeParams['type']) { @@ -599,7 +598,6 @@ protected function _saveAddressEntities(array $addRows, array $updateRows) $fields = array_diff(array_keys($row), ['entity_id', 'parent_id', 'created_at']); $this->_connection->insertOnDuplicate($this->_entityTable, $row, $fields); } - } return $this; } @@ -645,7 +643,6 @@ protected function _saveCustomerDefaults(array $defaults) ); $this->_connection->insertOnDuplicate($tableName, $data, array_keys($defaultsData)); } - } return $this; } @@ -753,8 +750,7 @@ protected function _validateRowForUpdate(array $rowData, $rowNumber) } } - if ( - isset($rowData[self::COLUMN_POSTCODE]) + if (isset($rowData[self::COLUMN_POSTCODE]) && isset($rowData[self::COLUMN_COUNTRY_ID]) && !$this->postcodeValidator->isValid( $rowData[self::COLUMN_COUNTRY_ID], diff --git a/app/code/Magento/Deploy/Console/Command/SetModeCommand.php b/app/code/Magento/Deploy/Console/Command/SetModeCommand.php index 4629ebe8b7c1c..410a223ac6227 100644 --- a/app/code/Magento/Deploy/Console/Command/SetModeCommand.php +++ b/app/code/Magento/Deploy/Console/Command/SetModeCommand.php @@ -89,7 +89,7 @@ protected function execute(InputInterface $input, OutputInterface $output) ); $toMode = $input->getArgument(self::MODE_ARGUMENT); $skipCompilation = $input->getOption(self::SKIP_COMPILATION_OPTION); - switch($toMode) { + switch ($toMode) { case State::MODE_DEVELOPER: $modeController->enableDeveloperMode(); break; diff --git a/app/code/Magento/Deploy/Model/ConfigWriter.php b/app/code/Magento/Deploy/Model/ConfigWriter.php index 7a9b70c528ac9..eee64237109bf 100644 --- a/app/code/Magento/Deploy/Model/ConfigWriter.php +++ b/app/code/Magento/Deploy/Model/ConfigWriter.php @@ -97,8 +97,7 @@ private function setConfig(array $config, $configPath, $configValue) private function getPathPrefix($scope, $scopeCode) { $pathPrefixes = [System::CONFIG_TYPE, $scope]; - if ( - $scope !== ScopeConfigInterface::SCOPE_TYPE_DEFAULT + if ($scope !== ScopeConfigInterface::SCOPE_TYPE_DEFAULT && !empty($scopeCode) ) { $pathPrefixes[] = $scopeCode; diff --git a/app/code/Magento/Deploy/Model/Deploy/LocaleDeploy.php b/app/code/Magento/Deploy/Model/Deploy/LocaleDeploy.php index 22274b45b14e9..f567dd2f1bfc6 100644 --- a/app/code/Magento/Deploy/Model/Deploy/LocaleDeploy.php +++ b/app/code/Magento/Deploy/Model/Deploy/LocaleDeploy.php @@ -333,7 +333,6 @@ private function isCanBeDeployed($fileArea, $fileTheme, $area, $themePath) private function deployLibFiles($area, $themePath, $locale) { foreach ($this->filesUtil->getStaticLibraryFiles() as $filePath) { - if ($this->checkSkip($filePath)) { continue; } diff --git a/app/code/Magento/Deploy/Model/DeployManager.php b/app/code/Magento/Deploy/Model/DeployManager.php index a5cbd0eb93a91..31b373c8292d0 100644 --- a/app/code/Magento/Deploy/Model/DeployManager.php +++ b/app/code/Magento/Deploy/Model/DeployManager.php @@ -182,7 +182,6 @@ private function runInParallel(DeployStrategyProvider $strategyProvider) } else { $dependentStrategy[] = $deploymentFunc; } - } $processQueueManager->addTaskToQueue($baseStrategy, $dependentStrategy); } diff --git a/app/code/Magento/Developer/Model/Config/Backend/WorkflowType.php b/app/code/Magento/Developer/Model/Config/Backend/WorkflowType.php index 9f57e1c517fd6..d3eafc236e6d3 100644 --- a/app/code/Magento/Developer/Model/Config/Backend/WorkflowType.php +++ b/app/code/Magento/Developer/Model/Config/Backend/WorkflowType.php @@ -55,7 +55,6 @@ public function beforeSave() if ($this->isValueChanged() && $this->_appState->getMode() == \Magento\Framework\App\State::MODE_PRODUCTION && $this->getValue() == \Magento\Developer\Model\Config\Source\WorkflowType::CLIENT_SIDE_COMPILATION) { - throw new \Magento\Framework\Exception\LocalizedException( __('Client side compilation doesn\'t work in production mode') ); diff --git a/app/code/Magento/Directory/Setup/InstallSchema.php b/app/code/Magento/Directory/Setup/InstallSchema.php index ace5dfdf9108a..c064f6426cff3 100644 --- a/app/code/Magento/Directory/Setup/InstallSchema.php +++ b/app/code/Magento/Directory/Setup/InstallSchema.php @@ -206,6 +206,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Downloadable/Setup/InstallSchema.php b/app/code/Magento/Downloadable/Setup/InstallSchema.php index 01c3760913fd7..9adea2d14d350 100644 --- a/app/code/Magento/Downloadable/Setup/InstallSchema.php +++ b/app/code/Magento/Downloadable/Setup/InstallSchema.php @@ -717,6 +717,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/Options.php b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/Options.php index 5ec997b768939..a34bb483a0e8a 100644 --- a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/Options.php +++ b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/Options.php @@ -84,7 +84,7 @@ public function getStores() /** * Returns stores sorted by Sort Order - * + * * @return array */ public function getStoresSortedBySortOrder() diff --git a/app/code/Magento/Eav/Model/EavCustomAttributeTypeLocator/ComplexType.php b/app/code/Magento/Eav/Model/EavCustomAttributeTypeLocator/ComplexType.php index 5c4e7b477105f..48ce5c7ba442f 100644 --- a/app/code/Magento/Eav/Model/EavCustomAttributeTypeLocator/ComplexType.php +++ b/app/code/Magento/Eav/Model/EavCustomAttributeTypeLocator/ComplexType.php @@ -30,7 +30,7 @@ public function __construct( /** * Get attribute type based on its backend model. - * + * * @param \Magento\Eav\Api\Data\AttributeInterface $attribute * @param string $serviceClass * @param $serviceBackendModelDataInterfaceMap array diff --git a/app/code/Magento/Eav/Model/EavCustomAttributeTypeLocator/SimpleType.php b/app/code/Magento/Eav/Model/EavCustomAttributeTypeLocator/SimpleType.php index e06b00b18d077..e6903d4688b3c 100644 --- a/app/code/Magento/Eav/Model/EavCustomAttributeTypeLocator/SimpleType.php +++ b/app/code/Magento/Eav/Model/EavCustomAttributeTypeLocator/SimpleType.php @@ -15,7 +15,7 @@ class SimpleType { /** * List of attributes, type of which cannot be identified reliably. We do not validate these attributes. - * + * * @var string[] */ private $anyTypeAttributes = ['quantity_and_stock_status']; diff --git a/app/code/Magento/Eav/Plugin/Model/ResourceModel/Entity/Attribute.php b/app/code/Magento/Eav/Plugin/Model/ResourceModel/Entity/Attribute.php index 3aa52b3618820..ac41a3be837e5 100644 --- a/app/code/Magento/Eav/Plugin/Model/ResourceModel/Entity/Attribute.php +++ b/app/code/Magento/Eav/Plugin/Model/ResourceModel/Entity/Attribute.php @@ -82,7 +82,7 @@ public function aroundGetStoreLabelsByAttributeId( /** * Check if cache is enabled - * + * * @return bool */ private function isCacheEnabled() diff --git a/app/code/Magento/Eav/Setup/EavSetup.php b/app/code/Magento/Eav/Setup/EavSetup.php index 5872057bebf92..8829ae6319cdb 100644 --- a/app/code/Magento/Eav/Setup/EavSetup.php +++ b/app/code/Magento/Eav/Setup/EavSetup.php @@ -770,12 +770,12 @@ private function _validateAttributeData($data) $attributeCodeMaxLength = \Magento\Eav\Model\Entity\Attribute::ATTRIBUTE_CODE_MAX_LENGTH; if (isset( - $data['attribute_code'] - ) && !\Zend_Validate::is( - $data['attribute_code'], - 'StringLength', - ['max' => $attributeCodeMaxLength] - ) + $data['attribute_code'] + ) && !\Zend_Validate::is( + $data['attribute_code'], + 'StringLength', + ['max' => $attributeCodeMaxLength] + ) ) { throw new LocalizedException( __('An attribute code must not be more than %1 characters.', $attributeCodeMaxLength) diff --git a/app/code/Magento/Eav/Setup/InstallSchema.php b/app/code/Magento/Eav/Setup/InstallSchema.php index 3494cf02f9622..2ab1ad3660684 100644 --- a/app/code/Magento/Eav/Setup/InstallSchema.php +++ b/app/code/Magento/Eav/Setup/InstallSchema.php @@ -1415,6 +1415,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/AbstractAttributeTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/AbstractAttributeTest.php index 11bdc07c8fe00..e50c0405ca2f0 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/AbstractAttributeTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/AbstractAttributeTest.php @@ -1,5 +1,5 @@ [ 'new_option' => 'optionSortOrder', ], - ]; + ]; $this->attributeRepositoryMock->expects($this->once())->method('get')->with($entityType, $attributeCode) ->willReturn($attributeMock); diff --git a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Entity/Attribute/SetTest.php b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Entity/Attribute/SetTest.php index 211487292d047..5dbe7d3b63413 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Entity/Attribute/SetTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Entity/Attribute/SetTest.php @@ -1,5 +1,5 @@ emulatedDesignConfig = clone $this->getDesignConfig(); - if ( - $this->getDesignConfig()->getStore() != $storeId + if ($this->getDesignConfig()->getStore() != $storeId || $this->getDesignConfig()->getArea() != $area ) { $this->setDesignConfig(['area' => $area, 'store' => $storeId]); diff --git a/app/code/Magento/Email/Setup/InstallSchema.php b/app/code/Magento/Email/Setup/InstallSchema.php index 7aa58ff4517a2..66a2a45f1a0fe 100644 --- a/app/code/Magento/Email/Setup/InstallSchema.php +++ b/app/code/Magento/Email/Setup/InstallSchema.php @@ -119,6 +119,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con ); $installer->getConnection()->createTable($table); - } } diff --git a/app/code/Magento/Fedex/Setup/InstallData.php b/app/code/Magento/Fedex/Setup/InstallData.php index f59decdbeef20..12f871757c934 100644 --- a/app/code/Magento/Fedex/Setup/InstallData.php +++ b/app/code/Magento/Fedex/Setup/InstallData.php @@ -106,6 +106,5 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $conn->update($configDataTable, ['value' => $mapNew], $whereConfigId); } } - } } diff --git a/app/code/Magento/GiftMessage/Model/Plugin/OrderSave.php b/app/code/Magento/GiftMessage/Model/Plugin/OrderSave.php index 0f064dc72b7d2..588ba3f637239 100644 --- a/app/code/Magento/GiftMessage/Model/Plugin/OrderSave.php +++ b/app/code/Magento/GiftMessage/Model/Plugin/OrderSave.php @@ -61,8 +61,7 @@ public function afterSave( protected function saveOrderGiftMessage(\Magento\Sales\Api\Data\OrderInterface $order) { $extensionAttributes = $order->getExtensionAttributes(); - if ( - null !== $extensionAttributes && + if (null !== $extensionAttributes && null !== $extensionAttributes->getGiftMessage() ) { /* @var \Magento\GiftMessage\Api\Data\MessageInterface $giftMessage */ @@ -93,8 +92,7 @@ protected function saveOrderItemGiftMessage(\Magento\Sales\Api\Data\OrderInterfa /** @var \Magento\Sales\Api\Data\OrderItemInterface $orderItem */ foreach ($items as $orderItem) { $extensionAttribute = $orderItem->getExtensionAttributes(); - if ( - null !== $extensionAttribute && + if (null !== $extensionAttribute && null !== $extensionAttribute->getGiftMessage() ) { /* @var \Magento\GiftMessage\Api\Data\MessageInterface $giftMessage */ diff --git a/app/code/Magento/GiftMessage/Setup/InstallSchema.php b/app/code/Magento/GiftMessage/Setup/InstallSchema.php index a3deb694aa23d..5c27f4ce66698 100644 --- a/app/code/Magento/GiftMessage/Setup/InstallSchema.php +++ b/app/code/Magento/GiftMessage/Setup/InstallSchema.php @@ -65,6 +65,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/GiftMessage/Setup/UpgradeData.php b/app/code/Magento/GiftMessage/Setup/UpgradeData.php index 16ae64a6d5aba..58cf50372885c 100644 --- a/app/code/Magento/GiftMessage/Setup/UpgradeData.php +++ b/app/code/Magento/GiftMessage/Setup/UpgradeData.php @@ -42,7 +42,6 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $attribute = $categorySetup->getAttribute($entityTypeId, 'gift_message_available'); if (version_compare($context->getVersion(), '2.0.1', '<')) { - $groupName = 'Gift Options'; if (!$categorySetup->getAttributeGroup(Product::ENTITY, $attributeSetId, $groupName)) { @@ -59,7 +58,6 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface } if (version_compare($context->getVersion(), '2.1.0', '<')) { - $categorySetup->updateAttribute( $entityTypeId, $attribute['attribute_id'], diff --git a/app/code/Magento/GoogleOptimizer/Setup/InstallSchema.php b/app/code/Magento/GoogleOptimizer/Setup/InstallSchema.php index eb6664af94dc3..40008efba18d4 100644 --- a/app/code/Magento/GoogleOptimizer/Setup/InstallSchema.php +++ b/app/code/Magento/GoogleOptimizer/Setup/InstallSchema.php @@ -84,6 +84,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/GroupedProduct/Setup/UpgradeData.php b/app/code/Magento/GroupedProduct/Setup/UpgradeData.php index 3dc0b613266f8..71d29ae44266d 100644 --- a/app/code/Magento/GroupedProduct/Setup/UpgradeData.php +++ b/app/code/Magento/GroupedProduct/Setup/UpgradeData.php @@ -46,7 +46,8 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $connection->query( $connection->insertFromSelect( - $select, $this->relationProcessor->getMainTable(), + $select, + $this->relationProcessor->getMainTable(), ['parent_id', 'child_id'], AdapterInterface::INSERT_IGNORE ) diff --git a/app/code/Magento/ImportExport/Model/Import/Adapter.php b/app/code/Magento/ImportExport/Model/Import/Adapter.php index 3fbd6f88357f4..9687ecfb482de 100644 --- a/app/code/Magento/ImportExport/Model/Import/Adapter.php +++ b/app/code/Magento/ImportExport/Model/Import/Adapter.php @@ -56,7 +56,7 @@ public static function factory($type, $directory, $source, $options = null) * @param string $source Source file path. * @param Write $directory * @param mixed $options OPTIONAL Adapter constructor options - * + * * @return AbstractSource */ public static function findAdapterFor($source, $directory, $options = null) diff --git a/app/code/Magento/ImportExport/Setup/InstallSchema.php b/app/code/Magento/ImportExport/Setup/InstallSchema.php index 1905b2bcea430..77a11916ac131 100644 --- a/app/code/Magento/ImportExport/Setup/InstallSchema.php +++ b/app/code/Magento/ImportExport/Setup/InstallSchema.php @@ -110,6 +110,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/DownloadTest.php b/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/DownloadTest.php index 0c23fa8b35349..042238926e2f2 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/DownloadTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/DownloadTest.php @@ -22,7 +22,7 @@ class DownloadTest extends \PHPUnit_Framework_TestCase /** * @var \Magento\ImportExport\Block\Adminhtml\Grid\Column\Renderer\Download */ - protected $download; + protected $download; /** * Set up diff --git a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/History/DownloadTest.php b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/History/DownloadTest.php index d78d859052799..749393b9f485b 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/History/DownloadTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/History/DownloadTest.php @@ -162,7 +162,6 @@ protected function setUp() 'reportHelper' => $this->reportHelper ] ); - } /** diff --git a/app/code/Magento/ImportExport/Test/Unit/Helper/ReportTest.php b/app/code/Magento/ImportExport/Test/Unit/Helper/ReportTest.php index 636709500a880..3f21ca329b42c 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Helper/ReportTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Helper/ReportTest.php @@ -91,7 +91,6 @@ protected function setUp() 'filesystem' =>$this->filesystem ] ); - } /** diff --git a/app/code/Magento/ImportExport/Test/Unit/Model/ImportTest.php b/app/code/Magento/ImportExport/Test/Unit/Model/ImportTest.php index 55bc4bb316d63..e6f9a5977b447 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Model/ImportTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Model/ImportTest.php @@ -212,7 +212,6 @@ protected function setUp() ]) ->getMock(); $this->setPropertyValue($this->import, '_varDirectory', $this->_varDirectory); - } /** diff --git a/app/code/Magento/Indexer/Setup/InstallSchema.php b/app/code/Magento/Indexer/Setup/InstallSchema.php index 7afd9381abfc4..f59ffdebfdb3f 100644 --- a/app/code/Magento/Indexer/Setup/InstallSchema.php +++ b/app/code/Magento/Indexer/Setup/InstallSchema.php @@ -136,6 +136,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/ListActionTest.php b/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/ListActionTest.php index 2b04e047b82ab..087c2549d69ff 100644 --- a/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/ListActionTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/ListActionTest.php @@ -171,7 +171,6 @@ protected function setUp() $this->menu->expects($this->any())->method('getParentItems')->will($this->returnValue($this->items)); $this->object = new \Magento\Indexer\Controller\Adminhtml\Indexer\ListAction($this->contextMock); - } public function testExecute() diff --git a/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/MassChangelogTest.php b/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/MassChangelogTest.php index e5beea4859ac1..a646a6dc8e662 100644 --- a/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/MassChangelogTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/MassChangelogTest.php @@ -205,7 +205,6 @@ public function testExecute($indexerIds, $exception, $expectsExceptionValues) ->method('addError')->with(__('Please select indexers.')) ->will($this->returnValue(1)); } else { - $this->objectManager->expects($this->any()) ->method('get')->with(\Magento\Framework\Indexer\IndexerRegistry::class) ->will($this->returnValue($this->indexReg)); diff --git a/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/MassOnTheFlyTest.php b/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/MassOnTheFlyTest.php index 58becbe0eb777..9870a25be4791 100644 --- a/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/MassOnTheFlyTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/MassOnTheFlyTest.php @@ -205,7 +205,6 @@ public function testExecute($indexerIds, $exception, $expectsExceptionValues) ->method('addError')->with(__('Please select indexers.')) ->will($this->returnValue(1)); } else { - $this->objectManager->expects($this->any()) ->method('get')->with(\Magento\Framework\Indexer\IndexerRegistry::class) ->will($this->returnValue($this->indexReg)); diff --git a/app/code/Magento/Indexer/Test/Unit/Model/ResourceModel/AbstractResourceTest.php b/app/code/Magento/Indexer/Test/Unit/Model/ResourceModel/AbstractResourceTest.php index 46614320b3025..f5d2de56b3948 100644 --- a/app/code/Magento/Indexer/Test/Unit/Model/ResourceModel/AbstractResourceTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Model/ResourceModel/AbstractResourceTest.php @@ -158,7 +158,6 @@ public function testInsertFromTable($readToIndex) $this->_resourceMock->expects($this->any())->method('getConnection')->will( $this->returnValue($connectionMock) ); - } else { $selectMock->expects($this->once())->method('insertFromSelect')->with( $destTable, diff --git a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Webapi.php b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Webapi.php index e2158e4ed1c66..c4e2c4086d223 100644 --- a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Webapi.php +++ b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Webapi.php @@ -140,7 +140,7 @@ protected function _construct() /** * Retrieve saved resource - * + * * @return array|bool */ protected function retrieveFormResources() diff --git a/app/code/Magento/Integration/Setup/InstallSchema.php b/app/code/Magento/Integration/Setup/InstallSchema.php index a51ac93804341..9dc8bc59175a2 100644 --- a/app/code/Magento/Integration/Setup/InstallSchema.php +++ b/app/code/Magento/Integration/Setup/InstallSchema.php @@ -360,6 +360,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Msrp/Setup/UpgradeData.php b/app/code/Magento/Msrp/Setup/UpgradeData.php index 578a93440d04f..b272acec3540e 100644 --- a/app/code/Magento/Msrp/Setup/UpgradeData.php +++ b/app/code/Magento/Msrp/Setup/UpgradeData.php @@ -59,6 +59,5 @@ private function changePriceAttributeDefaultScope($categorySetup, $entityTypeId) 'is_global', \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL ); - } } diff --git a/app/code/Magento/NewRelicReporting/Model/Config.php b/app/code/Magento/NewRelicReporting/Model/Config.php index 960145187dd91..8a703e5756069 100644 --- a/app/code/Magento/NewRelicReporting/Model/Config.php +++ b/app/code/Magento/NewRelicReporting/Model/Config.php @@ -175,7 +175,7 @@ public function isCronEnabled() /** * Sets config value - * + * * @param string $pathId * @param mixed $value * @param string $scope diff --git a/app/code/Magento/NewRelicReporting/Model/Cron.php b/app/code/Magento/NewRelicReporting/Model/Cron.php index ae2fb4ed2ce38..922219eb0477f 100644 --- a/app/code/Magento/NewRelicReporting/Model/Cron.php +++ b/app/code/Magento/NewRelicReporting/Model/Cron.php @@ -33,7 +33,7 @@ class Cron /** * Constructor - * + * * @param Config $config * @param ReportModulesInfo $reportModulesInfo * @param ReportCounts $reportCounts @@ -53,7 +53,7 @@ public function __construct( /** * The method run by the cron that fires all required events. - * + * * @return \Magento\NewRelicReporting\Model\Cron */ public function runCron() diff --git a/app/code/Magento/NewRelicReporting/Model/Module/Collect.php b/app/code/Magento/NewRelicReporting/Model/Module/Collect.php index 541ddafa7f502..ae1abc618fb8f 100644 --- a/app/code/Magento/NewRelicReporting/Model/Module/Collect.php +++ b/app/code/Magento/NewRelicReporting/Model/Module/Collect.php @@ -137,7 +137,7 @@ protected function getFinalCounts($moduleChanges) $disabledCount = $enabledCount = $uninstalledCount = 0; foreach ($stateValues as $state) { - switch($state){ + switch ($state) { case Config::ENABLED: $enabledCount++; break; diff --git a/app/code/Magento/NewRelicReporting/Model/NewRelicWrapper.php b/app/code/Magento/NewRelicReporting/Model/NewRelicWrapper.php index 92884f06a9e5b..8ff4b999076a4 100644 --- a/app/code/Magento/NewRelicReporting/Model/NewRelicWrapper.php +++ b/app/code/Magento/NewRelicReporting/Model/NewRelicWrapper.php @@ -14,7 +14,7 @@ class NewRelicWrapper { /** * Wrapper for 'newrelic_add_custom_parameter' function - * + * * @param string $param * @param string|int $value * @return bool @@ -29,8 +29,8 @@ public function addCustomParameter($param, $value) } /** - * Checks whether newrelic-php5 agent is installed - * + * Checks whether newrelic-php5 agent is installed + * * @return bool */ public function isExtensionInstalled() diff --git a/app/code/Magento/NewRelicReporting/Setup/InstallSchema.php b/app/code/Magento/NewRelicReporting/Setup/InstallSchema.php index 516956b9e94b7..4e607b55c1041 100644 --- a/app/code/Magento/NewRelicReporting/Setup/InstallSchema.php +++ b/app/code/Magento/NewRelicReporting/Setup/InstallSchema.php @@ -226,6 +226,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con * Prepare database after install */ $installer->endSetup(); - } } diff --git a/app/code/Magento/Newsletter/Model/Subscriber.php b/app/code/Magento/Newsletter/Model/Subscriber.php index 00ccf0aece7fc..57b95c300eebc 100644 --- a/app/code/Magento/Newsletter/Model/Subscriber.php +++ b/app/code/Magento/Newsletter/Model/Subscriber.php @@ -550,7 +550,7 @@ protected function _updateCustomerSubscription($customerId, $subscribe) == $this->customerAccountManagement->getConfirmationStatus($customerId) ) { $status = self::STATUS_UNCONFIRMED; - } else if ($isConfirmNeed) { + } elseif ($isConfirmNeed) { $status = self::STATUS_NOT_ACTIVE; } } else { @@ -588,7 +588,7 @@ protected function _updateCustomerSubscription($customerId, $subscribe) try { if ($isConfirmNeed) { $this->sendConfirmationRequestEmail(); - } else if ($this->isStatusChanged() && $status == self::STATUS_UNSUBSCRIBED) { + } elseif ($this->isStatusChanged() && $status == self::STATUS_UNSUBSCRIBED) { $this->sendUnsubscriptionEmail(); } elseif ($this->isStatusChanged() && $status == self::STATUS_SUBSCRIBED) { $this->sendConfirmationSuccessEmail(); diff --git a/app/code/Magento/Newsletter/Setup/InstallSchema.php b/app/code/Magento/Newsletter/Setup/InstallSchema.php index ad82ed9c6ad8d..bf8af11a925cf 100644 --- a/app/code/Magento/Newsletter/Setup/InstallSchema.php +++ b/app/code/Magento/Newsletter/Setup/InstallSchema.php @@ -459,6 +459,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Newsletter/Test/Unit/Model/Template/FilterTest.php b/app/code/Magento/Newsletter/Test/Unit/Model/Template/FilterTest.php index 364028758e87d..02776c4ec1e81 100644 --- a/app/code/Magento/Newsletter/Test/Unit/Model/Template/FilterTest.php +++ b/app/code/Magento/Newsletter/Test/Unit/Model/Template/FilterTest.php @@ -76,7 +76,6 @@ protected function setUp() $widgetResource, $widget ); - } public function testWidgetDirective() diff --git a/app/code/Magento/OfflineShipping/Setup/InstallSchema.php b/app/code/Magento/OfflineShipping/Setup/InstallSchema.php index 4c0285dab0917..65e86223ca002 100644 --- a/app/code/Magento/OfflineShipping/Setup/InstallSchema.php +++ b/app/code/Magento/OfflineShipping/Setup/InstallSchema.php @@ -149,6 +149,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con ); $installer->endSetup(); - } } diff --git a/app/code/Magento/Payment/Block/ConfigurableInfo.php b/app/code/Magento/Payment/Block/ConfigurableInfo.php index 8314fbb69d03d..4190fb70d67d8 100644 --- a/app/code/Magento/Payment/Block/ConfigurableInfo.php +++ b/app/code/Magento/Payment/Block/ConfigurableInfo.php @@ -67,7 +67,6 @@ protected function _prepareSpecificInformation($transport = null) $field, $payment->getAdditionalInformation($field) ); - } } diff --git a/app/code/Magento/Payment/Gateway/Config/ValueHandlerPool.php b/app/code/Magento/Payment/Gateway/Config/ValueHandlerPool.php index 6991a4370776a..5ff17bfeb43c3 100644 --- a/app/code/Magento/Payment/Gateway/Config/ValueHandlerPool.php +++ b/app/code/Magento/Payment/Gateway/Config/ValueHandlerPool.php @@ -48,7 +48,7 @@ public function __construct( */ public function get($field) { - return isset ($this->handlers[$field]) + return isset($this->handlers[$field]) ? $this->handlers[$field] : $this->handlers[self::DEFAULT_HANDLER]; } diff --git a/app/code/Magento/Payment/Gateway/Http/Client/Zend.php b/app/code/Magento/Payment/Gateway/Http/Client/Zend.php index 30e02eb8850ba..30070402c6b70 100644 --- a/app/code/Magento/Payment/Gateway/Http/Client/Zend.php +++ b/app/code/Magento/Payment/Gateway/Http/Client/Zend.php @@ -65,7 +65,7 @@ public function placeRequest(TransferInterface $transferObject) $client->setConfig($transferObject->getClientConfig()); $client->setMethod($transferObject->getMethod()); - switch($transferObject->getMethod()) { + switch ($transferObject->getMethod()) { case \Zend_Http_Client::GET: $client->setParameterGet($transferObject->getBody()); break; diff --git a/app/code/Magento/Payment/Model/Method/Adapter.php b/app/code/Magento/Payment/Model/Method/Adapter.php index 8bc6a5a85d785..59e1265717c25 100644 --- a/app/code/Magento/Payment/Model/Method/Adapter.php +++ b/app/code/Magento/Payment/Model/Method/Adapter.php @@ -528,7 +528,6 @@ private function executeCommand($commandCode, array $arguments = []) $command = $this->commandPool->get($commandCode); return $command->execute($arguments); - } /** diff --git a/app/code/Magento/Payment/Model/MethodInterface.php b/app/code/Magento/Payment/Model/MethodInterface.php index 15269c8a5ba23..88f58e079aaa0 100644 --- a/app/code/Magento/Payment/Model/MethodInterface.php +++ b/app/code/Magento/Payment/Model/MethodInterface.php @@ -18,7 +18,7 @@ interface MethodInterface * Retrieve payment method code * * @return string - * + * */ public function getCode(); @@ -26,7 +26,7 @@ public function getCode(); * Retrieve block type for method form generation * * @return string - * + * * @deprecated */ public function getFormBlockType(); @@ -35,7 +35,7 @@ public function getFormBlockType(); * Retrieve payment method title * * @return string - * + * */ public function getTitle(); @@ -56,7 +56,7 @@ public function getStore(); * Check order availability * * @return bool - * + * */ public function canOrder(); @@ -64,7 +64,7 @@ public function canOrder(); * Check authorize availability * * @return bool - * + * */ public function canAuthorize(); @@ -72,7 +72,7 @@ public function canAuthorize(); * Check capture availability * * @return bool - * + * */ public function canCapture(); @@ -80,7 +80,7 @@ public function canCapture(); * Check partial capture availability * * @return bool - * + * */ public function canCapturePartial(); @@ -88,7 +88,7 @@ public function canCapturePartial(); * Check whether capture can be performed once and no further capture possible * * @return bool - * + * */ public function canCaptureOnce(); @@ -96,7 +96,7 @@ public function canCaptureOnce(); * Check refund availability * * @return bool - * + * */ public function canRefund(); @@ -104,14 +104,14 @@ public function canRefund(); * Check partial refund availability for invoice * * @return bool - * + * */ public function canRefundPartialPerInvoice(); /** * Check void availability * @return bool - * + * */ public function canVoid(); @@ -134,7 +134,7 @@ public function canUseCheckout(); * Can be edit order (renew order) * * @return bool - * + * */ public function canEdit(); @@ -142,7 +142,7 @@ public function canEdit(); * Check fetch transaction info availability * * @return bool - * + * */ public function canFetchTransactionInfo(); @@ -153,7 +153,7 @@ public function canFetchTransactionInfo(); * @param string $transactionId * @return array * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * + * */ public function fetchTransactionInfo(InfoInterface $payment, $transactionId); @@ -161,7 +161,7 @@ public function fetchTransactionInfo(InfoInterface $payment, $transactionId); * Retrieve payment system relation flag * * @return bool - * + * */ public function isGateway(); @@ -169,7 +169,7 @@ public function isGateway(); * Retrieve payment method online/offline flag * * @return bool - * + * */ public function isOffline(); @@ -177,7 +177,7 @@ public function isOffline(); * Flag if we need to run payment initialize while order place * * @return bool - * + * */ public function isInitializeNeeded(); @@ -202,7 +202,7 @@ public function canUseForCurrency($currencyCode); * Retrieve block type for display method information * * @return string - * + * * @deprecated */ public function getInfoBlockType(); @@ -212,7 +212,7 @@ public function getInfoBlockType(); * * @return InfoInterface * @throws \Magento\Framework\Exception\LocalizedException - * + * * @deprecated */ public function getInfoInstance(); @@ -222,7 +222,7 @@ public function getInfoInstance(); * * @param InfoInterface $info * @return void - * + * * @deprecated */ public function setInfoInstance(InfoInterface $info); @@ -232,7 +232,7 @@ public function setInfoInstance(InfoInterface $info); * * @return $this * @throws \Magento\Framework\Exception\LocalizedException - * + * */ public function validate(); @@ -242,7 +242,7 @@ public function validate(); * @param InfoInterface $payment * @param float $amount * @return $this - * + * */ public function order(\Magento\Payment\Model\InfoInterface $payment, $amount); @@ -252,7 +252,7 @@ public function order(\Magento\Payment\Model\InfoInterface $payment, $amount); * @param InfoInterface $payment * @param float $amount * @return $this - * + * */ public function authorize(\Magento\Payment\Model\InfoInterface $payment, $amount); @@ -262,7 +262,7 @@ public function authorize(\Magento\Payment\Model\InfoInterface $payment, $amount * @param InfoInterface $payment * @param float $amount * @return $this - * + * */ public function capture(\Magento\Payment\Model\InfoInterface $payment, $amount); @@ -272,7 +272,7 @@ public function capture(\Magento\Payment\Model\InfoInterface $payment, $amount); * @param InfoInterface $payment * @param float $amount * @return $this - * + * */ public function refund(\Magento\Payment\Model\InfoInterface $payment, $amount); @@ -281,7 +281,7 @@ public function refund(\Magento\Payment\Model\InfoInterface $payment, $amount); * * @param InfoInterface $payment * @return $this - * + * */ public function cancel(\Magento\Payment\Model\InfoInterface $payment); @@ -290,14 +290,14 @@ public function cancel(\Magento\Payment\Model\InfoInterface $payment); * * @param InfoInterface $payment * @return $this - * + * */ public function void(\Magento\Payment\Model\InfoInterface $payment); /** * Whether this method can accept or deny payment * @return bool - * + * */ public function canReviewPayment(); @@ -307,7 +307,7 @@ public function canReviewPayment(); * @param InfoInterface $payment * @return false * @throws \Magento\Framework\Exception\LocalizedException - * + * */ public function acceptPayment(InfoInterface $payment); @@ -317,7 +317,7 @@ public function acceptPayment(InfoInterface $payment); * @param InfoInterface $payment * @return false * @throws \Magento\Framework\Exception\LocalizedException - * + * */ public function denyPayment(InfoInterface $payment); @@ -336,7 +336,7 @@ public function getConfigData($field, $storeId = null); * * @param DataObject $data * @return $this - * + * */ public function assignData(DataObject $data); @@ -345,7 +345,7 @@ public function assignData(DataObject $data); * * @param CartInterface|null $quote * @return bool - * + * */ public function isAvailable(CartInterface $quote = null); @@ -354,7 +354,7 @@ public function isAvailable(CartInterface $quote = null); * * @param int|null $storeId * @return bool - * + * */ public function isActive($storeId = null); @@ -367,7 +367,7 @@ public function isActive($storeId = null); * * @return $this * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * + * */ public function initialize($paymentAction, $stateObject); @@ -376,7 +376,7 @@ public function initialize($paymentAction, $stateObject); * Used to universalize payment actions when processing payment place * * @return string - * + * */ public function getConfigPaymentAction(); } diff --git a/app/code/Magento/Payment/Test/Unit/Gateway/Http/Converter/Soap/ObjectToArrayConverterTest.php b/app/code/Magento/Payment/Test/Unit/Gateway/Http/Converter/Soap/ObjectToArrayConverterTest.php index e20464541bb58..c6f97cb84ee59 100644 --- a/app/code/Magento/Payment/Test/Unit/Gateway/Http/Converter/Soap/ObjectToArrayConverterTest.php +++ b/app/code/Magento/Payment/Test/Unit/Gateway/Http/Converter/Soap/ObjectToArrayConverterTest.php @@ -30,6 +30,5 @@ public function testConvert() $converter = new ObjectToArrayConverter(); static::assertEquals($output, $converter->convert($input)); - } } diff --git a/app/code/Magento/Paypal/Block/Cart/ValidationMessages.php b/app/code/Magento/Paypal/Block/Cart/ValidationMessages.php index 69713999bf602..ea2361475b1a3 100644 --- a/app/code/Magento/Paypal/Block/Cart/ValidationMessages.php +++ b/app/code/Magento/Paypal/Block/Cart/ValidationMessages.php @@ -81,7 +81,6 @@ protected function addQuoteMessages() } else { $messages[] = $message; } - } $this->messageManager->addUniqueMessages( $messages diff --git a/app/code/Magento/Paypal/Controller/Express/AbstractExpress/Start.php b/app/code/Magento/Paypal/Controller/Express/AbstractExpress/Start.php index 28eb3d22b9353..978a53a9918bb 100644 --- a/app/code/Magento/Paypal/Controller/Express/AbstractExpress/Start.php +++ b/app/code/Magento/Paypal/Controller/Express/AbstractExpress/Start.php @@ -23,7 +23,6 @@ public function execute() try { $token = $this->getToken(); if ($token === null) { - return; } diff --git a/app/code/Magento/Paypal/Controller/Express/GetToken.php b/app/code/Magento/Paypal/Controller/Express/GetToken.php index 25dd71be94f7b..d4dfb4bbf3475 100644 --- a/app/code/Magento/Paypal/Controller/Express/GetToken.php +++ b/app/code/Magento/Paypal/Controller/Express/GetToken.php @@ -99,8 +99,7 @@ protected function getToken() $quote->getBillingAddress(), $quote->getShippingAddress() ); - } else if ( - (!$quoteCheckoutMethod || $quoteCheckoutMethod !== Onepage::METHOD_REGISTER) + } elseif ((!$quoteCheckoutMethod || $quoteCheckoutMethod !== Onepage::METHOD_REGISTER) && !$checkoutHelper->isAllowedGuestCheckout($quote, $quote->getStoreId()) ) { $expressRedirect = $this->_objectManager->get(ExpressRedirect::class); diff --git a/app/code/Magento/Paypal/Gateway/Payflowpro/Command/AuthorizationCommand.php b/app/code/Magento/Paypal/Gateway/Payflowpro/Command/AuthorizationCommand.php index 17a843e14a1a7..fa21a04f125b7 100644 --- a/app/code/Magento/Paypal/Gateway/Payflowpro/Command/AuthorizationCommand.php +++ b/app/code/Magento/Paypal/Gateway/Payflowpro/Command/AuthorizationCommand.php @@ -79,6 +79,5 @@ public function execute(array $commandSubject) $this->payflowFacade->setTransStatus($payment, $response); return $this; - } } diff --git a/app/code/Magento/Paypal/Model/Express/Checkout.php b/app/code/Magento/Paypal/Model/Express/Checkout.php index ae64b04f019a0..a36059051630d 100644 --- a/app/code/Magento/Paypal/Model/Express/Checkout.php +++ b/app/code/Magento/Paypal/Model/Express/Checkout.php @@ -543,7 +543,6 @@ public function start($returnUrl, $cancelUrl, $button = null) } $this->_getApi()->setSuppressShipping(true); } else { - $this->_getApi()->setBillingAddress($this->_quote->getBillingAddress()); $address = $this->_quote->getShippingAddress(); diff --git a/app/code/Magento/Paypal/Model/IframeConfigProvider.php b/app/code/Magento/Paypal/Model/IframeConfigProvider.php index 00a517781ed2a..2667b12cd4ec5 100644 --- a/app/code/Magento/Paypal/Model/IframeConfigProvider.php +++ b/app/code/Magento/Paypal/Model/IframeConfigProvider.php @@ -80,7 +80,7 @@ public function getConfig() protected function getFrameActionUrl($code) { $url = ''; - switch($code) { + switch ($code) { case Config::METHOD_PAYFLOWADVANCED: $url = $this->urlBuilder->getUrl('paypal/payflowadvanced/form', ['_secure' => true]); break; diff --git a/app/code/Magento/Paypal/Model/Payflow/Service/Gateway.php b/app/code/Magento/Paypal/Model/Payflow/Service/Gateway.php index e269e270a1f76..bd1ecc0dc3670 100644 --- a/app/code/Magento/Paypal/Model/Payflow/Service/Gateway.php +++ b/app/code/Magento/Paypal/Model/Payflow/Service/Gateway.php @@ -104,7 +104,6 @@ public function postRequest(DataObject $request, ConfigInterface $config) $result->setData(array_change_key_case($responseArray, CASE_LOWER)); $result->setData('result_code', $result->getData('result')); - } catch (\Zend_Http_Client_Exception $e) { $result->addData( [ diff --git a/app/code/Magento/Paypal/Model/Payflow/Service/Response/Handler/FraudHandler.php b/app/code/Magento/Paypal/Model/Payflow/Service/Response/Handler/FraudHandler.php index 4ebd6138846b7..d5a22bb381a6d 100644 --- a/app/code/Magento/Paypal/Model/Payflow/Service/Response/Handler/FraudHandler.php +++ b/app/code/Magento/Paypal/Model/Payflow/Service/Response/Handler/FraudHandler.php @@ -56,8 +56,7 @@ public function __construct(Info $paypalInfoManager, Security $xmlSecurity) */ public function handle(InfoInterface $payment, DataObject $response) { - if ( - !in_array( + if (!in_array( $response->getData('result'), [ Payflowpro::RESPONSE_CODE_DECLINED_BY_FILTER, @@ -108,7 +107,6 @@ private function getFraudRulesDictionary($rulesString) $rules[(string)$rule->{'ruleDescription'}] = (string)$rule->{'triggeredMessage'}; } } catch (\Exception $e) { - } finally { libxml_use_internal_errors(false); } diff --git a/app/code/Magento/Paypal/Setup/InstallData.php b/app/code/Magento/Paypal/Setup/InstallData.php index 129d8bdf4c1fe..298dce8569df2 100644 --- a/app/code/Magento/Paypal/Setup/InstallData.php +++ b/app/code/Magento/Paypal/Setup/InstallData.php @@ -79,6 +79,5 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface * Prepare database after install */ $setup->endSetup(); - } } diff --git a/app/code/Magento/Paypal/Setup/InstallSchema.php b/app/code/Magento/Paypal/Setup/InstallSchema.php index c948c0c129773..69d1b7faed765 100644 --- a/app/code/Magento/Paypal/Setup/InstallSchema.php +++ b/app/code/Magento/Paypal/Setup/InstallSchema.php @@ -421,6 +421,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con * Prepare database after install */ $installer->endSetup(); - } } diff --git a/app/code/Magento/Paypal/Test/Unit/Model/BillingAgreementConfigProviderTest.php b/app/code/Magento/Paypal/Test/Unit/Model/BillingAgreementConfigProviderTest.php index 62f82d58c4bea..459b4c40983eb 100644 --- a/app/code/Magento/Paypal/Test/Unit/Model/BillingAgreementConfigProviderTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Model/BillingAgreementConfigProviderTest.php @@ -38,7 +38,6 @@ protected function setUp() $this->currentCustomerMock, $this->agreementFactoryMock ); - } public function testGetConfig() diff --git a/app/code/Magento/Persistent/Model/Plugin/CustomerData.php b/app/code/Magento/Persistent/Model/Plugin/CustomerData.php index f035224d2116b..cfedfee4aad45 100644 --- a/app/code/Magento/Persistent/Model/Plugin/CustomerData.php +++ b/app/code/Magento/Persistent/Model/Plugin/CustomerData.php @@ -59,8 +59,7 @@ public function aroundGetSectionData( \Closure $proceed ) { /** unset customer first name */ - if ( - !$this->customerSession->isLoggedIn() + if (!$this->customerSession->isLoggedIn() && $this->persistentData->isEnabled() && $this->persistentSession->isPersistent() ) { diff --git a/app/code/Magento/Persistent/Setup/InstallSchema.php b/app/code/Magento/Persistent/Setup/InstallSchema.php index 1e057dd028874..ab90aa1ef2312 100644 --- a/app/code/Magento/Persistent/Setup/InstallSchema.php +++ b/app/code/Magento/Persistent/Setup/InstallSchema.php @@ -114,6 +114,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con ); $installer->endSetup(); - } } diff --git a/app/code/Magento/ProductAlert/Block/Product/View/Price.php b/app/code/Magento/ProductAlert/Block/Product/View/Price.php index 3e87f3a249897..a2556f2e9358e 100644 --- a/app/code/Magento/ProductAlert/Block/Product/View/Price.php +++ b/app/code/Magento/ProductAlert/Block/Product/View/Price.php @@ -18,8 +18,7 @@ class Price extends \Magento\ProductAlert\Block\Product\View */ public function setTemplate($template) { - if ( - !$this->_helper->isPriceAlertAllowed() + if (!$this->_helper->isPriceAlertAllowed() || !$this->getProduct() || false === $this->getProduct()->getCanShowPrice() ) { diff --git a/app/code/Magento/ProductAlert/Setup/InstallSchema.php b/app/code/Magento/ProductAlert/Setup/InstallSchema.php index a9fb914d23700..f1cc33d7e4d28 100644 --- a/app/code/Magento/ProductAlert/Setup/InstallSchema.php +++ b/app/code/Magento/ProductAlert/Setup/InstallSchema.php @@ -201,6 +201,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Quote/Model/Quote.php b/app/code/Magento/Quote/Model/Quote.php index 549fa023015c0..6e177b8836d92 100644 --- a/app/code/Magento/Quote/Model/Quote.php +++ b/app/code/Magento/Quote/Model/Quote.php @@ -842,7 +842,7 @@ public function beforeSave() * Loading quote data by customer * * @param \Magento\Customer\Model\Customer|int $customer - * @deprecated + * @deprecated * @return $this */ public function loadByCustomer($customer) diff --git a/app/code/Magento/Quote/Model/Quote/Address/ToOrder.php b/app/code/Magento/Quote/Model/Quote/Address/ToOrder.php index b65c59bb390af..c6aae4f049456 100644 --- a/app/code/Magento/Quote/Model/Quote/Address/ToOrder.php +++ b/app/code/Magento/Quote/Model/Quote/Address/ToOrder.php @@ -90,6 +90,5 @@ public function convert(Address $object, $data = []) ['order' => $order, 'quote' => $object->getQuote()] ); return $order; - } } diff --git a/app/code/Magento/Quote/Model/Quote/Item.php b/app/code/Magento/Quote/Model/Quote/Item.php index 94cbbfaddacbd..ce594880ae03e 100644 --- a/app/code/Magento/Quote/Model/Quote/Item.php +++ b/app/code/Magento/Quote/Model/Quote/Item.php @@ -615,8 +615,7 @@ public function addOption($option) { if (is_array($option)) { $option = $this->_itemOptionFactory->create()->setData($option)->setItem($this); - } elseif ( - $option instanceof \Magento\Framework\DataObject && + } elseif ($option instanceof \Magento\Framework\DataObject && !$option instanceof \Magento\Quote\Model\Quote\Item\Option ) { $option = $this->_itemOptionFactory->create()->setData( diff --git a/app/code/Magento/Quote/Model/Quote/Item/CartItemOptionsProcessor.php b/app/code/Magento/Quote/Model/Quote/Item/CartItemOptionsProcessor.php index 2fe5cd2a7b1dd..d326a819fee6d 100644 --- a/app/code/Magento/Quote/Model/Quote/Item/CartItemOptionsProcessor.php +++ b/app/code/Magento/Quote/Model/Quote/Item/CartItemOptionsProcessor.php @@ -53,7 +53,7 @@ private function addCustomOptionsToBuyRequest(CartItemInterface $cartItem, $para } if ($params instanceof \Magento\Framework\DataObject) { $buyRequestUpdate->addData($params->getData()); - } else if (is_numeric($params)) { + } elseif (is_numeric($params)) { $buyRequestUpdate->setData('qty', $params); } return $buyRequestUpdate; diff --git a/app/code/Magento/Quote/Model/QuoteManagement.php b/app/code/Magento/Quote/Model/QuoteManagement.php index efd373d4cd992..e5925a4b9cc7b 100644 --- a/app/code/Magento/Quote/Model/QuoteManagement.php +++ b/app/code/Magento/Quote/Model/QuoteManagement.php @@ -263,7 +263,6 @@ public function assignCustomer($cartId, $customerId, $storeId) __('Cannot assign customer to the given cart. Customer already has active cart.') ); } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { - } $quote->setCustomer($customer); @@ -276,7 +275,6 @@ public function assignCustomer($cartId, $customerId, $storeId) } $this->quoteRepository->save($quote); return true; - } /** diff --git a/app/code/Magento/Quote/Setup/InstallSchema.php b/app/code/Magento/Quote/Setup/InstallSchema.php index 236fa02795715..1b6157fe2e548 100644 --- a/app/code/Magento/Quote/Setup/InstallSchema.php +++ b/app/code/Magento/Quote/Setup/InstallSchema.php @@ -1568,6 +1568,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Quote/Setup/QuoteSetup.php b/app/code/Magento/Quote/Setup/QuoteSetup.php index 3418192bb3b08..303253b090af6 100644 --- a/app/code/Magento/Quote/Setup/QuoteSetup.php +++ b/app/code/Magento/Quote/Setup/QuoteSetup.php @@ -94,10 +94,10 @@ protected function _flatTableExist($table) public function addAttribute($entityTypeId, $code, array $attr) { if (isset( - $this->_flatEntityTables[$entityTypeId] - ) && $this->_flatTableExist( - $this->_flatEntityTables[$entityTypeId] - ) + $this->_flatEntityTables[$entityTypeId] + ) && $this->_flatTableExist( + $this->_flatEntityTables[$entityTypeId] + ) ) { $this->_addFlatAttribute($this->_flatEntityTables[$entityTypeId], $code, $attr); } else { diff --git a/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/Total/ShippingTest.php b/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/Total/ShippingTest.php index fd4a5a5f9a8a3..dc4017809e8a8 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/Total/ShippingTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/Total/ShippingTest.php @@ -270,6 +270,5 @@ protected function freeShippingAssertions() $this->cartItem->expects($this->atLeastOnce()) ->method('getFreeShipping') ->willReturn(true); - } } diff --git a/app/code/Magento/Quote/Test/Unit/Model/QuoteManagementTest.php b/app/code/Magento/Quote/Test/Unit/Model/QuoteManagementTest.php index 635c3a011098f..8dc1a002a46f7 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/QuoteManagementTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/QuoteManagementTest.php @@ -280,7 +280,6 @@ protected function setUp() $this->quoteIdMock = $this->getMock(\Magento\Quote\Model\QuoteIdMask::class, [], [], '', false); $quoteIdFactoryMock = $this->getMock(\Magento\Quote\Model\QuoteIdMaskFactory::class, ['create'], [], '', false); $this->setPropertyValue($this->model, 'quoteIdMaskFactory', $quoteIdFactoryMock); - } public function testCreateEmptyCartAnonymous() diff --git a/app/code/Magento/Reports/Setup/InstallSchema.php b/app/code/Magento/Reports/Setup/InstallSchema.php index c8ef39f551522..71717cab29827 100644 --- a/app/code/Magento/Reports/Setup/InstallSchema.php +++ b/app/code/Magento/Reports/Setup/InstallSchema.php @@ -874,6 +874,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con * Prepare database for tables install */ $installer->endSetup(); - } } diff --git a/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/EventTest.php b/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/EventTest.php index 964dc5eb05e68..f213d9bcaf25d 100644 --- a/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/EventTest.php +++ b/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/EventTest.php @@ -105,7 +105,6 @@ public function testUpdateCustomerTypeWithoutType() ->method('update'); $this->event->updateCustomerType($eventMock, 1, 1); - } /** @@ -121,7 +120,6 @@ public function testUpdateCustomerTypeWithType() ->method('update'); $this->event->updateCustomerType($eventMock, 1, 1, ['type']); - } /** diff --git a/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php b/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php index b28883ee92eef..ffd7265a58e03 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php +++ b/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php @@ -242,7 +242,8 @@ protected function initFieldset($formId, array $config) if (!isset($this->fieldset[$formId])) { if (!$this->getForm()->getElement($formId)) { $this->fieldset[$formId] = $this->getForm()->addFieldset($formId, $config); - } elseif ($this->getForm()->getElement($formId)); + } elseif ($this->getForm()->getElement($formId)) { + } } } diff --git a/app/code/Magento/Review/Setup/InstallData.php b/app/code/Magento/Review/Setup/InstallData.php index 3977116843bf9..0cc6cd7b9d988 100644 --- a/app/code/Magento/Review/Setup/InstallData.php +++ b/app/code/Magento/Review/Setup/InstallData.php @@ -72,6 +72,5 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $installer->getConnection()->insertMultiple($installer->getTable('rating_option'), $optionData); } } - } } diff --git a/app/code/Magento/Review/Setup/InstallSchema.php b/app/code/Magento/Review/Setup/InstallSchema.php index b700aef7c728a..eae6c4c6e1f6c 100644 --- a/app/code/Magento/Review/Setup/InstallSchema.php +++ b/app/code/Magento/Review/Setup/InstallSchema.php @@ -746,6 +746,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $setup->endSetup(); - } } diff --git a/app/code/Magento/Review/Test/Unit/Controller/Adminhtml/Product/PostTest.php b/app/code/Magento/Review/Test/Unit/Controller/Adminhtml/Product/PostTest.php index f3d3725a31034..93e335a5360a8 100644 --- a/app/code/Magento/Review/Test/Unit/Controller/Adminhtml/Product/PostTest.php +++ b/app/code/Magento/Review/Test/Unit/Controller/Adminhtml/Product/PostTest.php @@ -94,7 +94,6 @@ protected function setUp() 'context' => $this->context ] ); - } /** diff --git a/app/code/Magento/Review/Test/Unit/Model/ResourceModel/Review/CollectionTest.php b/app/code/Magento/Review/Test/Unit/Model/ResourceModel/Review/CollectionTest.php index 66b9438f30b0f..1332512ae6cff 100644 --- a/app/code/Magento/Review/Test/Unit/Model/ResourceModel/Review/CollectionTest.php +++ b/app/code/Magento/Review/Test/Unit/Model/ResourceModel/Review/CollectionTest.php @@ -76,7 +76,6 @@ protected function setUp() 'resource' => $this->resourceMock, ] ); - } public function testInitSelect() diff --git a/app/code/Magento/Sales/Api/Data/OrderPaymentInterface.php b/app/code/Magento/Sales/Api/Data/OrderPaymentInterface.php index cb28a2e2c4661..61e644c27bc9e 100644 --- a/app/code/Magento/Sales/Api/Data/OrderPaymentInterface.php +++ b/app/code/Magento/Sales/Api/Data/OrderPaymentInterface.php @@ -113,7 +113,7 @@ interface OrderPaymentInterface extends \Magento\Framework\Api\ExtensibleDataInt /** * Credit card SS start year. - * + * * @deprecated unused constant */ const CC_SS_START_YEAR = 'cc_ss_start_year'; @@ -160,7 +160,7 @@ interface OrderPaymentInterface extends \Magento\Framework\Api\ExtensibleDataInt /** * Credit card SS start month. - * + * * @deprecated unused constant */ const CC_SS_START_MONTH = 'cc_ss_start_month'; @@ -215,7 +215,7 @@ interface OrderPaymentInterface extends \Magento\Framework\Api\ExtensibleDataInt /** * Credit card SS issue. - * + * * @deprecated unused constant */ const CC_SS_ISSUE = 'cc_ss_issue'; diff --git a/app/code/Magento/Sales/Api/Data/ShipmentItemCreationInterface.php b/app/code/Magento/Sales/Api/Data/ShipmentItemCreationInterface.php index 6af60bcfd8774..602b2c061b6c4 100644 --- a/app/code/Magento/Sales/Api/Data/ShipmentItemCreationInterface.php +++ b/app/code/Magento/Sales/Api/Data/ShipmentItemCreationInterface.php @@ -13,8 +13,9 @@ * * @api */ -interface ShipmentItemCreationInterface extends LineItemInterface, -\Magento\Framework\Api\ExtensibleDataInterface +interface ShipmentItemCreationInterface extends + LineItemInterface, + \Magento\Framework\Api\ExtensibleDataInterface { /** * Retrieve existing extension attributes object or create a new one. diff --git a/app/code/Magento/Sales/Api/Data/ShipmentItemInterface.php b/app/code/Magento/Sales/Api/Data/ShipmentItemInterface.php index e139f69d2fb9e..f70dc6def4fce 100644 --- a/app/code/Magento/Sales/Api/Data/ShipmentItemInterface.php +++ b/app/code/Magento/Sales/Api/Data/ShipmentItemInterface.php @@ -12,8 +12,9 @@ * document lists the products and their quantities in the delivery package. A product is an item in a shipment. * @api */ -interface ShipmentItemInterface extends \Magento\Sales\Api\Data\LineItemInterface, -\Magento\Framework\Api\ExtensibleDataInterface +interface ShipmentItemInterface extends + \Magento\Sales\Api\Data\LineItemInterface, + \Magento\Framework\Api\ExtensibleDataInterface { /**#@+ * Constants for keys of data array. Identical to the name of the getter in snake case diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/History.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/History.php index a920c43253678..2182159e6a427 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/History.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/History.php @@ -311,7 +311,7 @@ public static function sortHistoryByTimestamp($a, $b) /** * Get order admin date - * + * * @param int $createdAt * @return \DateTime */ diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/ReviewPayment.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/ReviewPayment.php index 9f01abc09069c..2df30d384f266 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/ReviewPayment.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/ReviewPayment.php @@ -43,7 +43,7 @@ public function execute() $order->getPayment()->update(); if ($order->getPayment()->getIsTransactionApproved()) { $message = __('Transaction has been approved.'); - } else if ($order->getPayment()->getIsTransactionDenied()) { + } elseif ($order->getPayment()->getIsTransactionDenied()) { $message = __('Transaction has been voided/declined.'); } else { $message = __('There is no update for the transaction.'); diff --git a/app/code/Magento/Sales/Model/Order/Address.php b/app/code/Magento/Sales/Model/Order/Address.php index ae50467dc428a..382064d11603d 100644 --- a/app/code/Magento/Sales/Model/Order/Address.php +++ b/app/code/Magento/Sales/Model/Order/Address.php @@ -88,7 +88,6 @@ public function __construct( $resourceCollection, $data ); - } /** diff --git a/app/code/Magento/Sales/Model/Order/Creditmemo/Validation/QuantityValidator.php b/app/code/Magento/Sales/Model/Order/Creditmemo/Validation/QuantityValidator.php index bf43803b66fd3..9ccfff17cfdb8 100644 --- a/app/code/Magento/Sales/Model/Order/Creditmemo/Validation/QuantityValidator.php +++ b/app/code/Magento/Sales/Model/Order/Creditmemo/Validation/QuantityValidator.php @@ -81,8 +81,7 @@ public function validate($entity) } $orderItem = $orderItemsById[$item->getOrderItemId()]; - if ( - !$this->canRefundItem($orderItem, $item->getQty(), $invoiceQtysRefundLimits) || + if (!$this->canRefundItem($orderItem, $item->getQty(), $invoiceQtysRefundLimits) || !$this->isQtyAvailable($orderItem, $item->getQty()) ) { $messages[] =__( @@ -129,8 +128,7 @@ private function getInvoiceQtysRefundLimits(CreditmemoInterface $creditmemo, Ord $invoiceQtysRefunded = []; $invoice = $this->invoiceRepository->get($creditmemo->getInvoiceId()); foreach ($order->getCreditmemosCollection() as $createdCreditmemo) { - if ( - $createdCreditmemo->getState() != Creditmemo::STATE_CANCELED && + if ($createdCreditmemo->getState() != Creditmemo::STATE_CANCELED && $createdCreditmemo->getInvoiceId() == $invoice->getId() ) { foreach ($createdCreditmemo->getAllItems() as $createdCreditmemoItem) { diff --git a/app/code/Magento/Sales/Model/Order/CreditmemoDocumentFactory.php b/app/code/Magento/Sales/Model/Order/CreditmemoDocumentFactory.php index 4d32dd653d03f..c07153cf88f0d 100644 --- a/app/code/Magento/Sales/Model/Order/CreditmemoDocumentFactory.php +++ b/app/code/Magento/Sales/Model/Order/CreditmemoDocumentFactory.php @@ -99,7 +99,6 @@ private function attachComment( ->setIsCustomerNotified($appendComment); $creditmemo->setComments([$comment]); return $creditmemo; - } /** diff --git a/app/code/Magento/Sales/Model/Order/Invoice/Validation/CanRefund.php b/app/code/Magento/Sales/Model/Order/Invoice/Validation/CanRefund.php index 3b5e420b00992..2149b5eb37f79 100644 --- a/app/code/Magento/Sales/Model/Order/Invoice/Validation/CanRefund.php +++ b/app/code/Magento/Sales/Model/Order/Invoice/Validation/CanRefund.php @@ -47,8 +47,7 @@ public function __construct( */ public function validate($entity) { - if ( - $entity->getState() == Invoice::STATE_PAID && + if ($entity->getState() == Invoice::STATE_PAID && $this->isGrandTotalEnoughToRefund($entity) && $this->isPaymentAllowRefund($entity) ) { diff --git a/app/code/Magento/Sales/Model/ResourceModel/Order/Relation.php b/app/code/Magento/Sales/Model/ResourceModel/Order/Relation.php index 1cf21456bbcd2..225ad52a3829e 100644 --- a/app/code/Magento/Sales/Model/ResourceModel/Order/Relation.php +++ b/app/code/Magento/Sales/Model/ResourceModel/Order/Relation.php @@ -86,7 +86,6 @@ public function processRelation(\Magento\Framework\Model\AbstractModel $object) $statusHistory->setParentId($object->getId()); $statusHistory->setOrder($object); $this->orderStatusHistoryResource->save($statusHistory); - } } if (null !== $object->getRelatedObjects()) { diff --git a/app/code/Magento/Sales/Setup/InstallSchema.php b/app/code/Magento/Sales/Setup/InstallSchema.php index 6b0b27739ca15..bba787c2a05c6 100644 --- a/app/code/Magento/Sales/Setup/InstallSchema.php +++ b/app/code/Magento/Sales/Setup/InstallSchema.php @@ -5569,6 +5569,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Sales/Setup/SalesSetup.php b/app/code/Magento/Sales/Setup/SalesSetup.php index 3227688beba2c..c36b82897f23b 100644 --- a/app/code/Magento/Sales/Setup/SalesSetup.php +++ b/app/code/Magento/Sales/Setup/SalesSetup.php @@ -58,7 +58,7 @@ class SalesSetup extends EavSetup /** * Constructor - * + * * @param ModuleDataSetupInterface $setup * @param Context $context * @param CacheInterface $cache diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Email/Sender/AbstractSenderTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Email/Sender/AbstractSenderTest.php index 803d88538b4aa..375870c5efffc 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/Email/Sender/AbstractSenderTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Email/Sender/AbstractSenderTest.php @@ -172,7 +172,6 @@ public function stepAddressFormat($billingAddress, $isVirtual = false) ->method('getShippingAddress') ->will($this->returnValue($billingAddress)); } - } public function stepSendWithoutSendCopy() diff --git a/app/code/Magento/Sales/Test/Unit/Model/OrderTest.php b/app/code/Magento/Sales/Test/Unit/Model/OrderTest.php index f38bc862bd8bd..116a27b717fd5 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/OrderTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/OrderTest.php @@ -701,8 +701,8 @@ public function testCanVoidPayment($actionFlags, $orderState) $canVoidOrder = false; } if ($orderState == \Magento\Sales\Model\Order::STATE_HOLDED && (!isset( - $actionFlags[\Magento\Sales\Model\Order::ACTION_FLAG_UNHOLD] - ) || $actionFlags[\Magento\Sales\Model\Order::ACTION_FLAG_UNHOLD] !== false) + $actionFlags[\Magento\Sales\Model\Order::ACTION_FLAG_UNHOLD] + ) || $actionFlags[\Magento\Sales\Model\Order::ACTION_FLAG_UNHOLD] !== false) ) { $canVoidOrder = false; } diff --git a/app/code/Magento/Sales/Test/Unit/Setup/SerializedDataConverterTest.php b/app/code/Magento/Sales/Test/Unit/Setup/SerializedDataConverterTest.php index e0863c3f37a93..2624a1da053fb 100644 --- a/app/code/Magento/Sales/Test/Unit/Setup/SerializedDataConverterTest.php +++ b/app/code/Magento/Sales/Test/Unit/Setup/SerializedDataConverterTest.php @@ -52,7 +52,6 @@ function ($value) { ); $this->model = new \Magento\Sales\Setup\SerializedDataConverter($this->serializeMock, $this->jsonMock); - } /** diff --git a/app/code/Magento/Sales/Ui/Component/Control/PdfAction.php b/app/code/Magento/Sales/Ui/Component/Control/PdfAction.php index 75b233f49a8d7..5a578ee0c93e2 100644 --- a/app/code/Magento/Sales/Ui/Component/Control/PdfAction.php +++ b/app/code/Magento/Sales/Ui/Component/Control/PdfAction.php @@ -14,7 +14,7 @@ class PdfAction extends Action { /** * Prepare - * + * * @return void */ public function prepare() diff --git a/app/code/Magento/SalesInventory/Test/Unit/Model/Order/ReturnValidatorTest.php b/app/code/Magento/SalesInventory/Test/Unit/Model/Order/ReturnValidatorTest.php index 52a00241054a5..fe8c1a40bc43f 100644 --- a/app/code/Magento/SalesInventory/Test/Unit/Model/Order/ReturnValidatorTest.php +++ b/app/code/Magento/SalesInventory/Test/Unit/Model/Order/ReturnValidatorTest.php @@ -119,7 +119,6 @@ public function testValidationWithWrongOrderItems() $this->returnValidator->validate($returnToStockItems, $this->creditMemoMock), __('The return to stock argument contains product item that is not part of the original order.') ); - } public function dataProvider() diff --git a/app/code/Magento/SalesRule/Setup/InstallData.php b/app/code/Magento/SalesRule/Setup/InstallData.php index 8008f1abd113f..b599ccff9c95b 100644 --- a/app/code/Magento/SalesRule/Setup/InstallData.php +++ b/app/code/Magento/SalesRule/Setup/InstallData.php @@ -41,6 +41,5 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $installer->doUpdateClassAliases(); $setup->endSetup(); - } } diff --git a/app/code/Magento/SalesRule/Setup/InstallSchema.php b/app/code/Magento/SalesRule/Setup/InstallSchema.php index bf1e180b0de6c..32e26eb1e2f21 100644 --- a/app/code/Magento/SalesRule/Setup/InstallSchema.php +++ b/app/code/Magento/SalesRule/Setup/InstallSchema.php @@ -790,6 +790,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/SampleData/Console/Command/SampleDataDeployCommand.php b/app/code/Magento/SampleData/Console/Command/SampleDataDeployCommand.php index 2702eef0c03f0..51af383629357 100644 --- a/app/code/Magento/SampleData/Console/Command/SampleDataDeployCommand.php +++ b/app/code/Magento/SampleData/Console/Command/SampleDataDeployCommand.php @@ -151,7 +151,7 @@ private function getMemoryInBytes($value) { $unit = strtolower(substr($value, -1, 1)); $value = (int) $value; - switch($unit) { + switch ($unit) { case 'g': $value *= 1024 * 1024 * 1024; break; diff --git a/app/code/Magento/Search/Adapter/Query/Preprocessor/Synonyms.php b/app/code/Magento/Search/Adapter/Query/Preprocessor/Synonyms.php index 92cdbc26cdd45..bd8a73c8b9e89 100644 --- a/app/code/Magento/Search/Adapter/Query/Preprocessor/Synonyms.php +++ b/app/code/Magento/Search/Adapter/Query/Preprocessor/Synonyms.php @@ -17,7 +17,7 @@ class Synonyms implements PreprocessorInterface /** * Constructor - * + * * @param SynonymAnalyzerInterface $synonymsAnalyzer */ public function __construct(SynonymAnalyzerInterface $synonymsAnalyzer) diff --git a/app/code/Magento/Search/Model/ResourceModel/SynonymReader.php b/app/code/Magento/Search/Model/ResourceModel/SynonymReader.php index e88e0bc4d81be..d42f80a149931 100644 --- a/app/code/Magento/Search/Model/ResourceModel/SynonymReader.php +++ b/app/code/Magento/Search/Model/ResourceModel/SynonymReader.php @@ -116,10 +116,10 @@ private function getSynRowsPerScope($rows) if ($this->isSynRowForStoreView($row)) { // Check for current store view $synRowsForStoreView[] = $row; - } else if (empty($synRowsForStoreView) && $this->isSynRowForWebsite($row)) { + } elseif (empty($synRowsForStoreView) && $this->isSynRowForWebsite($row)) { // Check for current website $synRowsForWebsite[] = $row; - } else if (empty($synRowsForStoreView) + } elseif (empty($synRowsForStoreView) && empty($synRowsForWebsite) && $this->isSynRowForDefaultScope($row)) { // Check for all store views (i.e. global/default config) diff --git a/app/code/Magento/Search/Model/SearchEngine/MenuBuilder.php b/app/code/Magento/Search/Model/SearchEngine/MenuBuilder.php index dd461a2e18739..04f2cb05193b0 100644 --- a/app/code/Magento/Search/Model/SearchEngine/MenuBuilder.php +++ b/app/code/Magento/Search/Model/SearchEngine/MenuBuilder.php @@ -61,7 +61,6 @@ public function afterGetResult(Builder $subject, Menu $menu) if (!$this->searchFeatureConfig ->isFeatureSupported(ConfigInterface::SEARCH_ENGINE_FEATURE_SYNONYMS, $searchEngine) ) { - // "Search Synonyms" feature is not supported by the current configured search engine. // Menu will be updated to remove it from the list $menu->remove(self::SEARCH_SYNONYMS_MENU_ITEM_ID); diff --git a/app/code/Magento/Search/Model/SynonymGroupRepository.php b/app/code/Magento/Search/Model/SynonymGroupRepository.php index 8bb0f6669c649..e526cbc6ae8cf 100644 --- a/app/code/Magento/Search/Model/SynonymGroupRepository.php +++ b/app/code/Magento/Search/Model/SynonymGroupRepository.php @@ -126,7 +126,6 @@ private function create(SynonymGroupInterface $synonymGroup, $errorOnMergeConfli $this->resourceModel->save($newSynonymGroupModel); $synonymGroup->setSynonymGroup($newSynonymGroupModel->getSynonymGroup()); $synonymGroup->setGroupId($newSynonymGroupModel->getGroupId()); - } else { // no merge conflict, perform simple insert /** @var SynonymGroup $synonymGroupModel */ diff --git a/app/code/Magento/Search/Setup/InstallSchema.php b/app/code/Magento/Search/Setup/InstallSchema.php index 6c289df3154d0..b8d2315b92ee9 100644 --- a/app/code/Magento/Search/Setup/InstallSchema.php +++ b/app/code/Magento/Search/Setup/InstallSchema.php @@ -134,6 +134,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Search/Setup/UpgradeSchema.php b/app/code/Magento/Search/Setup/UpgradeSchema.php index b816c660ca9e0..4ede89000d183 100644 --- a/app/code/Magento/Search/Setup/UpgradeSchema.php +++ b/app/code/Magento/Search/Setup/UpgradeSchema.php @@ -94,7 +94,6 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con } if (version_compare($context->getVersion(), '2.0.3') < 0) { - // Drop and recreate 'search_synonyms' table $connection->dropTable($installer->getTable('search_synonyms')); diff --git a/app/code/Magento/Search/Ui/Component/Listing/Column/Scope/Options.php b/app/code/Magento/Search/Ui/Component/Listing/Column/Scope/Options.php index f1f8ba6c80466..3f72844d6d610 100644 --- a/app/code/Magento/Search/Ui/Component/Listing/Column/Scope/Options.php +++ b/app/code/Magento/Search/Ui/Component/Listing/Column/Scope/Options.php @@ -117,6 +117,5 @@ protected function generateCurrentOptions() $this->currentOptions[$name]['label'] = $name; $this->currentOptions[$name]['value'] = array_values($groups); } - } } diff --git a/app/code/Magento/Security/Model/Plugin/AuthSession.php b/app/code/Magento/Security/Model/Plugin/AuthSession.php index 6b74801121c1e..87edee9f7cd17 100644 --- a/app/code/Magento/Security/Model/Plugin/AuthSession.php +++ b/app/code/Magento/Security/Model/Plugin/AuthSession.php @@ -81,7 +81,7 @@ private function addUserLogoutNotification() $this->securityCookie->setLogoutReasonCookie( $this->sessionsManager->getCurrentSession()->getStatus() ); - } else if ($message = $this->sessionsManager->getLogoutReasonMessage()) { + } elseif ($message = $this->sessionsManager->getLogoutReasonMessage()) { $this->messageManager->addError($message); } diff --git a/app/code/Magento/SendFriend/Setup/InstallSchema.php b/app/code/Magento/SendFriend/Setup/InstallSchema.php index 8df7eb5d5b507..630aa0d783c65 100644 --- a/app/code/Magento/SendFriend/Setup/InstallSchema.php +++ b/app/code/Magento/SendFriend/Setup/InstallSchema.php @@ -62,6 +62,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Sitemap/Setup/InstallSchema.php b/app/code/Magento/Sitemap/Setup/InstallSchema.php index b01a3f435157b..65ec63f1b883d 100644 --- a/app/code/Magento/Sitemap/Setup/InstallSchema.php +++ b/app/code/Magento/Sitemap/Setup/InstallSchema.php @@ -81,6 +81,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Store/Api/Data/StoreInterface.php b/app/code/Magento/Store/Api/Data/StoreInterface.php index d5b4c56da14e0..380e2b22d9794 100644 --- a/app/code/Magento/Store/Api/Data/StoreInterface.php +++ b/app/code/Magento/Store/Api/Data/StoreInterface.php @@ -36,14 +36,14 @@ public function setCode($code); /** * Retrieve store name - * + * * @return string */ public function getName(); /** * Set store name - * + * * @param string $name * @return $this */ diff --git a/app/code/Magento/Store/Api/Data/WebsiteInterface.php b/app/code/Magento/Store/Api/Data/WebsiteInterface.php index 11a3012426959..b73fab7040bc7 100644 --- a/app/code/Magento/Store/Api/Data/WebsiteInterface.php +++ b/app/code/Magento/Store/Api/Data/WebsiteInterface.php @@ -36,14 +36,14 @@ public function setCode($code); /** * Rethreive website name - * + * * @return string */ public function getName(); /** * Set website name - * + * * @param string $name * @return $this */ diff --git a/app/code/Magento/Store/App/Response/Redirect.php b/app/code/Magento/Store/App/Response/Redirect.php index 97420f58f12e4..144b591e6060e 100644 --- a/app/code/Magento/Store/App/Response/Redirect.php +++ b/app/code/Magento/Store/App/Response/Redirect.php @@ -257,8 +257,7 @@ protected function normalizeRefererQueryParts($refererQuery) { $store = $this->_storeManager->getStore(); - if ( - $store + if ($store && !empty($refererQuery[StoreResolverInterface::PARAM_NAME]) && ($refererQuery[StoreResolverInterface::PARAM_NAME] !== $store->getCode()) ) { diff --git a/app/code/Magento/Store/Setup/InstallSchema.php b/app/code/Magento/Store/Setup/InstallSchema.php index 8c7935d8d18ba..b77a472283f0d 100644 --- a/app/code/Magento/Store/Setup/InstallSchema.php +++ b/app/code/Magento/Store/Setup/InstallSchema.php @@ -312,6 +312,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con ); $installer->endSetup(); - } } diff --git a/app/code/Magento/Store/Ui/Component/Form/Fieldset/Websites.php b/app/code/Magento/Store/Ui/Component/Form/Fieldset/Websites.php index 355c316b2bc92..23a677aa91f05 100644 --- a/app/code/Magento/Store/Ui/Component/Form/Fieldset/Websites.php +++ b/app/code/Magento/Store/Ui/Component/Form/Fieldset/Websites.php @@ -38,7 +38,6 @@ public function __construct( ) { parent::__construct($context, $components, $data); $this->storeManager = $storeManager; - } /** diff --git a/app/code/Magento/Swatches/Block/Product/Renderer/Configurable.php b/app/code/Magento/Swatches/Block/Product/Renderer/Configurable.php index 50ab7894532b9..449192d233e24 100644 --- a/app/code/Magento/Swatches/Block/Product/Renderer/Configurable.php +++ b/app/code/Magento/Swatches/Block/Product/Renderer/Configurable.php @@ -244,8 +244,7 @@ protected function addSwatchDataForAttribute( */ protected function addAdditionalMediaData(array $swatch, $optionId, array $attributeDataArray) { - if ( - isset($attributeDataArray['use_product_image_for_swatch']) + if (isset($attributeDataArray['use_product_image_for_swatch']) && $attributeDataArray['use_product_image_for_swatch'] ) { $variationMedia = $this->getVariationMedia($attributeDataArray['attribute_code'], $optionId); diff --git a/app/code/Magento/Swatches/Helper/Media.php b/app/code/Magento/Swatches/Helper/Media.php index 9356b2c13840d..b741006a0a23e 100644 --- a/app/code/Magento/Swatches/Helper/Media.php +++ b/app/code/Magento/Swatches/Helper/Media.php @@ -91,7 +91,6 @@ public function __construct( $this->imageFactory = $imageFactory; $this->themeCollection = $themeCollection; $this->viewConfig = $configInterface; - } /** diff --git a/app/code/Magento/Swatches/Model/Plugin/Configurable.php b/app/code/Magento/Swatches/Model/Plugin/Configurable.php index 57cf13d6fd5e4..40a75d965d782 100644 --- a/app/code/Magento/Swatches/Model/Plugin/Configurable.php +++ b/app/code/Magento/Swatches/Model/Plugin/Configurable.php @@ -55,8 +55,7 @@ public function afterGetUsedProductCollection( $entityType = $result->getEntity()->getType(); foreach ($this->eavConfig->getEntityAttributeCodes($entityType) as $code) { $attribute = $this->eavConfig->getAttribute($entityType, $code); - if ( - $attribute->getData('additional_data') + if ($attribute->getData('additional_data') && ( $this->swatchHelper->isVisualSwatch($attribute) || $this->swatchHelper->isTextSwatch($attribute) ) diff --git a/app/code/Magento/Swatches/Model/Plugin/EavAttribute.php b/app/code/Magento/Swatches/Model/Plugin/EavAttribute.php index 602a4b4ce1198..5b42069169bbc 100644 --- a/app/code/Magento/Swatches/Model/Plugin/EavAttribute.php +++ b/app/code/Magento/Swatches/Model/Plugin/EavAttribute.php @@ -372,7 +372,6 @@ protected function saveSwatchData($swatch, $optionId, $storeId, $type, $value) if ($this->isSwatchExists) { $swatch->setData('type', $type); $swatch->setData('value', $value); - } else { $swatch->setData('option_id', $optionId); $swatch->setData('store_id', $storeId); @@ -398,8 +397,7 @@ protected function saveDefaultSwatchOptionValue(Attribute $attribute) /** @var \Magento\Swatches\Model\Swatch $swatch */ $swatch = $this->swatchFactory->create(); // created and removed on frontend option not exists in dependency array - if ( - substr($defaultValue, 0, 6) == self::BASE_OPTION_TITLE && + if (substr($defaultValue, 0, 6) == self::BASE_OPTION_TITLE && isset($this->dependencyArray[$defaultValue]) ) { $defaultValue = $this->dependencyArray[$defaultValue]; diff --git a/app/code/Magento/Swatches/Model/Plugin/ProductImage.php b/app/code/Magento/Swatches/Model/Plugin/ProductImage.php index 225b63ec91ba7..70c56becf2838 100644 --- a/app/code/Magento/Swatches/Model/Plugin/ProductImage.php +++ b/app/code/Magento/Swatches/Model/Plugin/ProductImage.php @@ -39,7 +39,7 @@ class ProductImage * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\Framework\App\Request\Http $request */ - public function __construct ( + public function __construct( \Magento\Swatches\Helper\Data $swatchesHelperData, \Magento\Eav\Model\Config $eavConfig, \Magento\Framework\App\Request\Http $request diff --git a/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Iframe/ShowTest.php b/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Iframe/ShowTest.php index 2e80798d32b94..710f109633c0d 100644 --- a/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Iframe/ShowTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Iframe/ShowTest.php @@ -95,7 +95,6 @@ protected function setUp() 'uploaderFactory' => $this->uploaderFactoryMock, ] ); - } public function testExecuteException() diff --git a/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php b/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php index aadb429d5ce34..f24bfc669d1f0 100644 --- a/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php @@ -438,7 +438,6 @@ protected function getUsedProducts(array $attributes) $this->configurableMock->expects($this->once())->method('getUsedProducts')->with($this->productMock) ->willReturn($simpleProducts); - } protected function getAttributesFromConfigurable() diff --git a/app/code/Magento/Swatches/Test/Unit/Observer/AddFieldsToAttributeObserverTest.php b/app/code/Magento/Swatches/Test/Unit/Observer/AddFieldsToAttributeObserverTest.php index f405457275320..7fe0be5d6d52f 100644 --- a/app/code/Magento/Swatches/Test/Unit/Observer/AddFieldsToAttributeObserverTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Observer/AddFieldsToAttributeObserverTest.php @@ -53,7 +53,6 @@ protected function setUp() 'yesNo' => $this->yesNoMock, ] ); - } /** diff --git a/app/code/Magento/Tax/Model/Calculation.php b/app/code/Magento/Tax/Model/Calculation.php index 27df9fd01cdfb..cfe23bc23f6d9 100644 --- a/app/code/Magento/Tax/Model/Calculation.php +++ b/app/code/Magento/Tax/Model/Calculation.php @@ -521,7 +521,6 @@ public function getRateRequest( ) { $basedOn = 'default'; } else { - if (($billingAddress === null || !$billingAddress->getCountryId()) && $basedOn == 'billing' || ($shippingAddress === null || !$shippingAddress->getCountryId()) diff --git a/app/code/Magento/Tax/Model/Calculation/RateRepository.php b/app/code/Magento/Tax/Model/Calculation/RateRepository.php index a6d7b50e2aa6a..4d15c7cca8973 100644 --- a/app/code/Magento/Tax/Model/Calculation/RateRepository.php +++ b/app/code/Magento/Tax/Model/Calculation/RateRepository.php @@ -181,7 +181,7 @@ public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCr * @param FilterGroup $filterGroup * @param Collection $collection * @return void - * @deprecated + * @deprecated * @throws \Magento\Framework\Exception\InputException */ protected function addFilterGroupToCollection(FilterGroup $filterGroup, Collection $collection) @@ -201,7 +201,7 @@ protected function addFilterGroupToCollection(FilterGroup $filterGroup, Collecti /** * Translates a field name to a DB column name for use in collection queries. * - * @deprecated + * @deprecated * @param string $field a field name that should be translated to a DB column name. * @return string */ diff --git a/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php b/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php index 98a1f9b706469..6f41915b1d175 100755 --- a/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php +++ b/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php @@ -250,7 +250,7 @@ public function mapQuoteExtraTaxables( * @return $this * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ - protected function processExtraTaxables(Address\Total $total, Array $itemsByType) + protected function processExtraTaxables(Address\Total $total, array $itemsByType) { $extraTaxableDetails = []; foreach ($itemsByType as $itemType => $itemTaxDetails) { diff --git a/app/code/Magento/Tax/Test/Unit/GetterSetterTest.php b/app/code/Magento/Tax/Test/Unit/GetterSetterTest.php index 653bce33661c2..95a8f05d6b18b 100644 --- a/app/code/Magento/Tax/Test/Unit/GetterSetterTest.php +++ b/app/code/Magento/Tax/Test/Unit/GetterSetterTest.php @@ -34,7 +34,7 @@ public function testGettersSetters($className = null, $variables = null) $variableValue = [$obj]; $variables[$variableName] = $variableValue; } - } else if (strpos($variableValue, 'Magento') !== false) { + } elseif (strpos($variableValue, 'Magento') !== false) { $obj = $objectManager->getObject($variableValue); $variableValue = $obj; $variables[$variableName] = $variableValue; diff --git a/app/code/Magento/Tax/Test/Unit/Plugin/Checkout/CustomerData/CartTest.php b/app/code/Magento/Tax/Test/Unit/Plugin/Checkout/CustomerData/CartTest.php index 6ec9295dd88a6..1d8d87ac55940 100644 --- a/app/code/Magento/Tax/Test/Unit/Plugin/Checkout/CustomerData/CartTest.php +++ b/app/code/Magento/Tax/Test/Unit/Plugin/Checkout/CustomerData/CartTest.php @@ -122,6 +122,5 @@ public function testAfterGetSectionData() $this->assertEquals(2, count($result['items'])); $this->assertEquals(1, count($result['items'][0]['product_price'])); $this->assertEquals(1, count($result['items'][1]['product_price'])); - } } diff --git a/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ExportPost.php b/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ExportPost.php index 2285aebb52042..eb5f68a69e6ab 100644 --- a/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ExportPost.php +++ b/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ExportPost.php @@ -94,6 +94,5 @@ protected function _isAllowed() ) || $this->_authorization->isAllowed( 'Magento_TaxImportExport::import_export' ); - } } diff --git a/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ImportPost.php b/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ImportPost.php index 575994d22f387..6ac92e424d07c 100644 --- a/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ImportPost.php +++ b/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ImportPost.php @@ -49,6 +49,5 @@ protected function _isAllowed() ) || $this->_authorization->isAllowed( 'Magento_TaxImportExport::import_export' ); - } } diff --git a/app/code/Magento/Theme/Model/Design/Config/ValueChecker.php b/app/code/Magento/Theme/Model/Design/Config/ValueChecker.php index 64f54681b6bd5..4d8643fd1a46e 100644 --- a/app/code/Magento/Theme/Model/Design/Config/ValueChecker.php +++ b/app/code/Magento/Theme/Model/Design/Config/ValueChecker.php @@ -79,7 +79,7 @@ public function isDifferentFromDefault($value, $scope, $scopeId, array $fieldCon * @param mixed $defaultValue * @return bool */ - protected function isEqual ($value, $defaultValue) + protected function isEqual($value, $defaultValue) { switch (gettype($value)) { case 'array': diff --git a/app/code/Magento/Theme/Model/ResourceModel/Design/Config/Scope/Collection.php b/app/code/Magento/Theme/Model/ResourceModel/Design/Config/Scope/Collection.php index 8b4260a00b2f2..a7c1d29b493c6 100644 --- a/app/code/Magento/Theme/Model/ResourceModel/Design/Config/Scope/Collection.php +++ b/app/code/Magento/Theme/Model/ResourceModel/Design/Config/Scope/Collection.php @@ -135,7 +135,7 @@ protected function prepareItemData(array $websiteScope = [], array $groupScope = /** * Retrieve scope data - * + * * @param array $websiteScope * @param array $groupScope * @param array $storeScope diff --git a/app/code/Magento/Theme/Model/ThemeValidator.php b/app/code/Magento/Theme/Model/ThemeValidator.php index bb0b724bd2a2d..0c3cb962c3c8a 100644 --- a/app/code/Magento/Theme/Model/ThemeValidator.php +++ b/app/code/Magento/Theme/Model/ThemeValidator.php @@ -72,7 +72,7 @@ public function validateIsThemeInUse($themePaths) ->addFieldToFilter('path', DesignInterface::XML_PATH_THEME_ID) ->addFieldToFilter('value', ['in' => array_keys($themesById)]); foreach ($configData as $row) { - switch($row['scope']) { + switch ($row['scope']) { case 'default': $messages[] = '' . $themesById[$row['value']] . ' is in use in default config' . ''; break; diff --git a/app/code/Magento/Theme/Setup/InstallSchema.php b/app/code/Magento/Theme/Setup/InstallSchema.php index ad788665177df..03927d8a947a3 100644 --- a/app/code/Magento/Theme/Setup/InstallSchema.php +++ b/app/code/Magento/Theme/Setup/InstallSchema.php @@ -200,6 +200,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $connection->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/UploadJsTest.php b/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/UploadJsTest.php index fa117964cf336..7268af96ea6ad 100644 --- a/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/UploadJsTest.php +++ b/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/UploadJsTest.php @@ -60,7 +60,6 @@ protected function setUp() '', false ); - } public function testExecuteWithoutTheme() diff --git a/app/code/Magento/Theme/Test/Unit/Model/ResourceModel/Design/Config/Scope/CollectionTest.php b/app/code/Magento/Theme/Test/Unit/Model/ResourceModel/Design/Config/Scope/CollectionTest.php index 948bfda3a16ef..51982a0b21524 100644 --- a/app/code/Magento/Theme/Test/Unit/Model/ResourceModel/Design/Config/Scope/CollectionTest.php +++ b/app/code/Magento/Theme/Test/Unit/Model/ResourceModel/Design/Config/Scope/CollectionTest.php @@ -88,7 +88,7 @@ public function testLoadData() ], ], ], - ], + ], ] ); diff --git a/app/code/Magento/Theme/Test/Unit/Model/ThemeTest.php b/app/code/Magento/Theme/Test/Unit/Model/ThemeTest.php index 2ae9f9c1145d0..0c07c312619c4 100644 --- a/app/code/Magento/Theme/Test/Unit/Model/ThemeTest.php +++ b/app/code/Magento/Theme/Test/Unit/Model/ThemeTest.php @@ -598,7 +598,7 @@ public function populateFromArrayDataProvider() 'theme_data' => 'theme_data', 'parent_theme' => 'theme_instance' ], - 'expected call count' => 1 + 'expected call count' => 1 ], 'valid data with children' => [ 'value' => [ diff --git a/app/code/Magento/Theme/Ui/Component/Design/Config/SearchRobots/ResetButton.php b/app/code/Magento/Theme/Ui/Component/Design/Config/SearchRobots/ResetButton.php index ba2eec7582b0a..4f1b0f02ce96a 100644 --- a/app/code/Magento/Theme/Ui/Component/Design/Config/SearchRobots/ResetButton.php +++ b/app/code/Magento/Theme/Ui/Component/Design/Config/SearchRobots/ResetButton.php @@ -47,7 +47,8 @@ public function __construct( private function getRobotsDefaultCustomInstructions() { return trim((string)$this->scopeConfig->getValue( - self::XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS, ScopeConfigInterface::SCOPE_TYPE_DEFAULT + self::XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS, + ScopeConfigInterface::SCOPE_TYPE_DEFAULT )); } diff --git a/app/code/Magento/Theme/Ui/Component/Listing/Column/EditAction.php b/app/code/Magento/Theme/Ui/Component/Listing/Column/EditAction.php index 334d83b07e814..2a1a0a0ce4fe5 100644 --- a/app/code/Magento/Theme/Ui/Component/Listing/Column/EditAction.php +++ b/app/code/Magento/Theme/Ui/Component/Listing/Column/EditAction.php @@ -57,7 +57,7 @@ public function prepareDataSource(array $dataSource) if (isset($item['store_id'])) { $scope = ScopeInterface::SCOPE_STORES; $scopeId = $item['store_id']; - } else if (isset($item['store_website_id'])) { + } elseif (isset($item['store_website_id'])) { $scope = ScopeInterface::SCOPE_WEBSITES; $scopeId = $item['store_website_id']; } else { diff --git a/app/code/Magento/Translation/Block/Js.php b/app/code/Magento/Translation/Block/Js.php index 74f43068be006..1536afbf108f3 100644 --- a/app/code/Magento/Translation/Block/Js.php +++ b/app/code/Magento/Translation/Block/Js.php @@ -64,6 +64,5 @@ public function getTranslationFileTimestamp() public function getTranslationFilePath() { return $this->fileManager->getTranslationFilePath(); - } } diff --git a/app/code/Magento/Translation/Console/Command/UninstallLanguageCommand.php b/app/code/Magento/Translation/Console/Command/UninstallLanguageCommand.php index 6b439b9b66205..c140261462b7c 100644 --- a/app/code/Magento/Translation/Console/Command/UninstallLanguageCommand.php +++ b/app/code/Magento/Translation/Console/Command/UninstallLanguageCommand.php @@ -19,7 +19,7 @@ /** * Command for uninstalling language and backup-code feature - * + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class UninstallLanguageCommand extends Command diff --git a/app/code/Magento/Translation/Model/Js/PreProcessor.php b/app/code/Magento/Translation/Model/Js/PreProcessor.php index 42bf4e93fc5c5..74552642af5d4 100644 --- a/app/code/Magento/Translation/Model/Js/PreProcessor.php +++ b/app/code/Magento/Translation/Model/Js/PreProcessor.php @@ -55,7 +55,6 @@ public function __construct(Config $config, AreaList $areaList, TranslateInterfa public function process(Chain $chain) { if ($this->config->isEmbeddedStrategy()) { - $context = $chain->getAsset()->getContext(); $areaCode = \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE; diff --git a/app/code/Magento/Translation/Setup/InstallSchema.php b/app/code/Magento/Translation/Setup/InstallSchema.php index 1fe943e995b24..a859d2121e73d 100644 --- a/app/code/Magento/Translation/Setup/InstallSchema.php +++ b/app/code/Magento/Translation/Setup/InstallSchema.php @@ -101,6 +101,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Translation/Test/Unit/Model/FileManagerTest.php b/app/code/Magento/Translation/Test/Unit/Model/FileManagerTest.php index e14cd59e9105c..c0d4be47759b6 100644 --- a/app/code/Magento/Translation/Test/Unit/Model/FileManagerTest.php +++ b/app/code/Magento/Translation/Test/Unit/Model/FileManagerTest.php @@ -121,6 +121,5 @@ public function testGetTranslationFilePath() ->willReturn($contextMock); $contextMock->expects($this->atLeastOnce())->method('getPath')->willReturn($path); $this->assertEquals($path, $this->model->getTranslationFilePath()); - } } diff --git a/app/code/Magento/Ui/Component/Layout/Tabs.php b/app/code/Magento/Ui/Component/Layout/Tabs.php index 3ae87d43aed4f..54e4d00716dc1 100644 --- a/app/code/Magento/Ui/Component/Layout/Tabs.php +++ b/app/code/Magento/Ui/Component/Layout/Tabs.php @@ -300,7 +300,7 @@ protected function prepareConfig(array $config, $name, $parentName) if (isset($config['dataScope'])) { $dataScope = $config['dataScope']; unset($config['dataScope']); - } else if ($name !== $parentName) { + } elseif ($name !== $parentName) { $dataScope = $name; } diff --git a/app/code/Magento/Ui/Controller/Adminhtml/Bookmark/Delete.php b/app/code/Magento/Ui/Controller/Adminhtml/Bookmark/Delete.php index a1c5ddbcb4244..bf1e871612899 100644 --- a/app/code/Magento/Ui/Controller/Adminhtml/Bookmark/Delete.php +++ b/app/code/Magento/Ui/Controller/Adminhtml/Bookmark/Delete.php @@ -60,6 +60,5 @@ public function execute() if ($bookmark && $bookmark->getId()) { $this->bookmarkRepository->delete($bookmark); } - } } diff --git a/app/code/Magento/Ui/Controller/Adminhtml/Bookmark/Save.php b/app/code/Magento/Ui/Controller/Adminhtml/Bookmark/Save.php index d73563c3dc3dc..1235484d8fac1 100644 --- a/app/code/Magento/Ui/Controller/Adminhtml/Bookmark/Save.php +++ b/app/code/Magento/Ui/Controller/Adminhtml/Bookmark/Save.php @@ -96,7 +96,7 @@ public function execute() } $data = $this->jsonDecoder->decode($jsonData); $action = key($data); - switch($action) { + switch ($action) { case self::ACTIVE_IDENTIFIER: $this->updateCurrentBookmark($data[$action]); break; diff --git a/app/code/Magento/Ui/TemplateEngine/Xhtml/Compiler/Element/Render.php b/app/code/Magento/Ui/TemplateEngine/Xhtml/Compiler/Element/Render.php index 0efcd77bbb7c0..1495f2186270d 100644 --- a/app/code/Magento/Ui/TemplateEngine/Xhtml/Compiler/Element/Render.php +++ b/app/code/Magento/Ui/TemplateEngine/Xhtml/Compiler/Element/Render.php @@ -37,7 +37,7 @@ public function compile( $result = $processedObject->renderChildComponent($node->getAttribute('name')); if ($result instanceof ResultInterface) { $node->parentNode->replaceChild($result->getDocumentElement(), $node); - } else if (!empty($result) && is_scalar($result)) { + } elseif (!empty($result) && is_scalar($result)) { $newFragment = $node->ownerDocument->createDocumentFragment(); $newFragment->appendXML($result); $node->parentNode->replaceChild($newFragment, $node); diff --git a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/DataType/DateTest.php b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/DataType/DateTest.php index 62c7fcdde0c0a..891cbd328febb 100644 --- a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/DataType/DateTest.php +++ b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/DataType/DateTest.php @@ -108,7 +108,6 @@ public function testPrepareWithoutTimeOffset() $this->assertArrayHasKey('options', $config); $this->assertArrayHasKey('dateFormat', $config['options']); $this->assertEquals($localeDateFormat, $config['options']['dateFormat']); - } /** diff --git a/app/code/Magento/Ui/Test/Unit/Controller/Adminhtml/Index/Render/HandleTest.php b/app/code/Magento/Ui/Test/Unit/Controller/Adminhtml/Index/Render/HandleTest.php index 118b95594cb8a..efba513d105dd 100644 --- a/app/code/Magento/Ui/Test/Unit/Controller/Adminhtml/Index/Render/HandleTest.php +++ b/app/code/Magento/Ui/Test/Unit/Controller/Adminhtml/Index/Render/HandleTest.php @@ -60,7 +60,6 @@ public function setUp() $this->contextMock->expects($this->atLeastOnce())->method('getView')->willReturn($this->viewMock); $this->controller = new Handle($this->contextMock, $this->componentFactoryMock); - } public function testExecuteNoButtons() diff --git a/app/code/Magento/UrlRewrite/Setup/InstallSchema.php b/app/code/Magento/UrlRewrite/Setup/InstallSchema.php index 708e479ded197..45f4f81c36d24 100644 --- a/app/code/Magento/UrlRewrite/Setup/InstallSchema.php +++ b/app/code/Magento/UrlRewrite/Setup/InstallSchema.php @@ -121,6 +121,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/User/Setup/InstallSchema.php b/app/code/Magento/User/Setup/InstallSchema.php index 04334ae63fa65..8c0531029544a 100644 --- a/app/code/Magento/User/Setup/InstallSchema.php +++ b/app/code/Magento/User/Setup/InstallSchema.php @@ -141,6 +141,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); } $installer->endSetup(); - } } diff --git a/app/code/Magento/Usps/Setup/InstallData.php b/app/code/Magento/Usps/Setup/InstallData.php index 4eec096c1a45c..179c88dbc11d7 100644 --- a/app/code/Magento/Usps/Setup/InstallData.php +++ b/app/code/Magento/Usps/Setup/InstallData.php @@ -96,6 +96,5 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $connection->update($configDataTable, ['value' => $newValue], $whereConfigId); } } - } } diff --git a/app/code/Magento/Variable/Test/Unit/Controller/Adminhtml/System/Variable/ValidateTest.php b/app/code/Magento/Variable/Test/Unit/Controller/Adminhtml/System/Variable/ValidateTest.php index 22571c1db3a58..fe8bfcf8c503e 100644 --- a/app/code/Magento/Variable/Test/Unit/Controller/Adminhtml/System/Variable/ValidateTest.php +++ b/app/code/Magento/Variable/Test/Unit/Controller/Adminhtml/System/Variable/ValidateTest.php @@ -121,7 +121,6 @@ protected function setUp() $this->validateMock->expects($this->any()) ->method('_initVariable') ->willReturn($this->variableMock); - } /** diff --git a/app/code/Magento/Variable/Test/Unit/Model/VariableTest.php b/app/code/Magento/Variable/Test/Unit/Model/VariableTest.php index 836ee40f1c79f..db5a7ea712dba 100644 --- a/app/code/Magento/Variable/Test/Unit/Model/VariableTest.php +++ b/app/code/Magento/Variable/Test/Unit/Model/VariableTest.php @@ -81,7 +81,6 @@ public function testValidateMissingInfo($code, $name) { $this->model->setCode($code)->setName($name); $this->assertEquals($this->validationFailedPhrase, $this->model->validate()); - } /** diff --git a/app/code/Magento/Vault/Model/Method/NullPaymentProvider.php b/app/code/Magento/Vault/Model/Method/NullPaymentProvider.php index d097c9bf10f08..6544fb6cafbd6 100644 --- a/app/code/Magento/Vault/Model/Method/NullPaymentProvider.php +++ b/app/code/Magento/Vault/Model/Method/NullPaymentProvider.php @@ -17,7 +17,7 @@ class NullPaymentProvider implements MethodInterface * Retrieve payment method code * * @return string - * + * */ public function getCode() { @@ -28,7 +28,7 @@ public function getCode() * Retrieve block type for method form generation * * @return string - * + * * @deprecated */ public function getFormBlockType() @@ -40,7 +40,7 @@ public function getFormBlockType() * Retrieve payment method title * * @return string - * + * */ public function getTitle() { @@ -70,7 +70,7 @@ public function getStore() * Check order availability * * @return bool - * + * */ public function canOrder() { @@ -81,7 +81,7 @@ public function canOrder() * Check authorize availability * * @return bool - * + * */ public function canAuthorize() { @@ -92,7 +92,7 @@ public function canAuthorize() * Check capture availability * * @return bool - * + * */ public function canCapture() { @@ -103,7 +103,7 @@ public function canCapture() * Check partial capture availability * * @return bool - * + * */ public function canCapturePartial() { @@ -114,7 +114,7 @@ public function canCapturePartial() * Check whether capture can be performed once and no further capture possible * * @return bool - * + * */ public function canCaptureOnce() { @@ -125,7 +125,7 @@ public function canCaptureOnce() * Check refund availability * * @return bool - * + * */ public function canRefund() { @@ -136,7 +136,7 @@ public function canRefund() * Check partial refund availability for invoice * * @return bool - * + * */ public function canRefundPartialPerInvoice() { @@ -146,7 +146,7 @@ public function canRefundPartialPerInvoice() /** * Check void availability * @return bool - * + * */ public function canVoid() { @@ -178,7 +178,7 @@ public function canUseCheckout() * Can be edit order (renew order) * * @return bool - * + * */ public function canEdit() { @@ -189,7 +189,7 @@ public function canEdit() * Check fetch transaction info availability * * @return bool - * + * */ public function canFetchTransactionInfo() { @@ -203,7 +203,7 @@ public function canFetchTransactionInfo() * @param string $transactionId * @return array * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * + * */ public function fetchTransactionInfo(InfoInterface $payment, $transactionId) { @@ -214,7 +214,7 @@ public function fetchTransactionInfo(InfoInterface $payment, $transactionId) * Retrieve payment system relation flag * * @return bool - * + * */ public function isGateway() { @@ -225,7 +225,7 @@ public function isGateway() * Retrieve payment method online/offline flag * * @return bool - * + * */ public function isOffline() { @@ -236,7 +236,7 @@ public function isOffline() * Flag if we need to run payment initialize while order place * * @return bool - * + * */ public function isInitializeNeeded() { @@ -270,7 +270,7 @@ public function canUseForCurrency($currencyCode) * Retrieve block type for display method information * * @return string - * + * * @deprecated */ public function getInfoBlockType() @@ -283,7 +283,7 @@ public function getInfoBlockType() * * @return InfoInterface * @throws \Magento\Framework\Exception\LocalizedException - * + * * @deprecated */ public function getInfoInstance() @@ -296,7 +296,7 @@ public function getInfoInstance() * * @param InfoInterface $info * @return void - * + * * @deprecated */ public function setInfoInstance(InfoInterface $info) @@ -309,7 +309,7 @@ public function setInfoInstance(InfoInterface $info) * * @return $this * @throws \Magento\Framework\Exception\LocalizedException - * + * */ public function validate() { @@ -322,7 +322,7 @@ public function validate() * @param InfoInterface $payment * @param float $amount * @return $this - * + * */ public function order(\Magento\Payment\Model\InfoInterface $payment, $amount) { @@ -335,7 +335,7 @@ public function order(\Magento\Payment\Model\InfoInterface $payment, $amount) * @param InfoInterface $payment * @param float $amount * @return $this - * + * */ public function authorize(\Magento\Payment\Model\InfoInterface $payment, $amount) { @@ -348,7 +348,7 @@ public function authorize(\Magento\Payment\Model\InfoInterface $payment, $amount * @param InfoInterface $payment * @param float $amount * @return $this - * + * */ public function capture(\Magento\Payment\Model\InfoInterface $payment, $amount) { @@ -361,7 +361,7 @@ public function capture(\Magento\Payment\Model\InfoInterface $payment, $amount) * @param InfoInterface $payment * @param float $amount * @return $this - * + * */ public function refund(\Magento\Payment\Model\InfoInterface $payment, $amount) { @@ -373,7 +373,7 @@ public function refund(\Magento\Payment\Model\InfoInterface $payment, $amount) * * @param InfoInterface $payment * @return $this - * + * */ public function cancel(\Magento\Payment\Model\InfoInterface $payment) { @@ -385,7 +385,7 @@ public function cancel(\Magento\Payment\Model\InfoInterface $payment) * * @param InfoInterface $payment * @return $this - * + * */ public function void(\Magento\Payment\Model\InfoInterface $payment) { @@ -395,7 +395,7 @@ public function void(\Magento\Payment\Model\InfoInterface $payment) /** * Whether this method can accept or deny payment * @return bool - * + * */ public function canReviewPayment() { @@ -408,7 +408,7 @@ public function canReviewPayment() * @param InfoInterface $payment * @return false * @throws \Magento\Framework\Exception\LocalizedException - * + * */ public function acceptPayment(InfoInterface $payment) { @@ -421,7 +421,7 @@ public function acceptPayment(InfoInterface $payment) * @param InfoInterface $payment * @return false * @throws \Magento\Framework\Exception\LocalizedException - * + * */ public function denyPayment(InfoInterface $payment) { @@ -446,7 +446,7 @@ public function getConfigData($field, $storeId = null) * * @param DataObject $data * @return $this - * + * */ public function assignData(DataObject $data) { @@ -484,7 +484,7 @@ public function isActive($storeId = null) * * @return $this * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * + * * @deprecated */ public function initialize($paymentAction, $stateObject) @@ -497,7 +497,7 @@ public function initialize($paymentAction, $stateObject) * Used to universalize payment actions when processing payment place * * @return string - * + * */ public function getConfigPaymentAction() { diff --git a/app/code/Magento/Vault/Test/Unit/Model/PaymentTokenManagementTest.php b/app/code/Magento/Vault/Test/Unit/Model/PaymentTokenManagementTest.php index 2f662c1a8384a..98bc8436ebabf 100644 --- a/app/code/Magento/Vault/Test/Unit/Model/PaymentTokenManagementTest.php +++ b/app/code/Magento/Vault/Test/Unit/Model/PaymentTokenManagementTest.php @@ -508,7 +508,6 @@ public function testGetVisibleAvailableTokens() [$token], $this->paymentTokenManagement->getVisibleAvailableTokens($customerId) ); - } /** diff --git a/app/code/Magento/Vault/Test/Unit/Model/PaymentTokenRepositoryTest.php b/app/code/Magento/Vault/Test/Unit/Model/PaymentTokenRepositoryTest.php index 4237e1a249917..f858906f565c9 100644 --- a/app/code/Magento/Vault/Test/Unit/Model/PaymentTokenRepositoryTest.php +++ b/app/code/Magento/Vault/Test/Unit/Model/PaymentTokenRepositoryTest.php @@ -211,7 +211,6 @@ public function testRepositoryDelete() $this->paymentTokenMock->setPublicHash(''); $this->assertFalse($this->repositoryModel->delete($this->paymentTokenMock)); $this->assertFalse($this->paymentTokenMock->getIsActive()); - } /** diff --git a/app/code/Magento/Webapi/Controller/PathProcessor.php b/app/code/Magento/Webapi/Controller/PathProcessor.php index 46f11520acc31..2f0a9609154f3 100644 --- a/app/code/Magento/Webapi/Controller/PathProcessor.php +++ b/app/code/Magento/Webapi/Controller/PathProcessor.php @@ -53,7 +53,7 @@ public function process($pathInfo) if (isset($stores[$storeCode])) { $this->storeManager->setCurrentStore($storeCode); $path = '/' . (isset($pathParts[1]) ? $pathParts[1] : ''); - } else if ($storeCode === self::ALL_STORE_CODE) { + } elseif ($storeCode === self::ALL_STORE_CODE) { $this->storeManager->setCurrentStore(\Magento\Store\Model\Store::ADMIN_CODE); $path = '/' . (isset($pathParts[1]) ? $pathParts[1] : ''); } else { diff --git a/app/code/Magento/Webapi/Controller/Soap.php b/app/code/Magento/Webapi/Controller/Soap.php index e6928e66cedef..c6cb29274f272 100644 --- a/app/code/Magento/Webapi/Controller/Soap.php +++ b/app/code/Magento/Webapi/Controller/Soap.php @@ -132,7 +132,7 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request) ); $this->_setResponseContentType(self::CONTENT_TYPE_WSDL_REQUEST); $this->_setResponseBody($responseBody); - } else if ($this->_isWsdlListRequest()) { + } elseif ($this->_isWsdlListRequest()) { $servicesList = []; foreach ($this->_wsdlGenerator->getListOfServices() as $serviceName) { $servicesList[$serviceName]['wsdl_endpoint'] = $this->_soapServer->getEndpointUri() diff --git a/app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php b/app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php index fe7ef775aa60a..037055e4bf24f 100644 --- a/app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php +++ b/app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php @@ -280,8 +280,7 @@ private function generateMethodParameters($httpMethodData) $phpMethodData = $httpMethodData[Converter::KEY_METHOD]; /** Return nothing if necessary fields are not set */ - if ( - !isset($phpMethodData['interface']['in']['parameters']) + if (!isset($phpMethodData['interface']['in']['parameters']) || !isset($httpMethodData['uri']) || !isset($httpMethodData['httpOperation']) ) { @@ -290,8 +289,7 @@ private function generateMethodParameters($httpMethodData) foreach ($phpMethodData['interface']['in']['parameters'] as $parameterName => $parameterInfo) { /** Omit forced parameters */ - if ( - isset($httpMethodData['parameters'][$parameterName]['force']) + if (isset($httpMethodData['parameters'][$parameterName]['force']) && $httpMethodData['parameters'][$parameterName]['force'] ) { continue; @@ -319,7 +317,6 @@ private function generateMethodParameters($httpMethodData) $description, $bodySchema ); - } } diff --git a/app/code/Magento/Webapi/Model/ServiceMetadata.php b/app/code/Magento/Webapi/Model/ServiceMetadata.php index dd2ad797a40a6..4fdff4c17c047 100644 --- a/app/code/Magento/Webapi/Model/ServiceMetadata.php +++ b/app/code/Magento/Webapi/Model/ServiceMetadata.php @@ -306,7 +306,6 @@ protected function initRoutesMetadata() $routes[$serviceName][self::KEY_ROUTES][$url][$method][self::KEY_ROUTE_METHOD] = $methodName; $routes[$serviceName][self::KEY_ROUTES][$url][$method][self::KEY_ROUTE_PARAMS] = $data[Converter::KEY_DATA_PARAMETERS]; - } } return $routes; diff --git a/app/code/Magento/WebapiSecurity/Model/Plugin/CacheInvalidator.php b/app/code/Magento/WebapiSecurity/Model/Plugin/CacheInvalidator.php index 7d192e8684e4b..3489a46d8e017 100644 --- a/app/code/Magento/WebapiSecurity/Model/Plugin/CacheInvalidator.php +++ b/app/code/Magento/WebapiSecurity/Model/Plugin/CacheInvalidator.php @@ -24,7 +24,7 @@ public function __construct(\Magento\Framework\App\Cache\TypeListInterface $cach /** * Invalidate WebApi cache if needed. - * + * * @param \Magento\Framework\App\Config\Value $subject * @param \Magento\Framework\App\Config\Value $result * @return \Magento\Framework\App\Config\Value diff --git a/app/code/Magento/Weee/Helper/Data.php b/app/code/Magento/Weee/Helper/Data.php index f79545502be15..6cee0832eb7b2 100644 --- a/app/code/Magento/Weee/Helper/Data.php +++ b/app/code/Magento/Weee/Helper/Data.php @@ -830,7 +830,7 @@ public function getWeeeAttributesForBundle($product) if ($priceIncludesTax == false) { $weeeAttribute['amount'] = $weeeAttribute['amount_excl_tax'] + $weeeAttribute['tax_amount']; } - } else if ($priceTaxDisplay == \Magento\Tax\Model\Config::DISPLAY_TYPE_EXCLUDING_TAX) { + } elseif ($priceTaxDisplay == \Magento\Tax\Model\Config::DISPLAY_TYPE_EXCLUDING_TAX) { if ($priceIncludesTax == true) { $weeeAttribute['amount'] = $weeeAttribute['amount_excl_tax']; } diff --git a/app/code/Magento/Weee/Model/App/Action/ContextPlugin.php b/app/code/Magento/Weee/Model/App/Action/ContextPlugin.php index 0578162e5584c..5d16680e70b30 100644 --- a/app/code/Magento/Weee/Model/App/Action/ContextPlugin.php +++ b/app/code/Magento/Weee/Model/App/Action/ContextPlugin.php @@ -123,7 +123,7 @@ public function beforeDispatch( if (!$countryId && !$regionId) { // country and region does not exist return; - } else if ($countryId && !$regionId) { + } elseif ($countryId && !$regionId) { // country exist and region does not exist $regionId = 0; $exist = $this->weeeTax->isWeeeInLocation( @@ -186,8 +186,7 @@ protected function getWeeeTaxRegion($basedOn) $countryId = $defaultShippingAddress['country_id']; $regionId = $defaultShippingAddress['region_id']; } - - } else if ($basedOn == 'billing') { + } elseif ($basedOn == 'billing') { $defaultBillingAddress = $this->customerSession->getDefaultTaxBillingAddress(); if (empty($defaultBillingAddress)) { $countryId = $defaultCountryId; diff --git a/app/code/Magento/Weee/Observer/UpdateProductOptionsObserver.php b/app/code/Magento/Weee/Observer/UpdateProductOptionsObserver.php index ef301b6e61777..62770224404c2 100644 --- a/app/code/Magento/Weee/Observer/UpdateProductOptionsObserver.php +++ b/app/code/Magento/Weee/Observer/UpdateProductOptionsObserver.php @@ -61,7 +61,6 @@ public function execute(\Magento\Framework\Event\Observer $observer) // if the Weee module is enabled, then only do processing on bundle products if ($this->weeeData->isEnabled() && $product->getTypeId() == \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE) { - if ($this->taxData->priceIncludesTax() && $this->taxData->displayPriceExcludingTax()) { // the Tax module might have set up a default, but we will re-decide which calcPrice field to use unset($options['optionTemplate']); diff --git a/app/code/Magento/Weee/Setup/InstallSchema.php b/app/code/Magento/Weee/Setup/InstallSchema.php index fe33c8fa8f8f4..c584440245c04 100644 --- a/app/code/Magento/Weee/Setup/InstallSchema.php +++ b/app/code/Magento/Weee/Setup/InstallSchema.php @@ -111,6 +111,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $setup->getConnection()->createTable($table); $setup->endSetup(); - } } diff --git a/app/code/Magento/Weee/Ui/DataProvider/Product/Form/Modifier/Manager/Website.php b/app/code/Magento/Weee/Ui/DataProvider/Product/Form/Modifier/Manager/Website.php index 966781696a83e..fc834683c9dac 100644 --- a/app/code/Magento/Weee/Ui/DataProvider/Product/Form/Modifier/Manager/Website.php +++ b/app/code/Magento/Weee/Ui/DataProvider/Product/Form/Modifier/Manager/Website.php @@ -59,8 +59,7 @@ public function getWebsites(ProductInterface $product, EavAttribute $eavAttribut ] ]; - if ( - $this->storeManager->hasSingleStore() + if ($this->storeManager->hasSingleStore() || ($eavAttribute->getEntityAttribute() && $eavAttribute->getEntityAttribute()->isScopeGlobal() ) ) { diff --git a/app/code/Magento/Weee/Ui/DataProvider/Product/Form/Modifier/Weee.php b/app/code/Magento/Weee/Ui/DataProvider/Product/Form/Modifier/Weee.php index d5558c8875723..c6475b8069143 100644 --- a/app/code/Magento/Weee/Ui/DataProvider/Product/Form/Modifier/Weee.php +++ b/app/code/Magento/Weee/Ui/DataProvider/Product/Form/Modifier/Weee.php @@ -116,8 +116,7 @@ protected function modifyMetaConfig(array $metaConfig) foreach ($metaConfig['children'] as $attributeCode => $attributeConfig) { if ($this->startsWith($attributeCode, self::CONTAINER_PREFIX)) { $metaConfig['children'][$attributeCode] = $this->modifyMetaConfig($attributeConfig); - } elseif ( - !empty($attributeConfig['arguments']['data']['config']['formElement']) && + } elseif (!empty($attributeConfig['arguments']['data']['config']['formElement']) && $attributeConfig['arguments']['data']['config']['formElement'] === static::FORM_ELEMENT_WEEE ) { $metaConfig['children'][$attributeCode] = diff --git a/app/code/Magento/Widget/Setup/InstallData.php b/app/code/Magento/Widget/Setup/InstallData.php index b4c60b33d4755..9a7fb60f992a0 100644 --- a/app/code/Magento/Widget/Setup/InstallData.php +++ b/app/code/Magento/Widget/Setup/InstallData.php @@ -42,6 +42,5 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $installer->doUpdateClassAliases(); $setup->endSetup(); - } } diff --git a/app/code/Magento/Widget/Setup/InstallSchema.php b/app/code/Magento/Widget/Setup/InstallSchema.php index 84407f385124a..e1484c7b3bd58 100644 --- a/app/code/Magento/Widget/Setup/InstallSchema.php +++ b/app/code/Magento/Widget/Setup/InstallSchema.php @@ -402,6 +402,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php index c7b8c60f18e49..4b358bc67593e 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php @@ -111,11 +111,9 @@ public function getConfiguredOptions() foreach ($option['value'] as $key => $value) { $option['value'][$key] = $this->escapeHtml($value); } - } else { $option['value'] = $this->escapeHtml($option['value']); } - } $options[$index]['value'] = $option['value']; } diff --git a/app/code/Magento/Wishlist/Observer/AddToCart.php b/app/code/Magento/Wishlist/Observer/AddToCart.php index 8511dc977c92d..fd50fc4edbbe9 100644 --- a/app/code/Magento/Wishlist/Observer/AddToCart.php +++ b/app/code/Magento/Wishlist/Observer/AddToCart.php @@ -15,7 +15,7 @@ /** * Class AddToCart - * @deprecated + * @deprecated * @package Magento\Wishlist\Observer */ class AddToCart implements ObserverInterface diff --git a/app/code/Magento/Wishlist/Setup/InstallSchema.php b/app/code/Magento/Wishlist/Setup/InstallSchema.php index bf4913f59c295..93f5a0e677e6b 100644 --- a/app/code/Magento/Wishlist/Setup/InstallSchema.php +++ b/app/code/Magento/Wishlist/Setup/InstallSchema.php @@ -208,6 +208,5 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con $installer->getConnection()->createTable($table); $installer->endSetup(); - } } diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/TierPriceStorageTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/TierPriceStorageTest.php index 06c9cdee3bd12..897c96054da77 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/TierPriceStorageTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/TierPriceStorageTest.php @@ -257,8 +257,7 @@ private function isPriceCorrect(array $price, array $tierPrices) $priceIsCorrect = $price['price_type'] === \Magento\Catalog\Api\Data\TierPriceInterface::PRICE_TYPE_DISCOUNT ? (float)$tierPrice->getExtensionAttributes()->getPercentageValue() === (float)$price['price'] : (float)$tierPrice->getValue() === (float)$price['price']; - if ( - $priceIsCorrect + if ($priceIsCorrect && (int)$tierPrice->getQty() === (int)$price['quantity'] && $tierPrice->getExtensionAttributes()->getWebsiteId() == $price['website_id'] ) { diff --git a/dev/tests/api-functional/testsuite/Magento/Framework/Model/Entity/HydratorTest.php b/dev/tests/api-functional/testsuite/Magento/Framework/Model/Entity/HydratorTest.php index 0e2ae3e72b9b9..5534fca33b9c9 100644 --- a/dev/tests/api-functional/testsuite/Magento/Framework/Model/Entity/HydratorTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Framework/Model/Entity/HydratorTest.php @@ -120,12 +120,10 @@ private function validateCustomerData($expectedData, $actualData) $actualData['addresses'][0]['id'], $actualData['addresses'][1]['region_id'], $actualData['addresses'][1]['id'], - $expectedData['addresses'][0]['default_shipping'], $expectedData['addresses'][0]['default_billing'], $expectedData['addresses'][1]['default_shipping'], $expectedData['addresses'][1]['default_billing'], - $expectedData['created_at'], $expectedData['updated_at'], $actualData['created_at'], diff --git a/dev/tests/api-functional/testsuite/Magento/SalesInventory/Api/Service/V1/ReturnItemsAfterRefundOrderTest.php b/dev/tests/api-functional/testsuite/Magento/SalesInventory/Api/Service/V1/ReturnItemsAfterRefundOrderTest.php index 2457ec005d202..d850f2f7a0f07 100644 --- a/dev/tests/api-functional/testsuite/Magento/SalesInventory/Api/Service/V1/ReturnItemsAfterRefundOrderTest.php +++ b/dev/tests/api-functional/testsuite/Magento/SalesInventory/Api/Service/V1/ReturnItemsAfterRefundOrderTest.php @@ -73,7 +73,6 @@ public function testRefundWithReturnItemsToStock($qtyRefund) $qtyAfterRefund, 'Failed asserting qty of returned items incorrect.' ); - } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { $this->fail('Failed asserting that Creditmemo was created'); } diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchCustomerName.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchCustomerName.php index 58e7525a79c47..675700bf98609 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchCustomerName.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchCustomerName.php @@ -46,7 +46,6 @@ public function processAssert(Dashboard $dashboard, GlobalSearch $search, Custom $customerIndex->getCustomerGridBlock()->getAllIds(), 'Customer grid does not have ' . $customerName . ' in search results' ); - } /** diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/Block/Paypal/PopupWindow.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/Block/Paypal/PopupWindow.php index a4f8983d8538f..02ab8387c499b 100755 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/Block/Paypal/PopupWindow.php +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/Block/Paypal/PopupWindow.php @@ -41,7 +41,7 @@ public function waitForFormLoaded() * Process PayPal auth flow * * @param null|string $parentWindow - * + * */ public function process($parentWindow = null) { diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Webapi.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Webapi.php index 1219a0753e5dd..2ef7dd25d09e7 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Webapi.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Webapi.php @@ -135,7 +135,6 @@ protected function parseResponseSelections(array $response) 'selection_id' => (int)$optionValue['id'], 'option_id' => $option['option_id'] ]; - } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts/Search/Grid.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts/Search/Grid.php index 54d24e8d54583..e70ee8c983c81 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts/Search/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts/Search/Grid.php @@ -43,7 +43,7 @@ class Grid extends GridInterface /** * Press 'Add Selected Products' button. - * + * * @return void */ public function addProducts() diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View.php index 60bef4d78d04e..2a504df1dff4c 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View.php @@ -364,7 +364,7 @@ public function inContextPaypalCheckout() /** * Press 'Check out with Braintree PayPal' button. - * + * * @return string */ public function braintreePaypalCheckout() diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryPage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryPage.php index 0ce432b86dd34..caae3e8f2fa54 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryPage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryPage.php @@ -177,8 +177,7 @@ protected function verifyContent(array $categoryData) } } - if ( - isset($categoryData['landing_page']) + if (isset($categoryData['landing_page']) && isset($categoryData['display_mode']) && in_array($categoryData['display_mode'], $this->visibleCmsBlockMode) ) { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertImagesAreVisibleOnProductPage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertImagesAreVisibleOnProductPage.php index 99f5fae234b7f..c949f52380e39 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertImagesAreVisibleOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertImagesAreVisibleOnProductPage.php @@ -132,7 +132,7 @@ protected function verifyFullImage() /** * Check is image file can be loaded (displayed) - * + * * @param string $src * @return bool */ diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/ParentId.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/ParentId.php index dd2384bf8d632..25b9880e5433b 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/ParentId.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/ParentId.php @@ -37,7 +37,7 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, $data $this->parentCategory->persist(); } $this->data = $this->parentCategory->getId(); - } else if (isset($data['source']) && $data['source'] instanceof Category) { + } elseif (isset($data['source']) && $data['source'] instanceof Category) { $this->parentCategory = $data['source']; $this->data = $data['source']->getId(); } else { diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertCatalogSearchResultOrder.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertCatalogSearchResultOrder.php index fa96742de1eea..798ce5ce80aee 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertCatalogSearchResultOrder.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertCatalogSearchResultOrder.php @@ -43,7 +43,6 @@ public function processAssert(CatalogSearchQuery $catalogSearch, AdvancedResult $productNamesOnPage = $resultPage->getListProductBlock()->getProductNames(); foreach ($productNamesOnPage as $productOnPage) { - $idxInArray = array_search($productOnPage, $productsOrder, true); if (false !== $idxInArray) { if (0 !== $idxInArray) { diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.php index 167e9a65afec5..7aa3dbc17993c 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.php @@ -219,7 +219,6 @@ public function tearDown() \Magento\Config\Test\TestStep\SetupConfigurationStep::class, ['configData' => $this->configData, 'rollback' => true, 'flushCache' => $this->flushCache] )->run(); - } /** diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInBackendOrder.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInBackendOrder.php index 57eb05ae94f22..20c1dc1d2dc1d 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInBackendOrder.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInBackendOrder.php @@ -62,7 +62,6 @@ public function processAssert( $expectedData[] = $giftMessageForm->getData(); $actualData[] = $salesOrderView->getGiftOptionsBlock()->getData($giftMessageForm); - } if ($giftMessage->getAllowGiftOptionsForItems() === 'Yes') { diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/CreatePayFlowOrderBackendNegativeTest.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/CreatePayFlowOrderBackendNegativeTest.php index d0c46c7a8492d..cf93e2a1e6e4d 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/CreatePayFlowOrderBackendNegativeTest.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/CreatePayFlowOrderBackendNegativeTest.php @@ -24,7 +24,7 @@ * 9. Click Get Shipping Method and rates. * 10. Fill data according dataset. * 11. Select payment method Credit Card (PayFlow Pro) - * 12. Leave empty required fields for credit card + * 12. Leave empty required fields for credit card * 13. Click Submit order button * * @group PayPal diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteProductInGrid.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteProductInGrid.php index 9e44e046c702d..a7dda09690688 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteProductInGrid.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteProductInGrid.php @@ -97,7 +97,6 @@ public function processAssert( $urlRewriteIndex->getUrlRedirectGrid()->isRowVisible($filter, true, false), 'URL Rewrite with request path \'' . $filter['request_path'] . '\' is absent in grid.' ); - } } } diff --git a/dev/tests/functional/tests/app/Magento/Vault/Test/TestStep/UseSavedPaymentMethodStep.php b/dev/tests/functional/tests/app/Magento/Vault/Test/TestStep/UseSavedPaymentMethodStep.php index f28370f3c18c0..1c0b02451b252 100644 --- a/dev/tests/functional/tests/app/Magento/Vault/Test/TestStep/UseSavedPaymentMethodStep.php +++ b/dev/tests/functional/tests/app/Magento/Vault/Test/TestStep/UseSavedPaymentMethodStep.php @@ -33,7 +33,7 @@ class UseSavedPaymentMethodStep implements TestStepInterface * @param CheckoutOnepage $checkoutOnepage * @param array $vault */ - public function __construct (CheckoutOnepage $checkoutOnepage, array $vault) + public function __construct(CheckoutOnepage $checkoutOnepage, array $vault) { $this->checkoutOnepage = $checkoutOnepage; $this->vault = $vault; diff --git a/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php b/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php index 635a1aa7e3501..722b87a70a0c2 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php @@ -186,7 +186,6 @@ function ($classFile) { self::$backupStaticVariables[$className][$staticProperty->getName()] = $value; } } - } } diff --git a/dev/tests/integration/testsuite/Magento/Braintree/_files/paypal_quote.php b/dev/tests/integration/testsuite/Magento/Braintree/_files/paypal_quote.php index 8e58a83af58bc..28d3cbb882c8e 100644 --- a/dev/tests/integration/testsuite/Magento/Braintree/_files/paypal_quote.php +++ b/dev/tests/integration/testsuite/Magento/Braintree/_files/paypal_quote.php @@ -22,4 +22,3 @@ /** @var CartRepositoryInterface $quoteRepository */ $quoteRepository = $objectManager->get(CartRepositoryInterface::class); $quoteRepository->save($quote); - diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/EavTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/EavTest.php index afed89a044a68..8280dc92e513a 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/EavTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/EavTest.php @@ -118,9 +118,9 @@ private function prepareDataForComparison(array &$data, array $expectedData) } if ($item instanceof \Magento\Framework\Phrase) { $item = (string)$item; - } else if (is_array($item)) { + } elseif (is_array($item)) { $this->prepareDataForComparison($item, $expectedData[$key]); - } else if ($key === 'price_id' || $key === 'sortOrder') { + } elseif ($key === 'price_id' || $key === 'sortOrder') { $data[$key] = '__placeholder__'; } } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple_rollback.php b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple_rollback.php index b048e0ca65975..abed0001932cf 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple_rollback.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple_rollback.php @@ -20,7 +20,6 @@ $product = $productRepository->get('simple', false, null, true); $productRepository->delete($product); } catch (NoSuchEntityException $e) { - } $registry->unregister('isSecureArea'); $registry->register('isSecureArea', false); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple_with_custom_options_rollback.php b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple_with_custom_options_rollback.php index dc35cf6b70ce8..c0c11800df7d1 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple_with_custom_options_rollback.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple_with_custom_options_rollback.php @@ -20,7 +20,6 @@ $product = $productRepository->get('simple_with_custom_options', false, null, true); $productRepository->delete($product); } catch (NoSuchEntityException $e) { - } $registry->unregister('isSecureArea'); $registry->register('isSecureArea', false); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_with_dropdown_option_rollback.php b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_with_dropdown_option_rollback.php index 7aecb2899b232..5e4a28a4b8ccf 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_with_dropdown_option_rollback.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_with_dropdown_option_rollback.php @@ -18,7 +18,6 @@ $product = $productRepository->get('simple_dropdown_option', false, null, true); $product->delete(); } catch (NoSuchEntityException $e) { - } $registry->unregister('isSecureArea'); $registry->register('isSecureArea', false); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/_files/products_for_search_rollback.php b/dev/tests/integration/testsuite/Magento/Catalog/_files/products_for_search_rollback.php index 69cc49d961f90..f0de25a76325e 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/_files/products_for_search_rollback.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/_files/products_for_search_rollback.php @@ -26,7 +26,6 @@ $product = $productRepository->get($sku, false, null, true); $productRepository->delete($product); } catch (NoSuchEntityException $e) { - } } diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php index d96c02c3e9ae7..8f314345ed7d9 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php @@ -122,7 +122,7 @@ public function testExportWithProductLinks() /** * Verify that all stock item attribute values are exported (aren't equal to empty string) - * + * * @magentoAppIsolation enabled * @magentoDbIsolation enabled * @covers \Magento\CatalogImportExport\Model\Export\Product::export diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Ui/DataProvider/Product/Form/Modifier/Data/AssociatedProductsTest.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Ui/DataProvider/Product/Form/Modifier/Data/AssociatedProductsTest.php index 0f23cd2ab40bc..6ffaba60cc5ed 100644 --- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Ui/DataProvider/Product/Form/Modifier/Data/AssociatedProductsTest.php +++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Ui/DataProvider/Product/Form/Modifier/Data/AssociatedProductsTest.php @@ -21,7 +21,6 @@ public function setUp() { $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->registry = $this->objectManager->get(\Magento\Framework\Registry::class); - } /** diff --git a/dev/tests/integration/testsuite/Magento/Downloadable/_files/product_downloadable_rollback.php b/dev/tests/integration/testsuite/Magento/Downloadable/_files/product_downloadable_rollback.php index 127d948962b3e..bcf6076e198c0 100644 --- a/dev/tests/integration/testsuite/Magento/Downloadable/_files/product_downloadable_rollback.php +++ b/dev/tests/integration/testsuite/Magento/Downloadable/_files/product_downloadable_rollback.php @@ -20,7 +20,6 @@ $product = $productRepository->get('downloadable-product', false, null, true); $productRepository->delete($product); } catch (NoSuchEntityException $e) { - } $registry->unregister('isSecureArea'); $registry->register('isSecureArea', false); diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Asset/MinifierTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Asset/MinifierTest.php index cc14104f014b0..1d198e3479fac 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/Asset/MinifierTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/Asset/MinifierTest.php @@ -93,7 +93,7 @@ public function testCSSminLibrary() /** * Test JS minification library - * + * * @return void */ public function testJshrinkLibrary() diff --git a/dev/tests/integration/testsuite/Magento/GiftMessage/Model/OrderItemRepositoryTest.php b/dev/tests/integration/testsuite/Magento/GiftMessage/Model/OrderItemRepositoryTest.php index 580b566605a52..49a2f3167c444 100644 --- a/dev/tests/integration/testsuite/Magento/GiftMessage/Model/OrderItemRepositoryTest.php +++ b/dev/tests/integration/testsuite/Magento/GiftMessage/Model/OrderItemRepositoryTest.php @@ -28,7 +28,6 @@ protected function setUp() $this->giftMessageOrderItemRepository = $this->objectManager->create( \Magento\GiftMessage\Model\OrderItemRepository::class ); - } protected function tearDown() diff --git a/dev/tests/integration/testsuite/Magento/Integration/Block/Adminhtml/Integration/EditTest.php b/dev/tests/integration/testsuite/Magento/Integration/Block/Adminhtml/Integration/EditTest.php index 1b9d3ea1725ba..844356cfb78e8 100644 --- a/dev/tests/integration/testsuite/Magento/Integration/Block/Adminhtml/Integration/EditTest.php +++ b/dev/tests/integration/testsuite/Magento/Integration/Block/Adminhtml/Integration/EditTest.php @@ -118,6 +118,5 @@ public function testGetFormActionUrl() { $baseUrl = Bootstrap::getObjectManager()->get(\Magento\Framework\Url::class)->getBaseUrl(); $this->assertContains($baseUrl, $this->editBlock->getFormActionUrl()); - } } diff --git a/dev/tests/integration/testsuite/Magento/Quote/Observer/Frontend/Quote/Address/CollectTotalsObserverTest.php b/dev/tests/integration/testsuite/Magento/Quote/Observer/Frontend/Quote/Address/CollectTotalsObserverTest.php index db6c5b96dcdcc..f2532d196aab5 100644 --- a/dev/tests/integration/testsuite/Magento/Quote/Observer/Frontend/Quote/Address/CollectTotalsObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/Quote/Observer/Frontend/Quote/Address/CollectTotalsObserverTest.php @@ -72,7 +72,7 @@ public function testChangeQuoteCustomerGroupIdForCustomerWithDisabledAutomaticGr 'quote' => $quote, 'shipping_assignment' => $shippingAssignment, 'total' => $total - ] + ] ] ); $this->model->execute($eventObserver); diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/Address/Total/ShippingTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/Address/Total/ShippingTest.php index 256fa04e77cea..4c6ac718503a4 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/Address/Total/ShippingTest.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/Address/Total/ShippingTest.php @@ -42,7 +42,6 @@ public function testRuleByProductWeightWithFreeShipping() $this->assertTrue(count($methods) > 0); $this->assertEquals('flatrate', $methods[0]->getMethodCode()); $this->assertEquals(0, $methods[0]->getAmount()); - } /** @@ -57,7 +56,6 @@ public function testRuleByProductWeightWithoutFreeShipping() $this->assertTrue(count($methods) > 0); $this->assertEquals('flatrate', $methods[0]->getMethodCode()); $this->assertEquals(25, $methods[0]->getAmount()); - } /** diff --git a/dev/tests/integration/testsuite/Magento/Search/Model/SynonymReaderTest.php b/dev/tests/integration/testsuite/Magento/Search/Model/SynonymReaderTest.php index cc4cba24cbc49..623287365e9ef 100644 --- a/dev/tests/integration/testsuite/Magento/Search/Model/SynonymReaderTest.php +++ b/dev/tests/integration/testsuite/Magento/Search/Model/SynonymReaderTest.php @@ -47,7 +47,7 @@ public static function loadByPhraseDataProvider() 'MONARCH English', [ ['synonyms' => 'queen,monarch', 'store_id' => 1, 'website_id' => 0], ['synonyms' => 'british,english', 'store_id' => 1, 'website_id' => 0] - ] + ] ] ]; } diff --git a/dev/tests/integration/testsuite/Magento/Setup/Console/Command/DependenciesShowFrameworkCommandTest.php b/dev/tests/integration/testsuite/Magento/Setup/Console/Command/DependenciesShowFrameworkCommandTest.php index 3ae1dc428cc12..b7d043feef29f 100644 --- a/dev/tests/integration/testsuite/Magento/Setup/Console/Command/DependenciesShowFrameworkCommandTest.php +++ b/dev/tests/integration/testsuite/Magento/Setup/Console/Command/DependenciesShowFrameworkCommandTest.php @@ -82,6 +82,5 @@ public function testExecute() $this->assertContains('"Dependencies for each module:",' . PHP_EOL, $fileContents); $this->assertContains('"Magento\A",1' . PHP_EOL . '" -- Magento\Framework",3' . PHP_EOL, $fileContents); $this->assertContains('"Magento\B",1' . PHP_EOL . '" -- Magento\Framework",3' . PHP_EOL, $fileContents); - } } diff --git a/dev/tests/integration/testsuite/Magento/Setup/Console/Command/I18nPackCommandTest.php b/dev/tests/integration/testsuite/Magento/Setup/Console/Command/I18nPackCommandTest.php index 44af81f8192f3..1fd96c556f2f1 100644 --- a/dev/tests/integration/testsuite/Magento/Setup/Console/Command/I18nPackCommandTest.php +++ b/dev/tests/integration/testsuite/Magento/Setup/Console/Command/I18nPackCommandTest.php @@ -60,7 +60,6 @@ public function testExecute() $this->assertFileExists($basePath . '/Magento/B/i18n/de_DE.csv'); $this->assertFileExists($basePath . '/Magento/C/i18n/de_DE.csv'); $this->assertFileExists($basePath . '/Magento/D/i18n/de_DE.csv'); - } /** diff --git a/dev/tests/integration/testsuite/Magento/Setup/Model/ConfigOptionsListCollectorTest.php b/dev/tests/integration/testsuite/Magento/Setup/Model/ConfigOptionsListCollectorTest.php index d734302fb3781..3c64079bb0549 100644 --- a/dev/tests/integration/testsuite/Magento/Setup/Model/ConfigOptionsListCollectorTest.php +++ b/dev/tests/integration/testsuite/Magento/Setup/Model/ConfigOptionsListCollectorTest.php @@ -70,6 +70,5 @@ public function testCollectOptionsLists() ]; $this->assertEquals($expected, $result); - } } diff --git a/dev/tests/integration/testsuite/Magento/Setup/Module/I18n/Dictionary/GeneratorTest.php b/dev/tests/integration/testsuite/Magento/Setup/Module/I18n/Dictionary/GeneratorTest.php index 531bd77ddc600..db9ec56ba348d 100644 --- a/dev/tests/integration/testsuite/Magento/Setup/Module/I18n/Dictionary/GeneratorTest.php +++ b/dev/tests/integration/testsuite/Magento/Setup/Module/I18n/Dictionary/GeneratorTest.php @@ -73,7 +73,6 @@ protected function setUp() ); $this->generator = ServiceLocator::getDictionaryGenerator(); - } protected function tearDown() diff --git a/dev/tests/integration/testsuite/Magento/Swatches/Model/AttributeCreateTest.php b/dev/tests/integration/testsuite/Magento/Swatches/Model/AttributeCreateTest.php index 482f628b5c71c..8c7a9c6f4568a 100644 --- a/dev/tests/integration/testsuite/Magento/Swatches/Model/AttributeCreateTest.php +++ b/dev/tests/integration/testsuite/Magento/Swatches/Model/AttributeCreateTest.php @@ -84,6 +84,5 @@ function ($values, $index) use ($optionsPerAttribute) { $attribute = $om->get(ProductAttributeRepositoryInterface::class)->save($attribute); $this->assertNotEmpty($attribute->getId()); $this->assertEquals('swatch_visual', $attribute->getFrontendInput()); - } } diff --git a/dev/tests/integration/testsuite/Magento/Tax/Model/TaxCalculationTest.php b/dev/tests/integration/testsuite/Magento/Tax/Model/TaxCalculationTest.php index 6ed9d08a00901..312865ec63735 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Model/TaxCalculationTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Model/TaxCalculationTest.php @@ -2676,7 +2676,7 @@ private function convertObjectToArray($object) { if ($object instanceof \Magento\Framework\DataObject) { $data = $object->getData(); - } else if (is_object($object)) { + } elseif (is_object($object)) { $data = (array)$object; } else { throw new \InvalidArgumentException("Provided argument is not an object."); diff --git a/dev/tests/static/framework/Magento/Sniffs/Less/CommentLevelsSniff.php b/dev/tests/static/framework/Magento/Sniffs/Less/CommentLevelsSniff.php index 51a84b2c76386..648c49b1fb100 100644 --- a/dev/tests/static/framework/Magento/Sniffs/Less/CommentLevelsSniff.php +++ b/dev/tests/static/framework/Magento/Sniffs/Less/CommentLevelsSniff.php @@ -180,7 +180,6 @@ private function checkNthLevelComment(PHP_CodeSniffer_File $phpcsFile, $stackPtr $commentLinePtr = $stackPtr; while ($tokens[$commentLinePtr - 2]['line'] > 1) { - $commentLinePtr = $phpcsFile->findPrevious(T_STRING, $commentLinePtr - 1, null, false, '//'); if (false === $commentLinePtr) { diff --git a/dev/tests/static/framework/Magento/Sniffs/Less/SelectorDelimiterSniff.php b/dev/tests/static/framework/Magento/Sniffs/Less/SelectorDelimiterSniff.php index de3d02d53bb23..8b8cf91e560c2 100644 --- a/dev/tests/static/framework/Magento/Sniffs/Less/SelectorDelimiterSniff.php +++ b/dev/tests/static/framework/Magento/Sniffs/Less/SelectorDelimiterSniff.php @@ -72,7 +72,6 @@ private function validateParenthesis(PHP_CodeSniffer_File $phpcsFile, $stackPtr, // Check that each class declaration goes from new line if (($stackLine === $nextClassLine) && ($stackLine === $nextOpenBraceLine)) { - $prevParenthesis = $phpcsFile->findPrevious(T_OPEN_PARENTHESIS, $stackPtr); $nextParenthesis = $phpcsFile->findNext(T_OPEN_PARENTHESIS, $stackPtr); diff --git a/dev/tests/static/framework/Magento/Sniffs/Translation/ConstantUsageSniff.php b/dev/tests/static/framework/Magento/Sniffs/Translation/ConstantUsageSniff.php index 9375cded7cabd..c3ce29ea44668 100644 --- a/dev/tests/static/framework/Magento/Sniffs/Translation/ConstantUsageSniff.php +++ b/dev/tests/static/framework/Magento/Sniffs/Translation/ConstantUsageSniff.php @@ -23,7 +23,6 @@ class ConstantUsageSniff implements \PHP_CodeSniffer_Sniff public function register() { return [T_OPEN_TAG]; - } /** @@ -83,7 +82,7 @@ private function checkIfFirstArgumentConstant( if (preg_match($variableRegexp, $lineContent) !== 0) { $phpcsFile->addError($error, $stackPtr, 'VariableTranslation'); } - } else if ($previousLineMatch) { + } elseif ($previousLineMatch) { $variableRegexp = "/^{$constantRegexp}/"; if (preg_match($variableRegexp, $lineContent) !== 0) { $phpcsFile->addError($error, $stackPtr, 'VariableTranslation'); diff --git a/dev/tests/static/framework/Magento/TestFramework/Dependency/DiRule.php b/dev/tests/static/framework/Magento/TestFramework/Dependency/DiRule.php index d734890c621ff..fa2c65bd03df0 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Dependency/DiRule.php +++ b/dev/tests/static/framework/Magento/TestFramework/Dependency/DiRule.php @@ -1,9 +1,9 @@ -mapper = $mapper; } - /** - * @return string - * @throws \Exception + /** + * @return string + * @throws \Exception */ private function getPattern() { @@ -47,8 +48,8 @@ private function getPattern() return $this->pattern; } - /** - * @var array + /** + * @var array */ private static $tagNameMap = [ 'type' => ['name'], @@ -60,15 +61,15 @@ private function getPattern() 'virtualType' => ['type'] ]; - /** - * Gets alien dependencies information for current module by analyzing file's contents - * - * @param string $currentModule - * @param string $fileType - * @param string $file - * @param string $contents - * @return array - * @throws \Exception + /** + * Gets alien dependencies information for current module by analyzing file's contents + * + * @param string $currentModule + * @param string $fileType + * @param string $file + * @param string $contents + * @return array + * @throws \Exception */ public function getDependencyInfo($currentModule, $fileType, $file, &$contents) { @@ -81,7 +82,6 @@ public function getDependencyInfo($currentModule, $fileType, $file, &$contents) foreach ($this->fetchPossibleDependencies($contents) as $type => $deps) { foreach ($deps as $dep) { $dep = $this->mapper->getType($dep, $scope); - if (preg_match($this->getPattern(), $dep, $matches)) { $referenceModule = str_replace('_', '\\', $matches['module']); if ($currentModule === $referenceModule) { @@ -98,31 +98,30 @@ public function getDependencyInfo($currentModule, $fileType, $file, &$contents) return $dependenciesInfo; } - /** - * @param string $contents - * @return array + /** + * @param string $contents + * @return array */ private function fetchPossibleDependencies($contents) { $doc = new DOMDocument(); $doc->loadXML($contents); - return [ RuleInterface::TYPE_SOFT => $this->getSoftDependencies($doc), RuleInterface::TYPE_HARD => $this->getHardDependencies($doc) ]; } - /** - * @param DOMDocument $doc - * @return array + /** + * @param DOMDocument $doc + * @return array */ private function getSoftDependencies(DOMDocument $doc) { $result = []; foreach (self::$tagNameMap as $tagName => $attributeNames) { $nodes = $doc->getElementsByTagName($tagName); - /** @var \DOMElement $node */ + /** @var \DOMElement $node */ foreach ($nodes as $node) { foreach ($attributeNames as $attributeName) { $result[] = $node->getAttribute($attributeName); @@ -133,16 +132,16 @@ private function getSoftDependencies(DOMDocument $doc) return $result; } - /** - * @param DOMDocument $doc - * @return array + /** + * @param DOMDocument $doc + * @return array */ private function getHardDependencies(DOMDocument $doc) { $result = []; $xpath = new DOMXPath($doc); $textNodes = $xpath->query('//*[@xsi:type="object"]'); - /** @var \DOMElement $node */ +/** @var \DOMElement $node */ foreach ($textNodes as $node) { $result[] = $node->nodeValue; } diff --git a/dev/tests/static/framework/Magento/TestFramework/Dependency/PhpRule.php b/dev/tests/static/framework/Magento/TestFramework/Dependency/PhpRule.php index 04b94ad85fca4..458475cd49074 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Dependency/PhpRule.php +++ b/dev/tests/static/framework/Magento/TestFramework/Dependency/PhpRule.php @@ -195,7 +195,7 @@ private function isPluginDependency($dependent, $dependency) : null; if ($subject === $dependency) { return true; - } else if ($subject) { + } elseif ($subject) { $subjectModule = substr($subject, 0, strpos($subject, '\\', 9)); // (strlen('Magento\\') + 1) === 9 return strpos($dependency, $subjectModule) === 0; } else { diff --git a/dev/tests/static/framework/Magento/TestFramework/Dependency/VirtualType/VirtualTypeMapper.php b/dev/tests/static/framework/Magento/TestFramework/Dependency/VirtualType/VirtualTypeMapper.php index fb95537ce80de..d4929e5afee4e 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Dependency/VirtualType/VirtualTypeMapper.php +++ b/dev/tests/static/framework/Magento/TestFramework/Dependency/VirtualType/VirtualTypeMapper.php @@ -1,9 +1,9 @@ -map = $map; } - /** - * @param string $name - * @param string $scope - * @return string|null + /** + * @param string $name + * @param string $scope + * @return string|null */ public function getType($name, $scope = null) { @@ -47,7 +48,6 @@ public function getType($name, $scope = null) array_unshift($scopes, $scope); } $scopes[] = self::$mainScope; - foreach ($scopes as $scp) { if (isset($this->map[$scp][$name])) { return $this->map[$scp][$name]; @@ -57,9 +57,9 @@ public function getType($name, $scope = null) return $name; } - /** - * @param string $file - * @return string + /** + * @param string $file + * @return string */ public function getScopeFromFile($file) { @@ -67,19 +67,19 @@ public function getScopeFromFile($file) return $basename === 'etc' ? 'global' : $basename; } - /** - * @return array - * @throws \Exception + /** + * @return array + * @throws \Exception */ private function loadDiConfigs() { return Files::init()->getDiConfigs(); } - /** - * @param array $diFiles - * @return array - * @throws \Exception + /** + * @param array $diFiles + * @return array + * @throws \Exception */ public function loadMap(array $diFiles = []) { @@ -91,9 +91,8 @@ public function loadMap(array $diFiles = []) $scope = $this->getScopeFromFile($file); $doc = new DOMDocument(); $doc->loadXML(file_get_contents($file)); - $nodes = $doc->getElementsByTagName('virtualType'); - /** @var \DOMElement $node */ +/** @var \DOMElement $node */ foreach ($nodes as $node) { $name = $node->getAttribute('name'); $type = $node->getAttribute('type'); diff --git a/dev/tests/static/framework/Magento/TestFramework/Inspection/WordsFinder.php b/dev/tests/static/framework/Magento/TestFramework/Inspection/WordsFinder.php index 79639e13cde35..3b655ee822c2d 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Inspection/WordsFinder.php +++ b/dev/tests/static/framework/Magento/TestFramework/Inspection/WordsFinder.php @@ -88,7 +88,7 @@ class WordsFinder /** * Map of phrase to exclude from the file content - * + * * @var array */ private $exclude = []; diff --git a/dev/tests/static/framework/Magento/TestFramework/Integrity/PluginValidator.php b/dev/tests/static/framework/Magento/TestFramework/Integrity/PluginValidator.php index bbfc9455d355a..fd7e42f73921d 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Integrity/PluginValidator.php +++ b/dev/tests/static/framework/Magento/TestFramework/Integrity/PluginValidator.php @@ -44,7 +44,8 @@ public function validate($pluginClass, $interceptedType) */ private function validateClassNameMatchesCase($className) { - $declarationName = (new \ReflectionClass($className))->getName();; + $declarationName = (new \ReflectionClass($className))->getName(); + ; if (ltrim($className, '\\') != ltrim($declarationName)) { throw new ValidatorException( new Phrase( diff --git a/dev/tests/static/framework/Magento/TestFramework/Utility/XssOutputValidator.php b/dev/tests/static/framework/Magento/TestFramework/Utility/XssOutputValidator.php index c9dc71c962448..a1eb36ce67b3f 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Utility/XssOutputValidator.php +++ b/dev/tests/static/framework/Magento/TestFramework/Utility/XssOutputValidator.php @@ -213,8 +213,7 @@ public function isXssUnsafeCommand($command) { $command = trim($command); - switch (true) - { + switch (true) { case preg_match( '/->(' . implode('|', $this->escapeFunctions) . '|.*html.*)\(/simU', $this->getLastMethod($command) @@ -302,7 +301,6 @@ private function replacePhpQuoteWithPlaceholders($fileContent) $replacements = []; if (preg_match_all('/<[?](php|=)(.*?)[?]>/sm', $fileContent, $phpBlockMatches)) { foreach ($phpBlockMatches[2] as $phpBlock) { - $phpBlockQuoteReplaced = preg_replace( ['/([^\\\\])\'\'/si', '/([^\\\\])""/si'], ["\1'-*=single=*-'", '\1"-*=double=*-"'], diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/DiRuleTest.php b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/DiRuleTest.php index 5d219d5b7782f..ddfeb6e66a36e 100644 --- a/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/DiRuleTest.php +++ b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/DiRuleTest.php @@ -1,7 +1,7 @@ - [ 'someVirtualType1' => 'Magento\AnotherModule\Some\Class1', 'someVirtualType2' => 'Magento\AnotherModule\Some\Class2' ] - ] - ) - ); - + ])); $file = '/some/path/scope/di.xml'; - static::assertEquals( - $expected, - $diRule->getDependencyInfo($module, null, $file, $contents) - ); + static::assertEquals($expected, $diRule->getDependencyInfo($module, null, $file, $contents)); } - /** - * @return array + /** + * @return array */ public function getDependencyInfoDataProvider() { @@ -107,11 +100,11 @@ public function getDependencyInfoDataProvider() ]; } - /** - * Get content of di file - * - * @param string $fileName - * @return string + /** + * Get content of di file + * + * @param string $fileName + * @return string */ private function getFileContent($fileName) { diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/VirtualType/VirtualTypeMapperTest.php b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/VirtualType/VirtualTypeMapperTest.php index 2b90a246afee8..1b432869ef9fb 100644 --- a/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/VirtualType/VirtualTypeMapperTest.php +++ b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/VirtualType/VirtualTypeMapperTest.php @@ -95,7 +95,6 @@ public function testLoad(array $diFilesPath, array $expectedVirtualTypesDependen $expectedVirtualTypesDependencies, $mapper->loadMap($diFilesPath) ); - } /** @@ -116,7 +115,6 @@ public function testGetTypeComplex(array $diFilesPath, array $expectedVirtualTyp self::assertEquals($baseType, $mapper->getType($virtualType, $scope)); } } - } /** diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php index aa4c0b4ddc7bc..ad753ef069a90 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php @@ -151,7 +151,6 @@ public static function setUpBeforeClass() $root = BP; $rootJson = json_decode(file_get_contents($root . '/composer.json'), true); if (preg_match('/magento\/project-*/', $rootJson['name']) == 1) { - // The Dependency test is skipped for vendor/magento build self::markTestSkipped( 'MAGETWO-43654: The build is running from vendor/magento. DependencyTest is skipped.' diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Indexer/ConfigTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Indexer/ConfigTest.php index 201de5608a791..6a959d7e7e16e 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Indexer/ConfigTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Indexer/ConfigTest.php @@ -78,7 +78,6 @@ protected function _getKnownInvalidPartialXml() protected function _getFileXsd() { return $this->urnResolver->getRealPath('urn:magento:framework:Indexer/etc/indexer.xsd'); - } /** diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Phrase/ArgumentsTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Phrase/ArgumentsTest.php index 48a3df46866f7..c25a8ffb84637 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Phrase/ArgumentsTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Phrase/ArgumentsTest.php @@ -103,7 +103,6 @@ private function checkArgumentMismatch($phrase, &$incorrectNumberOfArgumentsErro // Check for zend placeholders %placeholder% and sprintf placeholder %s if (preg_match_all('/%((s)|([A-Za-z]+)%)/', $phrase['phrase'], $placeHolders, PREG_OFFSET_CAPTURE)) { - foreach ($placeHolders[0] as $ph) { // Check if char after placeholder is not a digit or letter $charAfterPh = $phrase['phrase'][$ph[1] + strlen($ph[0])]; diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php index 101602acb1d55..b2b6225eac836 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php @@ -584,7 +584,6 @@ private function _checkExistenceOfObsoleteConstants( break; } } - } } else { $result = 1; diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/copyright/blacklist.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/copyright/blacklist.php index 05b5cd721d8e2..13977a9ad04ee 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/copyright/blacklist.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/copyright/blacklist.php @@ -7,4 +7,3 @@ '/\.(jpe?g|png|gif|ttf|swf|eot|woff|pdf|mp3|pdf|jar|jbf)$/', '/pub\/opt\/magento\/var/' ]; - diff --git a/dev/tests/unit/framework/bootstrap.php b/dev/tests/unit/framework/bootstrap.php index 5af59a88207d4..6e82d65f60002 100644 --- a/dev/tests/unit/framework/bootstrap.php +++ b/dev/tests/unit/framework/bootstrap.php @@ -54,5 +54,5 @@ function ($errNo, $errStr, $errFile, $errLine) { ); } } - ); + ); } diff --git a/lib/internal/Magento/Framework/Api/DataObjectHelper.php b/lib/internal/Magento/Framework/Api/DataObjectHelper.php index 8a9e0e2a553a1..c6212511314f3 100644 --- a/lib/internal/Magento/Framework/Api/DataObjectHelper.php +++ b/lib/internal/Magento/Framework/Api/DataObjectHelper.php @@ -176,7 +176,7 @@ protected function setComplexValue( if (is_subclass_of($returnType, \Magento\Framework\Api\ExtensibleDataInterface::class)) { $object = $this->objectFactory->create($returnType, []); $this->populateWithArray($object, $value, $returnType); - } else if (is_subclass_of($returnType, \Magento\Framework\Api\ExtensionAttributesInterface::class)) { + } elseif (is_subclass_of($returnType, \Magento\Framework\Api\ExtensionAttributesInterface::class)) { foreach ($value as $extensionAttributeKey => $extensionAttributeValue) { $extensionAttributeGetterMethodName = 'get' . \Magento\Framework\Api\SimpleDataObjectConverter::snakeCaseToUpperCamelCase( diff --git a/lib/internal/Magento/Framework/Api/ExtensibleDataObjectConverter.php b/lib/internal/Magento/Framework/Api/ExtensibleDataObjectConverter.php index 463cfd8ea3478..29c16a5332b59 100644 --- a/lib/internal/Magento/Framework/Api/ExtensibleDataObjectConverter.php +++ b/lib/internal/Magento/Framework/Api/ExtensibleDataObjectConverter.php @@ -48,7 +48,7 @@ public function toNestedArray( if (!empty($dataObjectArray[AbstractExtensibleObject::CUSTOM_ATTRIBUTES_KEY])) { /** @var AttributeValue[] $customAttributes */ $customAttributes = $dataObjectArray[AbstractExtensibleObject::CUSTOM_ATTRIBUTES_KEY]; - unset ($dataObjectArray[AbstractExtensibleObject::CUSTOM_ATTRIBUTES_KEY]); + unset($dataObjectArray[AbstractExtensibleObject::CUSTOM_ATTRIBUTES_KEY]); foreach ($customAttributes as $attributeValue) { if (!in_array($attributeValue[AttributeValue::ATTRIBUTE_CODE], $skipAttributes)) { $dataObjectArray[$attributeValue[AttributeValue::ATTRIBUTE_CODE]] @@ -59,7 +59,7 @@ public function toNestedArray( if (!empty($dataObjectArray[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY])) { /** @var array $extensionAttributes */ $extensionAttributes = $dataObjectArray[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]; - unset ($dataObjectArray[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]); + unset($dataObjectArray[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]); foreach ($extensionAttributes as $attributeKey => $attributeValue) { if (!in_array($attributeKey, $skipAttributes)) { $dataObjectArray[$attributeKey] = $attributeValue; diff --git a/lib/internal/Magento/Framework/Api/SortOrder.php b/lib/internal/Magento/Framework/Api/SortOrder.php index a162640626dbe..83488823b7dd3 100644 --- a/lib/internal/Magento/Framework/Api/SortOrder.php +++ b/lib/internal/Magento/Framework/Api/SortOrder.php @@ -77,7 +77,7 @@ public function setDirection($direction) /** * Validate direction argument ASC or DESC - * + * * @param mixed $direction * @return null * @throws InputException diff --git a/lib/internal/Magento/Framework/Api/Uploader.php b/lib/internal/Magento/Framework/Api/Uploader.php index 0516087161d83..2916af6c7d08c 100644 --- a/lib/internal/Magento/Framework/Api/Uploader.php +++ b/lib/internal/Magento/Framework/Api/Uploader.php @@ -16,7 +16,6 @@ class Uploader extends \Magento\Framework\File\Uploader */ public function __construct() { - } /** diff --git a/lib/internal/Magento/Framework/App/Config.php b/lib/internal/Magento/Framework/App/Config.php index 68f2fdebaa6e0..01db8483142ba 100644 --- a/lib/internal/Magento/Framework/App/Config.php +++ b/lib/internal/Magento/Framework/App/Config.php @@ -67,7 +67,7 @@ public function getValue( if ($scope !== 'default') { if (is_numeric($scopeCode) || $scopeCode === null) { $scopeCode = $this->scopeCodeResolver->resolve($scope, $scopeCode); - } else if ($scopeCode instanceof \Magento\Framework\App\ScopeInterface) { + } elseif ($scopeCode instanceof \Magento\Framework\App\ScopeInterface) { $scopeCode = $scopeCode->getCode(); } if ($scopeCode) { diff --git a/lib/internal/Magento/Framework/App/DeploymentConfig/Reader.php b/lib/internal/Magento/Framework/App/DeploymentConfig/Reader.php index 8cb773e47eea9..e5f2f79a8eacf 100644 --- a/lib/internal/Magento/Framework/App/DeploymentConfig/Reader.php +++ b/lib/internal/Magento/Framework/App/DeploymentConfig/Reader.php @@ -81,8 +81,7 @@ public function getFiles() $files[$fileKey] = $filePath; if (!$fileDriver->isExists($path . "/" . $filePath)) { foreach ($initialFilePools as $initialFiles) { - if ( - isset($initialFiles[$fileKey]) + if (isset($initialFiles[$fileKey]) && $fileDriver->isExists($path . '/' . $initialFiles[$fileKey]) ) { $files[$fileKey] = $initialFiles[$fileKey]; diff --git a/lib/internal/Magento/Framework/App/PageCache/Kernel.php b/lib/internal/Magento/Framework/App/PageCache/Kernel.php index 076033b748c0c..b498501718754 100644 --- a/lib/internal/Magento/Framework/App/PageCache/Kernel.php +++ b/lib/internal/Magento/Framework/App/PageCache/Kernel.php @@ -169,7 +169,6 @@ private function getPreparedData(\Magento\Framework\App\Response\Http $response) 'headers' => $response->getHeaders()->toArray(), 'context' => $this->context->toArray() ]; - } /** diff --git a/lib/internal/Magento/Framework/App/Response/HttpInterface.php b/lib/internal/Magento/Framework/App/Response/HttpInterface.php index 22557e76b95c4..da1800deb8f50 100644 --- a/lib/internal/Magento/Framework/App/Response/HttpInterface.php +++ b/lib/internal/Magento/Framework/App/Response/HttpInterface.php @@ -38,7 +38,7 @@ public function setHeader($name, $value, $replace = false); /** * Get header value by name - * + * * Returns first found header by passed name. * If header with specified name was not found returns false. * @@ -57,14 +57,14 @@ public function clearHeader($name); /** * Allow granular setting of HTTP response status code, version and phrase - * + * * For example, a HTTP response as the following: * HTTP 200 1.1 Your response has been served * Can be set with the arguments * $httpCode = 200 * $version = 1.1 * $phrase = 'Your response has been served' - * + * * @param int|string $httpCode * @param null|int|string $version * @param null|string $phrase @@ -74,7 +74,7 @@ public function setStatusHeader($httpCode, $version = null, $phrase = null); /** * Append the given string to the response body - * + * * @param string $value * @return self */ @@ -82,9 +82,9 @@ public function appendBody($value); /** * Set the response body to the given value - * + * * Any previously set contents will be replaced by the new content. - * + * * @param string $value * @return self */ diff --git a/lib/internal/Magento/Framework/App/SetupInfo.php b/lib/internal/Magento/Framework/App/SetupInfo.php index fac38e28ee2bc..636095344bd6e 100644 --- a/lib/internal/Magento/Framework/App/SetupInfo.php +++ b/lib/internal/Magento/Framework/App/SetupInfo.php @@ -111,7 +111,7 @@ public function getProjectUrl() $isProjectInDocRoot = false !== strpos($this->projectRoot . '/', $this->docRoot . '/'); if (empty($this->server['HTTP_HOST'])) { return ''; - } else if (!$isProjectInDocRoot) { + } elseif (!$isProjectInDocRoot) { return 'http://' . $this->server['HTTP_HOST'] . '/'; } return 'http://' . $this->server['HTTP_HOST'] . substr($this->projectRoot . '/', strlen($this->docRoot)); diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Cache/FlushCacheByTagsTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Cache/FlushCacheByTagsTest.php index 5620d1ee63b31..4b7fe1a43532d 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Cache/FlushCacheByTagsTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Cache/FlushCacheByTagsTest.php @@ -40,7 +40,6 @@ protected function setUp() ['test'], $this->tagResolver ); - } public function testAroundSave() diff --git a/lib/internal/Magento/Framework/App/Test/Unit/ObjectManager/FactoryStub.php b/lib/internal/Magento/Framework/App/Test/Unit/ObjectManager/FactoryStub.php index 1b7ba43ec39a5..a4d08771d4d46 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/ObjectManager/FactoryStub.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/ObjectManager/FactoryStub.php @@ -47,6 +47,5 @@ public function create($requestedType, array $arguments = []) */ public function setObjectManager(ObjectManagerInterface $objectManager) { - } } diff --git a/lib/internal/Magento/Framework/App/Utility/Classes.php b/lib/internal/Magento/Framework/App/Utility/Classes.php index 62ad2dd56ea3e..57b84971eee0f 100644 --- a/lib/internal/Magento/Framework/App/Utility/Classes.php +++ b/lib/internal/Magento/Framework/App/Utility/Classes.php @@ -271,11 +271,10 @@ public static function resolveVirtualType($className) */ public static function isAutogenerated($className) { - if ( - preg_match( - '/.*\\\\[a-zA-Z0-9]{1,}(Factory|SearchResults|DataBuilder|Extension|ExtensionInterface)$/', - $className - ) + if (preg_match( + '/.*\\\\[a-zA-Z0-9]{1,}(Factory|SearchResults|DataBuilder|Extension|ExtensionInterface)$/', + $className + ) || preg_match('/Magento\\\\[\w]+\\\\(Test\\\\(Page|Fixture))\\\\/', $className) || preg_match('/.*\\\\[a-zA-Z0-9]{1,}\\\\Proxy$/', $className) ) { diff --git a/lib/internal/Magento/Framework/Code/GeneratedFiles.php b/lib/internal/Magento/Framework/Code/GeneratedFiles.php index 4ee3c6680d6dd..98790b0e75c95 100644 --- a/lib/internal/Magento/Framework/Code/GeneratedFiles.php +++ b/lib/internal/Magento/Framework/Code/GeneratedFiles.php @@ -64,7 +64,6 @@ public function regenerate() public function cleanGeneratedFiles() { if ($this->write->isExist(self::REGENERATE_FLAG)) { - $enabledCacheTypes = []; //TODO: to be removed in scope of MAGETWO-53476 diff --git a/lib/internal/Magento/Framework/Code/Generator.php b/lib/internal/Magento/Framework/Code/Generator.php index 02cb70b15004f..063b3d47149bc 100644 --- a/lib/internal/Magento/Framework/Code/Generator.php +++ b/lib/internal/Magento/Framework/Code/Generator.php @@ -199,7 +199,7 @@ protected function shouldSkipGeneration($resultEntityType, $sourceClassName, $re { if (!$resultEntityType || !$sourceClassName) { return self::GENERATION_ERROR; - } else if ($this->definedClasses->isClassLoadableFromDisc($resultClass)) { + } elseif ($this->definedClasses->isClassLoadableFromDisc($resultClass)) { $generatedFileName = $this->_ioObject->generateResultFileName($resultClass); /** * Must handle two edge cases: a competing process has generated the class and written it to disc already, @@ -211,7 +211,7 @@ protected function shouldSkipGeneration($resultEntityType, $sourceClassName, $re $this->_ioObject->includeFile($generatedFileName); } return self::GENERATION_SKIP; - } else if (!isset($this->_generatedEntities[$resultEntityType])) { + } elseif (!isset($this->_generatedEntities[$resultEntityType])) { throw new \InvalidArgumentException('Unknown generation entity.'); } return false; diff --git a/lib/internal/Magento/Framework/Code/Generator/EntityAbstract.php b/lib/internal/Magento/Framework/Code/Generator/EntityAbstract.php index b8f80489d9dba..9df1117b2d1b9 100644 --- a/lib/internal/Magento/Framework/Code/Generator/EntityAbstract.php +++ b/lib/internal/Magento/Framework/Code/Generator/EntityAbstract.php @@ -252,8 +252,7 @@ protected function _validateData() if (!$this->definedClasses->isClassLoadable($sourceClassName)) { $this->_addError('Source class ' . $sourceClassName . ' doesn\'t exist.'); return false; - } elseif ( - /** + } elseif (/** * If makeResultFileDirectory only fails because the file is already created, * a competing process has generated the file, no exception should be thrown. */ diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/Generator/IoTest.php b/lib/internal/Magento/Framework/Code/Test/Unit/Generator/IoTest.php index cdd0c57d614a3..2b74454bb4040 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/Generator/IoTest.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/Generator/IoTest.php @@ -93,7 +93,7 @@ public function testWriteResultFileAlreadyExists($resultFileName, $fileExists, $ if (!$exceptionDuringRename) { $renameMockEvent = $this->returnValue(true); - } else if ($fileExists) { + } elseif ($fileExists) { $renameMockEvent = $this->throwException(new FileSystemException(new Phrase('File already exists'))); } else { $exceptionMessage = 'Some error renaming file'; diff --git a/lib/internal/Magento/Framework/Communication/Config/Reader/EnvReader/Validator.php b/lib/internal/Magento/Framework/Communication/Config/Reader/EnvReader/Validator.php index 5922d52fcc548..b1f7c82be9238 100644 --- a/lib/internal/Magento/Framework/Communication/Config/Reader/EnvReader/Validator.php +++ b/lib/internal/Magento/Framework/Communication/Config/Reader/EnvReader/Validator.php @@ -178,8 +178,7 @@ private function validateTopicResponseHandler($configDataItem) ) ); } - if ( - $this->booleanUtils->toBoolean($configDataItem[ConfigInterface::TOPIC_IS_SYNCHRONOUS]) && + if ($this->booleanUtils->toBoolean($configDataItem[ConfigInterface::TOPIC_IS_SYNCHRONOUS]) && count($configDataItem[ConfigInterface::TOPIC_HANDLERS]) != 1 ) { throw new \LogicException( diff --git a/lib/internal/Magento/Framework/Communication/Config/Reader/XmlReader/Converter.php b/lib/internal/Magento/Framework/Communication/Config/Reader/XmlReader/Converter.php index 4acc295ea2000..5727ef0a9c66b 100644 --- a/lib/internal/Magento/Framework/Communication/Config/Reader/XmlReader/Converter.php +++ b/lib/internal/Magento/Framework/Communication/Config/Reader/XmlReader/Converter.php @@ -133,7 +133,7 @@ protected function extractTopics($config) $serviceMethod[ConfigParser::METHOD_NAME], $handlers ); - } else if ($requestSchema && $responseSchema) { + } elseif ($requestSchema && $responseSchema) { $output[$topicName] = [ Config::TOPIC_NAME => $topicName, Config::TOPIC_IS_SYNCHRONOUS => true, @@ -142,7 +142,7 @@ protected function extractTopics($config) Config::TOPIC_RESPONSE => $responseSchema, Config::TOPIC_HANDLERS => $handlers ]; - } else if ($requestSchema) { + } elseif ($requestSchema) { $output[$topicName] = [ Config::TOPIC_NAME => $topicName, Config::TOPIC_IS_SYNCHRONOUS => false, diff --git a/lib/internal/Magento/Framework/Composer/BufferIoFactory.php b/lib/internal/Magento/Framework/Composer/BufferIoFactory.php index 20524912a812c..852fc24584f76 100644 --- a/lib/internal/Magento/Framework/Composer/BufferIoFactory.php +++ b/lib/internal/Magento/Framework/Composer/BufferIoFactory.php @@ -15,7 +15,7 @@ class BufferIoFactory { /** * Creates BufferIO instance - * + * * @return BufferIO */ public function create() diff --git a/lib/internal/Magento/Framework/Config/Dom/UrnResolver.php b/lib/internal/Magento/Framework/Config/Dom/UrnResolver.php index 0720b284f393f..a09276c25339f 100644 --- a/lib/internal/Magento/Framework/Config/Dom/UrnResolver.php +++ b/lib/internal/Magento/Framework/Config/Dom/UrnResolver.php @@ -37,7 +37,7 @@ public function getRealPath($schema) //urn:magento:module:Magento_Catalog:etc/catalog_attributes.xsd $package = $componentRegistrar ->getPath(ComponentRegistrar::MODULE, $matches['module']); - } else if (preg_match($frameworkPattern, $schema, $matches)) { + } elseif (preg_match($frameworkPattern, $schema, $matches)) { //urn:magento:framework:Module/etc/module.xsd //urn:magento:framework-amqp:Module/etc/module.xsd $package = $componentRegistrar diff --git a/lib/internal/Magento/Framework/Console/Cli.php b/lib/internal/Magento/Framework/Console/Cli.php index 5f3a4cb23e6d4..eed170f213958 100644 --- a/lib/internal/Magento/Framework/Console/Cli.php +++ b/lib/internal/Magento/Framework/Console/Cli.php @@ -191,8 +191,7 @@ private function assertGenerationPermissions() /** @var State $state */ $state = $this->objectManager->get(State::class); - if ( - $state->getMode() !== State::MODE_PRODUCTION + if ($state->getMode() !== State::MODE_PRODUCTION && !$generationDirectoryAccess->check() ) { $this->writeGenerationDirectoryReadError(); diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Radios.php b/lib/internal/Magento/Framework/Data/Form/Element/Radios.php index 38f520403dc62..ad28f4b6744ca 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Radios.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Radios.php @@ -110,6 +110,5 @@ protected function getRadioButtonAttributes($option) } } return $html; - } } diff --git a/lib/internal/Magento/Framework/DataObject/Copy.php b/lib/internal/Magento/Framework/DataObject/Copy.php index 4f85c337fa284..5a194c46997d2 100644 --- a/lib/internal/Magento/Framework/DataObject/Copy.php +++ b/lib/internal/Magento/Framework/DataObject/Copy.php @@ -214,9 +214,9 @@ protected function _setFieldsetFieldValue($target, $targetCode, $value) if ($targetIsArray) { $target[$targetCode] = $value; - } else if ($target instanceof \Magento\Framework\DataObject) { + } elseif ($target instanceof \Magento\Framework\DataObject) { $target->setDataUsingMethod($targetCode, $value); - } else if ($target instanceof \Magento\Framework\Api\ExtensibleDataInterface) { + } elseif ($target instanceof \Magento\Framework\Api\ExtensibleDataInterface) { $this->setAttributeValueFromExtensibleDataObject($target, $targetCode, $value); } elseif ($target instanceof \Magento\Framework\Api\AbstractSimpleObject) { $target->setData($targetCode, $value); diff --git a/lib/internal/Magento/Framework/EntityManager/CallbackHandler.php b/lib/internal/Magento/Framework/EntityManager/CallbackHandler.php index 02cad0a9402c1..bcea6029debf8 100644 --- a/lib/internal/Magento/Framework/EntityManager/CallbackHandler.php +++ b/lib/internal/Magento/Framework/EntityManager/CallbackHandler.php @@ -58,7 +58,6 @@ public function process($entityType) $this->logger->error($e->getMessage(), $e->getTrace()); throw $e; } - } } diff --git a/lib/internal/Magento/Framework/EntityManager/MetadataPool.php b/lib/internal/Magento/Framework/EntityManager/MetadataPool.php index 188cf99007b34..08ecbb3f01eb8 100644 --- a/lib/internal/Magento/Framework/EntityManager/MetadataPool.php +++ b/lib/internal/Magento/Framework/EntityManager/MetadataPool.php @@ -90,7 +90,6 @@ public function getMetadata($entityType) throw new \Exception(sprintf('Unknown entity type: %s requested', $entityType)); } if (!isset($this->registry[$entityType])) { - $this->registry[$entityType] = $this->createMetadata($entityType); } return $this->registry[$entityType]; diff --git a/lib/internal/Magento/Framework/Filesystem/Directory/Read.php b/lib/internal/Magento/Framework/Filesystem/Directory/Read.php index f3da87ef44e68..e2477e7d7adcf 100644 --- a/lib/internal/Magento/Framework/Filesystem/Directory/Read.php +++ b/lib/internal/Magento/Framework/Filesystem/Directory/Read.php @@ -205,7 +205,6 @@ public function readFile($path, $flag = null, $context = null) { $absolutePath = $this->driver->getAbsolutePath($this->path, $path); return $this->driver->fileGetContents($absolutePath, $flag, $context); - } /** diff --git a/lib/internal/Magento/Framework/Filesystem/Test/Unit/File/ExcludeFilterTest.php b/lib/internal/Magento/Framework/Filesystem/Test/Unit/File/ExcludeFilterTest.php index 2741d8c25ff74..f4c162d6743c4 100644 --- a/lib/internal/Magento/Framework/Filesystem/Test/Unit/File/ExcludeFilterTest.php +++ b/lib/internal/Magento/Framework/Filesystem/Test/Unit/File/ExcludeFilterTest.php @@ -39,7 +39,7 @@ public function testExclusion() $this->assertTrue(!in_array(BP . '/var/session/', $result), 'Filtered path should not be in array'); } - private function getFilesIterator () + private function getFilesIterator() { $files = [ BP . '/var/', diff --git a/lib/internal/Magento/Framework/Filter/Template.php b/lib/internal/Magento/Framework/Filter/Template.php index 1bea535eeb574..2594916b599d6 100644 --- a/lib/internal/Magento/Framework/Filter/Template.php +++ b/lib/internal/Magento/Framework/Filter/Template.php @@ -318,8 +318,7 @@ protected function getVariable($value, $default = '{no_value_defined}') if ($i == 0 && isset($this->templateVars[$stackVars[$i]['name']])) { // Getting of template value $stackVars[$i]['variable'] = & $this->templateVars[$stackVars[$i]['name']]; - } elseif ( - isset($stackVars[$i - 1]['variable']) + } elseif (isset($stackVars[$i - 1]['variable']) && $stackVars[$i - 1]['variable'] instanceof \Magento\Framework\DataObject ) { // If object calling methods or getting properties @@ -333,8 +332,7 @@ protected function getVariable($value, $default = '{no_value_defined}') ); } elseif ($stackVars[$i]['type'] == 'method') { // Calling of object method - if ( - method_exists($stackVars[$i - 1]['variable'], $stackVars[$i]['name']) + if (method_exists($stackVars[$i - 1]['variable'], $stackVars[$i]['name']) || substr($stackVars[$i]['name'], 0, 3) == 'get' ) { $stackVars[$i]['args'] = $this->getStackArgs($stackVars[$i]['args']); diff --git a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Request.php b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Request.php index ce97f5d4dfc07..66aafd11f7279 100644 --- a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Request.php +++ b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Request.php @@ -430,7 +430,6 @@ private function getSslOffloadHeader() { // Lets read from db only one time okay. if ($this->sslOffloadHeader === null) { - // @todo: Untangle Config dependence on Scope, so that this class can be instantiated even if app is not // installed MAGETWO-31756 // Check if a proxy sent a header indicating an initial secure request @@ -727,7 +726,7 @@ public function getClientIp($checkProxy = true) { if ($checkProxy && $this->getServer('HTTP_CLIENT_IP') != null) { $ip = $this->getServer('HTTP_CLIENT_IP'); - } else if ($checkProxy && $this->getServer('HTTP_X_FORWARDED_FOR') != null) { + } elseif ($checkProxy && $this->getServer('HTTP_X_FORWARDED_FOR') != null) { $ip = $this->getServer('HTTP_X_FORWARDED_FOR'); } else { $ip = $this->getServer('REMOTE_ADDR'); diff --git a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php index 75fe57c923af7..460d4cec62163 100644 --- a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php +++ b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php @@ -99,7 +99,7 @@ public function clearHeader($name) /** * Remove all headers - * + * * @return $this */ public function clearHeaders() diff --git a/lib/internal/Magento/Framework/Interception/ObjectManager/Config/Compiled.php b/lib/internal/Magento/Framework/Interception/ObjectManager/Config/Compiled.php index 0c3940bbc7e7f..657ee641b4b30 100644 --- a/lib/internal/Magento/Framework/Interception/ObjectManager/Config/Compiled.php +++ b/lib/internal/Magento/Framework/Interception/ObjectManager/Config/Compiled.php @@ -1,7 +1,7 @@ filterCustomAttributes($key); - } else if ($key == self::CUSTOM_ATTRIBUTES) { + } elseif ($key == self::CUSTOM_ATTRIBUTES) { $filteredData = $this->filterCustomAttributes([self::CUSTOM_ATTRIBUTES => $value]); $value = $filteredData[self::CUSTOM_ATTRIBUTES]; } diff --git a/lib/internal/Magento/Framework/Model/ResourceModel/Db/CreateEntityRow.php b/lib/internal/Magento/Framework/Model/ResourceModel/Db/CreateEntityRow.php index cde1352f48101..8dc0120418ac9 100755 --- a/lib/internal/Magento/Framework/Model/ResourceModel/Db/CreateEntityRow.php +++ b/lib/internal/Magento/Framework/Model/ResourceModel/Db/CreateEntityRow.php @@ -36,7 +36,6 @@ protected function prepareData(EntityMetadata $metadata, $data) { $output = []; foreach ($metadata->getEntityConnection()->describeTable($metadata->getEntityTable()) as $column) { - if ($column['DEFAULT'] == 'CURRENT_TIMESTAMP' /*|| $column['IDENTITY']*/) { continue; } diff --git a/lib/internal/Magento/Framework/Model/ResourceModel/Db/UpdateEntityRow.php b/lib/internal/Magento/Framework/Model/ResourceModel/Db/UpdateEntityRow.php index baa98f6596e55..7f11469fbfb8d 100755 --- a/lib/internal/Magento/Framework/Model/ResourceModel/Db/UpdateEntityRow.php +++ b/lib/internal/Magento/Framework/Model/ResourceModel/Db/UpdateEntityRow.php @@ -37,7 +37,6 @@ protected function prepareData(EntityMetadata $metadata, $data) { $output = []; foreach ($metadata->getEntityConnection()->describeTable($metadata->getEntityTable()) as $column) { - if ($column['DEFAULT'] == 'CURRENT_TIMESTAMP' || $column['IDENTITY']) { continue; } diff --git a/lib/internal/Magento/Framework/Model/Test/Unit/AbstractModelTest.php b/lib/internal/Magento/Framework/Model/Test/Unit/AbstractModelTest.php index 19f93565b4b05..6b8f0a1a8bc2f 100644 --- a/lib/internal/Magento/Framework/Model/Test/Unit/AbstractModelTest.php +++ b/lib/internal/Magento/Framework/Model/Test/Unit/AbstractModelTest.php @@ -92,7 +92,6 @@ protected function setUp() $this->resourceMock->expects($this->any()) ->method('getConnection') ->will($this->returnValue($this->connectionMock)); - } public function testDelete() diff --git a/lib/internal/Magento/Framework/Module/DependencyChecker.php b/lib/internal/Magento/Framework/Module/DependencyChecker.php index 7dfa8e16565c4..7ce8ccc45ae9d 100644 --- a/lib/internal/Magento/Framework/Module/DependencyChecker.php +++ b/lib/internal/Magento/Framework/Module/DependencyChecker.php @@ -106,7 +106,7 @@ private function checkDependencyGraph($isEnable, $moduleNames, $enabledModules) if (isset($paths[$module])) { if ($isEnable && !in_array($module, $enabledModules)) { $dependenciesMissing[$module] = $paths[$module]; - } else if (!$isEnable && in_array($module, $enabledModules)) { + } elseif (!$isEnable && in_array($module, $enabledModules)) { $dependenciesMissing[$module] = array_reverse($paths[$module]); } } diff --git a/lib/internal/Magento/Framework/Module/Status.php b/lib/internal/Magento/Framework/Module/Status.php index 07db5347c564d..f4ae5400321c6 100644 --- a/lib/internal/Magento/Framework/Module/Status.php +++ b/lib/internal/Magento/Framework/Module/Status.php @@ -81,7 +81,7 @@ public function __construct( * @param string[] $modulesToBeChanged * @param string[] $currentlyEnabledModules * @param bool $prettyMessage - * + * * @return string[] */ public function checkConstraints( diff --git a/lib/internal/Magento/Framework/ObjectManager/Config/Compiled.php b/lib/internal/Magento/Framework/ObjectManager/Config/Compiled.php index 7cce20381d717..b21894b78144f 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Config/Compiled.php +++ b/lib/internal/Magento/Framework/ObjectManager/Config/Compiled.php @@ -85,7 +85,7 @@ public function getArguments($type) if (array_key_exists($type, $this->arguments)) { if (is_string($this->arguments[$type])) { $this->arguments[$type] = $this->getSerializer()->unserialize($this->arguments[$type]); - } else if ($this->arguments[$type] === null) { + } elseif ($this->arguments[$type] === null) { $this->arguments[$type] = []; } return $this->arguments[$type]; diff --git a/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php b/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php index 9266bf2d2b5f5..44ecdc9471794 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php +++ b/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php @@ -145,15 +145,14 @@ protected function resolveArgument(&$argument, $paramType, $paramDefault, $param } else { $argument = $this->objectManager->create($argumentType); } - - } else if ($argument === (array)$argument) { + } elseif ($argument === (array)$argument) { if (isset($argument['argument'])) { if (isset($this->globalArguments[$argument['argument']])) { $argument = $this->globalArguments[$argument['argument']]; } else { $argument = $paramDefault; } - } else if (!empty($argument)) { + } elseif (!empty($argument)) { $this->parseArray($argument); } } @@ -182,7 +181,6 @@ protected function parseArray(&$array) } else { $array[$key] = $this->objectManager->create($item['instance']); } - } elseif (isset($item['argument'])) { if (isset($this->globalArguments[$item['argument']])) { $array[$key] = $this->globalArguments[$item['argument']]; diff --git a/lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php b/lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php index 845a2e60c5494..3f51ecc4c381c 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php +++ b/lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php @@ -58,7 +58,7 @@ public function create($requestedType, array $arguments = []) if ($args === []) { // Case 1: no arguments required return new $type(); - } else if ($args !== null) { + } elseif ($args !== null) { /** * Case 2: arguments retrieved from pre-compiled DI cache * diff --git a/lib/internal/Magento/Framework/ObjectManager/TMap.php b/lib/internal/Magento/Framework/ObjectManager/TMap.php index f644437cbcc29..3a56133f02ad5 100644 --- a/lib/internal/Magento/Framework/ObjectManager/TMap.php +++ b/lib/internal/Magento/Framework/ObjectManager/TMap.php @@ -98,8 +98,7 @@ private function assertValidTypeLazy($instanceName, $index = null) $this->configInterface->getPreference($instanceName) ); - if ( - !in_array( + if (!in_array( $this->type, array_unique(array_merge(class_parents($realType), class_implements($realType))), true diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/SchemaLocatorTest.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/SchemaLocatorTest.php index 74926c27b4e0d..529a10a4d8de1 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/SchemaLocatorTest.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/SchemaLocatorTest.php @@ -26,7 +26,6 @@ protected function setUp() $property = new \ReflectionProperty($this->model, 'urnResolver'); $property->setAccessible(true); $property->setValue($this->model, $this->urnResolverMock); - } public function testGetSchema() diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/Price/Stub.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/Price/Stub.php index 85d39cb1e605a..6d51cc09a8565 100644 --- a/lib/internal/Magento/Framework/Pricing/Test/Unit/Price/Stub.php +++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/Price/Stub.php @@ -6,7 +6,8 @@ namespace Magento\Framework\Pricing\Test\Unit\Price; -use Magento\Framework\Pricing\Price\AbstractPrice; +use Magento\Framework\Pricing\Price\AbstractPrice; + /** * Class Stub for testing abstract class AbstractPrice * diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/PriceBoxTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/PriceBoxTest.php index 0cad2180727e6..25394e7ceef3b 100644 --- a/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/PriceBoxTest.php +++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/PriceBoxTest.php @@ -133,7 +133,7 @@ public function toHtmlDataProvider() 'data' => ['css_classes' => 'some_css_class'], 'price_code' => 'test_price', 'css_classes' => 'some_css_class price-test_price' - ]]; + ]]; } public function testGetSaleableItem() diff --git a/lib/internal/Magento/Framework/Reflection/TypeProcessor.php b/lib/internal/Magento/Framework/Reflection/TypeProcessor.php index 5c431ac9c6892..376edbb072b27 100644 --- a/lib/internal/Magento/Framework/Reflection/TypeProcessor.php +++ b/lib/internal/Magento/Framework/Reflection/TypeProcessor.php @@ -259,7 +259,7 @@ public function getDescription(DocBlockReflection $doc) * * @param string $getterName * @return string - * + * * @deprecated */ public function dataObjectGetterNameToFieldName($getterName) @@ -592,8 +592,8 @@ public function getParamDescription(ParameterReflection $param) * @param string $camelCaseProperty * @return string processed method name * @throws \Exception If $camelCaseProperty has no corresponding getter method - * - * @deprecated + * + * @deprecated */ public function findGetterMethodName(ClassReflection $class, $camelCaseProperty) { @@ -630,8 +630,8 @@ protected function setType(&$value, $type) * @param string $camelCaseProperty * @return string processed method name * @throws \Exception If $camelCaseProperty has no corresponding setter method - * - * @deprecated + * + * @deprecated */ public function findSetterMethodName(ClassReflection $class, $camelCaseProperty) { @@ -647,8 +647,8 @@ public function findSetterMethodName(ClassReflection $class, $camelCaseProperty) * @param bool $boolAccessorName * @return string processed method name * @throws \Exception If $camelCaseProperty has no corresponding setter method - * - * @deprecated + * + * @deprecated */ protected function findAccessorMethodName( ClassReflection $class, @@ -668,8 +668,8 @@ protected function findAccessorMethodName( * @param ClassReflection $class * @param string $methodName * @return bool - * - * @deprecated + * + * @deprecated */ protected function classHasMethod(ClassReflection $class, $methodName) { diff --git a/lib/internal/Magento/Framework/Setup/SampleData/State.php b/lib/internal/Magento/Framework/Setup/SampleData/State.php index 1cc3d98a439c5..e24f527be4e84 100644 --- a/lib/internal/Magento/Framework/Setup/SampleData/State.php +++ b/lib/internal/Magento/Framework/Setup/SampleData/State.php @@ -123,7 +123,6 @@ protected function openStream($mode = 'w') $stream = $directoryWrite->openFile($fileName, $mode); } return $stream; - } /** diff --git a/lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/DateTimeFormatterTest.php b/lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/DateTimeFormatterTest.php index bf10923950274..7f8ab37995275 100644 --- a/lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/DateTimeFormatterTest.php +++ b/lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/DateTimeFormatterTest.php @@ -31,7 +31,6 @@ protected function setUp() $this->localeResolverMock->expects($this->any()) ->method('getLocale') ->willReturn('fr-FR'); - } /** diff --git a/lib/internal/Magento/Framework/Test/Unit/App/ResourceConnectionTest.php b/lib/internal/Magento/Framework/Test/Unit/App/ResourceConnectionTest.php index 716cbed2f577d..57a05fc00cba6 100644 --- a/lib/internal/Magento/Framework/Test/Unit/App/ResourceConnectionTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/App/ResourceConnectionTest.php @@ -92,6 +92,5 @@ public function testCloseConnection() $this->configMock->expects(self::once())->method('getConnectionName')->with('default'); $this->unit->closeConnection('default'); - } } diff --git a/lib/internal/Magento/Framework/TestFramework/Unit/Autoloader/ExtensionGeneratorAutoloader.php b/lib/internal/Magento/Framework/TestFramework/Unit/Autoloader/ExtensionGeneratorAutoloader.php index 9f8cb85b76ecd..e166f29d3fa62 100644 --- a/lib/internal/Magento/Framework/TestFramework/Unit/Autoloader/ExtensionGeneratorAutoloader.php +++ b/lib/internal/Magento/Framework/TestFramework/Unit/Autoloader/ExtensionGeneratorAutoloader.php @@ -57,7 +57,7 @@ public function load($className) if ($this->isExtension($className)) { $content = "namespace $namespace;\n\nclass $justTypeName implements " . "{$justTypeName}Interface\n{\n\n}"; - } else if ($this->isExtensionInterface($className)) { + } elseif ($this->isExtensionInterface($className)) { $content = "namespace $namespace;\n\ninterface $justTypeName extends " . "\\Magento\\Framework\\Api\\ExtensionAttributesInterface \n{\n\n}"; } diff --git a/lib/internal/Magento/Framework/View/Asset/LockerProcess.php b/lib/internal/Magento/Framework/View/Asset/LockerProcess.php index baedbf5f37702..d28a169a6caf8 100644 --- a/lib/internal/Magento/Framework/View/Asset/LockerProcess.php +++ b/lib/internal/Magento/Framework/View/Asset/LockerProcess.php @@ -105,7 +105,6 @@ private function isProcessLocked() return false; } } catch (FileSystemException $e) { - return false; } diff --git a/lib/internal/Magento/Framework/View/Asset/Minification.php b/lib/internal/Magento/Framework/View/Asset/Minification.php index dcf9b8f66e997..c6c93f6d035a4 100644 --- a/lib/internal/Magento/Framework/View/Asset/Minification.php +++ b/lib/internal/Magento/Framework/View/Asset/Minification.php @@ -79,8 +79,7 @@ public function addMinifiedSign($filename) { $extension = pathinfo($filename, PATHINFO_EXTENSION); - if ( - $this->isEnabled($extension) && + if ($this->isEnabled($extension) && !$this->isExcluded($filename) && !$this->isMinifiedFilename($filename) ) { @@ -99,8 +98,7 @@ public function removeMinifiedSign($filename) { $extension = pathinfo($filename, PATHINFO_EXTENSION); - if ( - $this->isEnabled($extension) && + if ($this->isEnabled($extension) && !$this->isExcluded($filename) && $this->isMinifiedFilename($filename) ) { diff --git a/lib/internal/Magento/Framework/View/Asset/PreProcessor/Chain.php b/lib/internal/Magento/Framework/View/Asset/PreProcessor/Chain.php index 220ff3fb736b6..6f6434906ea7e 100644 --- a/lib/internal/Magento/Framework/View/Asset/PreProcessor/Chain.php +++ b/lib/internal/Magento/Framework/View/Asset/PreProcessor/Chain.php @@ -188,7 +188,6 @@ public function assertValid() { if ($this->contentType !== $this->targetContentType && empty($this->compatibleTypes[$this->targetContentType][$this->contentType])) { - throw new \LogicException( "The requested asset type was '{$this->targetContentType}', but ended up with '{$this->contentType}'" ); diff --git a/lib/internal/Magento/Framework/View/Asset/PreProcessor/Minify.php b/lib/internal/Magento/Framework/View/Asset/PreProcessor/Minify.php index af93667b0ad95..967db443b9140 100644 --- a/lib/internal/Magento/Framework/View/Asset/PreProcessor/Minify.php +++ b/lib/internal/Magento/Framework/View/Asset/PreProcessor/Minify.php @@ -43,8 +43,7 @@ public function __construct(AdapterInterface $adapter, Minification $minificatio */ public function process(PreProcessor\Chain $chain) { - if ( - $this->minification->isEnabled(pathinfo($chain->getTargetAssetPath(), PATHINFO_EXTENSION)) && + if ($this->minification->isEnabled(pathinfo($chain->getTargetAssetPath(), PATHINFO_EXTENSION)) && $this->minification->isMinifiedFilename($chain->getTargetAssetPath()) && !$this->minification->isMinifiedFilename($chain->getOrigAssetPath()) ) { diff --git a/lib/internal/Magento/Framework/View/Element/Message/MessageConfigurationsPool.php b/lib/internal/Magento/Framework/View/Element/Message/MessageConfigurationsPool.php index bb22a0b6c0ca1..3309c37a9f9f7 100644 --- a/lib/internal/Magento/Framework/View/Element/Message/MessageConfigurationsPool.php +++ b/lib/internal/Magento/Framework/View/Element/Message/MessageConfigurationsPool.php @@ -24,15 +24,13 @@ public function __construct( array_walk( $configurationsMap, function (array &$configuration) { - if ( - !isset($configuration['renderer']) + if (!isset($configuration['renderer']) || !is_string($configuration['renderer']) ) { throw new \InvalidArgumentException('Renderer should be defined.'); } - if ( - isset($configuration['data']) + if (isset($configuration['data']) && !is_array($configuration['data']) ) { throw new \InvalidArgumentException('Data should be of array type.'); diff --git a/lib/internal/Magento/Framework/View/Element/UiComponent/Config/DomMerger.php b/lib/internal/Magento/Framework/View/Element/UiComponent/Config/DomMerger.php index 0abc05b776d1f..cd0eee3b5031f 100644 --- a/lib/internal/Magento/Framework/View/Element/UiComponent/Config/DomMerger.php +++ b/lib/internal/Magento/Framework/View/Element/UiComponent/Config/DomMerger.php @@ -208,7 +208,7 @@ protected function nestedMerge(\DOMXPath $rootDomXPath, \DOMNodeList $insertedNo if ($this->isMergeContext($insertedXPath)) { if ($this->isTextNode($insertedItem) && $this->isTextNode($rootItem)) { $rootItem->nodeValue = $insertedItem->nodeValue; - } else if (!$this->isContextXPath([$rootItemXPath, $insertedXPath]) + } elseif (!$this->isContextXPath([$rootItemXPath, $insertedXPath]) && !$this->hasIdAttribute($rootItem) && !$this->hasIdAttribute($insertedItem) ) { diff --git a/lib/internal/Magento/Framework/View/Element/UiComponent/Context.php b/lib/internal/Magento/Framework/View/Element/UiComponent/Context.php index 8f0e6bb333adb..18faf583bfa6c 100644 --- a/lib/internal/Magento/Framework/View/Element/UiComponent/Context.php +++ b/lib/internal/Magento/Framework/View/Element/UiComponent/Context.php @@ -323,9 +323,9 @@ protected function setAcceptType() $rawAcceptType = $this->request->getHeader('Accept'); if (strpos($rawAcceptType, 'json') !== false) { $this->acceptType = 'json'; - } else if (strpos($rawAcceptType, 'html') !== false) { + } elseif (strpos($rawAcceptType, 'html') !== false) { $this->acceptType = 'html'; - } else if (strpos($rawAcceptType, 'xml') !== false) { + } elseif (strpos($rawAcceptType, 'xml') !== false) { $this->acceptType = 'xml'; } } diff --git a/lib/internal/Magento/Framework/View/Layout.php b/lib/internal/Magento/Framework/View/Layout.php index 07396304c1959..e64b9553f721e 100755 --- a/lib/internal/Magento/Framework/View/Layout.php +++ b/lib/internal/Magento/Framework/View/Layout.php @@ -512,7 +512,6 @@ protected function displayElement($name) $display = $this->structure->getAttribute($name, 'display'); if ($display === '' || $display === false || $display === null || filter_var($display, FILTER_VALIDATE_BOOLEAN)) { - return true; } return false; diff --git a/lib/internal/Magento/Framework/View/Layout/GeneratorPool.php b/lib/internal/Magento/Framework/View/Layout/GeneratorPool.php index 6abbd9cd2afdd..6d9f7aa20b2c6 100644 --- a/lib/internal/Magento/Framework/View/Layout/GeneratorPool.php +++ b/lib/internal/Magento/Framework/View/Layout/GeneratorPool.php @@ -155,8 +155,7 @@ protected function reorderElements( $element[ScheduledStructure::ELEMENT_OFFSET_OR_SIBLING] ); - if ( - isset($siblingElement[ScheduledStructure::ELEMENT_NAME]) + if (isset($siblingElement[ScheduledStructure::ELEMENT_NAME]) && $structure->hasElement($siblingElement[ScheduledStructure::ELEMENT_NAME]) ) { $this->reorderElements( diff --git a/lib/internal/Magento/Framework/View/Page/Config/Renderer.php b/lib/internal/Magento/Framework/View/Page/Config/Renderer.php index bcfe27fa3e065..ffd3b72adb508 100644 --- a/lib/internal/Magento/Framework/View/Page/Config/Renderer.php +++ b/lib/internal/Magento/Framework/View/Page/Config/Renderer.php @@ -361,7 +361,7 @@ protected function renderAssetHtml(\Magento\Framework\View\Asset\PropertyGroup $ /** * Get asset content type - * + * * @param \Magento\Framework\View\Asset\AssetInterface $asset * @return string */ diff --git a/lib/internal/Magento/Framework/View/TemplateEngine/Xhtml/Compiler.php b/lib/internal/Magento/Framework/View/TemplateEngine/Xhtml/Compiler.php index 7fa2ed26dc8d1..50cde656c62fa 100644 --- a/lib/internal/Magento/Framework/View/TemplateEngine/Xhtml/Compiler.php +++ b/lib/internal/Magento/Framework/View/TemplateEngine/Xhtml/Compiler.php @@ -102,7 +102,7 @@ public function compile(\DOMNode $node, DataObject $processedObject, DataObject $compiler = $this->getElementCompiler($node->nodeName); if (null !== $compiler) { $compiler->compile($this, $node, $processedObject, $context); - } else if ($node->hasChildNodes()) { + } elseif ($node->hasChildNodes()) { foreach ($this->getChildNodes($node) as $child) { $this->compile($child, $processedObject, $context); } diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MinificationTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MinificationTest.php index 61fa39847a02a..7fd6976b71032 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MinificationTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MinificationTest.php @@ -53,7 +53,6 @@ protected function setUp() */ public function testIsEnabled() { - } /** diff --git a/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php b/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php index f4fee9a6e0123..0d2b759e02e97 100644 --- a/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php +++ b/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php @@ -165,8 +165,7 @@ public function maskException(\Exception $exception) */ public function renderException(\Exception $exception, $httpCode = self::DEFAULT_ERROR_HTTP_CODE) { - if ( - $this->_appState->getMode() == State::MODE_DEVELOPER || + if ($this->_appState->getMode() == State::MODE_DEVELOPER || $exception instanceof \Magento\Framework\Webapi\Exception ) { $this->renderErrorMessage($exception->getMessage(), $exception->getTraceAsString(), $httpCode); diff --git a/lib/internal/Magento/Framework/Webapi/Rest/Request.php b/lib/internal/Magento/Framework/Webapi/Rest/Request.php index 1e911bbd729cf..8c7a86e40c9e3 100644 --- a/lib/internal/Magento/Framework/Webapi/Rest/Request.php +++ b/lib/internal/Magento/Framework/Webapi/Rest/Request.php @@ -130,7 +130,6 @@ public function getBodyParams() if ($this->getContent()) { $this->_bodyParams = (array)$this->_getDeserializer()->deserialize((string)$this->getContent()); } - } return $this->_bodyParams; } diff --git a/lib/internal/Magento/Framework/Webapi/Rest/Request/ParamOverriderInterface.php b/lib/internal/Magento/Framework/Webapi/Rest/Request/ParamOverriderInterface.php index c2346f7c7ce19..96b196b7ec9d5 100644 --- a/lib/internal/Magento/Framework/Webapi/Rest/Request/ParamOverriderInterface.php +++ b/lib/internal/Magento/Framework/Webapi/Rest/Request/ParamOverriderInterface.php @@ -15,7 +15,7 @@ * invoked could have a signature of "getAddresses($customerId)", but in the webapi.xml, the $customerId parameter * would be forced to be the customer id of the current authenticated user. * - * The forced override parameter configuration is in the webapi.xml. + * The forced override parameter configuration is in the webapi.xml. * * * %customer_id% diff --git a/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php b/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php index 89629767649c9..3e88ffa294e6f 100644 --- a/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php +++ b/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php @@ -258,9 +258,9 @@ private function processCustomAttribute($customAttribute) if (!$customAttributeCode && !isset($customAttribute[AttributeValue::VALUE])) { throw new SerializationException(new Phrase('There is an empty custom attribute specified.')); - } else if (!$customAttributeCode) { + } elseif (!$customAttributeCode) { throw new SerializationException(new Phrase('A custom attribute is specified without an attribute code.')); - } else if (!isset($customAttribute[AttributeValue::VALUE])) { + } elseif (!isset($customAttribute[AttributeValue::VALUE])) { throw new SerializationException( new Phrase('Value is not set for attribute code "' . $customAttributeCode . '"') ); diff --git a/lib/internal/Magento/Framework/Xml/Parser.php b/lib/internal/Magento/Framework/Xml/Parser.php index 3cf4366b49c11..fc884a01c2164 100644 --- a/lib/internal/Magento/Framework/Xml/Parser.php +++ b/lib/internal/Magento/Framework/Xml/Parser.php @@ -111,8 +111,7 @@ protected function _xmlToArray($currentNode = false) $value = ['_value' => $value, '_attribute' => $attributes]; } if (isset($content[$node->nodeName])) { - if ( - (is_string($content[$node->nodeName]) || !isset($content[$node->nodeName][0])) + if ((is_string($content[$node->nodeName]) || !isset($content[$node->nodeName][0])) || (is_array($value) && !is_array($content[$node->nodeName][0])) ) { $oldValue = $content[$node->nodeName]; diff --git a/phpserver/router.php b/phpserver/router.php index 6ca224a1788f4..09adb95ae3cf0 100644 --- a/phpserver/router.php +++ b/phpserver/router.php @@ -39,7 +39,6 @@ */ if (php_sapi_name() === 'cli-server') { - $debug($_SERVER["REQUEST_URI"]); if (preg_match('/^\/(index|get|static)\.php(\/)?/', $_SERVER["REQUEST_URI"])) { return false; // serve the requested resource as-is. @@ -65,8 +64,7 @@ $debug($route); - if ( - strpos($route, 'media/') === 0 || + if (strpos($route, 'media/') === 0 || strpos($route, 'opt/') === 0 || strpos($route, 'static/') === 0 || strpos($route, 'errors/default/css/') === 0 || diff --git a/pub/cron.php b/pub/cron.php index 6fd1f98fa3b12..225f496ed9563 100644 --- a/pub/cron.php +++ b/pub/cron.php @@ -11,7 +11,7 @@ require dirname(__DIR__) . '/app/bootstrap.php'; -if (php_sapi_name() === 'cli'){ +if (php_sapi_name() === 'cli') { echo "You cannot run this from the command line." . PHP_EOL . "Run \"php bin/magento cron:run\" instead." . PHP_EOL; exit(1); diff --git a/pub/errors/processor.php b/pub/errors/processor.php index 8779e09a7a2f1..bbbc7ae4ef3ce 100644 --- a/pub/errors/processor.php +++ b/pub/errors/processor.php @@ -4,6 +4,7 @@ * See COPYING.txt for license details. */ namespace Magento\Framework\Error; + use Magento\Framework\Filesystem\DriverInterface; /** diff --git a/pub/health_check.php b/pub/health_check.php index aa5757cfb2c67..ea37922389667 100644 --- a/pub/health_check.php +++ b/pub/health_check.php @@ -70,7 +70,7 @@ function fatalErrorHandler() { $error = error_get_last(); - if ($error !== NULL) { + if ($error !== null) { http_response_code(500); } } diff --git a/setup/src/Magento/Setup/Console/Command/DependenciesShowFrameworkCommand.php b/setup/src/Magento/Setup/Console/Command/DependenciesShowFrameworkCommand.php index 805f43949f552..5997fdac080bf 100644 --- a/setup/src/Magento/Setup/Console/Command/DependenciesShowFrameworkCommand.php +++ b/setup/src/Magento/Setup/Console/Command/DependenciesShowFrameworkCommand.php @@ -24,7 +24,7 @@ class DependenciesShowFrameworkCommand extends AbstractDependenciesCommand /** * Constructor - * + * * @param ComponentRegistrarInterface $registrar * @param ObjectManagerProvider $objectManagerProvider */ diff --git a/setup/src/Magento/Setup/Console/Command/InfoLanguageListCommand.php b/setup/src/Magento/Setup/Console/Command/InfoLanguageListCommand.php index 74181bdbb05f3..2211bc905334d 100644 --- a/setup/src/Magento/Setup/Console/Command/InfoLanguageListCommand.php +++ b/setup/src/Magento/Setup/Console/Command/InfoLanguageListCommand.php @@ -56,6 +56,5 @@ protected function execute(InputInterface $input, OutputInterface $output) } $table->render($output); - } } diff --git a/setup/src/Magento/Setup/Console/Command/RollbackCommand.php b/setup/src/Magento/Setup/Console/Command/RollbackCommand.php index bc675cc095698..218d025d5ae2f 100644 --- a/setup/src/Magento/Setup/Console/Command/RollbackCommand.php +++ b/setup/src/Magento/Setup/Console/Command/RollbackCommand.php @@ -129,7 +129,6 @@ protected function execute(InputInterface $input, OutputInterface $output) } $this->doRollback($input, $output); $output->writeln('Please set file permission of bin/magento to executable'); - } catch (\Exception $e) { $output->writeln('' . $e->getMessage() . ''); // we must have an exit code higher than zero to indicate something was wrong diff --git a/setup/src/Magento/Setup/Controller/DataOption.php b/setup/src/Magento/Setup/Controller/DataOption.php index 43a1d472ef24e..34ac13fad6b25 100644 --- a/setup/src/Magento/Setup/Controller/DataOption.php +++ b/setup/src/Magento/Setup/Controller/DataOption.php @@ -24,7 +24,7 @@ class DataOption extends AbstractActionController /** * Constructor - * + * * @param UninstallCollector $uninstallCollector */ public function __construct(UninstallCollector $uninstallCollector) diff --git a/setup/src/Magento/Setup/Controller/DependencyCheck.php b/setup/src/Magento/Setup/Controller/DependencyCheck.php index 5e81fadaa9438..b4439dd0b15e1 100644 --- a/setup/src/Magento/Setup/Controller/DependencyCheck.php +++ b/setup/src/Magento/Setup/Controller/DependencyCheck.php @@ -147,7 +147,6 @@ public function enableDisableDependencyCheckAction() . implode("
", $constraints); $responseType = ResponseTypeInterface::RESPONSE_TYPE_ERROR; } - } catch (\Exception $e) { $responseType = ResponseTypeInterface::RESPONSE_TYPE_ERROR; $data['errorMessage'] = $e->getMessage(); diff --git a/setup/src/Magento/Setup/Controller/Environment.php b/setup/src/Magento/Setup/Controller/Environment.php index 0f5d8f9163797..84d67549eb2da 100644 --- a/setup/src/Magento/Setup/Controller/Environment.php +++ b/setup/src/Magento/Setup/Controller/Environment.php @@ -223,7 +223,6 @@ public function cronScriptAction() if (!$updaterCheck['success']) { $responseType = ResponseTypeInterface::RESPONSE_TYPE_ERROR; $data['updaterErrorMessage'] = 'Error from Updater Application Cron Script:
' . $updaterCheck['error']; - } if (isset($setupCheck['notice'])) { $data['setupNoticeMessage'] = 'Notice from Setup Application Cron Script:
' . $setupCheck['notice']; diff --git a/setup/src/Magento/Setup/Controller/Session.php b/setup/src/Magento/Setup/Controller/Session.php index dde08e2cc0039..59262f10c0942 100644 --- a/setup/src/Magento/Setup/Controller/Session.php +++ b/setup/src/Magento/Setup/Controller/Session.php @@ -31,7 +31,7 @@ public function __construct( /** * No index action, return 404 error page - * + * * @return \Zend\View\Model\ViewModel|\Zend\Http\Response */ public function indexAction() diff --git a/setup/src/Magento/Setup/Fixtures/CatalogPriceRulesFixture.php b/setup/src/Magento/Setup/Fixtures/CatalogPriceRulesFixture.php index b6c8f892a2a7b..17f034cfd58e2 100644 --- a/setup/src/Magento/Setup/Fixtures/CatalogPriceRulesFixture.php +++ b/setup/src/Magento/Setup/Fixtures/CatalogPriceRulesFixture.php @@ -132,7 +132,6 @@ public function execute() $model->setUseAutoGeneration($useAutoGeneration); $model->save(); } - } /** diff --git a/setup/src/Magento/Setup/Fixtures/OrdersFixture.php b/setup/src/Magento/Setup/Fixtures/OrdersFixture.php index 5d7ddb5b31c40..a3ca2b5f9a4a3 100644 --- a/setup/src/Magento/Setup/Fixtures/OrdersFixture.php +++ b/setup/src/Magento/Setup/Fixtures/OrdersFixture.php @@ -247,7 +247,6 @@ public function execute() ]), $productsResult ]; - } $productStoreId = function ($index) use ($result) { @@ -657,7 +656,6 @@ private function prepareConfigurableProducts(array $productIds = []) 'order' => $this->serializer->serialize($simpleBuyRequest), 'quote' => $this->serializer->serialize($quoteSimpleBuyRequest), ]; - } return $productsResult; } diff --git a/setup/src/Magento/Setup/Fixtures/StoresFixture.php b/setup/src/Magento/Setup/Fixtures/StoresFixture.php index 4103fdcafd534..df227b3c3312e 100644 --- a/setup/src/Magento/Setup/Fixtures/StoresFixture.php +++ b/setup/src/Magento/Setup/Fixtures/StoresFixture.php @@ -185,8 +185,7 @@ public function execute() $this->storesCount = $this->fixtureModel->getValue('store_views', self::DEFAULT_STORE_VIEW_COUNT); $this->singleRootCategory = (bool)$this->fixtureModel->getValue('assign_entities_to_all_websites', false); - if ( - $this->websitesCount <= self::DEFAULT_WEBSITE_COUNT + if ($this->websitesCount <= self::DEFAULT_WEBSITE_COUNT && $this->storeGroupsCount <= self::DEFAULT_STORE_COUNT && $this->storesCount <= self::DEFAULT_STORE_VIEW_COUNT ) { diff --git a/setup/src/Magento/Setup/Fixtures/TaxRatesFixture.php b/setup/src/Magento/Setup/Fixtures/TaxRatesFixture.php index baa5209ab952c..b4541b4da04d2 100644 --- a/setup/src/Magento/Setup/Fixtures/TaxRatesFixture.php +++ b/setup/src/Magento/Setup/Fixtures/TaxRatesFixture.php @@ -53,7 +53,6 @@ public function execute() $importHandler = $this->fixtureModel->getObjectManager() ->create(\Magento\TaxImportExport\Model\Rate\CsvImportHandler::class); $importHandler->importFromCsvFile($file); - } /** diff --git a/setup/src/Magento/Setup/Model/ConfigOptionsList.php b/setup/src/Magento/Setup/Model/ConfigOptionsList.php index f6571010008f4..2b0bcfeb778fc 100644 --- a/setup/src/Magento/Setup/Model/ConfigOptionsList.php +++ b/setup/src/Magento/Setup/Model/ConfigOptionsList.php @@ -335,7 +335,6 @@ private function validateDbSettings(array $options, DeploymentConfig $deployment || $options[ConfigOptionsListConstants::INPUT_KEY_DB_PASSWORD] !== null ) { try { - $options = $this->getDbSettings($options, $deploymentConfig); $this->dbValidator->checkDatabaseConnection( diff --git a/setup/src/Magento/Setup/Model/Cron/JobModule.php b/setup/src/Magento/Setup/Model/Cron/JobModule.php index a6b86551b0d76..a7c4b371647cc 100644 --- a/setup/src/Magento/Setup/Model/Cron/JobModule.php +++ b/setup/src/Magento/Setup/Model/Cron/JobModule.php @@ -90,7 +90,6 @@ public function execute() //perform the generated file cleanup $this->performCleanup(); - } catch (\Exception $e) { $this->status->toggleUpdateError(true); throw new \RuntimeException( diff --git a/setup/src/Magento/Setup/Model/Cron/Status.php b/setup/src/Magento/Setup/Model/Cron/Status.php index ea74b88af9cc0..2190a3c6662a4 100644 --- a/setup/src/Magento/Setup/Model/Cron/Status.php +++ b/setup/src/Magento/Setup/Model/Cron/Status.php @@ -215,7 +215,7 @@ protected function setFlagValue($pathToFlagFile, $value) } catch (FileSystemException $e) { throw new \RuntimeException(sprintf('"%s" cannot be created.', $pathToFlagFile)); } - } else if ($this->varReaderWriter->isExist($pathToFlagFile)) { + } elseif ($this->varReaderWriter->isExist($pathToFlagFile)) { $this->varReaderWriter->delete($pathToFlagFile); } return $this; diff --git a/setup/src/Magento/Setup/Model/Grid/Extension.php b/setup/src/Magento/Setup/Model/Grid/Extension.php index 8bb8ff8d22e51..6554461752f31 100644 --- a/setup/src/Magento/Setup/Model/Grid/Extension.php +++ b/setup/src/Magento/Setup/Model/Grid/Extension.php @@ -48,8 +48,7 @@ public function getList() foreach ($extensions as &$extension) { $extension['update'] = array_key_exists($extension['name'], $packagesForUpdate); $extension['uninstall'] = true; - if ( - $extension['type'] === ComposerInformation::METAPACKAGE_PACKAGE_TYPE + if ($extension['type'] === ComposerInformation::METAPACKAGE_PACKAGE_TYPE || !$this->composerInformation->isPackageInComposerJson($extension['name']) ) { $extension['uninstall'] = false; diff --git a/setup/src/Magento/Setup/Model/Installer.php b/setup/src/Magento/Setup/Model/Installer.php index 088b40aa4decb..580daec0f9055 100644 --- a/setup/src/Magento/Setup/Model/Installer.php +++ b/setup/src/Magento/Setup/Model/Installer.php @@ -859,7 +859,7 @@ private function handleDBSchemaData($setup, $type) if ($type === 'schema') { $this->log->log('Schema post-updates:'); $handlerType = 'schema-recurring'; - } else if ($type === 'data') { + } elseif ($type === 'data') { $this->log->log('Data post-updates:'); $handlerType = 'data-recurring'; } diff --git a/setup/src/Magento/Setup/Model/PackagesData.php b/setup/src/Magento/Setup/Model/PackagesData.php index 5e776a8f7b9dd..139dc17cdd32b 100644 --- a/setup/src/Magento/Setup/Model/PackagesData.php +++ b/setup/src/Magento/Setup/Model/PackagesData.php @@ -479,8 +479,7 @@ private function getPackageAvailableVersions($package) $magentoRepositories = $this->composerInformation->getRootRepositories(); // Check we have only one repo.magento.com repository - if ( - count($magentoRepositories) === 1 + if (count($magentoRepositories) === 1 && strpos($magentoRepositories[0], $this->packagesAuth->getCredentialBaseUrl()) ) { $packagesJson = $this->getPackagesJson(); diff --git a/setup/src/Magento/Setup/Model/PayloadValidator.php b/setup/src/Magento/Setup/Model/PayloadValidator.php index 6cab630ca7716..144fa564230bd 100644 --- a/setup/src/Magento/Setup/Model/PayloadValidator.php +++ b/setup/src/Magento/Setup/Model/PayloadValidator.php @@ -34,7 +34,7 @@ public function validatePayload(array $postPayload) { $jobType = $postPayload[UpdaterTaskCreator::KEY_POST_JOB_TYPE]; $errorMessage = ''; - switch($jobType) { + switch ($jobType) { case 'uninstall': $errorMessage = $this->validateUninstallPayload($postPayload); break; diff --git a/setup/src/Magento/Setup/Model/PhpReadinessCheck.php b/setup/src/Magento/Setup/Model/PhpReadinessCheck.php index c593059edd4a6..b3c6b821fd571 100644 --- a/setup/src/Magento/Setup/Model/PhpReadinessCheck.php +++ b/setup/src/Magento/Setup/Model/PhpReadinessCheck.php @@ -194,8 +194,7 @@ public function checkMemoryLimit() $currentMemoryInteger = intval($currentMemoryLimit); - if ( - $currentMemoryInteger > 0 + if ($currentMemoryInteger > 0 && $this->dataSize->convertSizeToBytes($currentMemoryLimit) < $this->dataSize->convertSizeToBytes($minimumRequiredMemoryLimit) ) { @@ -209,8 +208,7 @@ public function checkMemoryLimit() $currentMemoryLimit, $minimumRequiredMemoryLimit ); - } elseif ( - $currentMemoryInteger > 0 + } elseif ($currentMemoryInteger > 0 && $this->dataSize->convertSizeToBytes($currentMemoryLimit) < $this->dataSize->convertSizeToBytes($recommendedForUpgradeMemoryLimit) ) { @@ -246,7 +244,6 @@ private function checkXDebugNestedLevel() $currentExtensions = $this->phpInformation->getCurrent(); if (in_array('xdebug', $currentExtensions)) { - $currentXDebugNestingLevel = intval(ini_get('xdebug.max_nesting_level')); $minimumRequiredXDebugNestedLevel = $this->phpInformation->getRequiredMinimumXDebugNestedLevel(); diff --git a/setup/src/Magento/Setup/Model/SearchTermManager.php b/setup/src/Magento/Setup/Model/SearchTermManager.php index 5ca68757c8934..ecdf76cd3073f 100644 --- a/setup/src/Magento/Setup/Model/SearchTermManager.php +++ b/setup/src/Magento/Setup/Model/SearchTermManager.php @@ -53,8 +53,7 @@ public function applySearchTermsToDescription(&$description, $currentProductInde } foreach ($this->searchTerms as &$searchTerm) { - if ( - $this->searchTermsUseRate[$searchTerm['term']]['use_rate'] > 0 + if ($this->searchTermsUseRate[$searchTerm['term']]['use_rate'] > 0 && $currentProductIndex % $this->searchTermsUseRate[$searchTerm['term']]['use_rate'] === 0 && $this->searchTermsUseRate[$searchTerm['term']]['used'] < $searchTerm['count'] ) { diff --git a/setup/src/Magento/Setup/Model/SystemPackage.php b/setup/src/Magento/Setup/Model/SystemPackage.php index 3241cdf13a24c..2f0badec54b25 100755 --- a/setup/src/Magento/Setup/Model/SystemPackage.php +++ b/setup/src/Magento/Setup/Model/SystemPackage.php @@ -97,8 +97,7 @@ public function getPackageVersions() $result = array_merge($this->getAllowedEnterpriseVersions($currentCE), $result); } - if ( - in_array(static::EDITION_ENTERPRISE, $systemPackages) + if (in_array(static::EDITION_ENTERPRISE, $systemPackages) && !in_array(static::EDITION_B2B, $systemPackages) ) { $result = array_merge($this->getAllowedB2BVersions($currentEE), $result); diff --git a/setup/src/Magento/Setup/Model/UpdaterTaskCreator.php b/setup/src/Magento/Setup/Model/UpdaterTaskCreator.php index ab4a87392d2ce..03946ab37a6a7 100644 --- a/setup/src/Magento/Setup/Model/UpdaterTaskCreator.php +++ b/setup/src/Magento/Setup/Model/UpdaterTaskCreator.php @@ -159,7 +159,6 @@ public function createUpdaterTasks(array $postPayload) [], \Magento\Setup\Model\Cron\JobFactory::JOB_MAINTENANCE_MODE_DISABLE ); - } return $errorMessage; @@ -177,7 +176,7 @@ public function createUpdaterTasks(array $postPayload) private function getCronTaskConfigInfo($jobType, $postPayload, &$additionalOptions, &$cronTaskType) { $additionalOptions = []; - switch($jobType) { + switch ($jobType) { case 'uninstall': $additionalOptions = [ JobComponentUninstall::DATA_OPTION => $postPayload[self::KEY_POST_DATA_OPTION] diff --git a/setup/src/Magento/Setup/Module/Di/Code/Scanner/PhpScanner.php b/setup/src/Magento/Setup/Module/Di/Code/Scanner/PhpScanner.php index 66a3b5b4d916b..9684e9a61175e 100644 --- a/setup/src/Magento/Setup/Module/Di/Code/Scanner/PhpScanner.php +++ b/setup/src/Magento/Setup/Module/Di/Code/Scanner/PhpScanner.php @@ -83,7 +83,7 @@ protected function getSourceClassName($missingClassName, $entityType) ) { /** Process special cases for extension class and extension interface */ return $sourceClassName . 'Interface'; - } else if ($entityType == FactoryGenerator::ENTITY_TYPE) { + } elseif ($entityType == FactoryGenerator::ENTITY_TYPE) { $extensionAttributesSuffix = ucfirst(ExtensionAttributesGenerator::ENTITY_TYPE); if (substr($sourceClassName, -strlen($extensionAttributesSuffix)) == $extensionAttributesSuffix) { /** Process special case for extension factories */ diff --git a/setup/src/Magento/Setup/Module/Di/Code/Scanner/RepositoryScanner.php b/setup/src/Magento/Setup/Module/Di/Code/Scanner/RepositoryScanner.php index e82e69b44665e..f2d643d61bf38 100644 --- a/setup/src/Magento/Setup/Module/Di/Code/Scanner/RepositoryScanner.php +++ b/setup/src/Magento/Setup/Module/Di/Code/Scanner/RepositoryScanner.php @@ -34,8 +34,7 @@ public function collectEntities(array $files) foreach ($xpath->query('//preference') as $node) { $forType = $node->attributes->getNamedItem('for'); $replacementType = $node->attributes->getNamedItem('type'); - if ( - $forType !== null + if ($forType !== null && $replacementType !== null && (substr($forType->nodeValue, -19) == 'RepositoryInterface') ) { diff --git a/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php b/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php index ace9f46f3f566..b62fb758a5ca4 100644 --- a/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php +++ b/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php @@ -139,8 +139,7 @@ public function authPreDispatch($event) /** @var \Magento\Backend\Model\Auth $auth */ $authentication = $objectManager->get(\Magento\Backend\Model\Auth::class); - if ( - !$authentication->isLoggedIn() || + if (!$authentication->isLoggedIn() || !$adminSession->isAllowed('Magento_Backend::setup_wizard') ) { $adminSession->destroy(); diff --git a/setup/src/Magento/Setup/Test/Unit/Console/Command/MaintenanceAllowIpsCommandTest.php b/setup/src/Magento/Setup/Test/Unit/Console/Command/MaintenanceAllowIpsCommandTest.php index 7e6cd17b2639b..f59ebf2a4146c 100644 --- a/setup/src/Magento/Setup/Test/Unit/Console/Command/MaintenanceAllowIpsCommandTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Console/Command/MaintenanceAllowIpsCommandTest.php @@ -64,7 +64,6 @@ public function testExecute(array $input, array $validatorMessages, $expectedMes $tester = new CommandTester($this->command); $tester->execute($input); $this->assertEquals($expectedMessage, $tester->getDisplay()); - } /** diff --git a/setup/src/Magento/Setup/Test/Unit/Console/Command/MaintenanceEnableCommandTest.php b/setup/src/Magento/Setup/Test/Unit/Console/Command/MaintenanceEnableCommandTest.php index 1f04afba9a733..1b22d3d61ba12 100644 --- a/setup/src/Magento/Setup/Test/Unit/Console/Command/MaintenanceEnableCommandTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Console/Command/MaintenanceEnableCommandTest.php @@ -51,7 +51,6 @@ public function testExecute(array $input, array $validatorMessages, $expectedMes $tester = new CommandTester($this->command); $tester->execute($input); $this->assertEquals($expectedMessage, $tester->getDisplay()); - } /** diff --git a/setup/src/Magento/Setup/Test/Unit/Console/Command/MaintenanceStatusCommandTest.php b/setup/src/Magento/Setup/Test/Unit/Console/Command/MaintenanceStatusCommandTest.php index 4cb236b9b0623..20e811b3597fa 100644 --- a/setup/src/Magento/Setup/Test/Unit/Console/Command/MaintenanceStatusCommandTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Console/Command/MaintenanceStatusCommandTest.php @@ -39,7 +39,6 @@ public function testExecute(array $maintenanceData, $expectedMessage) $tester = new CommandTester($this->command); $tester->execute([]); $this->assertEquals($expectedMessage, $tester->getDisplay()); - } /** diff --git a/setup/src/Magento/Setup/Test/Unit/Console/Command/ModuleUninstallCommandTest.php b/setup/src/Magento/Setup/Test/Unit/Console/Command/ModuleUninstallCommandTest.php index 80124605dc760..07e747e6709d6 100644 --- a/setup/src/Magento/Setup/Test/Unit/Console/Command/ModuleUninstallCommandTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Console/Command/ModuleUninstallCommandTest.php @@ -399,7 +399,6 @@ private function setUpExecute() ->willReturn(['Magento_A' => [], 'Magento_B' => []]); $this->cache->expects($this->once())->method('clean'); $this->cleanupFiles->expects($this->once())->method('clearCodeGeneratedClasses'); - } public function testExecute() diff --git a/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsListTest.php b/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsListTest.php index 9a6945952e998..158984be4d042 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsListTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsListTest.php @@ -164,7 +164,6 @@ public function testValidateCacheHosts($hosts, $expectedError) } else { $this->assertCount(0, $result); } - } public function validateCacheHostsDataProvider() diff --git a/setup/src/Magento/Setup/Test/Unit/Model/UninstallCollectorTest.php b/setup/src/Magento/Setup/Test/Unit/Model/UninstallCollectorTest.php index b94babf9be296..69fdbf8c60398 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/UninstallCollectorTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/UninstallCollectorTest.php @@ -72,7 +72,6 @@ public function testUninstallCollector() ['Magento_A' => 'Uninstall Class A', 'Magento_B' => 'Uninstall Class B'], $this->collector->collectUninstall() ); - } public function testUninstallCollectorWithInput()