diff --git a/app/code/Magento/Catalog/etc/mview.xml b/app/code/Magento/Catalog/etc/mview.xml index 4213faf9307b5..7ae38a7f2d0e1 100644 --- a/app/code/Magento/Catalog/etc/mview.xml +++ b/app/code/Magento/Catalog/etc/mview.xml @@ -36,7 +36,6 @@
-
diff --git a/app/code/Magento/CatalogRule/etc/mview.xml b/app/code/Magento/CatalogRule/etc/mview.xml index 0fc3be87057be..2990c03ae0159 100644 --- a/app/code/Magento/CatalogRule/etc/mview.xml +++ b/app/code/Magento/CatalogRule/etc/mview.xml @@ -18,7 +18,6 @@
-
diff --git a/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php b/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php index a2880c28844ac..dcfe1cd5e2038 100644 --- a/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php +++ b/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php @@ -321,6 +321,11 @@ protected function getDefaultValue($attributeCode) return $this->getCustomer()->getFirstname(); } break; + case 'middlename': + if ($this->getCustomer()) { + return $this->getCustomer()->getMiddlename(); + } + break; case 'lastname': if ($this->getCustomer()) { return $this->getCustomer()->getLastname(); diff --git a/app/code/Magento/Checkout/view/frontend/web/template/billing-address/details.html b/app/code/Magento/Checkout/view/frontend/web/template/billing-address/details.html index 17754b81849f5..f2baf5d50030e 100644 --- a/app/code/Magento/Checkout/view/frontend/web/template/billing-address/details.html +++ b/app/code/Magento/Checkout/view/frontend/web/template/billing-address/details.html @@ -5,7 +5,7 @@ */ -->
- +

,
diff --git a/app/code/Magento/Checkout/view/frontend/web/template/shipping-address/address-renderer/default.html b/app/code/Magento/Checkout/view/frontend/web/template/shipping-address/address-renderer/default.html index 4c3ce84baac4d..f9400227fae09 100644 --- a/app/code/Magento/Checkout/view/frontend/web/template/shipping-address/address-renderer/default.html +++ b/app/code/Magento/Checkout/view/frontend/web/template/shipping-address/address-renderer/default.html @@ -5,7 +5,7 @@ */ -->
- +

,
diff --git a/app/code/Magento/Checkout/view/frontend/web/template/shipping-information/address-renderer/default.html b/app/code/Magento/Checkout/view/frontend/web/template/shipping-information/address-renderer/default.html index c3afce6c4537f..ec41cae0bdc5e 100644 --- a/app/code/Magento/Checkout/view/frontend/web/template/shipping-information/address-renderer/default.html +++ b/app/code/Magento/Checkout/view/frontend/web/template/shipping-information/address-renderer/default.html @@ -5,7 +5,7 @@ */ --> - +

,
diff --git a/app/code/Magento/Eav/Setup/EavSetup.php b/app/code/Magento/Eav/Setup/EavSetup.php index 61146d7e38608..ced56f313dd7d 100644 --- a/app/code/Magento/Eav/Setup/EavSetup.php +++ b/app/code/Magento/Eav/Setup/EavSetup.php @@ -942,6 +942,7 @@ public function updateAttribute($entityTypeId, $id, $field, $value = null, $sort * @param mixed $value * @param int $sortOrder * @return $this + * @throws LocalizedException */ private function _updateAttribute($entityTypeId, $id, $field, $value = null, $sortOrder = null) { @@ -972,11 +973,15 @@ private function _updateAttribute($entityTypeId, $id, $field, $value = null, $so return $this; } } + $attributeId = $this->getAttributeId($entityTypeId, $id); + if (false === $attributeId) { + throw new LocalizedException(__('Attribute with ID: "%1" does not exist', $id)); + } $this->setup->updateTableRow( 'eav_attribute', 'attribute_id', - $this->getAttributeId($entityTypeId, $id), + $attributeId, $field, $value, 'entity_type_id', @@ -994,6 +999,7 @@ private function _updateAttribute($entityTypeId, $id, $field, $value = null, $so * @param string|array $field * @param mixed $value * @return $this + * @throws LocalizedException */ private function _updateAttributeAdditionalData($entityTypeId, $id, $field, $value = null) { @@ -1022,6 +1028,11 @@ private function _updateAttributeAdditionalData($entityTypeId, $id, $field, $val return $this; } } + + $attributeId = $this->getAttributeId($entityTypeId, $id); + if (false === $attributeId) { + throw new LocalizedException(__('Attribute with ID: "%1" does not exist', $id)); + } $this->setup->updateTableRow( $this->setup->getTable($additionalTable), 'attribute_id', diff --git a/app/code/Magento/GiftMessage/i18n/en_US.csv b/app/code/Magento/GiftMessage/i18n/en_US.csv index 5c82c8e5aeb81..bac6989bd01ae 100644 --- a/app/code/Magento/GiftMessage/i18n/en_US.csv +++ b/app/code/Magento/GiftMessage/i18n/en_US.csv @@ -22,7 +22,7 @@ OK,OK "Gift Options","Gift Options" "Gift Message","Gift Message" "Do you have any gift items in your order?","Do you have any gift items in your order?" -"Add gift options","Add gift options" +"Add Gift Options","Add Gift Options" "Gift Options for the Entire Order","Gift Options for the Entire Order" "Leave this box blank if you don\'t want to leave a gift message for the entire order.","Leave this box blank if you don\'t want to leave a gift message for the entire order." "Gift Options for Individual Items","Gift Options for Individual Items" @@ -30,14 +30,14 @@ OK,OK "Leave a box blank if you don\'t want to add a gift message for that item.","Leave a box blank if you don\'t want to add a gift message for that item." "Add Gift Options for the Entire Order","Add Gift Options for the Entire Order" "You can leave this box blank if you don\'t want to add a gift message for this address.","You can leave this box blank if you don\'t want to add a gift message for this address." -"Add gift options for Individual Items","Add gift options for Individual Items" +"Add Gift Options for Individual Items","Add Gift Options for Individual Items" "You can leave this box blank if you don\'t want to add a gift message for the item.","You can leave this box blank if you don\'t want to add a gift message for the item." "Gift Message (optional)","Gift Message (optional)" To:,To: From:,From: Message:,Message: Update,Update -"Gift options","Gift options" +"Gift Options","Gift Options" Edit,Edit Delete,Delete "Allow Gift Messages on Order Level","Allow Gift Messages on Order Level" diff --git a/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml b/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml index 8fbb6918d7119..6155cfc37c4ad 100644 --- a/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml +++ b/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml @@ -14,7 +14,7 @@
getItemsHasMesssages() || $block->getEntityHasMessage()): ?> checked="checked" class="checkbox" /> - +
@@ -148,7 +148,7 @@
getItemsHasMesssages() || $block->getEntityHasMessage()): ?> checked="checked" class="checkbox" /> - +
@@ -197,7 +197,7 @@
getItemsHasMesssages()): ?> checked="checked" class="checkbox" /> - +
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Shipping.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Shipping.php index 9f0c6cb6f3a27..10299486a08ce 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Shipping.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Shipping.php @@ -37,7 +37,7 @@ class Shipping extends Form protected $shippingMethod = '//span[text()="%s"]/following::label[contains(., "%s")]/../input'; /** - * From with shipping available shipping methods. + * Form with shipping available shipping methods. * * @var string */ diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/ComposerTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/ComposerTest.php index e6a036487fc5a..04e440154e96c 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/ComposerTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/ComposerTest.php @@ -99,7 +99,12 @@ private function validateComposerJsonFile($path) /** @var \Magento\Framework\Composer\MagentoComposerApplicationFactory $appFactory */ $appFactory = self::$objectManager->get(\Magento\Framework\Composer\MagentoComposerApplicationFactory::class); $app = $appFactory->create(); - $app->runComposerCommand(['command' => 'validate'], $path); + + try { + $app->runComposerCommand(['command' => 'validate'], $path); + } catch (\RuntimeException $exception) { + $this->fail($exception->getMessage()); + } } /** diff --git a/lib/internal/Magento/Framework/Validator/Builder.php b/lib/internal/Magento/Framework/Validator/Builder.php index b50c729c3973e..41be9346251ce 100644 --- a/lib/internal/Magento/Framework/Validator/Builder.php +++ b/lib/internal/Magento/Framework/Validator/Builder.php @@ -6,8 +6,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - namespace Magento\Framework\Validator; use Magento\Framework\Validator\Constraint\OptionInterface; @@ -257,7 +255,11 @@ protected function _createConstraint(array $data) } if (\Magento\Framework\Validator\Config::CONSTRAINT_TYPE_PROPERTY == $data['type']) { - $result = new \Magento\Framework\Validator\Constraint\Property($validator, $data['property'], $data['alias']); + $result = new \Magento\Framework\Validator\Constraint\Property( + $validator, + $data['property'], + $data['alias'] + ); } else { $result = $this->_constraintFactory->create(['validator' => $validator, 'alias' => $data['alias']]); } @@ -286,7 +288,10 @@ protected function _createConstraintValidator(array $data) // Check validator type if (!$validator instanceof \Magento\Framework\Validator\ValidatorInterface) { throw new \InvalidArgumentException( - sprintf('Constraint class "%s" must implement \Magento\Framework\Validator\ValidatorInterface', $data['class']) + sprintf( + 'Constraint class "%s" must implement \Magento\Framework\Validator\ValidatorInterface', + $data['class'] + ) ); } @@ -300,8 +305,10 @@ protected function _createConstraintValidator(array $data) * @param array $options * @return void */ - protected function _configureConstraintValidator(\Magento\Framework\Validator\ValidatorInterface $validator, array $options) - { + protected function _configureConstraintValidator( + \Magento\Framework\Validator\ValidatorInterface $validator, + array $options + ) { // Call all validator methods according to configuration if (isset($options['methods'])) { foreach ($options['methods'] as $methodData) { diff --git a/lib/internal/Magento/Framework/Validator/Constraint/Property.php b/lib/internal/Magento/Framework/Validator/Constraint/Property.php index a209e00f738e8..f4842e15ea32e 100644 --- a/lib/internal/Magento/Framework/Validator/Constraint/Property.php +++ b/lib/internal/Magento/Framework/Validator/Constraint/Property.php @@ -6,8 +6,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - namespace Magento\Framework\Validator\Constraint; class Property extends \Magento\Framework\Validator\Constraint @@ -33,8 +31,8 @@ public function __construct(\Magento\Framework\Validator\ValidatorInterface $val } /** - * Get value that should be validated. Tries to extract value's property if \Magento\Framework\DataObject or \ArrayAccess or array - * is passed + * Get value that should be validated. Tries to extract value's property if \Magento\Framework\DataObject or + * \ArrayAccess or array is passed * * @param mixed $value * @return mixed diff --git a/lib/internal/Magento/Framework/Validator/ConstraintFactory.php b/lib/internal/Magento/Framework/Validator/ConstraintFactory.php index 43d3ef3d9cb35..d90c4ee47338a 100644 --- a/lib/internal/Magento/Framework/Validator/ConstraintFactory.php +++ b/lib/internal/Magento/Framework/Validator/ConstraintFactory.php @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - /** * Factory class for \Magento\Framework\Validator\Constraint */ @@ -33,8 +31,10 @@ class ConstraintFactory * @param \Magento\Framework\ObjectManagerInterface $objectManager * @param string $instanceName */ - public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager, $instanceName = \Magento\Framework\Validator\Constraint::class) - { + public function __construct( + \Magento\Framework\ObjectManagerInterface $objectManager, + $instanceName = \Magento\Framework\Validator\Constraint::class + ) { $this->_objectManager = $objectManager; $this->_instanceName = $instanceName; } diff --git a/lib/internal/Magento/Framework/Validator/Factory.php b/lib/internal/Magento/Framework/Validator/Factory.php index a1b1752d5ded1..c7df8547fb4b3 100644 --- a/lib/internal/Magento/Framework/Validator/Factory.php +++ b/lib/internal/Magento/Framework/Validator/Factory.php @@ -3,18 +3,14 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Framework\Validator; use Magento\Framework\Cache\FrontendInterface; -/** - * @codingStandardsIgnoreFile - */ class Factory { - /** - * Cache key - */ + /** cache key */ const CACHE_KEY = __CLASS__; /** @@ -73,6 +69,8 @@ public function __construct( /** * Init cached list of validation files + * + * @return void */ protected function _initializeConfigList() { @@ -80,7 +78,10 @@ protected function _initializeConfigList() $this->_configFiles = $this->cache->load(self::CACHE_KEY); if (!$this->_configFiles) { $this->_configFiles = $this->moduleReader->getConfigurationFiles('validation.xml'); - $this->cache->save($this->getSerializer()->serialize($this->_configFiles->toArray()), self::CACHE_KEY); + $this->cache->save( + $this->getSerializer()->serialize($this->_configFiles->toArray()), + self::CACHE_KEY + ); } else { $filesArray = $this->getSerializer()->unserialize($this->_configFiles); $this->_configFiles = $this->getFileIteratorFactory()->create(array_keys($filesArray)); @@ -121,7 +122,9 @@ public function getValidatorConfig() $this->_initializeConfigList(); $this->_initializeDefaultTranslator(); return $this->_objectManager->create( - \Magento\Framework\Validator\Config::class, ['configFiles' => $this->_configFiles]); + \Magento\Framework\Validator\Config::class, + ['configFiles' => $this->_configFiles] + ); } /** @@ -161,7 +164,9 @@ public function createValidator($entityName, $groupName, array $builderConfig = private function getSerializer() { if ($this->serializer === null) { - $this->serializer = $this->_objectManager->get(\Magento\Framework\Serialize\SerializerInterface::class); + $this->serializer = $this->_objectManager->get( + \Magento\Framework\Serialize\SerializerInterface::class + ); } return $this->serializer; } @@ -175,8 +180,9 @@ private function getSerializer() private function getFileIteratorFactory() { if ($this->fileIteratorFactory === null) { - $this->fileIteratorFactory = $this->_objectManager - ->get(\Magento\Framework\Config\FileIteratorFactory::class); + $this->fileIteratorFactory = $this->_objectManager->get( + \Magento\Framework\Config\FileIteratorFactory::class + ); } return $this->fileIteratorFactory; }