diff --git a/app/code/Magento/Authorizenet/view/frontend/web/js/view/payment/method-renderer/authorizenet-directpost.js b/app/code/Magento/Authorizenet/view/frontend/web/js/view/payment/method-renderer/authorizenet-directpost.js index d163053292a0c..024cbb09ef952 100644 --- a/app/code/Magento/Authorizenet/view/frontend/web/js/view/payment/method-renderer/authorizenet-directpost.js +++ b/app/code/Magento/Authorizenet/view/frontend/web/js/view/payment/method-renderer/authorizenet-directpost.js @@ -48,7 +48,7 @@ define( var self = this; if (this.validateHandler() && additionalValidators.validate()) { this.isPlaceOrderActionAllowed(false); - $.when(setPaymentInformationAction()).done(function() { + $.when(setPaymentInformationAction(this.messageContainer)).done(function() { self.placeOrderHandler(); }).fail(function() { self.isPlaceOrderActionAllowed(true); diff --git a/app/code/Magento/Authorizenet/view/frontend/web/template/payment/authorizenet-directpost.html b/app/code/Magento/Authorizenet/view/frontend/web/template/payment/authorizenet-directpost.html index a053754095c61..8c1e10d56fa23 100644 --- a/app/code/Magento/Authorizenet/view/frontend/web/template/payment/authorizenet-directpost.html +++ b/app/code/Magento/Authorizenet/view/frontend/web/template/payment/authorizenet-directpost.html @@ -15,6 +15,9 @@
+ + +
diff --git a/app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/braintree-paypal.js b/app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/braintree-paypal.js index ed15f9822b18d..3b5ea0e29bbb9 100644 --- a/app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/braintree-paypal.js +++ b/app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/braintree-paypal.js @@ -103,7 +103,7 @@ define( } }); } else { - messageList.addErrorMessage({'message': 'Can not initialize PayPal (Braintree)'}); + this.messageContainer.addErrorMessage({'message': $t('Can not initialize PayPal (Braintree)')}); } }, isValid: function () { diff --git a/app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/cc-form.js b/app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/cc-form.js index 1a7327d6460ae..57ea5d8e6f5ef 100644 --- a/app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/cc-form.js +++ b/app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/cc-form.js @@ -103,7 +103,7 @@ define( clientToken: this.clientToken }); } else { - messageList.addErrorMessage({'message': 'Can not initialize PayPal (Braintree)'}); + this.messageContainer.addErrorMessage({'message': $t('Can not initialize PayPal (Braintree)')}); } return this; @@ -116,7 +116,7 @@ define( var self = this, cardInfo = null; - messageList.clear(); + this.messageContainer.clear(); this.quoteBaseGrandTotals = quote.totals().base_grand_total; this.isPaymentProcessing = $.Deferred(); @@ -194,9 +194,9 @@ define( this.paymentMethodNonce(''); if (_.isObject(error)) { - messageList.addErrorMessage(error); + this.messageContainer.addErrorMessage(error); } else { - messageList.addErrorMessage({ + this.messageContainer.addErrorMessage({ message: error }); } diff --git a/app/code/Magento/Braintree/view/frontend/web/template/payment/braintree-paypal-form.html b/app/code/Magento/Braintree/view/frontend/web/template/payment/braintree-paypal-form.html index 62440177a6c06..683f62b9bb624 100644 --- a/app/code/Magento/Braintree/view/frontend/web/template/payment/braintree-paypal-form.html +++ b/app/code/Magento/Braintree/view/frontend/web/template/payment/braintree-paypal-form.html @@ -17,6 +17,9 @@
+ + +
diff --git a/app/code/Magento/Braintree/view/frontend/web/template/payment/cc-form.html b/app/code/Magento/Braintree/view/frontend/web/template/payment/cc-form.html index 9743d6e6f6493..d7ef8969eeae1 100644 --- a/app/code/Magento/Braintree/view/frontend/web/template/payment/cc-form.html +++ b/app/code/Magento/Braintree/view/frontend/web/template/payment/cc-form.html @@ -22,6 +22,9 @@
+ + +
diff --git a/app/code/Magento/Checkout/Block/Adminhtml/CartTab.php b/app/code/Magento/Checkout/Block/Adminhtml/CartTab.php index 38abcd03b81c4..b45c128627026 100644 --- a/app/code/Magento/Checkout/Block/Adminhtml/CartTab.php +++ b/app/code/Magento/Checkout/Block/Adminhtml/CartTab.php @@ -14,6 +14,7 @@ * Class CartTab * * @package Magento\Checkout\Block\Adminhtml + * @codeCoverageIgnore */ class CartTab extends TabWrapper { diff --git a/app/code/Magento/Checkout/Block/Cart.php b/app/code/Magento/Checkout/Block/Cart.php index a3401d0a4b271..1a95a130f8ef1 100644 --- a/app/code/Magento/Checkout/Block/Cart.php +++ b/app/code/Magento/Checkout/Block/Cart.php @@ -35,6 +35,7 @@ class Cart extends \Magento\Checkout\Block\Cart\AbstractCart * @param \Magento\Checkout\Helper\Cart $cartHelper * @param \Magento\Framework\App\Http\Context $httpContext * @param array $data + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, @@ -55,6 +56,7 @@ public function __construct( /** * Prepare Quote Item Product URLs * + * @codeCoverageIgnore * @return void */ protected function _construct() @@ -106,6 +108,7 @@ public function prepareItemUrls() } /** + * @codeCoverageIgnore * @return bool */ public function hasError() @@ -114,6 +117,7 @@ public function hasError() } /** + * @codeCoverageIgnore * @return int */ public function getItemsSummaryQty() @@ -122,6 +126,7 @@ public function getItemsSummaryQty() } /** + * @codeCoverageIgnore * @return bool */ public function isWishlistActive() @@ -140,6 +145,7 @@ public function isWishlistActive() } /** + * @codeCoverageIgnore * @return string */ public function getCheckoutUrl() @@ -165,6 +171,7 @@ public function getContinueShoppingUrl() /** * @return bool + * @codeCoverageIgnore * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsVirtual() @@ -218,6 +225,7 @@ public function getItems() } /** + * @codeCoverageIgnore * @return int */ public function getItemsCount() diff --git a/app/code/Magento/Checkout/Block/Cart/AbstractCart.php b/app/code/Magento/Checkout/Block/Cart/AbstractCart.php index be743df6033e1..95b5cda03e38a 100644 --- a/app/code/Magento/Checkout/Block/Cart/AbstractCart.php +++ b/app/code/Magento/Checkout/Block/Cart/AbstractCart.php @@ -49,6 +49,7 @@ class AbstractCart extends \Magento\Framework\View\Element\Template * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $checkoutSession * @param array $data + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, @@ -114,6 +115,7 @@ public function getQuote() * Get all cart items * * @return array + * @codeCoverageIgnore */ public function getItems() { @@ -134,6 +136,7 @@ public function getItemHtml(\Magento\Quote\Model\Quote\Item $item) /** * @return array + * @codeCoverageIgnore */ public function getTotals() { diff --git a/app/code/Magento/Checkout/Block/Cart/Additional/Info.php b/app/code/Magento/Checkout/Block/Cart/Additional/Info.php index 0f05230d31431..cbf3dba50afcc 100644 --- a/app/code/Magento/Checkout/Block/Cart/Additional/Info.php +++ b/app/code/Magento/Checkout/Block/Cart/Additional/Info.php @@ -16,6 +16,7 @@ class Info extends \Magento\Framework\View\Element\Template /** * @param \Magento\Quote\Model\Quote\Item\AbstractItem $item * @return $this + * @codeCoverageIgnore */ public function setItem(\Magento\Quote\Model\Quote\Item\AbstractItem $item) { @@ -25,6 +26,7 @@ public function setItem(\Magento\Quote\Model\Quote\Item\AbstractItem $item) /** * @return \Magento\Quote\Model\Quote\Item\AbstractItem + * @codeCoverageIgnore */ public function getItem() { diff --git a/app/code/Magento/Checkout/Block/Cart/Coupon.php b/app/code/Magento/Checkout/Block/Cart/Coupon.php index f89fb41b5c958..ad301bc3ce3b1 100644 --- a/app/code/Magento/Checkout/Block/Cart/Coupon.php +++ b/app/code/Magento/Checkout/Block/Cart/Coupon.php @@ -12,6 +12,7 @@ class Coupon extends \Magento\Checkout\Block\Cart\AbstractCart * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $checkoutSession * @param array $data + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, @@ -25,6 +26,7 @@ public function __construct( /** * @return string + * @codeCoverageIgnore */ public function getCouponCode() { diff --git a/app/code/Magento/Checkout/Block/Cart/Crosssell.php b/app/code/Magento/Checkout/Block/Cart/Crosssell.php index 508bbd6857994..2eb54a9bbddd1 100644 --- a/app/code/Magento/Checkout/Block/Cart/Crosssell.php +++ b/app/code/Magento/Checkout/Block/Cart/Crosssell.php @@ -55,6 +55,7 @@ class Crosssell extends \Magento\Catalog\Block\Product\AbstractProduct * @param StockHelper $stockHelper * @param array $data * + * @codeCoverageIgnore * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -131,6 +132,7 @@ public function getItems() * Count items * * @return int + * @codeCoverageIgnore */ public function getItemCount() { @@ -162,6 +164,7 @@ protected function _getCartProductIds() * Get last product ID that was added to cart and remove this information from session * * @return int + * @codeCoverageIgnore */ protected function _getLastAddedProductId() { @@ -172,6 +175,7 @@ protected function _getLastAddedProductId() * Get quote instance * * @return \Magento\Quote\Model\Quote + * @codeCoverageIgnore */ public function getQuote() { diff --git a/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php b/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php index d22100a831791..74865f2a8836d 100644 --- a/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php +++ b/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php @@ -102,6 +102,7 @@ class Renderer extends \Magento\Framework\View\Element\Template implements * @param InterpretationStrategyInterface $messageInterpretationStrategy * @param array $data * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, @@ -132,6 +133,7 @@ public function __construct( * * @param AbstractItem $item * @return $this + * @codeCoverageIgnore */ public function setItem(AbstractItem $item) { @@ -143,6 +145,7 @@ public function setItem(AbstractItem $item) * Get quote item * * @return AbstractItem + * @codeCoverageIgnore */ public function getItem() { @@ -153,6 +156,7 @@ public function getItem() * Get item product * * @return \Magento\Catalog\Model\Product + * @codeCoverageIgnore */ public function getProduct() { @@ -163,6 +167,7 @@ public function getProduct() * Identify the product from which thumbnail should be taken. * * @return \Magento\Catalog\Model\Product + * @codeCoverageIgnore */ public function getProductForThumbnail() { @@ -172,6 +177,7 @@ public function getProductForThumbnail() /** * @param string $productUrl * @return $this + * @codeCoverageIgnore */ public function overrideProductUrl($productUrl) { @@ -265,6 +271,7 @@ public function getProductOptions() * Get list of all otions for product * * @return array + * @codeCoverageIgnore */ public function getOptionList() { @@ -288,6 +295,7 @@ public function getQty() * Get checkout session * * @return \Magento\Checkout\Model\Session + * @codeCoverageIgnore */ public function getCheckoutSession() { @@ -368,6 +376,7 @@ public function getFormatedOptionValue($optionValue) * Check whether Product is visible in site * * @return bool + * @codeCoverageIgnore */ public function isProductVisible() { @@ -378,6 +387,7 @@ public function isProductVisible() * Return product additional information block * * @return AbstractBlock + * @codeCoverageIgnore */ public function getProductAdditionalInformationBlock() { @@ -389,6 +399,7 @@ public function getProductAdditionalInformationBlock() * * @param bool $strict * @return $this + * @codeCoverageIgnore */ public function setQtyMode($strict) { @@ -401,6 +412,7 @@ public function setQtyMode($strict) * * @param bool $ignore * @return $this + * @codeCoverageIgnore */ public function setIgnoreProductUrl($ignore = true) { @@ -451,6 +463,7 @@ public function getProductPriceHtml(\Magento\Catalog\Model\Product $product) /** * @return \Magento\Framework\Pricing\Render + * @codeCoverageIgnore */ protected function getPriceRender() { diff --git a/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions.php b/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions.php index 22d24d6663278..0104e00b1c9d5 100644 --- a/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions.php +++ b/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions.php @@ -20,6 +20,7 @@ class Actions extends Text * Returns current quote item * * @return AbstractItem + * @codeCoverageIgnore */ public function getItem() { @@ -31,6 +32,7 @@ public function getItem() * * @param AbstractItem $item * @return $this + * @codeCoverageIgnore */ public function setItem(AbstractItem $item) { diff --git a/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions/Generic.php b/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions/Generic.php index 5655dfe6792dd..ff69749124343 100644 --- a/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions/Generic.php +++ b/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions/Generic.php @@ -19,6 +19,7 @@ class Generic extends Template * Returns current quote item * * @return AbstractItem + * @codeCoverageIgnore */ public function getItem() { @@ -30,6 +31,7 @@ public function getItem() * * @param AbstractItem $item * @return $this + * @codeCoverageIgnore */ public function setItem(AbstractItem $item) { @@ -41,6 +43,7 @@ public function setItem(AbstractItem $item) * Check if product is visible in site visibility * * @return bool + * @codeCoverageIgnore */ public function isProductVisibleInSiteVisibility() { @@ -51,6 +54,7 @@ public function isProductVisibleInSiteVisibility() * Check if cart item is virtual * * @return bool + * @codeCoverageIgnore */ public function isVirtual() { diff --git a/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions/Remove.php b/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions/Remove.php index 066afb6a08223..784be962a1d2f 100644 --- a/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions/Remove.php +++ b/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions/Remove.php @@ -19,6 +19,7 @@ class Remove extends Generic * @param Template\Context $context * @param Cart $cartHelper * @param array $data + * @codeCoverageIgnore */ public function __construct( Template\Context $context, @@ -33,6 +34,7 @@ public function __construct( * Get delete item POST JSON * * @return string + * @codeCoverageIgnore */ public function getDeletePostJson() { diff --git a/app/code/Magento/Checkout/Block/Cart/LayoutProcessor.php b/app/code/Magento/Checkout/Block/Cart/LayoutProcessor.php index 6026d857ee0c2..bbdba7177576e 100644 --- a/app/code/Magento/Checkout/Block/Cart/LayoutProcessor.php +++ b/app/code/Magento/Checkout/Block/Cart/LayoutProcessor.php @@ -31,6 +31,7 @@ class LayoutProcessor implements \Magento\Checkout\Block\Checkout\LayoutProcesso * @param \Magento\Checkout\Block\Checkout\AttributeMerger $merger * @param \Magento\Directory\Model\Resource\Country\Collection $countryCollection * @param \Magento\Directory\Model\Resource\Region\Collection $regionCollection + * @codeCoverageIgnore */ public function __construct( \Magento\Checkout\Block\Checkout\AttributeMerger $merger, @@ -46,6 +47,7 @@ public function __construct( * Show City in Shipping Estimation * * @return bool + * @codeCoverageIgnore */ protected function isCityActive() { @@ -56,6 +58,7 @@ protected function isCityActive() * Show State in Shipping Estimation * * @return bool + * @codeCoverageIgnore */ protected function isStateActive() { diff --git a/app/code/Magento/Checkout/Block/Cart/Link.php b/app/code/Magento/Checkout/Block/Cart/Link.php index 1abffad414609..91ea9a2509599 100644 --- a/app/code/Magento/Checkout/Block/Cart/Link.php +++ b/app/code/Magento/Checkout/Block/Cart/Link.php @@ -27,6 +27,7 @@ class Link extends \Magento\Framework\View\Element\Html\Link * @param \Magento\Framework\Module\Manager $moduleManager * @param \Magento\Checkout\Helper\Cart $cartHelper * @param array $data + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, @@ -41,6 +42,7 @@ public function __construct( /** * @return string + * @codeCoverageIgnore */ public function getLabel() { @@ -49,6 +51,7 @@ public function getLabel() /** * @return string + * @codeCoverageIgnore */ public function getHref() { diff --git a/app/code/Magento/Checkout/Block/Cart/Shipping.php b/app/code/Magento/Checkout/Block/Cart/Shipping.php index 7c56c8dc18269..e462c3664f1e1 100644 --- a/app/code/Magento/Checkout/Block/Cart/Shipping.php +++ b/app/code/Magento/Checkout/Block/Cart/Shipping.php @@ -27,6 +27,7 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart * @param \Magento\Checkout\Model\CompositeConfigProvider $configProvider * @param array $layoutProcessors * @param array $data + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, @@ -46,6 +47,7 @@ public function __construct( * Retrieve checkout configuration * * @return array + * @codeCoverageIgnore */ public function getCheckoutConfig() { @@ -69,6 +71,7 @@ public function getJsLayout() * Get base url for block. * * @return string + * @codeCoverageIgnore */ public function getBaseUrl() { diff --git a/app/code/Magento/Checkout/Block/Cart/Sidebar.php b/app/code/Magento/Checkout/Block/Cart/Sidebar.php index e15608c17125f..ed3a1cf671b15 100644 --- a/app/code/Magento/Checkout/Block/Cart/Sidebar.php +++ b/app/code/Magento/Checkout/Block/Cart/Sidebar.php @@ -29,6 +29,7 @@ class Sidebar extends AbstractCart * @param \Magento\Catalog\Helper\Image $imageHelper * @param \Magento\Customer\CustomerData\JsLayoutDataProviderPoolInterface $jsLayoutDataProvider * @param array $data + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, @@ -79,6 +80,7 @@ public function getImageHtmlTemplate() /** * Get one page checkout page url * + * @codeCoverageIgnore * @return string */ public function getCheckoutUrl() @@ -90,6 +92,7 @@ public function getCheckoutUrl() * Get shopping cart page url * * @return string + * @codeCoverageIgnore */ public function getShoppingCartUrl() { @@ -100,6 +103,7 @@ public function getShoppingCartUrl() * Get update cart item url * * @return string + * @codeCoverageIgnore */ public function getUpdateItemQtyUrl() { @@ -110,6 +114,7 @@ public function getUpdateItemQtyUrl() * Get remove cart item url * * @return string + * @codeCoverageIgnore */ public function getRemoveItemUrl() { @@ -120,6 +125,7 @@ public function getRemoveItemUrl() * Define if Mini Shopping Cart Pop-Up Menu enabled * * @return bool + * @codeCoverageIgnore * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsNeedToDisplaySideBar() @@ -147,6 +153,7 @@ public function getTotalsCache() /** * Retrieve subtotal block html * + * @codeCoverageIgnore * @return string */ public function getTotalsHtml() @@ -157,6 +164,7 @@ public function getTotalsHtml() /** * Return base url. * + * @codeCoverageIgnore * @return string */ public function getBaseUrl() diff --git a/app/code/Magento/Checkout/Block/Cart/Totals.php b/app/code/Magento/Checkout/Block/Cart/Totals.php index 8ac56b13a1f48..ba47ca362ad2a 100644 --- a/app/code/Magento/Checkout/Block/Cart/Totals.php +++ b/app/code/Magento/Checkout/Block/Cart/Totals.php @@ -42,6 +42,7 @@ class Totals extends \Magento\Checkout\Block\Cart\AbstractCart * @param \Magento\Sales\Model\Config $salesConfig * @param array $layoutProcessors * @param array $data + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, @@ -82,6 +83,7 @@ public function getTotals() /** * @param array $value * @return $this + * @codeCoverageIgnore */ public function setTotals($value) { diff --git a/app/code/Magento/Checkout/Block/Cart/ValidationMessages.php b/app/code/Magento/Checkout/Block/Cart/ValidationMessages.php index 169cb66398883..f33a1a5034ed2 100644 --- a/app/code/Magento/Checkout/Block/Cart/ValidationMessages.php +++ b/app/code/Magento/Checkout/Block/Cart/ValidationMessages.php @@ -27,6 +27,7 @@ class ValidationMessages extends \Magento\Framework\View\Element\Messages * @param \Magento\Checkout\Helper\Cart $cartHelper * @param \Magento\Framework\Locale\CurrencyInterface $currency * @param array $data + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Checkout/Block/Link.php b/app/code/Magento/Checkout/Block/Link.php index a356cf1cbcc0e..d35b25ceb2e42 100644 --- a/app/code/Magento/Checkout/Block/Link.php +++ b/app/code/Magento/Checkout/Block/Link.php @@ -27,6 +27,7 @@ class Link extends \Magento\Framework\View\Element\Html\Link * @param \Magento\Framework\Module\Manager $moduleManager * @param \Magento\Checkout\Helper\Data $checkoutHelper * @param array $data + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, @@ -41,6 +42,7 @@ public function __construct( /** * @return string + * @codeCoverageIgnore */ public function getHref() { diff --git a/app/code/Magento/Checkout/Block/Onepage.php b/app/code/Magento/Checkout/Block/Onepage.php index 87fe4a804e819..bf573b0ffd115 100644 --- a/app/code/Magento/Checkout/Block/Onepage.php +++ b/app/code/Magento/Checkout/Block/Onepage.php @@ -56,6 +56,7 @@ class Onepage extends \Magento\Checkout\Block\Onepage\AbstractOnepage * @param \Magento\Checkout\Model\CompositeConfigProvider $configProvider * @param LayoutProcessorInterface[] $layoutProcessors * @param array $data + * @codeCoverageIgnore * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -111,6 +112,7 @@ public function getJsLayout() * Retrieve form key * * @return string + * @codeCoverageIgnore */ public function getFormKey() { @@ -121,6 +123,7 @@ public function getFormKey() * Retrieve checkout configuration * * @return array + * @codeCoverageIgnore */ public function getCheckoutConfig() { @@ -131,6 +134,7 @@ public function getCheckoutConfig() * Get base url for block. * * @return string + * @codeCoverageIgnore */ public function getBaseUrl() { diff --git a/app/code/Magento/Checkout/Block/QuoteShortcutButtons.php b/app/code/Magento/Checkout/Block/QuoteShortcutButtons.php index e323f497ac8af..654ca8c066749 100644 --- a/app/code/Magento/Checkout/Block/QuoteShortcutButtons.php +++ b/app/code/Magento/Checkout/Block/QuoteShortcutButtons.php @@ -18,6 +18,7 @@ class QuoteShortcutButtons extends \Magento\Catalog\Block\ShortcutButtons * @param Template\Context $context * @param \Magento\Checkout\Model\Session $checkoutSession * @param array $data + * @codeCoverageIgnore */ public function __construct( Template\Context $context, diff --git a/app/code/Magento/Checkout/Block/Registration.php b/app/code/Magento/Checkout/Block/Registration.php index 60ae21ce65721..dd2b4dd076dc4 100644 --- a/app/code/Magento/Checkout/Block/Registration.php +++ b/app/code/Magento/Checkout/Block/Registration.php @@ -48,6 +48,7 @@ class Registration extends \Magento\Framework\View\Element\Template * @param \Magento\Sales\Api\OrderRepositoryInterface $orderRepository * @param \Magento\Sales\Model\Order\Address\Validator $addressValidator * @param array $data + * @codeCoverageIgnore */ public function __construct( Template\Context $context, @@ -72,6 +73,7 @@ public function __construct( * Retrieve current email address * * @return string + * @codeCoverageIgnore */ public function getEmailAddress() { @@ -82,6 +84,7 @@ public function getEmailAddress() * Retrieve account creation url * * @return string + * @codeCoverageIgnore */ public function getCreateAccountUrl() { diff --git a/app/code/Magento/Checkout/Block/Success.php b/app/code/Magento/Checkout/Block/Success.php index dd09b399da52a..c397c4afd5892 100644 --- a/app/code/Magento/Checkout/Block/Success.php +++ b/app/code/Magento/Checkout/Block/Success.php @@ -16,6 +16,7 @@ class Success extends \Magento\Framework\View\Element\Template * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param array $data + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Checkout/Controller/Account/Create.php b/app/code/Magento/Checkout/Controller/Account/Create.php index 5906f1c1c3782..4e8514699c1fd 100644 --- a/app/code/Magento/Checkout/Controller/Account/Create.php +++ b/app/code/Magento/Checkout/Controller/Account/Create.php @@ -30,6 +30,7 @@ class Create extends \Magento\Framework\App\Action\Action * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Sales\Api\OrderCustomerManagementInterface $orderCustomerService + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/app/code/Magento/Checkout/Controller/Action.php b/app/code/Magento/Checkout/Controller/Action.php index 0306ebf24acd7..c4f61479e895d 100644 --- a/app/code/Magento/Checkout/Controller/Action.php +++ b/app/code/Magento/Checkout/Controller/Action.php @@ -34,6 +34,7 @@ abstract class Action extends \Magento\Framework\App\Action\Action * @param \Magento\Customer\Model\Session $customerSession * @param CustomerRepositoryInterface $customerRepository * @param AccountManagementInterface $accountManagement + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/app/code/Magento/Checkout/Controller/Cart.php b/app/code/Magento/Checkout/Controller/Cart.php index 5165eaab79b78..a817fe44d6b11 100644 --- a/app/code/Magento/Checkout/Controller/Cart.php +++ b/app/code/Magento/Checkout/Controller/Cart.php @@ -45,6 +45,7 @@ abstract class Cart extends \Magento\Framework\App\Action\Action implements View * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator * @param CustomerCart $cart + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/app/code/Magento/Checkout/Controller/Cart/Add.php b/app/code/Magento/Checkout/Controller/Cart/Add.php index d66756489b2bc..2a3b47cad86a5 100644 --- a/app/code/Magento/Checkout/Controller/Cart/Add.php +++ b/app/code/Magento/Checkout/Controller/Cart/Add.php @@ -28,6 +28,7 @@ class Add extends \Magento\Checkout\Controller\Cart * @param \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator * @param CustomerCart $cart * @param ProductRepositoryInterface $productRepository + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/app/code/Magento/Checkout/Controller/Cart/Configure.php b/app/code/Magento/Checkout/Controller/Cart/Configure.php index 6ed2fdd5084be..bd614ec3110aa 100644 --- a/app/code/Magento/Checkout/Controller/Cart/Configure.php +++ b/app/code/Magento/Checkout/Controller/Cart/Configure.php @@ -23,6 +23,7 @@ class Configure extends \Magento\Checkout\Controller\Cart * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator * @param \Magento\Checkout\Model\Cart $cart + * @codeCoverageIgnore */ public function __construct( Framework\App\Action\Context $context, diff --git a/app/code/Magento/Checkout/Controller/Cart/CouponPost.php b/app/code/Magento/Checkout/Controller/Cart/CouponPost.php index d294ee5bc4c08..2496709c162c8 100644 --- a/app/code/Magento/Checkout/Controller/Cart/CouponPost.php +++ b/app/code/Magento/Checkout/Controller/Cart/CouponPost.php @@ -30,6 +30,7 @@ class CouponPost extends \Magento\Checkout\Controller\Cart * @param \Magento\Checkout\Model\Cart $cart * @param \Magento\SalesRule\Model\CouponFactory $couponFactory * @param \Magento\Quote\Model\QuoteRepository $quoteRepository + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/app/code/Magento/Checkout/Controller/Cart/EstimatePost.php b/app/code/Magento/Checkout/Controller/Cart/EstimatePost.php index ce6bbc95511f5..2ce3a8805e8db 100644 --- a/app/code/Magento/Checkout/Controller/Cart/EstimatePost.php +++ b/app/code/Magento/Checkout/Controller/Cart/EstimatePost.php @@ -23,6 +23,7 @@ class EstimatePost extends \Magento\Checkout\Controller\Cart * @param \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator * @param CustomerCart $cart * @param \Magento\Quote\Model\QuoteRepository $quoteRepository + * @codeCoverageIgnore */ public function __construct( Framework\App\Action\Context $context, diff --git a/app/code/Magento/Checkout/Controller/Cart/Index.php b/app/code/Magento/Checkout/Controller/Cart/Index.php index 36c42488f0f1b..1486c2b8487b5 100644 --- a/app/code/Magento/Checkout/Controller/Cart/Index.php +++ b/app/code/Magento/Checkout/Controller/Cart/Index.php @@ -22,6 +22,7 @@ class Index extends \Magento\Checkout\Controller\Cart * @param \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator * @param \Magento\Checkout\Model\Cart $cart * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/app/code/Magento/Checkout/Controller/Noroute/Index.php b/app/code/Magento/Checkout/Controller/Noroute/Index.php index c0da4714e24a9..e892582009403 100644 --- a/app/code/Magento/Checkout/Controller/Noroute/Index.php +++ b/app/code/Magento/Checkout/Controller/Noroute/Index.php @@ -15,6 +15,7 @@ class Index extends \Magento\Framework\App\Action\Action * * @throws NotFoundException * @return void + * @codeCoverageIgnore */ public function execute() { diff --git a/app/code/Magento/Checkout/Controller/Onepage.php b/app/code/Magento/Checkout/Controller/Onepage.php index f75a842e688cc..38e141855f3f1 100644 --- a/app/code/Magento/Checkout/Controller/Onepage.php +++ b/app/code/Magento/Checkout/Controller/Onepage.php @@ -97,6 +97,7 @@ abstract class Onepage extends Action * @param \Magento\Framework\Controller\Result\RawFactory $resultRawFactory * @param \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory * + * @codeCoverageIgnore * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -214,6 +215,7 @@ protected function _getHtmlByHandle($handle) * Get shipping method step html * * @return string + * @codeCoverageIgnore */ protected function _getShippingMethodsHtml() { @@ -224,6 +226,7 @@ protected function _getShippingMethodsHtml() * Get payment method step html * * @return string + * @codeCoverageIgnore */ protected function _getPaymentMethodsHtml() { @@ -251,6 +254,7 @@ protected function getProgressHtml($checkoutStep = '') * Get one page checkout model * * @return \Magento\Checkout\Model\Type\Onepage + * @codeCoverageIgnore */ public function getOnepage() { diff --git a/app/code/Magento/Checkout/Controller/ShippingRates/Index.php b/app/code/Magento/Checkout/Controller/ShippingRates/Index.php index 91fe0d8f962b9..c407b0bab657f 100644 --- a/app/code/Magento/Checkout/Controller/ShippingRates/Index.php +++ b/app/code/Magento/Checkout/Controller/ShippingRates/Index.php @@ -25,6 +25,7 @@ class Index extends \Magento\Framework\App\Action\Action /** * @param Context $context * @param \Magento\Checkout\Model\Session $session + * @codeCoverageIgnore */ public function __construct( Context $context, diff --git a/app/code/Magento/Checkout/Controller/Sidebar/RemoveItem.php b/app/code/Magento/Checkout/Controller/Sidebar/RemoveItem.php index 10ad9a7bb71b6..0eac880fcbdc1 100644 --- a/app/code/Magento/Checkout/Controller/Sidebar/RemoveItem.php +++ b/app/code/Magento/Checkout/Controller/Sidebar/RemoveItem.php @@ -42,6 +42,7 @@ class RemoveItem extends Action * @param LoggerInterface $logger * @param Data $jsonHelper * @param PageFactory $resultPageFactory + * @codeCoverageIgnore */ public function __construct( Context $context, diff --git a/app/code/Magento/Checkout/Controller/Sidebar/UpdateItemQty.php b/app/code/Magento/Checkout/Controller/Sidebar/UpdateItemQty.php index 656ea11ad773b..e5504082d6f3a 100644 --- a/app/code/Magento/Checkout/Controller/Sidebar/UpdateItemQty.php +++ b/app/code/Magento/Checkout/Controller/Sidebar/UpdateItemQty.php @@ -35,6 +35,7 @@ class UpdateItemQty extends Action * @param Sidebar $sidebar * @param LoggerInterface $logger * @param Data $jsonHelper + * @codeCoverageIgnore */ public function __construct( Context $context, diff --git a/app/code/Magento/Checkout/CustomerData/Cart.php b/app/code/Magento/Checkout/CustomerData/Cart.php index fc37830b2d672..ddc6753581db8 100644 --- a/app/code/Magento/Checkout/CustomerData/Cart.php +++ b/app/code/Magento/Checkout/CustomerData/Cart.php @@ -61,6 +61,7 @@ class Cart extends \Magento\Framework\DataObject implements SectionSourceInterfa * @param ItemPoolInterface $itemPoolInterface * @param \Magento\Framework\View\LayoutInterface $layout * @param array $data + * @codeCoverageIgnore */ public function __construct( \Magento\Checkout\Model\Session $checkoutSession, diff --git a/app/code/Magento/Checkout/CustomerData/DefaultItem.php b/app/code/Magento/Checkout/CustomerData/DefaultItem.php index 2689742183949..625e50927027b 100644 --- a/app/code/Magento/Checkout/CustomerData/DefaultItem.php +++ b/app/code/Magento/Checkout/CustomerData/DefaultItem.php @@ -42,6 +42,7 @@ class DefaultItem extends AbstractItem * @param \Magento\Framework\UrlInterface $urlBuilder * @param \Magento\Catalog\Helper\Product\ConfigurationPool $configurationPool * @param \Magento\Checkout\Helper\Data $checkoutHelper + * @codeCoverageIgnore */ public function __construct( \Magento\Catalog\Helper\Image $imageHelper, @@ -88,6 +89,7 @@ protected function doGetItemData() * Get list of all options for product * * @return array + * @codeCoverageIgnore */ protected function getOptionList() { @@ -96,6 +98,7 @@ protected function getOptionList() /** * @return \Magento\Catalog\Model\Product + * @codeCoverageIgnore */ protected function getProductForThumbnail() { @@ -104,6 +107,7 @@ protected function getProductForThumbnail() /** * @return \Magento\Catalog\Model\Product + * @codeCoverageIgnore */ protected function getProduct() { diff --git a/app/code/Magento/Checkout/CustomerData/DirectoryData.php b/app/code/Magento/Checkout/CustomerData/DirectoryData.php index 2cd840dca7ff8..d3e6702062146 100644 --- a/app/code/Magento/Checkout/CustomerData/DirectoryData.php +++ b/app/code/Magento/Checkout/CustomerData/DirectoryData.php @@ -20,6 +20,7 @@ class DirectoryData implements SectionSourceInterface /** * @param \Magento\Directory\Helper\Data $directoryHelper + * @codeCoverageIgnore */ public function __construct(\Magento\Directory\Helper\Data $directoryHelper) { diff --git a/app/code/Magento/Checkout/CustomerData/ItemPool.php b/app/code/Magento/Checkout/CustomerData/ItemPool.php index e15c0e0b4d250..939131efc3d47 100644 --- a/app/code/Magento/Checkout/CustomerData/ItemPool.php +++ b/app/code/Magento/Checkout/CustomerData/ItemPool.php @@ -42,6 +42,7 @@ class ItemPool implements ItemPoolInterface * @param ObjectManagerInterface $objectManager * @param string $defaultItemId * @param array $itemMap + * @codeCoverageIgnore */ public function __construct( ObjectManagerInterface $objectManager, @@ -55,6 +56,7 @@ public function __construct( /** * {@inheritdoc} + * @codeCoverageIgnore */ public function getItemData(Item $item) { diff --git a/app/code/Magento/Checkout/Helper/Cart.php b/app/code/Magento/Checkout/Helper/Cart.php index 41f6273e2748a..96cdcc69c1138 100644 --- a/app/code/Magento/Checkout/Helper/Cart.php +++ b/app/code/Magento/Checkout/Helper/Cart.php @@ -41,6 +41,7 @@ class Cart extends \Magento\Framework\Url\Helper\Data * @param \Magento\Framework\App\Helper\Context $context * @param \Magento\Checkout\Model\Cart $checkoutCart * @param \Magento\Checkout\Model\Session $checkoutSession + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\App\Helper\Context $context, @@ -56,6 +57,7 @@ public function __construct( * Retrieve cart instance * * @return \Magento\Checkout\Model\Cart + * @codeCoverageIgnore */ public function getCart() { @@ -134,6 +136,7 @@ public function getDeletePostJson($item) * Retrieve shopping cart url * * @return string + * @codeCoverageIgnore */ public function getCartUrl() { @@ -144,6 +147,7 @@ public function getCartUrl() * Retrieve current quote instance * * @return \Magento\Quote\Model\Quote + * @codeCoverageIgnore */ public function getQuote() { @@ -154,6 +158,7 @@ public function getQuote() * Get shopping cart items count * * @return int + * @codeCoverageIgnore */ public function getItemsCount() { @@ -164,6 +169,7 @@ public function getItemsCount() * Get shopping cart summary qty * * @return int|float + * @codeCoverageIgnore */ public function getItemsQty() { @@ -174,6 +180,7 @@ public function getItemsQty() * Get shopping cart items summary (include config settings) * * @return int|float + * @codeCoverageIgnore */ public function getSummaryCount() { @@ -185,6 +192,7 @@ public function getSummaryCount() * * @return bool * @SuppressWarnings(PHPMD.BooleanGetMethodName) + * @codeCoverageIgnore */ public function getIsVirtualQuote() { @@ -197,6 +205,7 @@ public function getIsVirtualQuote() * @param int|string|\Magento\Store\Model\Store $store * @return bool * @SuppressWarnings(PHPMD.BooleanGetMethodName) + * @codeCoverageIgnore */ public function getShouldRedirectToCart($store = null) { diff --git a/app/code/Magento/Checkout/Helper/Data.php b/app/code/Magento/Checkout/Helper/Data.php index c701962ab2908..98d94906ab090 100644 --- a/app/code/Magento/Checkout/Helper/Data.php +++ b/app/code/Magento/Checkout/Helper/Data.php @@ -59,6 +59,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * @param \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder * @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation * @param PriceCurrencyInterface $priceCurrency + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\App\Helper\Context $context, @@ -82,6 +83,7 @@ public function __construct( * Retrieve checkout session model * * @return \Magento\Checkout\Model\Session + * @codeCoverageIgnore */ public function getCheckout() { @@ -92,6 +94,7 @@ public function getCheckout() * Retrieve checkout quote model object * * @return \Magento\Quote\Model\Quote + * @codeCoverageIgnore */ public function getQuote() { @@ -377,6 +380,7 @@ public function isAllowedGuestCheckout(\Magento\Quote\Model\Quote $quote, $store * Check if context is checkout * * @return bool + * @codeCoverageIgnore */ public function isContextCheckout() { @@ -387,6 +391,7 @@ public function isContextCheckout() * Check if user must be logged during checkout process * * @return boolean + * @codeCoverageIgnore */ public function isCustomerMustBeLogged() { diff --git a/app/code/Magento/Checkout/Helper/ExpressRedirect.php b/app/code/Magento/Checkout/Helper/ExpressRedirect.php index e99d2b37e598c..5ced2184a22ad 100644 --- a/app/code/Magento/Checkout/Helper/ExpressRedirect.php +++ b/app/code/Magento/Checkout/Helper/ExpressRedirect.php @@ -31,6 +31,7 @@ class ExpressRedirect extends \Magento\Framework\App\Helper\AbstractHelper * @param \Magento\Framework\ObjectManagerInterface $objectManager * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Framework\App\Helper\Context $context + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\App\ActionFlag $actionFlag, diff --git a/app/code/Magento/Checkout/Model/AgreementsValidator.php b/app/code/Magento/Checkout/Model/AgreementsValidator.php index 031d2fd5a6275..7d36e924ca7cc 100644 --- a/app/code/Magento/Checkout/Model/AgreementsValidator.php +++ b/app/code/Magento/Checkout/Model/AgreementsValidator.php @@ -17,6 +17,7 @@ class AgreementsValidator implements \Magento\Checkout\Api\AgreementsValidatorIn * * @return bool * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @codeCoverageIgnore */ public function isValid($agreementIds = []) { diff --git a/app/code/Magento/Checkout/Model/Cart.php b/app/code/Magento/Checkout/Model/Cart.php index 3e20a3e4bf1c2..952ee677f7c8f 100644 --- a/app/code/Magento/Checkout/Model/Cart.php +++ b/app/code/Magento/Checkout/Model/Cart.php @@ -103,6 +103,7 @@ class Cart extends DataObject implements CartInterface * @param \Magento\Quote\Model\QuoteRepository $quoteRepository * @param ProductRepositoryInterface $productRepository * @param array $data + * @codeCoverageIgnore * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -137,6 +138,7 @@ public function __construct( * Get shopping cart resource model * * @return \Magento\Checkout\Model\Resource\Cart + * @codeCoverageIgnore */ protected function _getResource() { @@ -147,6 +149,7 @@ protected function _getResource() * Retrieve checkout session model * * @return Session + * @codeCoverageIgnore */ public function getCheckoutSession() { @@ -157,6 +160,7 @@ public function getCheckoutSession() * Retrieve customer session model * * @return \Magento\Customer\Model\Session + * @codeCoverageIgnore */ public function getCustomerSession() { @@ -212,6 +216,7 @@ public function getQuote() * * @param \Magento\Quote\Model\Quote $quote * @return $this + * @codeCoverageIgnore */ public function setQuote(\Magento\Quote\Model\Quote $quote) { @@ -534,6 +539,7 @@ public function updateItems($data) * * @param int $itemId * @return $this + * @codeCoverageIgnore */ public function removeItem($itemId) { @@ -567,6 +573,7 @@ public function save() * Save cart (implement interface method) * * @return void + * @codeCoverageIgnore */ public function saveQuote() { @@ -577,6 +584,7 @@ public function saveQuote() * Mark all quote items as deleted (empty shopping cart) * * @return $this + * @codeCoverageIgnore */ public function truncate() { @@ -632,6 +640,7 @@ public function getSummaryQty() * Get shopping cart items count * * @return int + * @codeCoverageIgnore */ public function getItemsCount() { @@ -642,6 +651,7 @@ public function getItemsCount() * Get shopping cart summary qty * * @return int|float + * @codeCoverageIgnore */ public function getItemsQty() { diff --git a/app/code/Magento/Checkout/Model/Cart/CollectQuote.php b/app/code/Magento/Checkout/Model/Cart/CollectQuote.php index 170f2e6a9cb08..5b3f7841635c7 100644 --- a/app/code/Magento/Checkout/Model/Cart/CollectQuote.php +++ b/app/code/Magento/Checkout/Model/Cart/CollectQuote.php @@ -44,6 +44,7 @@ class CollectQuote * @param \Magento\Quote\Api\Data\EstimateAddressInterfaceFactory $estimatedAddressFactory * @param \Magento\Quote\Api\ShippingMethodManagementInterface $shippingMethodManager * @param \Magento\Quote\Model\QuoteRepository $quoteRepository + * @codeCoverageIgnore */ public function __construct( \Magento\Customer\Model\Session $customerSession, diff --git a/app/code/Magento/Checkout/Model/Cart/ImageProvider.php b/app/code/Magento/Checkout/Model/Cart/ImageProvider.php index f49b267b88a8e..392483d88cd9e 100644 --- a/app/code/Magento/Checkout/Model/Cart/ImageProvider.php +++ b/app/code/Magento/Checkout/Model/Cart/ImageProvider.php @@ -23,6 +23,7 @@ class ImageProvider /** * @param \Magento\Quote\Api\CartItemRepositoryInterface $itemRepository * @param \Magento\Checkout\CustomerData\ItemPoolInterface $itemPool + * @codeCoverageIgnore */ public function __construct( \Magento\Quote\Api\CartItemRepositoryInterface $itemRepository, diff --git a/app/code/Magento/Checkout/Model/CompositeConfigProvider.php b/app/code/Magento/Checkout/Model/CompositeConfigProvider.php index de31d67a03ada..ac45927bad57c 100644 --- a/app/code/Magento/Checkout/Model/CompositeConfigProvider.php +++ b/app/code/Magento/Checkout/Model/CompositeConfigProvider.php @@ -14,6 +14,7 @@ class CompositeConfigProvider implements ConfigProviderInterface /** * @param ConfigProviderInterface[] $configProviders + * @codeCoverageIgnore */ public function __construct( array $configProviders diff --git a/app/code/Magento/Checkout/Model/Config/Source/Cart/Summary.php b/app/code/Magento/Checkout/Model/Config/Source/Cart/Summary.php index dbecaf5ce81dc..7291f5acafc69 100644 --- a/app/code/Magento/Checkout/Model/Config/Source/Cart/Summary.php +++ b/app/code/Magento/Checkout/Model/Config/Source/Cart/Summary.php @@ -9,6 +9,7 @@ class Summary implements \Magento\Framework\Option\ArrayInterface { /** * @return array + * @codeCoverageIgnore */ public function toOptionArray() { diff --git a/app/code/Magento/Checkout/Model/DefaultConfigProvider.php b/app/code/Magento/Checkout/Model/DefaultConfigProvider.php index 4a5664f0bc19c..a02455a1068aa 100644 --- a/app/code/Magento/Checkout/Model/DefaultConfigProvider.php +++ b/app/code/Magento/Checkout/Model/DefaultConfigProvider.php @@ -195,6 +195,7 @@ class DefaultConfigProvider implements ConfigProviderInterface * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Quote\Api\PaymentMethodManagementInterface $paymentMethodManagement * @param UrlInterface $urlBuilder + * @codeCoverageIgnore * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -310,6 +311,7 @@ public function getConfig() * Is autocomplete enabled for storefront * * @return string + * @codeCoverageIgnore */ private function isAutocompleteEnabled() { @@ -429,6 +431,7 @@ protected function getFormattedOptionValue($item) * Retrieve customer registration URL * * @return string + * @codeCoverageIgnore */ public function getRegisterUrl() { @@ -439,6 +442,7 @@ public function getRegisterUrl() * Retrieve checkout URL * * @return string + * @codeCoverageIgnore */ public function getCheckoutUrl() { @@ -449,6 +453,7 @@ public function getCheckoutUrl() * Retrieve checkout URL * * @return string + * @codeCoverageIgnore */ public function pageNotFoundUrl() { @@ -479,6 +484,7 @@ private function getSelectedShippingMethod() * Retrieve store code * * @return string + * @codeCoverageIgnore */ private function getStoreCode() { @@ -489,6 +495,7 @@ private function getStoreCode() * Check if guest checkout is allowed * * @return bool + * @codeCoverageIgnore */ private function isGuestCheckoutAllowed() { @@ -499,6 +506,7 @@ private function isGuestCheckoutAllowed() * Check if customer is logged in * * @return bool + * @codeCoverageIgnore */ private function isCustomerLoggedIn() { @@ -509,6 +517,7 @@ private function isCustomerLoggedIn() * Check if customer must be logged in to proceed with checkout * * @return bool + * @codeCoverageIgnore */ private function isCustomerLoginRequired() { @@ -519,6 +528,7 @@ private function isCustomerLoginRequired() * Return forgot password URL * * @return string + * @codeCoverageIgnore */ private function getForgotPasswordUrl() { @@ -529,6 +539,7 @@ private function getForgotPasswordUrl() * Return base static url. * * @return string + * @codeCoverageIgnore */ protected function getStaticBaseUrl() { diff --git a/app/code/Magento/Checkout/Model/GuestPaymentInformationManagement.php b/app/code/Magento/Checkout/Model/GuestPaymentInformationManagement.php index dabf5e5e7e926..7da2c8f274b1a 100644 --- a/app/code/Magento/Checkout/Model/GuestPaymentInformationManagement.php +++ b/app/code/Magento/Checkout/Model/GuestPaymentInformationManagement.php @@ -48,6 +48,7 @@ class GuestPaymentInformationManagement implements \Magento\Checkout\Api\GuestPa * @param PaymentInformationManagement $paymentInformationManagement * @param \Magento\Quote\Model\QuoteIdMaskFactory $quoteIdMaskFactory * @param CartRepositoryInterface $cartRepository + * @codeCoverageIgnore */ public function __construct( \Magento\Quote\Api\GuestBillingAddressManagementInterface $billingAddressManagement, diff --git a/app/code/Magento/Checkout/Model/GuestShippingInformationManagement.php b/app/code/Magento/Checkout/Model/GuestShippingInformationManagement.php index 3b976b5eb0154..74bdc5d095db8 100644 --- a/app/code/Magento/Checkout/Model/GuestShippingInformationManagement.php +++ b/app/code/Magento/Checkout/Model/GuestShippingInformationManagement.php @@ -20,6 +20,7 @@ class GuestShippingInformationManagement implements \Magento\Checkout\Api\GuestS /** * @param \Magento\Quote\Model\QuoteIdMaskFactory $quoteIdMaskFactory * @param \Magento\Checkout\Api\ShippingInformationManagementInterface $shippingInformationManagement + * @codeCoverageIgnore */ public function __construct( \Magento\Quote\Model\QuoteIdMaskFactory $quoteIdMaskFactory, diff --git a/app/code/Magento/Checkout/Model/GuestTotalsInformationManagement.php b/app/code/Magento/Checkout/Model/GuestTotalsInformationManagement.php index 2c26b1b59ff7e..980e985924357 100644 --- a/app/code/Magento/Checkout/Model/GuestTotalsInformationManagement.php +++ b/app/code/Magento/Checkout/Model/GuestTotalsInformationManagement.php @@ -20,6 +20,7 @@ class GuestTotalsInformationManagement implements \Magento\Checkout\Api\GuestTot /** * @param \Magento\Quote\Model\QuoteIdMaskFactory $quoteIdMaskFactory * @param \Magento\Checkout\Api\TotalsInformationManagementInterface $totalsInformationManagement + * @codeCoverageIgnore */ public function __construct( \Magento\Quote\Model\QuoteIdMaskFactory $quoteIdMaskFactory, diff --git a/app/code/Magento/Checkout/Model/Layout/AbstractTotalsProcessor.php b/app/code/Magento/Checkout/Model/Layout/AbstractTotalsProcessor.php index a5cf79f7f6a0c..e2cf2a51cdf07 100644 --- a/app/code/Magento/Checkout/Model/Layout/AbstractTotalsProcessor.php +++ b/app/code/Magento/Checkout/Model/Layout/AbstractTotalsProcessor.php @@ -18,6 +18,7 @@ abstract class AbstractTotalsProcessor /** * @param ScopeConfigInterface $scopeConfig + * @codeCoverageIgnore */ public function __construct( ScopeConfigInterface $scopeConfig diff --git a/app/code/Magento/Checkout/Model/Layout/DepersonalizePlugin.php b/app/code/Magento/Checkout/Model/Layout/DepersonalizePlugin.php index 8726d579e4fea..f8dc545777cce 100644 --- a/app/code/Magento/Checkout/Model/Layout/DepersonalizePlugin.php +++ b/app/code/Magento/Checkout/Model/Layout/DepersonalizePlugin.php @@ -25,6 +25,7 @@ class DepersonalizePlugin /** * @param DepersonalizeChecker $depersonalizeChecker * @param \Magento\Checkout\Model\Session $checkoutSession + * @codeCoverageIgnore */ public function __construct( DepersonalizeChecker $depersonalizeChecker, diff --git a/app/code/Magento/Checkout/Model/PaymentInformationManagement.php b/app/code/Magento/Checkout/Model/PaymentInformationManagement.php index 67943d228886a..54fe9c13bd4df 100644 --- a/app/code/Magento/Checkout/Model/PaymentInformationManagement.php +++ b/app/code/Magento/Checkout/Model/PaymentInformationManagement.php @@ -42,6 +42,7 @@ class PaymentInformationManagement implements \Magento\Checkout\Api\PaymentInfor * @param \Magento\Quote\Api\CartManagementInterface $cartManagement * @param PaymentDetailsFactory $paymentDetailsFactory * @param \Magento\Quote\Api\CartTotalRepositoryInterface $cartTotalsRepository + * @codeCoverageIgnore */ public function __construct( \Magento\Quote\Api\BillingAddressManagementInterface $billingAddressManagement, diff --git a/app/code/Magento/Checkout/Model/Resource/Cart.php b/app/code/Magento/Checkout/Model/Resource/Cart.php index 3d8592066ec8f..277ea32346871 100644 --- a/app/code/Magento/Checkout/Model/Resource/Cart.php +++ b/app/code/Magento/Checkout/Model/Resource/Cart.php @@ -16,6 +16,7 @@ class Cart extends \Magento\Framework\Model\Resource\Db\AbstractDb * Model initialization * * @return void + * @codeCoverageIgnore */ protected function _construct() { diff --git a/app/code/Magento/Checkout/Model/Session.php b/app/code/Magento/Checkout/Model/Session.php index 27733a64629c6..e988a2f93814e 100644 --- a/app/code/Magento/Checkout/Model/Session.php +++ b/app/code/Magento/Checkout/Model/Session.php @@ -111,6 +111,7 @@ class Session extends \Magento\Framework\Session\SessionManager * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository * @param QuoteIdMaskFactory $quoteIdMaskFactory * @throws \Magento\Framework\Exception\SessionException + * @codeCoverageIgnore * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -158,6 +159,7 @@ public function __construct( * * @param CustomerInterface|null $customer * @return \Magento\Checkout\Model\Session + * @codeCoverageIgnore */ public function setCustomerData($customer) { @@ -169,6 +171,7 @@ public function setCustomerData($customer) * Check whether current session has quote * * @return bool + * @codeCoverageIgnore */ public function hasQuote() { @@ -180,6 +183,7 @@ public function hasQuote() * * @param bool $load * @return $this + * @codeCoverageIgnore */ public function setLoadInactive($load = true) { @@ -275,6 +279,7 @@ public function getQuote() /** * @return string + * @codeCoverageIgnore */ protected function _getQuoteIdKey() { @@ -284,6 +289,7 @@ protected function _getQuoteIdKey() /** * @param int $quoteId * @return void + * @codeCoverageIgnore */ public function setQuoteId($quoteId) { @@ -292,6 +298,7 @@ public function setQuoteId($quoteId) /** * @return int + * @codeCoverageIgnore */ public function getQuoteId() { @@ -430,6 +437,7 @@ public function clearHelperData() /** * @return $this + * @codeCoverageIgnore */ public function resetCheckout() { @@ -492,6 +500,7 @@ public function restoreQuote() /** * @param $isQuoteMasked bool * @return void + * @codeCoverageIgnore */ protected function setIsQuoteMasked($isQuoteMasked) { @@ -500,6 +509,7 @@ protected function setIsQuoteMasked($isQuoteMasked) /** * @return bool|null + * @codeCoverageIgnore */ protected function isQuoteMasked() { diff --git a/app/code/Magento/Checkout/Model/Session/SuccessValidator.php b/app/code/Magento/Checkout/Model/Session/SuccessValidator.php index f1b57d4ba0fcf..70147f9c5695d 100644 --- a/app/code/Magento/Checkout/Model/Session/SuccessValidator.php +++ b/app/code/Magento/Checkout/Model/Session/SuccessValidator.php @@ -17,6 +17,7 @@ class SuccessValidator /** * @param \Magento\Checkout\Model\Session $checkoutSession + * @codeCoverageIgnore */ public function __construct( \Magento\Checkout\Model\Session $checkoutSession diff --git a/app/code/Magento/Checkout/Model/ShippingInformationManagement.php b/app/code/Magento/Checkout/Model/ShippingInformationManagement.php index bf669ce36a16e..338a8e053e344 100644 --- a/app/code/Magento/Checkout/Model/ShippingInformationManagement.php +++ b/app/code/Magento/Checkout/Model/ShippingInformationManagement.php @@ -71,6 +71,7 @@ class ShippingInformationManagement implements \Magento\Checkout\Api\ShippingInf * @param Logger $logger * @param \Magento\Customer\Api\AddressRepositoryInterface $addressRepository * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig + * @codeCoverageIgnore */ public function __construct( \Magento\Quote\Api\PaymentMethodManagementInterface $paymentMethodManagement, diff --git a/app/code/Magento/Checkout/Model/Sidebar.php b/app/code/Magento/Checkout/Model/Sidebar.php index ee924310021e4..d985bd9589bd7 100644 --- a/app/code/Magento/Checkout/Model/Sidebar.php +++ b/app/code/Magento/Checkout/Model/Sidebar.php @@ -38,6 +38,7 @@ class Sidebar * @param Cart $cart * @param HelperData $helperData * @param ResolverInterface $resolver + * @codeCoverageIgnore */ public function __construct( Cart $cart, diff --git a/app/code/Magento/Checkout/Model/TotalsInformationManagement.php b/app/code/Magento/Checkout/Model/TotalsInformationManagement.php index 69731aa536e43..a79e3e1c3dfce 100644 --- a/app/code/Magento/Checkout/Model/TotalsInformationManagement.php +++ b/app/code/Magento/Checkout/Model/TotalsInformationManagement.php @@ -27,6 +27,7 @@ class TotalsInformationManagement implements \Magento\Checkout\Api\TotalsInforma /** * @param \Magento\Quote\Api\CartRepositoryInterface $cartRepository * @param \Magento\Quote\Api\CartTotalRepositoryInterface $cartTotalRepository + * @codeCoverageIgnore */ public function __construct( \Magento\Quote\Api\CartRepositoryInterface $cartRepository, diff --git a/app/code/Magento/Checkout/Model/Type/Onepage.php b/app/code/Magento/Checkout/Model/Type/Onepage.php index ee9079e1713c4..e3c114f9c2209 100644 --- a/app/code/Magento/Checkout/Model/Type/Onepage.php +++ b/app/code/Magento/Checkout/Model/Type/Onepage.php @@ -192,6 +192,7 @@ class Onepage * @param \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter * @param \Magento\Quote\Model\QuoteManagement $quoteManagement * @param \Magento\Framework\Api\DataObjectHelper $dataObjectHelper + * @codeCoverageIgnore * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -254,6 +255,7 @@ public function __construct( * Get frontend checkout session object * * @return \Magento\Checkout\Model\Session + * @codeCoverageIgnore */ public function getCheckout() { @@ -278,6 +280,7 @@ public function getQuote() * * @param \Magento\Quote\Model\Quote $quote * @return $this + * @codeCoverageIgnore */ public function setQuote(\Magento\Quote\Model\Quote $quote) { @@ -289,6 +292,7 @@ public function setQuote(\Magento\Quote\Model\Quote $quote) * Get customer session object * * @return \Magento\Customer\Model\Session + * @codeCoverageIgnore */ public function getCustomerSession() { @@ -982,6 +986,7 @@ public function saveOrder() * @param string $email * @param int $websiteId * @return false|\Magento\Customer\Model\Customer + * @codeCoverageIgnore */ protected function _customerEmailExists($email, $websiteId = null) { diff --git a/app/code/Magento/Checkout/Observer/LoadCustomerQuote.php b/app/code/Magento/Checkout/Observer/LoadCustomerQuote.php index 8d46ee533e9f6..ae83a93919707 100644 --- a/app/code/Magento/Checkout/Observer/LoadCustomerQuote.php +++ b/app/code/Magento/Checkout/Observer/LoadCustomerQuote.php @@ -21,6 +21,7 @@ class LoadCustomerQuote /** * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Framework\Message\ManagerInterface $messageManager + * @codeCoverageIgnore */ public function __construct( \Magento\Checkout\Model\Session $checkoutSession, diff --git a/app/code/Magento/Checkout/Observer/SalesQuoteSaveAfter.php b/app/code/Magento/Checkout/Observer/SalesQuoteSaveAfter.php index 72a2c7ef00add..bb018abfa5939 100644 --- a/app/code/Magento/Checkout/Observer/SalesQuoteSaveAfter.php +++ b/app/code/Magento/Checkout/Observer/SalesQuoteSaveAfter.php @@ -15,6 +15,7 @@ class SalesQuoteSaveAfter /** * @param \Magento\Checkout\Model\Session $checkoutSession + * @codeCoverageIgnore */ public function __construct(\Magento\Checkout\Model\Session $checkoutSession) { diff --git a/app/code/Magento/Checkout/Observer/UnsetAll.php b/app/code/Magento/Checkout/Observer/UnsetAll.php index b46685bc70dc9..c7290bcf76f80 100644 --- a/app/code/Magento/Checkout/Observer/UnsetAll.php +++ b/app/code/Magento/Checkout/Observer/UnsetAll.php @@ -15,6 +15,7 @@ class UnsetAll /** * @param \Magento\Checkout\Model\Session $checkoutSession + * @codeCoverageIgnore */ public function __construct(\Magento\Checkout\Model\Session $checkoutSession) { @@ -23,6 +24,7 @@ public function __construct(\Magento\Checkout\Model\Session $checkoutSession) /** * @return void + * @codeCoverageIgnore */ public function invoke() { diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml index 96bead5c8e45e..837c084da6f16 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml @@ -42,6 +42,11 @@ authentication + + 0 + Magento_Checkout/js/view/authentication-messages + messages + diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml index ceac006d2a6af..ade882d144cea 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml @@ -65,7 +65,6 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima setItem($_item)->toHtml() ?>
- @@ -77,12 +76,10 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima - getUnitPriceHtml($_item); ?> - @@ -104,7 +101,6 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima data-role="cart-item-qty"/>
- @@ -113,11 +109,10 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima getRowTotalHtml($_item); ?> - - +
getActions($_item) ?>
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/action/get-payment-information.js b/app/code/Magento/Checkout/view/frontend/web/js/action/get-payment-information.js index 60592f321a52d..ddb03496eda72 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/action/get-payment-information.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/action/get-payment-information.js @@ -16,7 +16,7 @@ define( function ($, quote, urlBuilder, storage, errorProcessor, customer, methodConverter, paymentService) { 'use strict'; - return function (deferred) { + return function (deferred, messageContainer) { var serviceUrl; deferred = deferred || $.Deferred(); @@ -41,7 +41,7 @@ define( } ).fail( function (response) { - errorProcessor.process(response); + errorProcessor.process(response, messageContainer); deferred.reject(); } ); diff --git a/app/code/Magento/Checkout/view/frontend/web/js/action/place-order.js b/app/code/Magento/Checkout/view/frontend/web/js/action/place-order.js index 978c47a4c3333..99b14c50921dc 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/action/place-order.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/action/place-order.js @@ -14,7 +14,7 @@ define( function (quote, urlBuilder, storage, url, errorProcessor, customer) { 'use strict'; - return function (paymentData, redirectOnSuccess) { + return function (paymentData, redirectOnSuccess, messageContainer) { var serviceUrl, payload; @@ -49,7 +49,7 @@ define( } ).fail( function (response) { - errorProcessor.process(response); + errorProcessor.process(response, messageContainer); } ); }; diff --git a/app/code/Magento/Checkout/view/frontend/web/js/action/set-payment-information.js b/app/code/Magento/Checkout/view/frontend/web/js/action/set-payment-information.js index f7e3c7468ea19..a8f578f78b2fe 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/action/set-payment-information.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/action/set-payment-information.js @@ -13,7 +13,7 @@ define( function (quote, urlBuilder, storage, errorProcessor, customer) { 'use strict'; - return function () { + return function (messageContainer) { var serviceUrl, payload, paymentData = quote.paymentMethod(); @@ -47,7 +47,7 @@ define( } ).fail( function (response) { - errorProcessor.process(response); + errorProcessor.process(response, messageContainer); } ); }; diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/authentication-messages.js b/app/code/Magento/Checkout/view/frontend/web/js/model/authentication-messages.js new file mode 100644 index 0000000000000..2ccc4e1368851 --- /dev/null +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/authentication-messages.js @@ -0,0 +1,12 @@ +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +define([ + 'ko', + 'Magento_Ui/js/model/messages' +], function (ko, Messages) { + 'use strict'; + + return new Messages(); +}); diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/error-processor.js b/app/code/Magento/Checkout/view/frontend/web/js/model/error-processor.js index 85af889cf2b5a..675f3433646ed 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/error-processor.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/error-processor.js @@ -7,16 +7,17 @@ define( 'mage/url', 'Magento_Ui/js/model/messageList' ], - function (url, messageList) { + function (url, globalMessageList) { 'use strict'; return { - process: function (response) { + process: function (response, messageContainer) { + messageContainer = messageContainer || globalMessageList; if (response.status == 401) { window.location.replace(url.build('customer/account/login/')); } else { var error = JSON.parse(response.responseText); - messageList.addErrorMessage(error); + messageContainer.addErrorMessage(error); } } }; diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/authentication-messages.js b/app/code/Magento/Checkout/view/frontend/web/js/view/authentication-messages.js new file mode 100644 index 0000000000000..2c2f5fbbf2c90 --- /dev/null +++ b/app/code/Magento/Checkout/view/frontend/web/js/view/authentication-messages.js @@ -0,0 +1,16 @@ +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +define([ + 'Magento_Ui/js/view/messages', + 'Magento_Checkout/js/model/authentication-messages' +], function (Component, messageContainer) { + 'use strict'; + + return Component.extend({ + initialize: function (config) { + return this._super(config, messageContainer); + } + }); +}); diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/authentication.js b/app/code/Magento/Checkout/view/frontend/web/js/view/authentication.js index 6cdb98af06735..06a3abe8642e6 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/view/authentication.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/view/authentication.js @@ -10,9 +10,10 @@ define( 'Magento_Ui/js/form/form', 'Magento_Customer/js/action/login', 'Magento_Customer/js/model/customer', - 'mage/validation' + 'mage/validation', + 'Magento_Checkout/js/model/authentication-messages' ], - function($, Component, loginAction, customer) { + function($, Component, loginAction, customer, validation, messageContainer) { 'use strict'; var checkoutConfig = window.checkoutConfig; @@ -43,7 +44,7 @@ define( if($(loginForm).validation() && $(loginForm).validation('isValid') ) { - loginAction(loginData, checkoutConfig.checkoutUrl); + loginAction(loginData, checkoutConfig.checkoutUrl, undefined, messageContainer); } } }); diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/payment/default.js b/app/code/Magento/Checkout/view/frontend/web/js/view/payment/default.js index 1879ad68fcb88..542cbd1100e43 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/view/payment/default.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/view/payment/default.js @@ -15,7 +15,9 @@ define( 'Magento_Checkout/js/checkout-data', 'Magento_Checkout/js/model/checkout-data-resolver', 'uiRegistry', - 'Magento_Checkout/js/model/payment/additional-validators' + 'Magento_Checkout/js/model/payment/additional-validators', + 'Magento_Ui/js/model/messages', + 'Magento_Ui/js/core/renderer/layout' ], function ( ko, @@ -29,7 +31,9 @@ define( checkoutData, checkoutDataResolver, registry, - additionalValidators + additionalValidators, + Messages, + layout ) { 'use strict'; return Component.extend({ @@ -81,6 +85,31 @@ define( * @returns {Component} Chainable. */ initChildren: function () { + this.messageContainer = new Messages(); + this.createMessagesComponent(); + + return this; + }, + + /** + * Create child message renderer component + * + * @returns {Component} Chainable. + */ + createMessagesComponent: function () { + + var messagesComponent = { + parent: this.name, + name: this.name + '.messages', + displayArea: 'messages', + component: 'Magento_Ui/js/view/messages', + config: { + messageContainer: this.messageContainer + } + }; + + layout([messagesComponent]); + return this; }, @@ -101,7 +130,7 @@ define( } if (emailValidationResult && this.validate() && additionalValidators.validate()) { this.isPlaceOrderActionAllowed(false); - placeOrder = placeOrderAction(this.getData(), this.redirectAfterPlaceOrder); + placeOrder = placeOrderAction(this.getData(), this.redirectAfterPlaceOrder, this.messageContainer); $.when(placeOrder).fail(function () { self.isPlaceOrderActionAllowed(true); diff --git a/app/code/Magento/Checkout/view/frontend/web/template/authentication.html b/app/code/Magento/Checkout/view/frontend/web/template/authentication.html index 41989fcbf0e60..3ef490b0e4b12 100644 --- a/app/code/Magento/Checkout/view/frontend/web/template/authentication.html +++ b/app/code/Magento/Checkout/view/frontend/web/template/authentication.html @@ -36,6 +36,9 @@ aria-level="2" data-bind="i18n: 'Sign In'"> + + +
_objectManager = $objectManager; $this->string = $string; } diff --git a/app/code/Magento/Eav/Model/AttributeFactory.php b/app/code/Magento/Eav/Model/AttributeFactory.php index a264d2ed927ef..12d8b24a652de 100644 --- a/app/code/Magento/Eav/Model/AttributeFactory.php +++ b/app/code/Magento/Eav/Model/AttributeFactory.php @@ -9,6 +9,7 @@ * EAV attribute model factory * * @author Magento Core Team + * @codeCoverageIgnore */ class AttributeFactory { diff --git a/app/code/Magento/Eav/Model/AttributeManagement.php b/app/code/Magento/Eav/Model/AttributeManagement.php index b687a853039e3..661b8014c716f 100644 --- a/app/code/Magento/Eav/Model/AttributeManagement.php +++ b/app/code/Magento/Eav/Model/AttributeManagement.php @@ -55,6 +55,7 @@ class AttributeManagement implements \Magento\Eav\Api\AttributeManagementInterfa * @param \Magento\Eav\Api\AttributeGroupRepositoryInterface $groupRepository * @param \Magento\Eav\Api\AttributeRepositoryInterface $attributeRepository * @param Resource\Entity\Attribute $attributeResource + * @codeCoverageIgnore */ public function __construct( \Magento\Eav\Api\AttributeSetRepositoryInterface $setRepository, diff --git a/app/code/Magento/Eav/Model/AttributeRepository.php b/app/code/Magento/Eav/Model/AttributeRepository.php index 8af0743f8376e..92441d5b4b633 100644 --- a/app/code/Magento/Eav/Model/AttributeRepository.php +++ b/app/code/Magento/Eav/Model/AttributeRepository.php @@ -54,6 +54,7 @@ class AttributeRepository implements \Magento\Eav\Api\AttributeRepositoryInterfa * @param \Magento\Eav\Api\Data\AttributeSearchResultsInterfaceFactory $searchResultsFactory * @param Entity\AttributeFactory $attributeFactory * @param \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor + * @codeCoverageIgnore */ public function __construct( \Magento\Eav\Model\Config $eavConfig, diff --git a/app/code/Magento/Eav/Model/AttributeSetManagement.php b/app/code/Magento/Eav/Model/AttributeSetManagement.php index 4b155096bdb03..ae243ec682092 100644 --- a/app/code/Magento/Eav/Model/AttributeSetManagement.php +++ b/app/code/Magento/Eav/Model/AttributeSetManagement.php @@ -26,6 +26,7 @@ class AttributeSetManagement implements AttributeSetManagementInterface /** * @param Config $eavConfig * @param AttributeSetRepositoryInterface $repository + * @codeCoverageIgnore */ public function __construct( EavConfig $eavConfig, diff --git a/app/code/Magento/Eav/Model/AttributeSetRepository.php b/app/code/Magento/Eav/Model/AttributeSetRepository.php index 3cc9a46867910..51fb26e627c00 100644 --- a/app/code/Magento/Eav/Model/AttributeSetRepository.php +++ b/app/code/Magento/Eav/Model/AttributeSetRepository.php @@ -58,6 +58,7 @@ class AttributeSetRepository implements AttributeSetRepositoryInterface * @param Config $eavConfig * @param \Magento\Eav\Api\Data\AttributeSetSearchResultsInterfaceFactory $searchResultFactory * @param \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor + * @codeCoverageIgnore */ public function __construct( AttributeSetResource $attributeSetResource, diff --git a/app/code/Magento/Eav/Model/Cache/Type.php b/app/code/Magento/Eav/Model/Cache/Type.php index d03a3f690ca47..9ac35e7aeb6de 100644 --- a/app/code/Magento/Eav/Model/Cache/Type.php +++ b/app/code/Magento/Eav/Model/Cache/Type.php @@ -24,6 +24,7 @@ class Type extends \Magento\Framework\Cache\Frontend\Decorator\TagScope /** * @param \Magento\Framework\App\Cache\Type\FrontendPool $cacheFrontendPool + * @codeCoverageIgnore */ public function __construct(\Magento\Framework\App\Cache\Type\FrontendPool $cacheFrontendPool) { diff --git a/app/code/Magento/Eav/Model/Config.php b/app/code/Magento/Eav/Model/Config.php index 82979ba1850c4..bddbc821e020b 100644 --- a/app/code/Magento/Eav/Model/Config.php +++ b/app/code/Magento/Eav/Model/Config.php @@ -98,6 +98,7 @@ class Config * @param \Magento\Eav\Model\Resource\Entity\Type\CollectionFactory $entityTypeCollectionFactory * @param \Magento\Framework\App\Cache\StateInterface $cacheState * @param \Magento\Framework\Validator\UniversalFactory $universalFactory + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\App\CacheInterface $cache, @@ -117,6 +118,7 @@ public function __construct( * Get cache interface * * @return \Magento\Framework\App\CacheInterface + * @codeCoverageIgnore */ public function getCache() { @@ -161,6 +163,7 @@ protected function _load($id) * @param mixed $obj * @param mixed $id * @return $this + * @codeCoverageIgnore */ protected function _save($obj, $id) { @@ -174,6 +177,7 @@ protected function _save($obj, $id) * @param int $id * @param string $code * @return $this + * @codeCoverageIgnore */ protected function _addEntityTypeReference($id, $code) { @@ -226,6 +230,7 @@ protected function _getAttributeReference($id, $entityTypeCode) * * @param string $code * @return string + * @codeCoverageIgnore */ protected function _getEntityKey($code) { @@ -238,6 +243,7 @@ protected function _getEntityKey($code) * @param string $entityTypeCode * @param string $attributeCode * @return string + * @codeCoverageIgnore */ protected function _getAttributeKey($entityTypeCode, $attributeCode) { diff --git a/app/code/Magento/Eav/Model/EavCustomAttributeTypeLocator.php b/app/code/Magento/Eav/Model/EavCustomAttributeTypeLocator.php index 489d1c3048990..7211951e69bae 100644 --- a/app/code/Magento/Eav/Model/EavCustomAttributeTypeLocator.php +++ b/app/code/Magento/Eav/Model/EavCustomAttributeTypeLocator.php @@ -38,6 +38,7 @@ class EavCustomAttributeTypeLocator implements CustomAttributeTypeLocatorInterfa /** * Initialize EavCustomAttributeTypeLocator * + * @codeCoverageIgnore * @param AttributeRepositoryInterface $attributeRepository Attribute repository service * @param \Magento\Framework\Stdlib\StringUtils $stringUtility * @param array $serviceEntityTypeMap Service Entity Map diff --git a/app/code/Magento/Eav/Model/Entity.php b/app/code/Magento/Eav/Model/Entity.php index 9f344e63ed3d9..a15f8e277d4df 100644 --- a/app/code/Magento/Eav/Model/Entity.php +++ b/app/code/Magento/Eav/Model/Entity.php @@ -28,6 +28,7 @@ class Entity extends \Magento\Eav\Model\Entity\AbstractEntity /** * @param Entity\Context $context * @param array $data + * @codeCoverageIgnore */ public function __construct(\Magento\Eav\Model\Entity\Context $context, $data = []) { diff --git a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php index 574a73dbfa352..e7c109433c91b 100644 --- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php @@ -225,6 +225,7 @@ public function __construct(Context $context, $data = []) * @deprecated * @param \Magento\Framework\DB\Adapter\AdapterInterface|string $connection * @return $this + * @codeCoverageIgnore */ public function setConnection($connection) { @@ -245,6 +246,7 @@ protected function _construct() * Get connection * * @return \Magento\Framework\DB\Adapter\AdapterInterface + * @codeCoverageIgnore */ public function getConnection() { @@ -255,6 +257,7 @@ public function getConnection() * For compatibility with AbstractModel * * @return string + * @codeCoverageIgnore */ public function getIdFieldName() { @@ -266,6 +269,7 @@ public function getIdFieldName() * * @param string $alias * @return string + * @codeCoverageIgnore */ public function getTable($alias) { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute.php b/app/code/Magento/Eav/Model/Entity/Attribute.php index bc133273b4e0d..768201194f84e 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute.php @@ -91,6 +91,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute\AbstractAttribute im * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection * @param array $data * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\Model\Context $context, @@ -163,16 +164,6 @@ protected function _getDefaultBackendModel() return parent::_getDefaultBackendModel(); } - /** - * Retrieve default attribute frontend model - * - * @return string - */ - protected function _getDefaultFrontendModel() - { - return parent::_getDefaultFrontendModel(); - } - /** * Retrieve default attribute source model * @@ -190,6 +181,7 @@ protected function _getDefaultSourceModel() * Delete entity * * @return \Magento\Eav\Model\Resource\Entity\Attribute + * @codeCoverageIgnore */ public function deleteEntity() { @@ -403,6 +395,7 @@ public function getDefaultValueByInput($type) * * @param string $type * @return array + * @codeCoverageIgnore */ public function getAttributeCodesByFrontendType($type) { @@ -464,6 +457,7 @@ public function getSortWeight($setId) * Get identities * * @return array + * @codeCoverageIgnore */ public function getIdentities() { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php b/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php index ce15220c8365e..9f0c790fed722 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php @@ -128,6 +128,7 @@ abstract class AbstractAttribute extends \Magento\Framework\Model\AbstractExtens * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection * @param array $data * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\Model\Context $context, @@ -169,6 +170,7 @@ public function __construct( * Initialize resource model * * @return void + * @codeCoverageIgnore */ protected function _construct() { @@ -207,6 +209,7 @@ public function loadByCode($entityType, $code) * Get attribute name * * @return string + * @codeCoverageIgnore */ public function getName() { @@ -218,6 +221,7 @@ public function getName() * * @param int $data * @return $this + * @codeCoverageIgnore */ public function setAttributeId($data) { @@ -227,6 +231,7 @@ public function setAttributeId($data) /** * {@inheritdoc} + * @codeCoverageIgnore */ public function getAttributeId() { @@ -236,6 +241,7 @@ public function getAttributeId() /** * @param string $data * @return $this + * @codeCoverageIgnore */ public function setAttributeCode($data) { @@ -244,6 +250,7 @@ public function setAttributeCode($data) /** * {@inheritdoc} + * @codeCoverageIgnore */ public function getAttributeCode() { @@ -253,6 +260,7 @@ public function getAttributeCode() /** * @param array $data * @return $this + * @codeCoverageIgnore */ public function setAttributeModel($data) { @@ -261,6 +269,7 @@ public function setAttributeModel($data) /** * @return array + * @codeCoverageIgnore */ public function getAttributeModel() { @@ -270,6 +279,7 @@ public function getAttributeModel() /** * @param string $data * @return $this + * @codeCoverageIgnore */ public function setBackendType($data) { @@ -278,6 +288,7 @@ public function setBackendType($data) /** * {@inheritdoc} + * @codeCoverageIgnore */ public function getBackendType() { @@ -287,6 +298,7 @@ public function getBackendType() /** * @param string $data * @return $this + * @codeCoverageIgnore */ public function setBackendModel($data) { @@ -295,6 +307,7 @@ public function setBackendModel($data) /** * {@inheritdoc} + * @codeCoverageIgnore */ public function getBackendModel() { @@ -304,6 +317,7 @@ public function getBackendModel() /** * @param string $data * @return $this + * @codeCoverageIgnore */ public function setBackendTable($data) { @@ -313,6 +327,7 @@ public function setBackendTable($data) /** * @return bool * @SuppressWarnings(PHPMD.BooleanGetMethodName) + * @codeCoverageIgnore */ public function getIsVisibleOnFront() { @@ -321,6 +336,7 @@ public function getIsVisibleOnFront() /** * @return string|int|bool|float + * @codeCoverageIgnore */ public function getDefaultValue() { @@ -332,6 +348,7 @@ public function getDefaultValue() * * @param string $defaultValue * @return $this + * @codeCoverageIgnore */ public function setDefaultValue($defaultValue) { @@ -340,6 +357,7 @@ public function setDefaultValue($defaultValue) /** * @return int + * @codeCoverageIgnore */ public function getAttributeSetId() { @@ -349,6 +367,7 @@ public function getAttributeSetId() /** * @param int $id * @return $this + * @codeCoverageIgnore */ public function setAttributeSetId($id) { @@ -358,6 +377,7 @@ public function setAttributeSetId($id) /** * {@inheritdoc} + * @codeCoverageIgnore */ public function getEntityTypeId() { @@ -367,6 +387,7 @@ public function getEntityTypeId() /** * @param int|string $id * @return $this + * @codeCoverageIgnore */ public function setEntityTypeId($id) { @@ -377,6 +398,7 @@ public function setEntityTypeId($id) /** * @param string $type * @return $this + * @codeCoverageIgnore */ public function setEntityType($type) { @@ -406,6 +428,7 @@ public function getAlias($entity = null) * * @param string $name * @return $this + * @codeCoverageIgnore */ public function setName($name) { @@ -416,6 +439,7 @@ public function setName($name) * Retrieve entity type * * @return string + * @codeCoverageIgnore */ public function getEntityType() { @@ -427,6 +451,7 @@ public function getEntityType() * * @param \Magento\Eav\Model\Entity\AbstractEntity $entity * @return $this + * @codeCoverageIgnore */ public function setEntity($entity) { @@ -451,6 +476,7 @@ public function getEntity() * Retrieve entity type * * @return string + * @codeCoverageIgnore */ public function getEntityIdField() { @@ -536,6 +562,7 @@ public function usesSource() /** * @return string + * @codeCoverageIgnore */ protected function _getDefaultBackendModel() { @@ -544,6 +571,7 @@ protected function _getDefaultBackendModel() /** * @return string + * @codeCoverageIgnore */ protected function _getDefaultFrontendModel() { @@ -552,6 +580,7 @@ protected function _getDefaultFrontendModel() /** * @return string + * @codeCoverageIgnore */ protected function _getDefaultSourceModel() { @@ -1179,6 +1208,7 @@ public function getValidationRules() * * @param \Magento\Eav\Api\Data\AttributeValidationRuleInterface[] $validationRules * @return $this + * @codeCoverageIgnore */ public function setValidationRules(array $validationRules = null) { @@ -1189,6 +1219,7 @@ public function setValidationRules(array $validationRules = null) * {@inheritdoc} * * @return \Magento\Eav\Api\Data\AttributeExtensionInterface|null + * @codeCoverageIgnore */ public function getExtensionAttributes() { @@ -1200,6 +1231,7 @@ public function getExtensionAttributes() * * @param \Magento\Eav\Api\Data\AttributeExtensionInterface $extensionAttributes * @return $this + * @codeCoverageIgnore */ public function setExtensionAttributes(\Magento\Eav\Api\Data\AttributeExtensionInterface $extensionAttributes) { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/AbstractBackend.php b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/AbstractBackend.php index f6e7433f084ad..0a68c287a4730 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/AbstractBackend.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/AbstractBackend.php @@ -60,6 +60,7 @@ abstract class AbstractBackend implements \Magento\Eav\Model\Entity\Attribute\Ba * * @param \Magento\Eav\Model\Entity\Attribute\AbstractAttribute $attribute * @return $this + * @codeCoverageIgnore */ public function setAttribute($attribute) { @@ -71,6 +72,7 @@ public function setAttribute($attribute) * Get attribute instance * * @return \Magento\Eav\Model\Entity\Attribute\AbstractAttribute + * @codeCoverageIgnore */ public function getAttribute() { @@ -81,6 +83,7 @@ public function getAttribute() * Get backend type of the attribute * * @return string + * @codeCoverageIgnore */ public function getType() { @@ -91,6 +94,7 @@ public function getType() * Check whether the attribute is a real field in the entity table * * @return bool + * @codeCoverageIgnore */ public function isStatic() { @@ -142,6 +146,7 @@ public function getEntityIdField() * * @param int $valueId * @return $this + * @codeCoverageIgnore */ public function setValueId($valueId) { @@ -170,6 +175,7 @@ public function setEntityValueId($entity, $valueId) * Retrieve value id * * @return int + * @codeCoverageIgnore */ public function getValueId() { @@ -249,6 +255,7 @@ public function validate($object) * @param \Magento\Framework\DataObject $object * @return $this * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @codeCoverageIgnore */ public function afterLoad($object) { @@ -277,6 +284,7 @@ public function beforeSave($object) * @param \Magento\Framework\DataObject $object * @return $this * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @codeCoverageIgnore */ public function afterSave($object) { @@ -289,6 +297,7 @@ public function afterSave($object) * @param \Magento\Framework\DataObject $object * @return $this * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @codeCoverageIgnore */ public function beforeDelete($object) { @@ -301,6 +310,7 @@ public function beforeDelete($object) * @param \Magento\Framework\DataObject $object * @return $this * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @codeCoverageIgnore */ public function afterDelete($object) { @@ -327,6 +337,7 @@ public function getAffectedFields($object) * By default attribute value is considered scalar that can be stored in a generic way * * {@inheritdoc} + * @codeCoverageIgnore */ public function isScalar() { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php index 179122454e59f..d3bce34a5e3b0 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php @@ -17,6 +17,7 @@ class Datetime extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBacke /** * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate + * @codeCoverageIgnore */ public function __construct(\Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate) { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Store.php b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Store.php index a0d8c0dc32e0c..602607b7ef1fd 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Store.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Store.php @@ -14,6 +14,7 @@ class Store extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend /** * @param \Magento\Store\Model\StoreManagerInterface $storeManager + * @codeCoverageIgnore */ public function __construct(\Magento\Store\Model\StoreManagerInterface $storeManager) { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Time/Created.php b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Time/Created.php index 661ca2eb71dac..f27ce927beefd 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Time/Created.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Time/Created.php @@ -17,6 +17,7 @@ class Created extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBacken /** * @param \Magento\Framework\Stdlib\DateTime $dateTime + * @codeCoverageIgnore */ public function __construct(\Magento\Framework\Stdlib\DateTime $dateTime) { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Time/Updated.php b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Time/Updated.php index 83bc047f45c3a..060c7d4c04edb 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Time/Updated.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Time/Updated.php @@ -17,6 +17,7 @@ class Updated extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBacken /** * @param \Magento\Framework\Stdlib\DateTime $dateTime + * @codeCoverageIgnore */ public function __construct(\Magento\Framework\Stdlib\DateTime $dateTime) { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Config.php b/app/code/Magento/Eav/Model/Entity/Attribute/Config.php index 373b0a8736a2d..cf66996674b44 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Config.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Config.php @@ -11,6 +11,7 @@ class Config extends \Magento\Framework\Config\Data * @param \Magento\Eav\Model\Entity\Attribute\Config\Reader $reader * @param \Magento\Framework\Config\CacheInterface $cache * @param string $cacheId + * @codeCoverageIgnore */ public function __construct( \Magento\Eav\Model\Entity\Attribute\Config\Reader $reader, diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Config/Reader.php b/app/code/Magento/Eav/Model/Entity/Attribute/Config/Reader.php index 07f1b8c21284e..445f467089fa8 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Config/Reader.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Config/Reader.php @@ -25,6 +25,7 @@ class Reader extends \Magento\Framework\Config\Reader\Filesystem * @param \Magento\Eav\Model\Entity\Attribute\Config\Converter $converter * @param \Magento\Eav\Model\Entity\Attribute\Config\SchemaLocator $schemaLocator * @param \Magento\Framework\Config\ValidationStateInterface $validationState + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\Config\FileResolverInterface $fileResolver, diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Config/SchemaLocator.php b/app/code/Magento/Eav/Model/Entity/Attribute/Config/SchemaLocator.php index 661ddeaa29626..9b37dcbd61f6b 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Config/SchemaLocator.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Config/SchemaLocator.php @@ -18,6 +18,7 @@ class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface /** * @param \Magento\Framework\Module\Dir\Reader $moduleReader + * @codeCoverageIgnore */ public function __construct(\Magento\Framework\Module\Dir\Reader $moduleReader) { @@ -28,6 +29,7 @@ public function __construct(\Magento\Framework\Module\Dir\Reader $moduleReader) * Get path to merged config schema * * @return string|null + * @codeCoverageIgnore */ public function getSchema() { @@ -38,6 +40,7 @@ public function getSchema() * Get path to per file validation schema * * @return string|null + * @codeCoverageIgnore */ public function getPerFileSchema() { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Exception.php b/app/code/Magento/Eav/Model/Entity/Attribute/Exception.php index 423c51fb6554b..6d29a1a73c012 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Exception.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Exception.php @@ -32,6 +32,7 @@ class Exception extends \Magento\Framework\Exception\LocalizedException * * @param string $attribute * @return $this + * @codeCoverageIgnore */ public function setAttributeCode($attribute) { @@ -44,6 +45,7 @@ public function setAttributeCode($attribute) * * @param string $part * @return $this + * @codeCoverageIgnore */ public function setPart($part) { @@ -55,6 +57,7 @@ public function setPart($part) * Retrieve Eav entity attribute * * @return string + * @codeCoverageIgnore */ public function getAttributeCode() { @@ -65,6 +68,7 @@ public function getAttributeCode() * Retrieve Eav entity attribute part * * @return string + * @codeCoverageIgnore */ public function getPart() { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Frontend/AbstractFrontend.php b/app/code/Magento/Eav/Model/Entity/Attribute/Frontend/AbstractFrontend.php index 66dcb877caa48..65644c94f2605 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Frontend/AbstractFrontend.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Frontend/AbstractFrontend.php @@ -27,6 +27,7 @@ abstract class AbstractFrontend implements \Magento\Eav\Model\Entity\Attribute\F /** * @param \Magento\Eav\Model\Entity\Attribute\Source\BooleanFactory $attrBooleanFactory + * @codeCoverageIgnore */ public function __construct(\Magento\Eav\Model\Entity\Attribute\Source\BooleanFactory $attrBooleanFactory) { @@ -38,6 +39,7 @@ public function __construct(\Magento\Eav\Model\Entity\Attribute\Source\BooleanFa * * @param \Magento\Eav\Model\Entity\Attribute\AbstractAttribute $attribute * @return $this + * @codeCoverageIgnore */ public function setAttribute($attribute) { @@ -49,6 +51,7 @@ public function setAttribute($attribute) * Get attribute instance * * @return \Magento\Eav\Model\Entity\Attribute\AbstractAttribute + * @codeCoverageIgnore */ public function getAttribute() { @@ -59,6 +62,7 @@ public function getAttribute() * Get attribute type for user interface form * * @return string + * @codeCoverageIgnore */ public function getInputType() { @@ -117,6 +121,7 @@ public function getValue(\Magento\Framework\DataObject $object) * Checks if attribute is visible on frontend * * @return bool + * @codeCoverageIgnore */ public function isVisible() { @@ -187,6 +192,7 @@ protected function _getInputValidateClass() * * @param string $fieldName * @return mixed + * @codeCoverageIgnore */ public function getConfigField($fieldName) { @@ -222,6 +228,7 @@ public function getOption($optionId) * Retrieve Input Renderer Class * * @return string|null + * @codeCoverageIgnore */ public function getInputRendererClass() { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Frontend/Datetime.php b/app/code/Magento/Eav/Model/Entity/Attribute/Frontend/Datetime.php index ad53d8b67926d..ac3451e6df2b7 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Frontend/Datetime.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Frontend/Datetime.php @@ -18,6 +18,7 @@ class Datetime extends \Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFron /** * @param \Magento\Eav\Model\Entity\Attribute\Source\BooleanFactory $attrBooleanFactory * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate + * @codeCoverageIgnore */ public function __construct( \Magento\Eav\Model\Entity\Attribute\Source\BooleanFactory $attrBooleanFactory, diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Group.php b/app/code/Magento/Eav/Model/Entity/Attribute/Group.php index 4248f1523d4d5..d71b27a915d9d 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Group.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Group.php @@ -27,6 +27,7 @@ class Group extends \Magento\Framework\Model\AbstractExtensibleModel implements * Resource initialization * * @return void + * @codeCoverageIgnore */ protected function _construct() { @@ -37,6 +38,7 @@ protected function _construct() * Checks if current attribute group exists * * @return bool + * @codeCoverageIgnore */ public function itemExists() { @@ -47,6 +49,7 @@ public function itemExists() * Delete groups * * @return $this + * @codeCoverageIgnore */ public function deleteGroups() { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Option.php b/app/code/Magento/Eav/Model/Entity/Attribute/Option.php index 57cbb324ef7c8..8767409282052 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Option.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Option.php @@ -17,6 +17,7 @@ * @method \Magento\Eav\Model\Entity\Attribute\Option setAttributeId(int $value) * * @author Magento Core Team + * @codeCoverageIgnore */ class Option extends AbstractModel implements AttributeOptionInterface { @@ -32,7 +33,6 @@ public function _construct() /** * {@inheritdoc} - * @codeCoverageIgnoreStart */ public function getLabel() { @@ -124,5 +124,4 @@ public function setStoreLabels(array $storeLabels = null) { return $this->setData(AttributeOptionInterface::STORE_LABELS, $storeLabels); } - //@codeCoverageIgnoreEnd } diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/OptionLabel.php b/app/code/Magento/Eav/Model/Entity/Attribute/OptionLabel.php index dfb45c211041d..ed54066e9e734 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/OptionLabel.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/OptionLabel.php @@ -11,6 +11,7 @@ /** * Entity attribute option label model * + * @codeCoverageIgnore */ class OptionLabel extends AbstractModel implements AttributeOptionLabelInterface { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/OptionManagement.php b/app/code/Magento/Eav/Model/Entity/Attribute/OptionManagement.php index 188f9818c2da2..816b3fda4ded8 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/OptionManagement.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/OptionManagement.php @@ -25,6 +25,7 @@ class OptionManagement implements \Magento\Eav\Api\AttributeOptionManagementInte /** * @param \Magento\Eav\Model\AttributeRepository $attributeRepository * @param \Magento\Eav\Model\Resource\Entity\Attribute $resourceModel + * @codeCoverageIgnore */ public function __construct( \Magento\Eav\Model\AttributeRepository $attributeRepository, diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Set.php b/app/code/Magento/Eav/Model/Entity/Attribute/Set.php index efb38108d692a..7735e042ecbf3 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Set.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Set.php @@ -85,6 +85,7 @@ class Set extends \Magento\Framework\Model\AbstractExtensibleModel implements * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection * @param array $data * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\Model\Context $context, @@ -118,6 +119,7 @@ public function __construct( * Initialize resource model * * @return void + * @codeCoverageIgnore */ protected function _construct() { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Source/AbstractSource.php b/app/code/Magento/Eav/Model/Entity/Attribute/Source/AbstractSource.php index 9c805984a21cd..c3f3cbda98de2 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Source/AbstractSource.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Source/AbstractSource.php @@ -34,6 +34,7 @@ abstract class AbstractSource implements * * @param \Magento\Eav\Model\Entity\Attribute\AbstractAttribute $attribute * @return \Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFrontend + * @codeCoverageIgnore */ public function setAttribute($attribute) { @@ -45,6 +46,7 @@ public function setAttribute($attribute) * Get attribute instance * * @return \Magento\Eav\Model\Entity\Attribute\AbstractAttribute + * @codeCoverageIgnore */ public function getAttribute() { @@ -96,6 +98,7 @@ public function getOptionId($value) * @param string $dir direction * @return $this * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @codeCoverageIgnore */ public function addValueSortToCollection($collection, $dir = \Magento\Framework\Data\Collection::SORT_ORDER_DESC) { @@ -105,6 +108,7 @@ public function addValueSortToCollection($collection, $dir = \Magento\Framework\ /** * Retrieve flat column definition * + * @codeCoverageIgnore * @return array */ public function getFlatColumns() @@ -116,6 +120,7 @@ public function getFlatColumns() * Retrieve Indexes(s) for Flat * * @return array + * @codeCoverageIgnore */ public function getFlatIndexes() { @@ -128,6 +133,7 @@ public function getFlatIndexes() * @param int $store * @return \Magento\Framework\DB\Select|null * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @codeCoverageIgnore */ public function getFlatUpdateSelect($store) { @@ -139,6 +145,7 @@ public function getFlatUpdateSelect($store) * * @param string|int $value * @return string|bool + * @codeCoverageIgnore */ public function getIndexOptionText($value) { @@ -149,6 +156,7 @@ public function getIndexOptionText($value) * Get options as array * * @return array + * @codeCoverageIgnore */ public function toOptionArray() { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Source/Boolean.php b/app/code/Magento/Eav/Model/Entity/Attribute/Source/Boolean.php index 72b3af3d03b04..7d1aa44949f53 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Source/Boolean.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Source/Boolean.php @@ -21,6 +21,7 @@ class Boolean extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource /** * @param \Magento\Eav\Model\Resource\Entity\AttributeFactory $eavAttrEntity + * @codeCoverageIgnore */ public function __construct( \Magento\Eav\Model\Resource\Entity\AttributeFactory $eavAttrEntity diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Source/Config.php b/app/code/Magento/Eav/Model/Entity/Attribute/Source/Config.php index 6417cd0b506d8..780a4e72d5407 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Source/Config.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Source/Config.php @@ -21,6 +21,7 @@ class Config extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource /** * @param array $options + * @codeCoverageIgnore */ public function __construct(array $options) { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Source/Store.php b/app/code/Magento/Eav/Model/Entity/Attribute/Source/Store.php index acdff80cf8ce8..659d477f9042d 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Source/Store.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Source/Store.php @@ -21,6 +21,7 @@ class Store extends \Magento\Eav\Model\Entity\Attribute\Source\Table * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory * @param \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory $attrOptionFactory * @param \Magento\Store\Model\Resource\Store\CollectionFactory $storeCollectionFactory + * @codeCoverageIgnore */ public function __construct( \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory, diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Source/Table.php b/app/code/Magento/Eav/Model/Entity/Attribute/Source/Table.php index 82f5c2507912e..1fa86137d9fbf 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Source/Table.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Source/Table.php @@ -27,6 +27,7 @@ class Table extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource /** * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory * @param \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory $attrOptionFactory + * @codeCoverageIgnore */ public function __construct( \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory, diff --git a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php index 1efc6e8346c5d..4be3ddab952c3 100644 --- a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php +++ b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php @@ -136,6 +136,7 @@ abstract class AbstractCollection extends AbstractDb implements SourceProviderIn * @param \Magento\Eav\Model\Resource\Helper $resourceHelper * @param \Magento\Framework\Validator\UniversalFactory $universalFactory * @param mixed $connection + * @codeCoverageIgnore * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -177,6 +178,7 @@ protected function _construct() * * @param string $table * @return string + * @codeCoverageIgnore */ public function getTable($table) { @@ -264,6 +266,7 @@ public function getEntity() * Get resource instance * * @return \Magento\Framework\Model\Resource\Db\AbstractDb + * @codeCoverageIgnore */ public function getResource() { @@ -376,6 +379,7 @@ public function addAttributeToFilter($attribute, $condition = null, $joinType = * @param mixed $attribute * @param mixed $condition * @return $this|AbstractDb + * @codeCoverageIgnore */ public function addFieldToFilter($attribute, $condition = null) { @@ -494,6 +498,7 @@ public function addAttributeToSelect($attribute, $joinType = false) * @param string $entityType * @param string $prefix * @return $this + * @codeCoverageIgnore */ public function addEntityTypeToSelect($entityType, $prefix) { @@ -864,6 +869,7 @@ public function removeAttributeToSelect($attribute = null) * @param integer $pageNum * @param integer $pageSize * @return $this + * @codeCoverageIgnore */ public function setPage($pageNum, $pageSize) { @@ -1039,6 +1045,7 @@ public function exportToArray() * Retrieve row id field name * * @return string + * @codeCoverageIgnore */ public function getRowIdFieldName() { @@ -1219,6 +1226,7 @@ protected function _getLoadAttributesSelect($table, $attributeIds = []) * @param string $type * @return Select * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @codeCoverageIgnore */ protected function _addLoadAttributesSelectValues($select, $table, $type) { @@ -1509,6 +1517,7 @@ protected function _renderOrders() * After load method * * @return $this + * @codeCoverageIgnore */ protected function _afterLoad() { @@ -1538,6 +1547,7 @@ protected function _reset() * Returns already loaded element ids * * @return array + * @codeCoverageIgnore */ public function getLoadedIds() { @@ -1597,6 +1607,7 @@ public function getMainTable() * @SuppressWarnings(PHPMD.UnusedFormalParameter) * @return $this|\Magento\Framework\Data\Collection\AbstractDb * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @codeCoverageIgnore */ public function addFieldToSelect($field, $alias = null) { @@ -1608,6 +1619,7 @@ public function addFieldToSelect($field, $alias = null) * * @param string $field * @return $this|\Magento\Framework\Data\Collection\AbstractDb + * @codeCoverageIgnore */ public function removeFieldFromSelect($field) { @@ -1618,6 +1630,7 @@ public function removeFieldFromSelect($field) * Wrapper for compatibility with \Magento\Framework\Data\Collection\AbstractDb * * @return $this|\Magento\Framework\Data\Collection\AbstractDb + * @codeCoverageIgnore */ public function removeAllFieldsFromSelect() { diff --git a/app/code/Magento/Eav/Model/Entity/Collection/VersionControl/AbstractCollection.php b/app/code/Magento/Eav/Model/Entity/Collection/VersionControl/AbstractCollection.php index ed6b950604a63..c2c4a92ec165d 100644 --- a/app/code/Magento/Eav/Model/Entity/Collection/VersionControl/AbstractCollection.php +++ b/app/code/Magento/Eav/Model/Entity/Collection/VersionControl/AbstractCollection.php @@ -28,6 +28,7 @@ abstract class AbstractCollection extends \Magento\Eav\Model\Entity\Collection\A * @param \Magento\Framework\Model\Resource\Db\VersionControl\Snapshot $entitySnapshot, * @param mixed $connection * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\Data\Collection\EntityFactory $entityFactory, @@ -72,6 +73,7 @@ public function fetchItem() /** * @inheritdoc + * @codeCoverageIgnore */ protected function beforeAddLoadedItem(\Magento\Framework\DataObject $item) { diff --git a/app/code/Magento/Eav/Model/Entity/Increment/AbstractIncrement.php b/app/code/Magento/Eav/Model/Entity/Increment/AbstractIncrement.php index 05e3b2d32cd9b..05c6fa7982a09 100644 --- a/app/code/Magento/Eav/Model/Entity/Increment/AbstractIncrement.php +++ b/app/code/Magento/Eav/Model/Entity/Increment/AbstractIncrement.php @@ -64,6 +64,7 @@ public function format($id) * * @param mixed $id * @return mixed + * @codeCoverageIgnore */ public function frontendFormat($id) { diff --git a/app/code/Magento/Eav/Model/Entity/Increment/Alphanum.php b/app/code/Magento/Eav/Model/Entity/Increment/Alphanum.php index 06c71132bf982..9fa26b960cba4 100644 --- a/app/code/Magento/Eav/Model/Entity/Increment/Alphanum.php +++ b/app/code/Magento/Eav/Model/Entity/Increment/Alphanum.php @@ -21,6 +21,7 @@ class Alphanum extends \Magento\Eav\Model\Entity\Increment\AbstractIncrement * Get allowed chars * * @return string + * @codeCoverageIgnore */ public function getAllowedChars() { diff --git a/app/code/Magento/Eav/Model/Entity/Setup/Context.php b/app/code/Magento/Eav/Model/Entity/Setup/Context.php index 031c7b8ad9464..1248caa725ad2 100644 --- a/app/code/Magento/Eav/Model/Entity/Setup/Context.php +++ b/app/code/Magento/Eav/Model/Entity/Setup/Context.php @@ -7,6 +7,9 @@ */ namespace Magento\Eav\Model\Entity\Setup; +/** + * @codeCoverageIgnore + */ class Context extends \Magento\Framework\Module\Setup\Context { /** diff --git a/app/code/Magento/Eav/Model/Entity/Setup/PropertyMapper/Composite.php b/app/code/Magento/Eav/Model/Entity/Setup/PropertyMapper/Composite.php index 12e678423217b..b28ec4647aa2d 100644 --- a/app/code/Magento/Eav/Model/Entity/Setup/PropertyMapper/Composite.php +++ b/app/code/Magento/Eav/Model/Entity/Setup/PropertyMapper/Composite.php @@ -25,6 +25,7 @@ class Composite implements PropertyMapperInterface /** * @param ObjectManagerInterface $objectManager * @param array $propertyMappers + * @codeCoverageIgnore */ public function __construct(ObjectManagerInterface $objectManager, array $propertyMappers = []) { diff --git a/app/code/Magento/Eav/Model/Entity/Store.php b/app/code/Magento/Eav/Model/Entity/Store.php index c7f96a04a9416..027cbc6a2715e 100644 --- a/app/code/Magento/Eav/Model/Entity/Store.php +++ b/app/code/Magento/Eav/Model/Entity/Store.php @@ -25,6 +25,7 @@ class Store extends \Magento\Framework\Model\AbstractModel * Resource initialization * * @return void + * @codeCoverageIgnore */ protected function _construct() { @@ -37,6 +38,7 @@ protected function _construct() * @param int $entityTypeId * @param int $storeId * @return $this + * @codeCoverageIgnore */ public function loadByEntityStore($entityTypeId, $storeId) { diff --git a/app/code/Magento/Eav/Model/Entity/Type.php b/app/code/Magento/Eav/Model/Entity/Type.php index 46307fdeda4c1..0010775a90c29 100644 --- a/app/code/Magento/Eav/Model/Entity/Type.php +++ b/app/code/Magento/Eav/Model/Entity/Type.php @@ -89,6 +89,7 @@ class Type extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection * @param array $data + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\Model\Context $context, @@ -112,6 +113,7 @@ public function __construct( * Resource initialization * * @return void + * @codeCoverageIgnore */ protected function _construct() { @@ -194,6 +196,7 @@ public function getAttributeSetCollection() * * @param int $storeId * @return string + * @throws \Exception */ public function fetchNewIncrementId($storeId = null) { diff --git a/app/code/Magento/Eav/Model/Entity/VersionControl/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/VersionControl/AbstractEntity.php index 57e6f3b696c18..389fe477a0b2c 100644 --- a/app/code/Magento/Eav/Model/Entity/VersionControl/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/VersionControl/AbstractEntity.php @@ -25,6 +25,7 @@ abstract class AbstractEntity extends \Magento\Eav\Model\Entity\AbstractEntity * @param \Magento\Framework\Model\Resource\Db\VersionControl\Snapshot $entitySnapshot * @param \Magento\Framework\Model\Resource\Db\VersionControl\RelationComposite $entityRelationComposite * @param array $data + * @codeCoverageIgnore */ public function __construct( \Magento\Eav\Model\Entity\Context $context, @@ -110,6 +111,7 @@ public function save(\Magento\Framework\Model\AbstractModel $object) * * @param \Magento\Framework\Model\AbstractModel $object * @return bool + * @codeCoverageIgnore */ protected function isModified(\Magento\Framework\Model\AbstractModel $object) { diff --git a/app/code/Magento/Eav/Model/Form.php b/app/code/Magento/Eav/Model/Form.php index b4924593b708f..dc8c9428e33bc 100644 --- a/app/code/Magento/Eav/Model/Form.php +++ b/app/code/Magento/Eav/Model/Form.php @@ -210,6 +210,7 @@ protected function _getFilteredFormAttributeCollection() * * @param \Magento\Store\Model\Store|string|int $store * @return $this + * @codeCoverageIgnore */ public function setStore($store) { diff --git a/app/code/Magento/Eav/Model/Form/Element.php b/app/code/Magento/Eav/Model/Form/Element.php index 1caa6b67ef83a..ff23006ea1677 100644 --- a/app/code/Magento/Eav/Model/Form/Element.php +++ b/app/code/Magento/Eav/Model/Form/Element.php @@ -43,6 +43,7 @@ class Element extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection * @param array $data + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\Model\Context $context, @@ -60,6 +61,7 @@ public function __construct( * Initialize resource model * * @return void + * @codeCoverageIgnore */ protected function _construct() { @@ -70,6 +72,7 @@ protected function _construct() * Retrieve resource instance wrapper * * @return \Magento\Eav\Model\Resource\Form\Element + * @codeCoverageIgnore */ protected function _getResource() { @@ -80,6 +83,7 @@ protected function _getResource() * Retrieve resource collection instance wrapper * * @return \Magento\Eav\Model\Resource\Form\Element\Collection + * @codeCoverageIgnore */ public function getCollection() { diff --git a/app/code/Magento/Eav/Model/Form/Factory.php b/app/code/Magento/Eav/Model/Form/Factory.php index 58fe1a47f5736..03bf089223dda 100644 --- a/app/code/Magento/Eav/Model/Form/Factory.php +++ b/app/code/Magento/Eav/Model/Form/Factory.php @@ -17,6 +17,7 @@ class Factory /** * @param \Magento\Framework\ObjectManagerInterface $objectManager + * @codeCoverageIgnore */ public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager) { diff --git a/app/code/Magento/Eav/Model/Form/Fieldset.php b/app/code/Magento/Eav/Model/Form/Fieldset.php index 1b6f1da1b1e6b..1b2b20b088a57 100644 --- a/app/code/Magento/Eav/Model/Form/Fieldset.php +++ b/app/code/Magento/Eav/Model/Form/Fieldset.php @@ -39,6 +39,7 @@ class Fieldset extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection * @param array $data + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\Model\Context $context, @@ -56,6 +57,7 @@ public function __construct( * Initialize resource model * * @return void + * @codeCoverageIgnore */ protected function _construct() { @@ -66,6 +68,7 @@ protected function _construct() * Retrieve resource instance wrapper * * @return \Magento\Eav\Model\Resource\Form\Fieldset + * @codeCoverageIgnore */ protected function _getResource() { @@ -76,6 +79,7 @@ protected function _getResource() * Retrieve resource collection instance wrapper * * @return \Magento\Eav\Model\Resource\Form\Fieldset\Collection + * @codeCoverageIgnore */ public function getCollection() { @@ -119,6 +123,7 @@ public function getLabels() * * @param array $labels * @return $this + * @codeCoverageIgnore */ public function setLabels(array $labels) { diff --git a/app/code/Magento/Eav/Model/Form/Type.php b/app/code/Magento/Eav/Model/Form/Type.php index af6ec9848d4ed..db9d999c2216b 100644 --- a/app/code/Magento/Eav/Model/Form/Type.php +++ b/app/code/Magento/Eav/Model/Form/Type.php @@ -49,6 +49,7 @@ class Type extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection * @param array $data + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\Model\Context $context, @@ -68,6 +69,7 @@ public function __construct( * Initialize resource model * * @return void + * @codeCoverageIgnore */ protected function _construct() { @@ -78,6 +80,7 @@ protected function _construct() * Retrieve resource instance wrapper * * @return \Magento\Eav\Model\Resource\Form\Type + * @codeCoverageIgnore */ protected function _getResource() { @@ -88,6 +91,7 @@ protected function _getResource() * Retrieve resource collection instance wrapper * * @return \Magento\Eav\Model\Resource\Form\Type\Collection + * @codeCoverageIgnore */ public function getCollection() { diff --git a/app/code/Magento/Eav/Model/Resource/Attribute/Collection.php b/app/code/Magento/Eav/Model/Resource/Attribute/Collection.php index 0f4462cab82e5..94da1ce434321 100644 --- a/app/code/Magento/Eav/Model/Resource/Attribute/Collection.php +++ b/app/code/Magento/Eav/Model/Resource/Attribute/Collection.php @@ -47,6 +47,7 @@ abstract class Collection extends \Magento\Eav\Model\Resource\Entity\Attribute\C * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param mixed $connection * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\Data\Collection\EntityFactory $entityFactory, @@ -83,6 +84,7 @@ abstract protected function _getEavWebsiteTable(); * Get default attribute entity type code * * @return string + * @codeCoverageIgnore */ public function getEntityTypeCode() { @@ -214,6 +216,7 @@ protected function _initSelect() * @param int $type * @return $this * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @codeCoverageIgnore */ public function setEntityTypeFilter($type) { @@ -224,6 +227,7 @@ public function setEntityTypeFilter($type) * Specify filter by "is_visible" field * * @return $this + * @codeCoverageIgnore */ public function addVisibleFilter() { @@ -271,6 +275,7 @@ public function addSystemHiddenFilterWithPasswordHash() * Add exclude hidden frontend input attribute filter to collection * * @return $this + * @codeCoverageIgnore */ public function addExcludeHiddenFrontendFilter() { diff --git a/app/code/Magento/Eav/Model/Resource/Config.php b/app/code/Magento/Eav/Model/Resource/Config.php index bd56315b5e3fd..be2588554cb85 100644 --- a/app/code/Magento/Eav/Model/Resource/Config.php +++ b/app/code/Magento/Eav/Model/Resource/Config.php @@ -30,6 +30,7 @@ class Config extends \Magento\Framework\Model\Resource\Db\AbstractDb * Resource initialization * * @return void + * @codeCoverageIgnore */ protected function _construct() { diff --git a/app/code/Magento/Eav/Model/Resource/Entity/Attribute.php b/app/code/Magento/Eav/Model/Resource/Entity/Attribute.php index 411b4beb1f432..a7bf8db04daf3 100644 --- a/app/code/Magento/Eav/Model/Resource/Entity/Attribute.php +++ b/app/code/Magento/Eav/Model/Resource/Entity/Attribute.php @@ -41,6 +41,7 @@ class Attribute extends \Magento\Framework\Model\Resource\Db\AbstractDb * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param Type $eavEntityType * @param string $connectionName + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\Model\Resource\Db\Context $context, @@ -57,6 +58,7 @@ public function __construct( * Define main table * * @return void + * @codeCoverageIgnore */ protected function _construct() { @@ -67,6 +69,7 @@ protected function _construct() * Initialize unique fields * * @return $this + * @codeCoverageIgnore */ protected function _initUniqueFields() { @@ -555,6 +558,7 @@ public function getFlatUpdateSelect(AbstractAttribute $attribute, $storeId) * * @param string $table * @return array + * @codeCoverageIgnore */ public function describeTable($table) { @@ -566,6 +570,7 @@ public function describeTable($table) * * @param int $entityTypeId * @return string + * @codeCoverageIgnore */ public function getAdditionalAttributeTable($entityTypeId) { diff --git a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Collection.php b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Collection.php index 838db13d9a7cd..6b8f547bbd343 100644 --- a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Collection.php +++ b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Collection.php @@ -34,6 +34,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\Framework\DB\Adapter\AdapterInterface $connection * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory, @@ -52,6 +53,7 @@ public function __construct( * Resource model initialization * * @return void + * @codeCoverageIgnore */ protected function _construct() { @@ -62,6 +64,7 @@ protected function _construct() * Return array of fields to load attribute values * * @return string[] + * @codeCoverageIgnore */ protected function _getLoadDataFields() { @@ -274,6 +277,7 @@ public function setAttributeGroupFilter($groupId) * Declare group by attribute id condition for collection select * * @return $this + * @codeCoverageIgnore */ public function addAttributeGrouping() { @@ -285,6 +289,7 @@ public function addAttributeGrouping() * Specify "is_unique" filter as true * * @return $this + * @codeCoverageIgnore */ public function addIsUniqueFilter() { @@ -295,6 +300,7 @@ public function addIsUniqueFilter() * Specify "is_unique" filter as false * * @return $this + * @codeCoverageIgnore */ public function addIsNotUniqueFilter() { @@ -335,6 +341,7 @@ public function addHasOptionsFilter() * * @param string $frontendInputType * @return $this + * @codeCoverageIgnore */ public function setFrontendInputTypeFilter($frontendInputType) { @@ -346,6 +353,7 @@ public function setFrontendInputTypeFilter($frontendInputType) * * @param bool $flag * @return $this + * @codeCoverageIgnore */ public function addSetInfo($flag = true) { @@ -460,7 +468,7 @@ public function addStoreLabel($storeId) } /** - * @inheritdoc + * {@inheritdoc} */ public function getSelectCountSql() { diff --git a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Grid/Collection.php b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Grid/Collection.php index f999f97d0f7d3..911d250f8680f 100644 --- a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Grid/Collection.php +++ b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Grid/Collection.php @@ -27,6 +27,7 @@ class Collection extends \Magento\Eav\Model\Resource\Entity\Attribute\Set\Collec * @param \Magento\Framework\Registry $registryManager * @param mixed $connection * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\Data\Collection\EntityFactory $entityFactory, diff --git a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Group.php b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Group.php index 4c553dcea9f95..30952af97f89b 100644 --- a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Group.php +++ b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Group.php @@ -23,6 +23,7 @@ class Group extends \Magento\Framework\Model\Resource\Db\AbstractDb * Resource initialization * * @return void + * @codeCoverageIgnore */ protected function _construct() { diff --git a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Group/Collection.php b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Group/Collection.php index e88b3c7f3361a..ed563870f82f4 100644 --- a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Group/Collection.php +++ b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Group/Collection.php @@ -16,6 +16,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * Init resource model for collection * * @return void + * @codeCoverageIgnore */ protected function _construct() { @@ -40,6 +41,7 @@ public function setAttributeSetFilter($setId) * * @param string $direction * @return $this + * @codeCoverageIgnore */ public function setSortOrder($direction = self::SORT_ORDER_ASC) { diff --git a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Option.php b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Option.php index 6bfca44a9ae9a..8c0f7d4eda637 100644 --- a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Option.php +++ b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Option.php @@ -16,6 +16,7 @@ class Option extends \Magento\Framework\Model\Resource\Db\AbstractDb * Resource initialization * * @return void + * @codeCoverageIgnore */ protected function _construct() { diff --git a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Option/Collection.php b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Option/Collection.php index 3f1166e99e883..400a4279d272b 100644 --- a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Option/Collection.php +++ b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Option/Collection.php @@ -38,6 +38,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param mixed $connection * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\Data\Collection\EntityFactory $entityFactory, @@ -73,6 +74,7 @@ protected function _construct() * * @param int $setId * @return $this + * @codeCoverageIgnore */ public function setAttributeFilter($setId) { @@ -132,6 +134,7 @@ public function setStoreFilter($storeId = null, $useDefaultValue = true) * * @param int|array $optionId * @return $this + * @codeCoverageIgnore */ public function setIdFilter($optionId) { diff --git a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Set.php b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Set.php index 226f1f026fc9f..c0e2c69904cc5 100644 --- a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Set.php +++ b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Set.php @@ -32,6 +32,7 @@ class Set extends \Magento\Framework\Model\Resource\Db\AbstractDb * @param GroupFactory $attrGroupFactory * @param \Magento\Eav\Model\Config $eavConfig * @param string $connectionName + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\Model\Resource\Db\Context $context, @@ -48,6 +49,7 @@ public function __construct( * Initialize connection * * @return void + * @codeCoverageIgnore */ protected function _construct() { diff --git a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Set/Collection.php b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Set/Collection.php index 6e44bc8b150ab..0cacc81078d3e 100644 --- a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Set/Collection.php +++ b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Set/Collection.php @@ -16,6 +16,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * Resource initialization * * @return void + * @codeCoverageIgnore */ protected function _construct() { @@ -27,6 +28,7 @@ protected function _construct() * * @param int $typeId * @return $this + * @codeCoverageIgnore */ public function setEntityTypeFilter($typeId) { diff --git a/app/code/Magento/Eav/Model/Resource/Entity/Store.php b/app/code/Magento/Eav/Model/Resource/Entity/Store.php index 8efd378394ae5..4016f5a5c80c5 100644 --- a/app/code/Magento/Eav/Model/Resource/Entity/Store.php +++ b/app/code/Magento/Eav/Model/Resource/Entity/Store.php @@ -19,6 +19,7 @@ class Store extends \Magento\Framework\Model\Resource\Db\AbstractDb * Resource initialization * * @return void + * @codeCoverageIgnore */ protected function _construct() { diff --git a/app/code/Magento/Eav/Model/Resource/Entity/Type.php b/app/code/Magento/Eav/Model/Resource/Entity/Type.php index e42e2e5b77ccb..ad1d12e62bcb7 100644 --- a/app/code/Magento/Eav/Model/Resource/Entity/Type.php +++ b/app/code/Magento/Eav/Model/Resource/Entity/Type.php @@ -16,6 +16,7 @@ class Type extends \Magento\Framework\Model\Resource\Db\AbstractDb * Resource initialization * * @return void + * @codeCoverageIgnore */ protected function _construct() { @@ -28,6 +29,7 @@ protected function _construct() * @param \Magento\Framework\Model\AbstractModel $object * @param string $code * @return $this + * @codeCoverageIgnore */ public function loadByCode($object, $code) { diff --git a/app/code/Magento/Eav/Model/Resource/Entity/Type/Collection.php b/app/code/Magento/Eav/Model/Resource/Entity/Type/Collection.php index 155c1ae3b84e7..789bb271959c4 100644 --- a/app/code/Magento/Eav/Model/Resource/Entity/Type/Collection.php +++ b/app/code/Magento/Eav/Model/Resource/Entity/Type/Collection.php @@ -16,6 +16,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * Resource initialization * * @return void + * @codeCoverageIgnore */ protected function _construct() { diff --git a/app/code/Magento/Eav/Model/Resource/Form/Attribute/Collection.php b/app/code/Magento/Eav/Model/Resource/Form/Attribute/Collection.php index 386f93a81f17e..798acfd2bbbc2 100644 --- a/app/code/Magento/Eav/Model/Resource/Form/Attribute/Collection.php +++ b/app/code/Magento/Eav/Model/Resource/Form/Attribute/Collection.php @@ -59,6 +59,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param mixed $connection * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\Data\Collection\EntityFactory $entityFactory, @@ -100,6 +101,7 @@ protected function _construct() * If realization doesn't demand this functionality, let this function just return null * * @return string|null + * @codeCoverageIgnore */ protected function _getEavWebsiteTable() { @@ -111,6 +113,7 @@ protected function _getEavWebsiteTable() * * @param \Magento\Store\Model\Store|string|int $store * @return $this + * @codeCoverageIgnore */ public function setStore($store) { @@ -136,6 +139,7 @@ public function getStore() * * @param \Magento\Eav\Model\Entity\Type|string|int $entityType * @return $this + * @codeCoverageIgnore */ public function setEntityType($entityType) { @@ -161,6 +165,7 @@ public function getEntityType() * * @param string $code * @return $this + * @codeCoverageIgnore */ public function addFormCodeFilter($code) { diff --git a/app/code/Magento/Eav/Model/Resource/Form/Element/Collection.php b/app/code/Magento/Eav/Model/Resource/Form/Element/Collection.php index 0cc7a5184ac42..dc2e92865a465 100644 --- a/app/code/Magento/Eav/Model/Resource/Form/Element/Collection.php +++ b/app/code/Magento/Eav/Model/Resource/Form/Element/Collection.php @@ -16,6 +16,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * Initialize collection model * * @return void + * @codeCoverageIgnore */ protected function _construct() { @@ -72,6 +73,7 @@ public function addAttributeFilter($attribute) * Set order by element sort order * * @return $this + * @codeCoverageIgnore */ public function setSortOrder() { diff --git a/app/code/Magento/Eav/Model/Resource/Form/Fieldset/Collection.php b/app/code/Magento/Eav/Model/Resource/Form/Fieldset/Collection.php index 124e229106de5..c03815a72a152 100644 --- a/app/code/Magento/Eav/Model/Resource/Form/Fieldset/Collection.php +++ b/app/code/Magento/Eav/Model/Resource/Form/Fieldset/Collection.php @@ -42,6 +42,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param mixed $connection * @param AbstractDb $resource + * @codeCoverageIgnore */ public function __construct( EntityFactory $entityFactory, @@ -60,6 +61,7 @@ public function __construct( * Initialize collection model * * @return void + * @codeCoverageIgnore */ protected function _construct() { @@ -85,6 +87,7 @@ public function addTypeFilter($type) * Set order by fieldset sort order * * @return $this + * @codeCoverageIgnore */ public function setSortOrder() { @@ -110,6 +113,7 @@ public function getStoreId() * * @param int $storeId * @return $this + * @codeCoverageIgnore */ public function setStoreId($storeId) { diff --git a/app/code/Magento/Eav/Model/Resource/Form/Type/Collection.php b/app/code/Magento/Eav/Model/Resource/Form/Type/Collection.php index 79f1cb88a1015..48c0d261d3331 100644 --- a/app/code/Magento/Eav/Model/Resource/Form/Type/Collection.php +++ b/app/code/Magento/Eav/Model/Resource/Form/Type/Collection.php @@ -19,6 +19,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * Initialize collection model * * @return void + * @codeCoverageIgnore */ protected function _construct() { diff --git a/app/code/Magento/Eav/Model/Resource/Helper.php b/app/code/Magento/Eav/Model/Resource/Helper.php index 93ddbd406ab20..4a823cb783f2e 100644 --- a/app/code/Magento/Eav/Model/Resource/Helper.php +++ b/app/code/Magento/Eav/Model/Resource/Helper.php @@ -17,6 +17,7 @@ class Helper extends \Magento\Framework\DB\Helper * * @param \Magento\Framework\App\Resource $resource * @param string $modulePrefix + * @codeCoverageIgnore */ public function __construct(\Magento\Framework\App\Resource $resource, $modulePrefix = 'Magento_Eav') { diff --git a/app/code/Magento/Eav/Plugin/Model/Resource/Entity/Attribute.php b/app/code/Magento/Eav/Plugin/Model/Resource/Entity/Attribute.php index 3d0c401320f48..436d16ad8f9eb 100644 --- a/app/code/Magento/Eav/Plugin/Model/Resource/Entity/Attribute.php +++ b/app/code/Magento/Eav/Plugin/Model/Resource/Entity/Attribute.php @@ -21,6 +21,7 @@ class Attribute /** * @param \Magento\Framework\App\CacheInterface $cache * @param \Magento\Framework\App\Cache\StateInterface $cacheState + * @codeCoverageIgnore */ public function __construct( \Magento\Framework\App\CacheInterface $cache, diff --git a/app/code/Magento/GiftMessage/Block/Adminhtml/Product/Helper/Form/Config.php b/app/code/Magento/GiftMessage/Block/Adminhtml/Product/Helper/Form/Config.php index 83207d1c87424..d3493d29e56bb 100644 --- a/app/code/Magento/GiftMessage/Block/Adminhtml/Product/Helper/Form/Config.php +++ b/app/code/Magento/GiftMessage/Block/Adminhtml/Product/Helper/Form/Config.php @@ -9,6 +9,7 @@ * Adminhtml additional helper block for product configuration * * @author Magento Core Team + * @codeCoverageIgnore */ class Config extends \Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Config { diff --git a/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/Create/Giftoptions.php b/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/Create/Giftoptions.php index 806b84e53f79d..63eb8532fd6de 100644 --- a/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/Create/Giftoptions.php +++ b/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/Create/Giftoptions.php @@ -9,6 +9,7 @@ * Adminhtml sales order create gift options block * * @author Magento Core Team + * @codeCoverageIgnore */ class Giftoptions extends \Magento\Backend\Block\Template { diff --git a/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/Create/Items.php b/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/Create/Items.php index f343fce19c7d8..96e7a99d61bc1 100644 --- a/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/Create/Items.php +++ b/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/Create/Items.php @@ -35,6 +35,7 @@ public function __construct( * Get order item * * @return \Magento\Quote\Model\Quote\Item + * @codeCoverageIgnore */ public function getItem() { @@ -59,6 +60,7 @@ public function canDisplayGiftMessage() * Return form html * * @return string + * @codeCoverageIgnore */ public function getFormHtml() { diff --git a/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/View/Giftoptions.php b/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/View/Giftoptions.php index 5eed6dcc27788..d46a3aa176faa 100644 --- a/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/View/Giftoptions.php +++ b/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/View/Giftoptions.php @@ -9,6 +9,7 @@ * Adminhtml sales order view gift options block * * @author Magento Core Team + * @codeCoverageIgnore */ class Giftoptions extends \Magento\Backend\Block\Template { diff --git a/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/View/Items.php b/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/View/Items.php index d63ca3f4c738b..3ef223c244c0c 100644 --- a/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/View/Items.php +++ b/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/View/Items.php @@ -42,6 +42,7 @@ public function __construct( * Get Order Item * * @return \Magento\Sales\Model\Order\Item + * @codeCoverageIgnore */ public function getItem() { @@ -99,6 +100,7 @@ public function getDefaultRecipient() * * @param string $name * @return string + * @codeCoverageIgnore */ public function getFieldName($name) { @@ -110,6 +112,7 @@ public function getFieldName($name) * * @param string $id * @return string + * @codeCoverageIgnore */ public function getFieldId($id) { @@ -120,6 +123,7 @@ public function getFieldId($id) * Retrieve field html id prefix * * @return string + * @codeCoverageIgnore */ public function getFieldIdPrefix() { @@ -166,6 +170,7 @@ public function getMessage() * Retrieve save url * * @return array + * @codeCoverageIgnore */ public function getSaveUrl() { @@ -179,6 +184,7 @@ public function getSaveUrl() * Retrieve block html id * * @return string + * @codeCoverageIgnore */ public function getHtmlId() { diff --git a/app/code/Magento/GiftMessage/Block/Message/Inline.php b/app/code/Magento/GiftMessage/Block/Message/Inline.php index ec0d0013b1fa0..4b7d7ed035d6e 100644 --- a/app/code/Magento/GiftMessage/Block/Message/Inline.php +++ b/app/code/Magento/GiftMessage/Block/Message/Inline.php @@ -93,6 +93,7 @@ public function __construct( * * @param mixed $entity * @return $this + * @codeCoverageIgnore */ public function setEntity($entity) { @@ -104,6 +105,7 @@ public function setEntity($entity) * Get entity * * @return mixed + * @codeCoverageIgnore */ public function getEntity() { @@ -115,6 +117,7 @@ public function getEntity() * * @param string $type * @return $this + * @codeCoverageIgnore */ public function setType($type) { @@ -126,6 +129,7 @@ public function setType($type) * Get type * * @return string + * @codeCoverageIgnore */ public function getType() { @@ -137,6 +141,7 @@ public function getType() * * @param $type string * @return $this + * @codeCoverageIgnore */ public function setCheckoutType($type) { @@ -148,6 +153,7 @@ public function setCheckoutType($type) * Return checkout type. Typical values are 'onepage_checkout' and 'multishipping_address' * * @return string|null + * @codeCoverageIgnore */ public function getCheckoutType() { diff --git a/app/code/Magento/GiftMessage/Model/CartRepository.php b/app/code/Magento/GiftMessage/Model/CartRepository.php index 7cb8058bfb250..cc2ae7caae30c 100644 --- a/app/code/Magento/GiftMessage/Model/CartRepository.php +++ b/app/code/Magento/GiftMessage/Model/CartRepository.php @@ -107,7 +107,8 @@ public function save($cartId, \Magento\GiftMessage\Api\Data\MessageInterface $gi if ($quote->isVirtual()) { throw new InvalidTransitionException(__('Gift Messages is not applicable for virtual products')); } - if (!$this->helper->isMessagesAllowed('quote', $quote, $this->storeManager->getStore())) { + $messageText = $giftMessage->getMessage(); + if ($messageText && !$this->helper->isMessagesAllowed('quote', $quote, $this->storeManager->getStore())) { throw new CouldNotSaveException(__('Gift Message is not available')); } $this->giftMessageManager->setMessage($quote, 'quote', $giftMessage); diff --git a/app/code/Magento/GiftMessage/Model/ItemRepository.php b/app/code/Magento/GiftMessage/Model/ItemRepository.php index cead9782a4ec1..5c667b3052bd9 100644 --- a/app/code/Magento/GiftMessage/Model/ItemRepository.php +++ b/app/code/Magento/GiftMessage/Model/ItemRepository.php @@ -121,7 +121,8 @@ public function save($cartId, \Magento\GiftMessage\Api\Data\MessageInterface $gi if ($item->getIsVirtual()) { throw new InvalidTransitionException(__('Gift Messages is not applicable for virtual products')); } - if (!$this->helper->isMessagesAllowed('items', $quote, $this->storeManager->getStore())) { + $messageText = $giftMessage->getMessage(); + if ($messageText && !$this->helper->isMessagesAllowed('items', $quote, $this->storeManager->getStore())) { throw new CouldNotSaveException(__('Gift Message is not available')); } $this->giftMessageManager->setMessage($quote, 'quote_item', $giftMessage, $itemId); diff --git a/app/code/Magento/GiftMessage/Model/Save.php b/app/code/Magento/GiftMessage/Model/Save.php index 798412e649e9d..4dc4fbe7cdeb0 100644 --- a/app/code/Magento/GiftMessage/Model/Save.php +++ b/app/code/Magento/GiftMessage/Model/Save.php @@ -81,6 +81,7 @@ public function saveAllInQuote() /** * @return bool * @SuppressWarnings(PHPMD.BooleanGetMethodName) + * @codeCoverageIgnore */ public function getSaved() { @@ -353,6 +354,7 @@ protected function getMappedType($type) * Retrieve quote object * * @return \Magento\Quote\Model\Quote + * @codeCoverageIgnore */ protected function _getQuote() { diff --git a/app/code/Magento/GiftMessage/Test/Unit/Model/CartRepositoryTest.php b/app/code/Magento/GiftMessage/Test/Unit/Model/CartRepositoryTest.php index 2998ba06c7614..3ad550304fb43 100644 --- a/app/code/Magento/GiftMessage/Test/Unit/Model/CartRepositoryTest.php +++ b/app/code/Magento/GiftMessage/Test/Unit/Model/CartRepositoryTest.php @@ -180,6 +180,7 @@ public function testSave() ->method('setMessage') ->with($this->quoteMock, 'quote', $this->messageMock) ->will($this->returnValue($this->giftMessageManagerMock)); + $this->messageMock->expects($this->once())->method('getMessage')->willReturn('message'); $this->assertTrue($this->cartRepository->save($this->cartId, $this->messageMock)); } diff --git a/app/code/Magento/GiftMessage/Test/Unit/Model/GuestItemRepositoryTest.php b/app/code/Magento/GiftMessage/Test/Unit/Model/GuestItemRepositoryTest.php index ec445ead2172a..b20bf7bc9c43a 100644 --- a/app/code/Magento/GiftMessage/Test/Unit/Model/GuestItemRepositoryTest.php +++ b/app/code/Magento/GiftMessage/Test/Unit/Model/GuestItemRepositoryTest.php @@ -219,6 +219,7 @@ public function testSave() ->method('setMessage') ->with($this->quoteMock, 'quote_item', $this->messageMock, $itemId) ->will($this->returnValue($this->giftMessageManagerMock)); + $this->messageMock->expects($this->once())->method('getMessage')->willReturn('message'); $this->assertTrue($this->itemRepository->save($this->cartId, $this->messageMock, $itemId)); } diff --git a/app/code/Magento/GiftMessage/Test/Unit/Model/ItemRepositoryTest.php b/app/code/Magento/GiftMessage/Test/Unit/Model/ItemRepositoryTest.php index ed3f45fd157b4..999783fb546b9 100644 --- a/app/code/Magento/GiftMessage/Test/Unit/Model/ItemRepositoryTest.php +++ b/app/code/Magento/GiftMessage/Test/Unit/Model/ItemRepositoryTest.php @@ -219,6 +219,7 @@ public function testSave() ->method('setMessage') ->with($this->quoteMock, 'quote_item', $this->messageMock, $itemId) ->will($this->returnValue($this->giftMessageManagerMock)); + $this->messageMock->expects($this->once())->method('getMessage')->willReturn('message'); $this->assertTrue($this->itemRepository->save($this->cartId, $this->messageMock, $itemId)); } diff --git a/app/code/Magento/GiftMessage/view/frontend/web/js/view/gift-message.js b/app/code/Magento/GiftMessage/view/frontend/web/js/view/gift-message.js index 70a563cc3015a..dae05d712dd9b 100644 --- a/app/code/Magento/GiftMessage/view/frontend/web/js/view/gift-message.js +++ b/app/code/Magento/GiftMessage/view/frontend/web/js/view/gift-message.js @@ -62,6 +62,16 @@ define(['uiComponent', '../model/gift-message', '../model/gift-options', '../act this.resultBlockVisibility(true); } }, + hasActiveOptions: function() { + var regionData = this.getRegion('additionalOptions'); + var options = regionData(); + for (var i in options) { + if (options[i].isActive()) { + return true; + } + } + return false; + }, isActive: function() { switch (this.itemId) { case 'orderLevel': diff --git a/app/code/Magento/GiftMessage/view/frontend/web/template/gift-message-form.html b/app/code/Magento/GiftMessage/view/frontend/web/template/gift-message-form.html index 10ba17d7fad6f..d203bc6913caf 100644 --- a/app/code/Magento/GiftMessage/view/frontend/web/template/gift-message-form.html +++ b/app/code/Magento/GiftMessage/view/frontend/web/template/gift-message-form.html @@ -4,6 +4,7 @@ * See COPYING.txt for license details. */ --> +
@@ -45,19 +46,21 @@
-
-
- - + -
-
+ +
- \ No newline at end of file + diff --git a/app/code/Magento/GiftMessage/view/frontend/web/template/gift-message-item-level.html b/app/code/Magento/GiftMessage/view/frontend/web/template/gift-message-item-level.html index 9811d2d595b9a..818e355063a25 100644 --- a/app/code/Magento/GiftMessage/view/frontend/web/template/gift-message-item-level.html +++ b/app/code/Magento/GiftMessage/view/frontend/web/template/gift-message-item-level.html @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ --> - +
+ + +
diff --git a/app/code/Magento/OfflinePayments/view/frontend/web/template/payment/cashondelivery.html b/app/code/Magento/OfflinePayments/view/frontend/web/template/payment/cashondelivery.html index d7f047edeb7b9..68ef26d7759ba 100644 --- a/app/code/Magento/OfflinePayments/view/frontend/web/template/payment/cashondelivery.html +++ b/app/code/Magento/OfflinePayments/view/frontend/web/template/payment/cashondelivery.html @@ -14,6 +14,9 @@
+ + +
diff --git a/app/code/Magento/OfflinePayments/view/frontend/web/template/payment/checkmo.html b/app/code/Magento/OfflinePayments/view/frontend/web/template/payment/checkmo.html index 8aaa29f59075a..e20e15111e5b6 100644 --- a/app/code/Magento/OfflinePayments/view/frontend/web/template/payment/checkmo.html +++ b/app/code/Magento/OfflinePayments/view/frontend/web/template/payment/checkmo.html @@ -13,6 +13,9 @@
+ + +
diff --git a/app/code/Magento/OfflinePayments/view/frontend/web/template/payment/purchaseorder-form.html b/app/code/Magento/OfflinePayments/view/frontend/web/template/payment/purchaseorder-form.html index 4504a235f58bb..bb820b7730411 100644 --- a/app/code/Magento/OfflinePayments/view/frontend/web/template/payment/purchaseorder-form.html +++ b/app/code/Magento/OfflinePayments/view/frontend/web/template/payment/purchaseorder-form.html @@ -16,6 +16,9 @@
+ + +
diff --git a/app/code/Magento/Payment/view/frontend/web/template/payment/free.html b/app/code/Magento/Payment/view/frontend/web/template/payment/free.html index 1f7b3b7a51c6c..2104027f0c41e 100644 --- a/app/code/Magento/Payment/view/frontend/web/template/payment/free.html +++ b/app/code/Magento/Payment/view/frontend/web/template/payment/free.html @@ -13,6 +13,9 @@
+ + +
diff --git a/app/code/Magento/Paypal/view/frontend/web/js/action/set-payment-method.js b/app/code/Magento/Paypal/view/frontend/web/js/action/set-payment-method.js index b7118b886ea76..819f8cea3e4e1 100644 --- a/app/code/Magento/Paypal/view/frontend/web/js/action/set-payment-method.js +++ b/app/code/Magento/Paypal/view/frontend/web/js/action/set-payment-method.js @@ -14,7 +14,7 @@ define( function ($, quote, urlBuilder, storage, errorProcessor, customer) { 'use strict'; - return function () { + return function (messageContainer) { var serviceUrl, payload, paymentData = quote.paymentMethod(); @@ -45,7 +45,7 @@ define( } ).fail( function (response) { - errorProcessor.process(response); + errorProcessor.process(response, messageContainer); } ); }; diff --git a/app/code/Magento/Paypal/view/frontend/web/js/view/payment/method-renderer/payflowpro-method.js b/app/code/Magento/Paypal/view/frontend/web/js/view/payment/method-renderer/payflowpro-method.js index 96dffc1451641..eda3532e9af36 100644 --- a/app/code/Magento/Paypal/view/frontend/web/js/view/payment/method-renderer/payflowpro-method.js +++ b/app/code/Magento/Paypal/view/frontend/web/js/view/payment/method-renderer/payflowpro-method.js @@ -48,7 +48,7 @@ define( var self = this; if (this.validateHandler() && additionalValidators.validate()) { this.isPlaceOrderActionAllowed(false); - $.when(setPaymentInformationAction()).done(function() { + $.when(setPaymentInformationAction(this.messageContainer)).done(function() { self.placeOrderHandler(); }).fail(function() { self.isPlaceOrderActionAllowed(true); diff --git a/app/code/Magento/Paypal/view/frontend/web/js/view/payment/method-renderer/paypal-express-abstract.js b/app/code/Magento/Paypal/view/frontend/web/js/view/payment/method-renderer/paypal-express-abstract.js index f3e75d46f2f3b..42dc214ea9126 100644 --- a/app/code/Magento/Paypal/view/frontend/web/js/view/payment/method-renderer/paypal-express-abstract.js +++ b/app/code/Magento/Paypal/view/frontend/web/js/view/payment/method-renderer/paypal-express-abstract.js @@ -73,7 +73,7 @@ define( if (additionalValidators.validate()) { //update payment method information if additional data was changed this.selectPaymentMethod(); - setPaymentMethodAction(); + setPaymentMethodAction(this.messageContainer); return false; } } diff --git a/app/code/Magento/Paypal/view/frontend/web/template/payment/iframe-methods.html b/app/code/Magento/Paypal/view/frontend/web/template/payment/iframe-methods.html index 0f3a8f23c7ddc..2653590cee4f8 100644 --- a/app/code/Magento/Paypal/view/frontend/web/template/payment/iframe-methods.html +++ b/app/code/Magento/Paypal/view/frontend/web/template/payment/iframe-methods.html @@ -13,6 +13,9 @@
+ + +
diff --git a/app/code/Magento/Paypal/view/frontend/web/template/payment/payflow-express-bml.html b/app/code/Magento/Paypal/view/frontend/web/template/payment/payflow-express-bml.html index 986757ac537e1..ff4a86c5e7642 100644 --- a/app/code/Magento/Paypal/view/frontend/web/template/payment/payflow-express-bml.html +++ b/app/code/Magento/Paypal/view/frontend/web/template/payment/payflow-express-bml.html @@ -25,6 +25,9 @@
+ + +
diff --git a/app/code/Magento/Paypal/view/frontend/web/template/payment/payflow-express.html b/app/code/Magento/Paypal/view/frontend/web/template/payment/payflow-express.html index e6b0b5f97cd64..6b3ad287008c2 100644 --- a/app/code/Magento/Paypal/view/frontend/web/template/payment/payflow-express.html +++ b/app/code/Magento/Paypal/view/frontend/web/template/payment/payflow-express.html @@ -22,6 +22,9 @@
+ + +
diff --git a/app/code/Magento/Paypal/view/frontend/web/template/payment/payflowpro-form.html b/app/code/Magento/Paypal/view/frontend/web/template/payment/payflowpro-form.html index 8c986e7c1acc1..727a8ea1e0609 100644 --- a/app/code/Magento/Paypal/view/frontend/web/template/payment/payflowpro-form.html +++ b/app/code/Magento/Paypal/view/frontend/web/template/payment/payflowpro-form.html @@ -16,6 +16,9 @@
+ + +
diff --git a/app/code/Magento/Paypal/view/frontend/web/template/payment/paypal-express-bml.html b/app/code/Magento/Paypal/view/frontend/web/template/payment/paypal-express-bml.html index 986757ac537e1..ff4a86c5e7642 100644 --- a/app/code/Magento/Paypal/view/frontend/web/template/payment/paypal-express-bml.html +++ b/app/code/Magento/Paypal/view/frontend/web/template/payment/paypal-express-bml.html @@ -25,6 +25,9 @@
+ + +
diff --git a/app/code/Magento/Paypal/view/frontend/web/template/payment/paypal-express.html b/app/code/Magento/Paypal/view/frontend/web/template/payment/paypal-express.html index fc94573818ff2..6359245071c5f 100644 --- a/app/code/Magento/Paypal/view/frontend/web/template/payment/paypal-express.html +++ b/app/code/Magento/Paypal/view/frontend/web/template/payment/paypal-express.html @@ -22,6 +22,9 @@
+ + +
diff --git a/app/code/Magento/Paypal/view/frontend/web/template/payment/paypal_billing_agreement-form.html b/app/code/Magento/Paypal/view/frontend/web/template/payment/paypal_billing_agreement-form.html index 774c5d7ae9a1c..a37dd264ec81c 100644 --- a/app/code/Magento/Paypal/view/frontend/web/template/payment/paypal_billing_agreement-form.html +++ b/app/code/Magento/Paypal/view/frontend/web/template/payment/paypal_billing_agreement-form.html @@ -13,6 +13,9 @@
+ + +
diff --git a/app/code/Magento/Persistent/Block/Form/Remember.php b/app/code/Magento/Persistent/Block/Form/Remember.php index 94ec379d2fd1c..63afdf0423e24 100644 --- a/app/code/Magento/Persistent/Block/Form/Remember.php +++ b/app/code/Magento/Persistent/Block/Form/Remember.php @@ -70,6 +70,7 @@ public function isRememberMeChecked() * @param int $length * @param string|null $chars * @return string + * @codeCoverageIgnore */ public function getRandomString($length, $chars = null) { diff --git a/app/code/Magento/Persistent/Controller/Index.php b/app/code/Magento/Persistent/Controller/Index.php index 1663b9f3f81d1..63f4947861c6b 100644 --- a/app/code/Magento/Persistent/Controller/Index.php +++ b/app/code/Magento/Persistent/Controller/Index.php @@ -14,6 +14,7 @@ /** * Persistent front controller + * @codeCoverageIgnore */ abstract class Index extends Action { diff --git a/app/code/Magento/Persistent/Controller/Index/ExpressCheckout.php b/app/code/Magento/Persistent/Controller/Index/ExpressCheckout.php index 4a53814bbccb1..fbe7be4e45268 100644 --- a/app/code/Magento/Persistent/Controller/Index/ExpressCheckout.php +++ b/app/code/Magento/Persistent/Controller/Index/ExpressCheckout.php @@ -8,6 +8,9 @@ use Magento\Persistent\Controller\Index; use Magento\Framework\Controller\ResultFactory; +/** + * @codeCoverageIgnore + */ class ExpressCheckout extends Index { /** diff --git a/app/code/Magento/Persistent/Helper/Data.php b/app/code/Magento/Persistent/Helper/Data.php index 6c0e38b8e980e..9a9296c970055 100644 --- a/app/code/Magento/Persistent/Helper/Data.php +++ b/app/code/Magento/Persistent/Helper/Data.php @@ -64,6 +64,7 @@ public function __construct( * * @param int|string|\Magento\Store\Model\Store $store * @return bool + * @codeCoverageIgnore */ public function isEnabled($store = null) { @@ -79,6 +80,7 @@ public function isEnabled($store = null) * * @param int|string|\Magento\Store\Model\Store $store * @return bool + * @codeCoverageIgnore */ public function isRememberMeEnabled($store = null) { @@ -94,6 +96,7 @@ public function isRememberMeEnabled($store = null) * * @param int|string|\Magento\Store\Model\Store $store * @return bool + * @codeCoverageIgnore */ public function isRememberMeCheckedDefault($store = null) { @@ -109,6 +112,7 @@ public function isRememberMeCheckedDefault($store = null) * * @param int|string|\Magento\Store\Model\Store $store * @return bool + * @codeCoverageIgnore */ public function isShoppingCartPersist($store = null) { @@ -142,6 +146,7 @@ public function getLifeTime($store = null) * * @return bool * @SuppressWarnings(PHPMD.BooleanGetMethodName) + * @codeCoverageIgnore */ public function getClearOnLogout() { @@ -155,6 +160,7 @@ public function getClearOnLogout() * Retrieve url for unset long-term cookie * * @return string + * @codeCoverageIgnore */ public function getUnsetCookieUrl() { @@ -177,6 +183,7 @@ public function getPersistentConfigFilePath() * @param \Magento\Framework\Event\Observer $observer * @return bool * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @codeCoverageIgnore */ public function canProcess($observer) { diff --git a/app/code/Magento/Persistent/Helper/Session.php b/app/code/Magento/Persistent/Helper/Session.php index 085c95d82c32b..a8784ce777d7b 100644 --- a/app/code/Magento/Persistent/Helper/Session.php +++ b/app/code/Magento/Persistent/Helper/Session.php @@ -85,6 +85,7 @@ public function getSession() * * @param \Magento\Persistent\Model\Session $sessionModel * @return \Magento\Persistent\Model\Session + * @codeCoverageIgnore */ public function setSession($sessionModel) { @@ -131,6 +132,7 @@ public function isRememberMeChecked() * * @param bool $checked * @return void + * @codeCoverageIgnore */ public function setRememberMeChecked($checked = true) { diff --git a/app/code/Magento/Persistent/Model/Persistent/Config.php b/app/code/Magento/Persistent/Model/Persistent/Config.php index 9410faca6f616..bdbca254e8c86 100644 --- a/app/code/Magento/Persistent/Model/Persistent/Config.php +++ b/app/code/Magento/Persistent/Model/Persistent/Config.php @@ -91,6 +91,7 @@ public function __construct( * * @param string $path * @return $this + * @codeCoverageIgnore */ public function setConfigFilePath($path) { @@ -134,6 +135,7 @@ protected function _getConfigDomXPath() * * @param string $block * @return array + * @codeCoverageIgnore */ public function getBlockConfigInfo($block) { @@ -146,6 +148,7 @@ public function getBlockConfigInfo($block) * Retrieve instances that should be emulated by persistent data * * @return array + * @codeCoverageIgnore */ public function collectInstancesToEmulate() { diff --git a/app/code/Magento/Persistent/Model/Session.php b/app/code/Magento/Persistent/Model/Session.php index 08ee391e8710d..22fdd1cd53ea4 100644 --- a/app/code/Magento/Persistent/Model/Session.php +++ b/app/code/Magento/Persistent/Model/Session.php @@ -142,6 +142,7 @@ public function __construct( * Define resource model * * @return void + * @codeCoverageIgnore */ protected function _construct() { @@ -153,6 +154,7 @@ protected function _construct() * * @param bool $loadExpired * @return $this + * @codeCoverageIgnore */ public function setLoadExpired($loadExpired = true) { @@ -176,6 +178,7 @@ public function getLoadExpired() * * @param int|string|\Magento\Store\Model\Store $store * @return string + * @codeCoverageIgnore */ public function getExpiredBefore($store = null) { @@ -255,6 +258,7 @@ public function loadByCookieKey($key = null) * * @param int $id * @return $this + * @codeCoverageIgnore */ public function loadByCustomerId($id) { @@ -354,6 +358,7 @@ public function deleteExpired($websiteId = null) * Delete 'persistent' cookie * * @return $this + * @codeCoverageIgnore */ public function afterDeleteCommit() { diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index 8766552b2bca3..def3e65b6b89c 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -41,7 +41,7 @@ - Magento\Quote\Model\Webapi\ParamOverriderCartId + Magento\Quote\Model\Webapi\ParamOverriderCartId\Proxy diff --git a/app/code/Magento/SalesRule/view/frontend/layout/checkout_index_index.xml b/app/code/Magento/SalesRule/view/frontend/layout/checkout_index_index.xml index eda92065fb9c9..e25f472ef7e8f 100644 --- a/app/code/Magento/SalesRule/view/frontend/layout/checkout_index_index.xml +++ b/app/code/Magento/SalesRule/view/frontend/layout/checkout_index_index.xml @@ -24,6 +24,13 @@ Magento_SalesRule/js/view/payment/discount + + + 0 + Magento_SalesRule/js/view/payment/discount-messages + messages + + diff --git a/app/code/Magento/SalesRule/view/frontend/web/js/action/cancel-coupon.js b/app/code/Magento/SalesRule/view/frontend/web/js/action/cancel-coupon.js index 1b863226a823c..15bbd98d6e4a1 100644 --- a/app/code/Magento/SalesRule/view/frontend/web/js/action/cancel-coupon.js +++ b/app/code/Magento/SalesRule/view/frontend/web/js/action/cancel-coupon.js @@ -13,20 +13,20 @@ define( 'Magento_Checkout/js/model/quote', 'Magento_Checkout/js/model/resource-url-manager', 'Magento_Checkout/js/model/error-processor', - 'Magento_Ui/js/model/messageList', + 'Magento_SalesRule/js/model/payment/discount-messages', 'mage/storage', 'Magento_Checkout/js/action/get-payment-information', 'Magento_Checkout/js/model/totals', 'mage/translate' ], - function ($, quote, urlManager, errorProcessor, messageList, storage, getPaymentInformationAction, totals, $t) { + function ($, quote, urlManager, errorProcessor, messageContainer, storage, getPaymentInformationAction, totals, $t) { 'use strict'; return function (isApplied, isLoading) { var quoteId = quote.getQuoteId(), url = urlManager.getCancelCouponUrl(quoteId), message = $t('Your coupon was successfully removed'); - messageList.clear(); + messageContainer.clear(); return storage.delete( url, @@ -40,14 +40,14 @@ define( isApplied(false); totals.isLoading(false); }); - messageList.addSuccessMessage({ + messageContainer.addSuccessMessage({ 'message': message }); } ).fail( function (response) { totals.isLoading(false); - errorProcessor.process(response); + errorProcessor.process(response, messageContainer); } ).always( function () { diff --git a/app/code/Magento/SalesRule/view/frontend/web/js/action/set-coupon-code.js b/app/code/Magento/SalesRule/view/frontend/web/js/action/set-coupon-code.js index 1e8f43a997744..814f27ed5bb82 100644 --- a/app/code/Magento/SalesRule/view/frontend/web/js/action/set-coupon-code.js +++ b/app/code/Magento/SalesRule/view/frontend/web/js/action/set-coupon-code.js @@ -15,7 +15,7 @@ define( 'Magento_Checkout/js/model/resource-url-manager', 'Magento_Checkout/js/model/payment-service', 'Magento_Checkout/js/model/error-processor', - 'Magento_Ui/js/model/messageList', + 'Magento_SalesRule/js/model/payment/discount-messages', 'mage/storage', 'Magento_Checkout/js/action/get-totals', 'mage/translate', @@ -28,7 +28,7 @@ define( urlManager, paymentService, errorProcessor, - messageList, + messageContainer, storage, getTotalsAction, $t, @@ -55,13 +55,13 @@ define( paymentMethodList() ); }); - messageList.addSuccessMessage({'message': message}); + messageContainer.addSuccessMessage({'message': message}); } } ).fail( function (response) { isLoading(false); - errorProcessor.process(response); + errorProcessor.process(response, messageContainer); } ); }; diff --git a/app/code/Magento/SalesRule/view/frontend/web/js/model/payment/discount-messages.js b/app/code/Magento/SalesRule/view/frontend/web/js/model/payment/discount-messages.js new file mode 100644 index 0000000000000..1c2c1b2eaf2f6 --- /dev/null +++ b/app/code/Magento/SalesRule/view/frontend/web/js/model/payment/discount-messages.js @@ -0,0 +1,13 @@ +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +define( + [ + 'Magento_Ui/js/model/messages' + ], + function (Messages) { + 'use strict'; + return new Messages(); + } +); diff --git a/app/code/Magento/SalesRule/view/frontend/web/js/view/payment/discount-messages.js b/app/code/Magento/SalesRule/view/frontend/web/js/view/payment/discount-messages.js new file mode 100644 index 0000000000000..1e8e3cc0fbb8b --- /dev/null +++ b/app/code/Magento/SalesRule/view/frontend/web/js/view/payment/discount-messages.js @@ -0,0 +1,16 @@ +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +define([ + 'Magento_Ui/js/view/messages', + '../../model/payment/discount-messages' +], function (Component, messageContainer) { + 'use strict'; + + return Component.extend({ + initialize: function (config) { + return this._super(config, messageContainer); + } + }); +}); diff --git a/app/code/Magento/SalesRule/view/frontend/web/template/payment/discount.html b/app/code/Magento/SalesRule/view/frontend/web/template/payment/discount.html index f05e6ba670ba0..496008e249b3f 100644 --- a/app/code/Magento/SalesRule/view/frontend/web/template/payment/discount.html +++ b/app/code/Magento/SalesRule/view/frontend/web/template/payment/discount.html @@ -12,6 +12,9 @@
+ + +
diff --git a/app/code/Magento/Ui/view/frontend/web/js/model/messageList.js b/app/code/Magento/Ui/view/frontend/web/js/model/messageList.js index 15da0c25dc792..db9483d57d414 100644 --- a/app/code/Magento/Ui/view/frontend/web/js/model/messageList.js +++ b/app/code/Magento/Ui/view/frontend/web/js/model/messageList.js @@ -2,77 +2,11 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -define(['ko'], function (ko) { - 'use strict'; - - var errors = ko.observableArray([]); - var success = ko.observableArray([]); - - return { - errors: errors, - success: success, - /** - * Add message to list. - * @param {Object} messageObj - * @param {Object} type - * @returns {Boolean} - */ - add: function (messageObj, type) { - var expr = /([%])\w+/g, - message; - - if (!messageObj.hasOwnProperty('parameters')) { - this.clear(); - type.push(messageObj.message); - - return true; - } - message = messageObj.message.replace(expr, function (varName) { - varName = varName.substr(1); - - if (messageObj.parameters.hasOwnProperty(varName)) { - return messageObj.parameters[varName]; - } - - return messageObj.parameters.shift(); - }); - this.clear(); - errors.push(message); - - return true; - }, - addSuccessMessage: function (message) { - return this.add(message, this.success) - - }, - addErrorMessage: function (message) { - return this.add(message, this.errors) - }, - /** - * Remove first error message in list - */ - remove: function (type) { - type.shift(); - }, - /** - * Get all error messages - * @returns {Object} - */ - getAll: function () { - return errors; - }, - /** - * Clear error list - */ - clear: function () { - errors.removeAll(); - success.removeAll(); - }, - getAllErrors: function () { - return errors; - }, - getAllSuccess: function () { - return success; - } - }; -}); +define( + [ + './messages' + ], function (Messages) { + 'use strict'; + return new Messages(); + } +); diff --git a/app/code/Magento/Ui/view/frontend/web/js/model/messages.js b/app/code/Magento/Ui/view/frontend/web/js/model/messages.js new file mode 100644 index 0000000000000..bedbf2a6f7171 --- /dev/null +++ b/app/code/Magento/Ui/view/frontend/web/js/model/messages.js @@ -0,0 +1,82 @@ +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +define([ + 'ko', + 'uiClass' +], function (ko, Class) { + 'use strict'; + + return Class.extend({ + initialize: function () { + this._super() + .initObservable(); + + return this; + }, + + initObservable: function () { + this.errorMessages = ko.observableArray([]); + this.successMessages = ko.observableArray([]); + + return this; + }, + + /** + * Add message to list. + * @param {Object} messageObj + * @param {Object} type + * @returns {Boolean} + */ + add: function (messageObj, type) { + var expr = /([%])\w+/g, + message; + + if (!messageObj.hasOwnProperty('parameters')) { + this.clear(); + type.push(messageObj.message); + + return true; + } + message = messageObj.message.replace(expr, function (varName) { + varName = varName.substr(1); + + if (messageObj.parameters.hasOwnProperty(varName)) { + return messageObj.parameters[varName]; + } + + return messageObj.parameters.shift(); + }); + this.clear(); + this.errorMessages.push(message); + + return true; + }, + + addSuccessMessage: function (message) { + return this.add(message, this.successMessages) + }, + + addErrorMessage: function (message) { + return this.add(message, this.errorMessages) + }, + + getErrorMessages: function () { + return this.errorMessages; + }, + + getSuccessMessages: function () { + return this.successMessages; + }, + + hasMessages: function() { + return (this.errorMessages().length > 0) || (this.successMessages().length > 0); + }, + + clear: function () { + this.errorMessages.removeAll(); + this.successMessages.removeAll(); + } + }); +}); diff --git a/app/code/Magento/Ui/view/frontend/web/js/view/messages.js b/app/code/Magento/Ui/view/frontend/web/js/view/messages.js index 703fa9fe94258..3d32287306976 100644 --- a/app/code/Magento/Ui/view/frontend/web/js/view/messages.js +++ b/app/code/Magento/Ui/view/frontend/web/js/view/messages.js @@ -2,51 +2,56 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -define( - [ - 'ko', - 'jquery', - 'uiComponent', - '../model/messageList' - ], - function (ko, $, Component, messages) { +define([ + 'ko', + 'jquery', + 'uiComponent', + '../model/messageList' +], function (ko, $, Component, globalMessages) { 'use strict'; return Component.extend({ - errorList: messages.getAllErrors(), - successList: messages.getAllSuccess(), - defaults: { - template: 'Magento_Ui/messages' + template: 'Magento_Ui/messages', + selector: '[data-role=checkout-messages]', + isHidden: false, + listens: { + isHidden: 'onHiddenChange' + } }, - isHidden: ko.observable(false), - initialize: function () { - this._super(); - var self = this; - this.isHidden.subscribe(function () { - if (self.isHidden()) { - setTimeout(function () { - var messageSelector = '[data-role=checkout-messages]'; - $(messageSelector).hide('blind', {}, 500) - }, 5000); - } - }); + initialize: function (config, messageContainer) { + this._super() + .initObservable(); + + this.messageContainer = messageContainer || config.messageContainer || globalMessages; + + return this; + }, + + initObservable: function () { + this._super() + .observe('isHidden'); + + return this; }, - /** - * - * @returns {*} - */ isVisible: function () { - return this.isHidden(this.errorList().length || this.successList().length); + return this.isHidden(this.messageContainer.hasMessages()); }, - /** - * Remove all errors - */ + removeAll: function () { - this.errorList.removeAll(); - this.successList.removeAll(); + this.messageContainer.clear(); + }, + + onHiddenChange: function (isHidden) { + var self = this; + // Hide message block if needed + if (isHidden) { + setTimeout(function () { + $(self.selector).hide('blind', {}, 500) + }, 5000); + } } }); }); diff --git a/app/code/Magento/Ui/view/frontend/web/template/messages.html b/app/code/Magento/Ui/view/frontend/web/template/messages.html index 73b0f2ea055ae..b5b029b237e5e 100644 --- a/app/code/Magento/Ui/view/frontend/web/template/messages.html +++ b/app/code/Magento/Ui/view/frontend/web/template/messages.html @@ -5,12 +5,12 @@ */ -->
- +
- +
diff --git a/app/design/frontend/Magento/blank/Magento_GiftMessage/web/css/source/_module.less b/app/design/frontend/Magento/blank/Magento_GiftMessage/web/css/source/_module.less index 7733087859897..ea96a4231f506 100644 --- a/app/design/frontend/Magento/blank/Magento_GiftMessage/web/css/source/_module.less +++ b/app/design/frontend/Magento/blank/Magento_GiftMessage/web/css/source/_module.less @@ -17,12 +17,6 @@ & when (@media-common = true) { .gift-message { - .actions-toolbar { - .action-cancel { - &:extend(.abs-action-button-as-link all); - display: none; - } - } .field { .label { .lib-css(color, @gift-message-field-label__color); @@ -33,6 +27,12 @@ .gift-options { &:extend(.abs-add-clearfix all); + .actions-toolbar { + .action-cancel { + &:extend(.abs-action-button-as-link all); + display: none; + } + } } .gift-options-title { @@ -61,15 +61,16 @@ .cart.table-wrapper { .gift-content { - display: none; clear: left; + display: none; float: left; margin-right: -100%; - padding: @indent__base 0; - width: 100%; + margin: @indent__base 0; text-align: left; + width: 100%; &._active { - display: block; + display: table; + table-layout: fixed; } } @@ -203,7 +204,7 @@ // _____________________________________________ .media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) { - .gift-message { + .gift-options { .actions-toolbar { .action-update { .lib-font-size(20); @@ -238,7 +239,21 @@ .media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) { .gift-message { + .field { + &:extend(.abs-clearfix all); + .lib-form-field-type-revert( + @_type: inline, + @_type-inline-label-align: left + ); + } + } + .gift-options { + position: relative; + z-index: 1; .actions-toolbar { + clear: both; + float: right; + position: static; .secondary { float: right; .action { @@ -251,13 +266,19 @@ margin-top: 6px; } } - } - .field { - &:extend(.abs-clearfix all); - .lib-form-field-type-revert( - @_type: inline, - @_type-inline-label-align: left - ); + &:nth-child(3) { + &:before { + .lib-css(border-left, 1px solid @gift-item-block__border-color); + bottom: 5rem; + content: ""; + display: block; + left: 50%; + overflow: hidden; + position: absolute; + top: 0; + width: 0; + } + } } } .gift-options-title { @@ -284,8 +305,5 @@ .action-gift { float: left; } - .gift-content { - padding: @indent__base 0; - } } } diff --git a/app/design/frontend/Magento/luma/Magento_GiftMessage/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_GiftMessage/web/css/source/_module.less index 347815c445969..7e9f135548edd 100644 --- a/app/design/frontend/Magento/luma/Magento_GiftMessage/web/css/source/_module.less +++ b/app/design/frontend/Magento/luma/Magento_GiftMessage/web/css/source/_module.less @@ -26,12 +26,6 @@ & when (@media-common = true) { .gift-message { - .actions-toolbar { - .action-cancel { - &:extend(.abs-action-button-as-link all); - display: none; - } - } .field { .label { .lib-css(color, @gift-message-field-label__color); @@ -52,7 +46,13 @@ } .gift-options { - &:extend(.abs-add-clearfix all); + margin: @indent__base 0; + .actions-toolbar { + .action-cancel { + &:extend(.abs-action-button-as-link all); + display: none; + } + } } .gift-options-title { @@ -118,7 +118,8 @@ padding: @indent__base 0; width: 100%; &._active { - display: block; + display: table; + table-layout: fixed; } } } @@ -295,8 +296,21 @@ .media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) { .gift-message { + .field { + &:extend(.abs-clearfix all); + .lib-form-field-type-revert( + @_type: inline, + @_type-inline-label-align: left + ); + } + } + .gift-options { + position: relative; + z-index: 1; .actions-toolbar { + clear: both; padding: 0; + position: static; .secondary { float: right; .action { @@ -310,13 +324,19 @@ margin-top: 6px; } } - } - .field { - &:extend(.abs-clearfix all); - .lib-form-field-type-revert( - @_type: inline, - @_type-inline-label-align: left - ); + &:nth-child(3) { + &:before { + .lib-css(border-left, 1px solid @gift-item-block__border-color); + bottom: 5rem; + content: ""; + display: block; + left: 50%; + overflow: hidden; + position: absolute; + top: 0; + width: 0; + } + } } } .gift-options-title { @@ -360,6 +380,13 @@ } } } + .gift-options { + .actions-toolbar { + clear: both; + padding: 0; + position: static; + } + } } .cart-container {