From 7db64f3f14c15b440d3d887f1e0fab01a0dd0c39 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Fri, 19 Dec 2014 16:30:40 +0200 Subject: [PATCH 001/114] MAGETWO-31960: Introduce Checkout Api interfaces --- .../Api/BillingAddressManagementInterface.php | 30 +++ .../Api/CartItemRepositoryInterface.php | 57 ++++++ .../Checkout/Api/CartManagementInterface.php | 79 ++++++++ .../Checkout/Api/CartRepositoryInterface.php | 27 +++ .../Api/CartTotalRepositoryInterface.php | 18 ++ .../Checkout/Api/Data/AddressInterface.php | 131 +++++++++++++ .../Checkout/Api/Data/CartInterface.php | 139 ++++++++++++++ .../Checkout/Api/Data/CartItemInterface.php | 61 +++++++ .../Api/Data/CartSearchResultsInterface.php | 15 ++ .../Checkout/Api/Data/CurrencyInterface.php | 67 +++++++ .../Checkout/Api/Data/CustomerInterface.php | 117 ++++++++++++ .../Api/Data/PaymentMethodInterface.php | 67 +++++++ .../Api/Data/ShippingMethodInterface.php | 60 ++++++ .../Checkout/Api/Data/TotalsInterface.php | 172 ++++++++++++++++++ .../Checkout/Api/Data/TotalsItemInterface.php | 123 +++++++++++++ .../Api/PaymentMethodManagementInterface.php | 40 ++++ .../ShippingAddressManagementInterface.php | 30 +++ .../Api/ShippingMethodManagementInterface.php | 45 +++++ .../Address/Billing/ReadServiceInterface.php | 2 + .../Address/Billing/WriteServiceInterface.php | 2 + .../Address/Shipping/ReadServiceInterface.php | 2 + .../Shipping/WriteServiceInterface.php | 2 + .../Service/V1/Cart/ReadServiceInterface.php | 6 + .../V1/Cart/TotalsServiceInterface.php | 2 + .../Service/V1/Cart/WriteServiceInterface.php | 5 + .../V1/Coupon/ReadServiceInterface.php | 2 + .../V1/Coupon/WriteServiceInterface.php | 3 + .../Checkout/Service/V1/Data/Cart/Coupon.php | 2 + .../Checkout/Service/V1/Data/Cart/Item.php | 1 + .../Checkout/Service/V1/Data/Cart/Totals.php | 2 + .../Service/V1/Data/Cart/Totals/Item.php | 2 + .../Service/V1/Item/ReadServiceInterface.php | 1 + .../Service/V1/Item/WriteServiceInterface.php | 3 + .../V1/PaymentMethod/ReadServiceInterface.php | 4 + .../PaymentMethod/WriteServiceInterface.php | 2 + .../ShippingMethod/ReadServiceInterface.php | 4 + .../ShippingMethod/WriteServiceInterface.php | 2 + 37 files changed, 1327 insertions(+) create mode 100644 app/code/Magento/Checkout/Api/BillingAddressManagementInterface.php create mode 100644 app/code/Magento/Checkout/Api/CartItemRepositoryInterface.php create mode 100644 app/code/Magento/Checkout/Api/CartManagementInterface.php create mode 100644 app/code/Magento/Checkout/Api/CartRepositoryInterface.php create mode 100644 app/code/Magento/Checkout/Api/CartTotalRepositoryInterface.php create mode 100644 app/code/Magento/Checkout/Api/Data/AddressInterface.php create mode 100644 app/code/Magento/Checkout/Api/Data/CartInterface.php create mode 100644 app/code/Magento/Checkout/Api/Data/CartItemInterface.php create mode 100644 app/code/Magento/Checkout/Api/Data/CartSearchResultsInterface.php create mode 100644 app/code/Magento/Checkout/Api/Data/CurrencyInterface.php create mode 100644 app/code/Magento/Checkout/Api/Data/CustomerInterface.php create mode 100644 app/code/Magento/Checkout/Api/Data/PaymentMethodInterface.php create mode 100644 app/code/Magento/Checkout/Api/Data/ShippingMethodInterface.php create mode 100644 app/code/Magento/Checkout/Api/Data/TotalsInterface.php create mode 100644 app/code/Magento/Checkout/Api/Data/TotalsItemInterface.php create mode 100644 app/code/Magento/Checkout/Api/PaymentMethodManagementInterface.php create mode 100644 app/code/Magento/Checkout/Api/ShippingAddressManagementInterface.php create mode 100644 app/code/Magento/Checkout/Api/ShippingMethodManagementInterface.php diff --git a/app/code/Magento/Checkout/Api/BillingAddressManagementInterface.php b/app/code/Magento/Checkout/Api/BillingAddressManagementInterface.php new file mode 100644 index 00000000000..e8fa596345f --- /dev/null +++ b/app/code/Magento/Checkout/Api/BillingAddressManagementInterface.php @@ -0,0 +1,30 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\Checkout\Api; + +interface BillingAddressManagementInterface +{ + /** + * Assigns a specified billing address to a specified cart. + * + * @param int $cartId The cart ID. + * @param \Magento\Checkout\Api\Data\AddressInterface $address Billing address data. + * @return int Address ID. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @throws \Magento\Framework\Exception\InputException The specified cart ID or address data is not valid. + * @see \Magento\Checkout\Service\V1\Address\Billing\WriteServiceInterface::setAddress + */ + public function assign($cartId, \Magento\Checkout\Api\Data\AddressInterface $address); + + /** + * Returns the billing address for a specified quote. + * + * @param int $cartId The cart ID. + * @return \Magento\Checkout\Api\Data\AddressInterface Quote billing address object. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @see \Magento\Checkout\Service\V1\Address\Billing\ReadServiceInterface::getAddress + */ + public function get($cartId); +} diff --git a/app/code/Magento/Checkout/Api/CartItemRepositoryInterface.php b/app/code/Magento/Checkout/Api/CartItemRepositoryInterface.php new file mode 100644 index 00000000000..3c993cd1905 --- /dev/null +++ b/app/code/Magento/Checkout/Api/CartItemRepositoryInterface.php @@ -0,0 +1,57 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\Checkout\Api; + +/** + * @see \Magento\Checkout\Service\V1\Item\ReadServiceInterface + * @see \Magento\Checkout\Service\V1\Item\WriteServiceInterface + */ +interface CartItemRepositoryInterface +{ + /** + * Lists items that are assigned to a specified cart. + * + * @param int $cartId The cart ID. + * @return \Magento\Checkout\Api\Data\CartItemInterface[] Array of items. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @see \Magento\Checkout\Service\V1\Item\ReadServiceInterface::getList + */ + public function getList($cartId); + + /** + * Adds the specified item to the specified cart. + * + * @param int $cartId The cart ID. + * @param \Magento\Checkout\Api\Data\CartItemInterface $cartItem The item. + * @return \Magento\Checkout\Api\Data\CartItemInterface Item ID. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @throws \Magento\Framework\Exception\CouldNotSaveException The specified item could not be saved to the cart. + * @throws \Magento\Framework\Exception\InputException The specified item or cart is not valid. + * @see \Magento\Checkout\Service\V1\Item\WriteServiceInterface::addItem + * @see \Magento\Checkout\Service\V1\Item\WriteServiceInterface::updateItem + */ + public function save(\Magento\Checkout\Api\Data\CartItemInterface $cartItem); + + /** + * Remove bundle option + * + * @param \Magento\Checkout\Api\Data\CartItemInterface $cartItem + * @return bool + * @throws \Magento\Framework\Exception\CouldNotSaveException + * @throws \Magento\Webapi\Exception + */ + public function delete(\Magento\Checkout\Api\Data\CartItemInterface $cartItem); + + /** + * Removes the specified item from the specified cart. + * + * @param int $cartId The cart ID. + * @param int $itemId The item ID of the item to be removed. + * @return bool + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item or cart does not exist. + * @throws \Magento\Framework\Exception\CouldNotSaveException The item could not be removed. + */ + public function deleteById($cartId, $itemId); +} diff --git a/app/code/Magento/Checkout/Api/CartManagementInterface.php b/app/code/Magento/Checkout/Api/CartManagementInterface.php new file mode 100644 index 00000000000..5629fb0f0bd --- /dev/null +++ b/app/code/Magento/Checkout/Api/CartManagementInterface.php @@ -0,0 +1,79 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\Checkout\Api; + +interface CartManagementInterface +{ + /** + * Enables an administrative or guest user to create an empty cart and quote for an anonymous customer. + * + * @throws \Magento\Framework\Exception\CouldNotSaveException The empty cart and quote could not be created. + * @return int Cart ID. + * @see \Magento\Checkout\Service\V1\Cart\WriteServiceInterface::create + */ + public function createEmptyCart(); + + /** + * Returns information for the cart for a specified customer. + * + * @param int $customerId The customer ID. + * @return \Magento\Checkout\Api\Data\CartInterface Cart object. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified customer does not exist. + * @see \Magento\Checkout\Service\V1\Cart\ReadServiceInterface::getCartForCustomer + */ + public function getCartForCustomer($customerId); + + /** + * Assigns a specified customer to a specified shopping cart. + * + * @param int $cartId The cart ID. + * @param int $customerId The customer ID. + * @return boolean + * @see \Magento\Checkout\Service\V1\Cart\WriteServiceInterface::assignCustomer + */ + public function assignCustomer($cartId, $customerId); + + /** + * Returns information for a coupon in a specified cart. + * + * @param int $cartId The cart ID. + * @return string The coupon code data. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @see \Magento\Checkout\Service\V1\Coupon\ReadServiceInterface::get + */ + public function getCouponCode($cartId); + + /** + * Adds a coupon by code to a specified cart. + * + * @param int $cartId The cart ID. + * @param string $couponCode The coupon code data. + * @return bool + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @throws \Magento\Framework\Exception\CouldNotSaveException The specified coupon could not be added. + * @see \Magento\Checkout\Service\V1\Coupon\WriteServiceInterface::set + */ + public function setCoupon($cartId, $couponCode); + + /** + * Deletes a coupon from a specified cart. + * + * @param int $cartId The cart ID. + * @return bool + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @throws \Magento\Framework\Exception\CouldNotDeleteException The specified coupon could not be deleted. + * @see \Magento\Checkout\Service\V1\Coupon\WriteServiceInterface::delete + */ + public function removeCoupon($cartId); + + /** + * Places an order for a specified cart. + * + * @param int $cartId The cart ID. + * @return int Order ID. + * @see \Magento\Checkout\Service\V1\Cart\WriteServiceInterface::order + */ + public function order($cartId); +} diff --git a/app/code/Magento/Checkout/Api/CartRepositoryInterface.php b/app/code/Magento/Checkout/Api/CartRepositoryInterface.php new file mode 100644 index 00000000000..a4eaa870e90 --- /dev/null +++ b/app/code/Magento/Checkout/Api/CartRepositoryInterface.php @@ -0,0 +1,27 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\Checkout\Api; + +interface CartRepositoryInterface +{ + /** + * Enables an administrative user to return information for a specified cart. + * + * @param int $cartId + * @return \Magento\Checkout\Api\Data\CartInterface + * @throws \Magento\Framework\Exception\NoSuchEntityException + * @see \Magento\Checkout\Service\V1\Cart\ReadServiceInterface::getCart + */ + public function get($cartId); + + /** + * Enables administrative users to list carts that match specified search criteria. + * + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria + * @return \Magento\Checkout\Api\Data\CartSearchResultsInterface + * @see \Magento\Checkout\Service\V1\Cart\ReadServiceInterface::getCartList + */ + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); +} diff --git a/app/code/Magento/Checkout/Api/CartTotalRepositoryInterface.php b/app/code/Magento/Checkout/Api/CartTotalRepositoryInterface.php new file mode 100644 index 00000000000..09e32fa0ebb --- /dev/null +++ b/app/code/Magento/Checkout/Api/CartTotalRepositoryInterface.php @@ -0,0 +1,18 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\Checkout\Api; + +interface CartTotalRepositoryInterface +{ + /** + * Returns quote totals data for a specified cart. + * + * @param int $cartId The cart ID. + * @return \Magento\Checkout\Api\Data\TotalsItemInterface Quote totals data. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @see \Magento\Checkout\Service\V1\Cart\TotalsServiceInterface::getTotals + */ + public function get($cartId); +} diff --git a/app/code/Magento/Checkout/Api/Data/AddressInterface.php b/app/code/Magento/Checkout/Api/Data/AddressInterface.php new file mode 100644 index 00000000000..fe89e1cdccd --- /dev/null +++ b/app/code/Magento/Checkout/Api/Data/AddressInterface.php @@ -0,0 +1,131 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\Checkout\Api\Data; + +/** + * @see \Magento\Checkout\Service\V1\Data\Cart\Address + */ +interface AddressInterface extends \Magento\Framework\Api\ExtensibleDataInterface +{ + /** + * Get id + * + * @return int|null + */ + public function getId(); + + /** + * Get region + * + * @TODO RegionInterface must be in Directory module + * @return \Magento\Customer\Api\Data\RegionInterface|null + */ + public function getRegion(); + + /** + * Get country id + * + * @return string + */ + public function getCountryId(); + + /** + * Get street + * + * @return string[] + */ + public function getStreet(); + + /** + * Get company + * + * @return string|null + */ + public function getCompany(); + + /** + * Get telephone number + * + * @return string + */ + public function getTelephone(); + + /** + * Get fax number + * + * @return string|null + */ + public function getFax(); + + /** + * Get postcode + * + * @return string + */ + public function getPostcode(); + + /** + * Get city name + * + * @return string + */ + public function getCity(); + + /** + * Get first name + * + * @return string + */ + public function getFirstname(); + + /** + * Get last name + * + * @return string + */ + public function getLastname(); + + /** + * Get middle name + * + * @return string|null + */ + public function getMiddlename(); + + /** + * Get prefix + * + * @return string|null + */ + public function getPrefix(); + + /** + * Get suffix + * + * @return string|null + */ + public function getSuffix(); + + /** + * Get Vat id + * + * @return string|null + */ + public function getVatId(); + + /** + * Get customer id + * + * @return string|null + */ + public function getCustomerId(); + + /** + * Get billing/shipping email + * + * @return string + */ + public function getEmail(); +} diff --git a/app/code/Magento/Checkout/Api/Data/CartInterface.php b/app/code/Magento/Checkout/Api/Data/CartInterface.php new file mode 100644 index 00000000000..db54707d142 --- /dev/null +++ b/app/code/Magento/Checkout/Api/Data/CartInterface.php @@ -0,0 +1,139 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\Checkout\Api\Data; + +/** + * @see \Magento\Checkout\Service\V1\Data\Cart + */ +interface CartInterface extends \Magento\Framework\Api\ExtensibleDataInterface +{ + /** + * Returns the cart/quote ID. + * + * @return int Cart/quote ID. + */ + public function getId(); + + /** + * Returns the store ID for the store where the cart was created. + * + * @return int|null Store ID. Otherwise, null. + */ + public function getStoreId(); + + /** + * Returns the cart creation date and time. + * + * @return string|null Cart creation date and time. Otherwise, null. + */ + public function getCreatedAt(); + + /** + * Returns the cart last update date and time. + * + * @return string|null Cart last update date and time. Otherwise, null. + */ + public function getUpdatedAt(); + + /** + * Returns the cart conversion date and time. + * + * @return string|null Cart conversion date and time. Otherwise, null. + */ + public function getConvertedAt(); + + /** + * Determines whether the cart is still active. + * + * @return bool|null Active status flag value. Otherwise, null. + */ + public function getIsActive(); + + /** + * Determines whether the cart is a virtual cart. + * + * A virtual cart contains virtual items. + * + * @return bool|null Virtual flag value. Otherwise, null. + */ + public function getIsVirtual(); + + /** + * Lists items in the cart. + * + * @return \Magento\Checkout\Api\Data\CartItemInterface[]|null Array of items. Otherwise, null. + */ + public function getItems(); + + /** + * Returns the number of different items or products in the cart. + * + * @return int|null Number of different items or products in the cart. Otherwise, null. + */ + public function getItemsCount(); + + /** + * Returns the total quantity of all cart items. + * + * @return float|null Total quantity of all cart items. Otherwise, null. + */ + public function getItemsQty(); + + /** + * Returns information about the customer who is assigned to the cart. + * + * @return \Magento\Checkout\Api\Data\CustomerInterface Information about the customer who is assigned to the cart. + */ + public function getCustomer(); + + /** + * Returns the payment method that is used to process the cart. + * + * @return string|null Payment method. Otherwise, null. + */ + public function getCheckoutMethod(); + + /** + * Returns the cart shipping address. + * + * @return \Magento\Checkout\Api\Data\AddressInterface|null Cart shipping address. Otherwise, null. + */ + public function getShippingAddress(); + + /** + * Returns the cart billing address. + * + * @return \Magento\Checkout\Api\Data\AddressInterface|null Cart billing address. Otherwise, null. + */ + public function getBillingAddress(); + + /** + * Returns information about cart totals. + * + * @return \Magento\Checkout\Api\Data\TotalsInterface|null Information about cart totals. Otherwise, null. + */ + public function getTotals(); + + /** + * Returns the reserved order ID for the cart. + * + * @return string|null Reserved order ID. Otherwise, null. + */ + public function getReservedOrderId(); + + /** + * Returns the original order ID for the cart. + * + * @return string|null Original order ID. Otherwise, null. + */ + public function getOrigOrderId(); + + /** + * Returns information about quote currency, such as code, exchange rate, and so on. + * + * @return \Magento\Checkout\Api\Data\CurrencyInterface|null Quote currency information. Otherwise, null. + */ + public function getCurrency(); +} diff --git a/app/code/Magento/Checkout/Api/Data/CartItemInterface.php b/app/code/Magento/Checkout/Api/Data/CartItemInterface.php new file mode 100644 index 00000000000..765393da8cb --- /dev/null +++ b/app/code/Magento/Checkout/Api/Data/CartItemInterface.php @@ -0,0 +1,61 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\Checkout\Api\Data; + +/** + * @see \Magento\Checkout\Service\V1\Data\Cart\Item + * can be implemented by \Magento\Sales\Model\Quote\Item + */ +interface CartItemInterface extends \Magento\Framework\Api\ExtensibleDataInterface +{ + /** + * Returns the item ID. + * + * @return int|null Item ID. Otherwise, null. + */ + public function getItemId(); + + /** + * Returns the product SKU. + * + * @return string|null Product SKU. Otherwise, null. + */ + public function getSku(); + + /** + * Returns the product quantity. + * + * @return int Product quantity. + */ + public function getQty(); + + /** + * Returns the product name. + * + * @return string|null Product name. Otherwise, null. + */ + public function getName(); + + /** + * Returns the product price. + * + * @return float|null Product price. Otherwise, null. + */ + public function getPrice(); + + /** + * Returns the product type. + * + * @return string|null Product type. Otherwise, null. + */ + public function getProductType(); + + /** + * Returns Quote id. + * + * @return int + */ + public function getQuoteId(); +} diff --git a/app/code/Magento/Checkout/Api/Data/CartSearchResultsInterface.php b/app/code/Magento/Checkout/Api/Data/CartSearchResultsInterface.php new file mode 100644 index 00000000000..22d655a6d1a --- /dev/null +++ b/app/code/Magento/Checkout/Api/Data/CartSearchResultsInterface.php @@ -0,0 +1,15 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\Checkout\Api\Data; + +interface CartSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface +{ + /** + * Get carts list. + * + * @return \Magento\Checkout\Api\Data\CartInterface[] + */ + public function getItems(); +} diff --git a/app/code/Magento/Checkout/Api/Data/CurrencyInterface.php b/app/code/Magento/Checkout/Api/Data/CurrencyInterface.php new file mode 100644 index 00000000000..3d4e4c8c6b6 --- /dev/null +++ b/app/code/Magento/Checkout/Api/Data/CurrencyInterface.php @@ -0,0 +1,67 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\Checkout\Api\Data; + +/** + * @see \Magento\Checkout\Service\V1\Data\Cart\Currency + */ +interface CurrencyInterface extends \Magento\Framework\Api\ExtensibleDataInterface +{ + /** + * Get global currency code + * + * @return string|null + */ + public function getGlobalCurrencyCode(); + + /** + * Get base currency code + * + * @return string|null + */ + public function getBaseCurrencyCode(); + + /** + * Get store currency code + * + * @return string|null + */ + public function getStoreCurrencyCode(); + + /** + * Get quote currency code + * + * @return string|null + */ + public function getQuoteCurrencyCode(); + + /** + * Get store currency to base currency rate + * + * @return float|null + */ + public function getStoreToBaseRate(); + + /** + * Get store currency to quote currency rate + * + * @return float|null + */ + public function getStoreToQuoteRate(); + + /** + * Get base currency to global currency rate + * + * @return float|null + */ + public function getBaseToGlobalRate(); + + /** + * Get base currency to quote currency rate + * + * @return float|null + */ + public function getBaseToQuoteRate(); +} diff --git a/app/code/Magento/Checkout/Api/Data/CustomerInterface.php b/app/code/Magento/Checkout/Api/Data/CustomerInterface.php new file mode 100644 index 00000000000..0628ae3dc3c --- /dev/null +++ b/app/code/Magento/Checkout/Api/Data/CustomerInterface.php @@ -0,0 +1,117 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\Checkout\Api\Data; + +/** + * @see \Magento\Checkout\Service\V1\Data\Cart\Customer + * TODO: We can use \Magento\Customer\Api\Data\CustomerInterface for checkout flow. Need additional comments. + */ +interface CustomerInterface extends \Magento\Framework\Api\ExtensibleDataInterface +{ + /** + * Get customer id + * + * @return int|null + */ + public function getId(); + + /** + * Get customer tax class id + * + * @return int|null + */ + public function getTaxClassId(); + + /** + * Get customer group id + * + * @return int|null + */ + public function getGroupId(); + + /** + * Get customer email + * + * @return string|null + */ + public function getEmail(); + + /** + * Get customer name prefix + * + * @return string|null + */ + public function getPrefix(); + + /** + * Get customer first name + * + * @return string|null + */ + public function getFirstName(); + + /** + * Get customer middle name + * + * @return string|null + */ + public function getMiddleName(); + + /** + * Get customer last name + * + * @return string|null + */ + public function getLastName(); + + /** + * Get customer name suffix + * + * @return string|null + */ + public function getSuffix(); + + /** + * Get customer date of birth + * + * @return string|null + */ + public function getDob(); + + /** + * Get note + * + * @return string|null + */ + public function getNote(); + + /** + * Get notification status + * + * @return string|null + */ + public function getNoteNotify(); + + /** + * Is customer a guest? + * + * @return bool + */ + public function getIsGuest(); + + /** + * Get taxvat value + * + * @return string|null + */ + public function getTaxVat(); + + /** + * Get gender + * + * @return string|null + */ + public function getGender(); +} diff --git a/app/code/Magento/Checkout/Api/Data/PaymentMethodInterface.php b/app/code/Magento/Checkout/Api/Data/PaymentMethodInterface.php new file mode 100644 index 00000000000..a7534f6165b --- /dev/null +++ b/app/code/Magento/Checkout/Api/Data/PaymentMethodInterface.php @@ -0,0 +1,67 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\Checkout\Api\Data; + +/** + * @see \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod + */ +interface PaymentMethodInterface extends \Magento\Framework\Api\ExtensibleDataInterface +{ + /** + * Get purchase order number + * + * @return string|null + */ + public function getPoNumber(); + + /** + * Get payment method code + * + * @return string + */ + public function getMethod(); + + /** + * Get credit card owner + * + * @return string|null + */ + public function getCcOwner(); + + /** + * Get credit card number + * + * @return string|null + */ + public function getCcNumber(); + + /** + * Get credit card type + * + * @return string|null + */ + public function getCcType(); + + /** + * Get credit card expiration year + * + * @return string|null + */ + public function getCcExpYear(); + + /** + * Get credit card expiration month + * + * @return string|null + */ + public function getCcExpMonth(); + + /** + * Get payment additional details + * + * @return string|null + */ + public function getPaymentDetails(); +} diff --git a/app/code/Magento/Checkout/Api/Data/ShippingMethodInterface.php b/app/code/Magento/Checkout/Api/Data/ShippingMethodInterface.php new file mode 100644 index 00000000000..e0538da5d3d --- /dev/null +++ b/app/code/Magento/Checkout/Api/Data/ShippingMethodInterface.php @@ -0,0 +1,60 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\Checkout\Api\Data; + +/** + * @see \Magento\Checkout\Service\V1\Data\Cart\ShippingMethod + */ +interface ShippingMethodInterface extends \Magento\Framework\Api\ExtensibleDataInterface +{ + /** + * Returns the shipping carrier code. + * + * @return string Shipping carrier code. + */ + public function getCarrierCode(); + + /** + * Returns the shipping method code. + * + * @return string Shipping method code. + */ + public function getMethodCode(); + + /** + * Returns the shipping carrier title. + * + * @return string|null Shipping carrier title. Otherwise, null. + */ + public function getCarrierTitle(); + + /** + * Returns the shipping method title. + * + * @return string|null Shipping method title. Otherwise, null. + */ + public function getMethodTitle(); + + /** + * Returns the shipping amount in store currency. + * + * @return float Shipping amount in store currency. + */ + public function getAmount(); + + /** + * Returns the shipping amount in base currency. + * + * @return float Shipping amount in base currency. + */ + public function getBaseAmount(); + + /** + * Returns the value of the availability flag for the current shipping method. + * + * @return bool + */ + public function getAvailable(); +} diff --git a/app/code/Magento/Checkout/Api/Data/TotalsInterface.php b/app/code/Magento/Checkout/Api/Data/TotalsInterface.php new file mode 100644 index 00000000000..5ae5532b54f --- /dev/null +++ b/app/code/Magento/Checkout/Api/Data/TotalsInterface.php @@ -0,0 +1,172 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\Checkout\Api\Data; + +/** + * @see \Magento\Checkout\Service\V1\Data\Cart\Totals + */ +interface TotalsInterface extends \Magento\Framework\Api\ExtensibleDataInterface +{ + /** + * Get grand total in quote currency + * + * @return float|null + */ + public function getGrandTotal(); + + /** + * Get grand total in base currency + * + * @return float|null + */ + public function getBaseGrandTotal(); + + /** + * Get subtotal in quote currency + * + * @return float|null + */ + public function getSubtotal(); + + /** + * Get subtotal in base currency + * + * @return float|null + */ + public function getBaseSubtotal(); + + /** + * Get discount amount in quote currency + * + * @return float|null + */ + public function getDiscountAmount(); + + /** + * Get discount amount in base currency + * + * @return float|null + */ + public function getBaseDiscountAmount(); + + /** + * Get subtotal in quote currency with applied discount + * + * @return float|null + */ + public function getSubtotalWithDiscount(); + + /** + * Get subtotal in base currency with applied discount + * + * @return float|null + */ + public function getBaseSubtotalWithDiscount(); + + /** + * Get shipping amount in quote currency + * + * @return float|null + */ + public function getShippingAmount(); + + /** + * Get shipping amount in base currency + * + * @return float|null + */ + public function getBaseShippingAmount(); + + /** + * Get shipping discount amount in quote currency + * + * @return float|null + */ + public function getShippingDiscountAmount(); + + /** + * Get shipping discount amount in base currency + * + * @return float|null + */ + public function getBaseShippingDiscountAmount(); + + /** + * Get tax amount in quote currency + * + * @return float|null + */ + public function getTaxAmount(); + + /** + * Get tax amount in base currency + * + * @return float|null + */ + public function getBaseTaxAmount(); + + /** + * Get shipping tax amount in quote currency + * + * @return float|null + */ + public function getShippingTaxAmount(); + + /** + * Get shipping tax amount in base currency + * + * @return float|null + */ + public function getBaseShippingTaxAmount(); + + /** + * Get subtotal including tax in quote currency + * + * @return float|null + */ + public function getSubtotalInclTax(); + + /** + * Get subtotal including tax in base currency + * + * @return float|null + */ + public function getBaseSubtotalInclTax(); + + /** + * Get shipping including tax in quote currency + * + * @return float|null + */ + public function getShippingInclTax(); + + /** + * Get shipping including tax in base currency + * + * @return float|null + */ + public function getBaseShippingInclTax(); + + /** + * Get base currency code + * + * @return string|null + */ + public function getBaseCurrencyCode(); + + /** + * Get quote currency code + * + * @return string|null + */ + public function getQuoteCurrencyCode(); + + /** + * Get totals by items + * + * @return \Magento\Checkout\Api\Data\TotalsItemInterface[]|null + */ + public function getItems(); +} diff --git a/app/code/Magento/Checkout/Api/Data/TotalsItemInterface.php b/app/code/Magento/Checkout/Api/Data/TotalsItemInterface.php new file mode 100644 index 00000000000..f0cf7813178 --- /dev/null +++ b/app/code/Magento/Checkout/Api/Data/TotalsItemInterface.php @@ -0,0 +1,123 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\Checkout\Api\Data; + +/** + * @see \Magento\Checkout\Service\V1\Data\Cart\Totals\Item + */ +interface TotalsItemInterface extends \Magento\Framework\Api\ExtensibleDataInterface +{ + /** + * Returns the item price in quote currency. + * + * @return float Item price in quote currency. + */ + public function getPrice(); + + /** + * Returns the item price in base currency. + * + * @return float Item price in base currency. + */ + public function getBasePrice(); + + /** + * Returns the item quantity. + * + * @return int Item quantity. + */ + public function getQty(); + + /** + * Returns the row total in quote currency. + * + * @return float Row total in quote currency. + */ + public function getRowTotal(); + + /** + * Returns the row total in base currency. + * + * @return float Row total in base currency. + */ + public function getBaseRowTotal(); + + /** + * Returns the row total with discount in quote currency. + * + * @return float|null Row total with discount in quote currency. Otherwise, null. + */ + public function getRowTotalWithDiscount(); + + /** + * Returns the tax amount in quote currency. + * + * @return float|null Tax amount in quote currency. Otherwise, null. + */ + public function getTaxAmount(); + + /** + * Returns the tax amount in base currency. + * + * @return float|null Tax amount in base currency. Otherwise, null. + */ + public function getBaseTaxAmount(); + + /** + * Returns the tax percent. + * + * @return int|null Tax percent. Otherwise, null. + */ + public function getTaxPercent(); + + /** + * Returns the discount amount in quote currency. + * + * @return float|null Discount amount in quote currency. Otherwise, null. + */ + public function getDiscountAmount(); + + /** + * Returns the discount amount in base currency. + * + * @return float|null Discount amount in base currency. Otherwise, null. + */ + public function getBaseDiscountAmount(); + + /** + * Returns the discount percent. + * + * @return int|null Discount percent. Otherwise, null. + */ + public function getDiscountPercent(); + + /** + * Returns the price including tax in quote currency. + * + * @return float|null Price including tax in quote currency. Otherwise, null. + */ + public function getPriceInclTax(); + + /** + * Returns the price including tax in base currency. + * + * @return float|null Price including tax in base currency. Otherwise, null. + */ + public function getBasePriceInclTax(); + + /** + * Returns the row total including tax in quote currency. + * + * @return float|null Row total including tax in quote currency. Otherwise, null. + */ + public function getRowTotalInclTax(); + + /** + * Returns the row total including tax in base currency. + * + * @return float|null Row total including tax in base currency. Otherwise, null. + */ + public function getBaseRowTotalInclTax(); +} diff --git a/app/code/Magento/Checkout/Api/PaymentMethodManagementInterface.php b/app/code/Magento/Checkout/Api/PaymentMethodManagementInterface.php new file mode 100644 index 00000000000..ef86e853e17 --- /dev/null +++ b/app/code/Magento/Checkout/Api/PaymentMethodManagementInterface.php @@ -0,0 +1,40 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\Checkout\Api; + +interface PaymentMethodManagementInterface +{ + /** + * Adds a specified payment method to a specified shopping cart. + * + * @param \Magento\Checkout\Api\Data\PaymentMethodInterface $method The payment method. + * @param int $cartId The cart ID. + * @return int Payment method ID. + * @throws \Magento\Framework\Exception\State\InvalidTransitionException The billing or shipping address is not set, or the specified payment method is not available. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @see \Magento\Checkout\Service\V1\PaymentMethod\WriteServiceInterface::set + */ + public function set(\Magento\Checkout\Api\Data\PaymentMethodInterface $method, $cartId); + + /** + * Returns the payment method for a specified shopping cart. + * + * @param int $cartId The cart ID. + * @return \Magento\Checkout\Api\Data\PaymentMethodInterface Payment method object. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @see \Magento\Checkout\Service\V1\PaymentMethod\ReadServiceInterface::getPayment + */ + public function get($cartId); + + /** + * Lists available payment methods for a specified shopping cart. + * + * @param int $cartId The cart ID. + * @return \Magento\Checkout\Api\Data\PaymentMethodInterface[] Array of payment methods. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @see \Magento\Checkout\Service\V1\PaymentMethod\ReadServiceInterface::getList + */ + public function getList($cartId); +} diff --git a/app/code/Magento/Checkout/Api/ShippingAddressManagementInterface.php b/app/code/Magento/Checkout/Api/ShippingAddressManagementInterface.php new file mode 100644 index 00000000000..01897a39ec8 --- /dev/null +++ b/app/code/Magento/Checkout/Api/ShippingAddressManagementInterface.php @@ -0,0 +1,30 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\Checkout\Api; + +interface ShippingAddressManagementInterface +{ + /** + * Assigns a specified shipping address to a specified cart. + * + * @param int $cartId The cart ID. + * @param \Magento\Checkout\Api\Data\AddressInterface $address The shipping address data. + * @return int Address ID. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @throws \Magento\Framework\Exception\InputException The specified cart ID or address data is not valid. + * @see \Magento\Checkout\Service\V1\Address\Shipping\WriteServiceInterface::setAddress + */ + public function assign($cartId, \Magento\Checkout\Api\Data\AddressInterface $address); + + /** + * Returns the shipping address for a specified quote. + * + * @param int $cartId The cart ID. + * @return \Magento\Checkout\Api\Data\AddressInterface Shipping address object. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @see \Magento\Checkout\Service\V1\Address\Shipping\ReadServiceInterface::getAddress + */ + public function get($cartId); +} diff --git a/app/code/Magento/Checkout/Api/ShippingMethodManagementInterface.php b/app/code/Magento/Checkout/Api/ShippingMethodManagementInterface.php new file mode 100644 index 00000000000..0808c581fbc --- /dev/null +++ b/app/code/Magento/Checkout/Api/ShippingMethodManagementInterface.php @@ -0,0 +1,45 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\Checkout\Api; + +interface ShippingMethodManagementInterface +{ + /** + * Sets the carrier and shipping methods codes for a specified cart. + * + * @param int $cartId The shopping cart ID. + * @param string $carrierCode The carrier code. + * @param string $methodCode The shipping method code. + * @return bool + * @throws \Magento\Framework\Exception\InputException The shipping method is not valid for an empty cart. + * @throws \Magento\Framework\Exception\CouldNotSaveException The shipping method could not be saved. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart contains only virtual products so the shipping method does not apply. + * @throws \Magento\Framework\Exception\StateException The billing or shipping address is not set. + * @see \Magento\Checkout\Service\V1\ShippingMethod\WriteServiceInterface::setMethod + */ + public function set($cartId, $carrierCode, $methodCode); + + /** + * Returns selected shipping method for a specified quote. + * + * @param int $cartId The shopping cart ID. + * @return \Magento\Checkout\Api\Data\ShippingMethodInterface Shipping method. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified shopping cart does not exist. + * @throws \Magento\Framework\Exception\StateException The shipping address is not set. + * @see \Magento\Checkout\Service\V1\ShippingMethod\ReadServiceInterface::getMethod + */ + public function get($cartId); + + /** + * Lists applicable shipping methods for a specified quote. + * + * @param int $cartId The shopping cart ID. + * @return \Magento\Checkout\Api\Data\ShippingMethodInterface[] An array of shipping methods. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified quote does not exist. + * @throws \Magento\Framework\Exception\StateException The shipping address is not set. + * @see \Magento\Checkout\Service\V1\ShippingMethod\ReadServiceInterface::getList + */ + public function getList($cartId); +} diff --git a/app/code/Magento/Checkout/Service/V1/Address/Billing/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Address/Billing/ReadServiceInterface.php index c3fbef994d5..18ea103bcd4 100644 --- a/app/code/Magento/Checkout/Service/V1/Address/Billing/ReadServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/Address/Billing/ReadServiceInterface.php @@ -13,6 +13,8 @@ interface ReadServiceInterface * @param int $cartId The cart ID. * @return \Magento\Checkout\Service\V1\Data\Cart\Address Quote billing address object. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @deprecated + * @see \Magento\Checkout\Api\BillingAddressManagementInterface::get */ public function getAddress($cartId); } diff --git a/app/code/Magento/Checkout/Service/V1/Address/Billing/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Address/Billing/WriteServiceInterface.php index ddf5bfe3dcc..b8d776a0389 100644 --- a/app/code/Magento/Checkout/Service/V1/Address/Billing/WriteServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/Address/Billing/WriteServiceInterface.php @@ -17,6 +17,8 @@ interface WriteServiceInterface * @return int Address ID. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. * @throws \Magento\Framework\Exception\InputException The specified cart ID or address data is not valid. + * @deprecated + * @see \Magento\Checkout\Api\BillingAddressManagementInterface::assign */ public function setAddress($cartId, $addressData); } diff --git a/app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceInterface.php index a30ce8ad19a..74aa8aebd08 100644 --- a/app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceInterface.php @@ -13,6 +13,8 @@ interface ReadServiceInterface * @param int $cartId The cart ID. * @return \Magento\Checkout\Service\V1\Data\Cart\Address Shipping address object. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @deprecated + * @see \Magento\Checkout\Api\ShippingAddressManagementInterface::get */ public function getAddress($cartId); } diff --git a/app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceInterface.php index 056c2d3c813..7d7b4a60a80 100644 --- a/app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceInterface.php @@ -15,6 +15,8 @@ interface WriteServiceInterface * @return int Address ID. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. * @throws \Magento\Framework\Exception\InputException The specified cart ID or address data is not valid. + * @deprecated + * @see \Magento\Checkout\Api\ShippingAddressManagementInterface::assign */ public function setAddress($cartId, $addressData); } diff --git a/app/code/Magento/Checkout/Service/V1/Cart/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Cart/ReadServiceInterface.php index 30f1120de02..c2c5a1ad898 100644 --- a/app/code/Magento/Checkout/Service/V1/Cart/ReadServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/Cart/ReadServiceInterface.php @@ -17,6 +17,8 @@ interface ReadServiceInterface * @param int $cartId The cart ID. * @return \Magento\Checkout\Service\V1\Data\Cart Cart object. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @deprecated + * @see \Magento\Checkout\Api\CartRepositoryInterface::get */ public function getCart($cartId); @@ -26,6 +28,8 @@ interface ReadServiceInterface * @param int $customerId The customer ID. * @return \Magento\Checkout\Service\V1\Data\Cart Cart object. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified customer does not exist. + * @deprecated + * @see \Magento\Checkout\Api\CartManagementInterface::getCartForCustomer */ public function getCartForCustomer($customerId); @@ -34,6 +38,8 @@ interface ReadServiceInterface * * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Checkout\Service\V1\Data\CartSearchResults Cart search results object. + * @deprecated + * @see \Magento\Checkout\Api\CartRepositoryInterface::getList */ public function getCartList(SearchCriteria $searchCriteria); } diff --git a/app/code/Magento/Checkout/Service/V1/Cart/TotalsServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Cart/TotalsServiceInterface.php index 98b645e0328..29ce0d472b2 100644 --- a/app/code/Magento/Checkout/Service/V1/Cart/TotalsServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/Cart/TotalsServiceInterface.php @@ -6,6 +6,7 @@ namespace Magento\Checkout\Service\V1\Cart; /** * Totals service interface. + * @deprecated */ interface TotalsServiceInterface { @@ -15,6 +16,7 @@ interface TotalsServiceInterface * @param int $cartId The cart ID. * @return \Magento\Checkout\Service\V1\Data\Cart\Totals Quote totals data. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @see \Magento\Checkout\Api\CartTotalRepositoryInterface::get */ public function getTotals($cartId); } diff --git a/app/code/Magento/Checkout/Service/V1/Cart/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Cart/WriteServiceInterface.php index 0fa05ab4302..29c0a09f3d6 100644 --- a/app/code/Magento/Checkout/Service/V1/Cart/WriteServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/Cart/WriteServiceInterface.php @@ -14,6 +14,8 @@ interface WriteServiceInterface * * @throws \Magento\Framework\Exception\CouldNotSaveException The empty cart and quote could not be created. * @return int Cart ID. + * @deprecated + * @see \Magento\Checkout\Api\CartManagementInterface::createEmptyCart */ public function create(); @@ -23,6 +25,8 @@ interface WriteServiceInterface * @param int $cartId The cart ID. * @param int $customerId The customer ID. * @return boolean + * @deprecated + * @see \Magento\Checkout\Api\CartManagementInterface::assignCustomer */ public function assignCustomer($cartId, $customerId); @@ -31,6 +35,7 @@ interface WriteServiceInterface * * @param int $cartId The cart ID. * @return int Order ID. + * @see \Magento\Checkout\Api\CartManagementInterface::order */ public function order($cartId); } diff --git a/app/code/Magento/Checkout/Service/V1/Coupon/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Coupon/ReadServiceInterface.php index aeee0e836a7..fa2c7d01ead 100644 --- a/app/code/Magento/Checkout/Service/V1/Coupon/ReadServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/Coupon/ReadServiceInterface.php @@ -6,6 +6,7 @@ namespace Magento\Checkout\Service\V1\Coupon; /** * Coupon read service interface. + * @deprecated */ interface ReadServiceInterface { @@ -15,6 +16,7 @@ interface ReadServiceInterface * @param int $cartId The cart ID. * @return \Magento\Checkout\Service\V1\Data\Cart\Coupon Coupon object. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @see \Magento\Checkout\Api\CartManagementInterface::getCouponCode */ public function get($cartId); } diff --git a/app/code/Magento/Checkout/Service/V1/Coupon/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Coupon/WriteServiceInterface.php index bbb755878cf..4b562e5cac8 100644 --- a/app/code/Magento/Checkout/Service/V1/Coupon/WriteServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/Coupon/WriteServiceInterface.php @@ -6,6 +6,7 @@ namespace Magento\Checkout\Service\V1\Coupon; /** * Coupon write service interface. + * @deprecated */ interface WriteServiceInterface { @@ -17,6 +18,7 @@ interface WriteServiceInterface * @return bool * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. * @throws \Magento\Framework\Exception\CouldNotSaveException The specified coupon could not be added. + * @see \Magento\Checkout\Api\CartManagementInterface::setCoupon */ public function set($cartId, \Magento\Checkout\Service\V1\Data\Cart\Coupon $couponCodeData); @@ -27,6 +29,7 @@ interface WriteServiceInterface * @return bool * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. * @throws \Magento\Framework\Exception\CouldNotDeleteException The specified coupon could not be deleted. + * @see \Magento\Checkout\Api\CartManagementInterface::removeCoupon */ public function delete($cartId); } diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Coupon.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Coupon.php index 376fb3bd320..fc7d6ca38d1 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Coupon.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Coupon.php @@ -8,6 +8,8 @@ namespace Magento\Checkout\Service\V1\Data\Cart; * Coupon data for quote. * * @codeCoverageIgnore + * @deprecated + * @todo remove this dto */ class Coupon extends \Magento\Framework\Api\AbstractExtensibleObject { diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Item.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Item.php index 264fefde9a1..558ec12deaf 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Item.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Item.php @@ -9,6 +9,7 @@ namespace Magento\Checkout\Service\V1\Data\Cart; * Shopping cart item data object. * * @codeCoverageIgnore + * @see \Magento\Checkout\Api\Data\CartItemInterface */ class Item extends \Magento\Framework\Api\AbstractExtensibleObject { diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals.php index 5db5df2c21e..82b07dac9fc 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals.php @@ -8,6 +8,8 @@ namespace Magento\Checkout\Service\V1\Data\Cart; * Cart Totals * * @codeCoverageIgnore + * @deprecated + * @see \Magento\Checkout\Api\Data\TotalsInterface */ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject { diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals/Item.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals/Item.php index 5b497d0b0f5..32ee17e3f3a 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals/Item.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals/Item.php @@ -8,6 +8,8 @@ namespace Magento\Checkout\Service\V1\Data\Cart\Totals; * Cart item totals. * * @codeCoverageIgnore + * @deprecated + * @see \Magento\Checkout\Api\Data\TotalsItemInterface */ class Item extends \Magento\Framework\Api\AbstractExtensibleObject { diff --git a/app/code/Magento/Checkout/Service/V1/Item/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Item/ReadServiceInterface.php index c759bd764e6..a01568f46b1 100644 --- a/app/code/Magento/Checkout/Service/V1/Item/ReadServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/Item/ReadServiceInterface.php @@ -15,6 +15,7 @@ interface ReadServiceInterface * @param int $cartId The cart ID. * @return \Magento\Checkout\Service\V1\Data\Cart\Item[] Array of items. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @see \Magento\Checkout\Api\CartItemRepositoryInterface::getList */ public function getList($cartId); } diff --git a/app/code/Magento/Checkout/Service/V1/Item/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Item/WriteServiceInterface.php index 51e44f70557..1caeb28e8c0 100644 --- a/app/code/Magento/Checkout/Service/V1/Item/WriteServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/Item/WriteServiceInterface.php @@ -18,6 +18,7 @@ interface WriteServiceInterface * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. * @throws \Magento\Framework\Exception\CouldNotSaveException The specified item could not be saved to the cart. * @throws \Magento\Framework\Exception\InputException The specified item or cart is not valid. + * @see \Magento\Checkout\Api\CartItemRepositoryInterface::save */ public function addItem($cartId, \Magento\Checkout\Service\V1\Data\Cart\Item $data); @@ -31,6 +32,7 @@ interface WriteServiceInterface * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item or cart does not exist. * @throws \Magento\Framework\Exception\CouldNotSaveException The item could not be updated. * @throws \Magento\Framework\Exception\InputException The specified item or cart is not valid. + * @see \Magento\Checkout\Api\CartItemRepositoryInterface::save */ public function updateItem($cartId, $itemId, \Magento\Checkout\Service\V1\Data\Cart\Item $data); @@ -42,6 +44,7 @@ interface WriteServiceInterface * @return bool * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item or cart does not exist. * @throws \Magento\Framework\Exception\CouldNotSaveException The item could not be removed. + * @see \Magento\Checkout\Api\CartItemRepositoryInterface::deleteById */ public function removeItem($cartId, $itemId); } diff --git a/app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceInterface.php index 2f109474135..ba960f3a3f1 100644 --- a/app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceInterface.php @@ -15,6 +15,8 @@ interface ReadServiceInterface * @param int $cartId The cart ID. * @return \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod Payment method object. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @deprecated + * @see \Magento\Checkout\Api\PaymentMethodManagementInterface::get */ public function getPayment($cartId); @@ -24,6 +26,8 @@ interface ReadServiceInterface * @param int $cartId The cart ID. * @return \Magento\Checkout\Service\V1\Data\PaymentMethod[] Array of payment methods. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @deprecated + * @see \Magento\Checkout\Api\PaymentMethodManagementInterface::getList */ public function getList($cartId); } diff --git a/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceInterface.php index 4b4bca3c9fd..a8965090000 100644 --- a/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceInterface.php @@ -17,6 +17,8 @@ interface WriteServiceInterface * @return int Payment method ID. * @throws \Magento\Framework\Exception\State\InvalidTransitionException The billing or shipping address is not set, or the specified payment method is not available. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @deprecated + * @see \Magento\Checkout\Api\PaymentMethodManagementInterface::set */ public function set(\Magento\Checkout\Service\V1\Data\Cart\PaymentMethod $method, $cartId); } diff --git a/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceInterface.php index 19f1dbd0265..28d2aab6853 100644 --- a/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceInterface.php @@ -16,6 +16,8 @@ interface ReadServiceInterface * @return \Magento\Checkout\Service\V1\Data\Cart\ShippingMethod Shipping method. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified shopping cart does not exist. * @throws \Magento\Framework\Exception\StateException The shipping address is not set. + * @deprecated + * @see \Magento\Checkout\Api\ShippingMethodManagementInterface::get */ public function getMethod($cartId); @@ -26,6 +28,8 @@ interface ReadServiceInterface * @return \Magento\Checkout\Service\V1\Data\Cart\ShippingMethod[] An array of shipping methods. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified quote does not exist. * @throws \Magento\Framework\Exception\StateException The shipping address is not set. + * @deprecated + * @see \Magento\Checkout\Api\ShippingMethodManagementInterface::getList */ public function getList($cartId); } diff --git a/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceInterface.php index fa77d39e24c..832a2a16c3c 100644 --- a/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceInterface.php @@ -20,6 +20,8 @@ interface WriteServiceInterface * @throws \Magento\Framework\Exception\CouldNotSaveException The shipping method could not be saved. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart contains only virtual products so the shipping method does not apply. * @throws \Magento\Framework\Exception\StateException The billing or shipping address is not set. + * @deprecated + * @see \Magento\Checkout\Api\ShippingMethodManagementInterface::set */ public function setMethod($cartId, $carrierCode, $methodCode); } -- GitLab From 40240634ba9186da3a54fc158a2ccde4e037d55d Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Fri, 19 Dec 2014 17:19:31 +0200 Subject: [PATCH 002/114] MAGETWO-31306: Text message 'This is a required field.' is absent for "Terms and Conditions" if it wasn't selected --- .../Catalog/view/frontend/web/product/view/validation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/view/frontend/web/product/view/validation.js b/app/code/Magento/Catalog/view/frontend/web/product/view/validation.js index 751c7ef474f..20f0b205063 100644 --- a/app/code/Magento/Catalog/view/frontend/web/product/view/validation.js +++ b/app/code/Magento/Catalog/view/frontend/web/product/view/validation.js @@ -16,7 +16,7 @@ $.widget("mage.validation", $.mage.validation, { options: { - radioCheckboxClosest: 'ul', + radioCheckboxClosest: 'ul, ol', errorPlacement: function (error, element) { if (element.attr('data-validate-message-box')) { var messageBox = $(element.attr('data-validate-message-box')); -- GitLab From 68e9af1f2e6727c470276ee40fa34bee6dad3dd6 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Fri, 19 Dec 2014 18:07:03 +0200 Subject: [PATCH 003/114] MAGETWO-32020: Introduce new API CheckoutAgreements interfaces --- .../CheckoutAgreementsRepositoryInterface.php | 16 +++++ .../Api/Data/CheckoutAgreementsInterface.php | 61 +++++++++++++++++++ .../V1/Agreement/ReadServiceInterface.php | 2 + 3 files changed, 79 insertions(+) create mode 100644 app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryInterface.php create mode 100644 app/code/Magento/CheckoutAgreements/Api/Data/CheckoutAgreementsInterface.php diff --git a/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryInterface.php b/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryInterface.php new file mode 100644 index 00000000000..65f683e3214 --- /dev/null +++ b/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryInterface.php @@ -0,0 +1,16 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\CheckoutAgreements\Api; + +interface CheckoutAgreementsRepositoryInterface +{ + /** + * Lists active checkout agreements. + * + * @return \Magento\CheckoutAgreements\Api\Data\CheckoutAgreementsInterface[] + * @see \Magento\CheckoutAgreements\Service\V1\Agreement\ReadServiceInterface::getList + */ + public function getList(); +} diff --git a/app/code/Magento/CheckoutAgreements/Api/Data/CheckoutAgreementsInterface.php b/app/code/Magento/CheckoutAgreements/Api/Data/CheckoutAgreementsInterface.php new file mode 100644 index 00000000000..bb114cb4635 --- /dev/null +++ b/app/code/Magento/CheckoutAgreements/Api/Data/CheckoutAgreementsInterface.php @@ -0,0 +1,61 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\CheckoutAgreements\Api\Data; + +/** + * @see \Magento\CheckoutAgreements\Service\V1\Data\Agreement + */ +interface CheckoutAgreementsInterface +{ + /** + * Returns the agreement ID. + * + * @return int Agreement ID. + */ + public function getId(); + + /** + * Returns the agreement name. + * + * @return string Agreement name. + */ + public function getName(); + + /** + * Returns the agreement content. + * + * @return string Agreement content. + */ + public function getContent(); + + /** + * Returns the agreement content height, which is an optional CSS property. + * + * @return string|null Agreement content height. Otherwise, null. + */ + public function getContentHeight(); + + /** + * Returns the agreement checkbox text. + * + * @return string Agreement checkbox text. + */ + public function getCheckboxText(); + + /** + * Returns the agreement status. + * + * @return bool Agreement status. + */ + public function isActive(); + + /** + * Returns the agreement content type. + * + * @return bool * true - HTML. + * * false - plain text. + */ + public function isHtml(); +} diff --git a/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceInterface.php b/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceInterface.php index c774651e736..3ee130b1a34 100644 --- a/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceInterface.php +++ b/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceInterface.php @@ -13,6 +13,8 @@ interface ReadServiceInterface * Lists active checkout agreements. * * @return \Magento\CheckoutAgreements\Service\V1\Data\Agreement[] Array of active checkout agreements. + * @deprecated + * @see \app\code\Magento\CheckoutAgreements\Api\CheckoutAgreementsRepositoryInterface::getList */ public function getList(); } -- GitLab From d2001b0a0b2068391373b6efde4f8a825e54d5f8 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Mon, 22 Dec 2014 10:21:20 +0200 Subject: [PATCH 004/114] MAGETWO-32020: Introduce new API CheckoutAgreements interfaces --- .../Api/Data/CheckoutAgreementsInterface.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/CheckoutAgreements/Api/Data/CheckoutAgreementsInterface.php b/app/code/Magento/CheckoutAgreements/Api/Data/CheckoutAgreementsInterface.php index bb114cb4635..533894d3ff1 100644 --- a/app/code/Magento/CheckoutAgreements/Api/Data/CheckoutAgreementsInterface.php +++ b/app/code/Magento/CheckoutAgreements/Api/Data/CheckoutAgreementsInterface.php @@ -49,7 +49,7 @@ interface CheckoutAgreementsInterface * * @return bool Agreement status. */ - public function isActive(); + public function getIsActive(); /** * Returns the agreement content type. @@ -57,5 +57,5 @@ interface CheckoutAgreementsInterface * @return bool * true - HTML. * * false - plain text. */ - public function isHtml(); + public function getIsHtml(); } -- GitLab From 837d61db4b079b0ce865810d52bd4aae75e5eada Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Tue, 23 Dec 2014 09:32:09 +0200 Subject: [PATCH 005/114] MAGETWO-31972: Implement GiftMessage Api interfaces --- .../GiftMessage/Api/Data/MessageInterface.php | 71 +++++++++++++++++++ .../Api/GiftMessageRepositoryInterface.php | 59 +++++++++++++++ .../Service/V1/ReadServiceInterface.php | 4 ++ .../Service/V1/WriteServiceInterface.php | 4 ++ 4 files changed, 138 insertions(+) create mode 100644 app/code/Magento/GiftMessage/Api/Data/MessageInterface.php create mode 100644 app/code/Magento/GiftMessage/Api/GiftMessageRepositoryInterface.php diff --git a/app/code/Magento/GiftMessage/Api/Data/MessageInterface.php b/app/code/Magento/GiftMessage/Api/Data/MessageInterface.php new file mode 100644 index 00000000000..22bfdd4b643 --- /dev/null +++ b/app/code/Magento/GiftMessage/Api/Data/MessageInterface.php @@ -0,0 +1,71 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\GiftMessage\Api\Data; + +/** + * @see \Magento\GiftMessage\Service\V1\Data\Message + */ +interface MessageInterface +{ + /** + * Gift message ID. + */ + const GIFT_MESSAGE_ID = 'gift_message_id'; + + /** + * Sender name. + */ + const SENDER = 'sender'; + + /** + * Recipient name. + */ + const RECIPIENT = 'recipient'; + + /** + * Message text. + */ + const MESSAGE = 'message'; + + /** + * Customer ID. + */ + const CUSTOMER_ID = 'customer_id'; + + /** + * Returns the gift message ID. + * + * @return int|null Gift message ID. Otherwise, null. + */ + public function getGiftMessageId(); + + /** + * Returns the customer ID. + * + * @return int|null Customer ID. Otherwise, null. + */ + public function getCustomerId(); + + /** + * Returns the sender name. + * + * @return string Sender name. + */ + public function getSender(); + + /** + * Returns the recipient name. + * + * @return string Recipient name. + */ + public function getRecipient(); + + /** + * Returns the message text. + * + * @return string Message text. + */ + public function getMessage(); +} diff --git a/app/code/Magento/GiftMessage/Api/GiftMessageRepositoryInterface.php b/app/code/Magento/GiftMessage/Api/GiftMessageRepositoryInterface.php new file mode 100644 index 00000000000..308fa96fcbc --- /dev/null +++ b/app/code/Magento/GiftMessage/Api/GiftMessageRepositoryInterface.php @@ -0,0 +1,59 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\GiftMessage\Api; + +interface GiftMessageRepositoryInterface +{ + /** + * Returns the gift message for a specified order. + * + * @param int $cartId The shopping cart ID. + * @return \Magento\GiftMessage\Service\V1\Data\Message Gift message. + * @see \Magento\GiftMessage\Service\V1\ReadServiceInterface::get + */ + public function get($cartId); + + /** + * Returns the gift message for a specified item in a specified shopping cart. + * + * @param int $cartId The shopping cart ID. + * @param int $itemId The item ID. + * @return \Magento\GiftMessage\Service\V1\Data\Message Gift message. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item does not exist in the cart. + * @see \Magento\GiftMessage\Service\V1\ReadServiceInterface::getItemMessage + */ + public function getItemMessage($cartId, $itemId); + + /** + * Sets the gift message for an entire order. + * + * @param int $cartId The cart ID. + * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage The gift message. + * @return bool + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @throws \Magento\Framework\Exception\InputException You cannot add gift messages to empty carts. + * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to + * virtual products. + * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. + * @see \Magento\GiftMessage\Service\V1\WriteServiceInterface::setForQuote + */ + public function assignToCart($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage); + + /** + * Sets the gift message for a specified item. + * + * @param int $cartId The cart ID. + * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage The gift message. + * @param int $itemId The item ID. + * @return bool + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @throws \Magento\Framework\Exception\InputException You cannot add gift messages to empty carts. + * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to + * virtual products. + * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. + * @see \Magento\GiftMessage\Service\V1\WriteServiceInterface::setForItem + */ + public function assignToItem($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage, $itemId); +} diff --git a/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php b/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php index ada94682116..f896c48a03c 100644 --- a/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php +++ b/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php @@ -14,6 +14,8 @@ interface ReadServiceInterface * * @param int $cartId The shopping cart ID. * @return \Magento\GiftMessage\Service\V1\Data\Message Gift message. + * @deprecated + * @see \Magento\GiftMessage\Api\GiftMessageRepositoryInterface::get */ public function get($cartId); @@ -24,6 +26,8 @@ interface ReadServiceInterface * @param int $itemId The item ID. * @return \Magento\GiftMessage\Service\V1\Data\Message Gift message. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item does not exist in the cart. + * @deprecated + * @see \Magento\GiftMessage\Api\GiftMessageRepositoryInterface::getItemMessage */ public function getItemMessage($cartId, $itemId); } diff --git a/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php b/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php index f7ef8bfe501..62763002789 100644 --- a/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php +++ b/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php @@ -20,6 +20,8 @@ interface WriteServiceInterface * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to * virtual products. * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. + * @deprecated + * @see \Magento\GiftMessage\Api\GiftMessageRepositoryInterface::assignToQuote */ public function setForQuote($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage); @@ -35,6 +37,8 @@ interface WriteServiceInterface * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to * virtual products. * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. + * @deprecated + * @see \Magento\GiftMessage\Api\GiftMessageRepositoryInterface::assignToItem */ public function setForItem($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage, $itemId); } -- GitLab From 310d14284e3297877bded77dd64af0ca9e8e0ce6 Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Tue, 23 Dec 2014 17:43:59 +0200 Subject: [PATCH 006/114] MAGETWO-31972: Implement GiftMessage Api interfaces --- .../Api/GiftMessageManagementInterface.php | 50 +++++++++++++++++++ .../Api/GiftMessageRepositoryInterface.php | 42 ---------------- .../Service/V1/ReadServiceInterface.php | 2 +- .../Service/V1/WriteServiceInterface.php | 4 +- 4 files changed, 53 insertions(+), 45 deletions(-) create mode 100644 app/code/Magento/GiftMessage/Api/GiftMessageManagementInterface.php diff --git a/app/code/Magento/GiftMessage/Api/GiftMessageManagementInterface.php b/app/code/Magento/GiftMessage/Api/GiftMessageManagementInterface.php new file mode 100644 index 00000000000..28a00a03059 --- /dev/null +++ b/app/code/Magento/GiftMessage/Api/GiftMessageManagementInterface.php @@ -0,0 +1,50 @@ +<?php +/** + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ +namespace Magento\GiftMessage\Api; + +interface GiftMessageManagementInterface +{ + /** + * Returns the gift message for a specified item in a specified shopping cart. + * + * @param int $cartId The shopping cart ID. + * @param int $itemId The item ID. + * @return \Magento\GiftMessage\Service\V1\Data\Message Gift message. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item does not exist in the cart. + * @see \Magento\GiftMessage\Service\V1\ReadServiceInterface::getItemMessage + */ + public function getItemMessage($cartId, $itemId); + + /** + * Sets the gift message for an entire order. + * + * @param int $cartId The cart ID. + * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage The gift message. + * @return bool + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @throws \Magento\Framework\Exception\InputException You cannot add gift messages to empty carts. + * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to + * virtual products. + * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. + * @see \Magento\GiftMessage\Service\V1\WriteServiceInterface::setForQuote + */ + public function assignToCart($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage); + + /** + * Sets the gift message for a specified item. + * + * @param int $cartId The cart ID. + * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage The gift message. + * @param int $itemId The item ID. + * @return bool + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @throws \Magento\Framework\Exception\InputException You cannot add gift messages to empty carts. + * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to + * virtual products. + * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. + * @see \Magento\GiftMessage\Service\V1\WriteServiceInterface::setForItem + */ + public function assignToItem($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage, $itemId); +} diff --git a/app/code/Magento/GiftMessage/Api/GiftMessageRepositoryInterface.php b/app/code/Magento/GiftMessage/Api/GiftMessageRepositoryInterface.php index 308fa96fcbc..e25410b2cbc 100644 --- a/app/code/Magento/GiftMessage/Api/GiftMessageRepositoryInterface.php +++ b/app/code/Magento/GiftMessage/Api/GiftMessageRepositoryInterface.php @@ -14,46 +14,4 @@ interface GiftMessageRepositoryInterface * @see \Magento\GiftMessage\Service\V1\ReadServiceInterface::get */ public function get($cartId); - - /** - * Returns the gift message for a specified item in a specified shopping cart. - * - * @param int $cartId The shopping cart ID. - * @param int $itemId The item ID. - * @return \Magento\GiftMessage\Service\V1\Data\Message Gift message. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item does not exist in the cart. - * @see \Magento\GiftMessage\Service\V1\ReadServiceInterface::getItemMessage - */ - public function getItemMessage($cartId, $itemId); - - /** - * Sets the gift message for an entire order. - * - * @param int $cartId The cart ID. - * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage The gift message. - * @return bool - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @throws \Magento\Framework\Exception\InputException You cannot add gift messages to empty carts. - * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to - * virtual products. - * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. - * @see \Magento\GiftMessage\Service\V1\WriteServiceInterface::setForQuote - */ - public function assignToCart($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage); - - /** - * Sets the gift message for a specified item. - * - * @param int $cartId The cart ID. - * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage The gift message. - * @param int $itemId The item ID. - * @return bool - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @throws \Magento\Framework\Exception\InputException You cannot add gift messages to empty carts. - * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to - * virtual products. - * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. - * @see \Magento\GiftMessage\Service\V1\WriteServiceInterface::setForItem - */ - public function assignToItem($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage, $itemId); } diff --git a/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php b/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php index f896c48a03c..23a8a746d4c 100644 --- a/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php +++ b/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php @@ -27,7 +27,7 @@ interface ReadServiceInterface * @return \Magento\GiftMessage\Service\V1\Data\Message Gift message. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item does not exist in the cart. * @deprecated - * @see \Magento\GiftMessage\Api\GiftMessageRepositoryInterface::getItemMessage + * @see \Magento\GiftMessage\Api\GiftMessageManagementInterface::getItemMessage */ public function getItemMessage($cartId, $itemId); } diff --git a/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php b/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php index 62763002789..5878dc96e35 100644 --- a/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php +++ b/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php @@ -21,7 +21,7 @@ interface WriteServiceInterface * virtual products. * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. * @deprecated - * @see \Magento\GiftMessage\Api\GiftMessageRepositoryInterface::assignToQuote + * @see \Magento\GiftMessage\Api\GiftMessageManagementInterface::assignToQuote */ public function setForQuote($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage); @@ -38,7 +38,7 @@ interface WriteServiceInterface * virtual products. * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. * @deprecated - * @see \Magento\GiftMessage\Api\GiftMessageRepositoryInterface::assignToItem + * @see \Magento\GiftMessage\Api\GiftMessageManagementInterface::assignToItem */ public function setForItem($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage, $itemId); } -- GitLab From 778c3522cfbd0f0dc047890d6c463adc1e4eaaf9 Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Tue, 23 Dec 2014 18:40:32 +0200 Subject: [PATCH 007/114] MAGETWO-31972: Implement GiftMessage Api interfaces --- ...=> GiftMessageItemRepositoryInterface.php} | 23 ++++--------------- .../Api/GiftMessageRepositoryInterface.php | 15 ++++++++++++ .../Service/V1/ReadServiceInterface.php | 2 +- .../Service/V1/WriteServiceInterface.php | 4 ++-- 4 files changed, 22 insertions(+), 22 deletions(-) rename app/code/Magento/GiftMessage/Api/{GiftMessageManagementInterface.php => GiftMessageItemRepositoryInterface.php} (54%) diff --git a/app/code/Magento/GiftMessage/Api/GiftMessageManagementInterface.php b/app/code/Magento/GiftMessage/Api/GiftMessageItemRepositoryInterface.php similarity index 54% rename from app/code/Magento/GiftMessage/Api/GiftMessageManagementInterface.php rename to app/code/Magento/GiftMessage/Api/GiftMessageItemRepositoryInterface.php index 28a00a03059..42df68610fe 100644 --- a/app/code/Magento/GiftMessage/Api/GiftMessageManagementInterface.php +++ b/app/code/Magento/GiftMessage/Api/GiftMessageItemRepositoryInterface.php @@ -4,7 +4,7 @@ */ namespace Magento\GiftMessage\Api; -interface GiftMessageManagementInterface +interface GiftMessageItemRepositoryInterface { /** * Returns the gift message for a specified item in a specified shopping cart. @@ -15,25 +15,10 @@ interface GiftMessageManagementInterface * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item does not exist in the cart. * @see \Magento\GiftMessage\Service\V1\ReadServiceInterface::getItemMessage */ - public function getItemMessage($cartId, $itemId); + public function get($cartId, $itemId); /** - * Sets the gift message for an entire order. - * - * @param int $cartId The cart ID. - * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage The gift message. - * @return bool - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @throws \Magento\Framework\Exception\InputException You cannot add gift messages to empty carts. - * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to - * virtual products. - * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. - * @see \Magento\GiftMessage\Service\V1\WriteServiceInterface::setForQuote - */ - public function assignToCart($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage); - - /** - * Sets the gift message for a specified item. + * Sets the gift message for a specified item in a specified shopping cart. * * @param int $cartId The cart ID. * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage The gift message. @@ -46,5 +31,5 @@ interface GiftMessageManagementInterface * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. * @see \Magento\GiftMessage\Service\V1\WriteServiceInterface::setForItem */ - public function assignToItem($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage, $itemId); + public function save($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage, $itemId); } diff --git a/app/code/Magento/GiftMessage/Api/GiftMessageRepositoryInterface.php b/app/code/Magento/GiftMessage/Api/GiftMessageRepositoryInterface.php index e25410b2cbc..02bd9d870f7 100644 --- a/app/code/Magento/GiftMessage/Api/GiftMessageRepositoryInterface.php +++ b/app/code/Magento/GiftMessage/Api/GiftMessageRepositoryInterface.php @@ -14,4 +14,19 @@ interface GiftMessageRepositoryInterface * @see \Magento\GiftMessage\Service\V1\ReadServiceInterface::get */ public function get($cartId); + + /** + * Sets the gift message for an entire order. + * + * @param int $cartId The cart ID. + * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage The gift message. + * @return bool + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @throws \Magento\Framework\Exception\InputException You cannot add gift messages to empty carts. + * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to + * virtual products. + * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. + * @see \Magento\GiftMessage\Service\V1\WriteServiceInterface::setForQuote + */ + public function save($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage); } diff --git a/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php b/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php index 23a8a746d4c..aa8fe675f08 100644 --- a/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php +++ b/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php @@ -27,7 +27,7 @@ interface ReadServiceInterface * @return \Magento\GiftMessage\Service\V1\Data\Message Gift message. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item does not exist in the cart. * @deprecated - * @see \Magento\GiftMessage\Api\GiftMessageManagementInterface::getItemMessage + * @see \Magento\GiftMessage\Api\GiftMessageItemRepositoryInterface::get */ public function getItemMessage($cartId, $itemId); } diff --git a/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php b/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php index 5878dc96e35..23b884729aa 100644 --- a/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php +++ b/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php @@ -21,7 +21,7 @@ interface WriteServiceInterface * virtual products. * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. * @deprecated - * @see \Magento\GiftMessage\Api\GiftMessageManagementInterface::assignToQuote + * @see \Magento\GiftMessage\Api\GiftMessageRepositoryInterface::save */ public function setForQuote($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage); @@ -38,7 +38,7 @@ interface WriteServiceInterface * virtual products. * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. * @deprecated - * @see \Magento\GiftMessage\Api\GiftMessageManagementInterface::assignToItem + * @see \Magento\GiftMessage\Api\GiftMessageItemRepositoryInterface::save */ public function setForItem($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage, $itemId); } -- GitLab From c5ab8263b5b51b59518e4b6eb5e50a70be3f4c17 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Wed, 24 Dec 2014 15:54:51 +0200 Subject: [PATCH 008/114] MAGETWO-32020: Introduce new API CheckoutAgreements interfaces -fixes after CR --- .../Api/CheckoutAgreementsRepositoryInterface.php | 2 +- .../{CheckoutAgreementsInterface.php => AgreementInterface.php} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename app/code/Magento/CheckoutAgreements/Api/Data/{CheckoutAgreementsInterface.php => AgreementInterface.php} (97%) diff --git a/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryInterface.php b/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryInterface.php index 65f683e3214..0e596daa5e9 100644 --- a/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryInterface.php +++ b/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryInterface.php @@ -9,7 +9,7 @@ interface CheckoutAgreementsRepositoryInterface /** * Lists active checkout agreements. * - * @return \Magento\CheckoutAgreements\Api\Data\CheckoutAgreementsInterface[] + * @return \Magento\CheckoutAgreements\Api\Data\AgreementInterface[] * @see \Magento\CheckoutAgreements\Service\V1\Agreement\ReadServiceInterface::getList */ public function getList(); diff --git a/app/code/Magento/CheckoutAgreements/Api/Data/CheckoutAgreementsInterface.php b/app/code/Magento/CheckoutAgreements/Api/Data/AgreementInterface.php similarity index 97% rename from app/code/Magento/CheckoutAgreements/Api/Data/CheckoutAgreementsInterface.php rename to app/code/Magento/CheckoutAgreements/Api/Data/AgreementInterface.php index 533894d3ff1..3b603d0a39a 100644 --- a/app/code/Magento/CheckoutAgreements/Api/Data/CheckoutAgreementsInterface.php +++ b/app/code/Magento/CheckoutAgreements/Api/Data/AgreementInterface.php @@ -7,7 +7,7 @@ namespace Magento\CheckoutAgreements\Api\Data; /** * @see \Magento\CheckoutAgreements\Service\V1\Data\Agreement */ -interface CheckoutAgreementsInterface +interface AgreementInterface { /** * Returns the agreement ID. -- GitLab From ddb7ee45ce092b2a30ae9b3991dfb9de29ee492d Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Wed, 24 Dec 2014 16:40:06 +0200 Subject: [PATCH 009/114] MAGETWO-31960: Introduce Checkout Api interfaces -fixes after CR --- app/code/Magento/Checkout/Api/CartManagementInterface.php | 6 ++++-- app/code/Magento/Checkout/Api/Data/CartInterface.php | 7 ------- app/code/Magento/Checkout/Service/V1/Cart/WriteService.php | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/Checkout/Api/CartManagementInterface.php b/app/code/Magento/Checkout/Api/CartManagementInterface.php index 5629fb0f0bd..0a58fd204f0 100644 --- a/app/code/Magento/Checkout/Api/CartManagementInterface.php +++ b/app/code/Magento/Checkout/Api/CartManagementInterface.php @@ -9,11 +9,12 @@ interface CartManagementInterface /** * Enables an administrative or guest user to create an empty cart and quote for an anonymous customer. * + * @param int $storeId * @throws \Magento\Framework\Exception\CouldNotSaveException The empty cart and quote could not be created. * @return int Cart ID. * @see \Magento\Checkout\Service\V1\Cart\WriteServiceInterface::create */ - public function createEmptyCart(); + public function createEmptyCart($storeId); /** * Returns information for the cart for a specified customer. @@ -30,10 +31,11 @@ interface CartManagementInterface * * @param int $cartId The cart ID. * @param int $customerId The customer ID. + * @param int $storeId * @return boolean * @see \Magento\Checkout\Service\V1\Cart\WriteServiceInterface::assignCustomer */ - public function assignCustomer($cartId, $customerId); + public function assignCustomer($cartId, $customerId, $storeId); /** * Returns information for a coupon in a specified cart. diff --git a/app/code/Magento/Checkout/Api/Data/CartInterface.php b/app/code/Magento/Checkout/Api/Data/CartInterface.php index db54707d142..3d17775da42 100644 --- a/app/code/Magento/Checkout/Api/Data/CartInterface.php +++ b/app/code/Magento/Checkout/Api/Data/CartInterface.php @@ -16,13 +16,6 @@ interface CartInterface extends \Magento\Framework\Api\ExtensibleDataInterface */ public function getId(); - /** - * Returns the store ID for the store where the cart was created. - * - * @return int|null Store ID. Otherwise, null. - */ - public function getStoreId(); - /** * Returns the cart creation date and time. * diff --git a/app/code/Magento/Checkout/Service/V1/Cart/WriteService.php b/app/code/Magento/Checkout/Service/V1/Cart/WriteService.php index 9fbaebf61f2..112be792f3e 100644 --- a/app/code/Magento/Checkout/Service/V1/Cart/WriteService.php +++ b/app/code/Magento/Checkout/Service/V1/Cart/WriteService.php @@ -127,8 +127,8 @@ class WriteService implements WriteServiceInterface try { $this->quoteRepository->getActiveForCustomer($this->userContext->getUserId()); - throw new CouldNotSaveException('Cannot create quote'); } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { + throw new CouldNotSaveException('Cannot create quote'); } /** @var \Magento\Sales\Model\Quote $quote */ -- GitLab From add4457771c8381cb353221baa7ba6a79e714883 Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Wed, 31 Dec 2014 04:02:45 -0800 Subject: [PATCH 010/114] MAGETWO-31578: Implement tool for adding annotations to existing code - increased DepthOfInheritance minimum level to 8 - excluded php4 rules --- .../Magento/Test/Php/_files/phpmd/ruleset.xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml index 3a79cfa4cce..4551fd874cc 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml @@ -27,11 +27,19 @@ <rule ref="rulesets/unusedcode.xml" /> <!-- Code design rules --> - <rule ref="rulesets/design.xml" /> + <rule ref="rulesets/design.xml/ExitExpression" /> + <rule ref="rulesets/design.xml/EvalExpression" /> + <rule ref="rulesets/design.xml/GotoStatement" /> + <rule ref="rulesets/design.xml/NumberOfChildren" /> + <rule ref="rulesets/design.xml/DepthOfInheritance"> + <properties> + <property name="minimum" value="8" /> + </properties> + </rule> + <rule ref="rulesets/design.xml/CouplingBetweenObjects" /> <!-- Naming Rules --> <rule ref="rulesets/naming.xml/ShortMethodName" /> - <rule ref="rulesets/naming.xml/ConstructorWithNameAsEnclosingClass" /> <rule ref="rulesets/naming.xml/ConstantNamingConventions" /> <rule ref="rulesets/naming.xml/BooleanGetMethodName" /> </ruleset> -- GitLab From 40219a6e637cf3c3fe9b038df2d599dbccf5207b Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Tue, 6 Jan 2015 02:15:22 -0800 Subject: [PATCH 011/114] MAGETWO-31578: Implement tool for adding annotations to existing code - dev/* code marked with @SuppressWarnings annotations --- .../Interception/Fixture/Intercepted.php | 24 +++++++++++++++++++ .../Fixture/Intercepted/InterfacePlugin.php | 10 ++++++++ .../Fixture/Intercepted/Plugin.php | 18 ++++++++++++++ .../Fixture/InterceptedInterface.php | 6 +++++ .../Fixture/InterceptedParent.php | 6 +++++ .../Fixture/InterceptedParentInterface.php | 3 +++ .../Report/Product/Viewed/CollectionTest.php | 2 ++ .../Model/Calculation/RateRepositoryTest.php | 1 + .../Integrity/Modular/TemplateFilesTest.php | 1 + .../Integrity/Theme/TemplateFilesTest.php | 1 + .../phpmd/input/cyclomatic_complexity.php | 1 + .../phpmd/input/descendant_count.php | 3 +++ .../CodeMessTest/phpmd/input/field_count.php | 1 + .../phpmd/input/method_length.php | 1 + .../CodeMessTest/phpmd/input/naming.php | 5 ++++ .../phpmd/input/parameter_list.php | 1 + .../phpmd/input/prohibited_statement.php | 6 +++++ .../phpmd/input/prohibited_statement_goto.php | 3 +++ .../CodeMessTest/phpmd/input/public_count.php | 1 + .../CodeMessTest/phpmd/input/unused.php | 12 ++++++++++ .../coding_style/classes/normal_class.php | 1 + .../functions/multiline_wrong_declaration.php | 5 ++++ .../coding_style/functions/normal_func.php | 2 ++ .../functions/unneeded_multiline.php | 1 + .../naming/constant/minuscule_letter.php | 3 +++ .../naming/method/normal_underscore_start.php | 3 +++ .../naming/property/normal_underscore.php | 3 +++ .../Backend/Model/Session/QuoteTest.php | 2 ++ .../Bundle/Model/OptionRepositoryTest.php | 3 +++ .../Price/BundleSelectionPriceTest.php | 1 + .../Adminhtml/Category/SaveTest.php | 3 +++ .../Controller/Product/Compare/IndexTest.php | 4 ++++ .../Magento/Catalog/Model/CategoryTest.php | 4 ++++ .../Model/Layer/Filter/AttributeTest.php | 6 +++++ .../Filter/DataProvider/CategoryTest.php | 3 +++ .../Catalog/Model/Layer/Filter/PriceTest.php | 4 ++++ .../Magento/Catalog/Model/LayerTest.php | 1 + .../Model/Product/LinkTypeProviderTest.php | 3 +++ .../Catalog/Model/Rss/CategoryTest.php | 3 +++ .../CatalogInventory/Model/ObserverTest.php | 3 +++ .../Model/Spi/StockRegistryProviderTest.php | 3 +++ .../Model/Layer/Filter/AttributeTest.php | 6 +++++ .../Model/Layer/Filter/CategoryTest.php | 3 +++ .../Model/Layer/Filter/PriceTest.php | 1 + .../Block/Product/ProductsListTest.php | 1 + .../Checkout/Controller/Onepage/IndexTest.php | 3 +++ .../Magento/Checkout/Helper/CartTest.php | 1 + .../Checkout/Model/Type/OnepageTest.php | 4 ++++ .../Model/Product/Validator/PluginTest.php | 1 + .../Pricing/Price/AttributePriceTest.php | 3 +++ .../Customer/Block/Widget/NameTest.php | 1 + .../Controller/Account/CreatePostTest.php | 3 +++ .../Controller/Varien/Router/StandardTest.php | 1 + .../Magento/Framework/Message/ManagerTest.php | 3 +++ .../Model/Product/Type/GroupedTest.php | 3 +++ .../Block/Header/AdditionalTest.php | 2 ++ .../Condition/Product/AbstractProductTest.php | 2 ++ .../Order/Creditmemo/NewActionTest.php | 1 + .../Order/Creditmemo/PrintActionTest.php | 1 + .../Adminhtml/Order/Creditmemo/ViewTest.php | 4 ++++ .../Sales/Model/AdminOrder/CreateTest.php | 3 +++ .../Quote/Address/CollectTotalsTest.php | 6 +++++ .../Magento/Sales/Model/QuoteTest.php | 4 ++++ .../Magento/SalesRule/Model/UtilityTest.php | 1 + .../Adminhtml/Order/Shipment/AddTrackTest.php | 3 +++ .../Order/Shipment/NewActionTest.php | 3 +++ .../Adminhtml/Order/Shipment/ViewTest.php | 1 + .../testsuite/Magento/Tax/Helper/DataTest.php | 1 + .../Tax/Model/Sales/Total/Quote/TaxTest.php | 1 + .../Magento/Ui/Component/FilterPoolTest.php | 1 + .../Magento/Ui/Component/ListingTest.php | 3 +++ .../Wishlist/Controller/Index/CartTest.php | 16 +++++++++++++ 72 files changed, 254 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php index 84988bbba5b..d005d25826a 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php @@ -9,42 +9,66 @@ class Intercepted extends InterceptedParent implements InterceptedInterface { protected $_key; + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function A($param1) { $this->_key = $param1; return $this; } + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function B($param1, $param2) { return '<B>' . $param1 . $param2 . $this->C($param1) . '</B>'; } + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function C($param1) { return '<C>' . $param1 . '</C>'; } + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function D($param1) { return '<D>' . $this->_key . $param1 . '</D>'; } + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ final public function E($param1) { return '<E>' . $this->_key . $param1 . '</E>'; } + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function F($param1) { return '<F>' . $param1 . '</F>'; } + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function G($param1) { return '<G>' . $param1 . "</G>"; } + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function K($param1) { return '<K>' . $param1 . '</K>'; diff --git a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/InterfacePlugin.php b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/InterfacePlugin.php index 40a95354897..7524be69a24 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/InterfacePlugin.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/InterfacePlugin.php @@ -14,6 +14,7 @@ class InterfacePlugin * @param \Closure $next * @param string $param1 * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundC(InterceptedInterface $subject, \Closure $next, $param1) { @@ -31,16 +32,25 @@ class InterfacePlugin return '<IP:F>' . $subject->D($next($subject->C($param1))) . '</IP:F>'; } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function beforeG(InterceptedInterface $subject, $param1) { return ['<IP:bG>' . $param1 . '</IP:bG>']; } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function aroundG(InterceptedInterface $subject, \Closure $next, $param1) { return $next('<IP:G>' . $param1 . '</IP:G>'); } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function afterG(InterceptedInterface $subject, $result) { return '<IP:aG>' . $result . '</IP:aG>'; diff --git a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/Plugin.php b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/Plugin.php index 06e04190ae4..bb5c28aa280 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/Plugin.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/Plugin.php @@ -14,33 +14,51 @@ class Plugin */ protected $_counter = 0; + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function aroundC(Intercepted $subject, \Closure $next, $param1) { return '<P:C>' . $next($param1) . '</P:C>'; } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function aroundD(Intercepted $subject, \Closure $next, $param1) { $this->_counter++; return '<P:D>' . $this->_counter . ': ' . $next($param1) . '</P:D>'; } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function aroundK(Intercepted $subject, \Closure $next, $param1) { $result = $subject->C($param1); return '<P:K>' . $subject->F($result) . '</P:K>'; } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function beforeG(Intercepted $subject, $param1) { return ['<P:bG>' . $param1 . '</P:bG>']; } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function aroundG(Intercepted $subject, \Closure $next, $param1) { return $next('<P:G>' . $param1 . '</P:G>'); } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function afterG(Intercepted $subject, $result) { return '<P:aG>' . $result . '</P:aG>'; diff --git a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedInterface.php b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedInterface.php index fb4de8212a8..7a951369e38 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedInterface.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedInterface.php @@ -7,7 +7,13 @@ namespace Magento\Framework\Interception\Fixture; interface InterceptedInterface { + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function C($param1); + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function F($param1); } diff --git a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParent.php b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParent.php index 507bb5e20ba..72ec8842a52 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParent.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParent.php @@ -7,11 +7,17 @@ namespace Magento\Framework\Interception\Fixture; class InterceptedParent implements InterceptedParentInterface { + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function A($param1) { return 'A' . $param1 . 'A'; } + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function B($param1, $param2) { return $param1 . $param2 . $this->A($param1); diff --git a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParentInterface.php b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParentInterface.php index 8107018237f..263e6d7bab5 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParentInterface.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParentInterface.php @@ -7,5 +7,8 @@ namespace Magento\Framework\Interception\Fixture; interface InterceptedParentInterface { + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function A($param1); } diff --git a/dev/tests/integration/testsuite/Magento/Reports/Model/Resource/Report/Product/Viewed/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Reports/Model/Resource/Report/Product/Viewed/CollectionTest.php index cffacf9534c..50c12e37336 100644 --- a/dev/tests/integration/testsuite/Magento/Reports/Model/Resource/Report/Product/Viewed/CollectionTest.php +++ b/dev/tests/integration/testsuite/Magento/Reports/Model/Resource/Report/Product/Viewed/CollectionTest.php @@ -46,6 +46,7 @@ class CollectionTest extends \PHPUnit_Framework_TestCase * @param $dateFrom * @param $dateTo * @param $isTotal + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function testTableSelection($period, $expectedTable, $dateFrom, $dateTo, $isTotal = false) { @@ -91,6 +92,7 @@ class CollectionTest extends \PHPUnit_Framework_TestCase * Data provider for testTableSelection * * @return array + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function tableForPeriodDataProvider() { diff --git a/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RateRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RateRepositoryTest.php index 0c844893cfb..e35fbb77d47 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RateRepositoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RateRepositoryTest.php @@ -506,6 +506,7 @@ class RateRepositoryTest extends \PHPUnit_Framework_TestCase * * @magentoDbIsolation enabled * @dataProvider searchTaxRatesDataProvider + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function testGetList($filters, $filterGroup, $expectedRateCodes) { diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php index 8547aaa4909..802b42be3c8 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php @@ -42,6 +42,7 @@ class TemplateFilesTest extends \Magento\TestFramework\TestCase\AbstractIntegrit /** * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function allTemplatesDataProvider() { diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/TemplateFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/TemplateFilesTest.php index 9f6aa570bc6..d308e7128f8 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/TemplateFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/TemplateFilesTest.php @@ -61,6 +61,7 @@ class TemplateFilesTest extends \Magento\TestFramework\TestCase\AbstractIntegrit * * @param \SimpleXMLElement $layoutXml * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _getLayoutTemplates($layoutXml) { diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/cyclomatic_complexity.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/cyclomatic_complexity.php index e78ad0a73d1..2795d100cc8 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/cyclomatic_complexity.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/cyclomatic_complexity.php @@ -4,6 +4,7 @@ abstract class Foo { /** * Method that violates the allowed cyclomatic complexity + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function bar() { diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/descendant_count.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/descendant_count.php index a559b0c1f59..4c035e76005 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/descendant_count.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/descendant_count.php @@ -1,5 +1,8 @@ <?php +/** + * @SuppressWarnings(PHPMD.NumberOfChildren) + */ class Magento_Test_Php_Exemplar_CodeMessTest_phpmd_input_descendant_count { } diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/field_count.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/field_count.php index 3e07302931d..397ece72b54 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/field_count.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/field_count.php @@ -2,6 +2,7 @@ /** * Class that violates the allowed field number + * @SuppressWarnings(PHPMD.TooManyFields) */ abstract class Foo { diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/method_length.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/method_length.php index 48a58a39dbe..2f0ca8b5370 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/method_length.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/method_length.php @@ -4,6 +4,7 @@ class Magento_Test_Php_Exemplar_CodeMessTest_phpmd_input_method_length { /** * Method that violates the allowed method length + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function bar() // 001 { // 002 diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/naming.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/naming.php index d2b6e1de984..22280954a78 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/naming.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/naming.php @@ -1,5 +1,8 @@ <?php +/** + * @SuppressWarnings(PHPMD.ConstantNamingConventions) + */ class Magento_Test_Php_Exemplar_CodeMessTest_phpmd_input_naming { const nonUppercaseName = false; @@ -28,6 +31,7 @@ class Magento_Test_Php_Exemplar_CodeMessTest_phpmd_input_naming /** * Too short method name + * @SuppressWarnings(PHPMD.ShortMethodName) */ protected function _x() { @@ -36,6 +40,7 @@ class Magento_Test_Php_Exemplar_CodeMessTest_phpmd_input_naming /** * Getter that returns boolean value should be named 'is...()' or 'has...()' * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getBoolValue() { diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/parameter_list.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/parameter_list.php index 59f733a5301..30b9260dbaa 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/parameter_list.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/parameter_list.php @@ -4,6 +4,7 @@ class Magento_Test_Php_Exemplar_CodeMessTest_phpmd_input_parameter_list { /** * Method that violates the allowed parameter list length + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function bar($param1, $param2, $param3, $param4, $param5, $param6, $param7, $param8, $param9, $param10) { diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/prohibited_statement.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/prohibited_statement.php index 17639a25e72..49dc3365e49 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/prohibited_statement.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/prohibited_statement.php @@ -2,11 +2,17 @@ class Magento_Test_Php_Exemplar_CodeMessTest_phpmd_input_prohibited_statement { + /** + * @SuppressWarnings(PHPMD.ExitExpression) + */ public function terminateApplication($exitCode = 0) { exit($exitCode); } + /** + * @SuppressWarnings(PHPMD.EvalExpression) + */ public function evaluateExpression($expression) { return eval($expression); diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/prohibited_statement_goto.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/prohibited_statement_goto.php index 69cbbddcbf6..8fe82d85b96 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/prohibited_statement_goto.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/prohibited_statement_goto.php @@ -2,6 +2,9 @@ class Magento_Test_Php_Exemplar_CodeMessTest_phpmd_input_prohibited_statement_goto { + /** + * @SuppressWarnings(PHPMD.GotoStatement) + */ public function loopArrayCallback(array $array, $callback) { $index = 0; diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/public_count.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/public_count.php index 89cc599042d..cede88939f0 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/public_count.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/public_count.php @@ -7,6 +7,7 @@ * * @SuppressWarnings(PHPMD.TooManyFields) * @SuppressWarnings(PHPMD.TooManyMethods) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) */ abstract class Foo { diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/unused.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/unused.php index c1b9b30a59c..f5edffd765b 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/unused.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/unused.php @@ -1,13 +1,25 @@ <?php +/** + * @SuppressWarnings(PHPMD.UnusedPrivateField) + */ class Magento_Test_Php_Exemplar_CodeMessTest_phpmd_input_unused { private $_unusedField; + /** + * @SuppressWarnings(PHPMD.UnusedPrivateMethod) + */ private function _unusedMethod() { } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ public function bar($unusedParameter) { $unusedLocalVariable = 'unused value'; diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/classes/normal_class.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/classes/normal_class.php index 4ec266905e6..fe93af54335 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/classes/normal_class.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/classes/normal_class.php @@ -5,6 +5,7 @@ /** * Doc block for this class + * @SuppressWarnings(PHPMD.UnusedPrivateField) */ class Magento_Test_Php_Exemplar_CodeStyleTest_phpcs_input_coding_style_classes_normal_class { diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/multiline_wrong_declaration.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/multiline_wrong_declaration.php index 750b756fa07..7a09f309800 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/multiline_wrong_declaration.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/multiline_wrong_declaration.php @@ -8,6 +8,7 @@ * @param int $moreEvenLongerParamForAllThatRoutineStuff * @param float $andThereGoesOneParameter * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function thereGoesFunc($someLongParam, $anotherLongParam, $moreEvenLongerParamForAllThatRoutineStuff, $andThereGoesOneParameter @@ -27,6 +28,7 @@ function thereGoesFunc($someLongParam, $anotherLongParam, $moreEvenLongerParamFo * @param int $moreEvenLongerParamForAllThatRoutineStuff * @param float $andThereGoesOneParameter * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function thereGoesAnotherFunc($someLongParam, $anotherLongParam, $moreEvenLongerParamForAllThatRoutineStuff, $andThereGoesOneParameter @@ -46,6 +48,7 @@ function thereGoesAnotherFunc($someLongParam, $anotherLongParam, $moreEvenLonger * @param int $moreEvenLongerParamForAllThatRoutineStuff * @param float $andThereGoesOneParameter * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function thereGoesThirdFunc($someLongParam, $anotherLongParam, $moreEvenLongerParamForAllThatRoutineStuff, $andThereGoesOneParameter @@ -65,6 +68,7 @@ function thereGoesThirdFunc($someLongParam, $anotherLongParam, $moreEvenLongerPa * @param int $moreEvenLongerParamForAllThatRoutineStuff * @param float $andThereGoesOneParameter * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function thereGoesFourthFunc($someLongParam, $anotherLongParam, $moreEvenLongerParamForAllThatRoutineStuff, $andThereGoesOneParameter) @@ -84,6 +88,7 @@ function thereGoesFourthFunc($someLongParam, $anotherLongParam, $moreEvenLongerP * @param int $moreEvenLongerParamForAllThatRoutineStuff * @param float $andThereGoesOneParameter * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function thereGoesFifthFunc($someLongParam, $anotherLongParam, $moreEvenLongerParamForAllThatRoutineStuff, $andThereGoesOneParameter) diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/normal_func.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/normal_func.php index acd5360c0f1..c2567f2fbe9 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/normal_func.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/normal_func.php @@ -23,6 +23,8 @@ function someFunc($inParam) * @param int $moreEvenLongerParamForAllThatRoutineStuff * @param float $andThereGoesOneParameter * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ function anotherFunc($someLongParam, $anotherLongParam, $moreEvenLongerParamForAllThatRoutineStuff, $andThereGoesOneParameter diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/unneeded_multiline.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/unneeded_multiline.php index c32855bbeb6..e4d2fe3639e 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/unneeded_multiline.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/unneeded_multiline.php @@ -6,6 +6,7 @@ * @param string|null $a * @param bool $b * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function thereGoesFunc($a, $b diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/constant/minuscule_letter.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/constant/minuscule_letter.php index ae52ab28aed..9f2166f5946 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/constant/minuscule_letter.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/constant/minuscule_letter.php @@ -1,6 +1,9 @@ <?php define('SOME_CONSTaNT_2_ACT_4_YOU', 42); define("SOME_CONSTaNT_2_ACT_4_YOU", 2783); +/** + * @SuppressWarnings(PHPMD.ConstantNamingConventions) + */ class Magento_Test_Php_Exemplar_CodeStyleTest_phpcs_input_naming_constant_minuscule_letter { const SOME_LONG_CONSTaNT_2_ACT_4_YOU = 1; diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/method/normal_underscore_start.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/method/normal_underscore_start.php index eb8932a74cc..6fffaa5f938 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/method/normal_underscore_start.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/method/normal_underscore_start.php @@ -1,6 +1,9 @@ <?php class Magento_Test_Php_Exemplar_CodeStyleTest_phpcs_input_naming_method_normal_underscore_start { + /** + * @SuppressWarnings(PHPMD.UnusedPrivateMethod) + */ private function _testFunctionPrivate() { } diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/property/normal_underscore.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/property/normal_underscore.php index eaae0279975..c722fe07a81 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/property/normal_underscore.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/property/normal_underscore.php @@ -1,4 +1,7 @@ <?php +/** + * @SuppressWarnings(PHPMD.UnusedPrivateField) + */ class Magento_Test_Php_Exemplar_CodeStyleTest_phpcs_input_naming_property_normal_underscore { private $_private = 1; diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Session/QuoteTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Session/QuoteTest.php index 2d5ab2f3d50..4ffed31fcb8 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Session/QuoteTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Session/QuoteTest.php @@ -6,6 +6,7 @@ namespace Magento\Backend\Model\Session; /** * Class QuoteTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class QuoteTest extends \PHPUnit_Framework_TestCase { @@ -88,6 +89,7 @@ class QuoteTest extends \PHPUnit_Framework_TestCase * Set up * * @return void + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function setUp() { diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Model/OptionRepositoryTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Model/OptionRepositoryTest.php index e4f9ee3ff9a..316780a27b0 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Model/OptionRepositoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Model/OptionRepositoryTest.php @@ -338,6 +338,9 @@ class OptionRepositoryTest extends \PHPUnit_Framework_TestCase $this->assertEquals($optionId, $this->model->save($productMock, $optionMock)); } + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ public function testUpdate() { $productId = 1; diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionPriceTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionPriceTest.php index 68adb8e241a..1c77424f303 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionPriceTest.php @@ -163,6 +163,7 @@ class BundleSelectionPriceTest extends \PHPUnit_Framework_TestCase * * @param bool $useRegularPrice * @dataProvider useRegularPriceDataProvider + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function testGetValueTypeDynamic($useRegularPrice) { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/SaveTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/SaveTest.php index d8d6ab6897c..ebf610fadc3 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/SaveTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/SaveTest.php @@ -6,6 +6,7 @@ namespace Magento\Catalog\Controller\Adminhtml\Category; /** * Class SaveTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class SaveTest extends \PHPUnit_Framework_TestCase { @@ -78,6 +79,7 @@ class SaveTest extends \PHPUnit_Framework_TestCase * Set up * * @return void + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function setUp() { @@ -207,6 +209,7 @@ class SaveTest extends \PHPUnit_Framework_TestCase * @return void * * @dataProvider dataProviderExecute + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function testExecute($categoryId, $storeId, $activeTabId, $parentId) { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Product/Compare/IndexTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Product/Compare/IndexTest.php index a46b5a2806a..60cafb13995 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Product/Compare/IndexTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Product/Compare/IndexTest.php @@ -7,6 +7,10 @@ namespace Magento\Catalog\Controller\Product\Compare; use Magento\Catalog\Model\Resource\Product\Compare\Item; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class IndexTest extends \PHPUnit_Framework_TestCase { /** @var \Magento\Catalog\Controller\Product\Compare\Index */ diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/CategoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/CategoryTest.php index a918e7be095..a63f7682958 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/CategoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/CategoryTest.php @@ -5,6 +5,10 @@ namespace Magento\Catalog\Model; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class CategoryTest extends \PHPUnit_Framework_TestCase { /** @var \Magento\Catalog\Model\Category */ diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/AttributeTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/AttributeTest.php index 90662bb9fdc..7e8032da570 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/AttributeTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/AttributeTest.php @@ -8,6 +8,9 @@ namespace Magento\Catalog\Model\Layer\Filter; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; use PHPUnit_Framework_MockObject_MockObject as MockObject; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class AttributeTest extends \PHPUnit_Framework_TestCase { /** @var \Magento\Catalog\Model\Resource\Layer\Filter\Attribute|MockObject */ @@ -45,6 +48,9 @@ class AttributeTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Catalog\Model\Layer\Filter\Item\DataBuilder|MockObject */ private $itemDataBuilder; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { /** @var \Magento\Catalog\Model\Layer\Filter\ItemFactory $filterItemFactory */ diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/DataProvider/CategoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/DataProvider/CategoryTest.php index e8b5cc362ca..2f26990729d 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/DataProvider/CategoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/DataProvider/CategoryTest.php @@ -33,6 +33,9 @@ class CategoryTest extends \PHPUnit_Framework_TestCase */ private $target; + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ protected function setUp() { /** @var \Magento\Framework\Registry $var */ diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/PriceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/PriceTest.php index d9e9655100b..a3ce5758190 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/PriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/PriceTest.php @@ -10,6 +10,7 @@ use PHPUnit_Framework_MockObject_MockObject as MockObject; /** * Test for \Magento\Catalog\Model\Layer\Filter\Price + * @SuppressWarnings(PHPMD.UnusedPrivateField) */ class PriceTest extends \PHPUnit_Framework_TestCase { @@ -49,6 +50,9 @@ class PriceTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Catalog\Model\Layer\State|MockObject */ private $state; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { $this->request = $this->getMockBuilder('\Magento\Framework\App\RequestInterface') diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/LayerTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/LayerTest.php index 336e84b6d0a..c7831368d96 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/LayerTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/LayerTest.php @@ -9,6 +9,7 @@ use Magento\TestFramework\Helper\ObjectManager; /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.TooManyFields) */ class LayerTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/LinkTypeProviderTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/LinkTypeProviderTest.php index 0638418b149..53bb94fc97d 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/LinkTypeProviderTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/LinkTypeProviderTest.php @@ -62,6 +62,9 @@ class LinkTypeProviderTest extends \PHPUnit_Framework_TestCase ); } + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ public function testGetItems() { $expectedResult = []; diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Rss/CategoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Rss/CategoryTest.php index 626b9e97bba..09bbb79f81e 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Rss/CategoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Rss/CategoryTest.php @@ -86,6 +86,9 @@ class CategoryTest extends \PHPUnit_Framework_TestCase ); } + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function testGetProductCollection() { $storeId = 1; diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/ObserverTest.php index afba5189fc3..c6d302801d6 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/ObserverTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/ObserverTest.php @@ -84,6 +84,9 @@ class ObserverTest extends \PHPUnit_Framework_TestCase */ protected $eventObserver; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { $this->stockStatus = $this->getMockBuilder('Magento\CatalogInventory\Model\Stock\Status') diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Spi/StockRegistryProviderTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Spi/StockRegistryProviderTest.php index 8bd5f27b3f3..224a28084df 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Spi/StockRegistryProviderTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Spi/StockRegistryProviderTest.php @@ -101,6 +101,9 @@ class StockRegistryProviderTest extends \PHPUnit_Framework_TestCase protected $productSku = 'simple'; protected $websiteId = 111; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { $this->objectManagerHelper = new ObjectManagerHelper($this); diff --git a/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/AttributeTest.php b/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/AttributeTest.php index 85de9a5d768..f67edee41dc 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/AttributeTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/AttributeTest.php @@ -8,6 +8,9 @@ namespace Magento\CatalogSearch\Model\Layer\Filter; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; use PHPUnit_Framework_MockObject_MockObject as MockObject; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class AttributeTest extends \PHPUnit_Framework_TestCase { /** @@ -229,6 +232,9 @@ class AttributeTest extends \PHPUnit_Framework_TestCase $this->assertEquals($expectedFilterItems, $result); } + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function testGetItemsWithoutApply() { $attributeCode = 'attributeCode'; diff --git a/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/CategoryTest.php b/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/CategoryTest.php index c9e2fad0c8a..5b9dbffeeb4 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/CategoryTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/CategoryTest.php @@ -226,6 +226,9 @@ class CategoryTest extends \PHPUnit_Framework_TestCase $this->target->apply($this->request); } + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function testGetItems() { $this->category->expects($this->any()) diff --git a/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/PriceTest.php b/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/PriceTest.php index 2c343b49e26..890c078777f 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/PriceTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/PriceTest.php @@ -10,6 +10,7 @@ use PHPUnit_Framework_MockObject_MockObject as MockObject; /** * Test for \Magento\CatalogSearch\Model\Layer\Filter\Price + * @SuppressWarnings(PHPMD.UnusedPrivateField) */ class PriceTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/CatalogWidget/Block/Product/ProductsListTest.php b/dev/tests/unit/testsuite/Magento/CatalogWidget/Block/Product/ProductsListTest.php index a3e92b426f2..e398d9efc6d 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogWidget/Block/Product/ProductsListTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogWidget/Block/Product/ProductsListTest.php @@ -10,6 +10,7 @@ use Magento\Catalog\Model\Product\Visibility; /** * Class ProductsListTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class ProductsListTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Controller/Onepage/IndexTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Controller/Onepage/IndexTest.php index 662d082c6fb..ad94bd34381 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Controller/Onepage/IndexTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Controller/Onepage/IndexTest.php @@ -9,6 +9,9 @@ namespace Magento\Checkout\Controller\Onepage; use Magento\TestFramework\Helper\ObjectManager as ObjectManager; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + */ class IndexTest extends \PHPUnit_Framework_TestCase { /** diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Helper/CartTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Helper/CartTest.php index d0209b44397..dee612d5bb9 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Helper/CartTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Helper/CartTest.php @@ -200,6 +200,7 @@ class CartTest extends \PHPUnit_Framework_TestCase * @param string $expectedPostData * * @dataProvider deletePostJsonDataProvider + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function testGetDeletePostJson($id, $url, $isAjax, $expectedPostData) { diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php index 29431583620..bad1ba8493c 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php @@ -96,6 +96,9 @@ class OnepageTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Framework\Api\ExtensibleDataObjectConverter|\PHPUnit_Framework_MockObject_MockObject */ protected $extensibleDataObjectConverterMock; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { $this->addressRepositoryMock = $this->getMockForAbstractClass( @@ -378,6 +381,7 @@ class OnepageTest extends \PHPUnit_Framework_TestCase * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.ExcessiveParameterList) * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function testSaveBilling( $data, diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Validator/PluginTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Validator/PluginTest.php index f903d7c80ad..931d8a63bca 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Validator/PluginTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Validator/PluginTest.php @@ -325,6 +325,7 @@ class PluginTest extends \PHPUnit_Framework_TestCase * @param bool $isValid * @internal param array $attributes * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Catalog\Model\Product + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ private function createProduct($index, $id, $isValid = true) { diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Pricing/Price/AttributePriceTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Pricing/Price/AttributePriceTest.php index f747acbc345..3db171c993e 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Pricing/Price/AttributePriceTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Pricing/Price/AttributePriceTest.php @@ -125,6 +125,9 @@ class AttributePriceTest extends \PHPUnit_Framework_TestCase $this->assertInstanceOf('Magento\ConfigurableProduct\Pricing\Price\AttributePrice', $object); } + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function testPrepareJsonAttributes() { $options = []; diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/NameTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/NameTest.php index 0a2076884d8..5aad6669d1f 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/NameTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/NameTest.php @@ -408,6 +408,7 @@ class NameTest extends \PHPUnit_Framework_TestCase * Helper method for testing all show*() methods. * * @param array $data Customer attribute(s) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ private function _setUpShowAttribute(array $data) { diff --git a/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreatePostTest.php b/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreatePostTest.php index 58db06e1de8..6fbbddb9bc8 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreatePostTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreatePostTest.php @@ -116,6 +116,9 @@ class CreatePostTest extends \PHPUnit_Framework_TestCase */ protected $messageManagerMock; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { /** diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php index 165e730f0af..564b2ad3ac6 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php @@ -71,6 +71,7 @@ class StandardTest extends \PHPUnit_Framework_TestCase * Data provider for testMatch * * @return array + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function matchDataProvider() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Message/ManagerTest.php b/dev/tests/unit/testsuite/Magento/Framework/Message/ManagerTest.php index 32e6638df24..522426d6dfe 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Message/ManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Message/ManagerTest.php @@ -167,6 +167,9 @@ class ManagerTest extends \PHPUnit_Framework_TestCase $this->assertEquals($messageCollection, $this->model->getMessages(true)); } + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ public function testAddException() { $exceptionMessage = 'exception message'; diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php index cd98cd9ee70..13c069e8d65 100644 --- a/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php +++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php @@ -283,6 +283,9 @@ class GroupedTest extends \PHPUnit_Framework_TestCase ]; } + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ public function testGetChildrenMsrpWhenNoChildrenWithMsrp() { $key = '_cache_instance_associated_products'; diff --git a/dev/tests/unit/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php b/dev/tests/unit/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php index 9237b9f7ff8..d59754f3e00 100644 --- a/dev/tests/unit/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php +++ b/dev/tests/unit/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php @@ -6,6 +6,7 @@ namespace Magento\Persistent\Block\Header; /** * Class AdditionalTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AdditionalTest extends \PHPUnit_Framework_TestCase { @@ -85,6 +86,7 @@ class AdditionalTest extends \PHPUnit_Framework_TestCase * Set up * * @return void + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function setUp() { diff --git a/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/Product/AbstractProductTest.php b/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/Product/AbstractProductTest.php index 93ad5f6f97d..e5eaaccb1eb 100644 --- a/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/Product/AbstractProductTest.php +++ b/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/Product/AbstractProductTest.php @@ -283,6 +283,7 @@ class AbstractProductTest extends \PHPUnit_Framework_TestCase * @param array $expectedValueSelectOptions * @param array $expectedValueOption * @dataProvider prepareValueOptionsDataProvider + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function testPrepareValueOptions( $setData, @@ -363,6 +364,7 @@ class AbstractProductTest extends \PHPUnit_Framework_TestCase /** * @return array + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function prepareValueOptionsDataProvider() { diff --git a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/NewActionTest.php b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/NewActionTest.php index 027be986e7d..bd908cd6551 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/NewActionTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/NewActionTest.php @@ -6,6 +6,7 @@ namespace Magento\Sales\Controller\Adminhtml\Order\Creditmemo; /** * Class NewActionTest + * @SuppressWarnings(PHPMD.TooManyFields) */ class NewActionTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/PrintActionTest.php b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/PrintActionTest.php index 055e1503853..949b5e8362a 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/PrintActionTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/PrintActionTest.php @@ -6,6 +6,7 @@ namespace Magento\Sales\Controller\Adminhtml\Order\Creditmemo; /** * Class PrintActionTest + * @SuppressWarnings(PHPMD.TooManyFields) */ class PrintActionTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/ViewTest.php b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/ViewTest.php index f9902ddcc30..ab1bfeda56e 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/ViewTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/ViewTest.php @@ -6,6 +6,7 @@ namespace Magento\Sales\Controller\Adminhtml\Order\Creditmemo; /** * Class ViewTest + * @SuppressWarnings(PHPMD.TooManyFields) */ class ViewTest extends \PHPUnit_Framework_TestCase { @@ -89,6 +90,9 @@ class ViewTest extends \PHPUnit_Framework_TestCase */ protected $pageTitleMock; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function setUp() { $this->invoiceMock = $this->getMockBuilder('Magento\Sales\Model\Order\Invoice') diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php index 80a1d4554f5..7a6214ef4f6 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php @@ -76,6 +76,9 @@ class CreateTest extends \PHPUnit_Framework_TestCase */ protected $objectFactory; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { $objectManagerMock = $this->getMock('Magento\Framework\ObjectManagerInterface'); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php index 82b30090c84..c098b04913b 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php @@ -74,6 +74,9 @@ class CollectTotalsTest extends \PHPUnit_Framework_TestCase */ protected $groupInterfaceMock; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); @@ -190,6 +193,9 @@ class CollectTotalsTest extends \PHPUnit_Framework_TestCase $this->model->dispatch($this->observerMock); } + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ public function testDispatchWithCustomerCountryNotInEUAndNotLoggedCustomerInGroup() { $this->groupManagementMock->expects($this->once()) diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/QuoteTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/QuoteTest.php index f99a191a3f1..f8597c45e51 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/QuoteTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/QuoteTest.php @@ -12,6 +12,7 @@ use Magento\TestFramework\Helper\ObjectManager; * Test class for \Magento\Sales\Model\Order * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.TooManyFields) */ class QuoteTest extends \PHPUnit_Framework_TestCase { @@ -522,6 +523,9 @@ class QuoteTest extends \PHPUnit_Framework_TestCase $this->assertInstanceOf('Magento\Sales\Model\Quote', $result); } + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ public function testSetCustomerAddressData() { $customerId = 1; diff --git a/dev/tests/unit/testsuite/Magento/SalesRule/Model/UtilityTest.php b/dev/tests/unit/testsuite/Magento/SalesRule/Model/UtilityTest.php index 3f6532d3c1f..245e5741958 100644 --- a/dev/tests/unit/testsuite/Magento/SalesRule/Model/UtilityTest.php +++ b/dev/tests/unit/testsuite/Magento/SalesRule/Model/UtilityTest.php @@ -7,6 +7,7 @@ namespace Magento\SalesRule\Model; /** * Class UtilityTest * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class UtilityTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/AddTrackTest.php b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/AddTrackTest.php index b1fcb404f20..bd6a7501e36 100644 --- a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/AddTrackTest.php +++ b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/AddTrackTest.php @@ -155,6 +155,9 @@ class AddTrackTest extends \PHPUnit_Framework_TestCase ); } + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function testExecute() { $carrier = 'carrier'; diff --git a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/NewActionTest.php b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/NewActionTest.php index 66cd7cc9e8e..f4c16404cee 100644 --- a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/NewActionTest.php +++ b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/NewActionTest.php @@ -85,6 +85,9 @@ class NewActionTest extends \PHPUnit_Framework_TestCase */ protected $pageTitleMock; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function setUp() { $objectManagerHelper = new ObjectManagerHelper($this); diff --git a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/ViewTest.php b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/ViewTest.php index 8b07f79e1d0..312c409563c 100644 --- a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/ViewTest.php +++ b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/ViewTest.php @@ -6,6 +6,7 @@ namespace Magento\Shipping\Controller\Adminhtml\Order\Shipment; /** * Class ViewTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class ViewTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Tax/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Tax/Helper/DataTest.php index 01af7e21592..c6cd649c02d 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Helper/DataTest.php @@ -121,6 +121,7 @@ class DataTest extends \PHPUnit_Framework_TestCase * * @param $inputArray * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Tax\Api\Data\OrderTaxDetailsInterface + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function mapOrderTaxItemDetail($inputArray) { diff --git a/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php b/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php index cc67af4a7cf..f684763168f 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php @@ -26,6 +26,7 @@ class TaxTest extends \PHPUnit_Framework_TestCase * * @dataProvider dataProviderCollectArray * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function testCollect($itemData, $appliedRatesData, $taxDetailsData, $quoteDetailsData, $addressData, $verifyData diff --git a/dev/tests/unit/testsuite/Magento/Ui/Component/FilterPoolTest.php b/dev/tests/unit/testsuite/Magento/Ui/Component/FilterPoolTest.php index 59847118f0c..108f5d5d367 100644 --- a/dev/tests/unit/testsuite/Magento/Ui/Component/FilterPoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Ui/Component/FilterPoolTest.php @@ -147,6 +147,7 @@ class FilterPoolTest extends \PHPUnit_Framework_TestCase * Run test prepare method * * @return void + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function testPrepare() { diff --git a/dev/tests/unit/testsuite/Magento/Ui/Component/ListingTest.php b/dev/tests/unit/testsuite/Magento/Ui/Component/ListingTest.php index 4960983682b..a96403ced73 100644 --- a/dev/tests/unit/testsuite/Magento/Ui/Component/ListingTest.php +++ b/dev/tests/unit/testsuite/Magento/Ui/Component/ListingTest.php @@ -11,6 +11,9 @@ use Magento\Ui\Component\Listing\OptionsFactory; use Magento\Ui\Component\Listing\RowPool; use Magento\Ui\Context\ConfigurationFactory; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class ListingTest extends \PHPUnit_Framework_TestCase { /** diff --git a/dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/CartTest.php b/dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/CartTest.php index 9fdcf260c80..7f1e5b216a4 100644 --- a/dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/CartTest.php +++ b/dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/CartTest.php @@ -5,6 +5,10 @@ namespace Magento\Wishlist\Controller\Index; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class CartTest extends \PHPUnit_Framework_TestCase { /** @@ -87,6 +91,9 @@ class CartTest extends \PHPUnit_Framework_TestCase */ protected $urlMock; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { $this->wishlistProviderMock = $this->getMockBuilder('Magento\Wishlist\Controller\WishlistProviderInterface') @@ -262,6 +269,9 @@ class CartTest extends \PHPUnit_Framework_TestCase $this->assertEquals($this->responseMock, $this->model->execute()); } + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function testExecuteWithQuantityArray() { $itemId = 2; @@ -472,6 +482,9 @@ class CartTest extends \PHPUnit_Framework_TestCase $this->assertEquals($this->responseMock, $this->model->execute()); } + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function testExecuteWithoutQuantityArrayAndOutOfStock() { $itemId = 2; @@ -632,6 +645,9 @@ class CartTest extends \PHPUnit_Framework_TestCase $this->assertEquals($this->responseMock, $this->model->execute()); } + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function testExecuteWithoutQuantityArrayAndConfigurable() { $itemId = 2; -- GitLab From 4fc86c07f765923d84c0e935adab75cbceae5fed Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Tue, 6 Jan 2015 02:21:58 -0800 Subject: [PATCH 012/114] MAGETWO-31578: Implement tool for adding annotations to existing code - code in lib/internal is covered with @SuppressWarnings annotations --- .../Magento/Framework/App/Action/Action.php | 1 + .../Magento/Framework/Archive/Helper/File.php | 1 + .../Magento/Framework/Archive/Tar.php | 4 ++++ .../Framework/Backup/AbstractBackup.php | 1 + .../Framework/Backup/Filesystem/Helper.php | 3 +++ .../Backup/Filesystem/Rollback/Ftp.php | 1 + .../Framework/Cache/Backend/Database.php | 1 + .../Framework/Cache/Backend/Eaccelerator.php | 7 ++++++ .../Framework/Code/Reader/ArgumentsReader.php | 2 ++ .../Code/Validator/ArgumentSequence.php | 3 +++ .../Code/Validator/ConstructorIntegrity.php | 2 ++ .../Framework/Config/Composer/Package.php | 1 + .../Magento/Framework/Config/Data.php | 3 +++ lib/internal/Magento/Framework/Config/Dom.php | 1 + .../Framework/DB/Adapter/Pdo/Mysql.php | 22 +++++++++++++++++++ .../Magento/Framework/DB/Ddl/Table.php | 5 +++++ lib/internal/Magento/Framework/DB/Helper.php | 2 ++ lib/internal/Magento/Framework/DB/Select.php | 2 ++ .../Framework/DB/Statement/Parameter.php | 1 + .../Framework/DB/Statement/Pdo/Mysql.php | 1 + lib/internal/Magento/Framework/DB/Tree.php | 13 +++++++++++ .../Magento/Framework/DB/Tree/Node.php | 3 +++ .../Magento/Framework/Data/Collection.php | 3 +++ .../Magento/Framework/Data/Collection/Db.php | 1 + .../Framework/Data/Collection/Filesystem.php | 9 ++++++++ .../Data/Form/Element/AbstractElement.php | 2 ++ .../Framework/Data/Form/Element/Checkbox.php | 2 ++ .../Framework/Data/Form/Element/Editor.php | 4 ++++ .../Framework/Data/Form/Element/Gallery.php | 2 ++ .../Framework/Data/Form/Element/Multiline.php | 1 + .../Framework/Data/Form/Element/Time.php | 2 ++ lib/internal/Magento/Framework/Data/Tree.php | 8 +++++++ .../Magento/Framework/Data/Tree/Node.php | 1 + lib/internal/Magento/Framework/Debug.php | 3 +++ .../Magento/Framework/Event/Observer/Cron.php | 2 ++ lib/internal/Magento/Framework/File/Csv.php | 1 + .../Magento/Framework/File/Uploader.php | 3 +++ .../Framework/Filesystem/Driver/Http.php | 1 + .../Magento/Framework/Filter/Input.php | 1 + .../Framework/Filter/RemoveAccents.php | 1 + .../Magento/Framework/Filter/Template.php | 2 ++ .../Filter/Template/Tokenizer/Parameter.php | 1 + .../Filter/Template/Tokenizer/Variable.php | 2 ++ .../Framework/Gdata/Gshopping/Entry.php | 2 ++ .../Magento/Framework/HTTP/Adapter/Curl.php | 3 +++ .../Magento/Framework/HTTP/Client/Curl.php | 3 +++ .../Magento/Framework/HTTP/Client/Socket.php | 7 ++++++ .../Image/Adapter/AbstractAdapter.php | 2 ++ .../Magento/Framework/Image/Adapter/Gd2.php | 5 +++++ .../Framework/Image/Adapter/ImageMagick.php | 2 ++ .../Interception/Code/InterfaceValidator.php | 2 ++ .../Interception/PluginList/PluginList.php | 2 ++ .../Magento/Framework/Io/AbstractIo.php | 1 + lib/internal/Magento/Framework/Io/File.php | 12 ++++++++++ lib/internal/Magento/Framework/Io/Ftp.php | 6 +++++ .../Magento/Framework/Io/IoInterface.php | 4 ++++ lib/internal/Magento/Framework/Io/Sftp.php | 5 +++++ .../Magento/Framework/Locale/Lists.php | 1 + .../Framework/Message/AbstractMessage.php | 1 + .../Magento/Framework/Message/Manager.php | 1 + .../Framework/Message/MessageInterface.php | 1 + .../Model/AbstractExtensibleModel.php | 1 + .../Magento/Framework/Model/AbstractModel.php | 1 + .../Magento/Framework/Model/Exception.php | 1 + .../Model/Resource/Db/AbstractDb.php | 11 ++++++++++ .../Db/Collection/AbstractCollection.php | 3 +++ .../Magento/Framework/Module/DataSetup.php | 3 +++ .../Framework/Module/ModuleList/Loader.php | 1 + lib/internal/Magento/Framework/Mview/View.php | 3 +++ lib/internal/Magento/Framework/Object.php | 1 + .../Magento/Framework/Object/Cache.php | 5 +++++ lib/internal/Magento/Framework/Parse/Zip.php | 3 +++ .../Adapter/Mysql/Aggregation/Interval.php | 3 +++ .../Framework/Search/Dynamic/Algorithm.php | 9 ++++++++ .../Framework/Search/Request/Binder.php | 1 + .../Framework/Search/Request/Cleaner.php | 3 +++ .../Magento/Framework/Session/Config.php | 4 ++++ .../Session/Config/ConfigInterface.php | 3 +++ .../Magento/Framework/Session/SaveHandler.php | 1 + .../Framework/Session/SaveHandler/DbTable.php | 2 ++ .../Framework/Session/SessionManager.php | 1 + .../Magento/Framework/Session/SidResolver.php | 2 ++ .../Session/SidResolverInterface.php | 2 ++ .../Magento/Framework/Simplexml/Config.php | 1 + .../Magento/Framework/Simplexml/Element.php | 7 ++++++ .../Magento/Framework/Stdlib/ArrayUtils.php | 2 ++ .../Magento/Framework/Stdlib/String.php | 2 ++ .../Magento/Framework/System/Dirs.php | 4 ++++ lib/internal/Magento/Framework/System/Ftp.php | 2 ++ .../Translate/Locale/Resolver/Plugin.php | 2 ++ lib/internal/Magento/Framework/Url.php | 7 ++++++ .../Magento/Framework/UrlInterface.php | 1 + .../Framework/View/Element/AbstractBlock.php | 1 + .../Magento/Framework/Xml/Generator.php | 1 + lib/internal/Magento/Framework/Xml/Parser.php | 2 ++ 95 files changed, 288 insertions(+) diff --git a/lib/internal/Magento/Framework/App/Action/Action.php b/lib/internal/Magento/Framework/App/Action/Action.php index 8dbf0d96ebc..8e400be1281 100644 --- a/lib/internal/Magento/Framework/App/Action/Action.php +++ b/lib/internal/Magento/Framework/App/Action/Action.php @@ -11,6 +11,7 @@ use Magento\Framework\App\ResponseInterface; * Default implementation of application action controller * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Action extends AbstractAction { diff --git a/lib/internal/Magento/Framework/Archive/Helper/File.php b/lib/internal/Magento/Framework/Archive/Helper/File.php index 9e8f31b9247..22c4ed76ea6 100644 --- a/lib/internal/Magento/Framework/Archive/Helper/File.php +++ b/lib/internal/Magento/Framework/Archive/Helper/File.php @@ -85,6 +85,7 @@ class File * @param int $chmod * @return void * @throws MagentoException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function open($mode = 'w+', $chmod = 0666) { diff --git a/lib/internal/Magento/Framework/Archive/Tar.php b/lib/internal/Magento/Framework/Archive/Tar.php index 05bbe624590..8aff2c0b805 100644 --- a/lib/internal/Magento/Framework/Archive/Tar.php +++ b/lib/internal/Magento/Framework/Archive/Tar.php @@ -310,6 +310,8 @@ class Tar extends \Magento\Framework\Archive\AbstractArchive implements \Magento * * @param bool $long * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _composeHeader($long = false) { @@ -379,6 +381,7 @@ class Tar extends \Magento\Framework\Archive\AbstractArchive implements \Magento * @param string $destination path to file is unpacked * @return string[] list of files * @throws \Magento\Framework\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _unpackCurrentTar($destination) { @@ -514,6 +517,7 @@ class Tar extends \Magento\Framework\Archive\AbstractArchive implements \Magento * @param string $destination * @param bool $skipRoot * @return string + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function pack($source, $destination, $skipRoot = false) { diff --git a/lib/internal/Magento/Framework/Backup/AbstractBackup.php b/lib/internal/Magento/Framework/Backup/AbstractBackup.php index 1709be0ff2c..d0f4a7812bf 100644 --- a/lib/internal/Magento/Framework/Backup/AbstractBackup.php +++ b/lib/internal/Magento/Framework/Backup/AbstractBackup.php @@ -215,6 +215,7 @@ abstract class AbstractBackup implements BackupInterface * Check whether last operation completed successfully * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsSuccess() { diff --git a/lib/internal/Magento/Framework/Backup/Filesystem/Helper.php b/lib/internal/Magento/Framework/Backup/Filesystem/Helper.php index e944a5a5c1c..ca0a97b52fe 100644 --- a/lib/internal/Magento/Framework/Backup/Filesystem/Helper.php +++ b/lib/internal/Magento/Framework/Backup/Filesystem/Helper.php @@ -51,6 +51,7 @@ class Helper * @param bool $removeRoot * @return void * @throws \Magento\Framework\Exception + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function rm($path, $skipPaths = [], $removeRoot = false) { @@ -77,6 +78,8 @@ class Helper * @param int $infoOptions * @param array $skipFiles * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getInfo($path, $infoOptions = self::INFO_ALL, $skipFiles = []) { diff --git a/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Ftp.php b/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Ftp.php index e8f1d78766d..fef8bbba850 100644 --- a/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Ftp.php +++ b/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Ftp.php @@ -157,6 +157,7 @@ class Ftp extends AbstractRollback * @param string $tmpDir * @return void * @throws \Magento\Framework\Exception + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _uploadBackupToFtp($tmpDir) { diff --git a/lib/internal/Magento/Framework/Cache/Backend/Database.php b/lib/internal/Magento/Framework/Cache/Backend/Database.php index 8b146188d7a..ee8e1a89f33 100644 --- a/lib/internal/Magento/Framework/Cache/Backend/Database.php +++ b/lib/internal/Magento/Framework/Cache/Backend/Database.php @@ -498,6 +498,7 @@ class Database extends \Zend_Cache_Backend implements \Zend_Cache_Backend_Extend * @param string $mode * @param string[] $tags * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _cleanByTags($mode, $tags) { diff --git a/lib/internal/Magento/Framework/Cache/Backend/Eaccelerator.php b/lib/internal/Magento/Framework/Cache/Backend/Eaccelerator.php index 3beab74b9d1..739b2a832ad 100644 --- a/lib/internal/Magento/Framework/Cache/Backend/Eaccelerator.php +++ b/lib/internal/Magento/Framework/Cache/Backend/Eaccelerator.php @@ -35,6 +35,7 @@ class Eaccelerator extends \Zend_Cache_Backend implements \Zend_Cache_Backend_Ex * @param string $id cache id * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested * @return string cached datas (or false) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function load($id, $doNotTestCacheValidity = false) { @@ -107,6 +108,7 @@ class Eaccelerator extends \Zend_Cache_Backend implements \Zend_Cache_Backend_Ex * @param string[] $tags array of tags * @throws \Zend_Cache_Exception * @return bool|void true if no problem + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function clean($mode = \Zend_Cache::CLEANING_MODE_ALL, $tags = []) { @@ -169,6 +171,7 @@ class Eaccelerator extends \Zend_Cache_Backend implements \Zend_Cache_Backend_Ex * * @param array $tags array of tags * @return string[] array of matching cache ids (string) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getIdsMatchingTags($tags = []) { @@ -183,6 +186,7 @@ class Eaccelerator extends \Zend_Cache_Backend implements \Zend_Cache_Backend_Ex * * @param string[] $tags array of tags * @return string[] array of not matching cache ids (string) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getIdsNotMatchingTags($tags = []) { @@ -197,6 +201,7 @@ class Eaccelerator extends \Zend_Cache_Backend implements \Zend_Cache_Backend_Ex * * @param string[] $tags array of tags * @return string[] array of any matching cache ids (string) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getIdsMatchingAnyTags($tags = []) { @@ -208,6 +213,7 @@ class Eaccelerator extends \Zend_Cache_Backend implements \Zend_Cache_Backend_Ex * Return an array of stored cache ids * * @return string[] array of stored cache ids (string) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getIds() { @@ -229,6 +235,7 @@ class Eaccelerator extends \Zend_Cache_Backend implements \Zend_Cache_Backend_Ex * * @param string $id cache id * @return array|false array of metadatas (false if the cache id is not found) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getMetadatas($id) { diff --git a/lib/internal/Magento/Framework/Code/Reader/ArgumentsReader.php b/lib/internal/Magento/Framework/Code/Reader/ArgumentsReader.php index 28309b5a591..9c57f0b7a73 100644 --- a/lib/internal/Magento/Framework/Code/Reader/ArgumentsReader.php +++ b/lib/internal/Magento/Framework/Code/Reader/ArgumentsReader.php @@ -15,6 +15,8 @@ class ArgumentsReader * @param bool $groupByPosition * @param bool $inherited * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getConstructorArguments(\ReflectionClass $class, $groupByPosition = false, $inherited = false) { diff --git a/lib/internal/Magento/Framework/Code/Validator/ArgumentSequence.php b/lib/internal/Magento/Framework/Code/Validator/ArgumentSequence.php index 2aefdb95835..d4295417196 100644 --- a/lib/internal/Magento/Framework/Code/Validator/ArgumentSequence.php +++ b/lib/internal/Magento/Framework/Code/Validator/ArgumentSequence.php @@ -39,6 +39,7 @@ class ArgumentSequence implements ValidatorInterface * @param string $className * @return bool * @throws ValidationException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function validate($className) { @@ -134,6 +135,8 @@ class ArgumentSequence implements ValidatorInterface * @param array $classArguments * @param array $parentArguments * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _buildsSequence(array $classArguments, array $parentArguments = []) { diff --git a/lib/internal/Magento/Framework/Code/Validator/ConstructorIntegrity.php b/lib/internal/Magento/Framework/Code/Validator/ConstructorIntegrity.php index 295cad1650c..e273f71abf5 100644 --- a/lib/internal/Magento/Framework/Code/Validator/ConstructorIntegrity.php +++ b/lib/internal/Magento/Framework/Code/Validator/ConstructorIntegrity.php @@ -29,6 +29,8 @@ class ConstructorIntegrity implements ValidatorInterface * @param string $className * @return bool * @throws \Magento\Framework\Code\ValidationException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validate($className) { diff --git a/lib/internal/Magento/Framework/Config/Composer/Package.php b/lib/internal/Magento/Framework/Config/Composer/Package.php index fe3079f9159..645e42a1f34 100644 --- a/lib/internal/Magento/Framework/Config/Composer/Package.php +++ b/lib/internal/Magento/Framework/Config/Composer/Package.php @@ -58,6 +58,7 @@ class Package * @param string $propertyPath * @param string $filter pattern to filter out the properties * @return mixed + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function get($propertyPath, $filter = null) { diff --git a/lib/internal/Magento/Framework/Config/Data.php b/lib/internal/Magento/Framework/Config/Data.php index 64e98788231..842e28835ba 100644 --- a/lib/internal/Magento/Framework/Config/Data.php +++ b/lib/internal/Magento/Framework/Config/Data.php @@ -6,6 +6,9 @@ */ namespace Magento\Framework\Config; +/** + * @SuppressWarnings(PHPMD.NumberOfChildren) + */ class Data implements \Magento\Framework\Config\DataInterface { /** diff --git a/lib/internal/Magento/Framework/Config/Dom.php b/lib/internal/Magento/Framework/Config/Dom.php index 7ea9e21ffe5..a18c7a734a2 100644 --- a/lib/internal/Magento/Framework/Config/Dom.php +++ b/lib/internal/Magento/Framework/Config/Dom.php @@ -113,6 +113,7 @@ class Dom * @param \DOMElement $node * @param string $parentPath path to parent node * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _mergeNode(\DOMElement $node, $parentPath) { diff --git a/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php b/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php index b63ca6b8f22..919699158c5 100644 --- a/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php +++ b/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php @@ -17,6 +17,12 @@ use Magento\Framework\DB\Statement\Parameter; use Magento\Framework\Stdlib\DateTime; use Magento\Framework\Stdlib\String; +/** + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface { const TIMESTAMP_FORMAT = 'Y-m-d H:i:s'; @@ -399,6 +405,7 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface * @param mixed $bind An array of data or data itself to bind to the placeholders. * @return \Zend_Db_Statement_Pdo|void * @throws \Zend_Db_Adapter_Exception To re-throw \PDOException. + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function query($sql, $bind = []) { @@ -650,6 +657,8 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface * * @param string $sql * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _splitMultiQuery($sql) { @@ -1129,6 +1138,9 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface * * @param array $tables * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function modifyTables($tables) { @@ -1515,6 +1527,8 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface * * @param array $columnData * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getColumnCreateByDescribe($columnData) { @@ -1656,6 +1670,7 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface * * @param array $column * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _getColumnTypeByDdl($column) { @@ -1752,6 +1767,8 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface * @param array $fields update fields pairs or values * @return int The number of affected rows. * @throws \Zend_Db_Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function insertOnDuplicate($table, array $data, array $fields = []) { @@ -1958,6 +1975,7 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface * @param \Magento\Framework\DB\Ddl\Table $table * @throws \Zend_Db_Exception * @return \Zend_Db_Pdo_Statement + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function createTemporaryTable(\Magento\Framework\DB\Ddl\Table $table) { @@ -2192,6 +2210,10 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface * @throws \Magento\Framework\Exception * @return string * @throws \Zend_Db_Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ protected function _getColumnDefinition($options, $ddlType = null) { diff --git a/lib/internal/Magento/Framework/DB/Ddl/Table.php b/lib/internal/Magento/Framework/DB/Ddl/Table.php index f6ac1784fa5..55b6f140a29 100644 --- a/lib/internal/Magento/Framework/DB/Ddl/Table.php +++ b/lib/internal/Magento/Framework/DB/Ddl/Table.php @@ -269,6 +269,9 @@ class Table * @param string $comment column description * @return $this * @throws \Zend_Db_Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function addColumn($name, $type, $size = null, $options = [], $comment = null) { @@ -404,6 +407,7 @@ class Table * @param string $onUpdate the action on update * @return $this * @throws \Zend_Db_Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function addForeignKey($fkName, $column, $refTable, $refColumn, $onDelete = null, $onUpdate = null) { @@ -454,6 +458,7 @@ class Table * @param array $options array of additional options * @return $this * @throws \Zend_Db_Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function addIndex($indexName, $fields, $options = []) { diff --git a/lib/internal/Magento/Framework/DB/Helper.php b/lib/internal/Magento/Framework/DB/Helper.php index 2b9bf573348..f0333c59a68 100644 --- a/lib/internal/Magento/Framework/DB/Helper.php +++ b/lib/internal/Magento/Framework/DB/Helper.php @@ -181,6 +181,8 @@ class Helper extends \Magento\Framework\DB\Helper\AbstractHelper * @param string|null $groupByCondition OPTIONAL * @return mixed|array * @throws \Zend_Db_Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function prepareColumnsList(\Magento\Framework\DB\Select $select, $groupByCondition = null) { diff --git a/lib/internal/Magento/Framework/DB/Select.php b/lib/internal/Magento/Framework/DB/Select.php index d94be372abb..7b30718e195 100644 --- a/lib/internal/Magento/Framework/DB/Select.php +++ b/lib/internal/Magento/Framework/DB/Select.php @@ -183,6 +183,8 @@ class Select extends \Zend_Db_Select * Reset unused LEFT JOIN(s) * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function resetJoinLeft() { diff --git a/lib/internal/Magento/Framework/DB/Statement/Parameter.php b/lib/internal/Magento/Framework/DB/Statement/Parameter.php index df9ef052225..7ca82cfd2b1 100644 --- a/lib/internal/Magento/Framework/DB/Statement/Parameter.php +++ b/lib/internal/Magento/Framework/DB/Statement/Parameter.php @@ -114,6 +114,7 @@ class Parameter * @return bool * * @see setIsBlob + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsBlob() { diff --git a/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php b/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php index 187a54490a9..1b12e7aab20 100644 --- a/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php +++ b/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php @@ -21,6 +21,7 @@ class Mysql extends \Zend_Db_Statement_Pdo * @param array $params Array of values to bind to parameter placeholders. * @return bool * @throws \Zend_Db_Statement_Exception + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function _executeWithBinding(array $params) { diff --git a/lib/internal/Magento/Framework/DB/Tree.php b/lib/internal/Magento/Framework/DB/Tree.php index a6c344ff265..c87b9bf2a29 100644 --- a/lib/internal/Magento/Framework/DB/Tree.php +++ b/lib/internal/Magento/Framework/DB/Tree.php @@ -76,6 +76,8 @@ class Tree /** * @param array $config * @throws TreeException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function __construct($config = []) { @@ -273,6 +275,7 @@ class Tree * @param string|int $nodeId * @param array $data * @return false|string + * @SuppressWarnings(PHPMD.ExitExpression) */ public function appendChild($nodeId, $data) { @@ -440,6 +443,10 @@ class Tree * @param string|int $pId * @param string|int $aId * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.ExitExpression) */ public function moveNode($eId, $pId, $aId = 0) { @@ -770,6 +777,11 @@ class Tree * @param string|int $pId * @param string|int $aId * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + * @SuppressWarnings(PHPMD.ExitExpression) */ public function moveNodes($eId, $pId, $aId = 0) { @@ -990,6 +1002,7 @@ class Tree * @param int $startLevel * @param int $endLevel * @return NodeSet + * @SuppressWarnings(PHPMD.ExitExpression) */ public function getChildren($nodeId, $startLevel = 0, $endLevel = 0) { diff --git a/lib/internal/Magento/Framework/DB/Tree/Node.php b/lib/internal/Magento/Framework/DB/Tree/Node.php index 7644fb58c11..b4252b7c045 100644 --- a/lib/internal/Magento/Framework/DB/Tree/Node.php +++ b/lib/internal/Magento/Framework/DB/Tree/Node.php @@ -6,6 +6,9 @@ namespace Magento\Framework\DB\Tree; use Magento\Framework\DB\Tree\Node\NodeException; +/** + * @SuppressWarnings(PHPMD.UnusedPrivateField) + */ class Node { /** diff --git a/lib/internal/Magento/Framework/Data/Collection.php b/lib/internal/Magento/Framework/Data/Collection.php index e115f4d4383..a11b01e7fff 100644 --- a/lib/internal/Magento/Framework/Data/Collection.php +++ b/lib/internal/Magento/Framework/Data/Collection.php @@ -166,6 +166,7 @@ class Collection implements \IteratorAggregate, \Countable, ArrayInterface, Coll * @param string|int|array $condition * @throws \Magento\Framework\Exception if some error in the input could be detected. * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function addFieldToFilter($field, $condition) { @@ -645,6 +646,7 @@ class Collection implements \IteratorAggregate, \Countable, ArrayInterface, Coll * * @param bool $flag * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function distinct($flag) { @@ -657,6 +659,7 @@ class Collection implements \IteratorAggregate, \Countable, ArrayInterface, Coll * @param bool $printQuery * @param bool $logQuery * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function loadData($printQuery = false, $logQuery = false) { diff --git a/lib/internal/Magento/Framework/Data/Collection/Db.php b/lib/internal/Magento/Framework/Data/Collection/Db.php index a3d0b641186..d16b83b2be0 100644 --- a/lib/internal/Magento/Framework/Data/Collection/Db.php +++ b/lib/internal/Magento/Framework/Data/Collection/Db.php @@ -11,6 +11,7 @@ use Psr\Log\LoggerInterface as Logger; /** * Base items collection class + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Db extends \Magento\Framework\Data\Collection { diff --git a/lib/internal/Magento/Framework/Data/Collection/Filesystem.php b/lib/internal/Magento/Framework/Data/Collection/Filesystem.php index e3ed90d6f7a..977f0157979 100644 --- a/lib/internal/Magento/Framework/Data/Collection/Filesystem.php +++ b/lib/internal/Magento/Framework/Data/Collection/Filesystem.php @@ -230,6 +230,8 @@ class Filesystem extends \Magento\Framework\Data\Collection * * @param string|array $dir * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _collectRecursive($dir) { @@ -432,6 +434,8 @@ class Filesystem extends \Magento\Framework\Data\Collection * * @param array $row * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.EvalExpression) */ protected function _filterRow($row) { @@ -473,6 +477,7 @@ class Filesystem extends \Magento\Framework\Data\Collection * @param callback $callback * @param array $callbackParams * @return bool + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _invokeFilter($callback, $callbackParams) { @@ -491,6 +496,9 @@ class Filesystem extends \Magento\Framework\Data\Collection * @param string $type 'and' | 'or' * @see Db::addFieldToFilter() * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function addFieldToFilter($field, $cond, $type = 'and') { @@ -730,6 +738,7 @@ class Filesystem extends \Magento\Framework\Data\Collection * @return bool * @see addFieldToFilter() * @see addCallbackFilter() + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function filterCallbackIsNull($field, $filterValue, $row) { diff --git a/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php b/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php index 5a55c5df17f..4e1b736056e 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php @@ -13,6 +13,7 @@ use Magento\Framework\Escaper; * Data form abstract class * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractElement extends AbstractForm { @@ -529,6 +530,7 @@ abstract class AbstractElement extends AbstractForm * @param string|int|array $values * @param bool $overwrite * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function addElementValues($values, $overwrite = false) { diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Checkbox.php b/lib/internal/Magento/Framework/Data/Form/Element/Checkbox.php index a0b553269c9..7d1f0fb0e9b 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Checkbox.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Checkbox.php @@ -51,6 +51,7 @@ class Checkbox extends AbstractElement /** * @return string + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getElementHtml() { @@ -78,6 +79,7 @@ class Checkbox extends AbstractElement * Return check status of checkbox * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsChecked() { diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Editor.php b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php index 6c14e5e5a2b..d8417a67d69 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Editor.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php @@ -38,6 +38,7 @@ class Editor extends Textarea /** * @return string + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getElementHtml() { @@ -217,6 +218,8 @@ class Editor extends Textarea * * @param bool $visible Display button or not * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getPluginButtonsHtml($visible = true) { @@ -331,6 +334,7 @@ class Editor extends Textarea * * @param array $data Button params * @return string + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getButtonHtml($data) { diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php b/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php index f37dde95ea3..8a0c8a4a6ae 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php @@ -32,6 +32,8 @@ class Gallery extends AbstractElement /** * @return string + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getElementHtml() { diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Multiline.php b/lib/internal/Magento/Framework/Data/Form/Element/Multiline.php index ce904bc722d..d505ead9bee 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Multiline.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Multiline.php @@ -100,6 +100,7 @@ class Multiline extends AbstractElement /** * @return mixed + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getDefaultHtml() { diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Time.php b/lib/internal/Magento/Framework/Data/Form/Element/Time.php index 5773541b4c9..98ce8886b35 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Time.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Time.php @@ -44,6 +44,8 @@ class Time extends AbstractElement /** * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getElementHtml() { diff --git a/lib/internal/Magento/Framework/Data/Tree.php b/lib/internal/Magento/Framework/Data/Tree.php index 660df333b21..0bfad5302f7 100644 --- a/lib/internal/Magento/Framework/Data/Tree.php +++ b/lib/internal/Magento/Framework/Data/Tree.php @@ -45,6 +45,7 @@ class Tree * * @param Node $parentNode * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function load($parentNode = null) { @@ -55,6 +56,7 @@ class Tree * * @param int|string $nodeId * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function loadNode($nodeId) { @@ -67,6 +69,7 @@ class Tree * @param Node $parentNode * @param Node $prevNode * @return Node + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function appendChild($data, $parentNode, $prevNode = null) { @@ -102,6 +105,7 @@ class Tree * @param Node $parentNode * @param Node $prevNode * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function moveNodeTo($node, $parentNode, $prevNode = null) { @@ -114,6 +118,7 @@ class Tree * @param Node $parentNode * @param Node $prevNode * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function copyNodeTo($node, $parentNode, $prevNode = null) { @@ -141,6 +146,7 @@ class Tree * @param Node $parentNode * @param Node $prevNode * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function createNode($parentNode, $prevNode = null) { @@ -151,6 +157,7 @@ class Tree * * @param Node $node * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getChild($node) { @@ -161,6 +168,7 @@ class Tree * * @param Node $node * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getChildren($node) { diff --git a/lib/internal/Magento/Framework/Data/Tree/Node.php b/lib/internal/Magento/Framework/Data/Tree/Node.php index 4e4d94ee217..4cae8b6ff59 100644 --- a/lib/internal/Magento/Framework/Data/Tree/Node.php +++ b/lib/internal/Magento/Framework/Data/Tree/Node.php @@ -168,6 +168,7 @@ class Node extends \Magento\Framework\Object /** * @param Node $node * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function isChildOf($node) { diff --git a/lib/internal/Magento/Framework/Debug.php b/lib/internal/Magento/Framework/Debug.php index 7d58d1bc7db..9fbac155956 100644 --- a/lib/internal/Magento/Framework/Debug.php +++ b/lib/internal/Magento/Framework/Debug.php @@ -60,6 +60,8 @@ class Debug * @param bool $html output in HTML format * @param bool $withArgs add short arguments of methods * @return string|bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public static function trace(array $trace, $return = false, $html = true, $withArgs = true) { @@ -140,6 +142,7 @@ class Debug * * @param mixed $arg * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected static function _formatCalledArgument($arg) { diff --git a/lib/internal/Magento/Framework/Event/Observer/Cron.php b/lib/internal/Magento/Framework/Event/Observer/Cron.php index c2ff3a5cf57..755b758d939 100644 --- a/lib/internal/Magento/Framework/Event/Observer/Cron.php +++ b/lib/internal/Magento/Framework/Event/Observer/Cron.php @@ -62,6 +62,8 @@ class Cron extends \Magento\Framework\Event\Observer * @param string $expr * @param int $num * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function matchCronExpression($expr, $num) { diff --git a/lib/internal/Magento/Framework/File/Csv.php b/lib/internal/Magento/Framework/File/Csv.php index 9405809d963..9c5a6740780 100644 --- a/lib/internal/Magento/Framework/File/Csv.php +++ b/lib/internal/Magento/Framework/File/Csv.php @@ -136,6 +136,7 @@ class Csv * @param string $delimiter * @param string $enclosure * @return int + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function fputcsv(&$handle, $fields = [], $delimiter = ',', $enclosure = '"') { diff --git a/lib/internal/Magento/Framework/File/Uploader.php b/lib/internal/Magento/Framework/File/Uploader.php index 8eaa20cd159..45c38e41452 100644 --- a/lib/internal/Magento/Framework/File/Uploader.php +++ b/lib/internal/Magento/Framework/File/Uploader.php @@ -169,6 +169,7 @@ class Uploader * * @param array $result * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _afterSave($result) { @@ -183,6 +184,7 @@ class Uploader * @param string $newFileName * @return array * @throws \Exception + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function save($destinationFolder, $newFileName = null) { @@ -486,6 +488,7 @@ class Uploader * @param string|array $fileId * @return void * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ private function _setUploadFileId($fileId) { diff --git a/lib/internal/Magento/Framework/Filesystem/Driver/Http.php b/lib/internal/Magento/Framework/Filesystem/Driver/Http.php index 0d5a3e1f822..a02d624ba25 100644 --- a/lib/internal/Magento/Framework/Filesystem/Driver/Http.php +++ b/lib/internal/Magento/Framework/Filesystem/Driver/Http.php @@ -48,6 +48,7 @@ class Http extends File * * @param string $path * @return array + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function stat($path) { diff --git a/lib/internal/Magento/Framework/Filter/Input.php b/lib/internal/Magento/Framework/Filter/Input.php index d59595ca1af..982a25db5cd 100644 --- a/lib/internal/Magento/Framework/Filter/Input.php +++ b/lib/internal/Magento/Framework/Filter/Input.php @@ -205,6 +205,7 @@ class Input implements \Zend_Filter_Interface * @param bool $isFilterListSimple * @return array * @throws \Exception when filter is not found or not instance of defined instances + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _filter(array $data, &$filters = null, $isFilterListSimple = false) { diff --git a/lib/internal/Magento/Framework/Filter/RemoveAccents.php b/lib/internal/Magento/Framework/Filter/RemoveAccents.php index fb5800ea4e0..588e2fc8a8a 100644 --- a/lib/internal/Magento/Framework/Filter/RemoveAccents.php +++ b/lib/internal/Magento/Framework/Filter/RemoveAccents.php @@ -25,6 +25,7 @@ class RemoveAccents implements \Zend_Filter_Interface /** * @param string $string * @return string + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function filter($string) { diff --git a/lib/internal/Magento/Framework/Filter/Template.php b/lib/internal/Magento/Framework/Filter/Template.php index 27dd4b24849..54bfdbb8307 100644 --- a/lib/internal/Magento/Framework/Filter/Template.php +++ b/lib/internal/Magento/Framework/Filter/Template.php @@ -95,6 +95,7 @@ class Template implements \Zend_Filter_Interface * @param string $value * @return string * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function filter($value) { @@ -235,6 +236,7 @@ class Template implements \Zend_Filter_Interface * @param string $value raw parameters * @param string $default default value * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _getVariable($value, $default = '{no_value_defined}') { diff --git a/lib/internal/Magento/Framework/Filter/Template/Tokenizer/Parameter.php b/lib/internal/Magento/Framework/Filter/Template/Tokenizer/Parameter.php index 352deaaabc2..68885e11ba0 100644 --- a/lib/internal/Magento/Framework/Filter/Template/Tokenizer/Parameter.php +++ b/lib/internal/Magento/Framework/Filter/Template/Tokenizer/Parameter.php @@ -35,6 +35,7 @@ class Parameter extends \Magento\Framework\Filter\Template\Tokenizer\AbstractTok * Get string value in parameters through tokenize * * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getValue() { diff --git a/lib/internal/Magento/Framework/Filter/Template/Tokenizer/Variable.php b/lib/internal/Magento/Framework/Filter/Template/Tokenizer/Variable.php index 172bdfa3948..1bdaa7f8586 100644 --- a/lib/internal/Magento/Framework/Filter/Template/Tokenizer/Variable.php +++ b/lib/internal/Magento/Framework/Filter/Template/Tokenizer/Variable.php @@ -13,6 +13,7 @@ class Variable extends \Magento\Framework\Filter\Template\Tokenizer\AbstractToke * Tokenize string and return getted variable stack path * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function tokenize() { @@ -58,6 +59,7 @@ class Variable extends \Magento\Framework\Filter\Template\Tokenizer\AbstractToke * Get string value for method args * * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getString() { diff --git a/lib/internal/Magento/Framework/Gdata/Gshopping/Entry.php b/lib/internal/Magento/Framework/Gdata/Gshopping/Entry.php index ac17f30d455..e755365521c 100644 --- a/lib/internal/Magento/Framework/Gdata/Gshopping/Entry.php +++ b/lib/internal/Magento/Framework/Gdata/Gshopping/Entry.php @@ -77,6 +77,7 @@ class Entry extends \Zend_Gdata_Entry * * @param \DOMNode $child The \DOMNode to process * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function takeChildFromDOM($child) { @@ -222,6 +223,7 @@ class Entry extends \Zend_Gdata_Entry * * @param string $name The name of the Content attribute to look for * @return string[] $matches Array of Attribute + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getContentAttributesByName($name) { diff --git a/lib/internal/Magento/Framework/HTTP/Adapter/Curl.php b/lib/internal/Magento/Framework/HTTP/Adapter/Curl.php index 0f6a781312f..d9702d7e330 100644 --- a/lib/internal/Magento/Framework/HTTP/Adapter/Curl.php +++ b/lib/internal/Magento/Framework/HTTP/Adapter/Curl.php @@ -50,6 +50,8 @@ class Curl implements \Zend_Http_Client_Adapter_Interface * Apply current configuration array to transport resource * * @return \Magento\Framework\HTTP\Adapter\Curl + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _applyConfig() { @@ -136,6 +138,7 @@ class Curl implements \Zend_Http_Client_Adapter_Interface * @param array $headers * @param string $body * @return string Request as text + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function write($method, $url, $http_ver = '1.1', $headers = [], $body = '') { diff --git a/lib/internal/Magento/Framework/HTTP/Client/Curl.php b/lib/internal/Magento/Framework/HTTP/Client/Curl.php index 88b0f8e866a..86285f63b46 100644 --- a/lib/internal/Magento/Framework/HTTP/Client/Curl.php +++ b/lib/internal/Magento/Framework/HTTP/Client/Curl.php @@ -330,6 +330,8 @@ class Curl implements \Magento\Framework\HTTP\ClientInterface * @param string $uri * @param array $params * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function makeRequest($method, $uri, $params = []) { @@ -405,6 +407,7 @@ class Curl implements \Magento\Framework\HTTP\ClientInterface * @param resource $ch curl handle, not needed * @param string $data * @return int + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function parseHeaders($ch, $data) { diff --git a/lib/internal/Magento/Framework/HTTP/Client/Socket.php b/lib/internal/Magento/Framework/HTTP/Client/Socket.php index 0c39b6870ee..ed837b4cdbb 100644 --- a/lib/internal/Magento/Framework/HTTP/Client/Socket.php +++ b/lib/internal/Magento/Framework/HTTP/Client/Socket.php @@ -10,6 +10,12 @@ */ namespace Magento\Framework\HTTP\Client; +/** + * @SuppressWarnings(PHPMD.UnusedPrivateField) + */ +/** + * @SuppressWarnings(PHPMD.UnusedPrivateField) + */ class Socket implements \Magento\Framework\HTTP\ClientInterface { /** @@ -406,6 +412,7 @@ class Socket implements \Magento\Framework\HTTP\ClientInterface * Process response * * @return void + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function processResponse() { diff --git a/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php b/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php index bd5b3a6cf23..9b742a37a5f 100644 --- a/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php +++ b/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php @@ -9,6 +9,7 @@ use Magento\Framework\App\Filesystem\DirectoryList; /** * @file Abstract.php * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.TooManyFields) */ abstract class AbstractAdapter implements AdapterInterface { @@ -261,6 +262,7 @@ abstract class AbstractAdapter implements AdapterInterface * * @param \Magento\Framework\Filesystem $filesystem * @param array $data + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct(\Magento\Framework\Filesystem $filesystem, array $data = []) { diff --git a/lib/internal/Magento/Framework/Image/Adapter/Gd2.php b/lib/internal/Magento/Framework/Image/Adapter/Gd2.php index 3895c29ecd1..3d9c02d670d 100644 --- a/lib/internal/Magento/Framework/Image/Adapter/Gd2.php +++ b/lib/internal/Magento/Framework/Image/Adapter/Gd2.php @@ -202,6 +202,7 @@ class Gd2 extends \Magento\Framework\Image\Adapter\AbstractAdapter * @param resource &$imageResourceTo * @return int * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ private function _fillBackgroundColor(&$imageResourceTo) { @@ -275,6 +276,7 @@ class Gd2 extends \Magento\Framework\Image\Adapter\AbstractAdapter * @param bool &$isAlpha * @param bool &$isTrueColor * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ private function _getTransparency($imageResource, $fileType, &$isAlpha = false, &$isTrueColor = false) { @@ -365,6 +367,9 @@ class Gd2 extends \Magento\Framework\Image\Adapter\AbstractAdapter * @param int $opacity * @param bool $tile * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function watermark($imagePath, $positionX = 0, $positionY = 0, $opacity = 30, $tile = false) { diff --git a/lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php b/lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php index 89ab022508c..867578dd8e6 100644 --- a/lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php +++ b/lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php @@ -234,6 +234,8 @@ class ImageMagick extends \Magento\Framework\Image\Adapter\AbstractAdapter * @return void * @throws \LogicException * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function watermark($imagePath, $positionX = 0, $positionY = 0, $opacity = 30, $tile = false) { diff --git a/lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php b/lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php index 3767bc54b2f..d1cd6952c61 100644 --- a/lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php +++ b/lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php @@ -35,6 +35,8 @@ class InterfaceValidator * * @return void * @throws ValidatorException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function validate($pluginClass, $interceptedType) { diff --git a/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php b/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php index 655d036f1e7..083b8c3cf77 100644 --- a/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php +++ b/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php @@ -83,6 +83,7 @@ class PluginList extends Scoped implements InterceptionPluginList * @param ClassDefinitions $classDefinitions * @param array $scopePriorityScheme * @param string $cacheId + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( ReaderInterface $reader, @@ -112,6 +113,7 @@ class PluginList extends Scoped implements InterceptionPluginList * @return array * @throws InvalidArgumentException * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _inheritPlugins($type) { diff --git a/lib/internal/Magento/Framework/Io/AbstractIo.php b/lib/internal/Magento/Framework/Io/AbstractIo.php index bb2fc4e0a65..b5c5626070b 100644 --- a/lib/internal/Magento/Framework/Io/AbstractIo.php +++ b/lib/internal/Magento/Framework/Io/AbstractIo.php @@ -52,6 +52,7 @@ abstract class AbstractIo implements IoInterface /** * @param string $path * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getCleanPath($path) { diff --git a/lib/internal/Magento/Framework/Io/File.php b/lib/internal/Magento/Framework/Io/File.php index 375f9ee65aa..5193ec7c0e2 100644 --- a/lib/internal/Magento/Framework/Io/File.php +++ b/lib/internal/Magento/Framework/Io/File.php @@ -6,6 +6,7 @@ namespace Magento\Framework\Io; /** * Filesystem client + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) */ class File extends AbstractIo { @@ -366,6 +367,8 @@ class File extends AbstractIo * @param array $dirCallback * @return mixed * @throws \InvalidArgumentException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected static function _recursiveCallback($dir, array $fileCallback, array $dirCallback = []) { @@ -416,6 +419,7 @@ class File extends AbstractIo * @param string $dir * @return true * @throws \Exception + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function cd($dir) { @@ -458,6 +462,7 @@ class File extends AbstractIo * @param string|resource $src * @param int $mode * @return int|bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function write($filename, $src, $mode = null) { @@ -593,6 +598,7 @@ class File extends AbstractIo * * @param string $filename * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function rm($filename) { @@ -608,6 +614,7 @@ class File extends AbstractIo * @param string $src * @param string $destination * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function mv($src, $destination) { @@ -623,6 +630,7 @@ class File extends AbstractIo * @param string $src * @param string $destination * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function cp($src, $destination) { @@ -678,6 +686,8 @@ class File extends AbstractIo * @param string|null $grep * @return array * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function ls($grep = null) { @@ -781,6 +791,8 @@ class File extends AbstractIo * @param int $mode * @access protected * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _parsePermissions($mode) { diff --git a/lib/internal/Magento/Framework/Io/Ftp.php b/lib/internal/Magento/Framework/Io/Ftp.php index 09f41131f28..5ab2719c966 100644 --- a/lib/internal/Magento/Framework/Io/Ftp.php +++ b/lib/internal/Magento/Framework/Io/Ftp.php @@ -66,6 +66,8 @@ class Ftp extends AbstractIo * @param array $args * @return true * @throws IoException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function open(array $args = []) { @@ -183,6 +185,7 @@ class Ftp extends AbstractIo * * @param string $dir * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function cd($dir) { @@ -260,6 +263,7 @@ class Ftp extends AbstractIo * * @param string $filename * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function rm($filename) { @@ -272,6 +276,7 @@ class Ftp extends AbstractIo * @param string $src * @param string $dest * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function mv($src, $dest) { @@ -293,6 +298,7 @@ class Ftp extends AbstractIo /** * @param null $grep ignored parameter * @return array + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function ls($grep = null) { diff --git a/lib/internal/Magento/Framework/Io/IoInterface.php b/lib/internal/Magento/Framework/Io/IoInterface.php index dfcd25c74d5..ae2e68c3ec2 100644 --- a/lib/internal/Magento/Framework/Io/IoInterface.php +++ b/lib/internal/Magento/Framework/Io/IoInterface.php @@ -55,6 +55,7 @@ interface IoInterface * * @param string $dir * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function cd($dir); @@ -82,6 +83,7 @@ interface IoInterface * * @param string $filename * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function rm($filename); @@ -91,6 +93,7 @@ interface IoInterface * @param string $src * @param string $dest * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function mv($src, $dest); @@ -108,6 +111,7 @@ interface IoInterface * * @param string|null $grep * @return array + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function ls($grep = null); diff --git a/lib/internal/Magento/Framework/Io/Sftp.php b/lib/internal/Magento/Framework/Io/Sftp.php index 4faa38532bb..2ed666aa87b 100644 --- a/lib/internal/Magento/Framework/Io/Sftp.php +++ b/lib/internal/Magento/Framework/Io/Sftp.php @@ -96,6 +96,7 @@ class Sftp extends AbstractIo implements IoInterface * @param bool $recursive * @return bool * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function rmdir($dir, $recursive = false) { @@ -147,6 +148,7 @@ class Sftp extends AbstractIo implements IoInterface * * @param string $dir * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function cd($dir) { @@ -187,6 +189,7 @@ class Sftp extends AbstractIo implements IoInterface * * @param string $filename * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function rm($filename) { @@ -199,6 +202,7 @@ class Sftp extends AbstractIo implements IoInterface * @param string $source * @param string $destination * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function mv($source, $destination) { @@ -222,6 +226,7 @@ class Sftp extends AbstractIo implements IoInterface * * @param null $grep ignored parameter * @return array + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function ls($grep = null) { diff --git a/lib/internal/Magento/Framework/Locale/Lists.php b/lib/internal/Magento/Framework/Locale/Lists.php index 006f998a1f3..9297a08df36 100644 --- a/lib/internal/Magento/Framework/Locale/Lists.php +++ b/lib/internal/Magento/Framework/Locale/Lists.php @@ -62,6 +62,7 @@ class Lists implements \Magento\Framework\Locale\ListsInterface * * @param bool $translatedName translation flag * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _getOptionLocales($translatedName = false) { diff --git a/lib/internal/Magento/Framework/Message/AbstractMessage.php b/lib/internal/Magento/Framework/Message/AbstractMessage.php index 80e744c618e..18bea563de5 100644 --- a/lib/internal/Magento/Framework/Message/AbstractMessage.php +++ b/lib/internal/Magento/Framework/Message/AbstractMessage.php @@ -99,6 +99,7 @@ abstract class AbstractMessage implements MessageInterface * Getter for flag. Whether message is sticky * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsSticky() { diff --git a/lib/internal/Magento/Framework/Message/Manager.php b/lib/internal/Magento/Framework/Message/Manager.php index 739cdb0dbf5..dbc10ee99da 100644 --- a/lib/internal/Magento/Framework/Message/Manager.php +++ b/lib/internal/Magento/Framework/Message/Manager.php @@ -9,6 +9,7 @@ use Psr\Log\LoggerInterface as Logger; /** * Message manager model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Manager implements ManagerInterface { diff --git a/lib/internal/Magento/Framework/Message/MessageInterface.php b/lib/internal/Magento/Framework/Message/MessageInterface.php index d2dd5e8b655..9155ce504ac 100644 --- a/lib/internal/Magento/Framework/Message/MessageInterface.php +++ b/lib/internal/Magento/Framework/Message/MessageInterface.php @@ -78,6 +78,7 @@ interface MessageInterface * Getter for flag. Whether message is sticky * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsSticky(); diff --git a/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php b/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php index 7f403df4cd1..f5109b1202c 100644 --- a/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php +++ b/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php @@ -15,6 +15,7 @@ use Symfony\Component\DependencyInjection\Exception\LogicException; * * This class defines basic data structure of how custom attributes are stored in an ExtensibleModel. * Implementations may choose to process custom attributes as their persistence requires them to. + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractExtensibleModel extends AbstractModel implements ExtensibleDataInterface { diff --git a/lib/internal/Magento/Framework/Model/AbstractModel.php b/lib/internal/Magento/Framework/Model/AbstractModel.php index b223b53f1ce..a4da902087b 100644 --- a/lib/internal/Magento/Framework/Model/AbstractModel.php +++ b/lib/internal/Magento/Framework/Model/AbstractModel.php @@ -10,6 +10,7 @@ namespace Magento\Framework\Model; * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.NumberOfChildren) + * @SuppressWarnings(PHPMD.TooManyFields) */ abstract class AbstractModel extends \Magento\Framework\Object { diff --git a/lib/internal/Magento/Framework/Model/Exception.php b/lib/internal/Magento/Framework/Model/Exception.php index 8b92e2930ee..a5af17e4545 100644 --- a/lib/internal/Magento/Framework/Model/Exception.php +++ b/lib/internal/Magento/Framework/Model/Exception.php @@ -8,6 +8,7 @@ namespace Magento\Framework\Model; * Magento Model Exception * * This class will be extended by other modules + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Exception extends \Exception { diff --git a/lib/internal/Magento/Framework/Model/Resource/Db/AbstractDb.php b/lib/internal/Magento/Framework/Model/Resource/Db/AbstractDb.php index 4309ef36b03..b03b19be0b6 100644 --- a/lib/internal/Magento/Framework/Model/Resource/Db/AbstractDb.php +++ b/lib/internal/Magento/Framework/Model/Resource/Db/AbstractDb.php @@ -9,6 +9,7 @@ use Magento\Framework\Model\Exception as ModelException; /** * Abstract resource model class + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractDb extends \Magento\Framework\Model\Resource\AbstractResource { @@ -355,6 +356,7 @@ abstract class AbstractDb extends \Magento\Framework\Model\Resource\AbstractReso * @param mixed $value * @param \Magento\Framework\Model\AbstractModel $object * @return \Zend_Db_Select + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getLoadSelect($field, $value, $object) { @@ -368,6 +370,7 @@ abstract class AbstractDb extends \Magento\Framework\Model\Resource\AbstractReso * * @param \Magento\Framework\Model\AbstractModel $object * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function save(\Magento\Framework\Model\AbstractModel $object) { @@ -507,6 +510,7 @@ abstract class AbstractDb extends \Magento\Framework\Model\Resource\AbstractReso * * @param \Magento\Framework\Model\AbstractModel $object * @return void + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function unserializeFields(\Magento\Framework\Model\AbstractModel $object) { @@ -592,6 +596,7 @@ abstract class AbstractDb extends \Magento\Framework\Model\Resource\AbstractReso * @param \Magento\Framework\Model\AbstractModel $object * @return $this * @throws ModelException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _checkUnique(\Magento\Framework\Model\AbstractModel $object) { @@ -654,6 +659,7 @@ abstract class AbstractDb extends \Magento\Framework\Model\Resource\AbstractReso * * @param \Magento\Framework\Model\AbstractModel|\Magento\Framework\Object $object * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _afterLoad(\Magento\Framework\Model\AbstractModel $object) { @@ -665,6 +671,7 @@ abstract class AbstractDb extends \Magento\Framework\Model\Resource\AbstractReso * * @param \Magento\Framework\Model\AbstractModel|\Magento\Framework\Object $object * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object) { @@ -676,6 +683,7 @@ abstract class AbstractDb extends \Magento\Framework\Model\Resource\AbstractReso * * @param \Magento\Framework\Model\AbstractModel|\Magento\Framework\Object $object * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _afterSave(\Magento\Framework\Model\AbstractModel $object) { @@ -687,6 +695,7 @@ abstract class AbstractDb extends \Magento\Framework\Model\Resource\AbstractReso * * @param \Magento\Framework\Model\AbstractModel|\Magento\Framework\Object $object * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _beforeDelete(\Magento\Framework\Model\AbstractModel $object) { @@ -698,6 +707,7 @@ abstract class AbstractDb extends \Magento\Framework\Model\Resource\AbstractReso * * @param \Magento\Framework\Model\AbstractModel|\Magento\Framework\Object $object * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _afterDelete(\Magento\Framework\Model\AbstractModel $object) { @@ -709,6 +719,7 @@ abstract class AbstractDb extends \Magento\Framework\Model\Resource\AbstractReso * * @param \Magento\Framework\Model\AbstractModel $object * @return void + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _serializeFields(\Magento\Framework\Model\AbstractModel $object) { diff --git a/lib/internal/Magento/Framework/Model/Resource/Db/Collection/AbstractCollection.php b/lib/internal/Magento/Framework/Model/Resource/Db/Collection/AbstractCollection.php index 6e68ed3552d..b82cc776430 100644 --- a/lib/internal/Magento/Framework/Model/Resource/Db/Collection/AbstractCollection.php +++ b/lib/internal/Magento/Framework/Model/Resource/Db/Collection/AbstractCollection.php @@ -6,6 +6,7 @@ namespace Magento\Framework\Model\Resource\Db\Collection; /** * Abstract Resource Collection + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractCollection extends \Magento\Framework\Data\Collection\Db { @@ -190,6 +191,8 @@ abstract class AbstractCollection extends \Magento\Framework\Data\Collection\Db * Init fields for select * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _initSelectFields() { diff --git a/lib/internal/Magento/Framework/Module/DataSetup.php b/lib/internal/Magento/Framework/Module/DataSetup.php index 7612e372fa0..e01b19a57f0 100644 --- a/lib/internal/Magento/Framework/Module/DataSetup.php +++ b/lib/internal/Magento/Framework/Module/DataSetup.php @@ -262,6 +262,7 @@ class DataSetup extends \Magento\Framework\Module\Setup implements \Magento\Fram * @param string $toVersion * @param array $arrFiles * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _getModifySqlFiles($actionType, $fromVersion, $toVersion, $arrFiles) { @@ -383,6 +384,7 @@ class DataSetup extends \Magento\Framework\Module\Setup implements \Magento\Fram * @param string $parentField * @param string|integer $parentId * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function updateTableRow($table, $idField, $rowId, $field, $value = null, $parentField = null, $parentId = 0) { @@ -415,6 +417,7 @@ class DataSetup extends \Magento\Framework\Module\Setup implements \Magento\Fram * Check call afterApplyAllUpdates method for setup class * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCallAfterApplyAllUpdates() { diff --git a/lib/internal/Magento/Framework/Module/ModuleList/Loader.php b/lib/internal/Magento/Framework/Module/ModuleList/Loader.php index 37274755fa6..d29b2215843 100644 --- a/lib/internal/Magento/Framework/Module/ModuleList/Loader.php +++ b/lib/internal/Magento/Framework/Module/ModuleList/Loader.php @@ -65,6 +65,7 @@ class Loader * * @param array $origList * @return array + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ private function sortBySequence($origList) { diff --git a/lib/internal/Magento/Framework/Mview/View.php b/lib/internal/Magento/Framework/Mview/View.php index 2de767d6565..925bfd4a545 100644 --- a/lib/internal/Magento/Framework/Mview/View.php +++ b/lib/internal/Magento/Framework/Mview/View.php @@ -4,6 +4,9 @@ */ namespace Magento\Framework\Mview; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class View extends \Magento\Framework\Object implements ViewInterface { /** diff --git a/lib/internal/Magento/Framework/Object.php b/lib/internal/Magento/Framework/Object.php index 438cdad543f..8ddf01ee696 100644 --- a/lib/internal/Magento/Framework/Object.php +++ b/lib/internal/Magento/Framework/Object.php @@ -8,6 +8,7 @@ namespace Magento\Framework; * Universal data container with array access implementation * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Object implements \ArrayAccess { diff --git a/lib/internal/Magento/Framework/Object/Cache.php b/lib/internal/Magento/Framework/Object/Cache.php index 8e3b78254f0..187f7fd1be9 100644 --- a/lib/internal/Magento/Framework/Object/Cache.php +++ b/lib/internal/Magento/Framework/Object/Cache.php @@ -122,6 +122,8 @@ class Cache * @param array|string $tags * @return string * @throws \Magento\Framework\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function save($object, $idx = null, $tags = null) { @@ -273,6 +275,7 @@ class Cache * * @param array|string $tags * @return true + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function deleteByTags($tags) { @@ -347,6 +350,7 @@ class Cache * * @param array|string $tags * @return array + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function findByTags($tags) { @@ -388,6 +392,7 @@ class Cache * @param string $idx * @param object|null $object * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function debug($idx, $object = null) { diff --git a/lib/internal/Magento/Framework/Parse/Zip.php b/lib/internal/Magento/Framework/Parse/Zip.php index 9bd285f6bb0..6efc853e5b1 100644 --- a/lib/internal/Magento/Framework/Parse/Zip.php +++ b/lib/internal/Magento/Framework/Parse/Zip.php @@ -44,6 +44,9 @@ class Zip * * @param string $zipRange * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public static function zipRangeToZipPattern($zipRange) { diff --git a/lib/internal/Magento/Framework/Search/Adapter/Mysql/Aggregation/Interval.php b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Aggregation/Interval.php index 101df074da7..b58f03db80c 100644 --- a/lib/internal/Magento/Framework/Search/Adapter/Mysql/Aggregation/Interval.php +++ b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Aggregation/Interval.php @@ -40,6 +40,7 @@ class Interval implements IntervalInterface /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function load($limit, $offset = null, $lower = null, $upper = null) { @@ -62,6 +63,7 @@ class Interval implements IntervalInterface /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function loadPrevious($data, $index, $lower = null) { @@ -83,6 +85,7 @@ class Interval implements IntervalInterface /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function loadNext($data, $rightIndex, $upper = null) { diff --git a/lib/internal/Magento/Framework/Search/Dynamic/Algorithm.php b/lib/internal/Magento/Framework/Search/Dynamic/Algorithm.php index b84ca42ca89..07a29e76052 100644 --- a/lib/internal/Magento/Framework/Search/Dynamic/Algorithm.php +++ b/lib/internal/Magento/Framework/Search/Dynamic/Algorithm.php @@ -162,6 +162,8 @@ class Algorithm * * @param IntervalInterface $interval * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function calculateSeparators(IntervalInterface $interval) { @@ -258,6 +260,9 @@ class Algorithm * @param int $quantileNumber should be from 1 to n-1 where n is number of intervals * @param IntervalInterface $interval * @return array|null + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _findValueSeparator($quantileNumber, IntervalInterface $interval) { @@ -418,6 +423,8 @@ class Algorithm * @param bool $returnEmpty whether empty result is acceptable * @param null|float $roundingFactor if given, checks for range to contain the factor * @return false|array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _findRoundValue($lowerValue, $upperValue, $returnEmpty = true, $roundingFactor = null) { @@ -547,6 +554,8 @@ class Algorithm * @param float $value * @param null|float[] $limits search [from, to] * @return int + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _binarySearch($value, $limits = null) { diff --git a/lib/internal/Magento/Framework/Search/Request/Binder.php b/lib/internal/Magento/Framework/Search/Request/Binder.php index 30557bf5ca0..7d14148db84 100644 --- a/lib/internal/Magento/Framework/Search/Request/Binder.php +++ b/lib/internal/Magento/Framework/Search/Request/Binder.php @@ -47,6 +47,7 @@ class Binder * @param array $data * @param array $bindData * @return array + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ private function processDimensions($data, $bindData) { diff --git a/lib/internal/Magento/Framework/Search/Request/Cleaner.php b/lib/internal/Magento/Framework/Search/Request/Cleaner.php index c9751c42e57..e5194a12b4d 100644 --- a/lib/internal/Magento/Framework/Search/Request/Cleaner.php +++ b/lib/internal/Magento/Framework/Search/Request/Cleaner.php @@ -64,6 +64,8 @@ class Cleaner * @return void * @throws StateException * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ private function cleanQuery($queryName) { @@ -129,6 +131,7 @@ class Cleaner * @return void * @throws StateException * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ private function cleanFilter($filterName) { diff --git a/lib/internal/Magento/Framework/Session/Config.php b/lib/internal/Magento/Framework/Session/Config.php index 33a8c2f7a62..f40ac7c0eee 100644 --- a/lib/internal/Magento/Framework/Session/Config.php +++ b/lib/internal/Magento/Framework/Session/Config.php @@ -109,6 +109,7 @@ class Config implements ConfigInterface * @param DeploymentConfig $deploymentConfig * @param string $scopeType * @param string $lifetimePath + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function __construct( \Magento\Framework\ValidatorFactory $validatorFactory, @@ -405,6 +406,7 @@ class Config implements ConfigInterface * Get session.cookie_secure * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCookieSecure() { @@ -427,6 +429,7 @@ class Config implements ConfigInterface * Get session.cookie_httponly * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCookieHttpOnly() { @@ -449,6 +452,7 @@ class Config implements ConfigInterface * Get session.use_cookies * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseCookies() { diff --git a/lib/internal/Magento/Framework/Session/Config/ConfigInterface.php b/lib/internal/Magento/Framework/Session/Config/ConfigInterface.php index 80c170e4af7..b1e12ead5bc 100644 --- a/lib/internal/Magento/Framework/Session/Config/ConfigInterface.php +++ b/lib/internal/Magento/Framework/Session/Config/ConfigInterface.php @@ -134,6 +134,7 @@ interface ConfigInterface * Get session.cookie_secure * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCookieSecure(); @@ -149,6 +150,7 @@ interface ConfigInterface * Get session.cookie_httponly * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCookieHttpOnly(); @@ -164,6 +166,7 @@ interface ConfigInterface * Get session.use_cookies * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseCookies(); } diff --git a/lib/internal/Magento/Framework/Session/SaveHandler.php b/lib/internal/Magento/Framework/Session/SaveHandler.php index f028ae4b210..667f32f0043 100644 --- a/lib/internal/Magento/Framework/Session/SaveHandler.php +++ b/lib/internal/Magento/Framework/Session/SaveHandler.php @@ -101,6 +101,7 @@ class SaveHandler implements SaveHandlerInterface * * @param int $maxLifetime * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function gc($maxLifetime) { diff --git a/lib/internal/Magento/Framework/Session/SaveHandler/DbTable.php b/lib/internal/Magento/Framework/Session/SaveHandler/DbTable.php index 354b3e0a776..a99e710816f 100644 --- a/lib/internal/Magento/Framework/Session/SaveHandler/DbTable.php +++ b/lib/internal/Magento/Framework/Session/SaveHandler/DbTable.php @@ -57,6 +57,7 @@ class DbTable extends \SessionHandler * @param string $savePath ignored * @param string $sessionName ignored * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function open($savePath, $sessionName) { @@ -144,6 +145,7 @@ class DbTable extends \SessionHandler * * @param int $maxLifeTime * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function gc($maxLifeTime) { diff --git a/lib/internal/Magento/Framework/Session/SessionManager.php b/lib/internal/Magento/Framework/Session/SessionManager.php index fb4172633fe..95858ec7cd6 100644 --- a/lib/internal/Magento/Framework/Session/SessionManager.php +++ b/lib/internal/Magento/Framework/Session/SessionManager.php @@ -342,6 +342,7 @@ class SessionManager implements SessionManagerInterface * * @param string $urlHost can be host or url * @return string {session_id_key}={session_id_encrypted} + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getSessionIdForHost($urlHost) { diff --git a/lib/internal/Magento/Framework/Session/SidResolver.php b/lib/internal/Magento/Framework/Session/SidResolver.php index 371c715ddbe..0c1b7fe9bde 100644 --- a/lib/internal/Magento/Framework/Session/SidResolver.php +++ b/lib/internal/Magento/Framework/Session/SidResolver.php @@ -126,6 +126,7 @@ class SidResolver implements SidResolverInterface * Retrieve use flag session var instead of SID for URL * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseSessionVar() { @@ -148,6 +149,7 @@ class SidResolver implements SidResolverInterface * Retrieve use session in URL flag * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseSessionInUrl() { diff --git a/lib/internal/Magento/Framework/Session/SidResolverInterface.php b/lib/internal/Magento/Framework/Session/SidResolverInterface.php index 458b6dbaf18..12a1eaf4df6 100644 --- a/lib/internal/Magento/Framework/Session/SidResolverInterface.php +++ b/lib/internal/Magento/Framework/Session/SidResolverInterface.php @@ -41,6 +41,7 @@ interface SidResolverInterface * Retrieve use flag session var instead of SID for URL * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseSessionVar(); @@ -56,6 +57,7 @@ interface SidResolverInterface * Retrieve use session in URL flag * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseSessionInUrl(); } diff --git a/lib/internal/Magento/Framework/Simplexml/Config.php b/lib/internal/Magento/Framework/Simplexml/Config.php index 58de8ce7a65..b257d4a3ac9 100644 --- a/lib/internal/Magento/Framework/Simplexml/Config.php +++ b/lib/internal/Magento/Framework/Simplexml/Config.php @@ -183,6 +183,7 @@ class Config * Enter description here... * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCacheSaved() { diff --git a/lib/internal/Magento/Framework/Simplexml/Element.php b/lib/internal/Magento/Framework/Simplexml/Element.php index 568a5dea211..e45db3a0d25 100644 --- a/lib/internal/Magento/Framework/Simplexml/Element.php +++ b/lib/internal/Magento/Framework/Simplexml/Element.php @@ -26,6 +26,7 @@ class Element extends \SimpleXMLElement * * @param \Magento\Framework\Simplexml\Element $element * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setParent($element) { @@ -58,6 +59,7 @@ class Element extends \SimpleXMLElement * Enter description here... * * @return boolean + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function hasChildren() { @@ -92,6 +94,7 @@ class Element extends \SimpleXMLElement * @todo param string $path Subset of xpath. Example: "child/grand[@attrName='attrValue']/subGrand" * @param string $path Example: "child/grand@attrName=attrValue/subGrand" (to make it faster without regex) * @return \Magento\Framework\Simplexml\Element + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function descend($path) { @@ -221,6 +224,8 @@ class Element extends \SimpleXMLElement * @param string $filename * @param int|boolean $level if false * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function asNiceXml($filename = '', $level = 0) { @@ -367,6 +372,8 @@ class Element extends \SimpleXMLElement * @param \Magento\Framework\Simplexml\Element $source * @param boolean $overwrite * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function extendChild($source, $overwrite = false) { diff --git a/lib/internal/Magento/Framework/Stdlib/ArrayUtils.php b/lib/internal/Magento/Framework/Stdlib/ArrayUtils.php index 69856ef34a8..0a21e7a5360 100644 --- a/lib/internal/Magento/Framework/Stdlib/ArrayUtils.php +++ b/lib/internal/Magento/Framework/Stdlib/ArrayUtils.php @@ -55,6 +55,8 @@ class ArrayUtils * @param string $prefix * @param bool $forceSetAll * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function decorateArray($array, $prefix = 'decorated_', $forceSetAll = false) { diff --git a/lib/internal/Magento/Framework/Stdlib/String.php b/lib/internal/Magento/Framework/Stdlib/String.php index ceadc8295d3..cdcd01b0239 100644 --- a/lib/internal/Magento/Framework/Stdlib/String.php +++ b/lib/internal/Magento/Framework/Stdlib/String.php @@ -65,6 +65,8 @@ class String * @param bool $trim * @param string $wordSeparatorRegex * @return string[] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function split($value, $length = 1, $keepWords = false, $trim = false, $wordSeparatorRegex = '\s') { diff --git a/lib/internal/Magento/Framework/System/Dirs.php b/lib/internal/Magento/Framework/System/Dirs.php index 73f7ea4648e..329d69fae51 100644 --- a/lib/internal/Magento/Framework/System/Dirs.php +++ b/lib/internal/Magento/Framework/System/Dirs.php @@ -9,6 +9,9 @@ class Dirs /** * @param string[]|string $dirname * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ShortMethodName) */ public static function rm($dirname) { @@ -90,6 +93,7 @@ class Dirs * @param string $dest * @return void * @throws \Exception + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public static function copyFileStrict($source, $dest) { diff --git a/lib/internal/Magento/Framework/System/Ftp.php b/lib/internal/Magento/Framework/System/Ftp.php index 901de8bc7cc..c5dd0963a71 100644 --- a/lib/internal/Magento/Framework/System/Ftp.php +++ b/lib/internal/Magento/Framework/System/Ftp.php @@ -332,6 +332,7 @@ class Ftp * @param int $fileMode FTP_BINARY | FTP_ASCII * @param int $resumeOffset * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function get($localFile, $remoteFile, $fileMode = FTP_BINARY, $resumeOffset = 0) { @@ -426,6 +427,7 @@ class Ftp * @param string $dir * @param bool $recursive * @return array + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function ls($dir = "/", $recursive = false) { diff --git a/lib/internal/Magento/Framework/Translate/Locale/Resolver/Plugin.php b/lib/internal/Magento/Framework/Translate/Locale/Resolver/Plugin.php index 353b7fc01ee..d9ea8e107cd 100644 --- a/lib/internal/Magento/Framework/Translate/Locale/Resolver/Plugin.php +++ b/lib/internal/Magento/Framework/Translate/Locale/Resolver/Plugin.php @@ -26,6 +26,7 @@ class Plugin * @param \Magento\Framework\Locale\ResolverInterface $subject * @param string|null $localeCode * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterEmulate(\Magento\Framework\Locale\ResolverInterface $subject, $localeCode) { @@ -36,6 +37,7 @@ class Plugin * @param \Magento\Framework\Locale\ResolverInterface $subject * @param string|null $localeCode * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterRevert(\Magento\Framework\Locale\ResolverInterface $subject, $localeCode) { diff --git a/lib/internal/Magento/Framework/Url.php b/lib/internal/Magento/Framework/Url.php index e2eaff82e8f..7b4b6baedab 100644 --- a/lib/internal/Magento/Framework/Url.php +++ b/lib/internal/Magento/Framework/Url.php @@ -52,6 +52,7 @@ namespace Magento\Framework; * - F: host_url * - G: route_path * - H: route_url + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) */ class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInterface { @@ -158,6 +159,7 @@ class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInt * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param string $scopeType * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Route\ConfigInterface $routeConfig, @@ -229,6 +231,7 @@ class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInt * Retrieve use session rule * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseSession() { @@ -425,6 +428,7 @@ class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInt * * @param string $data * @return \Magento\Framework\UrlInterface + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _setRoutePath($data) { @@ -505,6 +509,7 @@ class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInt * * @param array $routeParams * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _getRoutePath($routeParams = []) { @@ -762,6 +767,8 @@ class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInt * @param string|null $routePath * @param array|null $routeParams * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getUrl($routePath = null, $routeParams = null) { diff --git a/lib/internal/Magento/Framework/UrlInterface.php b/lib/internal/Magento/Framework/UrlInterface.php index e93f69e7e00..c8a8aa866eb 100644 --- a/lib/internal/Magento/Framework/UrlInterface.php +++ b/lib/internal/Magento/Framework/UrlInterface.php @@ -48,6 +48,7 @@ interface UrlInterface * Retrieve use session rule * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseSession(); diff --git a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php index 56689fe7335..4e79e73da35 100644 --- a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php +++ b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php @@ -14,6 +14,7 @@ namespace Magento\Framework\View\Element; * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractBlock extends \Magento\Framework\Object implements BlockInterface { diff --git a/lib/internal/Magento/Framework/Xml/Generator.php b/lib/internal/Magento/Framework/Xml/Generator.php index c39bbc81117..62963e355bb 100644 --- a/lib/internal/Magento/Framework/Xml/Generator.php +++ b/lib/internal/Magento/Framework/Xml/Generator.php @@ -67,6 +67,7 @@ class Generator * @param array $content * @return $this * @throws \DOMException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function arrayToXml($content) { diff --git a/lib/internal/Magento/Framework/Xml/Parser.php b/lib/internal/Magento/Framework/Xml/Parser.php index e2b960caf60..9e64428863e 100644 --- a/lib/internal/Magento/Framework/Xml/Parser.php +++ b/lib/internal/Magento/Framework/Xml/Parser.php @@ -69,6 +69,8 @@ class Parser /** * @param bool $currentNode * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _xmlToArray($currentNode = false) { -- GitLab From 325be96bf87db317600cd70914ea73ad781563d5 Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Tue, 6 Jan 2015 02:24:41 -0800 Subject: [PATCH 013/114] MAGETWO-31578: Implement tool for adding annotations to existing code - app/code is covered with @SuppressWarnings annotations --- .../AdminNotification/Model/Observer.php | 1 + .../Model/Resource/Inbox.php | 2 ++ .../Authorization/Model/Acl/AclRetriever.php | 1 + app/code/Magento/Backend/App/Action.php | 3 +++ .../Magento/Backend/App/Action/Context.php | 3 +++ app/code/Magento/Backend/App/DefaultPath.php | 1 + .../Magento/Backend/Block/Dashboard/Graph.php | 4 ++++ .../Backend/Block/Dashboard/Orders/Grid.php | 1 + .../Block/Dashboard/Tab/Customers/Most.php | 1 + .../Block/Dashboard/Tab/Customers/Newest.php | 1 + .../Block/Dashboard/Tab/Products/Ordered.php | 1 + .../Block/Dashboard/Tab/Products/Viewed.php | 1 + .../Block/System/Config/Form/Field.php | 1 + .../Block/Widget/Button/ButtonList.php | 1 + .../Backend/Block/Widget/Form/Container.php | 1 + .../Magento/Backend/Block/Widget/Grid.php | 6 ++++++ .../Backend/Block/Widget/Grid/Column.php | 1 + .../Block/Widget/Grid/Column/Filter/Store.php | 2 ++ .../Grid/Column/Renderer/AbstractRenderer.php | 1 + .../Widget/Grid/Column/Renderer/Action.php | 2 ++ .../Widget/Grid/Column/Renderer/Checkbox.php | 2 ++ .../Widget/Grid/Column/Renderer/Options.php | 1 + .../Widget/Grid/Column/Renderer/Store.php | 5 +++++ .../Backend/Block/Widget/Grid/ColumnSet.php | 4 ++++ .../Backend/Block/Widget/Grid/Container.php | 1 + .../Backend/Block/Widget/Grid/Export.php | 1 + .../Backend/Block/Widget/Grid/Extended.php | 10 +++++++++ .../Grid/Massaction/AbstractMassaction.php | 1 + .../Block/Widget/Grid/Massaction/Extended.php | 1 + .../Magento/Backend/Block/Widget/Tabs.php | 4 ++++ .../System/Config/System/Storage/Status.php | 1 + .../Adminhtml/System/Store/EditStore.php | 2 ++ .../Adminhtml/System/Store/Save.php | 1 + .../Magento/Backend/Model/Auth/Session.php | 1 + app/code/Magento/Backend/Model/Config.php | 4 ++++ .../Model/Config/Structure/Converter.php | 2 ++ .../Magento/Backend/Model/Locale/Resolver.php | 1 + .../Magento/Backend/Model/Menu/Config.php | 3 +++ .../Magento/Backend/Model/Session/Quote.php | 2 ++ .../Controller/Adminhtml/Index/Create.php | 1 + .../Controller/Adminhtml/Index/Download.php | 1 + .../Controller/Adminhtml/Index/Rollback.php | 3 +++ app/code/Magento/Backup/Model/Backup.php | 1 + app/code/Magento/Backup/Model/Resource/Db.php | 1 + .../Magento/Backup/Model/Resource/Helper.php | 1 + .../Magento/Bundle/Api/Data/LinkInterface.php | 1 + .../Catalog/Product/Edit/Tab/Attributes.php | 3 +++ .../Product/Edit/Tab/Attributes/Extend.php | 3 +++ .../Adminhtml/Sales/Order/Items/Renderer.php | 2 ++ .../Sales/Order/View/Items/Renderer.php | 2 ++ .../Product/View/Type/Bundle/Option.php | 1 + .../Block/Checkout/Cart/Item/Renderer.php | 2 ++ .../Block/Sales/Order/Items/Renderer.php | 2 ++ .../Initialization/Helper/Plugin/Bundle.php | 1 + .../Magento/Bundle/Model/LinkManagement.php | 5 +++++ app/code/Magento/Bundle/Model/Observer.php | 2 ++ .../Magento/Bundle/Model/OptionRepository.php | 5 +++++ .../Magento/Bundle/Model/Product/Price.php | 7 +++++++ .../Magento/Bundle/Model/Product/Type.php | 11 ++++++++++ .../Bundle/Model/Resource/Indexer/Price.php | 2 ++ .../Sales/Order/Pdf/Items/AbstractItems.php | 4 ++++ .../Sales/Order/Pdf/Items/Creditmemo.php | 3 +++ .../Model/Sales/Order/Pdf/Items/Invoice.php | 3 +++ .../Model/Sales/Order/Pdf/Items/Shipment.php | 3 +++ .../Bundle/Pricing/Adjustment/Calculator.php | 5 +++++ .../Pricing/Price/BundleSelectionPrice.php | 1 + app/code/Magento/Captcha/Model/Observer.php | 1 + .../Api/Data/CategoryTreeInterface.php | 1 + ...uctAttributeMediaGalleryEntryInterface.php | 1 + .../Api/Data/ProductCustomOptionInterface.php | 1 + .../Adminhtml/Category/AbstractCategory.php | 1 + .../Adminhtml/Category/Checkboxes/Tree.php | 1 + .../Adminhtml/Category/Tab/Attributes.php | 2 ++ .../Block/Adminhtml/Category/Tab/Design.php | 3 +++ .../Catalog/Block/Adminhtml/Category/Tabs.php | 1 + .../Catalog/Block/Adminhtml/Category/Tree.php | 3 +++ .../Form/Renderer/Config/DateFieldsOrder.php | 1 + .../Block/Adminhtml/Helper/Form/Wysiwyg.php | 1 + .../Product/Attribute/Edit/Tab/Advanced.php | 1 + .../Product/Attribute/Edit/Tab/Front.php | 1 + .../Product/Attribute/Edit/Tab/Main.php | 4 ++++ .../Adminhtml/Product/Attribute/Grid.php | 3 +++ .../NewAttribute/Product/Attributes.php | 3 +++ .../Adminhtml/Product/Attribute/Set/Main.php | 1 + .../Edit/Action/Attribute/Tab/Attributes.php | 3 +++ .../Adminhtml/Product/Edit/Tab/Attributes.php | 6 ++++++ .../Adminhtml/Product/Edit/Tab/Crosssell.php | 4 ++++ .../Product/Edit/Tab/Options/Option.php | 3 +++ .../Product/Edit/Tab/Options/Popup/Grid.php | 3 +++ .../Adminhtml/Product/Edit/Tab/Price/Tier.php | 1 + .../Adminhtml/Product/Edit/Tab/Related.php | 1 + .../Adminhtml/Product/Edit/Tab/Upsell.php | 1 + .../Block/Adminhtml/Product/Edit/Tabs.php | 4 ++++ .../Product/Frontend/Product/Watermark.php | 2 ++ .../Catalog/Block/Adminhtml/Product/Grid.php | 1 + .../Adminhtml/Product/Helper/Form/Gallery.php | 1 + app/code/Magento/Catalog/Block/Navigation.php | 4 ++++ .../Catalog/Block/Product/AbstractProduct.php | 3 +++ .../Block/Product/Compare/ListCompare.php | 1 + .../Magento/Catalog/Block/Product/Context.php | 1 + .../Catalog/Block/Product/ListProduct.php | 1 + .../Block/Product/ProductList/Toolbar.php | 1 + .../Magento/Catalog/Block/Product/View.php | 1 + .../Catalog/Block/Product/View/Attributes.php | 1 + .../Product/View/Options/Type/Select.php | 3 +++ .../Block/Product/Widget/Html/Pager.php | 1 + .../Block/Product/Widget/NewWidget.php | 1 + .../Magento/Catalog/Block/Rss/Category.php | 2 ++ .../Catalog/Block/Rss/Product/Special.php | 1 + .../Magento/Catalog/Block/Widget/Link.php | 1 + .../Controller/Adminhtml/Category/Edit.php | 2 ++ .../Controller/Adminhtml/Category/Save.php | 3 +++ .../Catalog/Controller/Adminhtml/Product.php | 1 + .../Product/Action/Attribute/Save.php | 4 ++++ .../Adminhtml/Product/Attribute/Edit.php | 1 + .../Adminhtml/Product/Attribute/Save.php | 7 +++++++ .../Product/Initialization/Helper.php | 2 ++ .../Initialization/StockDataFilter.php | 1 + .../Controller/Adminhtml/Product/Save.php | 1 + .../Controller/Adminhtml/Product/Set/Save.php | 1 + .../Controller/Adminhtml/Product/Validate.php | 2 ++ .../Catalog/Controller/Category/View.php | 5 +++++ .../Catalog/Controller/Product/Compare.php | 2 ++ .../Controller/Product/Compare/Index.php | 3 +++ app/code/Magento/Catalog/Helper/Data.php | 5 +++++ app/code/Magento/Catalog/Helper/Image.php | 2 ++ app/code/Magento/Catalog/Helper/Output.php | 1 + app/code/Magento/Catalog/Helper/Product.php | 7 +++++++ .../Catalog/Helper/Product/Compare.php | 3 +++ .../Catalog/Helper/Product/Composite.php | 1 + .../Catalog/Helper/Product/Configuration.php | 2 ++ .../Helper/Product/Edit/Action/Attribute.php | 2 ++ .../Catalog/Helper/Product/Flat/Indexer.php | 3 +++ .../Magento/Catalog/Helper/Product/View.php | 2 ++ .../Magento/Catalog/Model/AbstractModel.php | 1 + .../Model/App/Action/ContextPlugin.php | 1 + app/code/Magento/Catalog/Model/Category.php | 8 +++++++ .../Category/Attribute/Backend/Sortby.php | 2 ++ app/code/Magento/Catalog/Model/Config.php | 2 ++ .../Catalog/Model/Entity/Attribute.php | 2 ++ .../Model/Indexer/Category/AffectCache.php | 1 + .../Indexer/Category/Flat/AbstractAction.php | 1 + .../Category/Product/Plugin/StoreGroup.php | 1 + .../Model/Indexer/Product/AffectCache.php | 1 + .../Indexer/Product/Flat/AbstractAction.php | 2 ++ .../Indexer/Product/Flat/Action/Indexer.php | 2 ++ .../Indexer/Product/Flat/FlatTableBuilder.php | 2 ++ .../Indexer/Product/Price/AbstractAction.php | 2 ++ app/code/Magento/Catalog/Model/Layer.php | 1 + .../Model/Layer/Filter/Dynamic/Auto.php | 3 +++ .../Catalog/Model/Layer/Filter/Price.php | 2 ++ app/code/Magento/Catalog/Model/Product.php | 8 +++++++ .../Magento/Catalog/Model/Product/Action.php | 1 + .../Backend/Groupprice/AbstractGroupprice.php | 6 ++++++ .../Model/Product/Attribute/Backend/Media.php | 10 +++++++++ .../Model/Product/Attribute/Backend/Price.php | 1 + .../Model/Product/Attribute/Repository.php | 6 ++++++ .../Product/Attribute/Source/Inputtype.php | 1 + .../Catalog/Model/Product/Compare/Item.php | 1 + .../Catalog/Model/Product/Gallery/Entry.php | 1 + .../Product/Gallery/GalleryManagement.php | 3 +++ .../Model/Product/GroupPriceManagement.php | 2 ++ .../Magento/Catalog/Model/Product/Image.php | 11 ++++++++++ .../Magento/Catalog/Model/Product/Option.php | 4 ++++ .../Model/Product/Option/Type/Date.php | 5 +++++ .../Model/Product/Option/Type/DefaultType.php | 5 +++++ .../Model/Product/Option/Type/File.php | 2 ++ .../Option/Type/File/ValidatorFile.php | 4 ++++ .../Model/Product/Option/Validator/Select.php | 2 ++ .../Catalog/Model/Product/PriceModifier.php | 1 + .../Model/Product/TierPriceManagement.php | 3 +++ .../Model/Product/Type/AbstractType.php | 21 +++++++++++++++++++ .../Catalog/Model/Product/Type/Price.php | 4 ++++ .../Magento/Catalog/Model/Product/Url.php | 2 ++ .../Catalog/Model/Product/Validator.php | 1 + .../Catalog/Model/ProductRepository.php | 3 +++ .../Model/Resource/AbstractResource.php | 4 ++++ .../Catalog/Model/Resource/Category.php | 5 +++++ .../Model/Resource/Category/Collection.php | 2 ++ .../Catalog/Model/Resource/Category/Tree.php | 8 +++++++ .../Catalog/Model/Resource/Eav/Attribute.php | 5 +++++ .../Magento/Catalog/Model/Resource/Helper.php | 1 + .../Catalog/Model/Resource/Product.php | 2 ++ .../Model/Resource/Product/Collection.php | 13 ++++++++++++ .../Product/Compare/Item/Collection.php | 1 + .../Product/Indexer/Price/DefaultPrice.php | 3 +++ .../Catalog/Model/Resource/Product/Link.php | 1 + .../Catalog/Model/Resource/Product/Option.php | 3 +++ .../Model/Resource/Product/Option/Value.php | 3 +++ .../Product/Option/Value/Collection.php | 1 + .../Magento/Catalog/Model/Resource/Setup.php | 1 + .../Magento/Catalog/Model/Resource/Url.php | 2 ++ .../Backend/Catalog/Url/Rewrite/Suffix.php | 4 ++++ .../Catalog/Pricing/Price/TierPrice.php | 1 + .../Catalog/Pricing/Render/PriceBox.php | 1 + .../Model/Export/Product.php | 8 +++++++ .../Model/Import/Product.php | 18 ++++++++++++++++ .../Model/Import/Product/Option.php | 2 ++ .../Import/Product/Type/AbstractType.php | 5 +++++ .../Api/Data/StockItemInterface.php | 12 +++++++++++ .../Api/StockConfigurationInterface.php | 2 ++ .../Magento/CatalogInventory/Helper/Stock.php | 1 + .../Model/Adminhtml/Stock/Item.php | 2 ++ .../CatalogInventory/Model/Configuration.php | 2 ++ .../CatalogInventory/Model/Observer.php | 1 + .../Model/Quote/Item/QuantityValidator.php | 3 +++ .../Initializer/StockItem.php | 2 ++ .../Resource/Indexer/Stock/DefaultStock.php | 2 ++ .../CatalogInventory/Model/Stock/Item.php | 15 +++++++++++++ .../Model/Stock/StockItemRepository.php | 2 ++ .../Model/Stock/StockRepository.php | 1 + .../Model/Stock/StockStatusRepository.php | 1 + .../CatalogInventory/Model/StockIndex.php | 2 ++ .../Model/StockManagement.php | 1 + .../Model/StockRegistryProvider.php | 1 + .../Model/StockStateProvider.php | 5 +++++ .../Promo/Catalog/Edit/Tab/Actions.php | 1 + .../Adminhtml/Promo/Catalog/Edit/Tab/Main.php | 1 + .../Adminhtml/Promo/Catalog/Save.php | 1 + .../Model/Indexer/IndexBuilder.php | 10 +++++++++ .../Magento/CatalogRule/Model/Observer.php | 3 +++ .../CatalogRule/Model/Resource/Rule.php | 1 + app/code/Magento/CatalogRule/Model/Rule.php | 4 ++++ .../Mysql/Aggregation/DataProvider.php | 3 +++ .../Adapter/Mysql/Dynamic/DataProvider.php | 3 +++ .../Adapter/Mysql/Filter/Preprocessor.php | 1 + .../Magento/CatalogSearch/Model/Advanced.php | 6 ++++++ .../Model/Indexer/Fulltext/Action/Full.php | 9 ++++++++ .../Model/Layer/Filter/Decimal.php | 1 + .../Model/Layer/Filter/Price.php | 2 ++ .../CatalogSearch/Model/Resource/Advanced.php | 3 +++ .../Model/Resource/Advanced/Collection.php | 2 ++ .../Model/Resource/Fulltext/Collection.php | 1 + .../Model/Resource/Search/Collection.php | 3 +++ .../Model/Search/RequestGenerator.php | 1 + .../Block/Product/ProductsList.php | 2 ++ .../Model/Rule/Condition/Product.php | 1 + app/code/Magento/Centinel/Model/Config.php | 2 ++ app/code/Magento/Centinel/Model/Service.php | 1 + .../Centinel/Model/State/Mastercard.php | 3 +++ .../Magento/Centinel/Model/State/Visa.php | 4 ++++ app/code/Magento/Checkout/Block/Cart.php | 2 ++ .../Checkout/Block/Cart/Item/Renderer.php | 1 + .../Magento/Checkout/Block/Cart/Shipping.php | 2 ++ .../Magento/Checkout/Block/Cart/Sidebar.php | 2 ++ app/code/Magento/Checkout/Block/Onepage.php | 1 + .../Block/Onepage/AbstractOnepage.php | 2 ++ .../Checkout/Block/Onepage/Billing.php | 2 ++ .../Magento/Checkout/Block/Onepage/Login.php | 2 ++ .../Checkout/Block/Onepage/Shipping.php | 2 ++ .../Onepage/Shipping/Method/Available.php | 2 ++ .../Magento/Checkout/Block/Total/Nominal.php | 1 + .../Magento/Checkout/Controller/Cart/Add.php | 1 + .../Checkout/Controller/Cart/CouponPost.php | 2 ++ .../Controller/Cart/UpdateItemOptions.php | 2 ++ .../Magento/Checkout/Controller/Onepage.php | 4 ++++ .../Checkout/Controller/Onepage/SaveOrder.php | 2 ++ .../Controller/Onepage/SavePayment.php | 1 + app/code/Magento/Checkout/Helper/Cart.php | 2 ++ app/code/Magento/Checkout/Helper/Data.php | 3 +++ app/code/Magento/Checkout/Model/Cart.php | 6 ++++++ app/code/Magento/Checkout/Model/Session.php | 6 ++++++ .../Magento/Checkout/Model/Type/Onepage.php | 13 ++++++++++++ .../Checkout/Service/V1/Cart/ReadService.php | 1 + .../Service/V1/Data/Cart/Customer.php | 1 + .../Service/V1/Data/Cart/ShippingMethod.php | 1 + .../Checkout/Service/V1/Data/CartMapper.php | 1 + .../Block/Adminhtml/Agreement/Edit/Form.php | 1 + .../Block/Adminhtml/Agreement/Grid.php | 1 + .../Controller/Adminhtml/Agreement/Edit.php | 1 + .../Block/Adminhtml/Page/Edit/Tab/Main.php | 1 + .../Magento/Cms/Block/Adminhtml/Page/Grid.php | 1 + .../Cms/Controller/Adminhtml/Block/Edit.php | 1 + .../Cms/Controller/Adminhtml/Page/Edit.php | 1 + .../Magento/Cms/Controller/Index/Index.php | 1 + app/code/Magento/Cms/Helper/Page.php | 3 +++ app/code/Magento/Cms/Model/Resource/Block.php | 1 + .../Cms/Model/Resource/CmsCriteriaMapper.php | 1 + .../Cms/Model/Wysiwyg/Images/Storage.php | 4 ++++ .../Attribute/Edit/Tab/Variations/Main.php | 3 +++ app/code/Magento/Core/App/Router/Base.php | 9 ++++++++ app/code/Magento/Core/Model/File/Storage.php | 4 ++++ .../Core/Model/File/Storage/Database.php | 1 + .../Model/File/Storage/Directory/Database.php | 1 + .../Magento/Core/Model/File/Storage/File.php | 1 + .../Magento/Core/Model/File/Storage/Flag.php | 1 + .../Model/File/Validator/AvailablePath.php | 3 +++ app/code/Magento/Core/Model/Layout/Merge.php | 3 +++ app/code/Magento/Core/Model/Observer.php | 1 + .../Magento/Core/Model/Resource/Design.php | 2 ++ .../Core/Model/Url/RouteParamsResolver.php | 2 ++ .../Backend/Config/Structure/Converter.php | 1 + app/code/Magento/Cron/Model/Observer.php | 6 ++++++ app/code/Magento/Cron/Model/Schedule.php | 2 ++ .../Model/System/Currencysymbol.php | 2 ++ .../Block/Adminhtml/Edit/Tab/Addresses.php | 1 + .../Block/Adminhtml/Edit/Tab/Reviews.php | 3 +++ app/code/Magento/Customer/Helper/Address.php | 1 + app/code/Magento/Customer/Model/Address.php | 2 ++ .../Model/Address/AbstractAddress.php | 5 +++++ .../Model/App/Action/ContextPlugin.php | 1 + app/code/Magento/Customer/Model/Customer.php | 7 +++++++ app/code/Magento/Customer/Model/Group.php | 1 + .../Model/Metadata/Form/AbstractData.php | 6 ++++++ .../Customer/Model/Metadata/Form/Date.php | 2 ++ .../Customer/Model/Metadata/Form/File.php | 7 +++++++ .../Customer/Model/Metadata/Form/Image.php | 2 ++ .../Model/Metadata/Form/Multiline.php | 1 + .../Customer/Model/Metadata/Form/Text.php | 2 ++ app/code/Magento/Customer/Model/Observer.php | 1 + .../Customer/Model/Renderer/Region.php | 2 ++ .../Model/Resource/AddressRepository.php | 3 +++ .../Customer/Model/Resource/Customer.php | 3 +++ .../Model/Resource/CustomerRepository.php | 3 +++ .../Magento/Customer/Model/Resource/Setup.php | 3 +++ app/code/Magento/Customer/Model/Session.php | 2 ++ .../Model/Export/Address.php | 4 ++++ .../Model/Import/AbstractCustomer.php | 2 ++ .../Model/Import/Address.php | 10 +++++++++ .../Model/Import/Customer.php | 9 ++++++++ .../Adminhtml/Editor/Toolbar/Buttons/Edit.php | 1 + .../Adminhtml/Editor/Toolbar/Buttons/Save.php | 1 + .../Magento/DesignEditor/Model/Observer.php | 1 + .../DesignEditor/Model/Url/NavigationMode.php | 1 + app/code/Magento/Dhl/Model/Carrier.php | 20 ++++++++++++++++++ app/code/Magento/Directory/Model/Currency.php | 4 ++++ app/code/Magento/Directory/Model/Observer.php | 1 + .../Model/Resource/Country/Collection.php | 1 + .../Directory/Model/Resource/Currency.php | 1 + .../Product/Edit/Tab/Downloadable/Links.php | 6 ++++++ .../Product/Edit/Tab/Downloadable/Samples.php | 1 + .../Block/Catalog/Product/Links.php | 4 ++++ .../Block/Catalog/Product/Samples.php | 1 + .../Block/Checkout/Cart/Item/Renderer.php | 1 + .../Downloadable/Block/Checkout/Success.php | 1 + .../Block/Customer/Products/ListProducts.php | 1 + .../Downloadable/Controller/Download/Link.php | 4 ++++ .../Controller/Download/LinkSample.php | 1 + .../Controller/Download/Sample.php | 1 + app/code/Magento/Downloadable/Helper/Data.php | 1 + .../Magento/Downloadable/Helper/Download.php | 2 ++ .../Magento/Downloadable/Model/Observer.php | 5 +++++ .../Downloadable/Model/Product/Type.php | 8 +++++++ .../Downloadable/Model/Resource/Link.php | 1 + .../Sales/Order/Pdf/Items/AbstractItems.php | 2 ++ .../Sales/Order/Pdf/Items/Creditmemo.php | 1 + .../Model/Sales/Order/Pdf/Items/Invoice.php | 2 ++ .../Eav/Api/Data/AttributeInterface.php | 1 + .../Attribute/Edit/Main/AbstractMain.php | 1 + .../Eav/Model/Attribute/Data/AbstractData.php | 4 ++++ .../Magento/Eav/Model/Attribute/Data/Date.php | 2 ++ .../Magento/Eav/Model/Attribute/Data/File.php | 4 ++++ .../Eav/Model/Attribute/Data/Image.php | 2 ++ .../Magento/Eav/Model/Attribute/Data/Text.php | 2 ++ .../Magento/Eav/Model/AttributeRepository.php | 3 +++ .../Eav/Model/AttributeSetRepository.php | 3 +++ app/code/Magento/Eav/Model/Config.php | 5 +++++ .../Eav/Model/Entity/AbstractEntity.php | 18 ++++++++++++++++ .../Magento/Eav/Model/Entity/Attribute.php | 6 ++++++ .../Entity/Attribute/AbstractAttribute.php | 8 +++++++ .../Attribute/Backend/AbstractBackend.php | 2 ++ .../Eav/Model/Entity/Attribute/Set.php | 7 +++++++ .../Attribute/Source/AbstractSource.php | 3 +++ .../Entity/Collection/AbstractCollection.php | 12 +++++++++++ app/code/Magento/Eav/Model/Entity/Setup.php | 6 ++++++ .../Eav/Model/Entity/Setup/Context.php | 1 + app/code/Magento/Eav/Model/Form.php | 3 +++ .../Magento/Eav/Model/Resource/Attribute.php | 1 + .../Eav/Model/Resource/Entity/Attribute.php | 1 + .../Eav/Model/Resource/Form/Fieldset.php | 2 ++ app/code/Magento/Fedex/Model/Carrier.php | 14 +++++++++++++ .../GiftMessage/Block/Message/Inline.php | 2 ++ .../Magento/GiftMessage/Helper/Message.php | 5 +++++ .../GiftMessage/Model/GiftMessageManager.php | 1 + app/code/Magento/GiftMessage/Model/Save.php | 2 ++ .../Category/Edit/Tab/Googleoptimizer.php | 3 +++ .../Block/Adminhtml/Types/Edit/Form.php | 1 + .../Adminhtml/Googleshopping/Types/Save.php | 1 + .../Magento/GoogleShopping/Helper/Data.php | 1 + .../GoogleShopping/Model/Attribute.php | 1 + .../Model/Attribute/ContentLanguage.php | 1 + .../Model/Attribute/DefaultAttribute.php | 3 +++ .../Model/Attribute/Destinations.php | 1 + .../Model/Attribute/GoogleProductCategory.php | 1 + .../Model/Attribute/ImageLink.php | 1 + .../GoogleShopping/Model/Attribute/Link.php | 1 + .../Model/Attribute/ProductType.php | 1 + .../Attribute/SalePriceEffectiveDate.php | 2 ++ .../Model/Attribute/TargetCountry.php | 1 + .../GoogleShopping/Model/Attribute/Tax.php | 2 ++ .../Magento/GoogleShopping/Model/Config.php | 3 +++ .../GoogleShopping/Model/MassOperations.php | 6 ++++++ .../Magento/GoogleShopping/Model/Observer.php | 1 + .../Model/Resource/Attribute/Collection.php | 1 + .../Magento/GoogleShopping/Model/Type.php | 2 ++ .../Block/Adminhtml/Export/Filter.php | 2 ++ .../Model/Export/AbstractEntity.php | 2 ++ .../Model/Export/Adapter/AbstractAdapter.php | 1 + .../Model/Export/Entity/AbstractEav.php | 2 ++ .../Model/Export/Entity/AbstractEntity.php | 3 +++ .../Magento/ImportExport/Model/Import.php | 2 ++ .../Model/Import/AbstractEntity.php | 6 ++++++ .../Model/Import/Entity/AbstractEav.php | 2 ++ .../Model/Import/Entity/AbstractEntity.php | 5 +++++ .../Model/Processor/InvalidateCache.php | 1 + app/code/Magento/Log/Model/Aggregation.php | 3 +++ app/code/Magento/Log/Model/Cron.php | 1 + app/code/Magento/Log/Model/Resource/Log.php | 1 + .../Log/Model/Resource/Visitor/Collection.php | 1 + .../Log/Model/Resource/Visitor/Online.php | 1 + app/code/Magento/Log/Model/Visitor.php | 1 + .../Multishipping/Block/Checkout/Overview.php | 1 + .../Multishipping/Controller/Checkout.php | 3 +++ .../Controller/Checkout/OverviewPost.php | 1 + .../Model/Checkout/Type/Multishipping.php | 9 ++++++++ .../Checkout/Type/Multishipping/State.php | 1 + .../Newsletter/Block/Adminhtml/Problem.php | 2 ++ .../Newsletter/Block/Adminhtml/Queue/Edit.php | 5 +++++ .../Block/Adminhtml/Queue/Edit/Form.php | 3 +++ .../Block/Adminhtml/Queue/Preview/Form.php | 1 + .../Block/Adminhtml/Template/Edit.php | 3 +++ .../Block/Adminhtml/Template/Edit/Form.php | 2 ++ .../Block/Adminhtml/Template/Preview/Form.php | 1 + .../Controller/Adminhtml/Queue/Save.php | 1 + app/code/Magento/Newsletter/Model/Queue.php | 4 ++++ .../Model/Resource/Subscriber/Collection.php | 1 + .../Magento/Newsletter/Model/Subscriber.php | 1 + .../Magento/Newsletter/Model/Template.php | 3 +++ .../Model/Carrier/Flatrate.php | 2 ++ .../OfflineShipping/Model/Carrier/Pickup.php | 1 + .../Model/Carrier/Tablerate.php | 4 ++++ .../Model/Quote/Freeshipping.php | 1 + .../Model/Resource/Carrier/Tablerate.php | 8 +++++++ .../App/FrontController/BuiltinPlugin.php | 1 + .../App/FrontController/VarnishPlugin.php | 1 + .../Model/Controller/Result/BuiltinPlugin.php | 1 + app/code/Magento/Payment/Block/Form/Cc.php | 1 + app/code/Magento/Payment/Block/Info.php | 1 + app/code/Magento/Payment/Helper/Data.php | 3 +++ .../Payment/Model/Method/AbstractMethod.php | 12 +++++++++++ app/code/Magento/Persistent/Helper/Data.php | 2 ++ .../Model/Observer/ClearExpiredCronJob.php | 1 + .../Observer/CustomerAuthenticatedEvent.php | 1 + .../Persistent/Model/Observer/Session.php | 1 + .../Model/Observer/SetLoadPersistentQuote.php | 1 + app/code/Magento/Persistent/Model/Session.php | 2 ++ app/code/Magento/ProductAlert/Model/Email.php | 4 ++++ .../Magento/ProductAlert/Model/Observer.php | 6 ++++++ .../Model/Resource/AbstractResource.php | 1 + .../Adminhtml/Config/Form/Field/YtdStart.php | 1 + .../Reports/Block/Adminhtml/Filter/Form.php | 1 + .../Magento/Reports/Block/Adminhtml/Grid.php | 4 ++++ .../Block/Adminhtml/Grid/AbstractGrid.php | 3 +++ .../Block/Adminhtml/Product/Viewed/Grid.php | 1 + .../Adminhtml/Sales/Bestsellers/Grid.php | 1 + .../Block/Adminhtml/Sales/Coupons/Grid.php | 2 ++ .../Block/Adminhtml/Sales/Invoiced/Grid.php | 1 + .../Block/Adminhtml/Sales/Refunded/Grid.php | 1 + .../Block/Adminhtml/Sales/Sales/Grid.php | 2 ++ .../Block/Adminhtml/Sales/Shipping/Grid.php | 1 + .../Block/Adminhtml/Sales/Tax/Grid.php | 2 ++ .../Adminhtml/Shopcart/Abandoned/Grid.php | 2 ++ .../Adminhtml/Shopcart/Customer/Grid.php | 1 + .../Block/Adminhtml/Shopcart/Product/Grid.php | 1 + .../Controller/Adminhtml/Report/Sales.php | 3 +++ app/code/Magento/Reports/Helper/Data.php | 1 + .../Magento/Reports/Model/Event/Observer.php | 4 ++++ app/code/Magento/Reports/Model/Item.php | 1 + .../Model/Product/Index/AbstractIndex.php | 1 + .../Reports/Model/Product/Index/Compared.php | 1 + .../Summary/Collection/AbstractCollection.php | 2 ++ .../Magento/Reports/Model/Resource/Event.php | 2 ++ .../Model/Resource/Order/Collection.php | 5 +++++ .../Model/Resource/Product/Collection.php | 3 +++ .../Index/Collection/AbstractCollection.php | 3 +++ .../Resource/Product/Lowstock/Collection.php | 3 +++ .../Model/Resource/Report/AbstractReport.php | 2 ++ .../Model/Resource/Report/Product/Viewed.php | 1 + .../Report/Product/Viewed/Collection.php | 6 ++++++ .../Resource/Review/Customer/Collection.php | 1 + .../Resource/Shopcart/Product/Collection.php | 1 + app/code/Magento/Reports/Model/Totals.php | 2 ++ .../Review/Block/Adminhtml/Add/Form.php | 1 + .../Magento/Review/Block/Adminhtml/Edit.php | 1 + .../Review/Block/Adminhtml/Edit/Form.php | 1 + .../Magento/Review/Block/Adminhtml/Grid.php | 1 + .../Adminhtml/Product/Edit/Tab/Reviews.php | 3 +++ .../Review/Block/Adminhtml/Product/Grid.php | 1 + .../Block/Adminhtml/Rating/Detailed.php | 1 + .../Block/Adminhtml/Rating/Edit/Tab/Form.php | 3 +++ app/code/Magento/Review/Block/Form.php | 2 ++ .../Magento/Review/Block/Product/View.php | 2 ++ .../Controller/Adminhtml/Product/Save.php | 1 + .../Magento/Review/Controller/Product.php | 2 ++ .../Review/Controller/Product/Post.php | 1 + app/code/Magento/Review/Helper/Data.php | 1 + .../Magento/Review/Model/Resource/Rating.php | 1 + .../Resource/Review/Product/Collection.php | 2 ++ app/code/Magento/Review/Model/Review.php | 2 ++ app/code/Magento/Rule/Model/AbstractModel.php | 4 ++++ .../Rule/Model/Action/AbstractAction.php | 1 + .../Model/Condition/AbstractCondition.php | 9 ++++++++ .../Magento/Rule/Model/Condition/Combine.php | 1 + .../Condition/Product/AbstractProduct.php | 9 ++++++++ .../Rule/Model/Condition/Sql/Builder.php | 1 + .../Block/Adminhtml/Order/Address/Form.php | 2 ++ .../Adminhtml/Order/Create/AbstractCreate.php | 1 + .../Order/Create/Billing/Address.php | 1 + .../Block/Adminhtml/Order/Create/Form.php | 1 + .../Order/Create/Form/AbstractForm.php | 2 ++ .../Adminhtml/Order/Create/Form/Account.php | 1 + .../Adminhtml/Order/Create/Form/Address.php | 1 + .../Adminhtml/Order/Create/Items/Grid.php | 3 +++ .../Order/Create/Shipping/Address.php | 4 ++++ .../Order/Create/Sidebar/AbstractSidebar.php | 2 ++ .../Block/Adminhtml/Order/Create/Totals.php | 1 + .../Order/Create/Totals/Discount.php | 1 + .../Order/Create/Totals/Grandtotal.php | 1 + .../Order/Create/Totals/Shipping.php | 1 + .../Order/Create/Totals/Subtotal.php | 1 + .../Adminhtml/Order/Create/Totals/Tax.php | 1 + .../Adminhtml/Order/Invoice/Create/Items.php | 1 + .../Block/Adminhtml/Order/Invoice/View.php | 2 ++ .../Adminhtml/Order/Status/Edit/Form.php | 1 + .../Sales/Block/Adminhtml/Order/View.php | 3 +++ .../Block/Adminhtml/Report/Filter/Form.php | 1 + .../Adminhtml/Report/Filter/Form/Coupon.php | 1 + .../Adminhtml/Report/Filter/Form/Order.php | 2 ++ .../Config/Form/Fieldset/Order/Statuses.php | 1 + .../Sales/Block/Items/AbstractItems.php | 3 +++ .../Order/Item/Renderer/DefaultRenderer.php | 1 + app/code/Magento/Sales/Block/Order/Totals.php | 1 + .../Sales/Block/Status/Grid/Column/State.php | 1 + .../Block/Status/Grid/Column/Unassign.php | 1 + .../Creditmemo/AbstractCreditmemo/View.php | 1 + .../Sales/Controller/Adminhtml/Order.php | 2 ++ .../Controller/Adminhtml/Order/Create.php | 4 ++++ .../Adminhtml/Order/Create/Save.php | 1 + .../Adminhtml/Order/Creditmemo/Save.php | 2 ++ .../Adminhtml/Order/CreditmemoLoader.php | 2 ++ .../Adminhtml/Order/Invoice/Save.php | 3 +++ .../Controller/Adminhtml/Order/Pdfdocs.php | 1 + .../Shipment/AbstractShipment/View.php | 1 + .../Download/DownloadCustomOption.php | 2 ++ .../Order/Plugin/Authentication.php | 1 + app/code/Magento/Sales/Helper/Guest.php | 1 + .../Magento/Sales/Model/AdminOrder/Create.php | 18 ++++++++++++++++ .../Magento/Sales/Model/Config/Converter.php | 1 + .../Magento/Sales/Model/Convert/Order.php | 3 +++ .../Magento/Sales/Model/Convert/Quote.php | 1 + app/code/Magento/Sales/Model/Order.php | 12 +++++++++++ .../Magento/Sales/Model/Order/Address.php | 2 ++ .../Magento/Sales/Model/Order/Builder.php | 3 +++ .../Magento/Sales/Model/Order/Creditmemo.php | 5 +++++ .../Sales/Model/Order/Creditmemo/Comment.php | 1 + .../Order/Creditmemo/Total/AbstractTotal.php | 1 + .../Magento/Sales/Model/Order/Customer.php | 1 + .../Magento/Sales/Model/Order/Invoice.php | 5 +++++ .../Sales/Model/Order/Invoice/Comment.php | 1 + .../Order/Invoice/Total/AbstractTotal.php | 1 + .../Sales/Model/Order/Invoice/Total/Tax.php | 1 + app/code/Magento/Sales/Model/Order/Item.php | 8 +++++++ .../Magento/Sales/Model/Order/Payment.php | 14 +++++++++++++ .../Sales/Model/Order/Payment/Transaction.php | 8 +++++++ .../Sales/Model/Order/Pdf/AbstractPdf.php | 10 +++++++++ .../Sales/Model/Order/Pdf/Creditmemo.php | 1 + .../Magento/Sales/Model/Order/Pdf/Invoice.php | 1 + .../Model/Order/Pdf/Items/AbstractItems.php | 1 + .../Sales/Model/Order/Pdf/Shipment.php | 1 + .../Model/Order/Pdf/Total/DefaultTotal.php | 1 + .../Magento/Sales/Model/Order/Shipment.php | 2 ++ .../Sales/Model/Order/Shipment/Comment.php | 1 + .../Sales/Model/Order/Shipment/Track.php | 1 + .../Sales/Model/Order/Status/History.php | 1 + app/code/Magento/Sales/Model/Quote.php | 15 +++++++++++++ .../Magento/Sales/Model/Quote/Address.php | 11 ++++++++++ .../Quote/Address/Total/AbstractTotal.php | 3 +++ .../Model/Quote/Address/Total/Collector.php | 1 + .../Model/Quote/Address/Total/Discount.php | 1 + .../Model/Quote/Address/Total/Shipping.php | 3 +++ .../Sales/Model/Quote/Address/Total/Tax.php | 3 +++ app/code/Magento/Sales/Model/Quote/Item.php | 1 + .../Sales/Model/Quote/Item/AbstractItem.php | 1 + .../Sales/Model/Quote/Item/Updater.php | 1 + .../Magento/Sales/Model/Quote/Payment.php | 1 + .../QuoteRepository/Plugin/Authorization.php | 2 ++ .../Collection/AbstractCollection.php | 1 + .../Magento/Sales/Model/Resource/Entity.php | 1 + .../Model/Resource/Order/Grid/Collection.php | 1 + .../Model/Resource/Order/Handler/State.php | 2 ++ .../Resource/Order/Plugin/Authorization.php | 1 + .../Sales/Model/Resource/Order/Status.php | 1 + .../Quote/Address/Attribute/Backend.php | 1 + .../Quote/Address/Attribute/Frontend.php | 1 + .../Model/Resource/Quote/Item/Collection.php | 1 + .../Model/Resource/Report/Bestsellers.php | 2 ++ .../Report/Bestsellers/Collection.php | 3 +++ .../Sales/Model/Resource/Report/Invoiced.php | 1 + .../Model/Resource/Report/Order/Createdat.php | 2 ++ .../Sales/Model/Resource/Report/Refunded.php | 1 + .../Sales/Model/Resource/Report/Shipping.php | 1 + .../Magento/Sales/Model/Resource/Setup.php | 2 ++ .../Magento/Sales/Model/Service/Order.php | 5 +++++ .../Magento/Sales/Model/Service/Quote.php | 4 ++++ .../Promo/Quote/Edit/Tab/Actions.php | 1 + .../Promo/Quote/Edit/Tab/Coupons/Form.php | 1 + .../Adminhtml/Promo/Quote/Edit/Tab/Main.php | 2 ++ .../Controller/Adminhtml/Promo/Quote/Edit.php | 1 + .../Controller/Adminhtml/Promo/Quote/Save.php | 2 ++ app/code/Magento/SalesRule/Model/Observer.php | 4 ++++ .../SalesRule/Model/Quote/Discount.php | 1 + .../Model/Resource/Report/Rule/Createdat.php | 1 + app/code/Magento/SalesRule/Model/Rule.php | 5 +++++ .../Model/Rule/Condition/Product/Found.php | 1 + .../Magento/SalesRule/Model/RulesApplier.php | 1 + app/code/Magento/SalesRule/Model/Utility.php | 3 +++ .../Magento/SalesRule/Model/Validator.php | 3 +++ .../Search/Block/Adminhtml/Dashboard/Last.php | 1 + .../Search/Block/Adminhtml/Dashboard/Top.php | 1 + .../Search/Block/Adminhtml/Term/Edit/Form.php | 1 + .../Search/Controller/Adminhtml/Term/Edit.php | 1 + .../Search/Controller/Adminhtml/Term/Save.php | 1 + app/code/Magento/Search/Helper/Data.php | 1 + app/code/Magento/Search/Model/Query.php | 1 + .../Magento/Search/Model/Resource/Helper.php | 1 + .../Controller/Product/Sendmail.php | 1 + .../Magento/Sendfriend/Model/Observer.php | 1 + .../Sendfriend/Model/Resource/Sendfriend.php | 1 + .../Magento/Sendfriend/Model/Sendfriend.php | 5 +++++ .../Shipping/Block/Adminhtml/View/Form.php | 1 + .../Magento/Shipping/Block/Tracking/Popup.php | 1 + .../Order/Shipment/MassPrintShippingLabel.php | 1 + .../Adminhtml/Order/Shipment/Save.php | 2 ++ .../Model/Carrier/AbstractCarrier.php | 7 +++++++ .../Model/Carrier/AbstractCarrierOnline.php | 6 ++++++ .../Shipping/Model/Order/Pdf/Packaging.php | 7 +++++++ .../Magento/Shipping/Model/Rate/Result.php | 1 + app/code/Magento/Shipping/Model/Shipping.php | 7 +++++++ .../Model/Shipping/LabelGenerator.php | 3 +++ .../Shipping/Model/Shipping/Labels.php | 4 ++++ .../Controller/Adminhtml/Sitemap/Edit.php | 1 + .../Controller/Adminhtml/Sitemap/Save.php | 1 + app/code/Magento/Sitemap/Model/Observer.php | 2 ++ .../Model/Resource/Catalog/Product.php | 1 + app/code/Magento/Sitemap/Model/Sitemap.php | 3 +++ .../Store/App/Action/Plugin/Context.php | 1 + .../Store/Model/Resource/Group/Collection.php | 1 + .../Store/Model/Resource/Store/Collection.php | 1 + .../Model/Resource/Website/Collection.php | 1 + app/code/Magento/Store/Model/Storage/Db.php | 8 +++++++ .../Magento/Store/Model/StorageFactory.php | 3 +++ app/code/Magento/Store/Model/Store.php | 8 +++++++ app/code/Magento/Store/Model/System/Store.php | 4 ++++ app/code/Magento/Store/Model/Website.php | 3 +++ .../Api/Data/QuoteDetailsItemInterface.php | 1 + .../Magento/Tax/Block/Adminhtml/Rate/Form.php | 7 +++++++ .../Tax/Block/Adminhtml/Rule/Edit/Form.php | 3 +++ .../Block/Checkout/Cart/Sidebar/Totals.php | 3 +++ .../Magento/Tax/Block/Sales/Order/Tax.php | 1 + .../Magento/Tax/Controller/Adminhtml/Rule.php | 1 + app/code/Magento/Tax/Helper/Data.php | 4 ++++ app/code/Magento/Tax/Model/Calculation.php | 6 ++++++ .../Model/Calculation/AbstractCalculator.php | 3 +++ .../Magento/Tax/Model/Calculation/Rate.php | 4 ++++ .../Tax/Model/Calculation/RateRepository.php | 3 +++ .../Magento/Tax/Model/Calculation/Rule.php | 1 + .../Tax/Model/Calculation/Rule/Validator.php | 3 +++ app/code/Magento/Tax/Model/Config.php | 6 ++++++ app/code/Magento/Tax/Model/Observer.php | 4 ++++ .../Tax/Model/Resource/Calculation.php | 5 +++++ .../Sales/Total/Quote/CommonTaxCollector.php | 3 +++ .../Tax/Model/Sales/Total/Quote/Tax.php | 3 +++ app/code/Magento/Tax/Model/TaxCalculation.php | 3 +++ .../Magento/Tax/Model/TaxClass/Repository.php | 3 +++ .../Magento/Tax/Model/TaxRuleRepository.php | 3 +++ .../Model/Rate/CsvImportHandler.php | 1 + .../Translation/Model/Inline/Parser.php | 2 ++ .../Translation/Model/Js/DataProvider.php | 1 + .../Magento/Ui/Component/AbstractView.php | 2 ++ .../Magento/Ui/Component/Filter/Type/Date.php | 2 ++ app/code/Magento/Ui/Component/Form.php | 2 ++ .../Form/Element/AbstractFormElement.php | 1 + .../Form/Element/ElementInterface.php | 1 + .../Ui/Component/Form/Element/Radio.php | 1 + .../Ui/Component/Form/Element/Select.php | 1 + .../Magento/Ui/Component/Form/Fieldset.php | 1 + .../Ui/Component/Layout/AbstractStructure.php | 4 ++++ app/code/Magento/Ui/Component/Listing.php | 1 + .../Ui/DataProvider/Config/Converter.php | 3 +++ app/code/Magento/Ui/DataProvider/Manager.php | 1 + app/code/Magento/Ui/DataProvider/Metadata.php | 3 +++ app/code/Magento/Ups/Helper/Config.php | 1 + app/code/Magento/Ups/Model/Carrier.php | 16 ++++++++++++++ .../Model/Config/Source/OriginShipment.php | 1 + .../Ups/Model/Config/Source/Unitofmeasure.php | 1 + .../UrlRewrite/Block/Catalog/Product/Grid.php | 1 + .../UrlRewrite/Block/Cms/Page/Grid.php | 1 + .../User/Controller/Adminhtml/User/Save.php | 2 ++ app/code/Magento/User/Model/Resource/User.php | 1 + .../Tab/General/Shipping/Packaging/Plugin.php | 2 ++ app/code/Magento/Usps/Model/Carrier.php | 19 +++++++++++++++++ app/code/Magento/Weee/Helper/Data.php | 1 + .../Weee/Model/Attribute/Backend/Weee/Tax.php | 1 + app/code/Magento/Weee/Model/Observer.php | 4 ++++ app/code/Magento/Weee/Model/Tax.php | 6 ++++++ .../Weee/Model/Total/Creditmemo/Weee.php | 4 ++++ .../Magento/Weee/Model/Total/Invoice/Weee.php | 3 +++ .../Magento/Weee/Model/Total/Quote/Weee.php | 2 ++ .../Weee/Model/Total/Quote/WeeeTax.php | 2 ++ .../Widget/Block/Adminhtml/Widget/Chooser.php | 1 + .../Widget/Instance/Edit/Tab/Main.php | 1 + .../Widget/Instance/Edit/Tab/Main/Layout.php | 1 + .../Widget/Instance/Edit/Tab/Properties.php | 3 +++ .../Widget/Block/Adminhtml/Widget/Options.php | 2 ++ .../Widget/Model/NamespaceResolver.php | 2 ++ .../Magento/Widget/Model/Template/Filter.php | 2 ++ app/code/Magento/Widget/Model/Widget.php | 2 ++ .../Magento/Widget/Model/Widget/Instance.php | 7 +++++++ .../Magento/Wishlist/Block/AbstractBlock.php | 1 + .../Wishlist/Block/Customer/Sidebar.php | 1 + .../Magento/Wishlist/Controller/Index/Add.php | 3 +++ .../Wishlist/Controller/Index/Cart.php | 5 +++++ .../Controller/Index/DownloadCustomOption.php | 2 ++ .../Wishlist/Controller/Index/Fromcart.php | 1 + .../Wishlist/Controller/Index/Send.php | 6 ++++++ .../Wishlist/Controller/Index/Update.php | 2 ++ .../Wishlist/Controller/WishlistProvider.php | 1 + app/code/Magento/Wishlist/Helper/Data.php | 1 + app/code/Magento/Wishlist/Helper/Rss.php | 4 ++++ app/code/Magento/Wishlist/Model/Item.php | 2 ++ .../Magento/Wishlist/Model/ItemCarrier.php | 6 ++++++ app/code/Magento/Wishlist/Model/Observer.php | 3 +++ .../Model/Resource/Item/Collection.php | 2 ++ .../Model/Resource/Item/Collection/Grid.php | 3 +++ app/code/Magento/Wishlist/Model/Wishlist.php | 6 ++++++ 735 files changed, 1946 insertions(+) diff --git a/app/code/Magento/AdminNotification/Model/Observer.php b/app/code/Magento/AdminNotification/Model/Observer.php index ab7c5de87ba..6a56cfdfbe5 100644 --- a/app/code/Magento/AdminNotification/Model/Observer.php +++ b/app/code/Magento/AdminNotification/Model/Observer.php @@ -38,6 +38,7 @@ class Observer * * @param \Magento\Framework\Event\Observer $observer * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function preDispatch(\Magento\Framework\Event\Observer $observer) { diff --git a/app/code/Magento/AdminNotification/Model/Resource/Inbox.php b/app/code/Magento/AdminNotification/Model/Resource/Inbox.php index 9075e975839..d4db2049646 100644 --- a/app/code/Magento/AdminNotification/Model/Resource/Inbox.php +++ b/app/code/Magento/AdminNotification/Model/Resource/Inbox.php @@ -57,6 +57,7 @@ class Inbox extends \Magento\Framework\Model\Resource\Db\AbstractDb * * @param \Magento\AdminNotification\Model\Inbox $object * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getNoticeStatus(\Magento\AdminNotification\Model\Inbox $object) { @@ -86,6 +87,7 @@ class Inbox extends \Magento\Framework\Model\Resource\Db\AbstractDb * @param \Magento\AdminNotification\Model\Inbox $object * @param array $data * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function parse(\Magento\AdminNotification\Model\Inbox $object, array $data) { diff --git a/app/code/Magento/Authorization/Model/Acl/AclRetriever.php b/app/code/Magento/Authorization/Model/Acl/AclRetriever.php index bbe4491d5cf..ffe8ee789d6 100644 --- a/app/code/Magento/Authorization/Model/Acl/AclRetriever.php +++ b/app/code/Magento/Authorization/Model/Acl/AclRetriever.php @@ -16,6 +16,7 @@ use Psr\Log\LoggerInterface as Logger; /** * Permission tree retriever + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AclRetriever { diff --git a/app/code/Magento/Backend/App/Action.php b/app/code/Magento/Backend/App/Action.php index 3fca0cbd88c..0f35f667440 100644 --- a/app/code/Magento/Backend/App/Action.php +++ b/app/code/Magento/Backend/App/Action.php @@ -8,6 +8,9 @@ */ namespace Magento\Backend\App; +/** + * @SuppressWarnings(PHPMD.NumberOfChildren) + */ class Action extends \Magento\Backend\App\AbstractAction { } diff --git a/app/code/Magento/Backend/App/Action/Context.php b/app/code/Magento/Backend/App/Action/Context.php index 400c3574ff9..3cad615401f 100644 --- a/app/code/Magento/Backend/App/Action/Context.php +++ b/app/code/Magento/Backend/App/Action/Context.php @@ -6,6 +6,7 @@ namespace Magento\Backend\App\Action; /** * Backend Controller context + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Context extends \Magento\Framework\App\Action\Context { @@ -67,6 +68,7 @@ class Context extends \Magento\Framework\App\Action\Context * @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param bool $canUseBaseUrl + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\RequestInterface $request, @@ -135,6 +137,7 @@ class Context extends \Magento\Framework\App\Action\Context /** * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCanUseBaseUrl() { diff --git a/app/code/Magento/Backend/App/DefaultPath.php b/app/code/Magento/Backend/App/DefaultPath.php index 3b66a0d0655..2dd5c2a2810 100644 --- a/app/code/Magento/Backend/App/DefaultPath.php +++ b/app/code/Magento/Backend/App/DefaultPath.php @@ -15,6 +15,7 @@ class DefaultPath implements \Magento\Framework\App\DefaultPathInterface /** * @param \Magento\Backend\App\ConfigInterface $config + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function __construct(\Magento\Backend\App\ConfigInterface $config) { diff --git a/app/code/Magento/Backend/Block/Dashboard/Graph.php b/app/code/Magento/Backend/Block/Dashboard/Graph.php index 93add0bb0aa..eaa95f5ff62 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Graph.php +++ b/app/code/Magento/Backend/Block/Dashboard/Graph.php @@ -185,6 +185,10 @@ class Graph extends \Magento\Backend\Block\Dashboard\AbstractDashboard * * @param bool $directUrl * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getChartUrl($directUrl = true) { diff --git a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php index ab8cc958173..1ee9d3368b0 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php +++ b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php @@ -8,6 +8,7 @@ namespace Magento\Backend\Block\Dashboard\Orders; * Adminhtml dashboard recent orders grid * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Backend\Block\Dashboard\Grid { diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php index 823e1d06f72..334ef2b0e76 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php @@ -8,6 +8,7 @@ namespace Magento\Backend\Block\Dashboard\Tab\Customers; * Adminhtml dashboard most active buyers * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Most extends \Magento\Backend\Block\Dashboard\Grid { diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php index 262e590c3a2..33c6e5305e9 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php @@ -8,6 +8,7 @@ namespace Magento\Backend\Block\Dashboard\Tab\Customers; * Adminhtml dashboard most recent customers grid * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Newest extends \Magento\Backend\Block\Dashboard\Grid { diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php index 98d881edbe9..f566daf358b 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php @@ -8,6 +8,7 @@ namespace Magento\Backend\Block\Dashboard\Tab\Products; * Adminhtml dashboard most ordered products grid * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Ordered extends \Magento\Backend\Block\Dashboard\Grid { diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php index 7fdd30ab3de..665c5de9161 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php @@ -8,6 +8,7 @@ namespace Magento\Backend\Block\Dashboard\Tab\Products; * Adminhtml dashboard most viewed products grid * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Viewed extends \Magento\Backend\Block\Dashboard\Grid { diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field.php b/app/code/Magento/Backend/Block/System/Config/Form/Field.php index b2cec8e2eab..f97740950c7 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field.php @@ -13,6 +13,7 @@ namespace Magento\Backend\Block\System\Config\Form; /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Field extends \Magento\Backend\Block\Template implements \Magento\Framework\Data\Form\Element\Renderer\RendererInterface { diff --git a/app/code/Magento/Backend/Block/Widget/Button/ButtonList.php b/app/code/Magento/Backend/Block/Widget/Button/ButtonList.php index d65978892ea..6c0e46c1cb2 100644 --- a/app/code/Magento/Backend/Block/Widget/Button/ButtonList.php +++ b/app/code/Magento/Backend/Block/Widget/Button/ButtonList.php @@ -34,6 +34,7 @@ class ButtonList * @param integer $sortOrder * @param string|null $region That button should be displayed in ('toolbar', 'header', 'footer', null) * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function add($buttonId, $data, $level = 0, $sortOrder = 0, $region = 'toolbar') { diff --git a/app/code/Magento/Backend/Block/Widget/Form/Container.php b/app/code/Magento/Backend/Block/Widget/Form/Container.php index 909bd357a7d..cc924eb6fe0 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Container.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Container.php @@ -8,6 +8,7 @@ namespace Magento\Backend\Block\Widget\Form; * Backend form container block * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Container extends \Magento\Backend\Block\Widget\Container { diff --git a/app/code/Magento/Backend/Block/Widget/Grid.php b/app/code/Magento/Backend/Block/Widget/Grid.php index 1d795fd631a..f089a3e0603 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid.php +++ b/app/code/Magento/Backend/Block/Widget/Grid.php @@ -9,6 +9,7 @@ namespace Magento\Backend\Block\Widget; * * @method string getRowClickCallback() getRowClickCallback() * @method \Magento\Backend\Block\Widget\Grid setRowClickCallback() setRowClickCallback(string $value) + * @SuppressWarnings(PHPMD.TooManyFields) */ class Grid extends \Magento\Backend\Block\Widget { @@ -145,6 +146,7 @@ class Grid extends \Magento\Backend\Block\Widget /** * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _construct() { @@ -330,6 +332,7 @@ class Grid extends \Magento\Backend\Block\Widget * Apply sorting and filtering to collection * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareCollection() { @@ -577,6 +580,7 @@ class Grid extends \Magento\Backend\Block\Widget * Return visibility of pager * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getPagerVisibility() { @@ -598,6 +602,7 @@ class Grid extends \Magento\Backend\Block\Widget * Return visibility of message blocks * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getMessageBlockVisibility() { @@ -760,6 +765,7 @@ class Grid extends \Magento\Backend\Block\Widget * Return count totals * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCountTotals() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column.php b/app/code/Magento/Backend/Block/Widget/Grid/Column.php index 21a64e49faa..bf6ec395a97 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column.php @@ -231,6 +231,7 @@ class Column extends \Magento\Backend\Block\Widget /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getSortable() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Store.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Store.php index 8cdd868a744..330510f558b 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Store.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Store.php @@ -36,6 +36,8 @@ class Store extends \Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFil * Render HTML of the element * * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getHtml() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php index 60ab490595c..552e17df9aa 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php @@ -9,6 +9,7 @@ use Magento\Framework\Object; /** * Backend grid item abstract renderer + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractRenderer extends \Magento\Backend\Block\AbstractBlock implements RendererInterface { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php index 410f2e3854f..33630b4a59a 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php @@ -115,6 +115,8 @@ class Action extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Text * @param string &$actionCaption * @param \Magento\Framework\Object $row * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _transformActionData(&$action, &$actionCaption, \Magento\Framework\Object $row) { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php index d18e27bd75a..378c7bcedf5 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php @@ -69,6 +69,8 @@ class Checkbox extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Abstra * * @param \Magento\Framework\Object $row * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function render(\Magento\Framework\Object $row) { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Options.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Options.php index 87a3ab23d8e..433dedfd5b7 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Options.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Options.php @@ -26,6 +26,7 @@ class Options extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Text * * @param \Magento\Framework\Object $row * @return string|void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function render(\Magento\Framework\Object $row) { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Store.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Store.php index ee47da4f0d5..e80367cc636 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Store.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Store.php @@ -52,6 +52,7 @@ class Store extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractR * Retrieve 'show all stores label' flag * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ protected function _getShowAllStoresLabelFlag() { @@ -66,6 +67,7 @@ class Store extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractR * Retrieve 'show empty stores label' flag * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ protected function _getShowEmptyStoresLabelFlag() { @@ -81,6 +83,8 @@ class Store extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractR * * @param \Magento\Framework\Object $row * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function render(\Magento\Framework\Object $row) { @@ -131,6 +135,7 @@ class Store extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractR * * @param \Magento\Framework\Object $row * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function renderExport(\Magento\Framework\Object $row) { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/ColumnSet.php b/app/code/Magento/Backend/Block/Widget/Grid/ColumnSet.php index 343281001de..0393419a282 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/ColumnSet.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/ColumnSet.php @@ -100,6 +100,7 @@ class ColumnSet extends \Magento\Framework\View\Element\Template * @param \Magento\Backend\Model\Widget\Grid\SubTotals $subtotals * @param \Magento\Backend\Model\Widget\Grid\Totals $totals * @param array $data + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, @@ -485,6 +486,7 @@ class ColumnSet extends \Magento\Framework\View\Element\Template * Retrieve flag is collapsed * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsCollapsed() { @@ -527,6 +529,7 @@ class ColumnSet extends \Magento\Framework\View\Element\Template * Return count subtotals * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCountSubTotals() { @@ -549,6 +552,7 @@ class ColumnSet extends \Magento\Framework\View\Element\Template * Return count totals * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCountTotals() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Container.php b/app/code/Magento/Backend/Block/Widget/Grid/Container.php index fc923840eb9..8b034bf6623 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Container.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Container.php @@ -8,6 +8,7 @@ namespace Magento\Backend\Block\Widget\Grid; * Backend grid container block * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Container extends \Magento\Backend\Block\Widget\Container { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Export.php b/app/code/Magento/Backend/Block/Widget/Grid/Export.php index 248a1bf4027..5ec6857e3ab 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Export.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Export.php @@ -105,6 +105,7 @@ class Export extends \Magento\Backend\Block\Widget implements \Magento\Backend\B * Return count totals * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCountTotals() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Extended.php b/app/code/Magento/Backend/Block/Widget/Grid/Extended.php index 611e2d1af94..642719e3cb5 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Extended.php @@ -6,6 +6,12 @@ namespace Magento\Backend\Block\Widget\Grid; use Magento\Framework\App\Filesystem\DirectoryList; +/** + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.NumberOfChildren) + */ class Extended extends \Magento\Backend\Block\Widget\Grid implements \Magento\Backend\Block\Widget\Grid\ExportInterface { /** @@ -777,6 +783,7 @@ class Extended extends \Magento\Backend\Block\Widget\Grid implements \Magento\Ba * Return visibility of column headers * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getHeadersVisibility() { @@ -798,6 +805,7 @@ class Extended extends \Magento\Backend\Block\Widget\Grid implements \Magento\Ba * Return visibility of filter * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getFilterVisibility() { @@ -864,6 +872,7 @@ class Extended extends \Magento\Backend\Block\Widget\Grid implements \Magento\Ba * Retrieve flag is collapsed * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsCollapsed() { @@ -1242,6 +1251,7 @@ class Extended extends \Magento\Backend\Block\Widget\Grid implements \Magento\Ba * Return count subtotals * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCountSubTotals() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php index cb95460a476..a827a3b551a 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php @@ -294,6 +294,7 @@ abstract class AbstractMassaction extends \Magento\Backend\Block\Widget * Retrieve select all functionality flag check * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseSelectAll() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php index 4cba44195ff..07453f87e3c 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php @@ -305,6 +305,7 @@ class Extended extends \Magento\Backend\Block\Widget * Retrieve select all functionality flag check * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseSelectAll() { diff --git a/app/code/Magento/Backend/Block/Widget/Tabs.php b/app/code/Magento/Backend/Block/Widget/Tabs.php index b58495a86ac..5128c6f412e 100644 --- a/app/code/Magento/Backend/Block/Widget/Tabs.php +++ b/app/code/Magento/Backend/Block/Widget/Tabs.php @@ -8,6 +8,7 @@ use Magento\Backend\Block\Widget\Tab\TabInterface; /** * Tabs block + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Tabs extends \Magento\Backend\Block\Widget { @@ -105,6 +106,7 @@ class Tabs extends \Magento\Backend\Block\Widget * @param array|\Magento\Framework\Object|string $tab * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function addTab($tabId, $tab) { @@ -301,6 +303,7 @@ class Tabs extends \Magento\Backend\Block\Widget /** * @param \Magento\Framework\Object|TabInterface $tab * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getTabIsHidden($tab) { @@ -389,6 +392,7 @@ class Tabs extends \Magento\Backend\Block\Widget * @param string $tabOneId * @param string $tabTwoId * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function bindShadowTabs($tabOneId, $tabTwoId) { diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Config/System/Storage/Status.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Config/System/Storage/Status.php index fa14e28e5c5..dba0f827bd8 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Config/System/Storage/Status.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Config/System/Storage/Status.php @@ -28,6 +28,7 @@ class Status extends \Magento\Backend\Controller\Adminhtml\System\Config\System\ * Retrieve synchronize process state and it's parameters in json format * * @return \Magento\Framework\Controller\Result\JSON + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Store/EditStore.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Store/EditStore.php index 41ced9589d0..a454c7a7ae6 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Store/EditStore.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Store/EditStore.php @@ -9,6 +9,8 @@ class EditStore extends \Magento\Backend\Controller\Adminhtml\System\Store { /** * @return \Magento\Framework\Controller\ResultInterface + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Store/Save.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Store/Save.php index bf93b4c2558..cd4031a15fd 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Store/Save.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Store/Save.php @@ -10,6 +10,7 @@ class Save extends \Magento\Backend\Controller\Adminhtml\System\Store { /** * @return \Magento\Backend\Model\View\Result\Redirect + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Backend/Model/Auth/Session.php b/app/code/Magento/Backend/Model/Auth/Session.php index b14281e3c19..3c4f0fd9236 100644 --- a/app/code/Magento/Backend/Model/Auth/Session.php +++ b/app/code/Magento/Backend/Model/Auth/Session.php @@ -63,6 +63,7 @@ class Session extends \Magento\Framework\Session\SessionManager implements \Mage * @param \Magento\Framework\Acl\Builder $aclBuilder * @param \Magento\Backend\Model\UrlInterface $backendUrl * @param \Magento\Backend\App\ConfigInterface $config + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Request\Http $request, diff --git a/app/code/Magento/Backend/Model/Config.php b/app/code/Magento/Backend/Model/Config.php index 2d6b82c5f73..25a2b760aae 100644 --- a/app/code/Magento/Backend/Model/Config.php +++ b/app/code/Magento/Backend/Model/Config.php @@ -9,6 +9,7 @@ namespace Magento\Backend\Model; * Used to save configuration * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Config extends \Magento\Framework\Object { @@ -178,6 +179,9 @@ class Config extends \Magento\Framework\Object * @param \Magento\Framework\DB\Transaction $saveTransaction * @param \Magento\Framework\DB\Transaction $deleteTransaction * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _processGroup( $groupId, diff --git a/app/code/Magento/Backend/Model/Config/Structure/Converter.php b/app/code/Magento/Backend/Model/Config/Structure/Converter.php index 6430ef27265..41ab9804c6f 100644 --- a/app/code/Magento/Backend/Model/Config/Structure/Converter.php +++ b/app/code/Magento/Backend/Model/Config/Structure/Converter.php @@ -71,6 +71,8 @@ class Converter implements \Magento\Framework\Config\ConverterInterface * * @param \DOMNode $root * @return array|null + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _convertDOMDocument(\DOMNode $root) { diff --git a/app/code/Magento/Backend/Model/Locale/Resolver.php b/app/code/Magento/Backend/Model/Locale/Resolver.php index ce2c51b9049..b7b6dda8c4b 100644 --- a/app/code/Magento/Backend/Model/Locale/Resolver.php +++ b/app/code/Magento/Backend/Model/Locale/Resolver.php @@ -40,6 +40,7 @@ class Resolver extends \Magento\Framework\Locale\Resolver * @param \Magento\Framework\App\RequestInterface $request * @param \Magento\Framework\Locale\Validator $localeValidator * @param null $locale + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, diff --git a/app/code/Magento/Backend/Model/Menu/Config.php b/app/code/Magento/Backend/Model/Menu/Config.php index 19f9c2526a7..2f625157120 100644 --- a/app/code/Magento/Backend/Model/Menu/Config.php +++ b/app/code/Magento/Backend/Model/Menu/Config.php @@ -4,6 +4,9 @@ */ namespace Magento\Backend\Model\Menu; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Config { const CACHE_ID = 'backend_menu_config'; diff --git a/app/code/Magento/Backend/Model/Session/Quote.php b/app/code/Magento/Backend/Model/Session/Quote.php index 3b1b7149aed..2da20fd5cd3 100644 --- a/app/code/Magento/Backend/Model/Session/Quote.php +++ b/app/code/Magento/Backend/Model/Session/Quote.php @@ -21,6 +21,7 @@ use Magento\Customer\Api\GroupManagementInterface; * @method int getCurrencyId() * @method Quote setOrderId($orderId) * @method int getOrderId() + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Quote extends \Magento\Framework\Session\SessionManager { @@ -86,6 +87,7 @@ class Quote extends \Magento\Framework\Session\SessionManager * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param GroupManagementInterface $groupManagement + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Request\Http $request, diff --git a/app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php b/app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php index d594ed09070..f1a59c9cdb4 100644 --- a/app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php +++ b/app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php @@ -14,6 +14,7 @@ class Create extends \Magento\Backup\Controller\Adminhtml\Index * Create backup action * * @return void|\Magento\Backend\App\Action + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php b/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php index e9b22751e44..5f68a92b958 100644 --- a/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php +++ b/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php @@ -13,6 +13,7 @@ class Download extends \Magento\Backup\Controller\Adminhtml\Index * Download backup action * * @return void|\Magento\Backend\App\Action + * @SuppressWarnings(PHPMD.ExitExpression) */ public function execute() { diff --git a/app/code/Magento/Backup/Controller/Adminhtml/Index/Rollback.php b/app/code/Magento/Backup/Controller/Adminhtml/Index/Rollback.php index 20723783b18..5c5640fe07a 100644 --- a/app/code/Magento/Backup/Controller/Adminhtml/Index/Rollback.php +++ b/app/code/Magento/Backup/Controller/Adminhtml/Index/Rollback.php @@ -14,6 +14,9 @@ class Rollback extends \Magento\Backup\Controller\Adminhtml\Index * Rollback Action * * @return void|\Magento\Backend\App\Action + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function execute() { diff --git a/app/code/Magento/Backup/Model/Backup.php b/app/code/Magento/Backup/Model/Backup.php index 5e0f62ba27e..44369629987 100644 --- a/app/code/Magento/Backup/Model/Backup.php +++ b/app/code/Magento/Backup/Model/Backup.php @@ -12,6 +12,7 @@ use Magento\Framework\App\Filesystem\DirectoryList; * @method string getPath() * @method string getName() * @method string getTime() + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Backup extends \Magento\Framework\Object implements \Magento\Framework\Backup\Db\BackupInterface { diff --git a/app/code/Magento/Backup/Model/Resource/Db.php b/app/code/Magento/Backup/Model/Resource/Db.php index e9b47b2c97a..1d53303e710 100644 --- a/app/code/Magento/Backup/Model/Resource/Db.php +++ b/app/code/Magento/Backup/Model/Resource/Db.php @@ -180,6 +180,7 @@ class Db * @param string $tableName * @param bool $step * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getTableDataDump($tableName, $step = false) { diff --git a/app/code/Magento/Backup/Model/Resource/Helper.php b/app/code/Magento/Backup/Model/Resource/Helper.php index 8b3b530a0d0..a2e8c11c931 100644 --- a/app/code/Magento/Backup/Model/Resource/Helper.php +++ b/app/code/Magento/Backup/Model/Resource/Helper.php @@ -119,6 +119,7 @@ class Helper extends \Magento\Framework\DB\Helper * @param string $tableName * @param bool $withForeignKeys * @return string + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getTableCreateSql($tableName, $withForeignKeys = false) { diff --git a/app/code/Magento/Bundle/Api/Data/LinkInterface.php b/app/code/Magento/Bundle/Api/Data/LinkInterface.php index af85c0db527..88498863dd3 100644 --- a/app/code/Magento/Bundle/Api/Data/LinkInterface.php +++ b/app/code/Magento/Bundle/Api/Data/LinkInterface.php @@ -47,6 +47,7 @@ interface LinkInterface extends \Magento\Framework\Api\ExtensibleDataInterface * Get is default * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsDefault(); diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php index 40135566a28..46398975c1e 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php @@ -6,6 +6,7 @@ namespace Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab; /** * Bundle product attributes tab + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Attributes extends \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attributes { @@ -13,6 +14,8 @@ class Attributes extends \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attri * Prepare attributes form of bundle product * * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php index 1b115524439..d093ac060dc 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php @@ -53,6 +53,9 @@ class Extend extends \Magento\Catalog\Block\Adminhtml\Form\Renderer\Fieldset\Ele * Get Element Html * * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getElementHtml() { diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php index 2b06cc3cd85..a60a02d9e62 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php @@ -69,6 +69,7 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRend /** * @param mixed $item * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isShipmentSeparately($item = null) { @@ -104,6 +105,7 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRend /** * @param mixed $item * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isChildCalculated($item = null) { diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php index 828f482ecb0..3dea7076255 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php @@ -32,6 +32,7 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\ /** * @param null|object $item * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isShipmentSeparately($item = null) { @@ -64,6 +65,7 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\ /** * @param null|object $item * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isChildCalculated($item = null) { diff --git a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php index d7b78e32244..5b33daae698 100644 --- a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php +++ b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php @@ -271,6 +271,7 @@ class Option extends \Magento\Bundle\Block\Catalog\Product\Price * @param int $elementId * @param int $containerId * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setValidationContainer($elementId, $containerId) { diff --git a/app/code/Magento/Bundle/Block/Checkout/Cart/Item/Renderer.php b/app/code/Magento/Bundle/Block/Checkout/Cart/Item/Renderer.php index 27c67359b7e..6694b30acaa 100644 --- a/app/code/Magento/Bundle/Block/Checkout/Cart/Item/Renderer.php +++ b/app/code/Magento/Bundle/Block/Checkout/Cart/Item/Renderer.php @@ -37,6 +37,7 @@ class Renderer extends \Magento\Checkout\Block\Cart\Item\Renderer * @param Configuration $bundleProductConfiguration * @param \Magento\Framework\Module\Manager $moduleManager * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, @@ -82,6 +83,7 @@ class Renderer extends \Magento\Checkout\Block\Cart\Item\Renderer * * @param bool $useCache * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getBundleOptions($useCache = true) { diff --git a/app/code/Magento/Bundle/Block/Sales/Order/Items/Renderer.php b/app/code/Magento/Bundle/Block/Sales/Order/Items/Renderer.php index 698f54a46fe..a476771d6c0 100644 --- a/app/code/Magento/Bundle/Block/Sales/Order/Items/Renderer.php +++ b/app/code/Magento/Bundle/Block/Sales/Order/Items/Renderer.php @@ -16,6 +16,7 @@ class Renderer extends \Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer /** * @param mixed $item * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isShipmentSeparately($item = null) { @@ -51,6 +52,7 @@ class Renderer extends \Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer /** * @param mixed $item * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isChildCalculated($item = null) { diff --git a/app/code/Magento/Bundle/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Bundle.php b/app/code/Magento/Bundle/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Bundle.php index 02d65c1bc2e..679c5bd17e8 100644 --- a/app/code/Magento/Bundle/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Bundle.php +++ b/app/code/Magento/Bundle/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Bundle.php @@ -27,6 +27,7 @@ class Bundle * * @return \Magento\Catalog\Model\Product * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function afterInitialize( \Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper $subject, diff --git a/app/code/Magento/Bundle/Model/LinkManagement.php b/app/code/Magento/Bundle/Model/LinkManagement.php index 68ee05b2f32..7f2b5a22669 100644 --- a/app/code/Magento/Bundle/Model/LinkManagement.php +++ b/app/code/Magento/Bundle/Model/LinkManagement.php @@ -9,6 +9,9 @@ use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Framework\Exception\CouldNotSaveException; use Magento\Framework\Exception\InputException; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class LinkManagement implements \Magento\Bundle\Api\ProductLinkManagementInterface { /** @@ -95,6 +98,8 @@ class LinkManagement implements \Magento\Bundle\Api\ProductLinkManagementInterfa /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function addChild( \Magento\Catalog\Api\Data\ProductInterface $product, diff --git a/app/code/Magento/Bundle/Model/Observer.php b/app/code/Magento/Bundle/Model/Observer.php index b8f77c23cb4..f80347079f7 100644 --- a/app/code/Magento/Bundle/Model/Observer.php +++ b/app/code/Magento/Bundle/Model/Observer.php @@ -66,6 +66,8 @@ class Observer * * @param \Magento\Framework\Object $observer * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function appendUpsellProducts($observer) { diff --git a/app/code/Magento/Bundle/Model/OptionRepository.php b/app/code/Magento/Bundle/Model/OptionRepository.php index b577c776573..1c08ef0efe4 100644 --- a/app/code/Magento/Bundle/Model/OptionRepository.php +++ b/app/code/Magento/Bundle/Model/OptionRepository.php @@ -9,6 +9,9 @@ use Magento\Framework\Exception\CouldNotSaveException; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Webapi\Exception; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class OptionRepository implements \Magento\Bundle\Api\ProductOptionRepositoryInterface { /** @@ -144,6 +147,7 @@ class OptionRepository implements \Magento\Bundle\Api\ProductOptionRepositoryInt /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function save( \Magento\Catalog\Api\Data\ProductInterface $product, @@ -217,6 +221,7 @@ class OptionRepository implements \Magento\Bundle\Api\ProductOptionRepositoryInt * @param \Magento\Bundle\Api\Data\LinkInterface $firstLink * @param \Magento\Bundle\Api\Data\LinkInterface $secondLink * @return int + * @SuppressWarnings(PHPMD.UnusedPrivateMethod) */ private function compareLinks( \Magento\Bundle\Api\Data\LinkInterface $firstLink, diff --git a/app/code/Magento/Bundle/Model/Product/Price.php b/app/code/Magento/Bundle/Model/Product/Price.php index f09394f5841..371dd863284 100644 --- a/app/code/Magento/Bundle/Model/Product/Price.php +++ b/app/code/Magento/Bundle/Model/Product/Price.php @@ -10,6 +10,7 @@ use Magento\Framework\Pricing\PriceCurrencyInterface; /** * Bundle Price Model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Price extends \Magento\Catalog\Model\Product\Type\Price { @@ -73,6 +74,7 @@ class Price extends \Magento\Catalog\Model\Product\Type\Price * Is min/max prices have been calculated by index * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsPricesCalculatedByIndex() { @@ -180,6 +182,9 @@ class Price extends \Magento\Catalog\Model\Product\Type\Price * @param bool|null $includeTax * @param bool $takeTierPrice * @return float|array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getTotalPrices($product, $which = null, $includeTax = null, $takeTierPrice = true) { @@ -522,6 +527,8 @@ class Price extends \Magento\Catalog\Model\Product\Type\Price * @param float $qty * @param \Magento\Catalog\Model\Product $product * @return float|array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getTierPrice($qty, $product) { diff --git a/app/code/Magento/Bundle/Model/Product/Type.php b/app/code/Magento/Bundle/Model/Product/Type.php index adcd9dd07f4..b4d55aeaf03 100644 --- a/app/code/Magento/Bundle/Model/Product/Type.php +++ b/app/code/Magento/Bundle/Model/Product/Type.php @@ -9,6 +9,9 @@ use Magento\Framework\Pricing\PriceCurrencyInterface; /** * Bundle Type Model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType { @@ -340,6 +343,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType * * @param \Magento\Catalog\Model\Product $product * @return $this|void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function beforeSave($product) { @@ -384,6 +388,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType * * @param \Magento\Catalog\Model\Product $product * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function save($product) { @@ -590,6 +595,8 @@ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType * * @param \Magento\Catalog\Model\Product $product * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function isSalable($product) { @@ -648,6 +655,9 @@ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType * @param \Magento\Catalog\Model\Product $product * @param string $processMode * @return array|string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareProduct(\Magento\Framework\Object $buyRequest, $product, $processMode) { @@ -1013,6 +1023,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType * * @param \Magento\Catalog\Model\Product $product * @return boolean true + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getForceChildItemQtyChanges($product) { diff --git a/app/code/Magento/Bundle/Model/Resource/Indexer/Price.php b/app/code/Magento/Bundle/Model/Resource/Indexer/Price.php index d0b93651571..82b76add2e1 100644 --- a/app/code/Magento/Bundle/Model/Resource/Indexer/Price.php +++ b/app/code/Magento/Bundle/Model/Resource/Indexer/Price.php @@ -124,6 +124,7 @@ class Price extends \Magento\Catalog\Model\Resource\Product\Indexer\Price\Defaul * @param int $priceType * @param int|array $entityIds the entity ids limitation * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareBundlePriceByType($priceType, $entityIds = null) { @@ -372,6 +373,7 @@ class Price extends \Magento\Catalog\Model\Resource\Product\Indexer\Price\Defaul * * @param int $priceType * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _calculateBundleSelectionPrice($priceType) { diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php index 70d75128ed9..f5168ba0f13 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php @@ -53,6 +53,7 @@ abstract class AbstractItems extends \Magento\Sales\Model\Order\Pdf\Items\Abstra * * @param \Magento\Framework\Object $item * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isShipmentSeparately($item = null) { @@ -90,6 +91,7 @@ abstract class AbstractItems extends \Magento\Sales\Model\Order\Pdf\Items\Abstra * * @param \Magento\Framework\Object $item * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isChildCalculated($item = null) { @@ -129,6 +131,7 @@ abstract class AbstractItems extends \Magento\Sales\Model\Order\Pdf\Items\Abstra * * @param \Magento\Framework\Object $item * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getBundleOptions($item = null) { @@ -163,6 +166,7 @@ abstract class AbstractItems extends \Magento\Sales\Model\Order\Pdf\Items\Abstra * * @param \Magento\Framework\Object $item * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getOrderOptions($item = null) { diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php index 716ebb19e28..9c28d73b542 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php @@ -55,6 +55,9 @@ class Creditmemo extends AbstractItems * Draw item line * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function draw() { diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php index 6a6c5df32c2..6ee362083a2 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php @@ -53,6 +53,9 @@ class Invoice extends AbstractItems * Draw item line * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function draw() { diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php index a79b5f334e8..a07b1ad399c 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php @@ -53,6 +53,9 @@ class Shipment extends AbstractItems * Draw item line * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function draw() { diff --git a/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php b/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php index e15bbbf89f1..411ac7cf445 100644 --- a/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php +++ b/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php @@ -19,6 +19,7 @@ use Magento\Tax\Helper\Data as TaxHelper; /** * Bundle price calculator + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Calculator implements BundleCalculatorInterface { @@ -171,6 +172,8 @@ class Calculator implements BundleCalculatorInterface * @param bool $searchMin * @param bool $useRegularPrice * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function getSelectionAmounts(Product $bundleProduct, $searchMin, $useRegularPrice = false) { @@ -294,6 +297,7 @@ class Calculator implements BundleCalculatorInterface * @param \Magento\Bundle\Pricing\Price\BundleSelectionPrice[] $selectionPriceList * @param null|string $exclude * @return \Magento\Framework\Pricing\Amount\AmountInterface + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function calculateDynamicBundleAmount($basePriceValue, $bundleProduct, $selectionPriceList, $exclude) { @@ -381,6 +385,7 @@ class Calculator implements BundleCalculatorInterface * @param \Magento\Bundle\Pricing\Price\BundleSelectionPrice[] $selectionPriceList * @param bool $searchMin * @return \Magento\Bundle\Pricing\Price\BundleSelectionPrice[] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function processOptions($option, $selectionPriceList, $searchMin = true) { diff --git a/app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.php b/app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.php index 4868f3b0942..1a07e673dfe 100644 --- a/app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.php +++ b/app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.php @@ -15,6 +15,7 @@ use Magento\Framework\Pricing\Price\AbstractPrice; /** * Bundle option price + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class BundleSelectionPrice extends AbstractPrice { diff --git a/app/code/Magento/Captcha/Model/Observer.php b/app/code/Magento/Captcha/Model/Observer.php index f334e578863..7ec17bedb4a 100644 --- a/app/code/Magento/Captcha/Model/Observer.php +++ b/app/code/Magento/Captcha/Model/Observer.php @@ -8,6 +8,7 @@ namespace Magento\Captcha\Model; * Captcha Observer * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Observer { diff --git a/app/code/Magento/Catalog/Api/Data/CategoryTreeInterface.php b/app/code/Magento/Catalog/Api/Data/CategoryTreeInterface.php index 8e2cb5cb78e..4532afab168 100644 --- a/app/code/Magento/Catalog/Api/Data/CategoryTreeInterface.php +++ b/app/code/Magento/Catalog/Api/Data/CategoryTreeInterface.php @@ -31,6 +31,7 @@ interface CategoryTreeInterface extends \Magento\Framework\Api\ExtensibleDataInt * Check whether category is active * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsActive(); diff --git a/app/code/Magento/Catalog/Api/Data/ProductAttributeMediaGalleryEntryInterface.php b/app/code/Magento/Catalog/Api/Data/ProductAttributeMediaGalleryEntryInterface.php index 537db1700cf..9a2d46c4efc 100644 --- a/app/code/Magento/Catalog/Api/Data/ProductAttributeMediaGalleryEntryInterface.php +++ b/app/code/Magento/Catalog/Api/Data/ProductAttributeMediaGalleryEntryInterface.php @@ -40,6 +40,7 @@ interface ProductAttributeMediaGalleryEntryInterface * Check if gallery entry is hidden from product page * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsDisabled(); diff --git a/app/code/Magento/Catalog/Api/Data/ProductCustomOptionInterface.php b/app/code/Magento/Catalog/Api/Data/ProductCustomOptionInterface.php index 86125492a09..eb7d45d8a74 100644 --- a/app/code/Magento/Catalog/Api/Data/ProductCustomOptionInterface.php +++ b/app/code/Magento/Catalog/Api/Data/ProductCustomOptionInterface.php @@ -46,6 +46,7 @@ interface ProductCustomOptionInterface * Get is require * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsRequire(); diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/AbstractCategory.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/AbstractCategory.php index 8746bd4877e..4bd02b18ea4 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/AbstractCategory.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/AbstractCategory.php @@ -120,6 +120,7 @@ class AbstractCategory extends \Magento\Backend\Block\Template * @param mixed|null $parentNodeCategory * @param int $recursionLevel * @return Node|array|null + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getRoot($parentNodeCategory = null, $recursionLevel = 3) { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Checkboxes/Tree.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Checkboxes/Tree.php index d4cc60d6737..6691d009d3e 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Checkboxes/Tree.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Checkboxes/Tree.php @@ -77,6 +77,7 @@ class Tree extends \Magento\Catalog\Block\Adminhtml\Category\Tree * @param array|Node $node * @param int $level * @return array + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getNodeJson($node, $level = 1) { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php index a781811ee27..eeba03efc17 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php @@ -37,6 +37,8 @@ class Attributes extends \Magento\Backend\Block\Widget\Form\Generic * Prepare form before rendering HTML * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _prepareForm() { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Design.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Design.php index 9a901923e75..dac119fad15 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Design.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Design.php @@ -4,6 +4,9 @@ */ namespace Magento\Catalog\Block\Adminhtml\Category\Tab; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Design extends \Magento\Catalog\Block\Adminhtml\Form { /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tabs.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tabs.php index 9b6b4b9d346..43fd8b23a33 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tabs.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tabs.php @@ -105,6 +105,7 @@ class Tabs extends \Magento\Backend\Block\Widget\Tabs * Prepare Layout Content * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareLayout() { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php index e319dda2ba4..9abf8ed3f23 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php @@ -243,6 +243,7 @@ class Tree extends \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsWasExpanded() { @@ -313,6 +314,8 @@ class Tree extends \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory * @param Node|array $node * @param int $level * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getNodeJson($node, $level = 0) { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Config/DateFieldsOrder.php b/app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Config/DateFieldsOrder.php index b272634701a..f7ed33a771c 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Config/DateFieldsOrder.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Config/DateFieldsOrder.php @@ -18,6 +18,7 @@ class DateFieldsOrder extends Field /** * @param AbstractElement $element * @return string + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getElementHtml(AbstractElement $element) { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php b/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php index 1f9429e665f..f23a32cfe17 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php @@ -137,6 +137,7 @@ HTML; * Check whether wysiwyg enabled or not * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsWysiwygEnabled() { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php index 2656c10bad1..a266bae27ad 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php @@ -53,6 +53,7 @@ class Advanced extends Generic * Adding product form elements for editing attribute * * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php index 8d5b5c381a0..c11210b5a23 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php @@ -43,6 +43,7 @@ class Front extends Generic /** * {@inheritdoc} * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Main.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Main.php index e6a7ed15573..756e349ac2a 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Main.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Main.php @@ -12,12 +12,16 @@ namespace Magento\Catalog\Block\Adminhtml\Product\Attribute\Edit\Tab; use Magento\Eav\Block\Adminhtml\Attribute\Edit\Main\AbstractMain; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Main extends AbstractMain { /** * Adding product form elements for editing attribute * * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _prepareForm() { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php index e9a41e8d5c4..a72836ae05a 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php @@ -12,6 +12,9 @@ namespace Magento\Catalog\Block\Adminhtml\Product\Attribute; use Magento\Eav\Block\Adminhtml\Attribute\Grid\AbstractGrid; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Grid extends AbstractGrid { /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Attributes.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Attributes.php index a284ea76329..9c71bb5a2ab 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Attributes.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Attributes.php @@ -12,6 +12,9 @@ namespace Magento\Catalog\Block\Adminhtml\Product\Attribute\NewAttribute\Product use Magento\Backend\Block\Widget\Form; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Attributes extends \Magento\Catalog\Block\Adminhtml\Form { /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php index 5aebe3f200c..327b1f7ce34 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php @@ -344,6 +344,7 @@ class Main extends \Magento\Backend\Block\Template * Check Current Attribute Set is a default * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsCurrentSetDefault() { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php index 6735b2ab3bb..7dd12041a74 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php @@ -12,6 +12,9 @@ namespace Magento\Catalog\Block\Adminhtml\Product\Edit\Action\Attribute\Tab; use Magento\Framework\Data\Form\Element\AbstractElement; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Attributes extends \Magento\Catalog\Block\Adminhtml\Form implements \Magento\Backend\Block\Widget\Tab\TabInterface { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php index 5583ece4863..1dc83ff4138 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php @@ -10,12 +10,18 @@ */ namespace Magento\Catalog\Block\Adminhtml\Product\Edit\Tab; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Attributes extends \Magento\Catalog\Block\Adminhtml\Form { /** * Prepare attributes form * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php index 76549407ee7..e57ef20ab46 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php @@ -14,6 +14,9 @@ use Magento\Backend\Block\Widget\Grid\Column; use Magento\Backend\Block\Widget\Grid\Extended; use Magento\Catalog\Model\Product; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Crosssell extends Extended { /** @@ -186,6 +189,7 @@ class Crosssell extends Extended * Add columns to grid * * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareColumns() { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php index 9f54bda5ea5..5850fc36e56 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php @@ -268,6 +268,9 @@ class Option extends Widget /** * @return \Magento\Framework\Object[] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getOptionValues() { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Popup/Grid.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Popup/Grid.php index 1b6cfb40b16..964444d98c6 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Popup/Grid.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Popup/Grid.php @@ -12,6 +12,9 @@ namespace Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Popup; use Magento\Catalog\Model\Product; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Grid extends \Magento\Catalog\Block\Adminhtml\Product\Grid { /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Tier.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Tier.php index 5b5d7bd8496..aedefddcfaa 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Tier.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Tier.php @@ -42,6 +42,7 @@ class Tier extends Group\AbstractGroup * @param array $a * @param array $b * @return int + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _sortTierPrices($a, $b) { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Related.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Related.php index 366dd7aa165..e6817d33ed0 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Related.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Related.php @@ -183,6 +183,7 @@ class Related extends Extended * Add columns to grid * * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareColumns() { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Upsell.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Upsell.php index 655c2d4ad53..336cefd6dcd 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Upsell.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Upsell.php @@ -180,6 +180,7 @@ class Upsell extends \Magento\Backend\Block\Widget\Grid\Extended * Add columns to grid * * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareColumns() { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs.php index d08324c0c2d..8df4d4dc70a 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs.php @@ -71,6 +71,7 @@ class Tabs extends \Magento\Backend\Block\Widget\Tabs * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\Translate\InlineInterface $translateInline * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Backend\Block\Template\Context $context, @@ -117,6 +118,9 @@ class Tabs extends \Magento\Backend\Block\Widget\Tabs /** * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareLayout() { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Frontend/Product/Watermark.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Frontend/Product/Watermark.php index 200561aa8dc..69b12be65f6 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Frontend/Product/Watermark.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Frontend/Product/Watermark.php @@ -125,6 +125,7 @@ class Watermark extends \Magento\Backend\Block\AbstractBlock implements /** * @param AbstractElement $element * @return string + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _getHeaderHtml($element) { @@ -148,6 +149,7 @@ class Watermark extends \Magento\Backend\Block\AbstractBlock implements /** * @param AbstractElement $element * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getFooterHtml($element) { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php index c84778729a2..d160dea8dcf 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php @@ -208,6 +208,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended /** * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareColumns() { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php index 8b6d28dc947..c62ed8ef09f 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php @@ -175,6 +175,7 @@ class Gallery extends AbstractElement * * @param Attribute|string $attribute * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getAttributeReadonly($attribute) { diff --git a/app/code/Magento/Catalog/Block/Navigation.php b/app/code/Magento/Catalog/Block/Navigation.php index ed8f5d99d57..1a2e92a38c8 100644 --- a/app/code/Magento/Catalog/Block/Navigation.php +++ b/app/code/Magento/Catalog/Block/Navigation.php @@ -11,6 +11,7 @@ use Magento\Customer\Model\Context; * Catalog navigation * * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Navigation extends \Magento\Framework\View\Element\Template implements \Magento\Framework\View\Block\IdentityInterface { @@ -270,6 +271,9 @@ class Navigation extends \Magento\Framework\View\Element\Template implements \Ma * @param string $childrenWrapClass If specified wraps children list in div with this class * @param boolean $noEventAttributes Whether ot not to add on* attributes to list item * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _renderCategoryMenuItemHtml( $category, diff --git a/app/code/Magento/Catalog/Block/Product/AbstractProduct.php b/app/code/Magento/Catalog/Block/Product/AbstractProduct.php index e4ef6689299..66f8e84c722 100644 --- a/app/code/Magento/Catalog/Block/Product/AbstractProduct.php +++ b/app/code/Magento/Catalog/Block/Product/AbstractProduct.php @@ -6,6 +6,8 @@ namespace Magento\Catalog\Block\Product; /** * Class AbstractProduct + * @SuppressWarnings(PHPMD.NumberOfChildren) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AbstractProduct extends \Magento\Framework\View\Element\Template { @@ -376,6 +378,7 @@ class AbstractProduct extends \Magento\Framework\View\Element\Template * * @param \Magento\Catalog\Model\Product $product * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCanShowProductPrice($product) { diff --git a/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php b/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php index ad87e805056..fbdaa39bbb7 100644 --- a/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php +++ b/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php @@ -11,6 +11,7 @@ use Magento\Framework\App\Action\Action; /** * Catalog products compare block + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class ListCompare extends \Magento\Catalog\Block\Product\Compare\AbstractCompare { diff --git a/app/code/Magento/Catalog/Block/Product/Context.php b/app/code/Magento/Catalog/Block/Product/Context.php index 14ae9729f3e..573c8e5e8f5 100644 --- a/app/code/Magento/Catalog/Block/Product/Context.php +++ b/app/code/Magento/Catalog/Block/Product/Context.php @@ -6,6 +6,7 @@ namespace Magento\Catalog\Block\Product; /** * Abstract product block context + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Context extends \Magento\Framework\View\Element\Template\Context { diff --git a/app/code/Magento/Catalog/Block/Product/ListProduct.php b/app/code/Magento/Catalog/Block/Product/ListProduct.php index 8628f008d12..2439810ea81 100644 --- a/app/code/Magento/Catalog/Block/Product/ListProduct.php +++ b/app/code/Magento/Catalog/Block/Product/ListProduct.php @@ -14,6 +14,7 @@ use Magento\Framework\View\Block\IdentityInterface; /** * Product list + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class ListProduct extends AbstractProduct implements IdentityInterface { diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php index 98d0ba28ab7..ebac80d1bbb 100644 --- a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php +++ b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php @@ -11,6 +11,7 @@ use Magento\Catalog\Model\Product\ProductList\Toolbar as ToolbarModel; * Product list toolbar * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.TooManyFields) */ class Toolbar extends \Magento\Framework\View\Element\Template { diff --git a/app/code/Magento/Catalog/Block/Product/View.php b/app/code/Magento/Catalog/Block/Product/View.php index 18ef7c70cc9..ee82d0c10c5 100644 --- a/app/code/Magento/Catalog/Block/Product/View.php +++ b/app/code/Magento/Catalog/Block/Product/View.php @@ -72,6 +72,7 @@ class View extends AbstractProduct implements \Magento\Framework\View\Block\Iden * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency * @param array $data * @codingStandardsIgnoreStart + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Catalog\Block\Product\Context $context, diff --git a/app/code/Magento/Catalog/Block/Product/View/Attributes.php b/app/code/Magento/Catalog/Block/Product/View/Attributes.php index 9828e2ea95e..96922f7f548 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Attributes.php +++ b/app/code/Magento/Catalog/Block/Product/View/Attributes.php @@ -66,6 +66,7 @@ class Attributes extends \Magento\Framework\View\Element\Template * * @param array $excludeAttr * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getAdditionalData(array $excludeAttr = []) { diff --git a/app/code/Magento/Catalog/Block/Product/View/Options/Type/Select.php b/app/code/Magento/Catalog/Block/Product/View/Options/Type/Select.php index 27280fb2b3f..a9e0c0d20cc 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Options/Type/Select.php +++ b/app/code/Magento/Catalog/Block/Product/View/Options/Type/Select.php @@ -37,6 +37,9 @@ class Select extends \Magento\Catalog\Block\Product\View\Options\AbstractOptions * Return html for control element * * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getValuesHtml() { diff --git a/app/code/Magento/Catalog/Block/Product/Widget/Html/Pager.php b/app/code/Magento/Catalog/Block/Product/Widget/Html/Pager.php index 09ba8338cdf..db0c35a5a74 100644 --- a/app/code/Magento/Catalog/Block/Product/Widget/Html/Pager.php +++ b/app/code/Magento/Catalog/Block/Product/Widget/Html/Pager.php @@ -151,6 +151,7 @@ class Pager extends \Magento\Theme\Block\Html\Pager * Return number of last page * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getLastPageNum() { diff --git a/app/code/Magento/Catalog/Block/Product/Widget/NewWidget.php b/app/code/Magento/Catalog/Block/Product/Widget/NewWidget.php index 1f2db4b0951..6303f6a2678 100644 --- a/app/code/Magento/Catalog/Block/Product/Widget/NewWidget.php +++ b/app/code/Magento/Catalog/Block/Product/Widget/NewWidget.php @@ -196,6 +196,7 @@ class NewWidget extends \Magento\Catalog\Block\Product\NewProduct implements \Ma * @param string $renderZone * @param array $arguments * @return string + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getProductPriceHtml( \Magento\Catalog\Model\Product $product, diff --git a/app/code/Magento/Catalog/Block/Rss/Category.php b/app/code/Magento/Catalog/Block/Rss/Category.php index 7000804947e..4d43e003100 100644 --- a/app/code/Magento/Catalog/Block/Rss/Category.php +++ b/app/code/Magento/Catalog/Block/Rss/Category.php @@ -11,6 +11,7 @@ use Magento\Framework\Exception\NoSuchEntityException; /** * Class Category * @package Magento\Catalog\Block\Rss + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Category extends \Magento\Framework\View\Element\AbstractBlock implements DataProviderInterface { @@ -60,6 +61,7 @@ class Category extends \Magento\Framework\View\Element\AbstractBlock implements * @param \Magento\Customer\Model\Session $customerSession * @param CategoryRepositoryInterface $categoryRepository * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Catalog/Block/Rss/Product/Special.php b/app/code/Magento/Catalog/Block/Rss/Product/Special.php index 50292baecd4..e5177a0258a 100644 --- a/app/code/Magento/Catalog/Block/Rss/Product/Special.php +++ b/app/code/Magento/Catalog/Block/Rss/Product/Special.php @@ -10,6 +10,7 @@ use Magento\Framework\App\Rss\DataProviderInterface; /** * Class Special * @package Magento\Catalog\Block\Rss\Product + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Special extends \Magento\Framework\View\Element\AbstractBlock implements DataProviderInterface { diff --git a/app/code/Magento/Catalog/Block/Widget/Link.php b/app/code/Magento/Catalog/Block/Widget/Link.php index 40ffefb24c7..a710ff7e89c 100644 --- a/app/code/Magento/Catalog/Block/Widget/Link.php +++ b/app/code/Magento/Catalog/Block/Widget/Link.php @@ -66,6 +66,7 @@ class Link extends \Magento\Framework\View\Element\Html\Link implements \Magento * * @throws \RuntimeException * @return string|false + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getHref() { diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Category/Edit.php b/app/code/Magento/Catalog/Controller/Adminhtml/Category/Edit.php index f17bfc3abd5..34b10d7aa41 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Category/Edit.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Category/Edit.php @@ -38,6 +38,8 @@ class Edit extends \Magento\Catalog\Controller\Adminhtml\Category * Edit category page * * @return \Magento\Framework\Controller\ResultInterface + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.php index 5e470317e2b..7f945b6560b 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.php @@ -67,6 +67,9 @@ class Save extends \Magento\Catalog\Controller\Adminhtml\Category * Category save * * @return \Magento\Framework\Controller\ResultInterface + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function execute() { diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product.php index ea70e943db4..f5366e406fa 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product.php @@ -8,6 +8,7 @@ use Magento\Backend\App\Action; /** * Catalog product controller + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Product extends \Magento\Backend\App\Action { diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php index 963160cf04e..ad634300ea2 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php @@ -9,6 +9,7 @@ use Magento\Backend\App\Action; /** * Class Save + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Action\Attribute { @@ -79,6 +80,9 @@ class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Action\Attribut * Update product attributes * * @return \Magento\Backend\Model\View\Result\Redirect + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function execute() { diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Edit.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Edit.php index 2deca24d3a9..c354b28c08f 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Edit.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Edit.php @@ -38,6 +38,7 @@ class Edit extends \Magento\Catalog\Controller\Adminhtml\Product\Attribute /** * @return \Magento\Framework\Controller\ResultInterface + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php index be7c060d361..c9875cf4773 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php @@ -7,6 +7,9 @@ namespace Magento\Catalog\Controller\Adminhtml\Product\Attribute; use Magento\Catalog\Model\Product\AttributeSet\AlreadyExistsException; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Attribute { /** @@ -56,6 +59,7 @@ class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Attribute * @param \Magento\Catalog\Helper\Product $productHelper * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory * @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Backend\App\Action\Context $context, @@ -82,6 +86,9 @@ class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Attribute /** * @return \Magento\Backend\Model\View\Result\Redirect + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function execute() { diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php index 98dd712429b..f100d96a9f1 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php @@ -57,6 +57,8 @@ class Helper * * @param \Magento\Catalog\Model\Product $product * @return \Magento\Catalog\Model\Product + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function initialize(\Magento\Catalog\Model\Product $product) { diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilter.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilter.php index 46ecff533cf..f4601804736 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilter.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilter.php @@ -44,6 +44,7 @@ class StockDataFilter * * @param array $stockData * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function filter(array $stockData) { diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php index 7dc0df9dbae..04f9e4857d6 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php @@ -57,6 +57,7 @@ class Save extends \Magento\Catalog\Controller\Adminhtml\Product * Save product action * * @return \Magento\Backend\Model\View\Result\Redirect + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php index aa7d6c6d182..da219e891f0 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php @@ -62,6 +62,7 @@ class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Set * [AJAX] Save attribute set data * * @return \Magento\Framework\Controller\ResultInterface + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Validate.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Validate.php index 45cf6c67cf6..dc99ceeef93 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Validate.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Validate.php @@ -57,6 +57,8 @@ class Validate extends \Magento\Catalog\Controller\Adminhtml\Product * Validate product * * @return \Magento\Framework\Controller\Result\JSON + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Catalog/Controller/Category/View.php b/app/code/Magento/Catalog/Controller/Category/View.php index d6db2447de5..ecc35c2a66d 100644 --- a/app/code/Magento/Catalog/Controller/Category/View.php +++ b/app/code/Magento/Catalog/Controller/Category/View.php @@ -10,6 +10,9 @@ use Magento\Catalog\Model\Layer\Resolver; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\View\Result\PageFactory; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class View extends \Magento\Framework\App\Action\Action { /** @@ -134,6 +137,8 @@ class View extends \Magento\Framework\App\Action\Action * Category view action * * @return \Magento\Framework\View\Result\Page + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Catalog/Controller/Product/Compare.php b/app/code/Magento/Catalog/Controller/Product/Compare.php index a5690060e2a..c8cc5ffde72 100644 --- a/app/code/Magento/Catalog/Controller/Product/Compare.php +++ b/app/code/Magento/Catalog/Controller/Product/Compare.php @@ -13,6 +13,7 @@ use Magento\Framework\View\Result\PageFactory; * Catalog compare controller * * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Compare extends \Magento\Framework\App\Action\Action { @@ -105,6 +106,7 @@ class Compare extends \Magento\Framework\App\Action\Action * @param \Magento\Framework\Controller\Result\RedirectFactory $resultRedirectFactory * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory * @param ProductRepositoryInterface $productRepository + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/app/code/Magento/Catalog/Controller/Product/Compare/Index.php b/app/code/Magento/Catalog/Controller/Product/Compare/Index.php index 60700d40757..896ce44b351 100644 --- a/app/code/Magento/Catalog/Controller/Product/Compare/Index.php +++ b/app/code/Magento/Catalog/Controller/Product/Compare/Index.php @@ -10,6 +10,9 @@ use Magento\Core\App\Action\FormKeyValidator; use Magento\Framework\Controller\Result; use Magento\Framework\View\Result\PageFactory; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Index extends \Magento\Catalog\Controller\Product\Compare { /** diff --git a/app/code/Magento/Catalog/Helper/Data.php b/app/code/Magento/Catalog/Helper/Data.php index 3c1f489aa1f..adafe60cc3a 100644 --- a/app/code/Magento/Catalog/Helper/Data.php +++ b/app/code/Magento/Catalog/Helper/Data.php @@ -14,6 +14,8 @@ use Magento\Tax\Model\Config; /** * Catalog data helper + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Data extends \Magento\Framework\App\Helper\AbstractHelper { @@ -183,6 +185,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * @param PriceCurrencyInterface $priceCurrency * @param ProductRepositoryInterface $productRepository * @param CategoryRepositoryInterface $categoryRepository + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Helper\Context $context, @@ -463,6 +466,8 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * @param bool $priceIncludesTax flag what price parameter contain tax * @param bool $roundPrice * @return float + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getTaxPrice( $product, diff --git a/app/code/Magento/Catalog/Helper/Image.php b/app/code/Magento/Catalog/Helper/Image.php index e232b7280a7..15358582c72 100644 --- a/app/code/Magento/Catalog/Helper/Image.php +++ b/app/code/Magento/Catalog/Helper/Image.php @@ -248,6 +248,7 @@ class Image extends AbstractHelper * @param bool $flag * @param string[] $position * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function keepFrame($flag, $position = ['center', 'middle']) { @@ -266,6 +267,7 @@ class Image extends AbstractHelper * @param bool $flag * @param int $alphaOpacity * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function keepTransparency($flag, $alphaOpacity = null) { diff --git a/app/code/Magento/Catalog/Helper/Output.php b/app/code/Magento/Catalog/Helper/Output.php index 3d5bd36819a..36586a78721 100644 --- a/app/code/Magento/Catalog/Helper/Output.php +++ b/app/code/Magento/Catalog/Helper/Output.php @@ -132,6 +132,7 @@ class Output extends \Magento\Framework\App\Helper\AbstractHelper * @param string $attributeHtml * @param string $attributeName * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function productAttribute($product, $attributeHtml, $attributeName) { diff --git a/app/code/Magento/Catalog/Helper/Product.php b/app/code/Magento/Catalog/Helper/Product.php index b26f922a2ab..ecc2a3c48d1 100644 --- a/app/code/Magento/Catalog/Helper/Product.php +++ b/app/code/Magento/Catalog/Helper/Product.php @@ -12,6 +12,7 @@ use Magento\Store\Model\Store; /** * Catalog category helper + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Product extends \Magento\Core\Helper\Url { @@ -109,6 +110,7 @@ class Product extends \Magento\Core\Helper\Url * @param array $reindexPriceIndexerData * @param ProductRepositoryInterface $productRepository * @param CategoryRepositoryInterface $categoryRepository + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Helper\Context $context, @@ -245,6 +247,7 @@ class Product extends \Magento\Core\Helper\Url * * @param ModelProduct|\Magento\Framework\Object $product * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getThumbnailUrl($product) { @@ -283,6 +286,7 @@ class Product extends \Magento\Core\Helper\Url * @param ModelProduct|int $product * @param string $where * @return boolean + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function canShow($product, $where = 'catalog') { @@ -384,6 +388,8 @@ class Product extends \Magento\Core\Helper\Url * @param \Magento\Framework\Object $params * * @return false|ModelProduct + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function initProduct($productId, $controller, $params = null) { @@ -537,6 +543,7 @@ class Product extends \Magento\Core\Helper\Url * Get flag that shows if Magento has to check product to be saleable (enabled and/or inStock) * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getSkipSaleableCheck() { diff --git a/app/code/Magento/Catalog/Helper/Product/Compare.php b/app/code/Magento/Catalog/Helper/Product/Compare.php index d762ef438dd..206d47e249e 100644 --- a/app/code/Magento/Catalog/Helper/Product/Compare.php +++ b/app/code/Magento/Catalog/Helper/Product/Compare.php @@ -11,6 +11,7 @@ use Magento\Catalog\Model\Resource\Product\Compare\Item\Collection; * Catalog Product Compare Helper * * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Compare extends \Magento\Core\Helper\Url { @@ -103,6 +104,7 @@ class Compare extends \Magento\Core\Helper\Url * @param \Magento\Framework\Data\Form\FormKey $formKey * @param \Magento\Wishlist\Helper\Data $wishlistHelper * @param \Magento\Core\Helper\PostData $coreHelper + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Helper\Context $context, @@ -356,6 +358,7 @@ class Compare extends \Magento\Core\Helper\Url * Retrieve is allow used flat (for collection) * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getAllowUsedFlat() { diff --git a/app/code/Magento/Catalog/Helper/Product/Composite.php b/app/code/Magento/Catalog/Helper/Product/Composite.php index 6a5dc498067..7618b1596af 100644 --- a/app/code/Magento/Catalog/Helper/Product/Composite.php +++ b/app/code/Magento/Catalog/Helper/Product/Composite.php @@ -18,6 +18,7 @@ use Magento\Framework\Registry; * Adminhtml catalog product composite helper * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Composite extends \Magento\Framework\App\Helper\AbstractHelper { diff --git a/app/code/Magento/Catalog/Helper/Product/Configuration.php b/app/code/Magento/Catalog/Helper/Product/Configuration.php index 6a818dc1e20..bead7f43f41 100644 --- a/app/code/Magento/Catalog/Helper/Product/Configuration.php +++ b/app/code/Magento/Catalog/Helper/Product/Configuration.php @@ -144,6 +144,8 @@ class Configuration extends AbstractHelper implements ConfigurationInterface * - 'cutReplacer': replacer for cut off value part when option value exceeds maxLength * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getFormattedOptionValue($optionValue, $params = null) { diff --git a/app/code/Magento/Catalog/Helper/Product/Edit/Action/Attribute.php b/app/code/Magento/Catalog/Helper/Product/Edit/Action/Attribute.php index 8a6c156fa3f..172cbacd77d 100644 --- a/app/code/Magento/Catalog/Helper/Product/Edit/Action/Attribute.php +++ b/app/code/Magento/Catalog/Helper/Product/Edit/Action/Attribute.php @@ -10,6 +10,7 @@ namespace Magento\Catalog\Helper\Product\Edit\Action; /** * Class Attribute + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Attribute extends \Magento\Backend\Helper\Data { @@ -66,6 +67,7 @@ class Attribute extends \Magento\Backend\Helper\Data * @param \Magento\Backend\Model\Session $session * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productsFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Helper\Context $context, diff --git a/app/code/Magento/Catalog/Helper/Product/Flat/Indexer.php b/app/code/Magento/Catalog/Helper/Product/Flat/Indexer.php index e029df6c439..0d3e46a469d 100644 --- a/app/code/Magento/Catalog/Helper/Product/Flat/Indexer.php +++ b/app/code/Magento/Catalog/Helper/Product/Flat/Indexer.php @@ -7,6 +7,8 @@ namespace Magento\Catalog\Helper\Product\Flat; /** * Catalog Product Flat Indexer Helper * + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Indexer extends \Magento\Framework\App\Helper\AbstractHelper { @@ -129,6 +131,7 @@ class Indexer extends \Magento\Framework\App\Helper\AbstractHelper * @param bool $addFilterableAttrs * @param bool $addChildData * @param array $flatAttributeGroups + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Helper\Context $context, diff --git a/app/code/Magento/Catalog/Helper/Product/View.php b/app/code/Magento/Catalog/Helper/Product/View.php index 1973e8fbf09..d7852e1a83f 100644 --- a/app/code/Magento/Catalog/Helper/Product/View.php +++ b/app/code/Magento/Catalog/Helper/Product/View.php @@ -101,6 +101,8 @@ class View extends \Magento\Framework\App\Helper\AbstractHelper * @param \Magento\Catalog\Model\Product $product * @param null|\Magento\Framework\Object $params * @return \Magento\Catalog\Helper\Product\View + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function initProductLayout(ResultPage $resultPage, $product, $params = null) { diff --git a/app/code/Magento/Catalog/Model/AbstractModel.php b/app/code/Magento/Catalog/Model/AbstractModel.php index 168813ce8f6..23a47db8f11 100644 --- a/app/code/Magento/Catalog/Model/AbstractModel.php +++ b/app/code/Magento/Catalog/Model/AbstractModel.php @@ -312,6 +312,7 @@ abstract class AbstractModel extends \Magento\Framework\Model\AbstractExtensible * * @param string $attributeCode * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getExistsStoreValueFlag($attributeCode) { diff --git a/app/code/Magento/Catalog/Model/App/Action/ContextPlugin.php b/app/code/Magento/Catalog/Model/App/Action/ContextPlugin.php index 7da58daf9e8..18dacad31ee 100644 --- a/app/code/Magento/Catalog/Model/App/Action/ContextPlugin.php +++ b/app/code/Magento/Catalog/Model/App/Action/ContextPlugin.php @@ -47,6 +47,7 @@ class ContextPlugin * @param callable $proceed * @param \Magento\Framework\App\RequestInterface $request * @return mixed + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundDispatch( \Magento\Framework\App\Action\Action $subject, diff --git a/app/code/Magento/Catalog/Model/Category.php b/app/code/Magento/Catalog/Model/Category.php index 7d13628710b..1fc360af70f 100644 --- a/app/code/Magento/Catalog/Model/Category.php +++ b/app/code/Magento/Catalog/Model/Category.php @@ -26,6 +26,10 @@ use Magento\UrlRewrite\Service\V1\Data\UrlRewrite; * @method Category setUrlPath(string $urlPath) * * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Category extends \Magento\Catalog\Model\AbstractModel implements \Magento\Framework\Object\IdentityInterface, @@ -189,6 +193,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -256,6 +261,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements * Get flat resource model flag * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseFlatResource() { @@ -407,6 +413,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements * @param bool $noDesignAttributes * @return array * @todo Use with Flat Resource + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getAttributes($noDesignAttributes = false) { @@ -1092,6 +1099,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsActive() { diff --git a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php index c4372b1b1d0..15c8e1374b7 100644 --- a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php +++ b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php @@ -34,6 +34,8 @@ class Sortby extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend * @param \Magento\Framework\Object $object * @return bool * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validate($object) { diff --git a/app/code/Magento/Catalog/Model/Config.php b/app/code/Magento/Catalog/Model/Config.php index 3641dacd74f..c952319dd55 100644 --- a/app/code/Magento/Catalog/Model/Config.php +++ b/app/code/Magento/Catalog/Model/Config.php @@ -6,6 +6,8 @@ namespace Magento\Catalog\Model; /** * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Config extends \Magento\Eav\Model\Config { diff --git a/app/code/Magento/Catalog/Model/Entity/Attribute.php b/app/code/Magento/Catalog/Model/Entity/Attribute.php index e1e07eb8fe8..09e7fa2da41 100644 --- a/app/code/Magento/Catalog/Model/Entity/Attribute.php +++ b/app/code/Magento/Catalog/Model/Entity/Attribute.php @@ -42,6 +42,7 @@ use Magento\Framework\Api\AttributeDataBuilder; * @method \Magento\Catalog\Model\Entity\Attribute setIsWysiwygEnabled(int $value) * @method int getIsUsedForPromoRules() * @method \Magento\Catalog\Model\Entity\Attribute setIsUsedForPromoRules(int $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Attribute extends \Magento\Eav\Model\Entity\Attribute { @@ -85,6 +86,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/AffectCache.php b/app/code/Magento/Catalog/Model/Indexer/Category/AffectCache.php index 3858eb94fb0..3fa35baa61c 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/AffectCache.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/AffectCache.php @@ -28,6 +28,7 @@ class AffectCache * @param \Magento\Indexer\Model\ActionInterface $subject * @param array $ids * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeExecute(\Magento\Indexer\Model\ActionInterface $subject, $ids) { diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Flat/AbstractAction.php b/app/code/Magento/Catalog/Model/Indexer/Category/Flat/AbstractAction.php index 36d1e6d8ff1..a3d2ef62ea8 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Flat/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Flat/AbstractAction.php @@ -185,6 +185,7 @@ class AbstractAction * Return array of static columns * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function getStaticColumns() { diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/StoreGroup.php b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/StoreGroup.php index 86e060834d5..9c49984e040 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/StoreGroup.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/StoreGroup.php @@ -22,6 +22,7 @@ class StoreGroup * @param callable $proceed * @param \Magento\Framework\Model\AbstractModel $group * @return mixed + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundSave( \Magento\Framework\Model\Resource\Db\AbstractDb $subject, diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/AffectCache.php b/app/code/Magento/Catalog/Model/Indexer/Product/AffectCache.php index ea50c8e0cd8..2ecfb96c200 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/AffectCache.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/AffectCache.php @@ -28,6 +28,7 @@ class AffectCache * @param \Magento\Indexer\Model\ActionInterface $subject * @param array $ids * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeExecute(\Magento\Indexer\Model\ActionInterface $subject, $ids) { diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/AbstractAction.php b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/AbstractAction.php index 3cf1f0e15b7..c9d10aea74e 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/AbstractAction.php @@ -117,6 +117,7 @@ abstract class AbstractAction * @param array $tablesList * @param int|string $storeId * @return void + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _cleanOnFailure(array $tablesList, $storeId) { @@ -182,6 +183,7 @@ abstract class AbstractAction * @param int $storeId * @param int|array $productIds Update child product(s) only * @return \Magento\Catalog\Model\Indexer\Product\Flat\AbstractAction + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _updateRelationProducts($storeId, $productIds = null) { diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Indexer.php b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Indexer.php index 6f5911abbcf..893d6974a7e 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Indexer.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Indexer.php @@ -40,6 +40,8 @@ class Indexer * @param int $productId * @param string $valueFieldSuffix * @return \Magento\Catalog\Model\Indexer\Product\Flat + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function write($storeId, $productId, $valueFieldSuffix = '') { diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/FlatTableBuilder.php b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/FlatTableBuilder.php index deaa8d99049..d8a86e5a3df 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/FlatTableBuilder.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/FlatTableBuilder.php @@ -97,6 +97,8 @@ class FlatTableBuilder * @param int|string $storeId * @return void * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _createTemporaryFlatTable($storeId) { diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php index dbde7ffb868..891576e0269 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php @@ -7,6 +7,7 @@ namespace Magento\Catalog\Model\Indexer\Product\Price; /** * Abstract action reindex class * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractAction { @@ -443,6 +444,7 @@ abstract class AbstractAction * * @param array $changedIds * @return array Affected ids + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _reindexRows($changedIds = []) { diff --git a/app/code/Magento/Catalog/Model/Layer.php b/app/code/Magento/Catalog/Model/Layer.php index 64290646cd6..7f840567799 100644 --- a/app/code/Magento/Catalog/Model/Layer.php +++ b/app/code/Magento/Catalog/Model/Layer.php @@ -11,6 +11,7 @@ use Magento\Framework\Exception\NoSuchEntityException; * Catalog view layer model * * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Layer extends \Magento\Framework\Object { diff --git a/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/Auto.php b/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/Auto.php index 1020640c934..57b7981e013 100644 --- a/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/Auto.php +++ b/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/Auto.php @@ -12,6 +12,9 @@ use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\Registry; use Magento\Framework\Search\Dynamic\Algorithm; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Auto implements AlgorithmInterface { const MIN_RANGE_POWER = 10; diff --git a/app/code/Magento/Catalog/Model/Layer/Filter/Price.php b/app/code/Magento/Catalog/Model/Layer/Filter/Price.php index 2ac5447502c..30502703baa 100644 --- a/app/code/Magento/Catalog/Model/Layer/Filter/Price.php +++ b/app/code/Magento/Catalog/Model/Layer/Filter/Price.php @@ -8,6 +8,7 @@ namespace Magento\Catalog\Model\Layer\Filter; * Layer price filter * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Price extends \Magento\Catalog\Model\Layer\Filter\AbstractFilter { @@ -69,6 +70,7 @@ class Price extends \Magento\Catalog\Model\Layer\Filter\AbstractFilter * @param Dynamic\AlgorithmFactory $algorithmFactory * @param DataProvider\PriceFactory $dataProviderFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Catalog\Model\Layer\Filter\ItemFactory $filterItemFactory, diff --git a/app/code/Magento/Catalog/Model/Product.php b/app/code/Magento/Catalog/Model/Product.php index b26ffe5bdcf..095b707d217 100644 --- a/app/code/Magento/Catalog/Model/Product.php +++ b/app/code/Magento/Catalog/Model/Product.php @@ -28,6 +28,10 @@ use Magento\Framework\Pricing\Object\SaleableInterface; * @method Product setRequestPath(string $requestPath) * * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Product extends \Magento\Catalog\Model\AbstractModel implements IdentityInterface, @@ -639,6 +643,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements * @param int $groupId Retrieve attributes of the specified group * @param bool $skipSuper Not used * @return \Magento\Eav\Model\Entity\Attribute\AbstractAttribute[] + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getAttributes($groupId = null, $skipSuper = false) { @@ -661,6 +666,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements * Check product options and type options and save them, too * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function beforeSave() { @@ -1392,6 +1398,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements * Is product salable detecting by product type * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsSalable() { @@ -1678,6 +1685,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements * Retrieve is a virtual product * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsVirtual() { diff --git a/app/code/Magento/Catalog/Model/Product/Action.php b/app/code/Magento/Catalog/Model/Product/Action.php index 6cbd2373eed..f978227925c 100644 --- a/app/code/Magento/Catalog/Model/Product/Action.php +++ b/app/code/Magento/Catalog/Model/Product/Action.php @@ -116,6 +116,7 @@ class Action extends \Magento\Framework\Model\AbstractModel * * @param array $attributesData * @return bool + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _hasIndexableAttributes($attributesData) { diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractGroupprice.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractGroupprice.php index 157545a285e..2f07f6ea542 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractGroupprice.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractGroupprice.php @@ -108,6 +108,7 @@ abstract class AbstractGroupprice extends Price * * @param array $objectArray * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getAdditionalUniqueFields($objectArray) { @@ -131,6 +132,8 @@ abstract class AbstractGroupprice extends Price * @param \Magento\Catalog\Model\Product $object * @throws \Magento\Framework\Model\Exception * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validate($object) { @@ -283,6 +286,9 @@ abstract class AbstractGroupprice extends Price * * @param \Magento\Catalog\Model\Product $object * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function afterSave($object) { diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php index 956447517a5..73b845d5b71 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php @@ -13,6 +13,10 @@ namespace Magento\Catalog\Model\Product\Attribute\Backend; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Model\Exception; +/** + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Media extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend { /** @@ -163,6 +167,8 @@ class Media extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend /** * @param \Magento\Framework\Object $object * @return $this|void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function beforeSave($object) { @@ -253,6 +259,8 @@ class Media extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend /** * @param \Magento\Framework\Object $object * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function afterSave($object) { @@ -346,6 +354,8 @@ class Media extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend * @param boolean $exclude mark image as disabled in product page view * @return string * @throws Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function addImage( \Magento\Catalog\Model\Product $product, diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php index 545f93426d2..38a8019b837 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php @@ -95,6 +95,7 @@ class Price extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend * * @param \Magento\Catalog\Model\Product $object * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function afterSave($object) { diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php b/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php index 40ebe17214d..5aff918f971 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php @@ -8,6 +8,9 @@ namespace Magento\Catalog\Model\Product\Attribute; use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\NoSuchEntityException; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Repository implements \Magento\Catalog\Api\ProductAttributeRepositoryInterface { /** @@ -71,6 +74,7 @@ class Repository implements \Magento\Catalog\Api\ProductAttributeRepositoryInter * @param \Magento\Framework\Api\Config\MetadataConfig $metadataConfig * @param \Magento\Framework\Api\SearchCriteriaDataBuilder $searchCriteriaBuilder * @param \Magento\Framework\Api\FilterBuilder $filterBuilder + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Catalog\Model\Resource\Attribute $attributeResource, @@ -120,6 +124,8 @@ class Repository implements \Magento\Catalog\Api\ProductAttributeRepositoryInter /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function save(\Magento\Catalog\Api\Data\ProductAttributeInterface $attribute) { diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Source/Inputtype.php b/app/code/Magento/Catalog/Model/Product/Attribute/Source/Inputtype.php index 0275c94f307..b47b04bbbba 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Source/Inputtype.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Source/Inputtype.php @@ -38,6 +38,7 @@ class Inputtype extends \Magento\Eav\Model\Adminhtml\System\Config\Source\Inputt * Get product input types as option array * * @return array + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function toOptionArray() { diff --git a/app/code/Magento/Catalog/Model/Product/Compare/Item.php b/app/code/Magento/Catalog/Model/Product/Compare/Item.php index e63ab56b208..eab5830cc48 100644 --- a/app/code/Magento/Catalog/Model/Product/Compare/Item.php +++ b/app/code/Magento/Catalog/Model/Product/Compare/Item.php @@ -206,6 +206,7 @@ class Item extends \Magento\Framework\Model\AbstractModel implements \Magento\Fr * * @param \Magento\Framework\Event\Observer $observer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function bindCustomerLogout(\Magento\Framework\Event\Observer $observer = null) { diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/Entry.php b/app/code/Magento/Catalog/Model/Product/Gallery/Entry.php index 3b04efcf19b..72830eaa06b 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/Entry.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/Entry.php @@ -45,6 +45,7 @@ class Entry extends \Magento\Framework\Model\AbstractExtensibleModel implements * Check if gallery entry is hidden from product page * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsDisabled() { diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php b/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php index 6e46c6472e2..deb76aea5d4 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php @@ -14,6 +14,9 @@ use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Exception\StateException; use Magento\Framework\App\Filesystem\DirectoryList; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class GalleryManagement implements \Magento\Catalog\Api\ProductAttributeMediaGalleryManagementInterface { /** diff --git a/app/code/Magento/Catalog/Model/Product/GroupPriceManagement.php b/app/code/Magento/Catalog/Model/Product/GroupPriceManagement.php index 0a39a50e69f..20eb8a3d864 100644 --- a/app/code/Magento/Catalog/Model/Product/GroupPriceManagement.php +++ b/app/code/Magento/Catalog/Model/Product/GroupPriceManagement.php @@ -68,6 +68,8 @@ class GroupPriceManagement implements \Magento\Catalog\Api\ProductGroupPriceMana /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function add($productSku, $customerGroupId, $price) { diff --git a/app/code/Magento/Catalog/Model/Product/Image.php b/app/code/Magento/Catalog/Model/Product/Image.php index fbb66e6b0b9..1d69922c240 100644 --- a/app/code/Magento/Catalog/Model/Product/Image.php +++ b/app/code/Magento/Catalog/Model/Product/Image.php @@ -14,6 +14,11 @@ use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Image as MagentoImage; use Magento\Store\Model\Store; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Image extends \Magento\Framework\Model\AbstractModel { /** @@ -173,6 +178,8 @@ class Image extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -380,6 +387,7 @@ class Image extends \Magento\Framework\Model\AbstractModel /** * @param string|null $file * @return float|int + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getNeedMemoryForFile($file = null) { @@ -435,6 +443,8 @@ class Image extends \Magento\Framework\Model\AbstractModel * @param string $file * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function setBaseFile($file) { @@ -610,6 +620,7 @@ class Image extends \Magento\Framework\Model\AbstractModel * @param int $height * @param int $opacity * @return $this + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function setWatermark( $file, diff --git a/app/code/Magento/Catalog/Model/Product/Option.php b/app/code/Magento/Catalog/Model/Product/Option.php index 9311b734426..cdc0c608ba6 100644 --- a/app/code/Magento/Catalog/Model/Product/Option.php +++ b/app/code/Magento/Catalog/Model/Product/Option.php @@ -21,6 +21,7 @@ use Magento\Framework\Model\Exception; * @method \Magento\Catalog\Model\Product\Option setProductId(int $value) * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Option extends AbstractExtensibleModel implements \Magento\Catalog\Api\Data\ProductCustomOptionInterface { @@ -103,6 +104,7 @@ class Option extends AbstractExtensibleModel implements \Magento\Catalog\Api\Dat * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -312,6 +314,7 @@ class Option extends AbstractExtensibleModel implements \Magento\Catalog\Api\Dat * Save options. * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function saveOptions() { @@ -625,6 +628,7 @@ class Option extends AbstractExtensibleModel implements \Magento\Catalog\Api\Dat * Get is require * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsRequire() { diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/Date.php b/app/code/Magento/Catalog/Model/Product/Option/Type/Date.php index 3fc88c0b44b..79375a07041 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Type/Date.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Type/Date.php @@ -43,6 +43,8 @@ class Date extends \Magento\Catalog\Model\Product\Option\Type\DefaultType * @param array $values All product option values, i.e. array (option_id => mixed, option_id => mixed...) * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validateUserValue($values) { @@ -116,6 +118,8 @@ class Date extends \Magento\Catalog\Model\Product\Option\Type\DefaultType * * @return string|null Prepared option value * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function prepareForCart() { @@ -174,6 +178,7 @@ class Date extends \Magento\Catalog\Model\Product\Option\Type\DefaultType * * @param string $optionValue Prepared for cart option value * @return string + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getFormattedOptionValue($optionValue) { diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php b/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php index 6a42182e7b0..76a465081d4 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php @@ -10,6 +10,7 @@ use Magento\Framework\Model\Exception; * Catalog product option default type * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class DefaultType extends \Magento\Framework\Object { @@ -215,6 +216,7 @@ class DefaultType extends \Magento\Framework\Object * Check skip required option validation * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getSkipCheckRequiredOption() { @@ -297,6 +299,7 @@ class DefaultType extends \Magento\Framework\Object * @param string $optionValue * @param array $productOptionValues Values for product option * @return string|null + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function parseOptionValue($optionValue, $productOptionValues) { @@ -320,6 +323,7 @@ class DefaultType extends \Magento\Framework\Object * @param string $optionValue Prepared for cart option value * @param float $basePrice For percent price type * @return float + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getOptionPrice($optionValue, $basePrice) { @@ -334,6 +338,7 @@ class DefaultType extends \Magento\Framework\Object * @param string $optionValue Prepared for cart option value * @param string $skuDelimiter Delimiter for Sku parts * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getOptionSku($optionValue, $skuDelimiter) { diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/File.php b/app/code/Magento/Catalog/Model/Product/Option/Type/File.php index e3ebe2cedf0..b50046bf3bd 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Type/File.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Type/File.php @@ -11,6 +11,7 @@ use Magento\Framework\Model\Exception; * Catalog product option file type * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType { @@ -178,6 +179,7 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType * @param array $values All product option values, i.e. array (option_id => mixed, option_id => mixed...) * @return $this * @throws Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function validateUserValue($values) { diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/File/ValidatorFile.php b/app/code/Magento/Catalog/Model/Product/Option/Type/File/ValidatorFile.php index 8ddcbf00db9..d9af28723ba 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Type/File/ValidatorFile.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Type/File/ValidatorFile.php @@ -8,6 +8,9 @@ namespace Magento\Catalog\Model\Product\Option\Type\File; use Magento\Catalog\Model\Product; use Magento\Framework\App\Filesystem\DirectoryList; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class ValidatorFile extends Validator { /** @@ -86,6 +89,7 @@ class ValidatorFile extends Validator * @return array * @throws \Magento\Framework\Model\Exception * @throws \Zend_File_Transfer_Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function validate($processingParams, $option) { diff --git a/app/code/Magento/Catalog/Model/Product/Option/Validator/Select.php b/app/code/Magento/Catalog/Model/Product/Option/Validator/Select.php index 95dec4ea4f6..3c79ad4a14e 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Validator/Select.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Validator/Select.php @@ -30,6 +30,8 @@ class Select extends DefaultValidator * * @param Option $option * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function validateOptionValue(Option $option) { diff --git a/app/code/Magento/Catalog/Model/Product/PriceModifier.php b/app/code/Magento/Catalog/Model/Product/PriceModifier.php index e6b61b5dde7..e7f68876074 100644 --- a/app/code/Magento/Catalog/Model/Product/PriceModifier.php +++ b/app/code/Magento/Catalog/Model/Product/PriceModifier.php @@ -69,6 +69,7 @@ class PriceModifier * @throws \Magento\Framework\Exception\NoSuchEntityException * @throws \Magento\Framework\Exception\CouldNotSaveException * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function removeTierPrice(\Magento\Catalog\Model\Product $product, $customerGroupId, $qty, $websiteId) { diff --git a/app/code/Magento/Catalog/Model/Product/TierPriceManagement.php b/app/code/Magento/Catalog/Model/Product/TierPriceManagement.php index a0b2ef64401..e561fa8f110 100644 --- a/app/code/Magento/Catalog/Model/Product/TierPriceManagement.php +++ b/app/code/Magento/Catalog/Model/Product/TierPriceManagement.php @@ -12,6 +12,9 @@ use Magento\Customer\Api\GroupRepositoryInterface; use Magento\Framework\Exception\CouldNotSaveException; use Magento\Framework\Exception\InputException; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class TierPriceManagement implements \Magento\Catalog\Api\ProductTierPriceManagementInterface { /** diff --git a/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php b/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php index 1b9fcdff10f..1c173d2795c 100644 --- a/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php +++ b/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php @@ -9,6 +9,10 @@ use Magento\Framework\App\Filesystem\DirectoryList; /** * Abstract model for product type implementation + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractType { @@ -166,6 +170,7 @@ abstract class AbstractType * @param \Magento\Framework\Registry $coreRegistry * @param \Psr\Log\LoggerInterface $logger * @param ProductRepositoryInterface $productRepository + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Catalog\Model\Product\Option $catalogProductOption, @@ -224,6 +229,7 @@ abstract class AbstractType * @param int $parentId * @param bool $required * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getChildrenIds($parentId, $required = true) { @@ -235,6 +241,7 @@ abstract class AbstractType * * @param int|array $childId * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getParentIdsByChild($childId) { @@ -318,6 +325,7 @@ abstract class AbstractType * * @param \Magento\Catalog\Model\Product $product * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function isVirtual($product) { @@ -348,6 +356,7 @@ abstract class AbstractType * @param \Magento\Catalog\Model\Product $product * @param string $processMode * @return array|string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareProduct(\Magento\Framework\Object $buyRequest, $product, $processMode) { @@ -461,6 +470,8 @@ abstract class AbstractType * * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function processFileQueue() { @@ -713,6 +724,7 @@ abstract class AbstractType * * @param \Magento\Catalog\Model\Product $product * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function isComposite($product) { @@ -724,6 +736,7 @@ abstract class AbstractType * * @param \Magento\Catalog\Model\Product $product * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function canConfigure($product) { @@ -827,6 +840,7 @@ abstract class AbstractType * @param \Magento\Catalog\Model\Product $product * * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function updateQtyOption($options, \Magento\Framework\Object $option, $value, $product) { @@ -879,6 +893,8 @@ abstract class AbstractType * * @param \Magento\Catalog\Model\Product $product * @return boolean false + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getForceChildItemQtyChanges($product) { @@ -891,6 +907,7 @@ abstract class AbstractType * @param int|float $qty * @param \Magento\Catalog\Model\Product $product * @return float + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function prepareQuoteItemQty($qty, $product) { @@ -974,6 +991,7 @@ abstract class AbstractType * @param \Magento\Catalog\Model\Product $product * @param \Magento\Framework\Object $buyRequest * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function processBuyRequest($product, $buyRequest) { @@ -1027,6 +1045,7 @@ abstract class AbstractType * * @param \Magento\Catalog\Model\Product $product * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setImageFromChildProduct(\Magento\Catalog\Model\Product $product) { @@ -1038,6 +1057,7 @@ abstract class AbstractType * * @param \Magento\Catalog\Model\Product $product * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getIdentities(\Magento\Catalog\Model\Product $product) { @@ -1047,6 +1067,7 @@ abstract class AbstractType /** * @param \Magento\Catalog\Model\Product\Type\AbstractType $product * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getAssociatedProducts($product) { diff --git a/app/code/Magento/Catalog/Model/Product/Type/Price.php b/app/code/Magento/Catalog/Model/Product/Type/Price.php index d183d530ecc..5100305fcda 100644 --- a/app/code/Magento/Catalog/Model/Product/Type/Price.php +++ b/app/code/Magento/Catalog/Model/Product/Type/Price.php @@ -156,6 +156,7 @@ class Price * @param Product $childProduct * @param float $childProductQty * @return float + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getChildFinalPrice($product, $productQty, $childProduct, $childProductQty) { @@ -242,6 +243,8 @@ class Price * @param Product $product * @return float|array * @deprecated (MAGETWO-31465) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getTierPrice($qty, $product) { @@ -409,6 +412,7 @@ class Price * @param float $finalPrice * @return float * @deprecated (MAGETWO-31469) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _applyOptionsPrice($product, $qty, $finalPrice) { diff --git a/app/code/Magento/Catalog/Model/Product/Url.php b/app/code/Magento/Catalog/Model/Product/Url.php index 0a679bb7e5b..09a220ae3fa 100644 --- a/app/code/Magento/Catalog/Model/Product/Url.php +++ b/app/code/Magento/Catalog/Model/Product/Url.php @@ -157,6 +157,8 @@ class Url extends \Magento\Framework\Object * @param \Magento\Catalog\Model\Product $product * @param array $params * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getUrl(\Magento\Catalog\Model\Product $product, $params = []) { diff --git a/app/code/Magento/Catalog/Model/Product/Validator.php b/app/code/Magento/Catalog/Model/Product/Validator.php index 9033f21f509..47ac5951c70 100644 --- a/app/code/Magento/Catalog/Model/Product/Validator.php +++ b/app/code/Magento/Catalog/Model/Product/Validator.php @@ -17,6 +17,7 @@ class Validator * @param RequestInterface $request * @param \Magento\Framework\Object $response * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function validate(Product $product, RequestInterface $request, \Magento\Framework\Object $response) { diff --git a/app/code/Magento/Catalog/Model/ProductRepository.php b/app/code/Magento/Catalog/Model/ProductRepository.php index 10931b04a15..b92f454535a 100644 --- a/app/code/Magento/Catalog/Model/ProductRepository.php +++ b/app/code/Magento/Catalog/Model/ProductRepository.php @@ -10,6 +10,9 @@ use Magento\Framework\Api\SearchCriteriaInterface; use Magento\Framework\Api\SortOrder; use Magento\Framework\Exception\NoSuchEntityException; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class ProductRepository implements \Magento\Catalog\Api\ProductRepositoryInterface { /** diff --git a/app/code/Magento/Catalog/Model/Resource/AbstractResource.php b/app/code/Magento/Catalog/Model/Resource/AbstractResource.php index cfeb545ae90..ecb67e61160 100644 --- a/app/code/Magento/Catalog/Model/Resource/AbstractResource.php +++ b/app/code/Magento/Catalog/Model/Resource/AbstractResource.php @@ -8,6 +8,7 @@ use Magento\Eav\Model\Entity\Attribute\AbstractAttribute; /** * Catalog entity abstract model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractResource extends \Magento\Eav\Model\Entity\AbstractEntity { @@ -531,6 +532,9 @@ abstract class AbstractResource extends \Magento\Eav\Model\Entity\AbstractEntity * @param int|string|array $attribute atrribute's ids or codes * @param int|\Magento\Store\Model\Store $store * @return bool|string|array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getAttributeRawValue($entityId, $attribute, $store) { diff --git a/app/code/Magento/Catalog/Model/Resource/Category.php b/app/code/Magento/Catalog/Model/Resource/Category.php index 6eebb369d2b..7dfdc494991 100644 --- a/app/code/Magento/Catalog/Model/Resource/Category.php +++ b/app/code/Magento/Catalog/Model/Resource/Category.php @@ -10,6 +10,9 @@ */ namespace Magento\Catalog\Model\Resource; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Category extends AbstractResource { /** @@ -325,6 +328,8 @@ class Category extends AbstractResource * * @param \Magento\Catalog\Model\Category $category * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _saveCategoryProducts($category) { diff --git a/app/code/Magento/Catalog/Model/Resource/Category/Collection.php b/app/code/Magento/Catalog/Model/Resource/Category/Collection.php index d219fd60332..db33f16fc64 100644 --- a/app/code/Magento/Catalog/Model/Resource/Category/Collection.php +++ b/app/code/Magento/Catalog/Model/Resource/Category/Collection.php @@ -200,6 +200,8 @@ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractColl * @param boolean $countRegular get product count for regular (non-anchor) categories * @param boolean $countAnchor get product count for anchor categories * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function loadProductCount($items, $countRegular = true, $countAnchor = true) { diff --git a/app/code/Magento/Catalog/Model/Resource/Category/Tree.php b/app/code/Magento/Catalog/Model/Resource/Category/Tree.php index 0aabf40c99e..2659ca7ac60 100644 --- a/app/code/Magento/Catalog/Model/Resource/Category/Tree.php +++ b/app/code/Magento/Catalog/Model/Resource/Category/Tree.php @@ -4,6 +4,9 @@ */ namespace Magento\Catalog\Model\Resource\Category; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Tree extends \Magento\Framework\Data\Tree\Dbp { const ID_FIELD = 'id'; @@ -156,6 +159,8 @@ class Tree extends \Magento\Framework\Data\Tree\Dbp * @param boolean $toLoad * @param boolean $onlyActive * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function addCollectionData( $collection = null, @@ -323,6 +328,7 @@ class Tree extends \Magento\Framework\Data\Tree\Dbp * * @param int $id * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ protected function _getItemIsActive($id) { @@ -436,6 +442,8 @@ class Tree extends \Magento\Framework\Data\Tree\Dbp * @param bool $addCollectionData * @param bool $updateAnchorProductCount * @return $this|bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function loadByIds($ids, $addCollectionData = true, $updateAnchorProductCount = true) { diff --git a/app/code/Magento/Catalog/Model/Resource/Eav/Attribute.php b/app/code/Magento/Catalog/Model/Resource/Eav/Attribute.php index 4b573832cd0..da3f8ce04f1 100644 --- a/app/code/Magento/Catalog/Model/Resource/Eav/Attribute.php +++ b/app/code/Magento/Catalog/Model/Resource/Eav/Attribute.php @@ -35,6 +35,7 @@ use Magento\Framework\Api\AttributeDataBuilder; * @method int setIsUsedForPromoRules(int $value) * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Attribute extends \Magento\Eav\Model\Entity\Attribute implements \Magento\Catalog\Api\Data\ProductAttributeInterface @@ -112,6 +113,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute implements * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -174,6 +176,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute implements * * @return \Magento\Framework\Model\AbstractModel * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function beforeSave() { @@ -411,6 +414,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute implements * Check is an attribute used in EAV index * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isIndexable() { @@ -441,6 +445,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute implements * Is original attribute config indexable * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _isOriginalIndexable() { diff --git a/app/code/Magento/Catalog/Model/Resource/Helper.php b/app/code/Magento/Catalog/Model/Resource/Helper.php index ef2f15133bd..23d92bfaf59 100644 --- a/app/code/Magento/Catalog/Model/Resource/Helper.php +++ b/app/code/Magento/Catalog/Model/Resource/Helper.php @@ -29,6 +29,7 @@ class Helper extends \Magento\Eav\Model\Resource\Helper * @param array $column * @param array $describe * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function compareIndexColumnProperties($column, $describe) { diff --git a/app/code/Magento/Catalog/Model/Resource/Product.php b/app/code/Magento/Catalog/Model/Resource/Product.php index 5cdb5ec2ad7..ac205a6e705 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product.php +++ b/app/code/Magento/Catalog/Model/Resource/Product.php @@ -8,6 +8,7 @@ namespace Magento\Catalog\Model\Resource; * Product entity resource model * * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Product extends AbstractResource { @@ -310,6 +311,7 @@ class Product extends AbstractResource * * @param \Magento\Framework\Object $object * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _saveCategories(\Magento\Framework\Object $object) { diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Collection.php b/app/code/Magento/Catalog/Model/Resource/Product/Collection.php index 73b7c3cb603..cc0bb42dd95 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Collection.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Collection.php @@ -12,6 +12,11 @@ use Magento\Store\Model\Store; /** * Product collection + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.NumberOfChildren) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractCollection { @@ -1389,6 +1394,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractColl * @param array $condition * @param string $joinType * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function addAttributeToFilter($attribute, $condition = null, $joinType = 'inner') { @@ -1528,6 +1534,8 @@ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractColl * @param string $attribute * @param string $dir * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function addAttributeToSort($attribute, $dir = self::SORT_ORDER_ASC) { @@ -1625,6 +1633,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractColl * Join website product limitation * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _productLimitationJoinWebsite() { @@ -1677,6 +1686,8 @@ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractColl * Join additional (alternative) store visibility filter * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _productLimitationJoinStore() { @@ -1976,6 +1987,8 @@ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractColl * Add tier price data to loaded items * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function addTierPriceData() { diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Compare/Item/Collection.php b/app/code/Magento/Catalog/Model/Resource/Product/Compare/Item/Collection.php index c82e9ed4d6f..16c66cc6115 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Compare/Item/Collection.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Compare/Item/Collection.php @@ -9,6 +9,7 @@ namespace Magento\Catalog\Model\Resource\Product\Compare\Item; * * @author Magento Core Team <core@magentocommerce.com> * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection { diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price/DefaultPrice.php b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price/DefaultPrice.php index 5f30b32bc23..c5763f1ac0a 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price/DefaultPrice.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price/DefaultPrice.php @@ -109,6 +109,7 @@ class DefaultPrice extends \Magento\Catalog\Model\Resource\Product\Indexer\Abstr * Check product type is composite * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsComposite() { @@ -202,6 +203,7 @@ class DefaultPrice extends \Magento\Catalog\Model\Resource\Product\Indexer\Abstr * * @param int|array $entityIds the entity ids limitation * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareFinalPriceData($entityIds = null) { @@ -390,6 +392,7 @@ class DefaultPrice extends \Magento\Catalog\Model\Resource\Product\Indexer\Abstr * Apply custom option minimal and maximal price to temporary final price index table * * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _applyCustomOption() { diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Link.php b/app/code/Magento/Catalog/Model/Resource/Product/Link.php index e2883afd0ba..799d804d8ed 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Link.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Link.php @@ -53,6 +53,7 @@ class Link extends \Magento\Framework\Model\Resource\Db\AbstractDb * @param array $data * @param int $typeId * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function saveProductLinks($product, $data, $typeId) { diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Option.php b/app/code/Magento/Catalog/Model/Resource/Product/Option.php index 59dccbe862a..510ee1ac088 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Option.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Option.php @@ -81,6 +81,8 @@ class Option extends \Magento\Framework\Model\Resource\Db\AbstractDb * * @param \Magento\Framework\Model\AbstractModel $object * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _saveValuePrices(\Magento\Framework\Model\AbstractModel $object) { @@ -229,6 +231,7 @@ class Option extends \Magento\Framework\Model\Resource\Db\AbstractDb * * @param \Magento\Framework\Model\AbstractModel $object * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _saveValueTitles(\Magento\Framework\Model\AbstractModel $object) { diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Option/Value.php b/app/code/Magento/Catalog/Model/Resource/Product/Option/Value.php index 088e77ed2e2..bbb415ed1b8 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Option/Value.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Option/Value.php @@ -82,6 +82,8 @@ class Value extends \Magento\Framework\Model\Resource\Db\AbstractDb * * @param \Magento\Framework\Model\AbstractModel $object * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _saveValuePrices(\Magento\Framework\Model\AbstractModel $object) { @@ -208,6 +210,7 @@ class Value extends \Magento\Framework\Model\Resource\Db\AbstractDb * * @param \Magento\Framework\Model\AbstractModel $object * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _saveValueTitles(\Magento\Framework\Model\AbstractModel $object) { diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Option/Value/Collection.php b/app/code/Magento/Catalog/Model/Resource/Product/Option/Value/Collection.php index c28f18ff31e..a1878d96976 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Option/Value/Collection.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Option/Value/Collection.php @@ -187,6 +187,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * @param array $optionIds * @param int $storeId * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getValuesByOption($optionIds, $storeId = null) { diff --git a/app/code/Magento/Catalog/Model/Resource/Setup.php b/app/code/Magento/Catalog/Model/Resource/Setup.php index bb2713d989c..7b3193814e8 100644 --- a/app/code/Magento/Catalog/Model/Resource/Setup.php +++ b/app/code/Magento/Catalog/Model/Resource/Setup.php @@ -80,6 +80,7 @@ class Setup extends \Magento\Eav\Model\Entity\Setup * Default entites and attributes * * @return array + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getDefaultEntities() { diff --git a/app/code/Magento/Catalog/Model/Resource/Url.php b/app/code/Magento/Catalog/Model/Resource/Url.php index eacf7eceddc..85be258b809 100644 --- a/app/code/Magento/Catalog/Model/Resource/Url.php +++ b/app/code/Magento/Catalog/Model/Resource/Url.php @@ -362,6 +362,8 @@ class Url extends \Magento\Framework\Model\Resource\Db\AbstractDb * @param int $storeId * @param string $path * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getCategories($categoryIds, $storeId = null, $path = null) { diff --git a/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php b/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php index 922a5d28548..2ffc5553043 100644 --- a/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php +++ b/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php @@ -17,6 +17,9 @@ use Magento\Store\Model\ScopeInterface; use Magento\UrlRewrite\Model\Storage\DbStorage; use Magento\UrlRewrite\Service\V1\Data\UrlRewrite; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Suffix extends \Magento\Framework\App\Config\Value { /** @var \Magento\UrlRewrite\Helper\UrlRewrite */ @@ -42,6 +45,7 @@ class Suffix extends \Magento\Framework\App\Config\Value * @param \Magento\Framework\App\Resource $appResource * @param \Magento\UrlRewrite\Model\UrlFinderInterface $urlFinder * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Catalog/Pricing/Price/TierPrice.php b/app/code/Magento/Catalog/Pricing/Price/TierPrice.php index 58542994dc4..757eb4dd4f1 100644 --- a/app/code/Magento/Catalog/Pricing/Price/TierPrice.php +++ b/app/code/Magento/Catalog/Pricing/Price/TierPrice.php @@ -249,6 +249,7 @@ class TierPrice extends AbstractPrice implements TierPriceInterface, BasePricePr * Get clear tier price list stored in DB * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function getStoredTierPrices() { diff --git a/app/code/Magento/Catalog/Pricing/Render/PriceBox.php b/app/code/Magento/Catalog/Pricing/Render/PriceBox.php index 0e2b2e84f9e..a99acfa5cb5 100644 --- a/app/code/Magento/Catalog/Pricing/Render/PriceBox.php +++ b/app/code/Magento/Catalog/Pricing/Render/PriceBox.php @@ -83,6 +83,7 @@ class PriceBox extends PriceBoxRender * * @param Product $product * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCanDisplayQty(Product $product) { diff --git a/app/code/Magento/CatalogImportExport/Model/Export/Product.php b/app/code/Magento/CatalogImportExport/Model/Export/Product.php index c3d0f1d7943..1cfbecff666 100644 --- a/app/code/Magento/CatalogImportExport/Model/Export/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Export/Product.php @@ -8,6 +8,9 @@ namespace Magento\CatalogImportExport\Model\Export; * Export entity product model * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity { @@ -212,6 +215,7 @@ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity * @param Product\Type\Factory $_typeFactory * @param \Magento\Catalog\Model\Product\LinkTypeProvider $linkTypeProvider * @param \Magento\CatalogImportExport\Model\Export\RowCustomizerInterface $rowCustomizer + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, @@ -758,6 +762,10 @@ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity * Get export data for collection * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _getExportData() { diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index 60bcd0528cf..0164b490e1c 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -8,6 +8,9 @@ use Magento\Framework\App\Filesystem\DirectoryList; /** * Import entity product model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity { @@ -524,6 +527,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity * @param \Magento\Indexer\Model\IndexerRegistry $indexerRegistry * @param array $data * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Core\Helper\Data $coreData, @@ -824,6 +828,8 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity * @param array $rowData * @param int $rowNum * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _isProductCategoryValid(array $rowData, $rowNum) { @@ -892,6 +898,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity * @param array $rowData * @param int $rowNum * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _isTierPriceValid(array $rowData, $rowNum) { @@ -959,6 +966,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity * @param array $rowData * @param int $rowNum * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _isGroupPriceValid(array $rowData, $rowNum) { @@ -1049,6 +1057,9 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity * Must be called after ALL products saving done. * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _saveLinks() { @@ -1282,6 +1293,9 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity * Gather and save information about product entities. * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _saveProducts() { @@ -1636,6 +1650,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity * * @param array $mediaGalleryData * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _saveMediaGallery(array $mediaGalleryData) { @@ -1918,6 +1933,9 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity * @param array $rowData * @param int $rowNum * @return boolean + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function validateRow(array $rowData, $rowNum) { diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php index 52639e64620..bb1c2245c6b 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php @@ -1168,6 +1168,7 @@ class Option extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity * @param array &$parentCount * @param array &$childCount * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _collectOptionTypeData( array $rowData, @@ -1437,6 +1438,7 @@ class Option extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity * @param int $optionTypeId * @param bool $defaultStore * @return array|false + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _getSpecificTypeData(array $rowData, $optionTypeId, $defaultStore = true) { diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/Type/AbstractType.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/Type/AbstractType.php index 8685e70537f..9baf5e1afaa 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Type/AbstractType.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Type/AbstractType.php @@ -122,6 +122,7 @@ abstract class AbstractType * @param array $attrParams Refined attribute parameters. * @param mixed $attribute * @return \Magento\CatalogImportExport\Model\Import\Product\Type\AbstractType + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _addAttributeParams($attrSetName, array $attrParams, $attribute) { @@ -200,6 +201,7 @@ abstract class AbstractType * * @param string $attrCode * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _isAttributeRequiredCheckNeeded($attrCode) { @@ -212,6 +214,7 @@ abstract class AbstractType * @param array $rowData * @param int $rowNum * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _isParticularAttributesValid(array $rowData, $rowNum) { @@ -246,6 +249,7 @@ abstract class AbstractType * @param int $rowNum * @param bool $isNewProduct Optional * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isRowValid(array $rowData, $rowNum, $isNewProduct = true) { @@ -300,6 +304,7 @@ abstract class AbstractType * @param bool $withDefaultValue * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function prepareAttributesWithDefaultValueForSave(array $rowData, $withDefaultValue = true) { diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php index 30a605e1a75..909f3b9d42d 100644 --- a/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php +++ b/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php @@ -91,16 +91,19 @@ interface StockItemInterface extends ExtensibleDataInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsQtyDecimal(); /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getShowDefaultNotificationMessage(); /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigMinQty(); @@ -125,6 +128,7 @@ interface StockItemInterface extends ExtensibleDataInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigMaxSaleQty(); @@ -137,6 +141,7 @@ interface StockItemInterface extends ExtensibleDataInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigBackorders(); @@ -149,6 +154,7 @@ interface StockItemInterface extends ExtensibleDataInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigNotifyStockQty(); @@ -161,6 +167,7 @@ interface StockItemInterface extends ExtensibleDataInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigQtyIncrements(); @@ -173,6 +180,7 @@ interface StockItemInterface extends ExtensibleDataInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigEnableQtyInc(); @@ -180,11 +188,13 @@ interface StockItemInterface extends ExtensibleDataInterface * Retrieve whether Quantity Increments is enabled * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getEnableQtyIncrements(); /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigManageStock(); @@ -192,6 +202,7 @@ interface StockItemInterface extends ExtensibleDataInterface * Retrieve can Manage Stock * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getManageStock(); @@ -202,6 +213,7 @@ interface StockItemInterface extends ExtensibleDataInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsDecimalDivided(); diff --git a/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php b/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php index 34b34a6ad08..28a538ece58 100644 --- a/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php @@ -68,6 +68,7 @@ interface StockConfigurationInterface * * @param int $storeId * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getEnableQtyIncrements($storeId = null); @@ -98,6 +99,7 @@ interface StockConfigurationInterface * * @param int $storeId * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCanBackInStock($storeId = null); diff --git a/app/code/Magento/CatalogInventory/Helper/Stock.php b/app/code/Magento/CatalogInventory/Helper/Stock.php index 0e3233a749f..01301a64318 100644 --- a/app/code/Magento/CatalogInventory/Helper/Stock.php +++ b/app/code/Magento/CatalogInventory/Helper/Stock.php @@ -83,6 +83,7 @@ class Stock * * @param \Magento\Catalog\Model\Resource\Collection\AbstractCollection $productCollection * @return void + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function addStockStatusToProducts( \Magento\Catalog\Model\Resource\Collection\AbstractCollection $productCollection diff --git a/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php b/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php index 4c0be1afe7f..b8a17f45f69 100644 --- a/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php +++ b/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php @@ -35,6 +35,7 @@ class Item extends \Magento\CatalogInventory\Model\Stock\Item * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -112,6 +113,7 @@ class Item extends \Magento\CatalogInventory\Model\Stock\Item /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getShowDefaultNotificationMessage() { diff --git a/app/code/Magento/CatalogInventory/Model/Configuration.php b/app/code/Magento/CatalogInventory/Model/Configuration.php index f9705bdf870..755df20868d 100644 --- a/app/code/Magento/CatalogInventory/Model/Configuration.php +++ b/app/code/Magento/CatalogInventory/Model/Configuration.php @@ -254,6 +254,7 @@ class Configuration implements StockConfigurationInterface * * @param null|string|bool|int|\Magento\Store\Model\Store $store * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getEnableQtyIncrements($store = null) { @@ -312,6 +313,7 @@ class Configuration implements StockConfigurationInterface * * @param null|string|bool|int|\Magento\Store\Model\Store $store * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCanBackInStock($store = null) { diff --git a/app/code/Magento/CatalogInventory/Model/Observer.php b/app/code/Magento/CatalogInventory/Model/Observer.php index a10c6d80870..d5f2bb21e7e 100644 --- a/app/code/Magento/CatalogInventory/Model/Observer.php +++ b/app/code/Magento/CatalogInventory/Model/Observer.php @@ -15,6 +15,7 @@ use Magento\Sales\Model\Quote\Item as QuoteItem; /** * Catalog inventory module observer + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Observer { diff --git a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php index 18c5eeeb34a..fcf9b51b8a3 100644 --- a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php +++ b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php @@ -56,6 +56,9 @@ class QuantityValidator * * @return void * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function validate(\Magento\Framework\Event\Observer $observer) { diff --git a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/StockItem.php b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/StockItem.php index 642152da6e8..6a362336cf2 100644 --- a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/StockItem.php +++ b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/StockItem.php @@ -49,6 +49,8 @@ class StockItem * * @return \Magento\Framework\Object * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function initialize( \Magento\CatalogInventory\Api\Data\StockItemInterface $stockItem, diff --git a/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/DefaultStock.php b/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/DefaultStock.php index c9d48baae84..a212b6c13dd 100644 --- a/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/DefaultStock.php +++ b/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/DefaultStock.php @@ -131,6 +131,7 @@ class DefaultStock extends \Magento\Catalog\Model\Resource\Product\Indexer\Abstr * Check product type is composite * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsComposite() { @@ -156,6 +157,7 @@ class DefaultStock extends \Magento\Catalog\Model\Resource\Product\Indexer\Abstr * @param int|array $entityIds * @param bool $usePrimaryTable use primary or temporary index table * @return \Magento\Framework\DB\Select + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getStockStatusSelect($entityIds = null, $usePrimaryTable = false) { diff --git a/app/code/Magento/CatalogInventory/Model/Stock/Item.php b/app/code/Magento/CatalogInventory/Model/Stock/Item.php index bfb3d1fcec2..17c0711d921 100644 --- a/app/code/Magento/CatalogInventory/Model/Stock/Item.php +++ b/app/code/Magento/CatalogInventory/Model/Stock/Item.php @@ -39,6 +39,7 @@ use Magento\Framework\Model\AbstractExtensibleModel; * @method \Magento\CatalogInventory\Model\Stock\Item setQtyIncrements(float $value) * @method \Magento\CatalogInventory\Model\Stock\Item setUseConfigEnableQtyInc(int $value) * @method \Magento\CatalogInventory\Model\Stock\Item setEnableQtyIncrements(int $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Item extends AbstractExtensibleModel implements StockItemInterface { @@ -122,6 +123,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -211,6 +213,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getStockStatusChangedAuto() { @@ -240,6 +243,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsQtyDecimal() { @@ -248,6 +252,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsDecimalDivided() { @@ -266,6 +271,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface * Check if notification message should be added despite of backorders notification flag * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getShowDefaultNotificationMessage() { @@ -274,6 +280,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigMinQty() { @@ -297,6 +304,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigMinSaleQty() { @@ -320,6 +328,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigMaxSaleQty() { @@ -344,6 +353,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigNotifyStockQty() { @@ -365,6 +375,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigEnableQtyInc() { @@ -375,6 +386,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface * Retrieve whether Quantity Increments is enabled * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getEnableQtyIncrements() { @@ -388,6 +400,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface * Retrieve whether config for Quantity Increments should be used * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigQtyIncrements() { @@ -418,6 +431,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigBackorders() { @@ -439,6 +453,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigManageStock() { diff --git a/app/code/Magento/CatalogInventory/Model/Stock/StockItemRepository.php b/app/code/Magento/CatalogInventory/Model/Stock/StockItemRepository.php index 8d74e574c3a..46f65da7664 100644 --- a/app/code/Magento/CatalogInventory/Model/Stock/StockItemRepository.php +++ b/app/code/Magento/CatalogInventory/Model/Stock/StockItemRepository.php @@ -22,6 +22,7 @@ use Magento\Framework\Stdlib\DateTime\TimezoneInterface; /** * Class StockItemRepository + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class StockItemRepository implements StockItemRepositoryInterface { @@ -86,6 +87,7 @@ class StockItemRepository implements StockItemRepositoryInterface * @param MapperFactory $mapperFactory * @param TimezoneInterface $localeDate * @param Processor $indexProcessor + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( StockConfigurationInterface $stockConfiguration, diff --git a/app/code/Magento/CatalogInventory/Model/Stock/StockRepository.php b/app/code/Magento/CatalogInventory/Model/Stock/StockRepository.php index cfd5cc8d9a2..01d0d54b574 100644 --- a/app/code/Magento/CatalogInventory/Model/Stock/StockRepository.php +++ b/app/code/Magento/CatalogInventory/Model/Stock/StockRepository.php @@ -17,6 +17,7 @@ use Magento\Framework\Exception\NoSuchEntityException; /** * Class StockRepository + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class StockRepository implements StockRepositoryInterface { diff --git a/app/code/Magento/CatalogInventory/Model/Stock/StockStatusRepository.php b/app/code/Magento/CatalogInventory/Model/Stock/StockStatusRepository.php index e3eb4bc1c57..613f20e6ed4 100644 --- a/app/code/Magento/CatalogInventory/Model/Stock/StockStatusRepository.php +++ b/app/code/Magento/CatalogInventory/Model/Stock/StockStatusRepository.php @@ -15,6 +15,7 @@ use Magento\Framework\Exception\CouldNotSaveException; /** * Class StockStatusRepository + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class StockStatusRepository implements StockStatusRepositoryInterface { diff --git a/app/code/Magento/CatalogInventory/Model/StockIndex.php b/app/code/Magento/CatalogInventory/Model/StockIndex.php index 1bf059039ce..c7a1d895e09 100644 --- a/app/code/Magento/CatalogInventory/Model/StockIndex.php +++ b/app/code/Magento/CatalogInventory/Model/StockIndex.php @@ -74,6 +74,7 @@ class StockIndex implements StockIndexInterface * @param int $productId * @param int $websiteId * @return true + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function rebuild($productId = null, $websiteId = null) { @@ -126,6 +127,7 @@ class StockIndex implements StockIndexInterface * @param int $qty * @param int $status * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function processChildren( $productId, diff --git a/app/code/Magento/CatalogInventory/Model/StockManagement.php b/app/code/Magento/CatalogInventory/Model/StockManagement.php index f6f39f50015..235a248f17e 100644 --- a/app/code/Magento/CatalogInventory/Model/StockManagement.php +++ b/app/code/Magento/CatalogInventory/Model/StockManagement.php @@ -67,6 +67,7 @@ class StockManagement implements StockManagementInterface * @param int $websiteId * @return StockItemInterface[] * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function registerProductsSale($items, $websiteId = null) { diff --git a/app/code/Magento/CatalogInventory/Model/StockRegistryProvider.php b/app/code/Magento/CatalogInventory/Model/StockRegistryProvider.php index 8fa8bba389b..e67d97fe426 100644 --- a/app/code/Magento/CatalogInventory/Model/StockRegistryProvider.php +++ b/app/code/Magento/CatalogInventory/Model/StockRegistryProvider.php @@ -18,6 +18,7 @@ use Magento\Store\Model\StoreManagerInterface; /** * Class StockRegistryProvider + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class StockRegistryProvider implements StockRegistryProviderInterface { diff --git a/app/code/Magento/CatalogInventory/Model/StockStateProvider.php b/app/code/Magento/CatalogInventory/Model/StockStateProvider.php index a69d3a40ce9..bb82b4c100f 100644 --- a/app/code/Magento/CatalogInventory/Model/StockStateProvider.php +++ b/app/code/Magento/CatalogInventory/Model/StockStateProvider.php @@ -92,6 +92,9 @@ class StockStateProvider implements StockStateProviderInterface * @param int|float $summaryQty * @param int|float $origQty * @return \Magento\Framework\Object + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function checkQuoteItemQty(StockItemInterface $stockItem, $qty, $summaryQty, $origQty = 0) { @@ -319,6 +322,8 @@ class StockStateProvider implements StockStateProviderInterface * * @param StockItemInterface $stockItem * @return float + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getStockQty(StockItemInterface $stockItem) { diff --git a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Actions.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Actions.php index 702c263fc45..803e7db212c 100644 --- a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Actions.php +++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Actions.php @@ -52,6 +52,7 @@ class Actions extends Generic implements TabInterface /** * @return Form + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Main.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Main.php index c8344ff8dbe..d3020b2298d 100644 --- a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Main.php +++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Main.php @@ -105,6 +105,7 @@ class Main extends Generic implements TabInterface /** * @return Form + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog/Save.php b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog/Save.php index 70f07b81bfb..cf1ae7917c5 100644 --- a/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog/Save.php +++ b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog/Save.php @@ -11,6 +11,7 @@ class Save extends \Magento\CatalogRule\Controller\Adminhtml\Promo\Catalog { /** * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php b/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php index 9c5cbbedb2b..bada3b8bb6f 100644 --- a/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php +++ b/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php @@ -11,6 +11,9 @@ use Magento\CatalogRule\Model\Resource\Rule\CollectionFactory as RuleCollectionF use Magento\CatalogRule\Model\Rule; use Magento\Framework\Pricing\PriceCurrencyInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class IndexBuilder { const SECONDS_IN_DAY = 86400; @@ -81,6 +84,7 @@ class IndexBuilder * @param \Magento\Framework\Stdlib\DateTime\DateTime $dateTime * @param \Magento\Catalog\Model\ProductFactory $productFactory * @param int $batchCount + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( RuleCollectionFactory $ruleCollectionFactory, @@ -209,6 +213,7 @@ class IndexBuilder * @param Product $product * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function applyRule(Rule $rule, $product) { @@ -317,6 +322,8 @@ class IndexBuilder /** * @param Rule $rule * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function updateRuleProductData(Rule $rule) { @@ -399,6 +406,9 @@ class IndexBuilder * @param Product|null $product * @throws \Exception * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function applyAllRules(Product $product = null) { diff --git a/app/code/Magento/CatalogRule/Model/Observer.php b/app/code/Magento/CatalogRule/Model/Observer.php index fe95ba131b6..9aef0eab0b3 100644 --- a/app/code/Magento/CatalogRule/Model/Observer.php +++ b/app/code/Magento/CatalogRule/Model/Observer.php @@ -21,6 +21,9 @@ use Magento\Customer\Model\Session as CustomerModelSession; use Magento\Framework\Event\Observer as EventObserver; use Magento\Framework\Stdlib\DateTime; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Observer { /** diff --git a/app/code/Magento/CatalogRule/Model/Resource/Rule.php b/app/code/Magento/CatalogRule/Model/Resource/Rule.php index 8d2f50e3fd9..c190214d713 100644 --- a/app/code/Magento/CatalogRule/Model/Resource/Rule.php +++ b/app/code/Magento/CatalogRule/Model/Resource/Rule.php @@ -99,6 +99,7 @@ class Rule extends \Magento\Rule\Model\Resource\AbstractResource * @param \Psr\Log\LoggerInterface $logger * @param \Magento\Framework\Stdlib\DateTime $dateTime * @param PriceCurrencyInterface $priceCurrency + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Resource $resource, diff --git a/app/code/Magento/CatalogRule/Model/Rule.php b/app/code/Magento/CatalogRule/Model/Rule.php index dfbad0eb86f..78b9a2b1e07 100644 --- a/app/code/Magento/CatalogRule/Model/Rule.php +++ b/app/code/Magento/CatalogRule/Model/Rule.php @@ -36,6 +36,8 @@ use Magento\Catalog\Model\Product; * @method \Magento\CatalogRule\Model\Rule setDiscountAmount(float $value) * @method string getWebsiteIds() * @method \Magento\CatalogRule\Model\Rule setWebsiteIds(string $value) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Rule extends \Magento\Rule\Model\AbstractModel { @@ -159,6 +161,7 @@ class Rule extends \Magento\Rule\Model\AbstractModel * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $relatedCacheTypes * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -340,6 +343,7 @@ class Rule extends \Magento\Rule\Model\AbstractModel * @param Product $product * @param float $price * @return float|null + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function calcProductPriceRule(Product $product, $price) { diff --git a/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Aggregation/DataProvider.php b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Aggregation/DataProvider.php index 34f434eb708..9619c899c65 100644 --- a/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Aggregation/DataProvider.php +++ b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Aggregation/DataProvider.php @@ -15,6 +15,9 @@ use Magento\Framework\Search\Adapter\Mysql\Aggregation\DataProviderInterface; use Magento\Framework\Search\Request\BucketInterface; use Magento\Store\Model\Store; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class DataProvider implements DataProviderInterface { /** diff --git a/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Dynamic/DataProvider.php b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Dynamic/DataProvider.php index 46d19101a7d..c6c7da4ae01 100644 --- a/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Dynamic/DataProvider.php +++ b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Dynamic/DataProvider.php @@ -16,6 +16,9 @@ use Magento\Framework\Search\Dynamic\IntervalFactory; use Magento\Framework\Search\Request\BucketInterface; use Magento\Store\Model\ScopeInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class DataProvider implements DataProviderInterface { const XML_PATH_INTERVAL_DIVISION_LIMIT = 'catalog/layered_navigation/interval_division_limit'; diff --git a/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php index 0ad924de9c3..44f3db45bf7 100644 --- a/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php +++ b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php @@ -62,6 +62,7 @@ class Preprocessor implements PreprocessorInterface /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function process(FilterInterface $filter, $isNegation, $query) { diff --git a/app/code/Magento/CatalogSearch/Model/Advanced.php b/app/code/Magento/CatalogSearch/Model/Advanced.php index c537e2b8e5e..60ba4855b18 100644 --- a/app/code/Magento/CatalogSearch/Model/Advanced.php +++ b/app/code/Magento/CatalogSearch/Model/Advanced.php @@ -41,6 +41,7 @@ use Magento\Store\Model\StoreManagerInterface; * @method \Magento\CatalogSearch\Model\Advanced setUpdatedAt(string $value) * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Advanced extends \Magento\Framework\Model\AbstractModel { @@ -120,6 +121,7 @@ class Advanced extends \Magento\Framework\Model\AbstractModel * @param ProductFactory $productFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( Context $context, @@ -155,6 +157,8 @@ class Advanced extends \Magento\Framework\Model\AbstractModel * @param array $values * @return $this * @throws Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function addFilters($values) { @@ -283,6 +287,8 @@ class Advanced extends \Magento\Framework\Model\AbstractModel * @param EntityAttribute $attribute * @param mixed $value * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _addSearchCriteria($attribute, $value) { diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php index 25a1c87a705..07a8bf4a141 100644 --- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php @@ -6,6 +6,10 @@ namespace Magento\CatalogSearch\Model\Indexer\Fulltext\Action; use Magento\Framework\Pricing\PriceCurrencyInterface; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Full { /** @@ -154,6 +158,7 @@ class Full * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate * @param \Magento\CatalogSearch\Model\Resource\Fulltext $fulltextResource * @param PriceCurrencyInterface $priceCurrency + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Resource $resource, @@ -258,6 +263,8 @@ class Full * @param int $storeId Store View Id * @param int|array $productIds Product Entity Id * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function rebuildStoreIndex($storeId, $productIds = null) { @@ -636,6 +643,8 @@ class Full * @param array $productData * @param int $storeId * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function prepareProductIndex($indexData, $productData, $storeId) { diff --git a/app/code/Magento/CatalogSearch/Model/Layer/Filter/Decimal.php b/app/code/Magento/CatalogSearch/Model/Layer/Filter/Decimal.php index 4951758f227..a2c1b634050 100644 --- a/app/code/Magento/CatalogSearch/Model/Layer/Filter/Decimal.php +++ b/app/code/Magento/CatalogSearch/Model/Layer/Filter/Decimal.php @@ -88,6 +88,7 @@ class Decimal extends AbstractFilter * * @return array * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getItemsData() { diff --git a/app/code/Magento/CatalogSearch/Model/Layer/Filter/Price.php b/app/code/Magento/CatalogSearch/Model/Layer/Filter/Price.php index a364ae6e605..4081154e8e6 100644 --- a/app/code/Magento/CatalogSearch/Model/Layer/Filter/Price.php +++ b/app/code/Magento/CatalogSearch/Model/Layer/Filter/Price.php @@ -53,6 +53,7 @@ class Price extends AbstractFilter * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency * @param \Magento\Catalog\Model\Layer\Filter\Dynamic\AlgorithmFactory $algorithmFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Catalog\Model\Layer\Filter\ItemFactory $filterItemFactory, @@ -106,6 +107,7 @@ class Price extends AbstractFilter * * @param \Magento\Framework\App\RequestInterface $request * @return $this + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function apply(\Magento\Framework\App\RequestInterface $request) { diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Advanced.php b/app/code/Magento/CatalogSearch/Model/Resource/Advanced.php index c0f0c1662b2..d4a19e82a05 100644 --- a/app/code/Magento/CatalogSearch/Model/Resource/Advanced.php +++ b/app/code/Magento/CatalogSearch/Model/Resource/Advanced.php @@ -84,6 +84,7 @@ class Advanced extends \Magento\Framework\Model\Resource\Db\AbstractDb * @param \Magento\Catalog\Model\Resource\Eav\Attribute $attribute * @param string|array $value * @return string|array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function prepareCondition($attribute, $value) { @@ -121,6 +122,7 @@ class Advanced extends \Magento\Framework\Model\Resource\Db\AbstractDb * @param string|array $value * @param int $rate * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function addRatedPriceFilter($collection, $attribute, $value, $rate = 1) { @@ -165,6 +167,7 @@ class Advanced extends \Magento\Framework\Model\Resource\Db\AbstractDb * @param \Magento\Catalog\Model\Resource\Eav\Attribute $attribute * @param string|array $value * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function addIndexableAttributeModifiedFilter($collection, $attribute, $value) { diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php b/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php index f8d25720209..37029e4365b 100644 --- a/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php +++ b/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php @@ -10,6 +10,7 @@ use Magento\Catalog\Model\Product; * Collection Advanced * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection { @@ -121,6 +122,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection /** * @inheritdoc + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _renderFiltersBefore() { diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php index 3a6827063f7..92d2fffb6de 100644 --- a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php +++ b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php @@ -10,6 +10,7 @@ use Magento\Framework\Search\Response\QueryResponse; /** * Fulltext Collection + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection { diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php b/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php index 2880a05ef46..678ffa8339b 100644 --- a/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php +++ b/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php @@ -8,6 +8,7 @@ namespace Magento\CatalogSearch\Model\Resource\Search; * Search collection * * @deprecated + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection implements \Magento\Search\Model\SearchCollectionInterface { @@ -270,6 +271,8 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection impl * * @param mixed $query * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getSearchInOptionSql($query) { diff --git a/app/code/Magento/CatalogSearch/Model/Search/RequestGenerator.php b/app/code/Magento/CatalogSearch/Model/Search/RequestGenerator.php index df7bd250c96..c1d723999fb 100644 --- a/app/code/Magento/CatalogSearch/Model/Search/RequestGenerator.php +++ b/app/code/Magento/CatalogSearch/Model/Search/RequestGenerator.php @@ -135,6 +135,7 @@ class RequestGenerator * Generate advanced search request * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ private function generateAdvancedSearchRequest() { diff --git a/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php b/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php index 3779f07c8bf..c20e511bf7e 100644 --- a/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php +++ b/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php @@ -7,6 +7,7 @@ namespace Magento\CatalogWidget\Block\Product; /** * Catalog Products List widget block * Class ProductsList + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class ProductsList extends \Magento\Catalog\Block\Product\AbstractProduct implements \Magento\Widget\Block\BlockInterface { @@ -146,6 +147,7 @@ class ProductsList extends \Magento\Catalog\Block\Product\AbstractProduct implem /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getProductPriceHtml( \Magento\Catalog\Model\Product $product, diff --git a/app/code/Magento/CatalogWidget/Model/Rule/Condition/Product.php b/app/code/Magento/CatalogWidget/Model/Rule/Condition/Product.php index d41ab443e4d..c57feb10ca6 100644 --- a/app/code/Magento/CatalogWidget/Model/Rule/Condition/Product.php +++ b/app/code/Magento/CatalogWidget/Model/Rule/Condition/Product.php @@ -42,6 +42,7 @@ class Product extends \Magento\Rule\Model\Condition\Product\AbstractProduct * @param \Magento\Framework\Locale\FormatInterface $localeFormat * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Rule\Model\Condition\Context $context, diff --git a/app/code/Magento/Centinel/Model/Config.php b/app/code/Magento/Centinel/Model/Config.php index 05ca3a3f725..89cc104a3c5 100644 --- a/app/code/Magento/Centinel/Model/Config.php +++ b/app/code/Magento/Centinel/Model/Config.php @@ -116,6 +116,7 @@ class Config * Return flag - is centinel mode test * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsTestMode() { @@ -137,6 +138,7 @@ class Config * Define if debugging is enabled * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDebugFlag() { diff --git a/app/code/Magento/Centinel/Model/Service.php b/app/code/Magento/Centinel/Model/Service.php index f364c33e8a5..3e78adfc8af 100644 --- a/app/code/Magento/Centinel/Model/Service.php +++ b/app/code/Magento/Centinel/Model/Service.php @@ -141,6 +141,7 @@ class Service extends \Magento\Framework\Object * @param float $amount * @param string $currencyCode * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _generateChecksum( $paymentMethodCode, diff --git a/app/code/Magento/Centinel/Model/State/Mastercard.php b/app/code/Magento/Centinel/Model/State/Mastercard.php index de32102b29b..ba75f85d48e 100644 --- a/app/code/Magento/Centinel/Model/State/Mastercard.php +++ b/app/code/Magento/Centinel/Model/State/Mastercard.php @@ -25,6 +25,8 @@ class Mastercard extends \Magento\Centinel\Model\AbstractState * Result depends from flag self::getIsModeStrict() * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function isAuthenticateSuccessful() { @@ -132,6 +134,7 @@ class Mastercard extends \Magento\Centinel\Model\AbstractState * Analyse lookup`s results. If lookup is soft successful return true * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _isLookupSoftSuccessful() { diff --git a/app/code/Magento/Centinel/Model/State/Visa.php b/app/code/Magento/Centinel/Model/State/Visa.php index 9ed47d9e00b..1d73658f298 100644 --- a/app/code/Magento/Centinel/Model/State/Visa.php +++ b/app/code/Magento/Centinel/Model/State/Visa.php @@ -25,6 +25,9 @@ class Visa extends \Magento\Centinel\Model\AbstractState * Result depends from flag self::getIsModeStrict() * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function isAuthenticateSuccessful() { @@ -151,6 +154,7 @@ class Visa extends \Magento\Centinel\Model\AbstractState * Analyse lookup`s results. If lookup is soft successful return true * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _isLookupSoftSuccessful() { diff --git a/app/code/Magento/Checkout/Block/Cart.php b/app/code/Magento/Checkout/Block/Cart.php index 7f3fa41ea8f..ea043a7b5e5 100644 --- a/app/code/Magento/Checkout/Block/Cart.php +++ b/app/code/Magento/Checkout/Block/Cart.php @@ -66,6 +66,7 @@ class Cart extends \Magento\Checkout\Block\Cart\AbstractCart * prepare cart items URLs * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function prepareItemUrls() { @@ -163,6 +164,7 @@ class Cart extends \Magento\Checkout\Block\Cart\AbstractCart /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsVirtual() { diff --git a/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php b/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php index d8f150979b5..77aa7bb122d 100644 --- a/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php +++ b/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php @@ -15,6 +15,7 @@ use Magento\Catalog\Pricing\Price\ConfiguredPriceInterface; * * @method \Magento\Checkout\Block\Cart\Item\Renderer setProductName(string) * @method \Magento\Checkout\Block\Cart\Item\Renderer setDeleteUrl(string) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Renderer extends \Magento\Framework\View\Element\Template implements \Magento\Framework\View\Block\IdentityInterface { diff --git a/app/code/Magento/Checkout/Block/Cart/Shipping.php b/app/code/Magento/Checkout/Block/Cart/Shipping.php index 17f3d8f19d4..0aec7f5a8f0 100644 --- a/app/code/Magento/Checkout/Block/Cart/Shipping.php +++ b/app/code/Magento/Checkout/Block/Cart/Shipping.php @@ -195,6 +195,7 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart * Show City in Shipping Estimation * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCityActive() { @@ -205,6 +206,7 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart * Show State in Shipping Estimation. Result updated using plugins * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getStateActive() { diff --git a/app/code/Magento/Checkout/Block/Cart/Sidebar.php b/app/code/Magento/Checkout/Block/Cart/Sidebar.php index 2d03078111b..6e08aebd3d7 100644 --- a/app/code/Magento/Checkout/Block/Cart/Sidebar.php +++ b/app/code/Magento/Checkout/Block/Cart/Sidebar.php @@ -158,6 +158,7 @@ class Sidebar extends AbstractCart implements IdentityInterface * Get one page checkout page url * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCheckoutUrl() { @@ -168,6 +169,7 @@ class Sidebar extends AbstractCart implements IdentityInterface * Define if Mini Shopping Cart Pop-Up Menu enabled * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsNeedToDisplaySideBar() { diff --git a/app/code/Magento/Checkout/Block/Onepage.php b/app/code/Magento/Checkout/Block/Onepage.php index 72d116e13c6..1a5f46fb32f 100644 --- a/app/code/Magento/Checkout/Block/Onepage.php +++ b/app/code/Magento/Checkout/Block/Onepage.php @@ -25,6 +25,7 @@ class Onepage extends \Magento\Checkout\Block\Onepage\AbstractOnepage * @param \Magento\Framework\App\Http\Context $httpContext * @param \Magento\Customer\Model\Address\Mapper $addressMapper * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Checkout/Block/Onepage/AbstractOnepage.php b/app/code/Magento/Checkout/Block/Onepage/AbstractOnepage.php index 746296fc981..4bd52a59ef6 100644 --- a/app/code/Magento/Checkout/Block/Onepage/AbstractOnepage.php +++ b/app/code/Magento/Checkout/Block/Onepage/AbstractOnepage.php @@ -13,6 +13,7 @@ use Magento\Sales\Model\Quote; /** * One page common functionality block + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractOnepage extends \Magento\Framework\View\Element\Template { @@ -99,6 +100,7 @@ abstract class AbstractOnepage extends \Magento\Framework\View\Element\Template * @param \Magento\Framework\App\Http\Context $httpContext * @param \Magento\Customer\Model\Address\Mapper $addressMapper * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Checkout/Block/Onepage/Billing.php b/app/code/Magento/Checkout/Block/Onepage/Billing.php index 5f232f4c6f2..e8937599864 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Billing.php +++ b/app/code/Magento/Checkout/Block/Onepage/Billing.php @@ -9,6 +9,7 @@ use Magento\Customer\Model\Address\Config as AddressConfig; /** * One page checkout status + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Billing extends \Magento\Checkout\Block\Onepage\AbstractOnepage { @@ -45,6 +46,7 @@ class Billing extends \Magento\Checkout\Block\Onepage\AbstractOnepage * @param \Magento\Customer\Model\Address\Mapper $addressMapper * @param \Magento\Sales\Model\Quote\AddressFactory $addressFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Checkout/Block/Onepage/Login.php b/app/code/Magento/Checkout/Block/Onepage/Login.php index 20ed2288b63..4926d88ba5b 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Login.php +++ b/app/code/Magento/Checkout/Block/Onepage/Login.php @@ -10,6 +10,7 @@ use Magento\Framework\Message\Collection; /** * One page checkout status + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Login extends AbstractOnepage { @@ -53,6 +54,7 @@ class Login extends AbstractOnepage * @param \Magento\Customer\Model\Registration $registration * @param \Magento\Customer\Model\Address\Mapper $dataObjectConverter * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Checkout/Block/Onepage/Shipping.php b/app/code/Magento/Checkout/Block/Onepage/Shipping.php index 9cc46d16483..e1991fd71e6 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Shipping.php +++ b/app/code/Magento/Checkout/Block/Onepage/Shipping.php @@ -9,6 +9,7 @@ use Magento\Customer\Model\Address\Config as AddressConfig; /** * One page checkout status + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Shipping extends \Magento\Checkout\Block\Onepage\AbstractOnepage { @@ -38,6 +39,7 @@ class Shipping extends \Magento\Checkout\Block\Onepage\AbstractOnepage * @param \Magento\Customer\Model\Address\Mapper $addressMapper * @param \Magento\Sales\Model\Quote\AddressFactory $addressFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Checkout/Block/Onepage/Shipping/Method/Available.php b/app/code/Magento/Checkout/Block/Onepage/Shipping/Method/Available.php index 713b5331a4b..4d854962a07 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Shipping/Method/Available.php +++ b/app/code/Magento/Checkout/Block/Onepage/Shipping/Method/Available.php @@ -10,6 +10,7 @@ use Magento\Sales\Model\Quote\Address; /** * One page checkout status + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Available extends \Magento\Checkout\Block\Onepage\AbstractOnepage { @@ -36,6 +37,7 @@ class Available extends \Magento\Checkout\Block\Onepage\AbstractOnepage * @param \Magento\Framework\App\Http\Context $httpContext * @param \Magento\Customer\Model\Address\Mapper $addressMapper * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Checkout/Block/Total/Nominal.php b/app/code/Magento/Checkout/Block/Total/Nominal.php index e77ae71bb9e..c063789c15f 100644 --- a/app/code/Magento/Checkout/Block/Total/Nominal.php +++ b/app/code/Magento/Checkout/Block/Total/Nominal.php @@ -103,6 +103,7 @@ class Nominal extends \Magento\Checkout\Block\Total\DefaultTotal * * @param \Magento\Framework\Object $row * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getItemDetailsRowIsCompounded(\Magento\Framework\Object $row) { diff --git a/app/code/Magento/Checkout/Controller/Cart/Add.php b/app/code/Magento/Checkout/Controller/Cart/Add.php index 64abe026ff2..805d58e89c5 100644 --- a/app/code/Magento/Checkout/Controller/Cart/Add.php +++ b/app/code/Magento/Checkout/Controller/Cart/Add.php @@ -61,6 +61,7 @@ class Add extends \Magento\Checkout\Controller\Cart * Add product to shopping cart action * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Checkout/Controller/Cart/CouponPost.php b/app/code/Magento/Checkout/Controller/Cart/CouponPost.php index 4bb72d37dae..936e1634422 100644 --- a/app/code/Magento/Checkout/Controller/Cart/CouponPost.php +++ b/app/code/Magento/Checkout/Controller/Cart/CouponPost.php @@ -49,6 +49,8 @@ class CouponPost extends \Magento\Checkout\Controller\Cart * Initialize coupon * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Checkout/Controller/Cart/UpdateItemOptions.php b/app/code/Magento/Checkout/Controller/Cart/UpdateItemOptions.php index 7cc5528e1a4..36d2d63ffad 100644 --- a/app/code/Magento/Checkout/Controller/Cart/UpdateItemOptions.php +++ b/app/code/Magento/Checkout/Controller/Cart/UpdateItemOptions.php @@ -11,6 +11,8 @@ class UpdateItemOptions extends \Magento\Checkout\Controller\Cart * Update product configuration for a cart item * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Checkout/Controller/Onepage.php b/app/code/Magento/Checkout/Controller/Onepage.php index d4d5b6836ad..0ff159b0e78 100644 --- a/app/code/Magento/Checkout/Controller/Onepage.php +++ b/app/code/Magento/Checkout/Controller/Onepage.php @@ -9,6 +9,9 @@ use Magento\Customer\Api\CustomerRepositoryInterface; use Magento\Framework\App\Action\NotFoundException; use Magento\Framework\App\RequestInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Onepage extends Action { /** @@ -68,6 +71,7 @@ class Onepage extends Action * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\View\LayoutFactory $layoutFactory * @param \Magento\Sales\Model\QuoteRepository $quoteRepository + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/app/code/Magento/Checkout/Controller/Onepage/SaveOrder.php b/app/code/Magento/Checkout/Controller/Onepage/SaveOrder.php index 1fa75bfe5cc..4ceae281def 100644 --- a/app/code/Magento/Checkout/Controller/Onepage/SaveOrder.php +++ b/app/code/Magento/Checkout/Controller/Onepage/SaveOrder.php @@ -11,6 +11,8 @@ class SaveOrder extends \Magento\Checkout\Controller\Onepage * Create order action * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function execute() { diff --git a/app/code/Magento/Checkout/Controller/Onepage/SavePayment.php b/app/code/Magento/Checkout/Controller/Onepage/SavePayment.php index 28e561ecaa5..56710670827 100644 --- a/app/code/Magento/Checkout/Controller/Onepage/SavePayment.php +++ b/app/code/Magento/Checkout/Controller/Onepage/SavePayment.php @@ -23,6 +23,7 @@ class SavePayment extends \Magento\Checkout\Controller\Onepage * Sets either redirect or a JSON response * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Checkout/Helper/Cart.php b/app/code/Magento/Checkout/Helper/Cart.php index 7dd2339de1e..215468d34b6 100644 --- a/app/code/Magento/Checkout/Helper/Cart.php +++ b/app/code/Magento/Checkout/Helper/Cart.php @@ -190,6 +190,7 @@ class Cart extends \Magento\Core\Helper\Url * Check quote for virtual products only * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsVirtualQuote() { @@ -201,6 +202,7 @@ class Cart extends \Magento\Core\Helper\Url * * @param int|string|\Magento\Store\Model\Store $store * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getShouldRedirectToCart($store = null) { diff --git a/app/code/Magento/Checkout/Helper/Data.php b/app/code/Magento/Checkout/Helper/Data.php index 130ab9c9cc5..46714dc7b00 100644 --- a/app/code/Magento/Checkout/Helper/Data.php +++ b/app/code/Magento/Checkout/Helper/Data.php @@ -12,6 +12,7 @@ use Magento\Store\Model\Store; * Checkout default helper * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Data extends \Magento\Framework\App\Helper\AbstractHelper { @@ -206,6 +207,8 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * @param string $message * @param string $checkoutType * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function sendPaymentFailedEmail($checkout, $message, $checkoutType = 'onepage') { diff --git a/app/code/Magento/Checkout/Model/Cart.php b/app/code/Magento/Checkout/Model/Cart.php index 1ef8dc6e160..cfd0cb6ab3c 100644 --- a/app/code/Magento/Checkout/Model/Cart.php +++ b/app/code/Magento/Checkout/Model/Cart.php @@ -12,6 +12,7 @@ use Magento\Framework\Object; /** * Shopping cart model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Cart extends Object implements CartInterface { @@ -101,6 +102,7 @@ class Cart extends Object implements CartInterface * @param \Magento\Sales\Model\QuoteRepository $quoteRepository * @param ProductRepositoryInterface $productRepository * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Event\ManagerInterface $eventManager, @@ -329,6 +331,7 @@ class Cart extends Object implements CartInterface * @param \Magento\Framework\Object|int|array $requestInfo * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function addProduct($productInfo, $requestInfo = null) { @@ -472,6 +475,8 @@ class Cart extends Object implements CartInterface * @param array $data * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function updateItems($data) { @@ -656,6 +661,7 @@ class Cart extends Object implements CartInterface * @throws \Magento\Framework\Model\Exception * * @see \Magento\Sales\Model\Quote::updateItem() + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function updateItem($itemId, $requestInfo = null, $updatingParams = null) { diff --git a/app/code/Magento/Checkout/Model/Session.php b/app/code/Magento/Checkout/Model/Session.php index e96f1f02dd6..a96deebe17e 100644 --- a/app/code/Magento/Checkout/Model/Session.php +++ b/app/code/Magento/Checkout/Model/Session.php @@ -7,6 +7,9 @@ namespace Magento\Checkout\Model; use Magento\Customer\Api\Data\CustomerInterface; use Magento\Sales\Model\Quote; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Session extends \Magento\Framework\Session\SessionManager { /** @@ -93,6 +96,7 @@ class Session extends \Magento\Framework\Session\SessionManager * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Request\Http $request, @@ -169,6 +173,8 @@ class Session extends \Magento\Framework\Session\SessionManager * Get checkout quote instance by current session * * @return Quote + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getQuote() { diff --git a/app/code/Magento/Checkout/Model/Type/Onepage.php b/app/code/Magento/Checkout/Model/Type/Onepage.php index e8aef6e7a50..d489102ac37 100644 --- a/app/code/Magento/Checkout/Model/Type/Onepage.php +++ b/app/code/Magento/Checkout/Model/Type/Onepage.php @@ -19,6 +19,11 @@ use Magento\Customer\Model\Metadata\Form; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Sales\Model\Order\Email\Sender\OrderSender; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Onepage { /** @@ -191,6 +196,7 @@ class Onepage * @param CustomerRepositoryInterface $customerRepository * @param \Magento\Sales\Model\QuoteRepository $quoteRepository * @param \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Event\ManagerInterface $eventManager, @@ -297,6 +303,7 @@ class Onepage * Initialize quote state to be valid for one page checkout * * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function initCheckout() { @@ -371,6 +378,9 @@ class Onepage * @param array $data * @param int $customerAddressId * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function saveBilling($data, $customerAddressId) { @@ -622,6 +632,8 @@ class Onepage * @param array $data * @param int $customerAddressId * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function saveShipping($data, $customerAddressId) { @@ -842,6 +854,7 @@ class Onepage * Prepare quote for customer order submit * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareCustomerQuote() { diff --git a/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php b/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php index e408788b6ec..14b0bc8d06a 100644 --- a/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php +++ b/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php @@ -14,6 +14,7 @@ use Magento\Sales\Model\Resource\Quote\Collection as QuoteCollection; /** * Cart read service object. + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class ReadService implements ReadServiceInterface { diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php index 220d45a510d..90c94586318 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php @@ -171,6 +171,7 @@ class Customer extends \Magento\Framework\Api\AbstractExtensibleObject * Is customer a guest? * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsGuest() { diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php index ef53bed0d8f..dbe6c60f934 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php @@ -110,6 +110,7 @@ class ShippingMethod extends \Magento\Framework\Api\AbstractExtensibleObject * Returns the value of the availability flag for the current shipping method. * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getAvailable() { diff --git a/app/code/Magento/Checkout/Service/V1/Data/CartMapper.php b/app/code/Magento/Checkout/Service/V1/Data/CartMapper.php index 510f7db92e6..d7161fcb8bf 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/CartMapper.php +++ b/app/code/Magento/Checkout/Service/V1/Data/CartMapper.php @@ -9,6 +9,7 @@ use Magento\Sales\Model\Quote; /** * Cart mapper + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class CartMapper { diff --git a/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Edit/Form.php b/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Edit/Form.php index 970da457b99..6207184b390 100644 --- a/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Edit/Form.php +++ b/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Edit/Form.php @@ -44,6 +44,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Grid.php b/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Grid.php index 17b4768ccdd..ce1d51909cb 100644 --- a/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Grid.php +++ b/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Grid.php @@ -118,6 +118,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended * @param \Magento\Framework\Data\Collection $collection * @param \Magento\Backend\Block\Widget\Grid\Column $column * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _filterStoreCondition($collection, $column) { diff --git a/app/code/Magento/CheckoutAgreements/Controller/Adminhtml/Agreement/Edit.php b/app/code/Magento/CheckoutAgreements/Controller/Adminhtml/Agreement/Edit.php index 45cf11e85ab..0db0b8ef7e0 100644 --- a/app/code/Magento/CheckoutAgreements/Controller/Adminhtml/Agreement/Edit.php +++ b/app/code/Magento/CheckoutAgreements/Controller/Adminhtml/Agreement/Edit.php @@ -9,6 +9,7 @@ class Edit extends \Magento\CheckoutAgreements\Controller\Adminhtml\Agreement { /** * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Main.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Main.php index 08b2e44fe25..3fe6b9853e6 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Main.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Main.php @@ -36,6 +36,7 @@ class Main extends \Magento\Backend\Block\Widget\Form\Generic implements \Magent * Prepare form * * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/Cms/Block/Adminhtml/Page/Grid.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Grid.php index 8c747bcc728..9ff73a1c660 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Page/Grid.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Grid.php @@ -175,6 +175,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended * @param \Magento\Framework\Data\Collection $collection * @param \Magento\Framework\Object $column * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _filterStoreCondition($collection, \Magento\Framework\Object $column) { diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Block/Edit.php b/app/code/Magento/Cms/Controller/Adminhtml/Block/Edit.php index b6c1688c8ab..58b72a76abd 100644 --- a/app/code/Magento/Cms/Controller/Adminhtml/Block/Edit.php +++ b/app/code/Magento/Cms/Controller/Adminhtml/Block/Edit.php @@ -11,6 +11,7 @@ class Edit extends \Magento\Cms\Controller\Adminhtml\Block * Edit CMS block * * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Page/Edit.php b/app/code/Magento/Cms/Controller/Adminhtml/Page/Edit.php index 1044910cc4c..d3f0b4ff466 100644 --- a/app/code/Magento/Cms/Controller/Adminhtml/Page/Edit.php +++ b/app/code/Magento/Cms/Controller/Adminhtml/Page/Edit.php @@ -59,6 +59,7 @@ class Edit extends \Magento\Backend\App\Action * Edit CMS page * * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Cms/Controller/Index/Index.php b/app/code/Magento/Cms/Controller/Index/Index.php index 0a2861b70a9..7716b231732 100644 --- a/app/code/Magento/Cms/Controller/Index/Index.php +++ b/app/code/Magento/Cms/Controller/Index/Index.php @@ -12,6 +12,7 @@ class Index extends \Magento\Framework\App\Action\Action * * @param string|null $coreRoute * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function execute($coreRoute = null) { diff --git a/app/code/Magento/Cms/Helper/Page.php b/app/code/Magento/Cms/Helper/Page.php index 7b65b884041..cb389deea1e 100644 --- a/app/code/Magento/Cms/Helper/Page.php +++ b/app/code/Magento/Cms/Helper/Page.php @@ -92,6 +92,7 @@ class Page extends \Magento\Framework\App\Helper\AbstractHelper * @param \Magento\Framework\Escaper $escaper * @param \Magento\Framework\App\ViewInterface $view * @param \Magento\Framework\View\Page\Config $pageConfig + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Helper\Context $context, @@ -139,6 +140,8 @@ class Page extends \Magento\Framework\App\Helper\AbstractHelper * @param int $pageId * @param bool $renderLayout * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _renderPage(Action $action, $pageId = null, $renderLayout = true) { diff --git a/app/code/Magento/Cms/Model/Resource/Block.php b/app/code/Magento/Cms/Model/Resource/Block.php index 8d75bc9f05f..5da75e6bfd8 100644 --- a/app/code/Magento/Cms/Model/Resource/Block.php +++ b/app/code/Magento/Cms/Model/Resource/Block.php @@ -193,6 +193,7 @@ class Block extends \Magento\Framework\Model\Resource\Db\AbstractDb * * @param \Magento\Framework\Model\AbstractModel $object * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsUniqueBlockToStores(\Magento\Framework\Model\AbstractModel $object) { diff --git a/app/code/Magento/Cms/Model/Resource/CmsCriteriaMapper.php b/app/code/Magento/Cms/Model/Resource/CmsCriteriaMapper.php index 2767beae070..593cf7919be 100644 --- a/app/code/Magento/Cms/Model/Resource/CmsCriteriaMapper.php +++ b/app/code/Magento/Cms/Model/Resource/CmsCriteriaMapper.php @@ -37,6 +37,7 @@ class CmsCriteriaMapper extends GenericMapper * * @param bool $flag * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function mapFirstStoreFlag($flag) { diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php index e7d6933c8e6..f5c66b52d08 100644 --- a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php +++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php @@ -11,6 +11,8 @@ use Magento\Framework\App\Filesystem\DirectoryList; * Wysiwyg Images model * * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Storage extends \Magento\Framework\Object { @@ -186,6 +188,8 @@ class Storage extends \Magento\Framework\Object * * @param string $path Parent directory path * @return \Magento\Framework\Data\Collection\Filesystem + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getDirsCollection($path) { diff --git a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Attribute/Edit/Tab/Variations/Main.php b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Attribute/Edit/Tab/Variations/Main.php index 248bc92b55f..17127099bfd 100644 --- a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Attribute/Edit/Tab/Variations/Main.php +++ b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Attribute/Edit/Tab/Variations/Main.php @@ -10,6 +10,9 @@ */ namespace Magento\ConfigurableProduct\Block\Adminhtml\Product\Attribute\Edit\Tab\Variations; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Main extends \Magento\Eav\Block\Adminhtml\Attribute\Edit\Main\AbstractMain { /** diff --git a/app/code/Magento/Core/App/Router/Base.php b/app/code/Magento/Core/App/Router/Base.php index bfb4a0d2155..22523d3cb17 100644 --- a/app/code/Magento/Core/App/Router/Base.php +++ b/app/code/Magento/Core/App/Router/Base.php @@ -8,6 +8,10 @@ namespace Magento\Core\App\Router; use Magento\Framework\App\RequestInterface; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Base implements \Magento\Framework\App\RouterInterface { /** @@ -116,6 +120,8 @@ class Base implements \Magento\Framework\App\RouterInterface * @param string $routerId * @param \Magento\Framework\Code\NameBuilder $nameBuilder * @throws \InvalidArgumentException + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct( \Magento\Framework\App\Router\ActionList $actionList, @@ -253,6 +259,8 @@ class Base implements \Magento\Framework\App\RouterInterface * @param \Magento\Framework\App\RequestInterface $request * @param array $params * @return \Magento\Framework\App\Action\Action|null + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function matchAction(\Magento\Framework\App\RequestInterface $request, array $params) { @@ -344,6 +352,7 @@ class Base implements \Magento\Framework\App\RouterInterface * @param \Magento\Framework\App\RequestInterface $request * @param string $path * @return void + * @SuppressWarnings(PHPMD.ExitExpression) */ protected function _checkShouldBeSecure(\Magento\Framework\App\RequestInterface $request, $path = '') { diff --git a/app/code/Magento/Core/Model/File/Storage.php b/app/code/Magento/Core/Model/File/Storage.php index 153ebd3aab7..b610a3c3cd4 100644 --- a/app/code/Magento/Core/Model/File/Storage.php +++ b/app/code/Magento/Core/Model/File/Storage.php @@ -10,6 +10,7 @@ use Magento\Framework\Model\AbstractModel; /** * Class Storage + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Storage extends AbstractModel { @@ -96,6 +97,7 @@ class Storage extends AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -194,6 +196,8 @@ class Storage extends AbstractModel * * @param array $storage * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function synchronize($storage) { diff --git a/app/code/Magento/Core/Model/File/Storage/Database.php b/app/code/Magento/Core/Model/File/Storage/Database.php index 6484ffcb070..be0c83b686f 100644 --- a/app/code/Magento/Core/Model/File/Storage/Database.php +++ b/app/code/Magento/Core/Model/File/Storage/Database.php @@ -52,6 +52,7 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param null $connectionName * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Core/Model/File/Storage/Directory/Database.php b/app/code/Magento/Core/Model/File/Storage/Directory/Database.php index 0174d3b1c90..34d7fd72e34 100644 --- a/app/code/Magento/Core/Model/File/Storage/Directory/Database.php +++ b/app/code/Magento/Core/Model/File/Storage/Directory/Database.php @@ -39,6 +39,7 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param null $connectionName * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Core/Model/File/Storage/File.php b/app/code/Magento/Core/Model/File/Storage/File.php index 66ac32332d0..24030610075 100644 --- a/app/code/Magento/Core/Model/File/Storage/File.php +++ b/app/code/Magento/Core/Model/File/Storage/File.php @@ -130,6 +130,7 @@ class File * @param int $count * @param string $type * @return array|bool + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function collectData($offset = 0, $count = 100, $type = 'files') { diff --git a/app/code/Magento/Core/Model/File/Storage/Flag.php b/app/code/Magento/Core/Model/File/Storage/Flag.php index cb6f3f4cad1..3d06707ecbd 100644 --- a/app/code/Magento/Core/Model/File/Storage/Flag.php +++ b/app/code/Magento/Core/Model/File/Storage/Flag.php @@ -49,6 +49,7 @@ class Flag extends \Magento\Framework\Flag * * @param \Exception $e * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function passError(\Exception $e) { diff --git a/app/code/Magento/Core/Model/File/Validator/AvailablePath.php b/app/code/Magento/Core/Model/File/Validator/AvailablePath.php index af196001769..34e39d97f36 100644 --- a/app/code/Magento/Core/Model/File/Validator/AvailablePath.php +++ b/app/code/Magento/Core/Model/File/Validator/AvailablePath.php @@ -190,6 +190,7 @@ class AvailablePath extends \Zend_Validate_Abstract * @param string $value File/dir path * @return bool * @throws \Exception Throw exception on empty both paths masks types + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isValid($value) { @@ -231,6 +232,8 @@ class AvailablePath extends \Zend_Validate_Abstract * @param string[] $paths Protected/available paths masks * @param bool $protected Paths masks is protected? * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _isValidByPaths($valuePathInfo, $paths, $protected) { diff --git a/app/code/Magento/Core/Model/Layout/Merge.php b/app/code/Magento/Core/Model/Layout/Merge.php index a1533f98efb..33df2137fa7 100644 --- a/app/code/Magento/Core/Model/Layout/Merge.php +++ b/app/code/Magento/Core/Model/Layout/Merge.php @@ -9,6 +9,8 @@ use Magento\Framework\App\Filesystem\DirectoryList; /** * Layout merge model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Merge implements \Magento\Framework\View\Layout\ProcessorInterface { @@ -168,6 +170,7 @@ class Merge implements \Magento\Framework\View\Layout\ProcessorInterface * @param \Magento\Framework\Filesystem $filesystem * @param \Magento\Framework\View\Design\ThemeInterface $theme Non-injectable theme instance * @param string $cacheSuffix + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\DesignInterface $design, diff --git a/app/code/Magento/Core/Model/Observer.php b/app/code/Magento/Core/Model/Observer.php index 9f67373acca..c8ac454a76d 100644 --- a/app/code/Magento/Core/Model/Observer.php +++ b/app/code/Magento/Core/Model/Observer.php @@ -56,6 +56,7 @@ class Observer * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param Theme\Registration $registration * @param \Psr\Log\LoggerInterface $logger + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct( \Magento\Framework\App\Cache\Frontend\Pool $cacheFrontendPool, diff --git a/app/code/Magento/Core/Model/Resource/Design.php b/app/code/Magento/Core/Model/Resource/Design.php index b9313dc4f56..0e7d6525dbc 100644 --- a/app/code/Magento/Core/Model/Resource/Design.php +++ b/app/code/Magento/Core/Model/Resource/Design.php @@ -105,6 +105,8 @@ class Design extends \Magento\Framework\Model\Resource\Db\AbstractDb * @param string $dateTo * @param int $currentId * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _checkIntersection($storeId, $dateFrom, $dateTo, $currentId) { diff --git a/app/code/Magento/Core/Model/Url/RouteParamsResolver.php b/app/code/Magento/Core/Model/Url/RouteParamsResolver.php index 221c8e2fa58..5ea49391c63 100644 --- a/app/code/Magento/Core/Model/Url/RouteParamsResolver.php +++ b/app/code/Magento/Core/Model/Url/RouteParamsResolver.php @@ -49,6 +49,8 @@ class RouteParamsResolver extends \Magento\Framework\Object implements \Magento\ /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function setRouteParams(array $data, $unsetOldParams = true) { diff --git a/app/code/Magento/Cron/Model/Backend/Config/Structure/Converter.php b/app/code/Magento/Cron/Model/Backend/Config/Structure/Converter.php index 959dded5f7e..ad034e73622 100644 --- a/app/code/Magento/Cron/Model/Backend/Config/Structure/Converter.php +++ b/app/code/Magento/Cron/Model/Backend/Config/Structure/Converter.php @@ -27,6 +27,7 @@ class Converter * * @return array * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function afterConvert(\Magento\Backend\Model\Config\Structure\Converter $subject, array $result) { diff --git a/app/code/Magento/Cron/Model/Observer.php b/app/code/Magento/Cron/Model/Observer.php index c28ebef08e7..49deb4445f8 100644 --- a/app/code/Magento/Cron/Model/Observer.php +++ b/app/code/Magento/Cron/Model/Observer.php @@ -10,6 +10,9 @@ namespace Magento\Cron\Model; use Magento\Framework\App\Filesystem\DirectoryList; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Observer { /**#@+ @@ -117,6 +120,9 @@ class Observer * * @param \Magento\Framework\Event\Observer $observer * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function dispatch($observer) { diff --git a/app/code/Magento/Cron/Model/Schedule.php b/app/code/Magento/Cron/Model/Schedule.php index 8547b88d300..4f62b2289e5 100644 --- a/app/code/Magento/Cron/Model/Schedule.php +++ b/app/code/Magento/Cron/Model/Schedule.php @@ -127,6 +127,8 @@ class Schedule extends \Magento\Framework\Model\AbstractModel * @param int $num * @return bool * @throws Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function matchCronExpression($expr, $num) { diff --git a/app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.php b/app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.php index 30fe06f7d95..76dc17819e4 100644 --- a/app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.php +++ b/app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.php @@ -138,6 +138,8 @@ class Currencysymbol * Returns currency symbol properties array based on config values * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getCurrencySymbolsData() { diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php index a7f02b4a7a9..6542928ff34 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php @@ -18,6 +18,7 @@ use Magento\Customer\Model\Address\Mapper as AddressMapper; * Customer addresses forms * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Addresses extends GenericMetadata { diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Reviews.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Reviews.php index 681c84647aa..e074cef79b3 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Reviews.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Reviews.php @@ -10,6 +10,9 @@ */ namespace Magento\Customer\Block\Adminhtml\Edit\Tab; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Reviews extends \Magento\Review\Block\Adminhtml\Grid { /** diff --git a/app/code/Magento/Customer/Helper/Address.php b/app/code/Magento/Customer/Helper/Address.php index 627a97d1874..38b44235f25 100644 --- a/app/code/Magento/Customer/Helper/Address.php +++ b/app/code/Magento/Customer/Helper/Address.php @@ -14,6 +14,7 @@ use Magento\Framework\Exception\NoSuchEntityException; * Customer address helper * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Address extends \Magento\Framework\App\Helper\AbstractHelper { diff --git a/app/code/Magento/Customer/Model/Address.php b/app/code/Magento/Customer/Model/Address.php index 2ddd80d02b5..6f61ccd0ddf 100644 --- a/app/code/Magento/Customer/Model/Address.php +++ b/app/code/Magento/Customer/Model/Address.php @@ -15,6 +15,7 @@ use Magento\Framework\Api\AttributeDataBuilder; * * @method int getParentId() getParentId() * @method \Magento\Customer\Model\Address setParentId() setParentId(int $parentId) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Address extends \Magento\Customer\Model\Address\AbstractAddress { @@ -53,6 +54,7 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Customer/Model/Address/AbstractAddress.php b/app/code/Magento/Customer/Model/Address/AbstractAddress.php index 088ac96e0d7..80c9a4f3576 100644 --- a/app/code/Magento/Customer/Model/Address/AbstractAddress.php +++ b/app/code/Magento/Customer/Model/Address/AbstractAddress.php @@ -26,6 +26,7 @@ use Magento\Framework\Api\AttributeDataBuilder; * @method string getTelephone() * @method string getPostcode() * @method bool getShouldIgnoreValidation() + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AbstractAddress extends \Magento\Framework\Model\AbstractExtensibleModel { @@ -122,6 +123,7 @@ class AbstractAddress extends \Magento\Framework\Model\AbstractExtensibleModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -471,6 +473,7 @@ class AbstractAddress extends \Magento\Framework\Model\AbstractExtensibleModel * @return AddressInterface * @deprecated Use Api/Data/AddressInterface as a result of service operations. Don't rely on the model to provide * the instance of Api/Data/AddressInterface + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getDataModel($defaultBillingAddressId = null, $defaultShippingAddressId = null) { @@ -526,6 +529,8 @@ class AbstractAddress extends \Magento\Framework\Model\AbstractExtensibleModel * Validate address attribute values * * @return bool|array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validate() { diff --git a/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php b/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php index 3037a022188..0460e6912b7 100644 --- a/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php +++ b/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php @@ -40,6 +40,7 @@ class ContextPlugin * @param callable $proceed * @param \Magento\Framework\App\RequestInterface $request * @return mixed + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundDispatch( \Magento\Framework\App\Action\Action $subject, diff --git a/app/code/Magento/Customer/Model/Customer.php b/app/code/Magento/Customer/Model/Customer.php index 98ac3c18bb2..e9c3424ab30 100644 --- a/app/code/Magento/Customer/Model/Customer.php +++ b/app/code/Magento/Customer/Model/Customer.php @@ -30,6 +30,10 @@ use Magento\Framework\Api\AttributeDataBuilder; * @method Customer setPasswordHash($string) * @method string getPasswordHash() * @method string getConfirmation() + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Customer extends \Magento\Framework\Model\AbstractExtensibleModel { @@ -218,6 +222,7 @@ class Customer extends \Magento\Framework\Model\AbstractExtensibleModel * @param DataObjectProcessor $dataObjectProcessor * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -990,6 +995,8 @@ class Customer extends \Magento\Framework\Model\AbstractExtensibleModel * (i.e. its change is requested) * * @return bool|string[] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validate() { diff --git a/app/code/Magento/Customer/Model/Group.php b/app/code/Magento/Customer/Model/Group.php index 699fa503a48..252ff3c86c4 100644 --- a/app/code/Magento/Customer/Model/Group.php +++ b/app/code/Magento/Customer/Model/Group.php @@ -77,6 +77,7 @@ class Group extends \Magento\Framework\Model\AbstractExtensibleModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Customer/Model/Metadata/Form/AbstractData.php b/app/code/Magento/Customer/Model/Metadata/Form/AbstractData.php index e5c0978f140..78461578f47 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/AbstractData.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/AbstractData.php @@ -8,6 +8,9 @@ namespace Magento\Customer\Model\Metadata\Form; use Magento\Framework\Api\ArrayObjectSearch; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ abstract class AbstractData { /** @@ -256,6 +259,8 @@ abstract class AbstractData * * @param string $value * @return array|true + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _validateInputRule($value) { @@ -436,6 +441,7 @@ abstract class AbstractData * Return is AJAX Request * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsAjaxRequest() { diff --git a/app/code/Magento/Customer/Model/Metadata/Form/Date.php b/app/code/Magento/Customer/Model/Metadata/Form/Date.php index 6a1443c0d3d..3fae45000c5 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/Date.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/Date.php @@ -21,6 +21,8 @@ class Date extends AbstractData /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validateValue($value) { diff --git a/app/code/Magento/Customer/Model/Metadata/Form/File.php b/app/code/Magento/Customer/Model/Metadata/Form/File.php index 2d8f7a9b78f..26a8fe7837b 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/File.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/File.php @@ -11,6 +11,9 @@ use Magento\Framework\Filesystem; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Api\ArrayObjectSearch; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class File extends AbstractData { /** @@ -54,6 +57,7 @@ class File extends AbstractData * @param \Magento\Core\Model\File\Validator\NotProtectedExtension $fileValidator * @param Filesystem $fileSystem * @param UploaderFactory $uploaderFactory + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, @@ -77,6 +81,7 @@ class File extends AbstractData /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function extractValue(\Magento\Framework\App\RequestInterface $request) { @@ -193,6 +198,8 @@ class File extends AbstractData /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validateValue($value) { diff --git a/app/code/Magento/Customer/Model/Metadata/Form/Image.php b/app/code/Magento/Customer/Model/Metadata/Form/Image.php index 5527c99d8a0..01fc2145727 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/Image.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/Image.php @@ -16,6 +16,8 @@ class Image extends File * * @param array $value * @return string[] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _validateByRules($value) { diff --git a/app/code/Magento/Customer/Model/Metadata/Form/Multiline.php b/app/code/Magento/Customer/Model/Metadata/Form/Multiline.php index 1e5e68afc1b..2ac504c8384 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/Multiline.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/Multiline.php @@ -24,6 +24,7 @@ class Multiline extends Text /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function validateValue($value) { diff --git a/app/code/Magento/Customer/Model/Metadata/Form/Text.php b/app/code/Magento/Customer/Model/Metadata/Form/Text.php index 34802ae362c..320ad12aaa7 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/Text.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/Text.php @@ -49,6 +49,8 @@ class Text extends AbstractData /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validateValue($value) { diff --git a/app/code/Magento/Customer/Model/Observer.php b/app/code/Magento/Customer/Model/Observer.php index 2e26e532516..692055fddcb 100644 --- a/app/code/Magento/Customer/Model/Observer.php +++ b/app/code/Magento/Customer/Model/Observer.php @@ -150,6 +150,7 @@ class Observer * * @param \Magento\Framework\Event\Observer $observer * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function afterAddressSave($observer) { diff --git a/app/code/Magento/Customer/Model/Renderer/Region.php b/app/code/Magento/Customer/Model/Renderer/Region.php index 10857235b49..ec146726bc2 100644 --- a/app/code/Magento/Customer/Model/Renderer/Region.php +++ b/app/code/Magento/Customer/Model/Renderer/Region.php @@ -55,6 +55,8 @@ class Region implements \Magento\Framework\Data\Form\Element\Renderer\RendererIn /** * @param AbstractElement $element * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function render(AbstractElement $element) { diff --git a/app/code/Magento/Customer/Model/Resource/AddressRepository.php b/app/code/Magento/Customer/Model/Resource/AddressRepository.php index a775fdaf72d..a64724956f6 100644 --- a/app/code/Magento/Customer/Model/Resource/AddressRepository.php +++ b/app/code/Magento/Customer/Model/Resource/AddressRepository.php @@ -12,6 +12,9 @@ use Magento\Framework\Api\Search\FilterGroup; use Magento\Framework\Api\SortOrder; use Magento\Framework\Exception\InputException; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class AddressRepository implements \Magento\Customer\Api\AddressRepositoryInterface { /** diff --git a/app/code/Magento/Customer/Model/Resource/Customer.php b/app/code/Magento/Customer/Model/Resource/Customer.php index a7599d3073a..c8bc8721747 100644 --- a/app/code/Magento/Customer/Model/Resource/Customer.php +++ b/app/code/Magento/Customer/Model/Resource/Customer.php @@ -8,6 +8,7 @@ use Magento\Framework\Exception\InputException; /** * Customer entity resource model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Customer extends \Magento\Eav\Model\Entity\AbstractEntity { @@ -39,6 +40,7 @@ class Customer extends \Magento\Eav\Model\Entity\AbstractEntity * @param \Magento\Core\Model\Validator\Factory $validatorFactory * @param \Magento\Framework\Stdlib\DateTime $dateTime * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Resource $resource, @@ -183,6 +185,7 @@ class Customer extends \Magento\Eav\Model\Entity\AbstractEntity * * @param \Magento\Customer\Model\Customer $customer * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _saveAddresses(\Magento\Customer\Model\Customer $customer) { diff --git a/app/code/Magento/Customer/Model/Resource/CustomerRepository.php b/app/code/Magento/Customer/Model/Resource/CustomerRepository.php index d55b6b246ef..2a7a73df544 100644 --- a/app/code/Magento/Customer/Model/Resource/CustomerRepository.php +++ b/app/code/Magento/Customer/Model/Resource/CustomerRepository.php @@ -12,6 +12,7 @@ use Magento\Framework\Exception\NoSuchEntityException; /** * Customer repository. + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class CustomerRepository implements \Magento\Customer\Api\CustomerRepositoryInterface { @@ -88,6 +89,7 @@ class CustomerRepository implements \Magento\Customer\Api\CustomerRepositoryInte * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Customer\Model\CustomerFactory $customerFactory, @@ -119,6 +121,7 @@ class CustomerRepository implements \Magento\Customer\Api\CustomerRepositoryInte /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function save(\Magento\Customer\Api\Data\CustomerInterface $customer, $passwordHash = null) { diff --git a/app/code/Magento/Customer/Model/Resource/Setup.php b/app/code/Magento/Customer/Model/Resource/Setup.php index ff8aa012f12..342b96ca83e 100644 --- a/app/code/Magento/Customer/Model/Resource/Setup.php +++ b/app/code/Magento/Customer/Model/Resource/Setup.php @@ -46,6 +46,8 @@ class Setup extends \Magento\Eav\Model\Entity\Setup * Add customer attributes to customer forms * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function installCustomerForms() { @@ -113,6 +115,7 @@ class Setup extends \Magento\Eav\Model\Entity\Setup * Retrieve default entities: customer, customer_address * * @return array + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getDefaultEntities() { diff --git a/app/code/Magento/Customer/Model/Session.php b/app/code/Magento/Customer/Model/Session.php index af41901242d..107993816f7 100644 --- a/app/code/Magento/Customer/Model/Session.php +++ b/app/code/Magento/Customer/Model/Session.php @@ -13,6 +13,7 @@ use Magento\Customer\Model\Resource\Customer as ResourceCustomer; /** * Customer session model * @method string getNoReferer() + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Session extends \Magento\Framework\Session\SessionManager { @@ -111,6 +112,7 @@ class Session extends \Magento\Framework\Session\SessionManager * @param \Magento\Framework\App\Http\Context $httpContext * @param CustomerRepositoryInterface $customerRepository * @param GroupManagementInterface $groupManagement + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Request\Http $request, diff --git a/app/code/Magento/CustomerImportExport/Model/Export/Address.php b/app/code/Magento/CustomerImportExport/Model/Export/Address.php index 68281aec5e6..b9e131decdd 100644 --- a/app/code/Magento/CustomerImportExport/Model/Export/Address.php +++ b/app/code/Magento/CustomerImportExport/Model/Export/Address.php @@ -4,6 +4,9 @@ */ namespace Magento\CustomerImportExport\Model\Export; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Address extends \Magento\ImportExport\Model\Export\Entity\AbstractEav { /**#@+ @@ -108,6 +111,7 @@ class Address extends \Magento\ImportExport\Model\Export\Entity\AbstractEav * @param \Magento\CustomerImportExport\Model\Export\CustomerFactory $eavCustomerFactory * @param \Magento\Customer\Model\Resource\Address\CollectionFactory $addressColFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, diff --git a/app/code/Magento/CustomerImportExport/Model/Import/AbstractCustomer.php b/app/code/Magento/CustomerImportExport/Model/Import/AbstractCustomer.php index 03f2d3b690c..9485c8e9f47 100644 --- a/app/code/Magento/CustomerImportExport/Model/Import/AbstractCustomer.php +++ b/app/code/Magento/CustomerImportExport/Model/Import/AbstractCustomer.php @@ -8,6 +8,7 @@ use Magento\CustomerImportExport\Model\Resource\Import\Customer\Storage; /** * Import entity abstract customer model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractCustomer extends \Magento\ImportExport\Model\Import\Entity\AbstractEav { @@ -78,6 +79,7 @@ abstract class AbstractCustomer extends \Magento\ImportExport\Model\Import\Entit * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\CustomerImportExport\Model\Resource\Import\Customer\StorageFactory $storageFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Core\Helper\Data $coreData, diff --git a/app/code/Magento/CustomerImportExport/Model/Import/Address.php b/app/code/Magento/CustomerImportExport/Model/Import/Address.php index 207b214fad7..98c0f0f7be2 100644 --- a/app/code/Magento/CustomerImportExport/Model/Import/Address.php +++ b/app/code/Magento/CustomerImportExport/Model/Import/Address.php @@ -4,6 +4,10 @@ */ namespace Magento\CustomerImportExport\Model\Import; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Address extends AbstractCustomer { /**#@+ @@ -225,6 +229,8 @@ class Address extends AbstractCustomer * @param \Magento\Customer\Model\Resource\Address\Attribute\CollectionFactory $attributesFactory * @param \Magento\Framework\Stdlib\DateTime $dateTime * @param array $data + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Core\Helper\Data $coreData, @@ -450,6 +456,8 @@ class Address extends AbstractCustomer * * @param array $rowData * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _prepareDataForUpdate(array $rowData) { @@ -644,6 +652,8 @@ class Address extends AbstractCustomer * @param array $rowData * @param int $rowNumber * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _validateRowForUpdate(array $rowData, $rowNumber) { diff --git a/app/code/Magento/CustomerImportExport/Model/Import/Customer.php b/app/code/Magento/CustomerImportExport/Model/Import/Customer.php index ed9807ec7c3..30497ebecd5 100644 --- a/app/code/Magento/CustomerImportExport/Model/Import/Customer.php +++ b/app/code/Magento/CustomerImportExport/Model/Import/Customer.php @@ -4,6 +4,9 @@ */ namespace Magento\CustomerImportExport\Model\Import; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Customer extends AbstractCustomer { /** @@ -127,6 +130,7 @@ class Customer extends AbstractCustomer * @param \Magento\Customer\Model\Resource\Attribute\CollectionFactory $attrCollectionFactory * @param \Magento\Customer\Model\CustomerFactory $customerFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Core\Helper\Data $coreData, @@ -276,6 +280,8 @@ class Customer extends AbstractCustomer * * @param array $rowData * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _prepareDataForUpdate(array $rowData) { @@ -365,6 +371,7 @@ class Customer extends AbstractCustomer * Import data rows * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _importData() { @@ -432,6 +439,8 @@ class Customer extends AbstractCustomer * @param array $rowData * @param int $rowNumber * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _validateRowForUpdate(array $rowData, $rowNumber) { diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Edit.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Edit.php index 0a33cc3bef6..912533a479e 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Edit.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Edit.php @@ -80,6 +80,7 @@ class Edit extends \Magento\Backend\Block\Widget\Button\SplitButton * Whether button is disabled * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDisabled() { diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Save.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Save.php index 2337a4467a2..46eb8d60382 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Save.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Save.php @@ -78,6 +78,7 @@ class Save extends \Magento\Backend\Block\Widget\Button\SplitButton * Whether button is disabled * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDisabled() { diff --git a/app/code/Magento/DesignEditor/Model/Observer.php b/app/code/Magento/DesignEditor/Model/Observer.php index 2f26e057179..e9d80a493c0 100644 --- a/app/code/Magento/DesignEditor/Model/Observer.php +++ b/app/code/Magento/DesignEditor/Model/Observer.php @@ -47,6 +47,7 @@ class Observer * * @param EventObserver $event * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function clearJs(EventObserver $event) { diff --git a/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php b/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php index 7e206ac327b..dae895c9d15 100644 --- a/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php +++ b/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php @@ -43,6 +43,7 @@ class NavigationMode extends \Magento\Framework\Url * @param string $scopeType * @param \Magento\DesignEditor\Helper\Data $helper * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Route\ConfigInterface $routeConfig, diff --git a/app/code/Magento/Dhl/Model/Carrier.php b/app/code/Magento/Dhl/Model/Carrier.php index b81ffca5c10..77d2105726f 100644 --- a/app/code/Magento/Dhl/Model/Carrier.php +++ b/app/code/Magento/Dhl/Model/Carrier.php @@ -14,6 +14,9 @@ use Magento\Shipping\Model\Rate\Result; /** * DHL International (API v1.4) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shipping\Model\Carrier\CarrierInterface { @@ -206,6 +209,7 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin * @param \Magento\Framework\HTTP\ZendClientFactory $httpClientFactory * @param \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, @@ -369,6 +373,8 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin * * @param \Magento\Framework\Object $request * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function setRequest(\Magento\Framework\Object $request) { @@ -610,6 +616,7 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin * * @param string $code One-symbol code (see getDhlProducts()) * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDhlProductTitle($code) { @@ -656,6 +663,8 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin * Prepare items to pieces * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getAllItems() { @@ -746,6 +755,7 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin * * @param \Magento\Shipping\Model\Simplexml\Element $nodeBkgDetails * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _makePieces(\Magento\Shipping\Model\Simplexml\Element $nodeBkgDetails) { @@ -1008,6 +1018,8 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin * @param string $response * @return bool|\Magento\Framework\Object|Result|Error * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _parseResponse($response) { @@ -1095,6 +1107,7 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin * * @param \SimpleXMLElement $shipmentDetails * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _addRate(\SimpleXMLElement $shipmentDetails) { @@ -1359,6 +1372,9 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin * * @return Result|\Magento\Framework\Object * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _doRequest() { @@ -1552,6 +1568,8 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin * @param RateRequest $rawRequest * @param string $originRegion * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _shipmentDetails($xml, $rawRequest, $originRegion = '') { @@ -1740,6 +1758,8 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin * @param string[] $trackings * @param string $response * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _parseXmlTrackingResponse($trackings, $response) { diff --git a/app/code/Magento/Directory/Model/Currency.php b/app/code/Magento/Directory/Model/Currency.php index 2d6d55fb71b..c5a29bbd2dd 100644 --- a/app/code/Magento/Directory/Model/Currency.php +++ b/app/code/Magento/Directory/Model/Currency.php @@ -13,6 +13,9 @@ namespace Magento\Directory\Model; use Magento\Directory\Exception; use Magento\Directory\Model\Currency\Filter; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Currency extends \Magento\Framework\Model\AbstractModel { /** @@ -72,6 +75,7 @@ class Currency extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Directory/Model/Observer.php b/app/code/Magento/Directory/Model/Observer.php index 98313020819..fd48d4d39da 100644 --- a/app/code/Magento/Directory/Model/Observer.php +++ b/app/code/Magento/Directory/Model/Observer.php @@ -83,6 +83,7 @@ class Observer /** * @param mixed $schedule * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function scheduledUpdateCurrencyRates($schedule) { diff --git a/app/code/Magento/Directory/Model/Resource/Country/Collection.php b/app/code/Magento/Directory/Model/Resource/Country/Collection.php index ed505ab7aa0..c382f1089b5 100644 --- a/app/code/Magento/Directory/Model/Resource/Country/Collection.php +++ b/app/code/Magento/Directory/Model/Resource/Country/Collection.php @@ -53,6 +53,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param mixed $connection * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Core\Model\EntityFactory $entityFactory, diff --git a/app/code/Magento/Directory/Model/Resource/Currency.php b/app/code/Magento/Directory/Model/Resource/Currency.php index 005d02081f3..38433b2fe5c 100644 --- a/app/code/Magento/Directory/Model/Resource/Currency.php +++ b/app/code/Magento/Directory/Model/Resource/Currency.php @@ -160,6 +160,7 @@ class Currency extends \Magento\Framework\Model\Resource\Db\AbstractDb * @param \Magento\Directory\Model\Currency $model * @param string $path * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getConfigCurrencies($model, $path) { diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php index b791971d023..795e86c40cf 100644 --- a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php +++ b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php @@ -8,6 +8,7 @@ namespace Magento\Downloadable\Block\Adminhtml\Catalog\Product\Edit\Tab\Download * Adminhtml catalog product downloadable items tab links section * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Links extends \Magento\Backend\Block\Template { @@ -87,6 +88,7 @@ class Links extends \Magento\Backend\Block\Template * @param \Magento\Eav\Model\Entity\AttributeFactory $attributeFactory * @param \Magento\Backend\Model\UrlFactory $urlFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Backend\Block\Template\Context $context, @@ -214,6 +216,7 @@ class Links extends \Magento\Backend\Block\Template * Check exists defined links title * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUsedDefault() { @@ -224,6 +227,7 @@ class Links extends \Magento\Backend\Block\Template * Return true if price in website scope * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsPriceWebsiteScope() { @@ -241,6 +245,8 @@ class Links extends \Magento\Backend\Block\Template * Return array of links * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getLinkData() { diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php index b116af08262..6ccec440045 100644 --- a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php +++ b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php @@ -188,6 +188,7 @@ class Samples extends \Magento\Backend\Block\Widget * Check exists defined samples title * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUsedDefault() { diff --git a/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php b/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php index eabb0c42254..d03a26d57a0 100644 --- a/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php +++ b/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php @@ -45,6 +45,7 @@ class Links extends \Magento\Catalog\Block\Product\AbstractProduct * Enter description here... * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getLinksPurchasedSeparately() { @@ -53,6 +54,7 @@ class Links extends \Magento\Catalog\Block\Product\AbstractProduct /** * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getLinkSelectionRequired() { @@ -136,6 +138,7 @@ class Links extends \Magento\Catalog\Block\Product\AbstractProduct * Return true if target of link new window * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsOpenInNewWindow() { @@ -150,6 +153,7 @@ class Links extends \Magento\Catalog\Block\Product\AbstractProduct * * @param Link $link * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsLinkChecked($link) { diff --git a/app/code/Magento/Downloadable/Block/Catalog/Product/Samples.php b/app/code/Magento/Downloadable/Block/Catalog/Product/Samples.php index 13e5390b0dc..a8dd75adeb9 100644 --- a/app/code/Magento/Downloadable/Block/Catalog/Product/Samples.php +++ b/app/code/Magento/Downloadable/Block/Catalog/Product/Samples.php @@ -59,6 +59,7 @@ class Samples extends \Magento\Catalog\Block\Product\AbstractProduct * Return true if target of link new window * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsOpenInNewWindow() { diff --git a/app/code/Magento/Downloadable/Block/Checkout/Cart/Item/Renderer.php b/app/code/Magento/Downloadable/Block/Checkout/Cart/Item/Renderer.php index a7c54f2b7e7..0177d861e8f 100644 --- a/app/code/Magento/Downloadable/Block/Checkout/Cart/Item/Renderer.php +++ b/app/code/Magento/Downloadable/Block/Checkout/Cart/Item/Renderer.php @@ -32,6 +32,7 @@ class Renderer extends \Magento\Checkout\Block\Cart\Item\Renderer * @param \Magento\Downloadable\Helper\Catalog\Product\Configuration $downloadableProductConfiguration * @param \Magento\Framework\Module\Manager $moduleManager * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Downloadable/Block/Checkout/Success.php b/app/code/Magento/Downloadable/Block/Checkout/Success.php index dffdc9de9fa..d1416da1ab7 100644 --- a/app/code/Magento/Downloadable/Block/Checkout/Success.php +++ b/app/code/Magento/Downloadable/Block/Checkout/Success.php @@ -55,6 +55,7 @@ class Success extends \Magento\Checkout\Block\Onepage\Success * Return true if order(s) has one or more downloadable products * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getOrderHasDownloadable() { diff --git a/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php b/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php index bf1611da433..ef08619fa24 100644 --- a/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php +++ b/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php @@ -158,6 +158,7 @@ class ListProducts extends \Magento\Framework\View\Element\Template * Return true if target of link new window * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsOpenInNewWindow() { diff --git a/app/code/Magento/Downloadable/Controller/Download/Link.php b/app/code/Magento/Downloadable/Controller/Download/Link.php index cf1c4d6270e..3f9078a77d4 100644 --- a/app/code/Magento/Downloadable/Controller/Download/Link.php +++ b/app/code/Magento/Downloadable/Controller/Download/Link.php @@ -25,6 +25,10 @@ class Link extends \Magento\Downloadable\Controller\Download * Download link action * * @return void|ResponseInterface + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.ExitExpression) */ public function execute() { diff --git a/app/code/Magento/Downloadable/Controller/Download/LinkSample.php b/app/code/Magento/Downloadable/Controller/Download/LinkSample.php index ea8f928caad..338dabc959b 100644 --- a/app/code/Magento/Downloadable/Controller/Download/LinkSample.php +++ b/app/code/Magento/Downloadable/Controller/Download/LinkSample.php @@ -14,6 +14,7 @@ class LinkSample extends \Magento\Downloadable\Controller\Download * Download link's sample action * * @return ResponseInterface + * @SuppressWarnings(PHPMD.ExitExpression) */ public function execute() { diff --git a/app/code/Magento/Downloadable/Controller/Download/Sample.php b/app/code/Magento/Downloadable/Controller/Download/Sample.php index 72a761a8d96..9b4339df86d 100644 --- a/app/code/Magento/Downloadable/Controller/Download/Sample.php +++ b/app/code/Magento/Downloadable/Controller/Download/Sample.php @@ -14,6 +14,7 @@ class Sample extends \Magento\Downloadable\Controller\Download * Download sample action * * @return ResponseInterface + * @SuppressWarnings(PHPMD.ExitExpression) */ public function execute() { diff --git a/app/code/Magento/Downloadable/Helper/Data.php b/app/code/Magento/Downloadable/Helper/Data.php index 7989aa76cce..15be28876fe 100644 --- a/app/code/Magento/Downloadable/Helper/Data.php +++ b/app/code/Magento/Downloadable/Helper/Data.php @@ -37,6 +37,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * * @param \Magento\Downloadable\Model\Link|Item $link * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsShareable($link) { diff --git a/app/code/Magento/Downloadable/Helper/Download.php b/app/code/Magento/Downloadable/Helper/Download.php index 937be7b750f..2efd55ef364 100644 --- a/app/code/Magento/Downloadable/Helper/Download.php +++ b/app/code/Magento/Downloadable/Helper/Download.php @@ -10,6 +10,7 @@ use Magento\Framework\Model\Exception as CoreException; /** * Downloadable Products Download Helper + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Download extends \Magento\Framework\App\Helper\AbstractHelper { @@ -293,6 +294,7 @@ class Download extends \Magento\Framework\App\Helper\AbstractHelper * * @param mixed $store * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getContentDisposition($store = null) { diff --git a/app/code/Magento/Downloadable/Model/Observer.php b/app/code/Magento/Downloadable/Model/Observer.php index bacac2047a5..e806b250077 100644 --- a/app/code/Magento/Downloadable/Model/Observer.php +++ b/app/code/Magento/Downloadable/Model/Observer.php @@ -10,6 +10,7 @@ use Magento\Store\Model\ScopeInterface; * Downloadable Products Observer * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Observer { @@ -110,6 +111,8 @@ class Observer * * @param \Magento\Framework\Object $observer * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function saveDownloadableOrderItem($observer) { @@ -229,6 +232,8 @@ class Observer * * @param \Magento\Framework\Object $observer * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function setLinkStatus($observer) { diff --git a/app/code/Magento/Downloadable/Model/Product/Type.php b/app/code/Magento/Downloadable/Model/Product/Type.php index 3fa35f6189e..28621b660e5 100644 --- a/app/code/Magento/Downloadable/Model/Product/Type.php +++ b/app/code/Magento/Downloadable/Model/Product/Type.php @@ -10,6 +10,7 @@ use Magento\Catalog\Api\ProductRepositoryInterface; * Downloadable product type model * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Type extends \Magento\Catalog\Model\Product\Type\Virtual { @@ -72,6 +73,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\Virtual * @param \Magento\Downloadable\Model\Resource\Sample\CollectionFactory $samplesFactory * @param \Magento\Downloadable\Model\SampleFactory $sampleFactory * @param \Magento\Downloadable\Model\LinkFactory $linkFactory + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Catalog\Model\Product\Option $catalogProductOption, @@ -186,6 +188,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\Virtual * * @param \Magento\Catalog\Model\Product $product * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getLinkSelectionRequired($product) { @@ -228,6 +231,9 @@ class Type extends \Magento\Catalog\Model\Product\Type\Virtual * * @param \Magento\Catalog\Model\Product $product * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function save($product) { @@ -560,6 +566,8 @@ class Type extends \Magento\Catalog\Model\Product\Type\Virtual * @param \Magento\Catalog\Model\Product $product * @param string $processMode * @return array|string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _prepareProduct(\Magento\Framework\Object $buyRequest, $product, $processMode) { diff --git a/app/code/Magento/Downloadable/Model/Resource/Link.php b/app/code/Magento/Downloadable/Model/Resource/Link.php index b139ed4bcd8..67f9277325b 100644 --- a/app/code/Magento/Downloadable/Model/Resource/Link.php +++ b/app/code/Magento/Downloadable/Model/Resource/Link.php @@ -69,6 +69,7 @@ class Link extends \Magento\Framework\Model\Resource\Db\AbstractDb * * @param \Magento\Downloadable\Model\Link $linkObject * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function saveItemTitleAndPrice($linkObject) { diff --git a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/AbstractItems.php b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/AbstractItems.php index 16dfe68a25a..21be2eae6bc 100644 --- a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/AbstractItems.php +++ b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/AbstractItems.php @@ -6,6 +6,7 @@ namespace Magento\Downloadable\Model\Sales\Order\Pdf\Items; /** * Order Downloadable Pdf Items renderer + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractItems extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems { @@ -45,6 +46,7 @@ abstract class AbstractItems extends \Magento\Sales\Model\Order\Pdf\Items\Abstra * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php index 9c93337030f..9b7c23afe67 100644 --- a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php +++ b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php @@ -27,6 +27,7 @@ class Creditmemo extends \Magento\Downloadable\Model\Sales\Order\Pdf\Items\Abstr * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php index 05d4bf202a9..23a8bfb9e2e 100644 --- a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php +++ b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php @@ -27,6 +27,7 @@ class Invoice extends \Magento\Downloadable\Model\Sales\Order\Pdf\Items\Abstract * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -62,6 +63,7 @@ class Invoice extends \Magento\Downloadable\Model\Sales\Order\Pdf\Items\Abstract * Draw item line * * @return void + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function draw() { diff --git a/app/code/Magento/Eav/Api/Data/AttributeInterface.php b/app/code/Magento/Eav/Api/Data/AttributeInterface.php index aecf21d851b..67501a88200 100644 --- a/app/code/Magento/Eav/Api/Data/AttributeInterface.php +++ b/app/code/Magento/Eav/Api/Data/AttributeInterface.php @@ -73,6 +73,7 @@ interface AttributeInterface extends \Magento\Framework\Api\ExtensibleDataInterf * Whether attribute is required. * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsRequired(); diff --git a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php index f73acfcbc0c..b75bfeab278 100644 --- a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php +++ b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php @@ -99,6 +99,7 @@ abstract class AbstractMain extends \Magento\Backend\Block\Widget\Form\Generic * Preparing default form elements for editing attribute * * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php b/app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php index f8a52ed7bde..27dff63da40 100644 --- a/app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php +++ b/app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php @@ -11,6 +11,7 @@ use Magento\Framework\Model\Exception as CoreException; * EAV Attribute Abstract Data Model * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractData { @@ -284,6 +285,8 @@ abstract class AbstractData * * @param string $value * @return string|true + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _validateInputRule($value) { @@ -478,6 +481,7 @@ abstract class AbstractData * Return is AJAX Request * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsAjaxRequest() { diff --git a/app/code/Magento/Eav/Model/Attribute/Data/Date.php b/app/code/Magento/Eav/Model/Attribute/Data/Date.php index 577265a546b..0d16c99b022 100644 --- a/app/code/Magento/Eav/Model/Attribute/Data/Date.php +++ b/app/code/Magento/Eav/Model/Attribute/Data/Date.php @@ -31,6 +31,8 @@ class Date extends \Magento\Eav\Model\Attribute\Data\AbstractData * * @param array|string $value * @return bool|array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validateValue($value) { diff --git a/app/code/Magento/Eav/Model/Attribute/Data/File.php b/app/code/Magento/Eav/Model/Attribute/Data/File.php index 94b0e6ff1c6..df14a32799d 100644 --- a/app/code/Magento/Eav/Model/Attribute/Data/File.php +++ b/app/code/Magento/Eav/Model/Attribute/Data/File.php @@ -63,6 +63,7 @@ class File extends \Magento\Eav\Model\Attribute\Data\AbstractData * * @param RequestInterface $request * @return array|string|bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function extractValue(RequestInterface $request) { @@ -162,6 +163,8 @@ class File extends \Magento\Eav\Model\Attribute\Data\AbstractData * * @param array|string $value * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validateValue($value) { @@ -204,6 +207,7 @@ class File extends \Magento\Eav\Model\Attribute\Data\AbstractData * * @param array|string $value * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function compactValue($value) { diff --git a/app/code/Magento/Eav/Model/Attribute/Data/Image.php b/app/code/Magento/Eav/Model/Attribute/Data/Image.php index 27cf808fe38..0efb736c45a 100644 --- a/app/code/Magento/Eav/Model/Attribute/Data/Image.php +++ b/app/code/Magento/Eav/Model/Attribute/Data/Image.php @@ -17,6 +17,8 @@ class Image extends \Magento\Eav\Model\Attribute\Data\File * * @param array $value * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _validateByRules($value) { diff --git a/app/code/Magento/Eav/Model/Attribute/Data/Text.php b/app/code/Magento/Eav/Model/Attribute/Data/Text.php index e32506f45dd..2d6351af856 100644 --- a/app/code/Magento/Eav/Model/Attribute/Data/Text.php +++ b/app/code/Magento/Eav/Model/Attribute/Data/Text.php @@ -52,6 +52,8 @@ class Text extends \Magento\Eav\Model\Attribute\Data\AbstractData * * @param array|string $value * @return bool|array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validateValue($value) { diff --git a/app/code/Magento/Eav/Model/AttributeRepository.php b/app/code/Magento/Eav/Model/AttributeRepository.php index 7b2b69dd5f8..9809fb35dff 100644 --- a/app/code/Magento/Eav/Model/AttributeRepository.php +++ b/app/code/Magento/Eav/Model/AttributeRepository.php @@ -11,6 +11,9 @@ use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Exception\StateException; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class AttributeRepository implements \Magento\Eav\Api\AttributeRepositoryInterface { /** diff --git a/app/code/Magento/Eav/Model/AttributeSetRepository.php b/app/code/Magento/Eav/Model/AttributeSetRepository.php index 2bd27a9f844..6c94aa59043 100644 --- a/app/code/Magento/Eav/Model/AttributeSetRepository.php +++ b/app/code/Magento/Eav/Model/AttributeSetRepository.php @@ -15,6 +15,9 @@ use Magento\Framework\Exception\CouldNotDeleteException; use Magento\Framework\Exception\CouldNotSaveException; use Magento\Framework\Exception\NoSuchEntityException; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class AttributeSetRepository implements AttributeSetRepositoryInterface { /** diff --git a/app/code/Magento/Eav/Model/Config.php b/app/code/Magento/Eav/Model/Config.php index fbf4c5faa90..b3b3f9b5249 100644 --- a/app/code/Magento/Eav/Model/Config.php +++ b/app/code/Magento/Eav/Model/Config.php @@ -6,6 +6,9 @@ namespace Magento\Eav\Model; use Magento\Eav\Model\Entity\Type; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Config { /**#@+ @@ -449,6 +452,8 @@ class Config * @param mixed $entityType * @param \Magento\Framework\Object $object * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getEntityAttributeCodes($entityType, $object = null) { diff --git a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php index 5d67832a960..aab51c7333d 100644 --- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php @@ -16,6 +16,9 @@ use Magento\Framework\Model\Exception; * Entity/Attribute/Model - entity abstract * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractEntity extends \Magento\Framework\Model\Resource\AbstractResource implements EntityInterface { @@ -413,6 +416,7 @@ abstract class AbstractEntity extends \Magento\Framework\Model\Resource\Abstract * * @param string|int|Element $attribute * @return AbstractAttribute|false + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getAttribute($attribute) { @@ -636,6 +640,7 @@ abstract class AbstractEntity extends \Magento\Framework\Model\Resource\Abstract * @param \Magento\Framework\Object $object * @param AbstractAttribute $attribute * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _isApplicableAttribute($object, $attribute) { @@ -656,6 +661,8 @@ abstract class AbstractEntity extends \Magento\Framework\Model\Resource\Abstract * * @throws \Exception|\Magento\Eav\Model\Entity\Attribute\Exception * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function walkAttributes($partMethod, array $args = [], $collectExceptionMessages = null) { @@ -738,6 +745,7 @@ abstract class AbstractEntity extends \Magento\Framework\Model\Resource\Abstract * @param string $method * @param array $args array of arguments * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _isCallableAttributeInstance($instance, $method, $args) { @@ -1079,6 +1087,7 @@ abstract class AbstractEntity extends \Magento\Framework\Model\Resource\Abstract * @param \Magento\Framework\Object $object * @param string|int $rowId * @return \Zend_Db_Select + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getLoadRowSelect($object, $rowId) { @@ -1224,6 +1233,8 @@ abstract class AbstractEntity extends \Magento\Framework\Model\Resource\Abstract * * @param \Magento\Framework\Object $newObject * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _collectSaveData($newObject) { @@ -1328,6 +1339,7 @@ abstract class AbstractEntity extends \Magento\Framework\Model\Resource\Abstract * @param mixed $v New value of the attribute. Can be used in subclasses. * @param array $origData * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _canUpdateAttribute(AbstractAttribute $attribute, $v, array &$origData) { @@ -1382,6 +1394,8 @@ abstract class AbstractEntity extends \Magento\Framework\Model\Resource\Abstract * * @param array $saveData array('newObject', 'entityRow', 'insert', 'update', 'delete') * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _processSaveData($saveData) { @@ -1491,6 +1505,7 @@ abstract class AbstractEntity extends \Magento\Framework\Model\Resource\Abstract * @param mixed $valueId * @param mixed $value * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _updateAttribute($object, $attribute, $valueId, $value) { @@ -1581,6 +1596,7 @@ abstract class AbstractEntity extends \Magento\Framework\Model\Resource\Abstract * @param string $table * @param array $info * @return \Magento\Framework\Object + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _deleteAttributes($object, $table, $info) { @@ -1609,6 +1625,7 @@ abstract class AbstractEntity extends \Magento\Framework\Model\Resource\Abstract * @param string $attributeCode * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function saveAttribute(\Magento\Framework\Object $object, $attributeCode) { @@ -1665,6 +1682,7 @@ abstract class AbstractEntity extends \Magento\Framework\Model\Resource\Abstract * @param \Magento\Framework\Object|int|string $object * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function delete($object) { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute.php b/app/code/Magento/Eav/Model/Entity/Attribute.php index 7c0e627b566..e9438a6f0ca 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute.php @@ -11,6 +11,7 @@ use Magento\Framework\Api\AttributeDataBuilder; * EAV Entity attribute model * * @method \Magento\Eav\Model\Entity\Attribute setOption($value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Attribute extends \Magento\Eav\Model\Entity\Attribute\AbstractAttribute implements \Magento\Framework\Object\IdentityInterface @@ -79,6 +80,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute\AbstractAttribute im * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -207,6 +209,8 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute\AbstractAttribute im * * @return $this * @throws Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function beforeSave() { @@ -306,6 +310,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute\AbstractAttribute im * * @param string $type frontend_input field value * @return string backend_type field value + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getBackendTypeByInput($type) { @@ -349,6 +354,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute\AbstractAttribute im * * @param string $type frontend_input field name * @return string default_value field value + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getDefaultValueByInput($type) { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php b/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php index 00afe4c579c..d18a6e3ee89 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php @@ -9,6 +9,9 @@ use Magento\Framework\Api\AttributeDataBuilder; /** * Entity/Attribute/Model - attribute abstract + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractAttribute extends \Magento\Framework\Model\AbstractExtensibleModel implements AttributeInterface, @@ -117,6 +120,7 @@ abstract class AbstractAttribute extends \Magento\Framework\Model\AbstractExtens * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -299,6 +303,7 @@ abstract class AbstractAttribute extends \Magento\Framework\Model\AbstractExtens /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsVisibleOnFront() { @@ -656,6 +661,7 @@ abstract class AbstractAttribute extends \Magento\Framework\Model\AbstractExtens * Retrieve flat columns DDL definition * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function _getFlatColumnsDdlDefinition() { @@ -739,6 +745,7 @@ abstract class AbstractAttribute extends \Magento\Framework\Model\AbstractExtens * Used in database compatible mode * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _getFlatColumnsOldDefinition() { @@ -813,6 +820,7 @@ abstract class AbstractAttribute extends \Magento\Framework\Model\AbstractExtens * Retrieve index data for flat table * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getFlatIndexes() { 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 ee0ceebd3f2..d3a56cdde9f 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/AbstractBackend.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/AbstractBackend.php @@ -6,6 +6,7 @@ namespace Magento\Eav\Model\Entity\Attribute\Backend; /** * Entity/Attribute/Model - attribute backend abstract + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractBackend implements \Magento\Eav\Model\Entity\Attribute\Backend\BackendInterface { @@ -211,6 +212,7 @@ abstract class AbstractBackend implements \Magento\Eav\Model\Entity\Attribute\Ba * @param \Magento\Framework\Object $object * @throws \Magento\Eav\Exception * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function validate($object) { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Set.php b/app/code/Magento/Eav/Model/Entity/Attribute/Set.php index 89d1db9f164..eb71650008c 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Set.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Set.php @@ -21,6 +21,9 @@ namespace Magento\Eav\Model\Entity\Attribute; use Magento\Eav\Model\Entity\Type; use Magento\Framework\Api\AttributeDataBuilder; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Set extends \Magento\Framework\Model\AbstractExtensibleModel implements \Magento\Eav\Api\Data\AttributeSetInterface { @@ -69,6 +72,7 @@ class Set extends \Magento\Framework\Model\AbstractExtensibleModel implements * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -155,6 +159,8 @@ class Set extends \Magento\Framework\Model\AbstractExtensibleModel implements * * @param array $data * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function organizeData($data) { @@ -262,6 +268,7 @@ class Set extends \Magento\Framework\Model\AbstractExtensibleModel implements * @param array $attributes * @param int $setId * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function addSetInfo($entityType, array $attributes, $setId = null) { 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 629eabe56de..9bf0583788c 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Source/AbstractSource.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Source/AbstractSource.php @@ -8,6 +8,7 @@ namespace Magento\Eav\Model\Entity\Attribute\Source; * Entity/Attribute/Model - attribute selection source abstract * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractSource implements \Magento\Eav\Model\Entity\Attribute\Source\SourceInterface, @@ -93,6 +94,7 @@ abstract class AbstractSource implements * @param \Magento\Eav\Model\Entity\Collection\AbstractCollection $collection * @param string $dir direction * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function addValueSortToCollection($collection, $dir = \Magento\Framework\Data\Collection::SORT_ORDER_DESC) { @@ -124,6 +126,7 @@ abstract class AbstractSource implements * * @param int $store * @return \Magento\Framework\DB\Select|null + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getFlatUpdateSelect($store) { diff --git a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php index 9c10fc846bc..638a00a42b8 100644 --- a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php +++ b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php @@ -8,6 +8,9 @@ use Magento\Framework\DB\Select; /** * Entity/Attribute/Model - collection abstract + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractCollection extends \Magento\Framework\Data\Collection\Db { @@ -124,6 +127,7 @@ abstract class AbstractCollection extends \Magento\Framework\Data\Collection\Db * @param \Magento\Eav\Model\Resource\Helper $resourceHelper * @param \Magento\Framework\Validator\UniversalFactory $universalFactory * @param mixed $connection + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Core\Model\EntityFactory $entityFactory, @@ -619,6 +623,8 @@ abstract class AbstractCollection extends \Magento\Framework\Data\Collection\Db * @param null $storeId * @return $this * @throws \Magento\Eav\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function joinAttribute($alias, $attribute, $bind, $filter = null, $joinType = 'inner', $storeId = null) { @@ -769,6 +775,7 @@ abstract class AbstractCollection extends \Magento\Framework\Data\Collection\Db * @param string $joinType * @return $this * @throws \Magento\Eav\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function joinTable($table, $bind, $fields = null, $cond = null, $joinType = 'inner') { @@ -1096,6 +1103,9 @@ abstract class AbstractCollection extends \Magento\Framework\Data\Collection\Db * @param bool $logQuery * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function _loadAttributes($printQuery = false, $logQuery = false) { @@ -1185,6 +1195,7 @@ abstract class AbstractCollection extends \Magento\Framework\Data\Collection\Db * @param string $table * @param string $type * @return Select + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _addLoadAttributesSelectValues($select, $table, $type) { @@ -1281,6 +1292,7 @@ abstract class AbstractCollection extends \Magento\Framework\Data\Collection\Db * @param string $joinType inner|left * @return $this * @throws \Magento\Eav\Exception + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _addAttributeJoin($attributeCode, $joinType = 'inner') { diff --git a/app/code/Magento/Eav/Model/Entity/Setup.php b/app/code/Magento/Eav/Model/Entity/Setup.php index 3508beb572f..7139001f1fb 100644 --- a/app/code/Magento/Eav/Model/Entity/Setup.php +++ b/app/code/Magento/Eav/Model/Entity/Setup.php @@ -6,6 +6,9 @@ */ namespace Magento\Eav\Model\Entity; +/** + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + */ class Setup extends \Magento\Framework\Module\DataSetup { /** @@ -767,6 +770,7 @@ class Setup extends \Magento\Framework\Module\DataSetup * @param array $option * @return void * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function addAttributeOption($option) { @@ -1216,6 +1220,8 @@ class Setup extends \Magento\Framework\Module\DataSetup * * @param array $entities * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function installEntities($entities = null) { diff --git a/app/code/Magento/Eav/Model/Entity/Setup/Context.php b/app/code/Magento/Eav/Model/Entity/Setup/Context.php index b08b99d84ab..d56ba528295 100644 --- a/app/code/Magento/Eav/Model/Entity/Setup/Context.php +++ b/app/code/Magento/Eav/Model/Entity/Setup/Context.php @@ -24,6 +24,7 @@ class Context extends \Magento\Framework\Module\Setup\Context * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor * @param \Magento\Framework\Filesystem $filesystem * @param PropertyMapperInterface $attributeMapper + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Psr\Log\LoggerInterface $logger, diff --git a/app/code/Magento/Eav/Model/Form.php b/app/code/Magento/Eav/Model/Form.php index ba2384d612e..eb872ed481d 100644 --- a/app/code/Magento/Eav/Model/Form.php +++ b/app/code/Magento/Eav/Model/Form.php @@ -10,6 +10,8 @@ use Magento\Framework\App\RequestInterface; * EAV Entity Form Model * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class Form { @@ -576,6 +578,7 @@ abstract class Form * Return is AJAX Request * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsAjaxRequest() { diff --git a/app/code/Magento/Eav/Model/Resource/Attribute.php b/app/code/Magento/Eav/Model/Resource/Attribute.php index 97c9ce0d223..6fff6258ef5 100644 --- a/app/code/Magento/Eav/Model/Resource/Attribute.php +++ b/app/code/Magento/Eav/Model/Resource/Attribute.php @@ -85,6 +85,7 @@ abstract class Attribute extends \Magento\Eav\Model\Resource\Entity\Attribute * * @param \Magento\Framework\Model\AbstractModel $object * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _afterSave(AbstractModel $object) { diff --git a/app/code/Magento/Eav/Model/Resource/Entity/Attribute.php b/app/code/Magento/Eav/Model/Resource/Entity/Attribute.php index 3f2130ec932..bf5ce786c43 100644 --- a/app/code/Magento/Eav/Model/Resource/Entity/Attribute.php +++ b/app/code/Magento/Eav/Model/Resource/Entity/Attribute.php @@ -260,6 +260,7 @@ class Attribute extends \Magento\Framework\Model\Resource\Db\AbstractDb * @param null $attributeGroupId * @param null $attributeSortOrder * @return $this + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function saveInSetIncluding( AbstractModel $object, diff --git a/app/code/Magento/Eav/Model/Resource/Form/Fieldset.php b/app/code/Magento/Eav/Model/Resource/Form/Fieldset.php index c56d8edbff2..ed974e100ab 100644 --- a/app/code/Magento/Eav/Model/Resource/Form/Fieldset.php +++ b/app/code/Magento/Eav/Model/Resource/Form/Fieldset.php @@ -33,6 +33,8 @@ class Fieldset extends \Magento\Framework\Model\Resource\Db\AbstractDb * * @param FormFieldset|AbstractModel $object * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _afterSave(AbstractModel $object) { diff --git a/app/code/Magento/Fedex/Model/Carrier.php b/app/code/Magento/Fedex/Model/Carrier.php index 7f5c390ed91..42e80b5d504 100644 --- a/app/code/Magento/Fedex/Model/Carrier.php +++ b/app/code/Magento/Fedex/Model/Carrier.php @@ -12,6 +12,8 @@ use Magento\Shipping\Model\Rate\Result; * Fedex shipping implementation * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\Carrier\CarrierInterface { @@ -252,6 +254,8 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * * @param RateRequest $request * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function setRequest(RateRequest $request) { @@ -492,6 +496,7 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * * @param mixed $response * @return Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareRateResponse($response) { @@ -689,6 +694,7 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * * @param mixed $response * @return Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _parseXmlResponse($response) { @@ -777,6 +783,7 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * @param string $type * @param string $code * @return array|false + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getCode($type, $code = '') { @@ -1047,6 +1054,9 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * @param string[] $trackingValue * @param \stdClass $response * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _parseTrackingResponse($trackingValue, $response) { @@ -1222,6 +1232,9 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * * @param \Magento\Framework\Object $request * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _formShipmentRequest(\Magento\Framework\Object $request) { @@ -1451,6 +1464,7 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * * @param \Magento\Framework\Object|null $params * @return array|bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getContainerTypes(\Magento\Framework\Object $params = null) { diff --git a/app/code/Magento/GiftMessage/Block/Message/Inline.php b/app/code/Magento/GiftMessage/Block/Message/Inline.php index c6ef06601da..5fe409ac127 100644 --- a/app/code/Magento/GiftMessage/Block/Message/Inline.php +++ b/app/code/Magento/GiftMessage/Block/Message/Inline.php @@ -274,6 +274,7 @@ class Inline extends \Magento\Framework\View\Element\Template * Check if items has messages * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getItemsHasMesssages() { @@ -289,6 +290,7 @@ class Inline extends \Magento\Framework\View\Element\Template * Check if entity has message * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getEntityHasMessage() { diff --git a/app/code/Magento/GiftMessage/Helper/Message.php b/app/code/Magento/GiftMessage/Helper/Message.php index b8cc61374ba..31045f4063e 100644 --- a/app/code/Magento/GiftMessage/Helper/Message.php +++ b/app/code/Magento/GiftMessage/Helper/Message.php @@ -6,6 +6,7 @@ namespace Magento\GiftMessage\Helper; /** * Gift Message helper + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Message extends \Magento\Core\Helper\Data { @@ -70,6 +71,7 @@ class Message extends \Magento\Core\Helper\Data * @param \Magento\Framework\Escaper $escaper * @param array $skipMessageCheck * @param bool $dbCompatibleMode + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Helper\Context $context, @@ -135,6 +137,7 @@ class Message extends \Magento\Core\Helper\Data * @param \Magento\Framework\Object $entity * @param \Magento\Store\Model\Store|int|null $store * @return bool|string|null + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isMessagesAvailable($type, \Magento\Framework\Object $entity, $store = null) { @@ -287,6 +290,7 @@ class Message extends \Magento\Core\Helper\Data * @param array $quote * @param \Magento\Store\Model\Store|int|null $store * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getAvailableForQuoteItems($quote, $store = null) { @@ -304,6 +308,7 @@ class Message extends \Magento\Core\Helper\Data * @param array $items * @param \Magento\Store\Model\Store|int|null $store * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getAvailableForAddressItems($items, $store = null) { diff --git a/app/code/Magento/GiftMessage/Model/GiftMessageManager.php b/app/code/Magento/GiftMessage/Model/GiftMessageManager.php index 7eb71725830..6e48caa5424 100644 --- a/app/code/Magento/GiftMessage/Model/GiftMessageManager.php +++ b/app/code/Magento/GiftMessage/Model/GiftMessageManager.php @@ -24,6 +24,7 @@ class GiftMessageManager * @param array $giftMessages * @param \Magento\Sales\Model\Quote $quote * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function add($giftMessages, $quote) { diff --git a/app/code/Magento/GiftMessage/Model/Save.php b/app/code/Magento/GiftMessage/Model/Save.php index 4ede29a1aaf..22a04f2aa32 100644 --- a/app/code/Magento/GiftMessage/Model/Save.php +++ b/app/code/Magento/GiftMessage/Model/Save.php @@ -79,6 +79,7 @@ class Save extends \Magento\Framework\Object /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getSaved() { @@ -242,6 +243,7 @@ class Save extends \Magento\Framework\Object * * @param \Magento\Framework\Object $item * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsAllowedQuoteItem($item) { diff --git a/app/code/Magento/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php b/app/code/Magento/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php index a99f6afb3c6..b9cb7c6a684 100644 --- a/app/code/Magento/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php +++ b/app/code/Magento/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php @@ -6,6 +6,9 @@ */ namespace Magento\GoogleOptimizer\Block\Adminhtml\Catalog\Category\Edit\Tab; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Googleoptimizer extends \Magento\Catalog\Block\Adminhtml\Form { /** diff --git a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Form.php b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Form.php index f374451ed0a..21be4393ceb 100644 --- a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Form.php +++ b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Form.php @@ -70,6 +70,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * @param \Magento\Framework\Data\Form\Element\Factory $elementFactory * @param \Magento\GoogleShopping\Helper\Category $googleShoppingCategory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Backend\Block\Template\Context $context, diff --git a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types/Save.php b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types/Save.php index f2ee9b58d4b..c207fc6b0e2 100644 --- a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types/Save.php +++ b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types/Save.php @@ -11,6 +11,7 @@ class Save extends \Magento\GoogleShopping\Controller\Adminhtml\Googleshopping\T * Save attribute set mapping * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/GoogleShopping/Helper/Data.php b/app/code/Magento/GoogleShopping/Helper/Data.php index e2fd1a3ccf1..4a80b78c595 100644 --- a/app/code/Magento/GoogleShopping/Helper/Data.php +++ b/app/code/Magento/GoogleShopping/Helper/Data.php @@ -85,6 +85,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * @param string $message \Exception message to parse * @param null|\Magento\Catalog\Model\Product $product * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function parseGdataExceptionMessage($message, $product = null) { diff --git a/app/code/Magento/GoogleShopping/Model/Attribute.php b/app/code/Magento/GoogleShopping/Model/Attribute.php index 9778f83d3a8..d6be813d765 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute.php @@ -108,6 +108,7 @@ class Attribute extends \Magento\Framework\Model\AbstractModel * * @param int $setId attribute set id * @return array + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getAllowedAttributes($setId) { diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/ContentLanguage.php b/app/code/Magento/GoogleShopping/Model/Attribute/ContentLanguage.php index b897703bf7f..ab3c3937f2a 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/ContentLanguage.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/ContentLanguage.php @@ -29,6 +29,7 @@ class ContentLanguage extends \Magento\GoogleShopping\Model\Attribute\DefaultAtt * @param \Magento\GoogleShopping\Model\Config $config * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/DefaultAttribute.php b/app/code/Magento/GoogleShopping/Model/Attribute/DefaultAttribute.php index 66c3a063e55..c0ed3c62b4d 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/DefaultAttribute.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/DefaultAttribute.php @@ -10,6 +10,9 @@ */ namespace Magento\GoogleShopping\Model\Attribute; +/** + * @SuppressWarnings(PHPMD.NumberOfChildren) + */ class DefaultAttribute extends \Magento\GoogleShopping\Model\Attribute { /** diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/Destinations.php b/app/code/Magento/GoogleShopping/Model/Attribute/Destinations.php index 697b4e91e39..168bba47892 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/Destinations.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/Destinations.php @@ -29,6 +29,7 @@ class Destinations extends \Magento\GoogleShopping\Model\Attribute\DefaultAttrib * @param \Magento\GoogleShopping\Model\Config $config * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/GoogleProductCategory.php b/app/code/Magento/GoogleShopping/Model/Attribute/GoogleProductCategory.php index 77ff5bcee7b..44afff6961c 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/GoogleProductCategory.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/GoogleProductCategory.php @@ -37,6 +37,7 @@ class GoogleProductCategory extends \Magento\GoogleShopping\Model\Attribute\Defa * @param \Magento\GoogleShopping\Model\Config $config * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/ImageLink.php b/app/code/Magento/GoogleShopping/Model/Attribute/ImageLink.php index 0fb5cbf6b13..ea1fc39e98a 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/ImageLink.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/ImageLink.php @@ -27,6 +27,7 @@ class ImageLink extends \Magento\GoogleShopping\Model\Attribute\DefaultAttribute * @param \Magento\Catalog\Helper\Product $catalogProduct * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/Link.php b/app/code/Magento/GoogleShopping/Model/Attribute/Link.php index b8aabde6928..2676b9ca32f 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/Link.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/Link.php @@ -27,6 +27,7 @@ class Link extends \Magento\GoogleShopping\Model\Attribute\DefaultAttribute * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/ProductType.php b/app/code/Magento/GoogleShopping/Model/Attribute/ProductType.php index 44a6ddd9f46..8f7efe7ad83 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/ProductType.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/ProductType.php @@ -29,6 +29,7 @@ class ProductType extends \Magento\GoogleShopping\Model\Attribute\DefaultAttribu * @param \Magento\Catalog\Api\CategoryRepositoryInterface $categoryRepository * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/SalePriceEffectiveDate.php b/app/code/Magento/GoogleShopping/Model/Attribute/SalePriceEffectiveDate.php index bd443169180..2a1af27f176 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/SalePriceEffectiveDate.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/SalePriceEffectiveDate.php @@ -18,6 +18,8 @@ class SalePriceEffectiveDate extends \Magento\GoogleShopping\Model\Attribute\Def * @param \Magento\Catalog\Model\Product $product * @param \Magento\Framework\Gdata\Gshopping\Entry $entry * @return \Magento\Framework\Gdata\Gshopping\Entry + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function convertAttribute($product, $entry) { diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/TargetCountry.php b/app/code/Magento/GoogleShopping/Model/Attribute/TargetCountry.php index 4d5672ca111..09dcc471863 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/TargetCountry.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/TargetCountry.php @@ -29,6 +29,7 @@ class TargetCountry extends \Magento\GoogleShopping\Model\Attribute\DefaultAttri * @param \Magento\GoogleShopping\Model\Config $config * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/Tax.php b/app/code/Magento/GoogleShopping/Model/Attribute/Tax.php index af7acb94ddc..9f683c69bc2 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/Tax.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/Tax.php @@ -12,6 +12,7 @@ use Magento\Tax\Api\Data\TaxClassKeyInterface; * Tax attribute model * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Tax extends \Magento\GoogleShopping\Model\Attribute\DefaultAttribute { @@ -92,6 +93,7 @@ class Tax extends \Magento\GoogleShopping\Model\Attribute\DefaultAttribute * @param \Magento\Customer\Api\GroupManagementInterface $groupManagement * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/GoogleShopping/Model/Config.php b/app/code/Magento/GoogleShopping/Model/Config.php index 3840d0d4794..41be2b38879 100644 --- a/app/code/Magento/GoogleShopping/Model/Config.php +++ b/app/code/Magento/GoogleShopping/Model/Config.php @@ -243,6 +243,7 @@ class Config extends \Magento\Framework\Object * where: key - attribute name, value - group name * * @return array + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getAttributeGroupsFlat() { @@ -271,6 +272,7 @@ class Config extends \Magento\Framework\Object * * @param int $storeId * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsDebug($storeId) { @@ -281,6 +283,7 @@ class Config extends \Magento\Framework\Object * Returns all required attributes * * @return array + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getRequiredAttributes() { diff --git a/app/code/Magento/GoogleShopping/Model/MassOperations.php b/app/code/Magento/GoogleShopping/Model/MassOperations.php index 52c6f69d1e9..62cf5d985e4 100644 --- a/app/code/Magento/GoogleShopping/Model/MassOperations.php +++ b/app/code/Magento/GoogleShopping/Model/MassOperations.php @@ -11,6 +11,7 @@ use Magento\GoogleShopping\Model\Resource\Item\Collection as ItemCollection; * Controller for mass opertions with items * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class MassOperations { @@ -73,6 +74,7 @@ class MassOperations * @param \Magento\GoogleShopping\Helper\Data $gleShoppingData * @param \Magento\GoogleShopping\Helper\Category $gleShoppingCategory * @param array $data + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct( \Magento\GoogleShopping\Model\Resource\Item\CollectionFactory $collectionFactory, @@ -142,6 +144,8 @@ class MassOperations * @param int $storeId * @return $this * @throws \Exception|\Zend_Gdata_App_CaptchaRequiredException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function addProducts($productIds, $storeId) { @@ -216,6 +220,7 @@ class MassOperations * @param int[]|ItemCollection $items * @return $this * @throws \Exception|\Zend_Gdata_App_CaptchaRequiredException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function synchronizeItems($items) { @@ -302,6 +307,7 @@ class MassOperations * @param int[]|ItemCollection $items * @return $this * @throws \Exception|\Zend_Gdata_App_CaptchaRequiredException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function deleteItems($items) { diff --git a/app/code/Magento/GoogleShopping/Model/Observer.php b/app/code/Magento/GoogleShopping/Model/Observer.php index dd411a80fde..66f98825561 100644 --- a/app/code/Magento/GoogleShopping/Model/Observer.php +++ b/app/code/Magento/GoogleShopping/Model/Observer.php @@ -145,6 +145,7 @@ class Observer * * @param \Magento\Framework\Event\Observer $observer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function checkSynchronizationOperations(\Magento\Framework\Event\Observer $observer) { diff --git a/app/code/Magento/GoogleShopping/Model/Resource/Attribute/Collection.php b/app/code/Magento/GoogleShopping/Model/Resource/Attribute/Collection.php index 99148fa0d91..e2eb66de035 100644 --- a/app/code/Magento/GoogleShopping/Model/Resource/Attribute/Collection.php +++ b/app/code/Magento/GoogleShopping/Model/Resource/Attribute/Collection.php @@ -93,6 +93,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * Get flag - whether to join attribute_set_id to attributes or not * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getJoinAttributeSetFlag() { diff --git a/app/code/Magento/GoogleShopping/Model/Type.php b/app/code/Magento/GoogleShopping/Model/Type.php index 6847685945e..cabda5ee7ec 100644 --- a/app/code/Magento/GoogleShopping/Model/Type.php +++ b/app/code/Magento/GoogleShopping/Model/Type.php @@ -63,6 +63,7 @@ class Type extends \Magento\Framework\Model\AbstractModel * @param \Magento\GoogleShopping\Model\Resource\Type $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -110,6 +111,7 @@ class Type extends \Magento\Framework\Model\AbstractModel * @param CatalogModelProduct $product * @param Entry $entry * @return Entry + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function convertProductToEntry($product, $entry) { diff --git a/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php b/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php index a168d8d6fb4..5b0df239bac 100644 --- a/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php +++ b/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php @@ -209,6 +209,7 @@ class Filter extends \Magento\Backend\Block\Widget\Grid\Extended * @param Attribute $attribute * @param mixed $value * @return string + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _getSelectHtmlWithValue(Attribute $attribute, $value) { @@ -322,6 +323,7 @@ class Filter extends \Magento\Backend\Block\Widget\Grid\Extended * @param \Magento\Framework\Object $column * @param boolean $isExport * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function decorateFilter($value, Attribute $row, \Magento\Framework\Object $column, $isExport) { diff --git a/app/code/Magento/ImportExport/Model/Export/AbstractEntity.php b/app/code/Magento/ImportExport/Model/Export/AbstractEntity.php index fe1e1e4a60e..413e85568c8 100644 --- a/app/code/Magento/ImportExport/Model/Export/AbstractEntity.php +++ b/app/code/Magento/ImportExport/Model/Export/AbstractEntity.php @@ -10,6 +10,7 @@ use Magento\ImportExport\Model\Export\Adapter\AbstractAdapter; * Export entity abstract model * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.TooManyFields) */ abstract class AbstractEntity { @@ -159,6 +160,7 @@ abstract class AbstractEntity * @param \Magento\ImportExport\Model\Export\Factory $collectionFactory * @param \Magento\ImportExport\Model\Resource\CollectionByPagesIteratorFactory $resourceColFactory * @param array $data + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, diff --git a/app/code/Magento/ImportExport/Model/Export/Adapter/AbstractAdapter.php b/app/code/Magento/ImportExport/Model/Export/Adapter/AbstractAdapter.php index 053bf2e396e..74d161bcfea 100644 --- a/app/code/Magento/ImportExport/Model/Export/Adapter/AbstractAdapter.php +++ b/app/code/Magento/ImportExport/Model/Export/Adapter/AbstractAdapter.php @@ -108,6 +108,7 @@ abstract class AbstractAdapter * * @param array $headerColumns * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setHeaderCols(array $headerColumns) { diff --git a/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEav.php b/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEav.php index 1773db16576..3feec0b42d5 100644 --- a/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEav.php +++ b/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEav.php @@ -13,6 +13,7 @@ use Magento\Store\Model\Store; * Export EAV entity abstract model * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractEav extends \Magento\ImportExport\Model\Export\AbstractEntity { @@ -153,6 +154,7 @@ abstract class AbstractEav extends \Magento\ImportExport\Model\Export\AbstractEn * * @param AbstractCollection $collection * @return AbstractCollection + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function filterEntityCollection(AbstractCollection $collection) { diff --git a/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEntity.php b/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEntity.php index 837b5d2a405..349e14d81d7 100644 --- a/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEntity.php +++ b/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEntity.php @@ -10,6 +10,8 @@ use Magento\ImportExport\Model\Export\Adapter\AbstractAdapter; * Export entity abstract model * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractEntity { @@ -243,6 +245,7 @@ abstract class AbstractEntity * * @param \Magento\Eav\Model\Entity\Collection\AbstractCollection $collection * @return \Magento\Eav\Model\Entity\Collection\AbstractCollection + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareEntityCollection(\Magento\Eav\Model\Entity\Collection\AbstractCollection $collection) { diff --git a/app/code/Magento/ImportExport/Model/Import.php b/app/code/Magento/ImportExport/Model/Import.php index 37f63e1ce29..00d0d4e6710 100644 --- a/app/code/Magento/ImportExport/Model/Import.php +++ b/app/code/Magento/ImportExport/Model/Import.php @@ -14,6 +14,7 @@ use Magento\Framework\HTTP\Adapter\FileTransferFactory; * * @method string getBehavior() getBehavior() * @method \Magento\ImportExport\Model\Import setEntity() setEntity(string $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Import extends \Magento\ImportExport\Model\AbstractModel { @@ -123,6 +124,7 @@ class Import extends \Magento\ImportExport\Model\AbstractModel * @param Source\Import\Behavior\Factory $behaviorFactory * @param \Magento\Indexer\Model\IndexerRegistry $indexerRegistry * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Psr\Log\LoggerInterface $logger, diff --git a/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php b/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php index c7774999109..9963b129b1c 100644 --- a/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php +++ b/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php @@ -7,6 +7,8 @@ namespace Magento\ImportExport\Model\Import; /** * Import entity abstract model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractEntity { @@ -243,6 +245,7 @@ abstract class AbstractEntity * @param \Magento\ImportExport\Model\Resource\Helper $resourceHelper * @param \Magento\Framework\App\Resource $resource * @param array $data + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function __construct( \Magento\Core\Helper\Data $coreData, @@ -318,6 +321,8 @@ abstract class AbstractEntity * Validate data rows and save bunches to DB * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _saveValidatedBunches() { @@ -595,6 +600,7 @@ abstract class AbstractEntity * @param array $rowData Row data * @param int $rowNumber * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isAttributeValid($attributeCode, array $attributeParams, array $rowData, $rowNumber) { diff --git a/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEav.php b/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEav.php index 7593e4170c3..461435dc8c0 100644 --- a/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEav.php +++ b/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEav.php @@ -6,6 +6,7 @@ namespace Magento\ImportExport\Model\Import\Entity; /** * Import EAV entity abstract model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractEav extends \Magento\ImportExport\Model\Import\AbstractEntity { @@ -81,6 +82,7 @@ abstract class AbstractEav extends \Magento\ImportExport\Model\Import\AbstractEn * @param \Magento\ImportExport\Model\Export\Factory $collectionFactory * @param \Magento\Eav\Model\Config $eavConfig * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Core\Helper\Data $coreData, diff --git a/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEntity.php b/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEntity.php index 44b33d95dfd..f169d27c785 100644 --- a/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEntity.php +++ b/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEntity.php @@ -8,6 +8,8 @@ use Magento\ImportExport\Model\Import\AbstractSource; /** * Import entity abstract model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractEntity { @@ -256,6 +258,7 @@ abstract class AbstractEntity * * @param array $rowData * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _isRowScopeDefault(array $rowData) { @@ -287,6 +290,7 @@ abstract class AbstractEntity * Validate data rows and save bunches to DB. * * @return $this|void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _saveValidatedBunches() { @@ -573,6 +577,7 @@ abstract class AbstractEntity * @param array $rowData Row data * @param int $rowNum * @return boolean + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isAttributeValid($attrCode, array $attrParams, array $rowData, $rowNum) { diff --git a/app/code/Magento/Indexer/Model/Processor/InvalidateCache.php b/app/code/Magento/Indexer/Model/Processor/InvalidateCache.php index 2332ef4f494..8fdbc4e5f93 100644 --- a/app/code/Magento/Indexer/Model/Processor/InvalidateCache.php +++ b/app/code/Magento/Indexer/Model/Processor/InvalidateCache.php @@ -45,6 +45,7 @@ class InvalidateCache * * @param \Magento\Indexer\Model\Processor $subject * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterUpdateMview(\Magento\Indexer\Model\Processor $subject) { diff --git a/app/code/Magento/Log/Model/Aggregation.php b/app/code/Magento/Log/Model/Aggregation.php index 8e442004aad..eda1d103385 100644 --- a/app/code/Magento/Log/Model/Aggregation.php +++ b/app/code/Magento/Log/Model/Aggregation.php @@ -74,6 +74,7 @@ class Aggregation extends \Magento\Framework\Model\AbstractModel * * @param string $lastDate * @return null|void + * @SuppressWarnings(PHPMD.UnusedPrivateMethod) */ private function _removeEmpty($lastDate) { @@ -185,6 +186,7 @@ class Aggregation extends \Magento\Framework\Model\AbstractModel * @param int|string $in * @param null $offset * @return bool|string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ private function _date($in, $offset = null) { @@ -201,6 +203,7 @@ class Aggregation extends \Magento\Framework\Model\AbstractModel * @param int|string $in * @param null $offset * @return int + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ private function _timestamp($in, $offset = null) { diff --git a/app/code/Magento/Log/Model/Cron.php b/app/code/Magento/Log/Model/Cron.php index bce6876887a..7b68c92d951 100644 --- a/app/code/Magento/Log/Model/Cron.php +++ b/app/code/Magento/Log/Model/Cron.php @@ -65,6 +65,7 @@ class Cron extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Log/Model/Resource/Log.php b/app/code/Magento/Log/Model/Resource/Log.php index 66a49e747df..c93d8f2061f 100644 --- a/app/code/Magento/Log/Model/Resource/Log.php +++ b/app/code/Magento/Log/Model/Resource/Log.php @@ -130,6 +130,7 @@ class Log extends \Magento\Framework\Model\Resource\Db\AbstractDb * * @param int $time * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _cleanCustomers($time) { diff --git a/app/code/Magento/Log/Model/Resource/Visitor/Collection.php b/app/code/Magento/Log/Model/Resource/Visitor/Collection.php index f598505ded5..210351bc982 100644 --- a/app/code/Magento/Log/Model/Resource/Visitor/Collection.php +++ b/app/code/Magento/Log/Model/Resource/Visitor/Collection.php @@ -172,6 +172,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * Return true if online filter used * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsOnlineFilterUsed() { diff --git a/app/code/Magento/Log/Model/Resource/Visitor/Online.php b/app/code/Magento/Log/Model/Resource/Visitor/Online.php index cbff21f7575..be4001bac13 100644 --- a/app/code/Magento/Log/Model/Resource/Visitor/Online.php +++ b/app/code/Magento/Log/Model/Resource/Visitor/Online.php @@ -42,6 +42,7 @@ class Online extends \Magento\Framework\Model\Resource\Db\AbstractDb * @param \Magento\Log\Model\Visitor\Online $object * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function prepare(\Magento\Log\Model\Visitor\Online $object) { diff --git a/app/code/Magento/Log/Model/Visitor.php b/app/code/Magento/Log/Model/Visitor.php index ea33af37a29..ff5db6d935e 100644 --- a/app/code/Magento/Log/Model/Visitor.php +++ b/app/code/Magento/Log/Model/Visitor.php @@ -62,6 +62,7 @@ class Visitor extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Multishipping/Block/Checkout/Overview.php b/app/code/Magento/Multishipping/Block/Checkout/Overview.php index 7c8a80de9d6..58df0b6f29b 100644 --- a/app/code/Magento/Multishipping/Block/Checkout/Overview.php +++ b/app/code/Magento/Multishipping/Block/Checkout/Overview.php @@ -132,6 +132,7 @@ class Overview extends \Magento\Sales\Block\Items\AbstractItems /** * @param Address $address * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getShippingAddressRate($address) { diff --git a/app/code/Magento/Multishipping/Controller/Checkout.php b/app/code/Magento/Multishipping/Controller/Checkout.php index 5bfb025ff08..9b7e1115314 100644 --- a/app/code/Magento/Multishipping/Controller/Checkout.php +++ b/app/code/Magento/Multishipping/Controller/Checkout.php @@ -10,6 +10,7 @@ use Magento\Framework\App\RequestInterface; /** * Multishipping checkout controller + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Checkout extends \Magento\Checkout\Controller\Action implements \Magento\Checkout\Controller\Express\RedirectLoginInterface @@ -76,6 +77,8 @@ class Checkout extends \Magento\Checkout\Controller\Action implements * * @param RequestInterface $request * @return \Magento\Framework\App\ResponseInterface + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function dispatch(RequestInterface $request) { diff --git a/app/code/Magento/Multishipping/Controller/Checkout/OverviewPost.php b/app/code/Magento/Multishipping/Controller/Checkout/OverviewPost.php index 22b3cad9e9a..e37aa9e5d40 100644 --- a/app/code/Magento/Multishipping/Controller/Checkout/OverviewPost.php +++ b/app/code/Magento/Multishipping/Controller/Checkout/OverviewPost.php @@ -42,6 +42,7 @@ class OverviewPost extends \Magento\Multishipping\Controller\Checkout * Overview action * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php index 7a514c4e030..f8366b4b746 100644 --- a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php +++ b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php @@ -10,6 +10,9 @@ use Magento\Sales\Model\Order\Email\Sender\OrderSender; /** * Multishipping checkout model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Multishipping extends \Magento\Framework\Object { @@ -130,6 +133,7 @@ class Multishipping extends \Magento\Framework\Object * @param \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder, * @param \Magento\Framework\Api\FilterBuilder $filterBuilder, * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Checkout\Model\Session $checkoutSession, @@ -177,6 +181,7 @@ class Multishipping extends \Magento\Framework\Object * Split virtual/not virtual items between default billing/shipping addresses * * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _init() { @@ -336,6 +341,8 @@ class Multishipping extends \Magento\Framework\Object * @param array $info * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function setShippingItemsInformation($info) { @@ -419,6 +426,8 @@ class Multishipping extends \Magento\Framework\Object * @param int $quoteItemId * @param array $data array('qty'=>$qty, 'address'=>$customerAddressId) * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _addShippingItem($quoteItemId, $data) { diff --git a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping/State.php b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping/State.php index 620deff6270..b22970e595d 100644 --- a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping/State.php +++ b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping/State.php @@ -143,6 +143,7 @@ class State extends \Magento\Framework\Object * * @param string $step * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCompleteStep($step) { diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php b/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php index 753ce3d1f00..bbc94dc134a 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php @@ -39,6 +39,7 @@ class Problem extends \Magento\Backend\Block\Template /** * @return void + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _construct() { @@ -100,6 +101,7 @@ class Problem extends \Magento\Backend\Block\Template * Return true if the size is greater than 0 * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getShowButtons() { diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php index 92fe714575f..59ec0aa1ef8 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php @@ -217,6 +217,7 @@ class Edit extends \Magento\Backend\Block\Template * Getter for availability preview mode * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsPreview() { @@ -240,6 +241,7 @@ class Edit extends \Magento\Backend\Block\Template * Getter for id of current store (the only one in single-store mode and current in multi-stores mode) * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ protected function getStoreId() { @@ -250,6 +252,7 @@ class Edit extends \Magento\Backend\Block\Template * Getter for check is this newsletter the plain text. * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsTextType() { @@ -260,6 +263,7 @@ class Edit extends \Magento\Backend\Block\Template * Getter for availability resume action * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCanResume() { @@ -270,6 +274,7 @@ class Edit extends \Magento\Backend\Block\Template * Getter for header text * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getHeaderText() { diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php index e59d635501c..511c0b44b4a 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php @@ -56,6 +56,9 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * or from newsletter queue grid by edit option. * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview/Form.php b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview/Form.php index 7f85c71a35b..6b9dba21f50 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview/Form.php @@ -16,6 +16,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * Preparing from for revision page * * @return \Magento\Backend\Block\Widget\Form + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _prepareForm() { diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php index 51c3517b4a5..8f7674d8a1b 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php @@ -55,6 +55,7 @@ class Edit extends \Magento\Backend\Block\Widget * Preparing block layout * * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareLayout() { @@ -170,6 +171,7 @@ class Edit extends \Magento\Backend\Block\Widget * Return edit flag for block * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getEditMode() { @@ -277,6 +279,7 @@ class Edit extends \Magento\Backend\Block\Widget * Getter for id of current store (the only one in single-store mode and current in multi-stores mode) * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ protected function getStoreId() { diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit/Form.php b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit/Form.php index 7c197160903..58aed9ac957 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit/Form.php @@ -49,6 +49,8 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * Prepare form before rendering HTML * * @return $this + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview/Form.php b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview/Form.php index ae0d58e28e6..4d07ad1741a 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview/Form.php @@ -16,6 +16,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * Preparing from for revision page * * @return \Magento\Backend\Block\Widget\Form + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _prepareForm() { diff --git a/app/code/Magento/Newsletter/Controller/Adminhtml/Queue/Save.php b/app/code/Magento/Newsletter/Controller/Adminhtml/Queue/Save.php index 5d6a8d807ba..f6dc01385e4 100644 --- a/app/code/Magento/Newsletter/Controller/Adminhtml/Queue/Save.php +++ b/app/code/Magento/Newsletter/Controller/Adminhtml/Queue/Save.php @@ -12,6 +12,7 @@ class Save extends \Magento\Newsletter\Controller\Adminhtml\Queue * * @throws \Magento\Framework\Model\Exception * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Newsletter/Model/Queue.php b/app/code/Magento/Newsletter/Model/Queue.php index 2da2209ba0f..611bab0c558 100644 --- a/app/code/Magento/Newsletter/Model/Queue.php +++ b/app/code/Magento/Newsletter/Model/Queue.php @@ -30,6 +30,7 @@ namespace Magento\Newsletter\Model; * @method string getQueueFinishAt() * @method \Magento\Newsletter\Model\Queue setQueueFinishAt(string $value) * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Queue extends \Magento\Email\Model\AbstractTemplate { @@ -123,6 +124,7 @@ class Queue extends \Magento\Email\Model\AbstractTemplate * @param \Magento\Newsletter\Model\Resource\Subscriber\CollectionFactory $subscriberCollectionFactory * @param \Magento\Newsletter\Model\Queue\TransportBuilder $transportBuilder * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -195,6 +197,7 @@ class Queue extends \Magento\Email\Model\AbstractTemplate * * @param int $count * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function sendPerSubscriber($count = 20) { @@ -319,6 +322,7 @@ class Queue extends \Magento\Email\Model\AbstractTemplate * Getter for save stores flag. * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getSaveStoresFlag() { diff --git a/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php index 1da9cb8fd70..ce9c6991f38 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php +++ b/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php @@ -263,6 +263,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * Get queue joined flag * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getQueueJoinedFlag() { diff --git a/app/code/Magento/Newsletter/Model/Subscriber.php b/app/code/Magento/Newsletter/Model/Subscriber.php index 1a29809a337..26015e724c7 100644 --- a/app/code/Magento/Newsletter/Model/Subscriber.php +++ b/app/code/Magento/Newsletter/Model/Subscriber.php @@ -135,6 +135,7 @@ class Subscriber extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Newsletter/Model/Template.php b/app/code/Magento/Newsletter/Model/Template.php index 739269724ee..69dae3c3333 100644 --- a/app/code/Magento/Newsletter/Model/Template.php +++ b/app/code/Magento/Newsletter/Model/Template.php @@ -31,6 +31,7 @@ namespace Magento\Newsletter\Model; * @method \Magento\Newsletter\Model\Template setModifiedAt(string $value) * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Template extends \Magento\Email\Model\AbstractTemplate { @@ -100,6 +101,7 @@ class Template extends \Magento\Email\Model\AbstractTemplate * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory * @param \Magento\Framework\Filter\FilterManager $filterManager * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -216,6 +218,7 @@ class Template extends \Magento\Email\Model\AbstractTemplate * Check Template Text Preprocessed * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getTemplateTextPreprocessed() { diff --git a/app/code/Magento/OfflineShipping/Model/Carrier/Flatrate.php b/app/code/Magento/OfflineShipping/Model/Carrier/Flatrate.php index 559102029f3..0ba82082ea8 100644 --- a/app/code/Magento/OfflineShipping/Model/Carrier/Flatrate.php +++ b/app/code/Magento/OfflineShipping/Model/Carrier/Flatrate.php @@ -56,6 +56,8 @@ class Flatrate extends \Magento\Shipping\Model\Carrier\AbstractCarrier implement /** * @param \Magento\Sales\Model\Quote\Address\RateRequest $request * @return Result|bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request) { diff --git a/app/code/Magento/OfflineShipping/Model/Carrier/Pickup.php b/app/code/Magento/OfflineShipping/Model/Carrier/Pickup.php index d689bef7b95..e1e94f8cb05 100644 --- a/app/code/Magento/OfflineShipping/Model/Carrier/Pickup.php +++ b/app/code/Magento/OfflineShipping/Model/Carrier/Pickup.php @@ -51,6 +51,7 @@ class Pickup extends \Magento\Shipping\Model\Carrier\AbstractCarrier implements /** * @param \Magento\Sales\Model\Quote\Address\RateRequest $request * @return \Magento\Shipping\Model\Rate\Result + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request) { diff --git a/app/code/Magento/OfflineShipping/Model/Carrier/Tablerate.php b/app/code/Magento/OfflineShipping/Model/Carrier/Tablerate.php index 710c6b45ff3..02d00b7ada9 100644 --- a/app/code/Magento/OfflineShipping/Model/Carrier/Tablerate.php +++ b/app/code/Magento/OfflineShipping/Model/Carrier/Tablerate.php @@ -50,6 +50,7 @@ class Tablerate extends \Magento\Shipping\Model\Carrier\AbstractCarrier implemen * @param \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $resultMethodFactory * @param \Magento\OfflineShipping\Model\Resource\Carrier\TablerateFactory $tablerateFactory * @param array $data + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, @@ -72,6 +73,9 @@ class Tablerate extends \Magento\Shipping\Model\Carrier\AbstractCarrier implemen /** * @param \Magento\Sales\Model\Quote\Address\RateRequest $request * @return \Magento\Shipping\Model\Rate\Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request) { diff --git a/app/code/Magento/OfflineShipping/Model/Quote/Freeshipping.php b/app/code/Magento/OfflineShipping/Model/Quote/Freeshipping.php index 254785c9c51..d95a49b43f9 100644 --- a/app/code/Magento/OfflineShipping/Model/Quote/Freeshipping.php +++ b/app/code/Magento/OfflineShipping/Model/Quote/Freeshipping.php @@ -38,6 +38,7 @@ class Freeshipping extends \Magento\Sales\Model\Quote\Address\Total\AbstractTota * * @param \Magento\Sales\Model\Quote\Address $address * @return \Magento\OfflineShipping\Model\Quote\Freeshipping + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function collect(Address $address) { diff --git a/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php b/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php index ee3d001166f..929aeb75e54 100644 --- a/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php +++ b/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php @@ -13,6 +13,10 @@ namespace Magento\OfflineShipping\Model\Resource\Carrier; use Magento\Framework\Filesystem; use Magento\Framework\Filesystem\DirectoryList; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Tablerate extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** @@ -240,6 +244,8 @@ class Tablerate extends \Magento\Framework\Model\Resource\Db\AbstractDb * @return \Magento\OfflineShipping\Model\Resource\Carrier\Tablerate * @todo: this method should be refactored as soon as updated design will be provided * @see https://wiki.corp.x.com/display/MCOMS/Magento+Filesystem+Decisions + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function uploadAndImport(\Magento\Framework\Object $object) { @@ -402,6 +408,8 @@ class Tablerate extends \Magento\Framework\Model\Resource\Db\AbstractDb * @param array $row * @param int $rowNumber * @return array|false + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getImportRow($row, $rowNumber = 0) { diff --git a/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php b/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php index 148ff16b9ce..d644ce13ba0 100644 --- a/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php +++ b/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php @@ -56,6 +56,7 @@ class BuiltinPlugin * @param callable $proceed * @param \Magento\Framework\App\RequestInterface $request * @return \Magento\Framework\Controller\ResultInterface|\Magento\Framework\App\Response\Http + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundDispatch( \Magento\Framework\App\FrontControllerInterface $subject, diff --git a/app/code/Magento/PageCache/Model/App/FrontController/VarnishPlugin.php b/app/code/Magento/PageCache/Model/App/FrontController/VarnishPlugin.php index 2a3c8117c52..1a22bdbaba7 100644 --- a/app/code/Magento/PageCache/Model/App/FrontController/VarnishPlugin.php +++ b/app/code/Magento/PageCache/Model/App/FrontController/VarnishPlugin.php @@ -44,6 +44,7 @@ class VarnishPlugin * @param callable $proceed * @param \Magento\Framework\App\RequestInterface $request * @return false|\Magento\Framework\App\Response\Http|\Magento\Framework\Controller\ResultInterface + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundDispatch( \Magento\Framework\App\FrontControllerInterface $subject, diff --git a/app/code/Magento/PageCache/Model/Controller/Result/BuiltinPlugin.php b/app/code/Magento/PageCache/Model/Controller/Result/BuiltinPlugin.php index 9f0991bf713..91b7320757a 100644 --- a/app/code/Magento/PageCache/Model/Controller/Result/BuiltinPlugin.php +++ b/app/code/Magento/PageCache/Model/Controller/Result/BuiltinPlugin.php @@ -56,6 +56,7 @@ class BuiltinPlugin * @param callable $proceed * @param ResponseHttp $response * @return \Magento\Framework\Controller\ResultInterface + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundRenderResult( \Magento\Framework\Controller\ResultInterface $subject, diff --git a/app/code/Magento/Payment/Block/Form/Cc.php b/app/code/Magento/Payment/Block/Form/Cc.php index 2e4dbb9a8e4..5ca0b86f68a 100644 --- a/app/code/Magento/Payment/Block/Form/Cc.php +++ b/app/code/Magento/Payment/Block/Form/Cc.php @@ -36,6 +36,7 @@ class Cc extends \Magento\Payment\Block\Form * Retrieve availables credit card types * * @return array + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getCcAvailableTypes() { diff --git a/app/code/Magento/Payment/Block/Info.php b/app/code/Magento/Payment/Block/Info.php index 9143ae046fd..8e274cd38d2 100644 --- a/app/code/Magento/Payment/Block/Info.php +++ b/app/code/Magento/Payment/Block/Info.php @@ -113,6 +113,7 @@ class Info extends \Magento\Framework\View\Element\Template * false => full information may be shown * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsSecureMode() { diff --git a/app/code/Magento/Payment/Helper/Data.php b/app/code/Magento/Payment/Helper/Data.php index 29618544918..8522149c41b 100644 --- a/app/code/Magento/Payment/Helper/Data.php +++ b/app/code/Magento/Payment/Helper/Data.php @@ -17,6 +17,7 @@ use Magento\Payment\Model\MethodInterface; /** * Payment module base helper + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Data extends \Magento\Framework\App\Helper\AbstractHelper { @@ -264,6 +265,8 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * @param bool $withGroups * @param Store|null $store * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getPaymentMethodList($sorted = true, $asLabelValue = false, $withGroups = false, $store = null) { diff --git a/app/code/Magento/Payment/Model/Method/AbstractMethod.php b/app/code/Magento/Payment/Model/Method/AbstractMethod.php index 7f20e76e347..1261f429355 100644 --- a/app/code/Magento/Payment/Model/Method/AbstractMethod.php +++ b/app/code/Magento/Payment/Model/Method/AbstractMethod.php @@ -12,6 +12,8 @@ use Magento\Sales\Model\Order\Payment; /** * Payment method abstract model * @method AbstractMethod setStore() + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) */ abstract class AbstractMethod extends \Magento\Framework\Object implements MethodInterface, PaymentMethodChecksInterface { @@ -304,6 +306,7 @@ abstract class AbstractMethod extends \Magento\Framework\Object implements Metho * * @param \Magento\Framework\Object $payment * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function canVoid(\Magento\Framework\Object $payment) { @@ -357,6 +360,7 @@ abstract class AbstractMethod extends \Magento\Framework\Object implements Metho * @param \Magento\Payment\Model\Info $payment * @param string $transactionId * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function fetchTransactionInfo(\Magento\Payment\Model\Info $payment, $transactionId) { @@ -506,6 +510,7 @@ abstract class AbstractMethod extends \Magento\Framework\Object implements Metho * * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function order(\Magento\Framework\Object $payment, $amount) { @@ -523,6 +528,7 @@ abstract class AbstractMethod extends \Magento\Framework\Object implements Metho * * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function authorize(\Magento\Framework\Object $payment, $amount) { @@ -540,6 +546,7 @@ abstract class AbstractMethod extends \Magento\Framework\Object implements Metho * * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function capture(\Magento\Framework\Object $payment, $amount) { @@ -587,6 +594,7 @@ abstract class AbstractMethod extends \Magento\Framework\Object implements Metho * @param float $amount * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function refund(\Magento\Framework\Object $payment, $amount) { @@ -614,6 +622,7 @@ abstract class AbstractMethod extends \Magento\Framework\Object implements Metho * @param \Magento\Framework\Object $payment * * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function cancel(\Magento\Framework\Object $payment) { @@ -640,6 +649,7 @@ abstract class AbstractMethod extends \Magento\Framework\Object implements Metho * * @param \Magento\Payment\Model\Info $payment * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function canReviewPayment(\Magento\Payment\Model\Info $payment) { @@ -760,6 +770,7 @@ abstract class AbstractMethod extends \Magento\Framework\Object implements Metho * @param object $stateObject * * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function initialize($paymentAction, $stateObject) { @@ -794,6 +805,7 @@ abstract class AbstractMethod extends \Magento\Framework\Object implements Metho * Define if debugging is enabled * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDebugFlag() { diff --git a/app/code/Magento/Persistent/Helper/Data.php b/app/code/Magento/Persistent/Helper/Data.php index 47b1a12e53b..4105aeb1515 100644 --- a/app/code/Magento/Persistent/Helper/Data.php +++ b/app/code/Magento/Persistent/Helper/Data.php @@ -156,6 +156,7 @@ class Data extends \Magento\Core\Helper\Data * Check if set `Clear on Logout` in config settings * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getClearOnLogout() { @@ -190,6 +191,7 @@ class Data extends \Magento\Core\Helper\Data * * @param \Magento\Framework\Event\Observer $observer * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function canProcess($observer) { diff --git a/app/code/Magento/Persistent/Model/Observer/ClearExpiredCronJob.php b/app/code/Magento/Persistent/Model/Observer/ClearExpiredCronJob.php index 2681c966cb4..793d034a884 100644 --- a/app/code/Magento/Persistent/Model/Observer/ClearExpiredCronJob.php +++ b/app/code/Magento/Persistent/Model/Observer/ClearExpiredCronJob.php @@ -38,6 +38,7 @@ class ClearExpiredCronJob * * @param \Magento\Cron\Model\Schedule $schedule * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function execute(\Magento\Cron\Model\Schedule $schedule) { diff --git a/app/code/Magento/Persistent/Model/Observer/CustomerAuthenticatedEvent.php b/app/code/Magento/Persistent/Model/Observer/CustomerAuthenticatedEvent.php index b650f1aa62e..d7161945f73 100644 --- a/app/code/Magento/Persistent/Model/Observer/CustomerAuthenticatedEvent.php +++ b/app/code/Magento/Persistent/Model/Observer/CustomerAuthenticatedEvent.php @@ -46,6 +46,7 @@ class CustomerAuthenticatedEvent * * @param \Magento\Framework\Event\Observer $observer * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function execute($observer) { diff --git a/app/code/Magento/Persistent/Model/Observer/Session.php b/app/code/Magento/Persistent/Model/Observer/Session.php index f90e4a7a784..74df0031f82 100644 --- a/app/code/Magento/Persistent/Model/Observer/Session.php +++ b/app/code/Magento/Persistent/Model/Observer/Session.php @@ -72,6 +72,7 @@ class Session /** * @param Observer $observer * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function synchronizePersistentOnLogin(Observer $observer) { diff --git a/app/code/Magento/Persistent/Model/Observer/SetLoadPersistentQuote.php b/app/code/Magento/Persistent/Model/Observer/SetLoadPersistentQuote.php index 2d98c95e5a8..156934676a9 100644 --- a/app/code/Magento/Persistent/Model/Observer/SetLoadPersistentQuote.php +++ b/app/code/Magento/Persistent/Model/Observer/SetLoadPersistentQuote.php @@ -58,6 +58,7 @@ class SetLoadPersistentQuote * * @param \Magento\Framework\Event\Observer $observer * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function execute($observer) { diff --git a/app/code/Magento/Persistent/Model/Session.php b/app/code/Magento/Persistent/Model/Session.php index 8015e496df4..ef162816c9a 100644 --- a/app/code/Magento/Persistent/Model/Session.php +++ b/app/code/Magento/Persistent/Model/Session.php @@ -109,6 +109,7 @@ class Session extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -162,6 +163,7 @@ class Session extends \Magento\Framework\Model\AbstractModel * Get if model loads expired sessions * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getLoadExpired() { diff --git a/app/code/Magento/ProductAlert/Model/Email.php b/app/code/Magento/ProductAlert/Model/Email.php index 98b57693e8c..70ec05d059f 100644 --- a/app/code/Magento/ProductAlert/Model/Email.php +++ b/app/code/Magento/ProductAlert/Model/Email.php @@ -8,6 +8,7 @@ namespace Magento\ProductAlert\Model; * ProductAlert Email processor * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Email extends \Magento\Framework\Model\AbstractModel { @@ -118,6 +119,7 @@ class Email extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -280,6 +282,8 @@ class Email extends \Magento\Framework\Model\AbstractModel * Send customer email * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function send() { diff --git a/app/code/Magento/ProductAlert/Model/Observer.php b/app/code/Magento/ProductAlert/Model/Observer.php index 326d6a005d6..6c3cbac7f97 100644 --- a/app/code/Magento/ProductAlert/Model/Observer.php +++ b/app/code/Magento/ProductAlert/Model/Observer.php @@ -8,6 +8,7 @@ namespace Magento\ProductAlert\Model; * ProductAlert observer * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Observer { @@ -123,6 +124,7 @@ class Observer * @param \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder * @param \Magento\ProductAlert\Model\EmailFactory $emailFactory * @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Catalog\Helper\Data $catalogData, @@ -172,6 +174,8 @@ class Observer * * @param \Magento\ProductAlert\Model\Email $email * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _processPrice(\Magento\ProductAlert\Model\Email $email) { @@ -257,6 +261,8 @@ class Observer * * @param \Magento\ProductAlert\Model\Email $email * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _processStock(\Magento\ProductAlert\Model\Email $email) { diff --git a/app/code/Magento/ProductAlert/Model/Resource/AbstractResource.php b/app/code/Magento/ProductAlert/Model/Resource/AbstractResource.php index 0fafc02a596..d7b1018cd26 100644 --- a/app/code/Magento/ProductAlert/Model/Resource/AbstractResource.php +++ b/app/code/Magento/ProductAlert/Model/Resource/AbstractResource.php @@ -62,6 +62,7 @@ abstract class AbstractResource extends \Magento\Framework\Model\Resource\Db\Abs * @param int $customerId * @param int $websiteId * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function deleteCustomer(\Magento\Framework\Model\AbstractModel $object, $customerId, $websiteId = null) { diff --git a/app/code/Magento/Reports/Block/Adminhtml/Config/Form/Field/YtdStart.php b/app/code/Magento/Reports/Block/Adminhtml/Config/Form/Field/YtdStart.php index 1d2bf67b5f7..9bf05b55549 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Config/Form/Field/YtdStart.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Config/Form/Field/YtdStart.php @@ -16,6 +16,7 @@ class YtdStart extends \Magento\Backend\Block\System\Config\Form\Field /** * @param AbstractElement $element * @return string + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getElementHtml(AbstractElement $element) { diff --git a/app/code/Magento/Reports/Block/Adminhtml/Filter/Form.php b/app/code/Magento/Reports/Block/Adminhtml/Filter/Form.php index 502ce81beb7..c70792b3b7d 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Filter/Form.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Filter/Form.php @@ -51,6 +51,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * @param string $fieldId * @param bool $defaultVisibility * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getFieldVisibility($fieldId, $defaultVisibility = true) { diff --git a/app/code/Magento/Reports/Block/Adminhtml/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Grid.php index 6cb94496365..b8f61390531 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Grid.php @@ -71,6 +71,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid * Apply sorting and filtering to collection * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareCollection() { @@ -183,6 +184,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid * * @param array $data * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _setFilterValues($data) { @@ -208,6 +210,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid * Return visibility of store switcher * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getStoreSwitcherVisibility() { @@ -240,6 +243,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid * Return visibility of date filter * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDateFilterVisibility() { diff --git a/app/code/Magento/Reports/Block/Adminhtml/Grid/AbstractGrid.php b/app/code/Magento/Reports/Block/Adminhtml/Grid/AbstractGrid.php index 78b5540d710..16b58d0c623 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Grid/AbstractGrid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Grid/AbstractGrid.php @@ -185,6 +185,8 @@ class AbstractGrid extends \Magento\Backend\Block\Widget\Grid\Extended /** * @return $this|\Magento\Backend\Block\Widget\Grid + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _prepareCollection() { @@ -392,6 +394,7 @@ class AbstractGrid extends \Magento\Backend\Block\Widget\Grid\Extended * @param \Magento\Reports\Model\Resource\Report\Collection\AbstractCollection $collection * @param \Magento\Framework\Object $filterData * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _addCustomFilter($collection, $filterData) { diff --git a/app/code/Magento/Reports/Block/Adminhtml/Product/Viewed/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Product/Viewed/Grid.php index 4795380e045..205ed560504 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Product/Viewed/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Product/Viewed/Grid.php @@ -8,6 +8,7 @@ namespace Magento\Reports\Block\Adminhtml\Product\Viewed; * Adminhtml most viewed products report grid block * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid { diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Bestsellers/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Bestsellers/Grid.php index 73e4922c38b..1bebe56a63e 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Bestsellers/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Bestsellers/Grid.php @@ -8,6 +8,7 @@ namespace Magento\Reports\Block\Adminhtml\Sales\Bestsellers; * Adminhtml bestsellers report grid block * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid { diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons/Grid.php index 5cdac91fbf3..467e19cc6a5 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons/Grid.php @@ -8,6 +8,7 @@ namespace Magento\Reports\Block\Adminhtml\Sales\Coupons; * Adminhtml coupons report grid block * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid { @@ -40,6 +41,7 @@ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid /** * @return \Magento\Backend\Block\Widget\Grid\Extended + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareColumns() { diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced/Grid.php index 04167c0dabc..38d3beec3ad 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced/Grid.php @@ -8,6 +8,7 @@ namespace Magento\Reports\Block\Adminhtml\Sales\Invoiced; * Adminhtml invoiced report grid block * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid { diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded/Grid.php index 7c03365493f..13eaebac77f 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded/Grid.php @@ -8,6 +8,7 @@ namespace Magento\Reports\Block\Adminhtml\Sales\Refunded; * Adminhtml refunded report grid block * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid { diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales/Grid.php index b27cfc8492d..e6518ab8daa 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales/Grid.php @@ -8,6 +8,7 @@ namespace Magento\Reports\Block\Adminhtml\Sales\Sales; * Adminhtml sales report grid block * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid { @@ -38,6 +39,7 @@ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid /** * @return \Magento\Backend\Block\Widget\Grid\Extended + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareColumns() { diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping/Grid.php index fc3ca2fdf5f..2c36b41b634 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping/Grid.php @@ -8,6 +8,7 @@ namespace Magento\Reports\Block\Adminhtml\Sales\Shipping; * Adminhtml shipping report grid block * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid { diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax/Grid.php index cb96bc5b983..bc26a7aa772 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax/Grid.php @@ -8,6 +8,7 @@ namespace Magento\Reports\Block\Adminhtml\Sales\Tax; * Adminhtml tax report grid block * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid { @@ -152,6 +153,7 @@ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid * Preparing collection. Filter canceled statuses for orders in taxes * * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _prepareCollection() { diff --git a/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php index 8d5a10fc9ad..1dd759eabce 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php @@ -8,6 +8,7 @@ namespace Magento\Reports\Block\Adminhtml\Shopcart\Abandoned; * Adminhtml abandoned shopping carts report grid block * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\Shopcart { @@ -85,6 +86,7 @@ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\Shopcart /** * @return \Magento\Backend\Block\Widget\Grid\Extended + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareColumns() { diff --git a/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Customer/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Customer/Grid.php index db716f31f5c..8cd98a57041 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Customer/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Customer/Grid.php @@ -8,6 +8,7 @@ namespace Magento\Reports\Block\Adminhtml\Shopcart\Customer; * Adminhtml items in carts report grid block * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\Shopcart { diff --git a/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Product/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Product/Grid.php index eca3edddcfa..8ad74458a39 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Product/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Product/Grid.php @@ -8,6 +8,7 @@ namespace Magento\Reports\Block\Adminhtml\Shopcart\Product; * Adminhtml products in carts report grid block * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\Shopcart { diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales.php index de64f4a3fcf..b8bf2a28fbf 100644 --- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales.php +++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales.php @@ -10,6 +10,9 @@ */ namespace Magento\Reports\Controller\Adminhtml\Report; +/** + * @SuppressWarnings(PHPMD.NumberOfChildren) + */ class Sales extends AbstractReport { /** diff --git a/app/code/Magento/Reports/Helper/Data.php b/app/code/Magento/Reports/Helper/Data.php index 5ddcd53cf48..dbc868823e0 100644 --- a/app/code/Magento/Reports/Helper/Data.php +++ b/app/code/Magento/Reports/Helper/Data.php @@ -41,6 +41,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * @param string $to * @param string $period * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getIntervals($from, $to, $period = self::REPORT_PERIOD_TYPE_DAY) { diff --git a/app/code/Magento/Reports/Model/Event/Observer.php b/app/code/Magento/Reports/Model/Event/Observer.php index 29a7c544c17..20d0c87adc0 100644 --- a/app/code/Magento/Reports/Model/Event/Observer.php +++ b/app/code/Magento/Reports/Model/Event/Observer.php @@ -106,6 +106,7 @@ class Observer * * @param \Magento\Framework\Event\Observer $observer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function customerLogin(\Magento\Framework\Event\Observer $observer) { @@ -129,6 +130,7 @@ class Observer * * @param \Magento\Framework\Event\Observer $observer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function customerLogout(\Magento\Framework\Event\Observer $observer) { @@ -181,6 +183,7 @@ class Observer * * @param \Magento\Framework\Event\Observer $observer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function catalogProductCompareRemoveProduct(\Magento\Framework\Event\Observer $observer) { @@ -196,6 +199,7 @@ class Observer * * @param \Magento\Framework\Event\Observer $observer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function catalogProductCompareClear(\Magento\Framework\Event\Observer $observer) { diff --git a/app/code/Magento/Reports/Model/Item.php b/app/code/Magento/Reports/Model/Item.php index f240cccde06..eb4831e0f83 100644 --- a/app/code/Magento/Reports/Model/Item.php +++ b/app/code/Magento/Reports/Model/Item.php @@ -32,6 +32,7 @@ class Item extends \Magento\Framework\Object * Get is empty indicator * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsEmpty() { diff --git a/app/code/Magento/Reports/Model/Product/Index/AbstractIndex.php b/app/code/Magento/Reports/Model/Product/Index/AbstractIndex.php index c70d3a2ece9..a1798f1f957 100644 --- a/app/code/Magento/Reports/Model/Product/Index/AbstractIndex.php +++ b/app/code/Magento/Reports/Model/Product/Index/AbstractIndex.php @@ -58,6 +58,7 @@ abstract class AbstractIndex extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Reports/Model/Product/Index/Compared.php b/app/code/Magento/Reports/Model/Product/Index/Compared.php index f79d8be7a0c..03f4c1abdd2 100644 --- a/app/code/Magento/Reports/Model/Product/Index/Compared.php +++ b/app/code/Magento/Reports/Model/Product/Index/Compared.php @@ -48,6 +48,7 @@ class Compared extends \Magento\Reports\Model\Product\Index\AbstractIndex * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Reports/Model/Resource/Entity/Summary/Collection/AbstractCollection.php b/app/code/Magento/Reports/Model/Resource/Entity/Summary/Collection/AbstractCollection.php index 8e54e0fba26..2b83d5ed6a7 100644 --- a/app/code/Magento/Reports/Model/Resource/Entity/Summary/Collection/AbstractCollection.php +++ b/app/code/Magento/Reports/Model/Resource/Entity/Summary/Collection/AbstractCollection.php @@ -83,6 +83,7 @@ class AbstractCollection extends \Magento\Framework\Data\Collection * * @param int $period * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setDatePeriod($period) { @@ -94,6 +95,7 @@ class AbstractCollection extends \Magento\Framework\Data\Collection * * @param int $storeId * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setStoreFilter($storeId) { diff --git a/app/code/Magento/Reports/Model/Resource/Event.php b/app/code/Magento/Reports/Model/Resource/Event.php index 62e22c7704c..3c8792ed77c 100644 --- a/app/code/Magento/Reports/Model/Resource/Event.php +++ b/app/code/Magento/Reports/Model/Resource/Event.php @@ -54,6 +54,7 @@ class Event extends \Magento\Framework\Model\Resource\Db\AbstractDb * @param int $customerId * @param array $types * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function updateCustomerType(\Magento\Reports\Model\Event $model, $visitorId, $customerId, $types = []) { @@ -168,6 +169,7 @@ class Event extends \Magento\Framework\Model\Resource\Db\AbstractDb * * @param \Magento\Reports\Model\Event $object * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function clean(\Magento\Reports\Model\Event $object) { diff --git a/app/code/Magento/Reports/Model/Resource/Order/Collection.php b/app/code/Magento/Reports/Model/Resource/Order/Collection.php index 5e90b28e091..ce22dd6b495 100644 --- a/app/code/Magento/Reports/Model/Resource/Order/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Order/Collection.php @@ -10,6 +10,7 @@ use Magento\Framework\DB\Select; * Reports orders collection * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Collection extends \Magento\Sales\Model\Resource\Order\Collection { @@ -105,6 +106,7 @@ class Collection extends \Magento\Sales\Model\Resource\Order\Collection * * @param string $range * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function checkIsLive($range) { @@ -361,6 +363,7 @@ class Collection extends \Magento\Sales\Model\Resource\Order\Collection * @param string $tzFrom * @param string $tzTo * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getTZRangeExpressionForAttribute($range, $attribute, $tzFrom = '+00:00', $tzTo = null) { @@ -383,6 +386,7 @@ class Collection extends \Magento\Sales\Model\Resource\Order\Collection * @param string $customEnd * @param bool $returnObjects * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getDateRange($range, $customStart, $customEnd, $returnObjects = false) { @@ -539,6 +543,7 @@ class Collection extends \Magento\Sales\Model\Resource\Order\Collection * * @param int $isFilter * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _calculateTotalsAggregated($isFilter = 0) { diff --git a/app/code/Magento/Reports/Model/Resource/Product/Collection.php b/app/code/Magento/Reports/Model/Resource/Product/Collection.php index 28ad32d28ed..9999f93a21c 100644 --- a/app/code/Magento/Reports/Model/Resource/Product/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Product/Collection.php @@ -10,6 +10,9 @@ */ namespace Magento\Reports\Model\Resource\Product; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection { const SELECT_COUNT_SQL_TYPE_CART = 1; diff --git a/app/code/Magento/Reports/Model/Resource/Product/Index/Collection/AbstractCollection.php b/app/code/Magento/Reports/Model/Resource/Product/Index/Collection/AbstractCollection.php index 6a980688534..30f4aef3b87 100644 --- a/app/code/Magento/Reports/Model/Resource/Product/Index/Collection/AbstractCollection.php +++ b/app/code/Magento/Reports/Model/Resource/Product/Index/Collection/AbstractCollection.php @@ -10,6 +10,9 @@ */ namespace Magento\Reports\Model\Resource\Product\Index\Collection; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ abstract class AbstractCollection extends \Magento\Catalog\Model\Resource\Product\Collection { /** diff --git a/app/code/Magento/Reports/Model/Resource/Product/Lowstock/Collection.php b/app/code/Magento/Reports/Model/Resource/Product/Lowstock/Collection.php index c6e28286319..7d3fcbf8dfa 100644 --- a/app/code/Magento/Reports/Model/Resource/Product/Lowstock/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Product/Lowstock/Collection.php @@ -10,6 +10,9 @@ */ namespace Magento\Reports\Model\Resource\Product\Lowstock; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Collection extends \Magento\Reports\Model\Resource\Product\Collection { /** diff --git a/app/code/Magento/Reports/Model/Resource/Report/AbstractReport.php b/app/code/Magento/Reports/Model/Resource/Report/AbstractReport.php index 8fea5b72d7d..e52ccfcba2d 100644 --- a/app/code/Magento/Reports/Model/Resource/Report/AbstractReport.php +++ b/app/code/Magento/Reports/Model/Resource/Report/AbstractReport.php @@ -7,6 +7,7 @@ namespace Magento\Reports\Model\Resource\Report; /** * Abstract report aggregate resource model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractReport extends \Magento\Framework\Model\Resource\Db\AbstractDb { @@ -275,6 +276,7 @@ abstract class AbstractReport extends \Magento\Framework\Model\Resource\Db\Abstr * @param string $alias * @param string $relatedAlias * @return \Magento\Framework\DB\Select + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ protected function _getTableDateRangeRelatedSelect( $table, diff --git a/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed.php b/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed.php index 0065c5b791c..49b2e991485 100644 --- a/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed.php +++ b/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed.php @@ -78,6 +78,7 @@ class Viewed extends \Magento\Sales\Model\Resource\Report\AbstractReport * @param null|mixed $from * @param null|mixed $to * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function aggregate($from = null, $to = null) { diff --git a/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed/Collection.php b/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed/Collection.php index 7923155007e..322f2672dd0 100644 --- a/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed/Collection.php @@ -8,6 +8,9 @@ */ namespace Magento\Reports\Model\Resource\Report\Product\Viewed; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Collection extends \Magento\Reports\Model\Resource\Report\Collection\AbstractCollection { /** @@ -218,6 +221,9 @@ class Collection extends \Magento\Reports\Model\Resource\Report\Collection\Abstr * totals * * @return $this|\Magento\Framework\Model\Resource\Db\Collection\AbstractCollection + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _beforeLoad() { diff --git a/app/code/Magento/Reports/Model/Resource/Review/Customer/Collection.php b/app/code/Magento/Reports/Model/Resource/Review/Customer/Collection.php index 6c3e9d99b3e..1d41208d2f9 100644 --- a/app/code/Magento/Reports/Model/Resource/Review/Customer/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Review/Customer/Collection.php @@ -28,6 +28,7 @@ class Collection extends \Magento\Review\Model\Resource\Review\Collection * @param \Magento\Customer\Model\Resource\Customer $customerResource * @param mixed $connection * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Core\Model\EntityFactory $entityFactory, diff --git a/app/code/Magento/Reports/Model/Resource/Shopcart/Product/Collection.php b/app/code/Magento/Reports/Model/Resource/Shopcart/Product/Collection.php index 65a991c5285..33202f691ed 100644 --- a/app/code/Magento/Reports/Model/Resource/Shopcart/Product/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Shopcart/Product/Collection.php @@ -31,6 +31,7 @@ class Collection extends \Magento\Reports\Model\Resource\Product\Collection * @param string $from * @param string $to * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setDateRange($from, $to) { diff --git a/app/code/Magento/Reports/Model/Totals.php b/app/code/Magento/Reports/Model/Totals.php index 3e50e6b5be0..d1b6c19e00e 100644 --- a/app/code/Magento/Reports/Model/Totals.php +++ b/app/code/Magento/Reports/Model/Totals.php @@ -18,6 +18,8 @@ class Totals * @param string $from * @param string $to * @return \Magento\Framework\Object + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function countTotals($grid, $from, $to) { diff --git a/app/code/Magento/Review/Block/Adminhtml/Add/Form.php b/app/code/Magento/Review/Block/Adminhtml/Add/Form.php index 829789a368d..1c65f642ba2 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Add/Form.php +++ b/app/code/Magento/Review/Block/Adminhtml/Add/Form.php @@ -50,6 +50,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * Prepare add review form * * @return void + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/Review/Block/Adminhtml/Edit.php b/app/code/Magento/Review/Block/Adminhtml/Edit.php index 60d5e3f094a..a43aed9e8e8 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Edit.php +++ b/app/code/Magento/Review/Block/Adminhtml/Edit.php @@ -54,6 +54,7 @@ class Edit extends \Magento\Backend\Block\Widget\Form\Container * Initialize edit review * * @return void + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _construct() { diff --git a/app/code/Magento/Review/Block/Adminhtml/Edit/Form.php b/app/code/Magento/Review/Block/Adminhtml/Edit/Form.php index 7d961b20204..3651d0b47d9 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Edit/Form.php +++ b/app/code/Magento/Review/Block/Adminhtml/Edit/Form.php @@ -67,6 +67,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * Prepare edit review form * * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/Review/Block/Adminhtml/Grid.php b/app/code/Magento/Review/Block/Adminhtml/Grid.php index 3df4f24b7f9..0e0542f0c13 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Grid.php +++ b/app/code/Magento/Review/Block/Adminhtml/Grid.php @@ -152,6 +152,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended * Prepare grid columns * * @return \Magento\Backend\Block\Widget\Grid + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareColumns() { diff --git a/app/code/Magento/Review/Block/Adminhtml/Product/Edit/Tab/Reviews.php b/app/code/Magento/Review/Block/Adminhtml/Product/Edit/Tab/Reviews.php index 2e608f54a95..94fd04c859f 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Product/Edit/Tab/Reviews.php +++ b/app/code/Magento/Review/Block/Adminhtml/Product/Edit/Tab/Reviews.php @@ -6,6 +6,9 @@ */ namespace Magento\Review\Block\Adminhtml\Product\Edit\Tab; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Reviews extends \Magento\Review\Block\Adminhtml\Grid { /** diff --git a/app/code/Magento/Review/Block/Adminhtml/Product/Grid.php b/app/code/Magento/Review/Block/Adminhtml/Product/Grid.php index 500357dd747..6389f6d182c 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Product/Grid.php +++ b/app/code/Magento/Review/Block/Adminhtml/Product/Grid.php @@ -8,6 +8,7 @@ namespace Magento\Review\Block\Adminhtml\Product; * Adminhtml product grid block * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Catalog\Block\Adminhtml\Product\Grid { diff --git a/app/code/Magento/Review/Block/Adminhtml/Rating/Detailed.php b/app/code/Magento/Review/Block/Adminhtml/Rating/Detailed.php index 5393269b9a2..ba53a2324e7 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Rating/Detailed.php +++ b/app/code/Magento/Review/Block/Adminhtml/Rating/Detailed.php @@ -148,6 +148,7 @@ class Detailed extends \Magento\Backend\Block\Template * @param Option $option * @param \Magento\Review\Model\Rating $rating * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function isSelected($option, $rating) { diff --git a/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php b/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php index 1e1ee3352df..14f151e57f2 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php +++ b/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php @@ -60,6 +60,9 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * Prepare rating edit form * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/Review/Block/Form.php b/app/code/Magento/Review/Block/Form.php index 70610780822..3cf00c12c2c 100644 --- a/app/code/Magento/Review/Block/Form.php +++ b/app/code/Magento/Review/Block/Form.php @@ -13,6 +13,7 @@ use Magento\Review\Model\Resource\Rating\Collection as RatingCollection; * Review form block * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Form extends \Magento\Framework\View\Element\Template { @@ -85,6 +86,7 @@ class Form extends \Magento\Framework\View\Element\Template * @param \Magento\Framework\App\Http\Context $httpContext * @param \Magento\Customer\Model\Url $customerUrl * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Review/Block/Product/View.php b/app/code/Magento/Review/Block/Product/View.php index a2a92b01005..567ceb37336 100644 --- a/app/code/Magento/Review/Block/Product/View.php +++ b/app/code/Magento/Review/Block/Product/View.php @@ -11,6 +11,7 @@ use Magento\Review\Model\Resource\Review\Collection as ReviewCollection; * Product Reviews Page * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class View extends \Magento\Catalog\Block\Product\View { @@ -41,6 +42,7 @@ class View extends \Magento\Catalog\Block\Product\View * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency * @param \Magento\Review\Model\Resource\Review\CollectionFactory $collectionFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Catalog\Block\Product\Context $context, diff --git a/app/code/Magento/Review/Controller/Adminhtml/Product/Save.php b/app/code/Magento/Review/Controller/Adminhtml/Product/Save.php index 61f49957729..873ddf65803 100644 --- a/app/code/Magento/Review/Controller/Adminhtml/Product/Save.php +++ b/app/code/Magento/Review/Controller/Adminhtml/Product/Save.php @@ -9,6 +9,7 @@ class Save extends \Magento\Review\Controller\Adminhtml\Product { /** * @return mixed + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Review/Controller/Product.php b/app/code/Magento/Review/Controller/Product.php index 1bbc2610ff5..3955e52e9f7 100644 --- a/app/code/Magento/Review/Controller/Product.php +++ b/app/code/Magento/Review/Controller/Product.php @@ -13,6 +13,7 @@ use Magento\Review\Model\Review; * Review controller * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Product extends \Magento\Framework\App\Action\Action { @@ -106,6 +107,7 @@ class Product extends \Magento\Framework\App\Action\Action * @param \Magento\Framework\Session\Generic $reviewSession * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/app/code/Magento/Review/Controller/Product/Post.php b/app/code/Magento/Review/Controller/Product/Post.php index 24f6095ac03..22d3c05f828 100644 --- a/app/code/Magento/Review/Controller/Product/Post.php +++ b/app/code/Magento/Review/Controller/Product/Post.php @@ -13,6 +13,7 @@ class Post extends \Magento\Review\Controller\Product * Submit new review action * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Review/Helper/Data.php b/app/code/Magento/Review/Helper/Data.php index 37508f871d6..4174eccc53d 100644 --- a/app/code/Magento/Review/Helper/Data.php +++ b/app/code/Magento/Review/Helper/Data.php @@ -76,6 +76,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * Return an indicator of whether or not guest is allowed to write * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsGuestAllowToWrite() { diff --git a/app/code/Magento/Review/Model/Resource/Rating.php b/app/code/Magento/Review/Model/Resource/Rating.php index 64ba57293a0..a97cb8b6d21 100644 --- a/app/code/Magento/Review/Model/Resource/Rating.php +++ b/app/code/Magento/Review/Model/Resource/Rating.php @@ -158,6 +158,7 @@ class Rating extends \Magento\Framework\Model\Resource\Db\AbstractDb * * @param \Magento\Framework\Model\AbstractModel|\Magento\Review\Model\Rating $object * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _afterSave(\Magento\Framework\Model\AbstractModel $object) { diff --git a/app/code/Magento/Review/Model/Resource/Review/Product/Collection.php b/app/code/Magento/Review/Model/Resource/Review/Product/Collection.php index e43f85a0fcf..5a22dd874d2 100644 --- a/app/code/Magento/Review/Model/Resource/Review/Product/Collection.php +++ b/app/code/Magento/Review/Model/Resource/Review/Product/Collection.php @@ -10,6 +10,7 @@ use Magento\Eav\Model\Entity\Attribute\AbstractAttribute; * Review Product Collection * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection { @@ -447,6 +448,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection * @param array|null $condition * @param string $joinType * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function addAttributeToFilter($attribute, $condition = null, $joinType = 'inner') { diff --git a/app/code/Magento/Review/Model/Review.php b/app/code/Magento/Review/Model/Review.php index 100b0edb3c8..74a6a157696 100644 --- a/app/code/Magento/Review/Model/Review.php +++ b/app/code/Magento/Review/Model/Review.php @@ -18,6 +18,7 @@ use Magento\Review\Model\Resource\Review\Status\Collection as StatusCollection; * @method \Magento\Review\Model\Review setEntityPkValue(int $value) * @method int getStatusId() * @method \Magento\Review\Model\Review setStatusId(int $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Review extends \Magento\Framework\Model\AbstractModel { @@ -120,6 +121,7 @@ class Review extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Rule/Model/AbstractModel.php b/app/code/Magento/Rule/Model/AbstractModel.php index 80aeaa77a24..cff0edf79a2 100644 --- a/app/code/Magento/Rule/Model/AbstractModel.php +++ b/app/code/Magento/Rule/Model/AbstractModel.php @@ -99,6 +99,7 @@ abstract class AbstractModel extends \Magento\Framework\Model\AbstractModel * * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function beforeSave() { @@ -296,6 +297,7 @@ abstract class AbstractModel extends \Magento\Framework\Model\AbstractModel * * @param array $data * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _convertFlatToRecursive(array $data) { @@ -350,6 +352,8 @@ abstract class AbstractModel extends \Magento\Framework\Model\AbstractModel * * @param \Magento\Framework\Object $object * @return bool|string[] - return true if validation passed successfully. Array with errors description otherwise + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validateData(\Magento\Framework\Object $object) { diff --git a/app/code/Magento/Rule/Model/Action/AbstractAction.php b/app/code/Magento/Rule/Model/Action/AbstractAction.php index b888e4dee7c..ad0b585ed10 100644 --- a/app/code/Magento/Rule/Model/Action/AbstractAction.php +++ b/app/code/Magento/Rule/Model/Action/AbstractAction.php @@ -337,6 +337,7 @@ abstract class AbstractAction extends \Magento\Framework\Object implements Actio /** * @param string $format * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function asString($format = '') { diff --git a/app/code/Magento/Rule/Model/Condition/AbstractCondition.php b/app/code/Magento/Rule/Model/Condition/AbstractCondition.php index 916a1404540..675b1ee40ff 100644 --- a/app/code/Magento/Rule/Model/Condition/AbstractCondition.php +++ b/app/code/Magento/Rule/Model/Condition/AbstractCondition.php @@ -13,6 +13,10 @@ namespace Magento\Rule\Model\Condition; use Magento\Framework\Data\Form; use Magento\Framework\Data\Form\Element\AbstractElement; +/** + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + */ abstract class AbstractCondition extends \Magento\Framework\Object implements ConditionInterface { /** @@ -216,6 +220,7 @@ abstract class AbstractCondition extends \Magento\Framework\Object implements Co /** * @param array $arr * @return $this + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function loadArray($arr) { @@ -407,6 +412,7 @@ abstract class AbstractCondition extends \Magento\Framework\Object implements Co /** * @return array|string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getValueName() { @@ -701,6 +707,9 @@ abstract class AbstractCondition extends \Magento\Framework\Object implements Co * * @param object|array|int|string|float|bool $validatedValue product attribute value * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function validateAttribute($validatedValue) { diff --git a/app/code/Magento/Rule/Model/Condition/Combine.php b/app/code/Magento/Rule/Model/Condition/Combine.php index 45d78849d03..a1f5d6d55bc 100644 --- a/app/code/Magento/Rule/Model/Condition/Combine.php +++ b/app/code/Magento/Rule/Model/Condition/Combine.php @@ -199,6 +199,7 @@ class Combine extends AbstractCondition * @param array $arr * @param string $key * @return $this + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function loadArray($arr, $key = 'conditions') { diff --git a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php index f0d4de7d40f..68b6ef8b59b 100644 --- a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php +++ b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php @@ -10,6 +10,10 @@ */ namespace Magento\Rule\Model\Condition\Product; +/** + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ abstract class AbstractProduct extends \Magento\Rule\Model\Condition\AbstractCondition { /** @@ -188,6 +192,7 @@ abstract class AbstractProduct extends \Magento\Rule\Model\Condition\AbstractCon * 'value_option' - hashed array: array($value => $label, ...), * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareValueOptions() { @@ -456,6 +461,7 @@ abstract class AbstractProduct extends \Magento\Rule\Model\Condition\AbstractCon * Retrieve Explicit Apply * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getExplicitApply() { @@ -482,6 +488,7 @@ abstract class AbstractProduct extends \Magento\Rule\Model\Condition\AbstractCon * * @param array $arr * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function loadArray($arr) { @@ -525,6 +532,8 @@ abstract class AbstractProduct extends \Magento\Rule\Model\Condition\AbstractCon * * @param \Magento\Framework\Model\AbstractModel $model * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validate(\Magento\Framework\Model\AbstractModel $model) { diff --git a/app/code/Magento/Rule/Model/Condition/Sql/Builder.php b/app/code/Magento/Rule/Model/Condition/Sql/Builder.php index 0f8f8cecb39..ee2d7c87022 100644 --- a/app/code/Magento/Rule/Model/Condition/Sql/Builder.php +++ b/app/code/Magento/Rule/Model/Condition/Sql/Builder.php @@ -140,6 +140,7 @@ class Builder * @param Combine $combine * @param string $value * @return string + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getMappedSqlCombination(Combine $combine, $value = '') { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php index e005960ffa7..e71984f2f6c 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php @@ -8,6 +8,8 @@ use Magento\Framework\Pricing\PriceCurrencyInterface; /** * Adminhtml sales order address block + * @SuppressWarnings(PHPMD.DepthOfInheritance) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Form extends \Magento\Sales\Block\Adminhtml\Order\Create\Form\Address { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/AbstractCreate.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/AbstractCreate.php index 3fb9895a8e7..5c30fca8bcd 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/AbstractCreate.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/AbstractCreate.php @@ -10,6 +10,7 @@ use Magento\Framework\Pricing\PriceCurrencyInterface; * Adminhtml sales order create abstract block * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractCreate extends \Magento\Backend\Block\Widget { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Billing/Address.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Billing/Address.php index 0a1de984a0f..39b9566ce0a 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Billing/Address.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Billing/Address.php @@ -8,6 +8,7 @@ namespace Magento\Sales\Block\Adminhtml\Order\Create\Billing; * Adminhtml sales order create billing address block * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Address extends \Magento\Sales\Block\Adminhtml\Order\Create\Form\Address { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form.php index df37fb306b6..3f8c3f8e40a 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form.php @@ -55,6 +55,7 @@ class Form extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate * @param \Magento\Framework\Locale\CurrencyInterface $localeCurrency * @param \Magento\Customer\Model\Address\Mapper $addressMapper * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Backend\Block\Template\Context $context, diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php index 522bbadd388..75c302032f9 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php @@ -140,6 +140,7 @@ abstract class AbstractForm extends \Magento\Sales\Block\Adminhtml\Order\Create\ * * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _addAdditionalFormElementData(\Magento\Framework\Data\Form\Element\AbstractElement $element) { @@ -152,6 +153,7 @@ abstract class AbstractForm extends \Magento\Sales\Block\Adminhtml\Order\Create\ * @param \Magento\Customer\Api\Data\AttributeMetadataInterface[] $attributes * @param \Magento\Framework\Data\Form\AbstractForm $form * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _addAttributesToForm($attributes, \Magento\Framework\Data\Form\AbstractForm $form) { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php index 38ff541a8c1..79217910d87 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php @@ -45,6 +45,7 @@ class Account extends AbstractForm * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository * @param ExtensibleDataObjectConverter $extensibleDataObjectConverter * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Backend\Block\Template\Context $context, diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php index 3d3420432cb..9ae0ed6cc22 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php @@ -9,6 +9,7 @@ use Magento\Framework\Pricing\PriceCurrencyInterface; /** * Order create address form + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Address extends \Magento\Sales\Block\Adminhtml\Order\Create\Form\AbstractForm { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php index 44c40e361c7..7ca784342ed 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php @@ -13,6 +13,7 @@ use Magento\Sales\Model\Quote\Item; /** * Adminhtml sales order create items grid block + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Grid extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate { @@ -81,6 +82,7 @@ class Grid extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate * @param StockRegistryInterface $stockRegistry * @param StockStateInterface $stockState * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Backend\Block\Template\Context $context, @@ -446,6 +448,7 @@ class Grid extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate * Get flag for rights to move items to customer storage * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getMoveToCustomerStorage() { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Shipping/Address.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Shipping/Address.php index 5135cc9f371..87419e4c8e4 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Shipping/Address.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Shipping/Address.php @@ -8,6 +8,7 @@ namespace Magento\Sales\Block\Adminhtml\Order\Create\Shipping; * Adminhtml sales order create shipping address block * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Address extends \Magento\Sales\Block\Adminhtml\Order\Create\Form\Address { @@ -62,6 +63,7 @@ class Address extends \Magento\Sales\Block\Adminhtml\Order\Create\Form\Address * Same as billing address flag * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsAsBilling() { @@ -72,6 +74,7 @@ class Address extends \Magento\Sales\Block\Adminhtml\Order\Create\Form\Address * Saving shipping address must be turned off, when it is the same as billing * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDontSaveInAddressBook() { @@ -118,6 +121,7 @@ class Address extends \Magento\Sales\Block\Adminhtml\Order\Create\Form\Address * Return true is the quote is virtual * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsDisabled() { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebar.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebar.php index 28187dad830..7ae70dec4da 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebar.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebar.php @@ -139,6 +139,7 @@ class AbstractSidebar extends \Magento\Sales\Block\Adminhtml\Order\Create\Abstra * Retrieve all items * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getItems() { @@ -217,6 +218,7 @@ class AbstractSidebar extends \Magento\Sales\Block\Adminhtml\Order\Create\Abstra * * @param string|int|null $productType * @return false + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function isConfigurationRequired($productType) { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php index dedf8478a6d..7b2ce785249 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php @@ -186,6 +186,7 @@ class Totals extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate * Get note notification * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getNoteNotify() { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Discount.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Discount.php index 142451ba00a..f279f4f7c98 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Discount.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Discount.php @@ -10,6 +10,7 @@ use Magento\Framework\Pricing\PriceCurrencyInterface; * Subtotal Total Row Renderer * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Discount extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals\DefaultTotals { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php index e092ed249ec..9ecaa1792d1 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php @@ -10,6 +10,7 @@ use Magento\Framework\Pricing\PriceCurrencyInterface; * Subtotal Total Row Renderer * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grandtotal extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals\DefaultTotals { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php index ac7c56845d3..fc26e1dbb60 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php @@ -10,6 +10,7 @@ use Magento\Framework\Pricing\PriceCurrencyInterface; * Subtotal Total Row Renderer * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Shipping extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals\DefaultTotals { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php index 6872e52489f..05cc201e0b4 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php @@ -10,6 +10,7 @@ use Magento\Framework\Pricing\PriceCurrencyInterface; * Subtotal Total Row Renderer * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Subtotal extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals\DefaultTotals { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php index 3dc17dd19db..93fd4866920 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php @@ -8,6 +8,7 @@ namespace Magento\Sales\Block\Adminhtml\Order\Create\Totals; * Tax Total Row Renderer * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Tax extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals\DefaultTotals { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Items.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Items.php index 196e28d5526..0625b06204f 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Items.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Items.php @@ -91,6 +91,7 @@ class Items extends \Magento\Sales\Block\Adminhtml\Items\AbstractItems * Get is submit button disabled or not * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDisableSubmitButton() { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View.php index 60799d03fb7..2db7a175216 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View.php @@ -53,6 +53,8 @@ class View extends \Magento\Backend\Block\Widget\Form\Container * Constructor * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _construct() { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Status/Edit/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Status/Edit/Form.php index 920fe13ee01..8a7b99cdc2b 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Status/Edit/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Status/Edit/Form.php @@ -6,6 +6,7 @@ namespace Magento\Sales\Block\Adminhtml\Order\Status\Edit; /** * Edit status form + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Form extends \Magento\Sales\Block\Adminhtml\Order\Status\NewStatus\Form { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View.php index 919c1cf898e..2980f4045d2 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View.php @@ -63,6 +63,9 @@ class View extends \Magento\Backend\Block\Widget\Form\Container * Constructor * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _construct() { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php index 0a1aab9df65..628947f9667 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php @@ -8,6 +8,7 @@ namespace Magento\Sales\Block\Adminhtml\Report\Filter; * Sales Adminhtml report filter form * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Form extends \Magento\Reports\Block\Adminhtml\Filter\Form { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Coupon.php b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Coupon.php index 3283faa517d..8752c911a65 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Coupon.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Coupon.php @@ -8,6 +8,7 @@ namespace Magento\Sales\Block\Adminhtml\Report\Filter\Form; * Sales Adminhtml report filter form for coupons report * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Coupon extends \Magento\Sales\Block\Adminhtml\Report\Filter\Form { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Order.php b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Order.php index 204927be18a..9675c7f5baf 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Order.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Order.php @@ -8,6 +8,7 @@ namespace Magento\Sales\Block\Adminhtml\Report\Filter\Form; * Sales Adminhtml report filter form order * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Order extends \Magento\Sales\Block\Adminhtml\Report\Filter\Form { @@ -15,6 +16,7 @@ class Order extends \Magento\Sales\Block\Adminhtml\Report\Filter\Form * Preparing form * * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _prepareForm() { diff --git a/app/code/Magento/Sales/Block/Adminhtml/System/Config/Form/Fieldset/Order/Statuses.php b/app/code/Magento/Sales/Block/Adminhtml/System/Config/Form/Fieldset/Order/Statuses.php index 248e3806fd6..1a2c47e57f7 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/System/Config/Form/Fieldset/Order/Statuses.php +++ b/app/code/Magento/Sales/Block/Adminhtml/System/Config/Form/Fieldset/Order/Statuses.php @@ -103,6 +103,7 @@ class Statuses extends \Magento\Backend\Block\System\Config\Form\Fieldset * @param string $id * @param string $status * @return string + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getFieldHtml($fieldset, $id, $status) { diff --git a/app/code/Magento/Sales/Block/Items/AbstractItems.php b/app/code/Magento/Sales/Block/Items/AbstractItems.php index ed4b0b0335f..b80cb099783 100644 --- a/app/code/Magento/Sales/Block/Items/AbstractItems.php +++ b/app/code/Magento/Sales/Block/Items/AbstractItems.php @@ -8,6 +8,7 @@ namespace Magento\Sales\Block\Items; * Abstract block for display sales (quote/order/invoice etc.) items * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class AbstractItems extends \Magento\Framework\View\Element\Template { @@ -22,6 +23,7 @@ class AbstractItems extends \Magento\Framework\View\Element\Template * @param string $type * @return \Magento\Framework\View\Element\AbstractBlock * @throws \RuntimeException + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getItemRenderer($type) { @@ -46,6 +48,7 @@ class AbstractItems extends \Magento\Framework\View\Element\Template * * @param \Magento\Framework\View\Element\AbstractBlock $renderer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _prepareItem(\Magento\Framework\View\Element\AbstractBlock $renderer) { diff --git a/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php b/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php index 9f3d707513d..af07fc6f6c1 100644 --- a/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php +++ b/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php @@ -122,6 +122,7 @@ class DefaultRenderer extends \Magento\Framework\View\Element\Template * ) * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getFormatedOptionValue($optionValue) { diff --git a/app/code/Magento/Sales/Block/Order/Totals.php b/app/code/Magento/Sales/Block/Order/Totals.php index 74fce3fc02d..899d24a3b74 100644 --- a/app/code/Magento/Sales/Block/Order/Totals.php +++ b/app/code/Magento/Sales/Block/Order/Totals.php @@ -284,6 +284,7 @@ class Totals extends \Magento\Framework\View\Element\Template * * @param array $order * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function applySortOrder($order) { diff --git a/app/code/Magento/Sales/Block/Status/Grid/Column/State.php b/app/code/Magento/Sales/Block/Status/Grid/Column/State.php index fa7c2bd773a..753a16943ab 100644 --- a/app/code/Magento/Sales/Block/Status/Grid/Column/State.php +++ b/app/code/Magento/Sales/Block/Status/Grid/Column/State.php @@ -44,6 +44,7 @@ class State extends \Magento\Backend\Block\Widget\Grid\Column * @param \Magento\Backend\Block\Widget\Grid\Column $column * @param bool $isExport * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function decorateState($value, $row, $column, $isExport) { diff --git a/app/code/Magento/Sales/Block/Status/Grid/Column/Unassign.php b/app/code/Magento/Sales/Block/Status/Grid/Column/Unassign.php index 9523ca2a159..386838f2b1c 100644 --- a/app/code/Magento/Sales/Block/Status/Grid/Column/Unassign.php +++ b/app/code/Magento/Sales/Block/Status/Grid/Column/Unassign.php @@ -24,6 +24,7 @@ class Unassign extends \Magento\Backend\Block\Widget\Grid\Column * @param \Magento\Backend\Block\Widget\Grid\Column $column * @param bool $isExport * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function decorateAction($value, $row, $column, $isExport) { diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/View.php b/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/View.php index 34520314202..97c8160aa6e 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/View.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/View.php @@ -19,6 +19,7 @@ class View extends \Magento\Backend\App\Action * Creditmemo information page * * @return void + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function execute() { diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order.php b/app/code/Magento/Sales/Controller/Adminhtml/Order.php index 3950384f3f1..7e671672b05 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order.php @@ -10,6 +10,7 @@ use Magento\Backend\App\Action; * Adminhtml sales orders controller * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Order extends \Magento\Backend\App\Action { @@ -100,6 +101,7 @@ class Order extends \Magento\Backend\App\Action * Acl check for admin * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _isAllowed() { diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php index 066511dee95..796afc99863 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php @@ -10,6 +10,7 @@ use Magento\Backend\App\Action; * Adminhtml sales orders creation process controller * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Create extends \Magento\Backend\App\Action { @@ -109,6 +110,9 @@ class Create extends \Magento\Backend\App\Action * * @param string $action * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _processActionData($action = null) { diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Save.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Save.php index b6cc613401d..cc3d139ff87 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Save.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Save.php @@ -12,6 +12,7 @@ class Save extends \Magento\Sales\Controller\Adminhtml\Order\Create * Saving quote and create order * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/Save.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/Save.php index fd22737d145..85f27c7cadf 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/Save.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/Save.php @@ -49,6 +49,8 @@ class Save extends \Magento\Backend\App\Action * We can save only new creditmemo. Existing creditmemos are not editable * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/CreditmemoLoader.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/CreditmemoLoader.php index c02c6e5e2c7..b16226188c2 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/CreditmemoLoader.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/CreditmemoLoader.php @@ -78,6 +78,7 @@ class CreditmemoLoader extends Object * @param \Magento\Framework\Registry $registry * @param \Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Sales\Model\Order\CreditmemoFactory $creditmemoFactory, @@ -172,6 +173,7 @@ class CreditmemoLoader extends Object * Initialize creditmemo model instance * * @return \Magento\Sales\Model\Order\Creditmemo|false + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function load() { diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/Save.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/Save.php index 24eaeae7280..7427292469f 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/Save.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/Save.php @@ -94,6 +94,9 @@ class Save extends \Magento\Backend\App\Action * We can save only new invoice. Existing invoices are not editable * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function execute() { diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfdocs.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfdocs.php index 53ab83fb989..0cccb681599 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfdocs.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfdocs.php @@ -14,6 +14,7 @@ class Pdfdocs extends \Magento\Sales\Controller\Adminhtml\Order * Print all documents for selected orders * * @return ResponseInterface|void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/View.php b/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/View.php index 5c8d4c4a4f4..d9d86803d23 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/View.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/View.php @@ -19,6 +19,7 @@ abstract class View extends \Magento\Backend\App\Action * Shipment information page * * @return void + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function execute() { diff --git a/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php b/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php index fd64c11bf68..522111cdbf1 100644 --- a/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php +++ b/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php @@ -13,6 +13,8 @@ class DownloadCustomOption extends \Magento\Framework\App\Action\Action * Custom options download action * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExitExpression) */ public function execute() { diff --git a/app/code/Magento/Sales/Controller/Order/Plugin/Authentication.php b/app/code/Magento/Sales/Controller/Order/Plugin/Authentication.php index 4e80b486296..e05f19c9a1e 100644 --- a/app/code/Magento/Sales/Controller/Order/Plugin/Authentication.php +++ b/app/code/Magento/Sales/Controller/Order/Plugin/Authentication.php @@ -37,6 +37,7 @@ class Authentication * @param \Magento\Framework\App\ActionInterface $subject * @param RequestInterface $request * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeDispatch(\Magento\Framework\App\ActionInterface $subject, RequestInterface $request) { diff --git a/app/code/Magento/Sales/Helper/Guest.php b/app/code/Magento/Sales/Helper/Guest.php index fc2383e5fad..6c943563dee 100644 --- a/app/code/Magento/Sales/Helper/Guest.php +++ b/app/code/Magento/Sales/Helper/Guest.php @@ -9,6 +9,7 @@ use Magento\Framework\App as App; /** * Sales module base helper + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Guest extends \Magento\Core\Helper\Data { diff --git a/app/code/Magento/Sales/Model/AdminOrder/Create.php b/app/code/Magento/Sales/Model/AdminOrder/Create.php index 5d06152dd0b..68ef0a37779 100644 --- a/app/code/Magento/Sales/Model/AdminOrder/Create.php +++ b/app/code/Magento/Sales/Model/AdminOrder/Create.php @@ -10,6 +10,9 @@ use Magento\Sales\Model\Quote\Item; /** * Order create model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Model\Cart\CartInterface { @@ -219,6 +222,7 @@ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Mode * @param \Magento\Customer\Api\Data\CustomerDataBuilder $customerBuilder * @param \Magento\Customer\Model\Customer\Mapper $customerMapper * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\ObjectManagerInterface $objectManager, @@ -289,6 +293,7 @@ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Mode * Return is validate data in import flag * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsValidate() { @@ -423,6 +428,8 @@ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Mode * @param \Magento\Sales\Model\Order $order * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function initFromOrder(\Magento\Sales\Model\Order $order) { @@ -704,6 +711,8 @@ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Mode * @param int $qty * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function moveQuoteItem($item, $moveTo, $qty) { @@ -829,6 +838,9 @@ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Mode * @param array $data * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function applySidebarData($data) { @@ -1542,6 +1554,8 @@ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Mode * * @param array $data * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function importPostData($data) { @@ -1642,6 +1656,7 @@ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Mode * Set customer data to quote. * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function _prepareCustomer() { @@ -1704,6 +1719,7 @@ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Mode * @param \Magento\Sales\Model\Quote\Address $quoteCustomerAddress * @return void * @throws \InvalidArgumentException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareCustomerAddress($customer, $quoteCustomerAddress) { @@ -1832,6 +1848,8 @@ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Mode * * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _validate() { diff --git a/app/code/Magento/Sales/Model/Config/Converter.php b/app/code/Magento/Sales/Model/Config/Converter.php index 508b547132e..de95aae5e20 100644 --- a/app/code/Magento/Sales/Model/Config/Converter.php +++ b/app/code/Magento/Sales/Model/Config/Converter.php @@ -16,6 +16,7 @@ class Converter implements \Magento\Framework\Config\ConverterInterface * @param mixed $source * @return array * @throws \InvalidArgumentException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function convert($source) { diff --git a/app/code/Magento/Sales/Model/Convert/Order.php b/app/code/Magento/Sales/Model/Convert/Order.php index 4bb740e237f..c01140469d7 100644 --- a/app/code/Magento/Sales/Model/Convert/Order.php +++ b/app/code/Magento/Sales/Model/Convert/Order.php @@ -8,6 +8,9 @@ */ namespace Magento\Sales\Model\Convert; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Order extends \Magento\Framework\Object { /** diff --git a/app/code/Magento/Sales/Model/Convert/Quote.php b/app/code/Magento/Sales/Model/Convert/Quote.php index bbcafd4b0ad..fb0dd4bf4f8 100644 --- a/app/code/Magento/Sales/Model/Convert/Quote.php +++ b/app/code/Magento/Sales/Model/Convert/Quote.php @@ -7,6 +7,7 @@ namespace Magento\Sales\Model\Convert; /** * Quote data convert model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Quote extends \Magento\Framework\Object { diff --git a/app/code/Magento/Sales/Model/Order.php b/app/code/Magento/Sales/Model/Order.php index 89e8ca8befb..8bf2be5642d 100644 --- a/app/code/Magento/Sales/Model/Order.php +++ b/app/code/Magento/Sales/Model/Order.php @@ -175,6 +175,10 @@ use Magento\Sales\Model\Resource\Order\Status\History\Collection as HistoryColle * @method bool hasForcedCanCreditmemo() * @method bool getIsInProcess() * @method \Magento\Customer\Model\Customer getCustomer() + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Order extends AbstractModel implements EntityInterface, ApiOrderInterface { @@ -411,6 +415,7 @@ class Order extends AbstractModel implements EntityInterface, ApiOrderInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -529,6 +534,7 @@ class Order extends AbstractModel implements EntityInterface, ApiOrderInterface * Return flag for order if it can sends new email to customer. * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCanSendNewEmailFlag() { @@ -589,6 +595,8 @@ class Order extends AbstractModel implements EntityInterface, ApiOrderInterface * Retrieve order cancel availability * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function canCancel() { @@ -648,6 +656,7 @@ class Order extends AbstractModel implements EntityInterface, ApiOrderInterface * Retrieve order invoice availability * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function canInvoice() { @@ -758,6 +767,7 @@ class Order extends AbstractModel implements EntityInterface, ApiOrderInterface * Retrieve order shipment availability * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function canShip() { @@ -837,6 +847,7 @@ class Order extends AbstractModel implements EntityInterface, ApiOrderInterface * * @param bool $ignoreSalable * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _canReorder($ignoreSalable = false) { @@ -1999,6 +2010,7 @@ class Order extends AbstractModel implements EntityInterface, ApiOrderInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsNotVirtual() { diff --git a/app/code/Magento/Sales/Model/Order/Address.php b/app/code/Magento/Sales/Model/Order/Address.php index f80ebcbba88..6a0f950a75b 100644 --- a/app/code/Magento/Sales/Model/Order/Address.php +++ b/app/code/Magento/Sales/Model/Order/Address.php @@ -37,6 +37,7 @@ use Magento\Sales\Api\Data\OrderAddressInterface; * @method Address setMiddlename(string $value) * @method Address setSuffix(string $value) * @method Address setCompany(string $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Address extends AbstractAddress implements OrderAddressInterface { @@ -77,6 +78,7 @@ class Address extends AbstractAddress implements OrderAddressInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Sales/Model/Order/Builder.php b/app/code/Magento/Sales/Model/Order/Builder.php index e55fd4d8546..2c9b197b005 100644 --- a/app/code/Magento/Sales/Model/Order/Builder.php +++ b/app/code/Magento/Sales/Model/Order/Builder.php @@ -7,6 +7,9 @@ namespace Magento\Sales\Model\Order; use Magento\Sales\Model\OrderFactory; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + */ class Builder { /** diff --git a/app/code/Magento/Sales/Model/Order/Creditmemo.php b/app/code/Magento/Sales/Model/Order/Creditmemo.php index b8ef9173022..7002d8eb093 100644 --- a/app/code/Magento/Sales/Model/Order/Creditmemo.php +++ b/app/code/Magento/Sales/Model/Order/Creditmemo.php @@ -59,6 +59,9 @@ use Magento\Sales\Model\EntityInterface; * @method \Magento\Sales\Model\Order\Creditmemo setBaseShippingHiddenTaxAmnt(float $value) * @method \Magento\Sales\Model\Order\Creditmemo setShippingInclTax(float $value) * @method \Magento\Sales\Model\Order\Creditmemo setBaseShippingInclTax(float $value) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Creditmemo extends AbstractModel implements EntityInterface, CreditmemoInterface { @@ -164,6 +167,7 @@ class Creditmemo extends AbstractModel implements EntityInterface, CreditmemoInt * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -753,6 +757,7 @@ class Creditmemo extends AbstractModel implements EntityInterface, CreditmemoInt /** * @param bool $reload * @return \Magento\Sales\Model\Resource\Order\Creditmemo\Comment\Collection + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getCommentsCollection($reload = false) { diff --git a/app/code/Magento/Sales/Model/Order/Creditmemo/Comment.php b/app/code/Magento/Sales/Model/Order/Creditmemo/Comment.php index 1aa934f6a25..6b55dc531e7 100644 --- a/app/code/Magento/Sales/Model/Order/Creditmemo/Comment.php +++ b/app/code/Magento/Sales/Model/Order/Creditmemo/Comment.php @@ -42,6 +42,7 @@ class Comment extends AbstractModel implements CreditmemoCommentInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Sales/Model/Order/Creditmemo/Total/AbstractTotal.php b/app/code/Magento/Sales/Model/Order/Creditmemo/Total/AbstractTotal.php index 65268ee7bb3..3d979262d9d 100644 --- a/app/code/Magento/Sales/Model/Order/Creditmemo/Total/AbstractTotal.php +++ b/app/code/Magento/Sales/Model/Order/Creditmemo/Total/AbstractTotal.php @@ -16,6 +16,7 @@ abstract class AbstractTotal extends \Magento\Sales\Model\Order\Total\AbstractTo * * @param \Magento\Sales\Model\Order\Creditmemo $creditmemo * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function collect(\Magento\Sales\Model\Order\Creditmemo $creditmemo) { diff --git a/app/code/Magento/Sales/Model/Order/Customer.php b/app/code/Magento/Sales/Model/Order/Customer.php index 98ac4ac55f5..59ab8afdf86 100644 --- a/app/code/Magento/Sales/Model/Order/Customer.php +++ b/app/code/Magento/Sales/Model/Order/Customer.php @@ -92,6 +92,7 @@ class Customer * @param string $customerPrefix * @param string $customerSuffix * @param string $customerTaxvat + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( $customerDob, diff --git a/app/code/Magento/Sales/Model/Order/Invoice.php b/app/code/Magento/Sales/Model/Order/Invoice.php index 602fbe33aef..702974c1f1f 100644 --- a/app/code/Magento/Sales/Model/Order/Invoice.php +++ b/app/code/Magento/Sales/Model/Order/Invoice.php @@ -51,6 +51,9 @@ use Magento\Sales\Model\EntityInterface; * @method \Magento\Sales\Model\Order\Invoice setBaseShippingHiddenTaxAmnt(float $value) * @method \Magento\Sales\Model\Order\Invoice setShippingInclTax(float $value) * @method \Magento\Sales\Model\Order\Invoice setBaseShippingInclTax(float $value) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Invoice extends AbstractModel implements EntityInterface, InvoiceInterface { @@ -165,6 +168,7 @@ class Invoice extends AbstractModel implements EntityInterface, InvoiceInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -616,6 +620,7 @@ class Invoice extends AbstractModel implements EntityInterface, InvoiceInterface * * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function register() { diff --git a/app/code/Magento/Sales/Model/Order/Invoice/Comment.php b/app/code/Magento/Sales/Model/Order/Invoice/Comment.php index 45eec7d8064..a3160cffc40 100644 --- a/app/code/Magento/Sales/Model/Order/Invoice/Comment.php +++ b/app/code/Magento/Sales/Model/Order/Invoice/Comment.php @@ -42,6 +42,7 @@ class Comment extends AbstractModel implements InvoiceCommentInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Sales/Model/Order/Invoice/Total/AbstractTotal.php b/app/code/Magento/Sales/Model/Order/Invoice/Total/AbstractTotal.php index bfeabbc4b83..895cf21d12e 100644 --- a/app/code/Magento/Sales/Model/Order/Invoice/Total/AbstractTotal.php +++ b/app/code/Magento/Sales/Model/Order/Invoice/Total/AbstractTotal.php @@ -16,6 +16,7 @@ abstract class AbstractTotal extends \Magento\Sales\Model\Order\Total\AbstractTo * * @param \Magento\Sales\Model\Order\Invoice $invoice * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function collect(\Magento\Sales\Model\Order\Invoice $invoice) { diff --git a/app/code/Magento/Sales/Model/Order/Invoice/Total/Tax.php b/app/code/Magento/Sales/Model/Order/Invoice/Total/Tax.php index c71bdbf4edf..982f6bf0205 100644 --- a/app/code/Magento/Sales/Model/Order/Invoice/Total/Tax.php +++ b/app/code/Magento/Sales/Model/Order/Invoice/Total/Tax.php @@ -11,6 +11,7 @@ class Tax extends AbstractTotal * * @param \Magento\Sales\Model\Order\Invoice $invoice * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function collect(\Magento\Sales\Model\Order\Invoice $invoice) { diff --git a/app/code/Magento/Sales/Model/Order/Item.php b/app/code/Magento/Sales/Model/Order/Item.php index dd313aff3ea..67631c93bee 100644 --- a/app/code/Magento/Sales/Model/Order/Item.php +++ b/app/code/Magento/Sales/Model/Order/Item.php @@ -94,6 +94,9 @@ use Magento\Sales\Api\Data\OrderItemInterface; * @method \Magento\Sales\Model\Order\Item setBaseTaxRefunded(float $value) * @method \Magento\Sales\Model\Order\Item setDiscountRefunded(float $value) * @method \Magento\Sales\Model\Order\Item setBaseDiscountRefunded(float $value) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Item extends AbstractExtensibleModel implements OrderItemInterface { @@ -186,6 +189,7 @@ class Item extends AbstractExtensibleModel implements OrderItemInterface * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -376,6 +380,8 @@ class Item extends AbstractExtensibleModel implements OrderItemInterface * Retrieve item status identifier * * @return int + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getStatusId() { @@ -630,6 +636,7 @@ class Item extends AbstractExtensibleModel implements OrderItemInterface * Check if discount has to be applied to parent item * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getForceApplyDiscountToParentItem() { @@ -673,6 +680,7 @@ class Item extends AbstractExtensibleModel implements OrderItemInterface * * @param bool $shipment * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isDummy($shipment = false) { diff --git a/app/code/Magento/Sales/Model/Order/Payment.php b/app/code/Magento/Sales/Model/Order/Payment.php index d4ed96c547c..43f6ef48533 100644 --- a/app/code/Magento/Sales/Model/Order/Payment.php +++ b/app/code/Magento/Sales/Model/Order/Payment.php @@ -66,6 +66,9 @@ use Magento\Sales\Api\Data\OrderPaymentInterface; * @method \Magento\Sales\Model\Order\Payment setCcNumberEnc(string $value) * @method \Magento\Sales\Model\Order\Payment setCcTransId(string $value) * @method \Magento\Sales\Model\Order\Payment setAddressStatus(string $value) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Payment extends Info implements OrderPaymentInterface { @@ -158,6 +161,7 @@ class Payment extends Info implements OrderPaymentInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -278,6 +282,7 @@ class Payment extends Info implements OrderPaymentInterface * This method is supposed to be called only when order is placed * * @return $this + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function place() { @@ -695,6 +700,8 @@ class Payment extends Info implements OrderPaymentInterface * @return $this * @throws \Exception * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function refund($creditmemo) { @@ -790,6 +797,7 @@ class Payment extends Info implements OrderPaymentInterface * * @param float $amount * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function registerRefundNotification($amount) { @@ -978,6 +986,8 @@ class Payment extends Info implements OrderPaymentInterface * @param bool $isOnline * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function registerPaymentReviewAction($action, $isOnline) { @@ -1209,6 +1219,8 @@ class Payment extends Info implements OrderPaymentInterface * @param float $amount * @param string $gatewayCallback * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _void($isOnline, $amount = null, $gatewayCallback = 'void') { @@ -1283,6 +1295,8 @@ class Payment extends Info implements OrderPaymentInterface * @param \Magento\Sales\Model\AbstractModel $salesDocument * @param bool $failsafe * @return null|\Magento\Sales\Model\Order\Payment\Transaction + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _addTransaction($type, $salesDocument = null, $failsafe = false) { diff --git a/app/code/Magento/Sales/Model/Order/Payment/Transaction.php b/app/code/Magento/Sales/Model/Order/Payment/Transaction.php index 69b6619a720..9114cf39237 100644 --- a/app/code/Magento/Sales/Model/Order/Payment/Transaction.php +++ b/app/code/Magento/Sales/Model/Order/Payment/Transaction.php @@ -22,6 +22,8 @@ use Magento\Sales\Api\Data\TransactionInterface; * @method \Magento\Sales\Model\Order\Payment\Transaction setCreatedAt(string $value) * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Transaction extends AbstractExtensibleModel implements TransactionInterface { @@ -160,6 +162,7 @@ class Transaction extends AbstractExtensibleModel implements TransactionInterfac * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -299,6 +302,8 @@ class Transaction extends AbstractExtensibleModel implements TransactionInterfac * @param string $txnId * @param bool $recursive * @return Transaction[] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getChildTransactions($types = null, $txnId = null, $recursive = false) { @@ -567,6 +572,7 @@ class Transaction extends AbstractExtensibleModel implements TransactionInterfac * @return $this * @throws \Magento\Framework\Model\Exception * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function close($shouldSave = true) { @@ -726,6 +732,8 @@ class Transaction extends AbstractExtensibleModel implements TransactionInterfac * * @return void * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _loadChildren() { diff --git a/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php b/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php index 22bd3b898d6..e053da1df33 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php @@ -8,6 +8,8 @@ use Magento\Framework\App\Filesystem\DirectoryList; /** * Sales Order PDF abstract model + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractPdf extends \Magento\Framework\Object { @@ -218,6 +220,7 @@ abstract class AbstractPdf extends \Magento\Framework\Object * @param \Zend_Pdf_Page &$page * @param null $store * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function insertLogo(&$page, $store = null) { @@ -329,6 +332,7 @@ abstract class AbstractPdf extends \Magento\Framework\Object * * @param array $address * @return int Height + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _calcAddressHeight($address) { @@ -354,6 +358,9 @@ abstract class AbstractPdf extends \Magento\Framework\Object * @param \Magento\Sales\Model\Order $obj * @param bool $putOrderId * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function insertOrder(&$page, $obj, $putOrderId = true) { @@ -929,6 +936,9 @@ abstract class AbstractPdf extends \Magento\Framework\Object * @param array $pageSettings * @throws \Magento\Framework\Model\Exception * @return \Zend_Pdf_Page + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function drawLineBlocks(\Zend_Pdf_Page $page, array $draw, array $pageSettings = []) { diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php b/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php index b163fd2bf8d..5fba85dd8cc 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php @@ -6,6 +6,7 @@ namespace Magento\Sales\Model\Order\Pdf; /** * Sales Order Creditmemo PDF model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Creditmemo extends AbstractPdf { diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php b/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php index 5d7d121479b..140e72fefdd 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php @@ -6,6 +6,7 @@ namespace Magento\Sales\Model\Order\Pdf; /** * Sales Order Invoice PDF model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Invoice extends AbstractPdf { diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Items/AbstractItems.php b/app/code/Magento/Sales/Model/Order/Pdf/Items/AbstractItems.php index 4be5f572e09..485f546299e 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Items/AbstractItems.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Items/AbstractItems.php @@ -8,6 +8,7 @@ use Magento\Framework\App\Filesystem\DirectoryList; /** * Sales Order Pdf Items renderer Abstract + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractItems extends \Magento\Framework\Model\AbstractModel { diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php b/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php index a46d46bf3df..e1760165d88 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php @@ -6,6 +6,7 @@ namespace Magento\Sales\Model\Order\Pdf; /** * Sales Order Shipment PDF model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Shipment extends AbstractPdf { diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php b/app/code/Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php index 7db973093c2..6676f2cce6b 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php @@ -88,6 +88,7 @@ class DefaultTotal extends \Magento\Framework\Object * ) * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getFullTaxInfo() { diff --git a/app/code/Magento/Sales/Model/Order/Shipment.php b/app/code/Magento/Sales/Model/Order/Shipment.php index 32d4a78faf2..fdfaa79075e 100644 --- a/app/code/Magento/Sales/Model/Order/Shipment.php +++ b/app/code/Magento/Sales/Model/Order/Shipment.php @@ -26,6 +26,7 @@ use Magento\Sales\Model\EntityInterface; * @method \Magento\Sales\Model\Order\Shipment setIncrementId(string $value) * @method \Magento\Sales\Model\Order\Shipment setCreatedAt(string $value) * @method \Magento\Sales\Model\Order\Shipment setUpdatedAt(string $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Shipment extends AbstractModel implements EntityInterface, ShipmentInterface { @@ -112,6 +113,7 @@ class Shipment extends AbstractModel implements EntityInterface, ShipmentInterfa * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Sales/Model/Order/Shipment/Comment.php b/app/code/Magento/Sales/Model/Order/Shipment/Comment.php index 15ea5cc47c2..986639559e4 100644 --- a/app/code/Magento/Sales/Model/Order/Shipment/Comment.php +++ b/app/code/Magento/Sales/Model/Order/Shipment/Comment.php @@ -42,6 +42,7 @@ class Comment extends AbstractModel implements ShipmentCommentInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Sales/Model/Order/Shipment/Track.php b/app/code/Magento/Sales/Model/Order/Shipment/Track.php index 699824bb0d3..b0411cc1c13 100644 --- a/app/code/Magento/Sales/Model/Order/Shipment/Track.php +++ b/app/code/Magento/Sales/Model/Order/Shipment/Track.php @@ -67,6 +67,7 @@ class Track extends AbstractModel implements ShipmentTrackInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Sales/Model/Order/Status/History.php b/app/code/Magento/Sales/Model/Order/Status/History.php index 0312b69baf2..eba332daa20 100644 --- a/app/code/Magento/Sales/Model/Order/Status/History.php +++ b/app/code/Magento/Sales/Model/Order/Status/History.php @@ -56,6 +56,7 @@ class History extends AbstractModel implements OrderStatusHistoryInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Sales/Model/Quote.php b/app/code/Magento/Sales/Model/Quote.php index 2a3013319bd..7d88bdcc0e4 100644 --- a/app/code/Magento/Sales/Model/Quote.php +++ b/app/code/Magento/Sales/Model/Quote.php @@ -115,6 +115,10 @@ use Magento\Sales\Model\Quote\Address; * @method Quote setIsPersistent(bool $value) * @method Quote setSharedStoreIds(array $values) * @method Quote setWebsite($value) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Quote extends \Magento\Framework\Model\AbstractModel { @@ -356,6 +360,7 @@ class Quote extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -1054,6 +1059,7 @@ class Quote extends \Magento\Framework\Model\AbstractModel * * @param bool $useCache * @return \Magento\Eav\Model\Entity\Collection\AbstractCollection + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getItemsCollection($useCache = true) { @@ -1276,6 +1282,8 @@ class Quote extends \Magento\Framework\Model\AbstractModel * @param null|string $processMode * @return \Magento\Sales\Model\Quote\Item|string * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function addProduct( \Magento\Catalog\Model\Product $product, @@ -1363,6 +1371,7 @@ class Quote extends \Magento\Framework\Model\AbstractModel * @param \Magento\Catalog\Model\Product $product * @param int $qty * @return \Magento\Sales\Model\Quote\Item + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _addCatalogProduct(\Magento\Catalog\Model\Product $product, $qty = 1) { @@ -1417,6 +1426,7 @@ class Quote extends \Magento\Framework\Model\AbstractModel * @throws \Magento\Framework\Model\Exception * * @see \Magento\Catalog\Helper\Product::addParamsToBuyRequest() + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function updateItem($itemId, $buyRequest, $params = null) { @@ -1593,6 +1603,7 @@ class Quote extends \Magento\Framework\Model\AbstractModel /** * @param string $paymentId * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getPaymentById($paymentId) { @@ -1925,6 +1936,7 @@ class Quote extends \Magento\Framework\Model\AbstractModel * @param string $type An internal error type ('error', 'qty', etc.), passed then to adding messages routine * @param array $params * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function removeErrorInfosByParams($type, $params) { @@ -2015,6 +2027,8 @@ class Quote extends \Magento\Framework\Model\AbstractModel /** * @param bool $multishipping * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validateMinimumAmount($multishipping = false) { @@ -2106,6 +2120,7 @@ class Quote extends \Magento\Framework\Model\AbstractModel * Check quote for virtual product only * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsVirtual() { diff --git a/app/code/Magento/Sales/Model/Quote/Address.php b/app/code/Magento/Sales/Model/Quote/Address.php index a362afd5ea1..25eab112fdb 100644 --- a/app/code/Magento/Sales/Model/Quote/Address.php +++ b/app/code/Magento/Sales/Model/Quote/Address.php @@ -111,6 +111,10 @@ use Magento\Framework\Api\AttributeDataBuilder; * @method \Magento\SalesRule\Model\Rule[] getCartFixedRules() * @method int[] getAppliedRuleIds() * @method Address setBaseShippingInclTax(float $value) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Address extends \Magento\Customer\Model\Address\AbstractAddress { @@ -269,6 +273,7 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -567,6 +572,8 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress * Get all available address items * * @return \Magento\Sales\Model\Quote\Address\Item[] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getAllItems() { @@ -1026,6 +1033,8 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress * * @param \Magento\Sales\Model\Quote\Item\AbstractItem $item * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function requestShippingRates(\Magento\Sales\Model\Quote\Item\AbstractItem $item = null) { @@ -1253,6 +1262,7 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress * @param float $value * @param bool $alreadyExclTax * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setShippingAmount($value, $alreadyExclTax = false) { @@ -1265,6 +1275,7 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress * @param float $value * @param bool $alreadyExclTax * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setBaseShippingAmount($value, $alreadyExclTax = false) { diff --git a/app/code/Magento/Sales/Model/Quote/Address/Total/AbstractTotal.php b/app/code/Magento/Sales/Model/Quote/Address/Total/AbstractTotal.php index c17e6a94303..f757b8544c0 100644 --- a/app/code/Magento/Sales/Model/Quote/Address/Total/AbstractTotal.php +++ b/app/code/Magento/Sales/Model/Quote/Address/Total/AbstractTotal.php @@ -6,6 +6,7 @@ namespace Magento\Sales\Model\Quote\Address\Total; /** * Sales Quote Address Total abstract model + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractTotal { @@ -230,6 +231,7 @@ abstract class AbstractTotal * * @param \Magento\Sales\Model\Quote\Item\AbstractItem $item * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsItemRowTotalCompoundable(\Magento\Sales\Model\Quote\Item\AbstractItem $item) { @@ -246,6 +248,7 @@ abstract class AbstractTotal * @param array $config * @param store $store * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function processConfigArray($config, $store) { diff --git a/app/code/Magento/Sales/Model/Quote/Address/Total/Collector.php b/app/code/Magento/Sales/Model/Quote/Address/Total/Collector.php index 9c711850919..95a40c1bea9 100644 --- a/app/code/Magento/Sales/Model/Quote/Address/Total/Collector.php +++ b/app/code/Magento/Sales/Model/Quote/Address/Total/Collector.php @@ -137,6 +137,7 @@ class Collector extends \Magento\Sales\Model\Config\Ordered * Initialize retrievers array * * @return $this + * @SuppressWarnings(PHPMD.UnusedPrivateMethod) */ private function _initRetrievers() { diff --git a/app/code/Magento/Sales/Model/Quote/Address/Total/Discount.php b/app/code/Magento/Sales/Model/Quote/Address/Total/Discount.php index b0344cd6c77..686eb5f9efc 100644 --- a/app/code/Magento/Sales/Model/Quote/Address/Total/Discount.php +++ b/app/code/Magento/Sales/Model/Quote/Address/Total/Discount.php @@ -33,6 +33,7 @@ class Discount extends \Magento\Sales\Model\Quote\Address\Total\AbstractTotal /** * @param \Magento\Sales\Model\Quote\Address $address * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function collect(\Magento\Sales\Model\Quote\Address $address) { diff --git a/app/code/Magento/Sales/Model/Quote/Address/Total/Shipping.php b/app/code/Magento/Sales/Model/Quote/Address/Total/Shipping.php index 7ab5938b64b..16d41cbdb78 100644 --- a/app/code/Magento/Sales/Model/Quote/Address/Total/Shipping.php +++ b/app/code/Magento/Sales/Model/Quote/Address/Total/Shipping.php @@ -28,6 +28,9 @@ class Shipping extends \Magento\Sales\Model\Quote\Address\Total\AbstractTotal * * @param \Magento\Sales\Model\Quote\Address $address * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function collect(\Magento\Sales\Model\Quote\Address $address) { diff --git a/app/code/Magento/Sales/Model/Quote/Address/Total/Tax.php b/app/code/Magento/Sales/Model/Quote/Address/Total/Tax.php index 2262d64a717..06057f8a47f 100644 --- a/app/code/Magento/Sales/Model/Quote/Address/Total/Tax.php +++ b/app/code/Magento/Sales/Model/Quote/Address/Total/Tax.php @@ -59,6 +59,9 @@ class Tax extends \Magento\Sales\Model\Quote\Address\Total\AbstractTotal /** * @param \Magento\Sales\Model\Quote\Address $address * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function collect(\Magento\Sales\Model\Quote\Address $address) { diff --git a/app/code/Magento/Sales/Model/Quote/Item.php b/app/code/Magento/Sales/Model/Quote/Item.php index 445859a2ea9..6c22d70b3b7 100644 --- a/app/code/Magento/Sales/Model/Quote/Item.php +++ b/app/code/Magento/Sales/Model/Quote/Item.php @@ -96,6 +96,7 @@ namespace Magento\Sales\Model\Quote; * @method null|bool getHasConfigurationUnavailableError() * @method \Magento\Sales\Model\Quote\Item setHasConfigurationUnavailableError(bool $value) * @method \Magento\Sales\Model\Quote\Item unsHasConfigurationUnavailableError() + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Item extends \Magento\Sales\Model\Quote\Item\AbstractItem { diff --git a/app/code/Magento/Sales/Model/Quote/Item/AbstractItem.php b/app/code/Magento/Sales/Model/Quote/Item/AbstractItem.php index 796cbcda8ab..5c53c317ebb 100644 --- a/app/code/Magento/Sales/Model/Quote/Item/AbstractItem.php +++ b/app/code/Magento/Sales/Model/Quote/Item/AbstractItem.php @@ -41,6 +41,7 @@ use Magento\Sales\Model\Quote\Item; * @method float getDiscountTaxCompensation() * @method float getRowTotal() * @method float getPriceInclTax() + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractItem extends \Magento\Framework\Model\AbstractModel implements \Magento\Catalog\Model\Product\Configuration\Item\ItemInterface diff --git a/app/code/Magento/Sales/Model/Quote/Item/Updater.php b/app/code/Magento/Sales/Model/Quote/Item/Updater.php index ee5c771aa54..de60231ef9a 100644 --- a/app/code/Magento/Sales/Model/Quote/Item/Updater.php +++ b/app/code/Magento/Sales/Model/Quote/Item/Updater.php @@ -54,6 +54,7 @@ class Updater * @param array $info * @throws InvalidArgumentException * @return Updater + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function update(Item $item, array $info) { diff --git a/app/code/Magento/Sales/Model/Quote/Payment.php b/app/code/Magento/Sales/Model/Quote/Payment.php index 57c2ad97e9c..b72731e717c 100644 --- a/app/code/Magento/Sales/Model/Quote/Payment.php +++ b/app/code/Magento/Sales/Model/Quote/Payment.php @@ -77,6 +77,7 @@ class Payment extends \Magento\Payment\Model\Info * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Sales/Model/QuoteRepository/Plugin/Authorization.php b/app/code/Magento/Sales/Model/QuoteRepository/Plugin/Authorization.php index 9c45c72110c..9213020f192 100644 --- a/app/code/Magento/Sales/Model/QuoteRepository/Plugin/Authorization.php +++ b/app/code/Magento/Sales/Model/QuoteRepository/Plugin/Authorization.php @@ -31,6 +31,7 @@ class Authorization * @param \Magento\Sales\Model\Quote $quote * @return \Magento\Sales\Model\Quote * @throws \Magento\Framework\Exception\NoSuchEntityException + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterGetActive( \Magento\Sales\Model\QuoteRepository $subject, @@ -49,6 +50,7 @@ class Authorization * @param \Magento\Sales\Model\Quote $quote * @return \Magento\Sales\Model\Quote * @throws \Magento\Framework\Exception\NoSuchEntityException + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterGetActiveForCustomer( \Magento\Sales\Model\QuoteRepository $subject, diff --git a/app/code/Magento/Sales/Model/Resource/Collection/AbstractCollection.php b/app/code/Magento/Sales/Model/Resource/Collection/AbstractCollection.php index aceafd15169..a67c9ab96ed 100644 --- a/app/code/Magento/Sales/Model/Resource/Collection/AbstractCollection.php +++ b/app/code/Magento/Sales/Model/Resource/Collection/AbstractCollection.php @@ -162,6 +162,7 @@ abstract class AbstractCollection extends \Magento\Framework\Model\Resource\Db\C * @return $this * * @todo implement join functionality if necessary + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function joinAttribute($alias, $attribute, $bind, $filter = null, $joinType = 'inner', $storeId = null) { diff --git a/app/code/Magento/Sales/Model/Resource/Entity.php b/app/code/Magento/Sales/Model/Resource/Entity.php index 9331aff68ad..4d3169b510f 100644 --- a/app/code/Magento/Sales/Model/Resource/Entity.php +++ b/app/code/Magento/Sales/Model/Resource/Entity.php @@ -9,6 +9,7 @@ use Magento\Sales\Model\EntityInterface; /** * Flat sales resource abstract + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class Entity extends AbstractDb { diff --git a/app/code/Magento/Sales/Model/Resource/Order/Grid/Collection.php b/app/code/Magento/Sales/Model/Resource/Order/Grid/Collection.php index 4a3510491ba..4b5cda3e941 100644 --- a/app/code/Magento/Sales/Model/Resource/Order/Grid/Collection.php +++ b/app/code/Magento/Sales/Model/Resource/Order/Grid/Collection.php @@ -85,6 +85,7 @@ class Collection extends \Magento\Sales\Model\Resource\Order\Collection * Get customer mode flag value * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsCustomerMode() { diff --git a/app/code/Magento/Sales/Model/Resource/Order/Handler/State.php b/app/code/Magento/Sales/Model/Resource/Order/Handler/State.php index f07182ad71f..18af86baf22 100644 --- a/app/code/Magento/Sales/Model/Resource/Order/Handler/State.php +++ b/app/code/Magento/Sales/Model/Resource/Order/Handler/State.php @@ -17,6 +17,8 @@ class State * * @param Order $order * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function check(Order $order) { diff --git a/app/code/Magento/Sales/Model/Resource/Order/Plugin/Authorization.php b/app/code/Magento/Sales/Model/Resource/Order/Plugin/Authorization.php index 25c18db0b6e..6d46afa6f5d 100644 --- a/app/code/Magento/Sales/Model/Resource/Order/Plugin/Authorization.php +++ b/app/code/Magento/Sales/Model/Resource/Order/Plugin/Authorization.php @@ -34,6 +34,7 @@ class Authorization * @param null|string $field * @return \Magento\Sales\Model\Order * @throws NoSuchEntityException + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundLoad( \Magento\Sales\Model\Resource\Order $subject, diff --git a/app/code/Magento/Sales/Model/Resource/Order/Status.php b/app/code/Magento/Sales/Model/Resource/Order/Status.php index df6258b3683..53dd2771743 100644 --- a/app/code/Magento/Sales/Model/Resource/Order/Status.php +++ b/app/code/Magento/Sales/Model/Resource/Order/Status.php @@ -265,6 +265,7 @@ class Status extends \Magento\Framework\Model\Resource\Db\AbstractDb * * @param string $state * @return string + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function getStatusByState($state) { diff --git a/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Backend.php b/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Backend.php index a24dbbdbaa1..8abb8ada5cb 100644 --- a/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Backend.php +++ b/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Backend.php @@ -16,6 +16,7 @@ class Backend extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBacken * * @param \Magento\Sales\Model\Quote\Address $address * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function collectTotals(\Magento\Sales\Model\Quote\Address $address) { diff --git a/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Frontend.php b/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Frontend.php index 4d39f012265..30ea33b29d1 100644 --- a/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Frontend.php +++ b/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Frontend.php @@ -16,6 +16,7 @@ class Frontend extends \Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFron * * @param \Magento\Sales\Model\Quote\Address $address * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function fetchTotals(\Magento\Sales\Model\Quote\Address $address) { diff --git a/app/code/Magento/Sales/Model/Resource/Quote/Item/Collection.php b/app/code/Magento/Sales/Model/Resource/Quote/Item/Collection.php index 979e2932865..63ce8da3b3b 100644 --- a/app/code/Magento/Sales/Model/Resource/Quote/Item/Collection.php +++ b/app/code/Magento/Sales/Model/Resource/Quote/Item/Collection.php @@ -182,6 +182,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * Add products to items and item options * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _assignProducts() { diff --git a/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php b/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php index 49989878dc4..e112d782d1b 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php @@ -6,6 +6,7 @@ namespace Magento\Sales\Model\Resource\Report; /** * Bestsellers report resource model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Bestsellers extends AbstractReport { @@ -79,6 +80,7 @@ class Bestsellers extends AbstractReport * @param string|int|\Zend_Date|array|null $to * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function aggregate($from = null, $to = null) { diff --git a/app/code/Magento/Sales/Model/Resource/Report/Bestsellers/Collection.php b/app/code/Magento/Sales/Model/Resource/Report/Bestsellers/Collection.php index 16782bc6898..4d1c4c36ef1 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Bestsellers/Collection.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Bestsellers/Collection.php @@ -216,6 +216,9 @@ class Collection extends \Magento\Sales\Model\Resource\Report\Collection\Abstrac * but before adding unions and calculating totals * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _beforeLoad() { diff --git a/app/code/Magento/Sales/Model/Resource/Report/Invoiced.php b/app/code/Magento/Sales/Model/Resource/Report/Invoiced.php index ca3f986adca..09c1bba13da 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Invoiced.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Invoiced.php @@ -49,6 +49,7 @@ class Invoiced extends AbstractReport * @param string|null $to * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _aggregateByInvoiceCreatedAt($from, $to) { diff --git a/app/code/Magento/Sales/Model/Resource/Report/Order/Createdat.php b/app/code/Magento/Sales/Model/Resource/Report/Order/Createdat.php index 598ea134ea2..44f8095efcf 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Order/Createdat.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Order/Createdat.php @@ -41,6 +41,8 @@ class Createdat extends \Magento\Sales\Model\Resource\Report\AbstractReport * @param string|int|\Zend_Date|array|null $to * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _aggregateByField($aggregationField, $from, $to) { diff --git a/app/code/Magento/Sales/Model/Resource/Report/Refunded.php b/app/code/Magento/Sales/Model/Resource/Report/Refunded.php index 91111be7c66..a49c05338b5 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Refunded.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Refunded.php @@ -136,6 +136,7 @@ class Refunded extends AbstractReport * @param string|null $to * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _aggregateByRefundCreatedAt($from, $to) { diff --git a/app/code/Magento/Sales/Model/Resource/Report/Shipping.php b/app/code/Magento/Sales/Model/Resource/Report/Shipping.php index 21306eea592..2c897376dea 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Shipping.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Shipping.php @@ -140,6 +140,7 @@ class Shipping extends AbstractReport * @param string|null $to * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _aggregateByShippingCreatedAt($from, $to) { diff --git a/app/code/Magento/Sales/Model/Resource/Setup.php b/app/code/Magento/Sales/Model/Resource/Setup.php index eb17dbec66e..230887fea8d 100644 --- a/app/code/Magento/Sales/Model/Resource/Setup.php +++ b/app/code/Magento/Sales/Model/Resource/Setup.php @@ -164,6 +164,8 @@ class Setup extends \Magento\Eav\Model\Entity\Setup * @param string $code * @param array $data * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getAttributeColumnDefinition($code, $data) { diff --git a/app/code/Magento/Sales/Model/Service/Order.php b/app/code/Magento/Sales/Model/Service/Order.php index 4c6f5d7111b..c15e5da968d 100644 --- a/app/code/Magento/Sales/Model/Service/Order.php +++ b/app/code/Magento/Sales/Model/Service/Order.php @@ -204,6 +204,8 @@ class Order * @param object $invoice * @param array $data * @return \Magento\Sales\Model\Order\Creditmemo + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function prepareInvoiceCreditmemo($invoice, $data = []) { @@ -315,6 +317,7 @@ class Order * @param \Magento\Sales\Model\Order\Item $item * @param array $qtys * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _canInvoiceItem($item, $qtys = []) { @@ -355,6 +358,7 @@ class Order * @param \Magento\Sales\Model\Order\Item $item * @param array $qtys * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _canShipItem($item, $qtys = []) { @@ -401,6 +405,7 @@ class Order * @param array $qtys * @param array $invoiceQtysRefundLimits * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _canRefundItem($item, $qtys = [], $invoiceQtysRefundLimits = []) { diff --git a/app/code/Magento/Sales/Model/Service/Quote.php b/app/code/Magento/Sales/Model/Service/Quote.php index f2872f9cdf2..8bdd1404a58 100644 --- a/app/code/Magento/Sales/Model/Service/Quote.php +++ b/app/code/Magento/Sales/Model/Service/Quote.php @@ -7,6 +7,7 @@ namespace Magento\Sales\Model\Service; /** * Class Quote * Quote submit service model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Quote { @@ -110,6 +111,7 @@ class Quote * @param \Magento\Customer\Api\AddressRepositoryInterface $addressRepository * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository * @param \Magento\Customer\Api\Data\RegionDataBuilder $regionDataBuilder + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Event\ManagerInterface $eventManager, @@ -209,6 +211,8 @@ class Quote * * @return \Magento\Sales\Model\Order * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function submitOrderWithDataObject() { diff --git a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.php index ea32f81cdc4..7846f269c49 100644 --- a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.php +++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.php @@ -84,6 +84,7 @@ class Actions extends \Magento\Backend\Block\Widget\Form\Generic implements * Prepare form before rendering HTML * * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Form.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Form.php index 1f64df08565..4fcc2e5f545 100644 --- a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Form.php +++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Form.php @@ -40,6 +40,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * Prepare coupon codes generation parameters form * * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php index bfd7b0ce873..7f911a3ef4a 100644 --- a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php +++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php @@ -115,6 +115,8 @@ class Main extends Generic implements TabInterface * Prepare form before rendering HTML * * @return $this + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Edit.php b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Edit.php index 66f405391d4..95547dade3c 100644 --- a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Edit.php +++ b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Edit.php @@ -11,6 +11,7 @@ class Edit extends \Magento\SalesRule\Controller\Adminhtml\Promo\Quote * Promo quote edit action * * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php index 1aa9ed6cc53..8131e0bc0fa 100644 --- a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php +++ b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php @@ -11,6 +11,8 @@ class Save extends \Magento\SalesRule\Controller\Adminhtml\Promo\Quote * Promo quote save action * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/SalesRule/Model/Observer.php b/app/code/Magento/SalesRule/Model/Observer.php index 11507f162de..4f0ca2c3ab3 100644 --- a/app/code/Magento/SalesRule/Model/Observer.php +++ b/app/code/Magento/SalesRule/Model/Observer.php @@ -6,6 +6,9 @@ namespace Magento\SalesRule\Model; use Magento\Framework\Event\Observer as EventObserver; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Observer { /** @@ -89,6 +92,7 @@ class Observer /** * @param EventObserver $observer * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function salesOrderAfterPlace($observer) { diff --git a/app/code/Magento/SalesRule/Model/Quote/Discount.php b/app/code/Magento/SalesRule/Model/Quote/Discount.php index ac2b485eb9e..6e4ba24a839 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -58,6 +58,7 @@ class Discount extends \Magento\Sales\Model\Quote\Address\Total\AbstractTotal * * @param Address $address * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function collect(Address $address) { diff --git a/app/code/Magento/SalesRule/Model/Resource/Report/Rule/Createdat.php b/app/code/Magento/SalesRule/Model/Resource/Report/Rule/Createdat.php index 63bd5a0554e..38f92fde3a8 100644 --- a/app/code/Magento/SalesRule/Model/Resource/Report/Rule/Createdat.php +++ b/app/code/Magento/SalesRule/Model/Resource/Report/Rule/Createdat.php @@ -41,6 +41,7 @@ class Createdat extends \Magento\Reports\Model\Resource\Report\AbstractReport * @param mixed $from * @param mixed $to * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _aggregateByOrder($aggregationField, $from, $to) { diff --git a/app/code/Magento/SalesRule/Model/Rule.php b/app/code/Magento/SalesRule/Model/Rule.php index e0cc5a38af2..45a7fbeecc6 100644 --- a/app/code/Magento/SalesRule/Model/Rule.php +++ b/app/code/Magento/SalesRule/Model/Rule.php @@ -62,6 +62,7 @@ use Magento\Sales\Model\Quote\Address; * @method \Magento\SalesRule\Model\Rule setCouponCode(string $value) * @method int getRuleId() * @method \Magento\SalesRule\Model\Rule setRuleId(int $ruleId) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Rule extends \Magento\Rule\Model\AbstractModel { @@ -184,6 +185,7 @@ class Rule extends \Magento\Rule\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -435,6 +437,8 @@ class Rule extends \Magento\Rule\Model\AbstractModel * @param int $saveAttemptCount Number of attempts to save newly created coupon * @return \Magento\SalesRule\Model\Coupon|null * @throws \Exception|\Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function acquireCoupon($saveNewlyCreated = true, $saveAttemptCount = 10) { @@ -524,6 +528,7 @@ class Rule extends \Magento\Rule\Model\AbstractModel * * @param Address $address * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsValidForAddress($address) { diff --git a/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php b/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php index bea0defa401..5f125f1f307 100644 --- a/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php +++ b/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php @@ -54,6 +54,7 @@ class Found extends \Magento\SalesRule\Model\Rule\Condition\Product\Combine * * @param \Magento\Framework\Model\AbstractModel $model * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function validate(\Magento\Framework\Model\AbstractModel $model) { diff --git a/app/code/Magento/SalesRule/Model/RulesApplier.php b/app/code/Magento/SalesRule/Model/RulesApplier.php index 4dace1d8f8d..33be5c89edc 100644 --- a/app/code/Magento/SalesRule/Model/RulesApplier.php +++ b/app/code/Magento/SalesRule/Model/RulesApplier.php @@ -47,6 +47,7 @@ class RulesApplier * @param bool $skipValidation * @param mixed $couponCode * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function applyRules($item, $rules, $skipValidation, $couponCode) { diff --git a/app/code/Magento/SalesRule/Model/Utility.php b/app/code/Magento/SalesRule/Model/Utility.php index 43f9fa2c1f7..2f1990049c9 100644 --- a/app/code/Magento/SalesRule/Model/Utility.php +++ b/app/code/Magento/SalesRule/Model/Utility.php @@ -76,6 +76,8 @@ class Utility * @param \Magento\SalesRule\Model\Rule $rule * @param \Magento\Sales\Model\Quote\Address $address * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function canProcessRule($rule, $address) { @@ -179,6 +181,7 @@ class Utility * @param \Magento\SalesRule\Model\Rule\Action\Discount\Data $discountData * @param \Magento\Sales\Model\Quote\Item\AbstractItem $item * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function deltaRoundingFix( \Magento\SalesRule\Model\Rule\Action\Discount\Data $discountData, diff --git a/app/code/Magento/SalesRule/Model/Validator.php b/app/code/Magento/SalesRule/Model/Validator.php index b934c473ad7..4dc6fcd0ba1 100644 --- a/app/code/Magento/SalesRule/Model/Validator.php +++ b/app/code/Magento/SalesRule/Model/Validator.php @@ -18,6 +18,7 @@ use Magento\Sales\Model\Quote\Item\AbstractItem; * @method Validator setWebsiteId($id) * @method mixed getCustomerGroupId() * @method Validator setCustomerGroupId($id) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Validator extends \Magento\Framework\Model\AbstractModel { @@ -100,6 +101,7 @@ class Validator extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -245,6 +247,7 @@ class Validator extends \Magento\Framework\Model\AbstractModel * * @param Address $address * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function processShippingAmount(Address $address) { diff --git a/app/code/Magento/Search/Block/Adminhtml/Dashboard/Last.php b/app/code/Magento/Search/Block/Adminhtml/Dashboard/Last.php index 747e285bef7..a715b212ede 100644 --- a/app/code/Magento/Search/Block/Adminhtml/Dashboard/Last.php +++ b/app/code/Magento/Search/Block/Adminhtml/Dashboard/Last.php @@ -6,6 +6,7 @@ namespace Magento\Search\Block\Adminhtml\Dashboard; /** * Dashboard last search keywords block + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Last extends \Magento\Backend\Block\Dashboard\Grid { diff --git a/app/code/Magento/Search/Block/Adminhtml/Dashboard/Top.php b/app/code/Magento/Search/Block/Adminhtml/Dashboard/Top.php index bfc541cb336..30cba87a47b 100644 --- a/app/code/Magento/Search/Block/Adminhtml/Dashboard/Top.php +++ b/app/code/Magento/Search/Block/Adminhtml/Dashboard/Top.php @@ -6,6 +6,7 @@ namespace Magento\Search\Block\Adminhtml\Dashboard; /** * Dashboard last search keywords block + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Top extends \Magento\Backend\Block\Dashboard\Grid { diff --git a/app/code/Magento/Search/Block/Adminhtml/Term/Edit/Form.php b/app/code/Magento/Search/Block/Adminhtml/Term/Edit/Form.php index 19a39a35d87..12ed47f6931 100644 --- a/app/code/Magento/Search/Block/Adminhtml/Term/Edit/Form.php +++ b/app/code/Magento/Search/Block/Adminhtml/Term/Edit/Form.php @@ -50,6 +50,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * Prepare form fields * * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/Search/Controller/Adminhtml/Term/Edit.php b/app/code/Magento/Search/Controller/Adminhtml/Term/Edit.php index 1334049f026..ff55e2b3467 100644 --- a/app/code/Magento/Search/Controller/Adminhtml/Term/Edit.php +++ b/app/code/Magento/Search/Controller/Adminhtml/Term/Edit.php @@ -32,6 +32,7 @@ class Edit extends \Magento\Search\Controller\Adminhtml\Term /** * @return \Magento\Backend\Model\View\Result\Page + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Search/Controller/Adminhtml/Term/Save.php b/app/code/Magento/Search/Controller/Adminhtml/Term/Save.php index f483caa72d3..45b1cef503e 100644 --- a/app/code/Magento/Search/Controller/Adminhtml/Term/Save.php +++ b/app/code/Magento/Search/Controller/Adminhtml/Term/Save.php @@ -30,6 +30,7 @@ class Save extends \Magento\Search\Controller\Adminhtml\Term * Save search query * * @return \Magento\Backend\Model\View\Result\Redirect + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Search/Helper/Data.php b/app/code/Magento/Search/Helper/Data.php index e9f4092c9fd..d2d29b90ef3 100644 --- a/app/code/Magento/Search/Helper/Data.php +++ b/app/code/Magento/Search/Helper/Data.php @@ -250,6 +250,7 @@ class Data extends AbstractHelper * * @param mixed $store * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function checkNotes($store = null) { diff --git a/app/code/Magento/Search/Model/Query.php b/app/code/Magento/Search/Model/Query.php index aa0fe6755bd..b7f4c4a019d 100644 --- a/app/code/Magento/Search/Model/Query.php +++ b/app/code/Magento/Search/Model/Query.php @@ -39,6 +39,7 @@ use Magento\Store\Model\StoreManagerInterface; * @method string getUpdatedAt() * @method \Magento\Search\Model\Query setUpdatedAt(string $value) * @method \Magento\Search\Model\Query setIsQueryTextExceeded(bool $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Query extends AbstractModel implements QueryInterface { diff --git a/app/code/Magento/Search/Model/Resource/Helper.php b/app/code/Magento/Search/Model/Resource/Helper.php index b6e779f1d7b..2d5a28bd99c 100644 --- a/app/code/Magento/Search/Model/Resource/Helper.php +++ b/app/code/Magento/Search/Model/Resource/Helper.php @@ -24,6 +24,7 @@ class Helper extends \Magento\Framework\DB\Helper * @param string $str The source string * @param int $maxWordLength * @return array (0 => words, 1 => terms) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function prepareTerms($str, $maxWordLength = 0) { diff --git a/app/code/Magento/Sendfriend/Controller/Product/Sendmail.php b/app/code/Magento/Sendfriend/Controller/Product/Sendmail.php index 22b59f311f8..4cffba0bbcb 100644 --- a/app/code/Magento/Sendfriend/Controller/Product/Sendmail.php +++ b/app/code/Magento/Sendfriend/Controller/Product/Sendmail.php @@ -36,6 +36,7 @@ class Sendmail extends \Magento\Sendfriend\Controller\Product * Send Email Post Action * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Sendfriend/Model/Observer.php b/app/code/Magento/Sendfriend/Model/Observer.php index b5d32062f1e..9a498a734e8 100644 --- a/app/code/Magento/Sendfriend/Model/Observer.php +++ b/app/code/Magento/Sendfriend/Model/Observer.php @@ -30,6 +30,7 @@ class Observer * * @param \Magento\Framework\Event\Observer $observer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function register(\Magento\Framework\Event\Observer $observer) { diff --git a/app/code/Magento/Sendfriend/Model/Resource/Sendfriend.php b/app/code/Magento/Sendfriend/Model/Resource/Sendfriend.php index 6fd232b0120..6f1bd3c3427 100644 --- a/app/code/Magento/Sendfriend/Model/Resource/Sendfriend.php +++ b/app/code/Magento/Sendfriend/Model/Resource/Sendfriend.php @@ -29,6 +29,7 @@ class Sendfriend extends \Magento\Framework\Model\Resource\Db\AbstractDb * @param int $startTime * @param int $websiteId * @return int + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getSendCount($object, $ip, $startTime, $websiteId = null) { diff --git a/app/code/Magento/Sendfriend/Model/Sendfriend.php b/app/code/Magento/Sendfriend/Model/Sendfriend.php index 5f928d51c62..116578d8050 100644 --- a/app/code/Magento/Sendfriend/Model/Sendfriend.php +++ b/app/code/Magento/Sendfriend/Model/Sendfriend.php @@ -17,6 +17,7 @@ use Magento\Framework\Model\Exception as CoreException; * @method \Magento\Sendfriend\Model\Sendfriend setTime(int $value) * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Sendfriend extends \Magento\Framework\Model\AbstractModel { @@ -120,6 +121,7 @@ class Sendfriend extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -218,6 +220,8 @@ class Sendfriend extends \Magento\Framework\Model\AbstractModel * Validate Form data * * @return bool|string[] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validate() { @@ -267,6 +271,7 @@ class Sendfriend extends \Magento\Framework\Model\AbstractModel * * @param array $recipients * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function setRecipients($recipients) { diff --git a/app/code/Magento/Shipping/Block/Adminhtml/View/Form.php b/app/code/Magento/Shipping/Block/Adminhtml/View/Form.php index b3955a4ea74..8e51c87fd2f 100644 --- a/app/code/Magento/Shipping/Block/Adminhtml/View/Form.php +++ b/app/code/Magento/Shipping/Block/Adminhtml/View/Form.php @@ -69,6 +69,7 @@ class Form extends \Magento\Sales\Block\Adminhtml\Order\AbstractOrder * Get create label button html * * @return string + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getCreateLabelButton() { diff --git a/app/code/Magento/Shipping/Block/Tracking/Popup.php b/app/code/Magento/Shipping/Block/Tracking/Popup.php index 58ef0e9a32f..670b6e7f7cf 100644 --- a/app/code/Magento/Shipping/Block/Tracking/Popup.php +++ b/app/code/Magento/Shipping/Block/Tracking/Popup.php @@ -85,6 +85,7 @@ class Popup extends \Magento\Framework\View\Element\Template * Is 'contact us' option enabled? * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getContactUsEnabled() { diff --git a/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/MassPrintShippingLabel.php b/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/MassPrintShippingLabel.php index 950585e1b2c..dbe6d848608 100644 --- a/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/MassPrintShippingLabel.php +++ b/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/MassPrintShippingLabel.php @@ -49,6 +49,7 @@ class MassPrintShippingLabel extends \Magento\Backend\App\Action * Push pdf document with shipping labels to user browser * * @return ResponseInterface|void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/Save.php b/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/Save.php index 893cf57a363..a192c298db1 100644 --- a/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/Save.php +++ b/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/Save.php @@ -77,6 +77,8 @@ class Save extends \Magento\Backend\App\Action * We can save only new shipment. Existing shipments are not editable * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php index 21a384ed884..b1f367ae006 100644 --- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php +++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php @@ -132,6 +132,7 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst * * @param string $field * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getConfigFlag($field) { @@ -195,6 +196,8 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst * * @param \Magento\Framework\Object|null $params * @return array|bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getAllowedContainers(\Magento\Framework\Object $params = null) { @@ -267,6 +270,7 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst /** * @param \Magento\Sales\Model\Quote\Address\RateRequest $request * @return $this|bool|false|\Magento\Framework\Model\AbstractModel + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function checkAvailableShipCountries(\Magento\Sales\Model\Quote\Address\RateRequest $request) { @@ -373,6 +377,8 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst /** * @param \Magento\Sales\Model\Quote\Address\RateRequest $request * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _updateFreeMethodQuote($request) { @@ -576,6 +582,7 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst * Define if debugging is enabled * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDebugFlag() { diff --git a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php index 3a8f97aab63..250f8557cfd 100644 --- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php +++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php @@ -11,6 +11,7 @@ use Magento\Shipping\Model\Shipment\Request; /** * Abstract online shipping carrier model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractCarrierOnline extends AbstractCarrier { @@ -246,6 +247,7 @@ abstract class AbstractCarrierOnline extends AbstractCarrier * * @param RateRequest $request * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getAllItems(RateRequest $request) { @@ -278,6 +280,8 @@ abstract class AbstractCarrierOnline extends AbstractCarrier * * @param RateRequest $request * @return $this|bool|Error + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function proccessAdditionalValidation(RateRequest $request) { @@ -517,6 +521,7 @@ abstract class AbstractCarrierOnline extends AbstractCarrier * @return bool * * @todo implement rollback logic + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function rollBack($data) { @@ -565,6 +570,7 @@ abstract class AbstractCarrierOnline extends AbstractCarrier * * @param null|string $countyDest * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function isGirthAllowed($countyDest = null) { diff --git a/app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php b/app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php index fd099bac014..4396bbd5667 100644 --- a/app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php +++ b/app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php @@ -6,6 +6,9 @@ namespace Magento\Shipping\Model\Order\Pdf; use Magento\Shipping\Helper\Carrier; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf { /** @@ -141,6 +144,10 @@ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf * * @param \Zend_Pdf_Page $page * @return \Magento\Shipping\Model\Order\Pdf\Packaging + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _drawPackageBlock(\Zend_Pdf_Page $page) { diff --git a/app/code/Magento/Shipping/Model/Rate/Result.php b/app/code/Magento/Shipping/Model/Rate/Result.php index cbbacd061cf..2c647b0fdba 100644 --- a/app/code/Magento/Shipping/Model/Rate/Result.php +++ b/app/code/Magento/Shipping/Model/Rate/Result.php @@ -181,6 +181,7 @@ class Result * Sort rates by price from min to max * * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function sortRatesByPrice() { diff --git a/app/code/Magento/Shipping/Model/Shipping.php b/app/code/Magento/Shipping/Model/Shipping.php index e80576a030d..779c0badaef 100644 --- a/app/code/Magento/Shipping/Model/Shipping.php +++ b/app/code/Magento/Shipping/Model/Shipping.php @@ -7,6 +7,9 @@ namespace Magento\Shipping\Model; use Magento\Sales\Model\Order\Shipment; use Magento\Sales\Model\Quote\Address\RateCollectorInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Shipping implements RateCollectorInterface { /** @@ -230,6 +233,8 @@ class Shipping implements RateCollectorInterface * @param string $carrierCode * @param \Magento\Sales\Model\Quote\Address\RateRequest $request * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function collectCarrierRates($carrierCode, $request) { @@ -309,6 +314,8 @@ class Shipping implements RateCollectorInterface * @param \Magento\Shipping\Model\Carrier\AbstractCarrier $carrier * @param \Magento\Sales\Model\Quote\Address\RateRequest $request * @return array [int, float] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function composePackagesForCarrier($carrier, $request) { diff --git a/app/code/Magento/Shipping/Model/Shipping/LabelGenerator.php b/app/code/Magento/Shipping/Model/Shipping/LabelGenerator.php index 43b358eacda..f843e45eb1c 100644 --- a/app/code/Magento/Shipping/Model/Shipping/LabelGenerator.php +++ b/app/code/Magento/Shipping/Model/Shipping/LabelGenerator.php @@ -8,6 +8,9 @@ namespace Magento\Shipping\Model\Shipping; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\App\RequestInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class LabelGenerator { /** diff --git a/app/code/Magento/Shipping/Model/Shipping/Labels.php b/app/code/Magento/Shipping/Model/Shipping/Labels.php index 506e437cf3a..4ea4dccda13 100644 --- a/app/code/Magento/Shipping/Model/Shipping/Labels.php +++ b/app/code/Magento/Shipping/Model/Shipping/Labels.php @@ -8,6 +8,7 @@ use Magento\Sales\Model\Order\Shipment; /** * Shipping labels model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Labels extends \Magento\Shipping\Model\Shipping { @@ -33,6 +34,7 @@ class Labels extends \Magento\Shipping\Model\Shipping * @param \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry * @param \Magento\Backend\Model\Auth\Session $authSession * @param \Magento\Shipping\Model\Shipment\Request $request + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, @@ -68,6 +70,8 @@ class Labels extends \Magento\Shipping\Model\Shipping * @param Shipment $orderShipment * @return \Magento\Framework\Object * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function requestToShipment(Shipment $orderShipment) { diff --git a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php index 2a5eccdd008..8ffc475ea2a 100644 --- a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php +++ b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php @@ -28,6 +28,7 @@ class Edit extends \Magento\Sitemap\Controller\Adminhtml\Sitemap * Edit sitemap * * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php index 62d24a3f7c8..87a6a61e9a2 100644 --- a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php +++ b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php @@ -14,6 +14,7 @@ class Save extends \Magento\Sitemap\Controller\Adminhtml\Sitemap * Save action * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Sitemap/Model/Observer.php b/app/code/Magento/Sitemap/Model/Observer.php index ef351bdf2b9..4ec6f97dfd3 100644 --- a/app/code/Magento/Sitemap/Model/Observer.php +++ b/app/code/Magento/Sitemap/Model/Observer.php @@ -89,6 +89,8 @@ class Observer * * @param \Magento\Cron\Model\Schedule $schedule * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function scheduledGenerateSitemaps($schedule) { diff --git a/app/code/Magento/Sitemap/Model/Resource/Catalog/Product.php b/app/code/Magento/Sitemap/Model/Resource/Catalog/Product.php index 2bd5f593acd..4743cbb6ded 100644 --- a/app/code/Magento/Sitemap/Model/Resource/Catalog/Product.php +++ b/app/code/Magento/Sitemap/Model/Resource/Catalog/Product.php @@ -10,6 +10,7 @@ use Magento\CatalogUrlRewrite\Model\ProductUrlRewriteGenerator; * Sitemap resource product collection model * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Product extends \Magento\Framework\Model\Resource\Db\AbstractDb { diff --git a/app/code/Magento/Sitemap/Model/Sitemap.php b/app/code/Magento/Sitemap/Model/Sitemap.php index 948fd619223..be8003120f4 100644 --- a/app/code/Magento/Sitemap/Model/Sitemap.php +++ b/app/code/Magento/Sitemap/Model/Sitemap.php @@ -21,6 +21,8 @@ use Magento\Framework\App\Filesystem\DirectoryList; * @method \Magento\Sitemap\Model\Sitemap setSitemapTime(string $value) * @method int getStoreId() * @method \Magento\Sitemap\Model\Sitemap setStoreId(int $value) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Sitemap extends \Magento\Framework\Model\AbstractModel { @@ -156,6 +158,7 @@ class Sitemap extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Store/App/Action/Plugin/Context.php b/app/code/Magento/Store/App/Action/Plugin/Context.php index 54c7b490e15..cc18909e624 100644 --- a/app/code/Magento/Store/App/Action/Plugin/Context.php +++ b/app/code/Magento/Store/App/Action/Plugin/Context.php @@ -53,6 +53,7 @@ class Context * @param callable $proceed * @param \Magento\Framework\App\RequestInterface $request * @return mixed + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundDispatch( \Magento\Framework\App\Action\Action $subject, diff --git a/app/code/Magento/Store/Model/Resource/Group/Collection.php b/app/code/Magento/Store/Model/Resource/Group/Collection.php index 29a63470202..04020c4ed0c 100644 --- a/app/code/Magento/Store/Model/Resource/Group/Collection.php +++ b/app/code/Magento/Store/Model/Resource/Group/Collection.php @@ -35,6 +35,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * Is load default (admin) store * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getLoadDefault() { diff --git a/app/code/Magento/Store/Model/Resource/Store/Collection.php b/app/code/Magento/Store/Model/Resource/Store/Collection.php index 175a313c577..131174d4948 100644 --- a/app/code/Magento/Store/Model/Resource/Store/Collection.php +++ b/app/code/Magento/Store/Model/Resource/Store/Collection.php @@ -50,6 +50,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * Is load default (admin) store * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getLoadDefault() { diff --git a/app/code/Magento/Store/Model/Resource/Website/Collection.php b/app/code/Magento/Store/Model/Resource/Website/Collection.php index ee2b60ad296..582e922a5f9 100644 --- a/app/code/Magento/Store/Model/Resource/Website/Collection.php +++ b/app/code/Magento/Store/Model/Resource/Website/Collection.php @@ -56,6 +56,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * Is load default (admin) website * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getLoadDefault() { diff --git a/app/code/Magento/Store/Model/Storage/Db.php b/app/code/Magento/Store/Model/Storage/Db.php index 94f6e8c8ae1..feaeb575483 100644 --- a/app/code/Magento/Store/Model/Storage/Db.php +++ b/app/code/Magento/Store/Model/Storage/Db.php @@ -13,6 +13,10 @@ use Magento\Store\Model\StoreFactory; use Magento\Store\Model\Website; use Magento\Store\Model\WebsiteFactory as WebsiteFactory; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Db implements \Magento\Store\Model\StoreManagerInterface { /** @@ -132,6 +136,7 @@ class Db implements \Magento\Store\Model\StoreManagerInterface * @param State $appState * @param bool $isSingleStoreAllowed * @param null $currentStore + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( StoreFactory $storeFactory, @@ -178,6 +183,7 @@ class Db implements \Magento\Store\Model\StoreManagerInterface * Init store, group and website collections * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _initStores() { @@ -282,6 +288,8 @@ class Db implements \Magento\Store\Model\StoreManagerInterface * @param null|string|bool|int|Store $storeId * @return Store * @throws \Magento\Framework\App\InitException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getStore($storeId = null) { diff --git a/app/code/Magento/Store/Model/StorageFactory.php b/app/code/Magento/Store/Model/StorageFactory.php index edcf2110824..e03db84cdb8 100644 --- a/app/code/Magento/Store/Model/StorageFactory.php +++ b/app/code/Magento/Store/Model/StorageFactory.php @@ -6,6 +6,9 @@ namespace Magento\Store\Model; use Magento\Framework\Profiler; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class StorageFactory { /** diff --git a/app/code/Magento/Store/Model/Store.php b/app/code/Magento/Store/Model/Store.php index 2d51a5f1618..55ef04b7929 100644 --- a/app/code/Magento/Store/Model/Store.php +++ b/app/code/Magento/Store/Model/Store.php @@ -18,6 +18,9 @@ use Magento\Framework\Model\AbstractModel; * @method int getStoreId() * @method \Magento\Store\Model\Store setSortOrder(int $value) * @method \Magento\Store\Model\Store setIsActive(int $value) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Store extends AbstractModel implements \Magento\Framework\App\ScopeInterface, @@ -316,6 +319,7 @@ class Store extends AbstractModel implements * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param bool $isCustomEntryPoint * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -525,6 +529,8 @@ class Store extends AbstractModel implements * @param boolean|null $secure * @return string * @throws \InvalidArgumentException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getBaseUrl($type = \Magento\Framework\UrlInterface::URL_TYPE_LINK, $secure = null) { @@ -1010,6 +1016,8 @@ class Store extends AbstractModel implements * * @param bool|string $fromStore * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getCurrentUrl($fromStore = true) { diff --git a/app/code/Magento/Store/Model/System/Store.php b/app/code/Magento/Store/Model/System/Store.php index c3cde144be7..29be887532c 100644 --- a/app/code/Magento/Store/Model/System/Store.php +++ b/app/code/Magento/Store/Model/System/Store.php @@ -99,6 +99,8 @@ class Store extends \Magento\Framework\Object * @param bool $empty * @param bool $all * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getStoreValuesForForm($empty = false, $all = false) { @@ -155,6 +157,8 @@ class Store extends \Magento\Framework\Object * @param array $groupIds * @param array $websiteIds * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getStoresStructure($isAll = false, $storeIds = [], $groupIds = [], $websiteIds = []) { diff --git a/app/code/Magento/Store/Model/Website.php b/app/code/Magento/Store/Model/Website.php index a9622277f55..51a13faed28 100644 --- a/app/code/Magento/Store/Model/Website.php +++ b/app/code/Magento/Store/Model/Website.php @@ -25,6 +25,8 @@ use Magento\Store\Model\StoreManagerInterface; * @method \Magento\Store\Model\Website setDefaultGroupId(int $value) * @method int getIsDefault() * @method \Magento\Store\Model\Website setIsDefault(int $value) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Website extends \Magento\Framework\Model\AbstractModel implements \Magento\Framework\Object\IdentityInterface, @@ -174,6 +176,7 @@ class Website extends \Magento\Framework\Model\AbstractModel implements * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Tax/Api/Data/QuoteDetailsItemInterface.php b/app/code/Magento/Tax/Api/Data/QuoteDetailsItemInterface.php index bfbdacc6dc0..f6d188130f3 100644 --- a/app/code/Magento/Tax/Api/Data/QuoteDetailsItemInterface.php +++ b/app/code/Magento/Tax/Api/Data/QuoteDetailsItemInterface.php @@ -71,6 +71,7 @@ interface QuoteDetailsItemInterface extends \Magento\Framework\Api\ExtensibleDat * Get indicate that if the tax is included in the unit price and row total * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getTaxIncluded(); diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php index 6230cd5f044..1b772520e42 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php @@ -13,6 +13,9 @@ namespace Magento\Tax\Block\Adminhtml\Rate; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Tax\Controller\RegistryConstants; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Form extends \Magento\Backend\Block\Widget\Form\Generic { const FORM_ELEMENT_ID = 'rate-form'; @@ -70,6 +73,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * @param \Magento\Tax\Api\TaxRateRepositoryInterface $taxRateRepository * @param \Magento\Tax\Model\TaxRateCollection $taxRateCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Backend\Block\Template\Context $context, @@ -103,6 +107,9 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit/Form.php b/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit/Form.php index 87b1b5c2607..e26d3fca84f 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit/Form.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit/Form.php @@ -89,6 +89,9 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/Tax/Block/Checkout/Cart/Sidebar/Totals.php b/app/code/Magento/Tax/Block/Checkout/Cart/Sidebar/Totals.php index 3035168ed7d..e0cbdcaf591 100644 --- a/app/code/Magento/Tax/Block/Checkout/Cart/Sidebar/Totals.php +++ b/app/code/Magento/Tax/Block/Checkout/Cart/Sidebar/Totals.php @@ -85,6 +85,7 @@ class Totals extends SidebarTotals * Return whether subtotal should be displayed including tax * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDisplaySubtotalInclTax() { @@ -95,6 +96,7 @@ class Totals extends SidebarTotals * Return whether subtotal should be displayed excluding tax * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDisplaySubtotalExclTax() { @@ -105,6 +107,7 @@ class Totals extends SidebarTotals * Return whether subtotal should be displayed excluding and including tax * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDisplaySubtotalBoth() { diff --git a/app/code/Magento/Tax/Block/Sales/Order/Tax.php b/app/code/Magento/Tax/Block/Sales/Order/Tax.php index b7addd8d333..bda3ace8a14 100644 --- a/app/code/Magento/Tax/Block/Sales/Order/Tax.php +++ b/app/code/Magento/Tax/Block/Sales/Order/Tax.php @@ -114,6 +114,7 @@ class Tax extends \Magento\Framework\View\Element\Template /** * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _initSubtotal() { diff --git a/app/code/Magento/Tax/Controller/Adminhtml/Rule.php b/app/code/Magento/Tax/Controller/Adminhtml/Rule.php index 8f5759e45e0..491b496bc2e 100644 --- a/app/code/Magento/Tax/Controller/Adminhtml/Rule.php +++ b/app/code/Magento/Tax/Controller/Adminhtml/Rule.php @@ -80,6 +80,7 @@ class Rule extends \Magento\Backend\App\Action * * @param array $postData * @return \Magento\Tax\Api\Data\TaxRuleInterface + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function populateTaxRule($postData) { diff --git a/app/code/Magento/Tax/Helper/Data.php b/app/code/Magento/Tax/Helper/Data.php index 26e3386435f..c1f82df0eae 100644 --- a/app/code/Magento/Tax/Helper/Data.php +++ b/app/code/Magento/Tax/Helper/Data.php @@ -21,6 +21,8 @@ use Magento\Sales\Model\EntityInterface; /** * Catalog data helper + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Data extends \Magento\Framework\App\Helper\AbstractHelper { @@ -169,6 +171,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * @param \Magento\Catalog\Helper\Data $catalogHelper * @param OrderTaxManagementInterface $orderTaxManagement * @param PriceCurrencyInterface $priceCurrency + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Helper\Context $context, @@ -789,6 +792,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * @param EntityInterface $order * @param EntityInterface $salesItem * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function calculateTaxForItems(EntityInterface $order, EntityInterface $salesItem) { diff --git a/app/code/Magento/Tax/Model/Calculation.php b/app/code/Magento/Tax/Model/Calculation.php index 5c7cfdc5523..8b2086fd556 100644 --- a/app/code/Magento/Tax/Model/Calculation.php +++ b/app/code/Magento/Tax/Model/Calculation.php @@ -19,6 +19,8 @@ use Magento\Tax\Model\Config; /** * Tax Calculation Model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Calculation extends \Magento\Framework\Model\AbstractModel { @@ -186,6 +188,7 @@ class Calculation extends \Magento\Framework\Model\AbstractModel * @param PriceCurrencyInterface $priceCurrency * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -469,6 +472,9 @@ class Calculation extends \Magento\Framework\Model\AbstractModel * @param null|int|\Magento\Store\Model\Store $store * @param int $customerId * @return \Magento\Framework\Object + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getRateRequest( $shippingAddress = null, diff --git a/app/code/Magento/Tax/Model/Calculation/AbstractCalculator.php b/app/code/Magento/Tax/Model/Calculation/AbstractCalculator.php index d871fde75ba..d8f9a4872ea 100644 --- a/app/code/Magento/Tax/Model/Calculation/AbstractCalculator.php +++ b/app/code/Magento/Tax/Model/Calculation/AbstractCalculator.php @@ -13,6 +13,9 @@ use Magento\Tax\Api\Data\TaxDetailsItemInterface; use Magento\Tax\Api\TaxClassManagementInterface; use Magento\Tax\Model\Calculation; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ abstract class AbstractCalculator { /**#@+ diff --git a/app/code/Magento/Tax/Model/Calculation/Rate.php b/app/code/Magento/Tax/Model/Calculation/Rate.php index 31a852062eb..69f0dba1804 100644 --- a/app/code/Magento/Tax/Model/Calculation/Rate.php +++ b/app/code/Magento/Tax/Model/Calculation/Rate.php @@ -22,6 +22,7 @@ use Magento\Framework\Exception\CouldNotDeleteException; * @method \Magento\Tax\Model\Calculation\Rate setZipIsRange(int $value) * @method \Magento\Tax\Model\Calculation\Rate setZipFrom(int $value) * @method \Magento\Tax\Model\Calculation\Rate setZipTo(int $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Rate extends \Magento\Framework\Model\AbstractExtensibleModel implements \Magento\Tax\Api\Data\TaxRateInterface { @@ -62,6 +63,7 @@ class Rate extends \Magento\Framework\Model\AbstractExtensibleModel implements \ * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -104,6 +106,8 @@ class Rate extends \Magento\Framework\Model\AbstractExtensibleModel implements \ * * @return \Magento\Tax\Model\Calculation\Rate * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function beforeSave() { diff --git a/app/code/Magento/Tax/Model/Calculation/RateRepository.php b/app/code/Magento/Tax/Model/Calculation/RateRepository.php index 299cc227c61..2361d5197db 100644 --- a/app/code/Magento/Tax/Model/Calculation/RateRepository.php +++ b/app/code/Magento/Tax/Model/Calculation/RateRepository.php @@ -17,6 +17,9 @@ use Magento\Tax\Api\Data\TaxRateInterface as TaxRateDataObject; use Magento\Tax\Model\Calculation\Rate\Converter; use Magento\Tax\Model\Resource\Calculation\Rate\Collection; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class RateRepository implements \Magento\Tax\Api\TaxRateRepositoryInterface { const MESSAGE_TAX_RATE_ID_IS_NOT_ALLOWED = 'id is not expected for this request.'; diff --git a/app/code/Magento/Tax/Model/Calculation/Rule.php b/app/code/Magento/Tax/Model/Calculation/Rule.php index 18aece57d59..3fe525b09b8 100644 --- a/app/code/Magento/Tax/Model/Calculation/Rule.php +++ b/app/code/Magento/Tax/Model/Calculation/Rule.php @@ -58,6 +58,7 @@ class Rule extends \Magento\Framework\Model\AbstractExtensibleModel implements T * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Tax/Model/Calculation/Rule/Validator.php b/app/code/Magento/Tax/Model/Calculation/Rule/Validator.php index a4a379ba38d..78e07010349 100644 --- a/app/code/Magento/Tax/Model/Calculation/Rule/Validator.php +++ b/app/code/Magento/Tax/Model/Calculation/Rule/Validator.php @@ -32,6 +32,9 @@ class Validator extends \Magento\Framework\Validator\AbstractValidator * @param \Magento\Tax\Model\Calculation\Rule $value * @return boolean * @throws Zend_Validate_Exception If validation of $value is impossible + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function isValid($value) { diff --git a/app/code/Magento/Tax/Model/Config.php b/app/code/Magento/Tax/Model/Config.php index bfd8e11e649..6f8d0f1707d 100644 --- a/app/code/Magento/Tax/Model/Config.php +++ b/app/code/Magento/Tax/Model/Config.php @@ -12,6 +12,9 @@ namespace Magento\Tax\Model; use Magento\Store\Model\Store; +/** + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + */ class Config { // tax notifications @@ -262,6 +265,7 @@ class Config * Get flag what we need use shipping price exclude tax * * @return bool $flag + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getNeedUseShippingExcludeTax() { @@ -783,6 +787,7 @@ class Config * * @param null|string|bool|int|Store $store * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getInfoUrl($store = null) { @@ -799,6 +804,7 @@ class Config * * @param null|int|string|Store $store * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function needPriceConversion($store = null) { diff --git a/app/code/Magento/Tax/Model/Observer.php b/app/code/Magento/Tax/Model/Observer.php index da2ad2ba127..ec9589dff5c 100644 --- a/app/code/Magento/Tax/Model/Observer.php +++ b/app/code/Magento/Tax/Model/Observer.php @@ -116,6 +116,9 @@ class Observer * * @param \Magento\Framework\Event\Observer $observer * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function salesEventOrderAfterSave(\Magento\Framework\Event\Observer $observer) { @@ -253,6 +256,7 @@ class Observer * * @param \Magento\Cron\Model\Schedule $schedule * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aggregateSalesReportTaxData($schedule) { diff --git a/app/code/Magento/Tax/Model/Resource/Calculation.php b/app/code/Magento/Tax/Model/Resource/Calculation.php index b885c1c90ed..15582f75cb9 100644 --- a/app/code/Magento/Tax/Model/Resource/Calculation.php +++ b/app/code/Magento/Tax/Model/Resource/Calculation.php @@ -129,6 +129,8 @@ class Calculation extends \Magento\Framework\Model\Resource\Db\AbstractDb * @param \Magento\Framework\Object $request * @param array|null $rates * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getCalculationProcess($request, $rates = null) { @@ -262,6 +264,9 @@ class Calculation extends \Magento\Framework\Model\Resource\Db\AbstractDb * * @param \Magento\Framework\Object $request * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _getRates($request) { diff --git a/app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php b/app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php index 604fbf63405..f575b6bb03c 100644 --- a/app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php +++ b/app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php @@ -19,6 +19,7 @@ use Magento\Tax\Api\Data\TaxDetailsItemInterface; /** * Tax totals calculation model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class CommonTaxCollector extends AbstractTotal { @@ -708,6 +709,8 @@ class CommonTaxCollector extends AbstractTotal * @param float $baseAmount * @param float $rate * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _saveAppliedTaxes( QuoteAddress $address, diff --git a/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php b/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php index aa786ec33bf..92b39c7f726 100644 --- a/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php +++ b/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php @@ -12,6 +12,7 @@ use Magento\Tax\Model\Calculation; /** * Tax totals calculation model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Tax extends CommonTaxCollector { @@ -229,6 +230,7 @@ class Tax extends CommonTaxCollector * @param Address $address * @param array $itemsByType * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function processExtraTaxables(Address $address, Array $itemsByType) { @@ -280,6 +282,7 @@ class Tax extends CommonTaxCollector * * @param Address $address * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function fetch(Address $address) { diff --git a/app/code/Magento/Tax/Model/TaxCalculation.php b/app/code/Magento/Tax/Model/TaxCalculation.php index 97b31af401c..97eb86e8958 100644 --- a/app/code/Magento/Tax/Model/TaxCalculation.php +++ b/app/code/Magento/Tax/Model/TaxCalculation.php @@ -19,6 +19,9 @@ use Magento\Tax\Model\Calculation\AbstractCalculator; use Magento\Store\Model\StoreManagerInterface; use Magento\Tax\Api\TaxCalculationInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class TaxCalculation implements TaxCalculationInterface { /** diff --git a/app/code/Magento/Tax/Model/TaxClass/Repository.php b/app/code/Magento/Tax/Model/TaxClass/Repository.php index 0d2bfda3cad..2746f1e2ca0 100644 --- a/app/code/Magento/Tax/Model/TaxClass/Repository.php +++ b/app/code/Magento/Tax/Model/TaxClass/Repository.php @@ -20,6 +20,9 @@ use Magento\Tax\Model\ClassModelRegistry; use Magento\Tax\Model\Resource\TaxClass\Collection as TaxClassCollection; use Magento\Tax\Model\Resource\TaxClass\CollectionFactory as TaxClassCollectionFactory; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Repository implements \Magento\Tax\Api\TaxClassRepositoryInterface { /** diff --git a/app/code/Magento/Tax/Model/TaxRuleRepository.php b/app/code/Magento/Tax/Model/TaxRuleRepository.php index 6dd5ae33995..0d2b8cc6e9b 100644 --- a/app/code/Magento/Tax/Model/TaxRuleRepository.php +++ b/app/code/Magento/Tax/Model/TaxRuleRepository.php @@ -21,6 +21,9 @@ use Magento\Tax\Model\Resource\Calculation\Rule as Resource; use Magento\Tax\Model\Resource\Calculation\Rule\Collection; use Magento\Tax\Model\Resource\Calculation\Rule\CollectionFactory; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class TaxRuleRepository implements TaxRuleRepositoryInterface { /** diff --git a/app/code/Magento/TaxImportExport/Model/Rate/CsvImportHandler.php b/app/code/Magento/TaxImportExport/Model/Rate/CsvImportHandler.php index d60d86a2283..f14ab9a98e7 100644 --- a/app/code/Magento/TaxImportExport/Model/Rate/CsvImportHandler.php +++ b/app/code/Magento/TaxImportExport/Model/Rate/CsvImportHandler.php @@ -141,6 +141,7 @@ class CsvImportHandler * @param array $validFields assoc array of valid file fields * @return array * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _filterRateData(array $rateRawData, array $invalidFields, array $validFields) { diff --git a/app/code/Magento/Translation/Model/Inline/Parser.php b/app/code/Magento/Translation/Model/Inline/Parser.php index 211e6ad7e4e..8e628bb0b6c 100644 --- a/app/code/Magento/Translation/Model/Inline/Parser.php +++ b/app/code/Magento/Translation/Model/Inline/Parser.php @@ -271,6 +271,7 @@ class Parser implements \Magento\Framework\Translate\Inline\ParserInterface * @param array $matches * @param array $options * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getAttributeLocation($matches, $options) { @@ -284,6 +285,7 @@ class Parser implements \Magento\Framework\Translate\Inline\ParserInterface * @param array $matches * @param array $options * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getTagLocation($matches, $options) { diff --git a/app/code/Magento/Translation/Model/Js/DataProvider.php b/app/code/Magento/Translation/Model/Js/DataProvider.php index e5ab456ae6e..db333e01f16 100644 --- a/app/code/Magento/Translation/Model/Js/DataProvider.php +++ b/app/code/Magento/Translation/Model/Js/DataProvider.php @@ -11,6 +11,7 @@ class DataProvider implements DataProviderInterface * Get translation data * * @return string[] + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getData() { diff --git a/app/code/Magento/Ui/Component/AbstractView.php b/app/code/Magento/Ui/Component/AbstractView.php index 1fd832be29b..fd1b316abd0 100644 --- a/app/code/Magento/Ui/Component/AbstractView.php +++ b/app/code/Magento/Ui/Component/AbstractView.php @@ -18,6 +18,8 @@ use Magento\Ui\DataProvider\Manager; /** * Abstract class AbstractView + * @SuppressWarnings(PHPMD.NumberOfChildren) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractView extends Template implements UiComponentInterface { diff --git a/app/code/Magento/Ui/Component/Filter/Type/Date.php b/app/code/Magento/Ui/Component/Filter/Type/Date.php index e476d9f7542..d07b84c53bf 100644 --- a/app/code/Magento/Ui/Component/Filter/Type/Date.php +++ b/app/code/Magento/Ui/Component/Filter/Type/Date.php @@ -18,6 +18,7 @@ use Magento\Ui\DataProvider\Manager; /** * Class Date + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Date extends FilterAbstract { @@ -55,6 +56,7 @@ class Date extends FilterAbstract * @param FilterPool $filterPool * @param ResolverInterface $localeResolver * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( TemplateContext $context, diff --git a/app/code/Magento/Ui/Component/Form.php b/app/code/Magento/Ui/Component/Form.php index e765e240a86..956bc06a045 100644 --- a/app/code/Magento/Ui/Component/Form.php +++ b/app/code/Magento/Ui/Component/Form.php @@ -73,6 +73,7 @@ class Form extends AbstractView * @param ActionPool $actionPool * @param ButtonProviderFactory $buttonProviderFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( TemplateContext $context, @@ -209,6 +210,7 @@ class Form extends AbstractView * @param array $itemA * @param array $itemB * @return int + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function sortButtons(array $itemA, array $itemB) { diff --git a/app/code/Magento/Ui/Component/Form/Element/AbstractFormElement.php b/app/code/Magento/Ui/Component/Form/Element/AbstractFormElement.php index 7f8b1299e58..8cd29324972 100644 --- a/app/code/Magento/Ui/Component/Form/Element/AbstractFormElement.php +++ b/app/code/Magento/Ui/Component/Form/Element/AbstractFormElement.php @@ -37,6 +37,7 @@ abstract class AbstractFormElement extends AbstractView implements ElementInterf /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsReadonly() { diff --git a/app/code/Magento/Ui/Component/Form/Element/ElementInterface.php b/app/code/Magento/Ui/Component/Form/Element/ElementInterface.php index 0e6c7e964df..6703903adcd 100644 --- a/app/code/Magento/Ui/Component/Form/Element/ElementInterface.php +++ b/app/code/Magento/Ui/Component/Form/Element/ElementInterface.php @@ -23,6 +23,7 @@ interface ElementInterface extends UiComponentInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsReadonly(); diff --git a/app/code/Magento/Ui/Component/Form/Element/Radio.php b/app/code/Magento/Ui/Component/Form/Element/Radio.php index 6c5e7ae5561..fe8c51dfebc 100644 --- a/app/code/Magento/Ui/Component/Form/Element/Radio.php +++ b/app/code/Magento/Ui/Component/Form/Element/Radio.php @@ -11,6 +11,7 @@ class Radio extends AbstractFormElement { /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getChecked() { diff --git a/app/code/Magento/Ui/Component/Form/Element/Select.php b/app/code/Magento/Ui/Component/Form/Element/Select.php index cefc727600c..2458dda0330 100644 --- a/app/code/Magento/Ui/Component/Form/Element/Select.php +++ b/app/code/Magento/Ui/Component/Form/Element/Select.php @@ -14,6 +14,7 @@ class Select extends AbstractFormElement * * @param string $optionValue * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsSelected($optionValue) { diff --git a/app/code/Magento/Ui/Component/Form/Fieldset.php b/app/code/Magento/Ui/Component/Form/Fieldset.php index 6bc1641b5b6..96f3846535f 100644 --- a/app/code/Magento/Ui/Component/Form/Fieldset.php +++ b/app/code/Magento/Ui/Component/Form/Fieldset.php @@ -28,6 +28,7 @@ class Fieldset extends AbstractView /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsCollapsible() { diff --git a/app/code/Magento/Ui/Component/Layout/AbstractStructure.php b/app/code/Magento/Ui/Component/Layout/AbstractStructure.php index fed10e44951..be4d9ba4f35 100644 --- a/app/code/Magento/Ui/Component/Layout/AbstractStructure.php +++ b/app/code/Magento/Ui/Component/Layout/AbstractStructure.php @@ -88,6 +88,7 @@ class AbstractStructure extends AbstractView /** * @inheritdoc + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function prepare() { @@ -203,6 +204,7 @@ class AbstractStructure extends AbstractView /** * @param array $dataSourceConfig * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function processDataSource(array $dataSourceConfig) { @@ -441,6 +443,7 @@ class AbstractStructure extends AbstractView * @param string $dataScope * @param array $element * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function addElementToCollection(array & $collection, $elementName, $dataScope, array $element) { @@ -539,6 +542,7 @@ class AbstractStructure extends AbstractView * @param array $one * @param array $two * @return int + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function sortChildren(array $one, array $two) { diff --git a/app/code/Magento/Ui/Component/Listing.php b/app/code/Magento/Ui/Component/Listing.php index 8a0fffd534c..774d15ef1c5 100644 --- a/app/code/Magento/Ui/Component/Listing.php +++ b/app/code/Magento/Ui/Component/Listing.php @@ -58,6 +58,7 @@ class Listing extends AbstractView * @param ActionPool $actionPool * @param RowPool $dataProviderRowPool * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( TemplateContext $context, diff --git a/app/code/Magento/Ui/DataProvider/Config/Converter.php b/app/code/Magento/Ui/DataProvider/Config/Converter.php index f9de00aa191..7a3d8c2a29f 100644 --- a/app/code/Magento/Ui/DataProvider/Config/Converter.php +++ b/app/code/Magento/Ui/DataProvider/Config/Converter.php @@ -47,6 +47,7 @@ class Converter implements ConverterInterface * * @param \DOMNode $source * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function toArray(\DOMNode $source) { @@ -99,6 +100,8 @@ class Converter implements ConverterInterface * * @param \DOMDocument $source * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function convert($source) { diff --git a/app/code/Magento/Ui/DataProvider/Manager.php b/app/code/Magento/Ui/DataProvider/Manager.php index a2db36660d1..6ab84dc8664 100644 --- a/app/code/Magento/Ui/DataProvider/Manager.php +++ b/app/code/Magento/Ui/DataProvider/Manager.php @@ -95,6 +95,7 @@ class Manager * @param string $dataSource * @param array $filters * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getData($dataSource, array $filters = []) { diff --git a/app/code/Magento/Ui/DataProvider/Metadata.php b/app/code/Magento/Ui/DataProvider/Metadata.php index 11185631b34..e8f3cbe53d5 100644 --- a/app/code/Magento/Ui/DataProvider/Metadata.php +++ b/app/code/Magento/Ui/DataProvider/Metadata.php @@ -246,6 +246,9 @@ class Metadata implements \Iterator, \ArrayAccess * @param string $name * @param array $field * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function prepare($name, array & $field) { diff --git a/app/code/Magento/Ups/Helper/Config.php b/app/code/Magento/Ups/Helper/Config.php index be82030aa0f..dd09f44816f 100644 --- a/app/code/Magento/Ups/Helper/Config.php +++ b/app/code/Magento/Ups/Helper/Config.php @@ -36,6 +36,7 @@ class Config * Get configuration data of carrier * * @return array + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function getCodes() { diff --git a/app/code/Magento/Ups/Model/Carrier.php b/app/code/Magento/Ups/Model/Carrier.php index 8a5ea44b6ef..460bf55511c 100644 --- a/app/code/Magento/Ups/Model/Carrier.php +++ b/app/code/Magento/Ups/Model/Carrier.php @@ -13,6 +13,8 @@ use Magento\Ups\Helper\Config; /** * UPS shipping implementation + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Carrier extends AbstractCarrierOnline implements CarrierInterface { @@ -200,6 +202,9 @@ class Carrier extends AbstractCarrierOnline implements CarrierInterface * * @param RateRequest $request * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function setRequest(RateRequest $request) { @@ -491,6 +496,7 @@ class Carrier extends AbstractCarrierOnline implements CarrierInterface * * @param string $response * @return Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _parseCgiResponse($response) { @@ -560,6 +566,9 @@ class Carrier extends AbstractCarrierOnline implements CarrierInterface * Get xml rates * * @return Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _getXmlQuotes() { @@ -747,6 +756,7 @@ XMLRequest; * * @param mixed $xmlResponse * @return Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _parseXmlResponse($xmlResponse) { @@ -972,6 +982,8 @@ XMLAuth; * @param string $trackingValue * @param string $xmlResponse * @return null + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _parseXmlTrackingResponse($trackingValue, $xmlResponse) { @@ -1133,6 +1145,9 @@ XMLAuth; * * @param \Magento\Framework\Object $request * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _formShipmentRequest(\Magento\Framework\Object $request) { @@ -1505,6 +1520,7 @@ XMLAuth; * * @param \Magento\Framework\Object|null $params * @return array|bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getContainerTypes(\Magento\Framework\Object $params = null) { diff --git a/app/code/Magento/Ups/Model/Config/Source/OriginShipment.php b/app/code/Magento/Ups/Model/Config/Source/OriginShipment.php index 0bdba07481a..3548cb03470 100644 --- a/app/code/Magento/Ups/Model/Config/Source/OriginShipment.php +++ b/app/code/Magento/Ups/Model/Config/Source/OriginShipment.php @@ -18,6 +18,7 @@ class OriginShipment extends \Magento\Ups\Model\Config\Source\Generic /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function toOptionArray() { diff --git a/app/code/Magento/Ups/Model/Config/Source/Unitofmeasure.php b/app/code/Magento/Ups/Model/Config/Source/Unitofmeasure.php index 3dfc72c6ecd..793b2cb288e 100644 --- a/app/code/Magento/Ups/Model/Config/Source/Unitofmeasure.php +++ b/app/code/Magento/Ups/Model/Config/Source/Unitofmeasure.php @@ -18,6 +18,7 @@ class Unitofmeasure extends \Magento\Ups\Model\Config\Source\Generic /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function toOptionArray() { diff --git a/app/code/Magento/UrlRewrite/Block/Catalog/Product/Grid.php b/app/code/Magento/UrlRewrite/Block/Catalog/Product/Grid.php index d9a3df31f21..f37ce83f123 100644 --- a/app/code/Magento/UrlRewrite/Block/Catalog/Product/Grid.php +++ b/app/code/Magento/UrlRewrite/Block/Catalog/Product/Grid.php @@ -8,6 +8,7 @@ namespace Magento\UrlRewrite\Block\Catalog\Product; * Products grid for URL rewrites editing * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Catalog\Block\Adminhtml\Product\Grid { diff --git a/app/code/Magento/UrlRewrite/Block/Cms/Page/Grid.php b/app/code/Magento/UrlRewrite/Block/Cms/Page/Grid.php index 79844fa883e..d9fabada7a1 100644 --- a/app/code/Magento/UrlRewrite/Block/Cms/Page/Grid.php +++ b/app/code/Magento/UrlRewrite/Block/Cms/Page/Grid.php @@ -8,6 +8,7 @@ namespace Magento\UrlRewrite\Block\Cms\Page; * CMS pages grid for URL rewrites * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Cms\Block\Adminhtml\Page\Grid { diff --git a/app/code/Magento/User/Controller/Adminhtml/User/Save.php b/app/code/Magento/User/Controller/Adminhtml/User/Save.php index 048bf50ddba..587fb71a873 100644 --- a/app/code/Magento/User/Controller/Adminhtml/User/Save.php +++ b/app/code/Magento/User/Controller/Adminhtml/User/Save.php @@ -9,6 +9,8 @@ class Save extends \Magento\User\Controller\Adminhtml\User { /** * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/User/Model/Resource/User.php b/app/code/Magento/User/Model/Resource/User.php index c1bde86fbb1..c27a049e6ee 100644 --- a/app/code/Magento/User/Model/Resource/User.php +++ b/app/code/Magento/User/Model/Resource/User.php @@ -11,6 +11,7 @@ use Magento\User\Model\User as ModelUser; /** * ACL user resource + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class User extends \Magento\Framework\Model\Resource\Db\AbstractDb { diff --git a/app/code/Magento/Usps/Block/Rma/Adminhtml/Rma/Edit/Tab/General/Shipping/Packaging/Plugin.php b/app/code/Magento/Usps/Block/Rma/Adminhtml/Rma/Edit/Tab/General/Shipping/Packaging/Plugin.php index ffb28539fe2..bf844ecc0d7 100644 --- a/app/code/Magento/Usps/Block/Rma/Adminhtml/Rma/Edit/Tab/General/Shipping/Packaging/Plugin.php +++ b/app/code/Magento/Usps/Block/Rma/Adminhtml/Rma/Edit/Tab/General/Shipping/Packaging/Plugin.php @@ -45,6 +45,7 @@ class Plugin * @param \Magento\Framework\Object $subject $subject * @param bool $result * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterIsGirthAllowed(\Magento\Framework\Object $subject, $result) { @@ -57,6 +58,7 @@ class Plugin * @param \Magento\Framework\Object $subject * @param \Closure $proceed * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundCheckSizeAndGirthParameter(\Magento\Framework\Object $subject, \Closure $proceed) { diff --git a/app/code/Magento/Usps/Model/Carrier.php b/app/code/Magento/Usps/Model/Carrier.php index 7f22a33a79b..3d7afd722b9 100644 --- a/app/code/Magento/Usps/Model/Carrier.php +++ b/app/code/Magento/Usps/Model/Carrier.php @@ -10,6 +10,8 @@ use Magento\Shipping\Model\Rate\Result; /** * USPS shipping + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\Carrier\CarrierInterface { @@ -194,6 +196,9 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * * @param \Magento\Sales\Model\Quote\Address\RateRequest $request * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function setRequest(\Magento\Sales\Model\Quote\Address\RateRequest $request) { @@ -361,6 +366,9 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * * @link http://www.usps.com/webtools/htm/Rate-Calculators-v2-3.htm * @return Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _getXmlQuotes() { @@ -483,6 +491,8 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * @param string $response * @return Result * @link http://www.usps.com/webtools/htm/Rate-Calculators-v2-3.htm + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _parseXmlResponse($response) { @@ -583,6 +593,7 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * @param string $type * @param string $code * @return array|false + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getCode($type, $code = '') { @@ -1018,6 +1029,8 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * @param string $trackingvalue * @param string $response * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _parseXmlTrackingResponse($trackingvalue, $response) { @@ -1121,6 +1134,7 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * * @param string $countryId * @return string|false + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _getCountryName($countryId) { @@ -1449,6 +1463,7 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * @param string $serviceType * @return string * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _formUsSignatureConfirmationShipmentRequest(\Magento\Framework\Object $request, $serviceType) { @@ -1548,6 +1563,9 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * * @param \Magento\Framework\Object $request * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _formIntlShipmentRequest(\Magento\Framework\Object $request) { @@ -1799,6 +1817,7 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * * @param \Magento\Framework\Object $request * @return \Magento\Framework\Object + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _doShipmentRequest(\Magento\Framework\Object $request) { diff --git a/app/code/Magento/Weee/Helper/Data.php b/app/code/Magento/Weee/Helper/Data.php index 893fcd3a25d..f928ee6c55b 100644 --- a/app/code/Magento/Weee/Helper/Data.php +++ b/app/code/Magento/Weee/Helper/Data.php @@ -209,6 +209,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * @param string $zone * @param Store|int|string $store * @return bool|int + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function typeOfDisplay( $compareTo = null, diff --git a/app/code/Magento/Weee/Model/Attribute/Backend/Weee/Tax.php b/app/code/Magento/Weee/Model/Attribute/Backend/Weee/Tax.php index d9d09e6511f..a9435a88260 100644 --- a/app/code/Magento/Weee/Model/Attribute/Backend/Weee/Tax.php +++ b/app/code/Magento/Weee/Model/Attribute/Backend/Weee/Tax.php @@ -91,6 +91,7 @@ class Tax extends \Magento\Catalog\Model\Product\Attribute\Backend\Price * * @param \Magento\Catalog\Model\Product $object * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function afterLoad($object) { diff --git a/app/code/Magento/Weee/Model/Observer.php b/app/code/Magento/Weee/Model/Observer.php index 4798e0e61a3..f5dfe7366b5 100644 --- a/app/code/Magento/Weee/Model/Observer.php +++ b/app/code/Magento/Weee/Model/Observer.php @@ -4,6 +4,9 @@ */ namespace Magento\Weee\Model; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Observer extends \Magento\Framework\Model\AbstractModel { /** @@ -44,6 +47,7 @@ class Observer extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Weee/Model/Tax.php b/app/code/Magento/Weee/Model/Tax.php index 98b9608ffae..d0541cef951 100644 --- a/app/code/Magento/Weee/Model/Tax.php +++ b/app/code/Magento/Weee/Model/Tax.php @@ -10,6 +10,9 @@ use Magento\Store\Model\Website; use Magento\Tax\Model\Calculation; use Magento\Customer\Api\AccountManagementInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Tax extends \Magento\Framework\Model\AbstractModel { /** @@ -95,6 +98,7 @@ class Tax extends \Magento\Framework\Model\AbstractModel * @param PriceCurrencyInterface $priceCurrency * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -196,6 +200,8 @@ class Tax extends \Magento\Framework\Model\AbstractModel * @param Website $website * @param bool $calculateTax * @return \Magento\Framework\Object[] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getProductWeeeAttributes( $product, diff --git a/app/code/Magento/Weee/Model/Total/Creditmemo/Weee.php b/app/code/Magento/Weee/Model/Total/Creditmemo/Weee.php index 0dfc5cebce1..94f91dbc529 100644 --- a/app/code/Magento/Weee/Model/Total/Creditmemo/Weee.php +++ b/app/code/Magento/Weee/Model/Total/Creditmemo/Weee.php @@ -37,6 +37,10 @@ class Weee extends \Magento\Sales\Model\Order\Creditmemo\Total\AbstractTotal * * @param Creditmemo $creditmemo * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function collect(Creditmemo $creditmemo) { diff --git a/app/code/Magento/Weee/Model/Total/Invoice/Weee.php b/app/code/Magento/Weee/Model/Total/Invoice/Weee.php index d0539a81325..b56ff8e5119 100644 --- a/app/code/Magento/Weee/Model/Total/Invoice/Weee.php +++ b/app/code/Magento/Weee/Model/Total/Invoice/Weee.php @@ -35,6 +35,9 @@ class Weee extends \Magento\Sales\Model\Order\Invoice\Total\AbstractTotal * * @param \Magento\Sales\Model\Order\Invoice $invoice * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function collect(\Magento\Sales\Model\Order\Invoice $invoice) { diff --git a/app/code/Magento/Weee/Model/Total/Quote/Weee.php b/app/code/Magento/Weee/Model/Total/Quote/Weee.php index a7a8729da4e..2c51cd9b25d 100644 --- a/app/code/Magento/Weee/Model/Total/Quote/Weee.php +++ b/app/code/Magento/Weee/Model/Total/Quote/Weee.php @@ -125,6 +125,8 @@ class Weee extends AbstractTotal * @param \Magento\Sales\Model\Quote\Address $address * @param \Magento\Sales\Model\Quote\Item\AbstractItem $item * @return void|$this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _process(\Magento\Sales\Model\Quote\Address $address, $item) { diff --git a/app/code/Magento/Weee/Model/Total/Quote/WeeeTax.php b/app/code/Magento/Weee/Model/Total/Quote/WeeeTax.php index 00a5bfb2c0e..5f07f635353 100644 --- a/app/code/Magento/Weee/Model/Total/Quote/WeeeTax.php +++ b/app/code/Magento/Weee/Model/Total/Quote/WeeeTax.php @@ -15,6 +15,8 @@ class WeeeTax extends Weee * * @param \Magento\Sales\Model\Quote\Address $address * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function collect(\Magento\Sales\Model\Quote\Address $address) { diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php index c4138de7ccd..b66fa238951 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php @@ -118,6 +118,7 @@ class Chooser extends \Magento\Backend\Block\Template * Flag to indicate include hidden field before chooser or not * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getHiddenEnabled() { diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php index c64afb4fe28..ec57db24f39 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php @@ -108,6 +108,7 @@ class Main extends \Magento\Backend\Block\Widget\Form\Generic implements \Magent * Prepare form before rendering HTML * * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php index fa1e2b20962..2c1848c89a6 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php @@ -184,6 +184,7 @@ class Layout extends \Magento\Backend\Block\Template implements \Magento\Framewo * Generate array of parameters for every container type to create html template * * @return array + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getDisplayOnContainers() { diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Properties.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Properties.php index 614eeaa7eb2..c39bcfb8844 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Properties.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Properties.php @@ -10,6 +10,9 @@ */ namespace Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Tab; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Properties extends \Magento\Widget\Block\Adminhtml\Widget\Options implements \Magento\Backend\Block\Widget\Tab\TabInterface { diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php index 7d608517667..c1aaf3eb8ba 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php @@ -133,6 +133,8 @@ class Options extends \Magento\Backend\Block\Widget\Form\Generic * * @param \Magento\Framework\Object $parameter * @return \Magento\Framework\Data\Form\Element\AbstractElement + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _addField($parameter) { diff --git a/app/code/Magento/Widget/Model/NamespaceResolver.php b/app/code/Magento/Widget/Model/NamespaceResolver.php index 6dc65251323..1cd22a5a64e 100644 --- a/app/code/Magento/Widget/Model/NamespaceResolver.php +++ b/app/code/Magento/Widget/Model/NamespaceResolver.php @@ -33,6 +33,8 @@ class NamespaceResolver * @param string $name * @param bool $asFullModuleName * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function determineOmittedNamespace($name, $asFullModuleName = false) { diff --git a/app/code/Magento/Widget/Model/Template/Filter.php b/app/code/Magento/Widget/Model/Template/Filter.php index 695345a62c8..a7a8a59c8f0 100644 --- a/app/code/Magento/Widget/Model/Template/Filter.php +++ b/app/code/Magento/Widget/Model/Template/Filter.php @@ -6,6 +6,7 @@ namespace Magento\Widget\Model\Template; /** * Template Filter Model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Filter extends \Magento\Cms\Model\Template\Filter { @@ -33,6 +34,7 @@ class Filter extends \Magento\Cms\Model\Template\Filter * @param \Magento\Backend\Model\UrlInterface $backendUrlBuilder * @param \Magento\Widget\Model\Resource\Widget $widgetResource * @param \Magento\Widget\Model\Widget $widget + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Stdlib\String $string, diff --git a/app/code/Magento/Widget/Model/Widget.php b/app/code/Magento/Widget/Model/Widget.php index 7511d0fa9b6..df0679c6def 100644 --- a/app/code/Magento/Widget/Model/Widget.php +++ b/app/code/Magento/Widget/Model/Widget.php @@ -116,6 +116,8 @@ class Widget * * @param string $type Widget type * @return \Magento\Framework\Object + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getConfigAsObject($type) { diff --git a/app/code/Magento/Widget/Model/Widget/Instance.php b/app/code/Magento/Widget/Model/Widget/Instance.php index e64b2251429..8a005665f6f 100644 --- a/app/code/Magento/Widget/Model/Widget/Instance.php +++ b/app/code/Magento/Widget/Model/Widget/Instance.php @@ -17,6 +17,7 @@ use Magento\Framework\App\Filesystem\DirectoryList; * @method \Magento\Widget\Model\Widget\Instance setSortOrder(int $value) * @method \Magento\Widget\Model\Widget\Instance setThemeId(int $value) * @method int getThemeId() + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Instance extends \Magento\Framework\Model\AbstractModel { @@ -122,6 +123,7 @@ class Instance extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $relatedCacheTypes * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -186,6 +188,8 @@ class Instance extends \Magento\Framework\Model\AbstractModel * Processing object before save data * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function beforeSave() { @@ -407,6 +411,7 @@ class Instance extends \Magento\Framework\Model\AbstractModel * Load widget XML config and merge with theme widget config * * @return array|null + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getWidgetConfigAsArray() { @@ -531,6 +536,8 @@ class Instance extends \Magento\Framework\Model\AbstractModel * @param string $container * @param string $templatePath * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function generateLayoutUpdateXml($container, $templatePath = '') { diff --git a/app/code/Magento/Wishlist/Block/AbstractBlock.php b/app/code/Magento/Wishlist/Block/AbstractBlock.php index 6640d6b53a4..b3a9ca04796 100644 --- a/app/code/Magento/Wishlist/Block/AbstractBlock.php +++ b/app/code/Magento/Wishlist/Block/AbstractBlock.php @@ -80,6 +80,7 @@ abstract class AbstractBlock extends \Magento\Catalog\Block\Product\AbstractProd * * @param \Magento\Wishlist\Model\Resource\Item\Collection $collection * @return \Magento\Wishlist\Block\Customer\Wishlist + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _prepareCollection($collection) { diff --git a/app/code/Magento/Wishlist/Block/Customer/Sidebar.php b/app/code/Magento/Wishlist/Block/Customer/Sidebar.php index 246493b70ae..a509518c737 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Sidebar.php +++ b/app/code/Magento/Wishlist/Block/Customer/Sidebar.php @@ -56,6 +56,7 @@ class Sidebar extends \Magento\Wishlist\Block\AbstractBlock implements \Magento\ * * @deprecated after 1.6.2.0 * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCanDisplayWishlist() { diff --git a/app/code/Magento/Wishlist/Controller/Index/Add.php b/app/code/Magento/Wishlist/Controller/Index/Add.php index 7b45de5f6fd..d54f124b016 100644 --- a/app/code/Magento/Wishlist/Controller/Index/Add.php +++ b/app/code/Magento/Wishlist/Controller/Index/Add.php @@ -51,6 +51,9 @@ class Add extends Action\Action implements IndexInterface * * @return void * @throws NotFoundException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function execute() { diff --git a/app/code/Magento/Wishlist/Controller/Index/Cart.php b/app/code/Magento/Wishlist/Controller/Index/Cart.php index edb018b57b8..795ed6717c6 100644 --- a/app/code/Magento/Wishlist/Controller/Index/Cart.php +++ b/app/code/Magento/Wishlist/Controller/Index/Cart.php @@ -9,6 +9,9 @@ use Magento\Framework\App\Action; use Magento\Framework\App\ResponseInterface; use Magento\Wishlist\Controller\IndexInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Cart extends Action\Action implements IndexInterface { /** @@ -91,6 +94,8 @@ class Cart extends Action\Action implements IndexInterface * to product view page with message about needed defined required options * * @return ResponseInterface + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Wishlist/Controller/Index/DownloadCustomOption.php b/app/code/Magento/Wishlist/Controller/Index/DownloadCustomOption.php index 08d34978829..e7baa39cb16 100644 --- a/app/code/Magento/Wishlist/Controller/Index/DownloadCustomOption.php +++ b/app/code/Magento/Wishlist/Controller/Index/DownloadCustomOption.php @@ -32,6 +32,8 @@ class DownloadCustomOption extends Action\Action implements IndexInterface * Custom options download action * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExitExpression) */ public function execute() { diff --git a/app/code/Magento/Wishlist/Controller/Index/Fromcart.php b/app/code/Magento/Wishlist/Controller/Index/Fromcart.php index 8b822593a94..7b3354bb06f 100644 --- a/app/code/Magento/Wishlist/Controller/Index/Fromcart.php +++ b/app/code/Magento/Wishlist/Controller/Index/Fromcart.php @@ -33,6 +33,7 @@ class Fromcart extends Action\Action implements IndexInterface * * @return \Zend_Controller_Response_Abstract * @throws NotFoundException + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function execute() { diff --git a/app/code/Magento/Wishlist/Controller/Index/Send.php b/app/code/Magento/Wishlist/Controller/Index/Send.php index 3d1e22d6892..c7558308201 100644 --- a/app/code/Magento/Wishlist/Controller/Index/Send.php +++ b/app/code/Magento/Wishlist/Controller/Index/Send.php @@ -10,6 +10,9 @@ use Magento\Framework\App\Action\NotFoundException; use Magento\Framework\App\ResponseInterface; use Magento\Wishlist\Controller\IndexInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Send extends Action\Action implements IndexInterface { /** @@ -82,6 +85,9 @@ class Send extends Action\Action implements IndexInterface * * @return ResponseInterface|void * @throws NotFoundException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function execute() { diff --git a/app/code/Magento/Wishlist/Controller/Index/Update.php b/app/code/Magento/Wishlist/Controller/Index/Update.php index 40c1e7dbee4..186157e8ae6 100644 --- a/app/code/Magento/Wishlist/Controller/Index/Update.php +++ b/app/code/Magento/Wishlist/Controller/Index/Update.php @@ -50,6 +50,8 @@ class Update extends Action\Action implements IndexInterface * * @return ResponseInterface|void * @throws NotFoundException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Wishlist/Controller/WishlistProvider.php b/app/code/Magento/Wishlist/Controller/WishlistProvider.php index cd810cda324..01225277201 100644 --- a/app/code/Magento/Wishlist/Controller/WishlistProvider.php +++ b/app/code/Magento/Wishlist/Controller/WishlistProvider.php @@ -54,6 +54,7 @@ class WishlistProvider implements WishlistProviderInterface /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getWishlist($wishlistId = null) { diff --git a/app/code/Magento/Wishlist/Helper/Data.php b/app/code/Magento/Wishlist/Helper/Data.php index 65874e652d2..7af5012d2ae 100644 --- a/app/code/Magento/Wishlist/Helper/Data.php +++ b/app/code/Magento/Wishlist/Helper/Data.php @@ -10,6 +10,7 @@ use Magento\Wishlist\Controller\WishlistProviderInterface; * Wishlist Data Helper * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Data extends \Magento\Framework\App\Helper\AbstractHelper { diff --git a/app/code/Magento/Wishlist/Helper/Rss.php b/app/code/Magento/Wishlist/Helper/Rss.php index 513969f6723..27b24750b8b 100644 --- a/app/code/Magento/Wishlist/Helper/Rss.php +++ b/app/code/Magento/Wishlist/Helper/Rss.php @@ -5,6 +5,9 @@ namespace Magento\Wishlist\Helper; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Rss extends \Magento\Wishlist\Helper\Data { /** @@ -34,6 +37,7 @@ class Rss extends \Magento\Wishlist\Helper\Data * @param \Magento\Wishlist\Controller\WishlistProviderInterface $wishlistProvider * @param \Magento\Customer\Api\Data\CustomerDataBuilder $customerBuilder * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Helper\Context $context, diff --git a/app/code/Magento/Wishlist/Model/Item.php b/app/code/Magento/Wishlist/Model/Item.php index 284118a5eef..cc3f2edf3a3 100644 --- a/app/code/Magento/Wishlist/Model/Item.php +++ b/app/code/Magento/Wishlist/Model/Item.php @@ -26,6 +26,7 @@ use Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory; * @method \Magento\Wishlist\Model\Item setAddedAt(string $value) * @method string getDescription() * @method \Magento\Wishlist\Model\Item setDescription(string $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Item extends AbstractModel implements ItemInterface { @@ -131,6 +132,7 @@ class Item extends AbstractModel implements ItemInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Wishlist/Model/ItemCarrier.php b/app/code/Magento/Wishlist/Model/ItemCarrier.php index a492568b03d..39e8e983f1d 100644 --- a/app/code/Magento/Wishlist/Model/ItemCarrier.php +++ b/app/code/Magento/Wishlist/Model/ItemCarrier.php @@ -14,6 +14,9 @@ use Magento\Framework\Message\ManagerInterface as MessageManager; use Magento\Framework\UrlInterface; use Magento\Wishlist\Helper\Data as WishlistHelper; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class ItemCarrier { /** @@ -100,6 +103,9 @@ class ItemCarrier * @param Wishlist $wishlist * @param array $qtys * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function moveAllToCart(Wishlist $wishlist, $qtys) { diff --git a/app/code/Magento/Wishlist/Model/Observer.php b/app/code/Magento/Wishlist/Model/Observer.php index e20109f60c1..1ab18bf1ea1 100644 --- a/app/code/Magento/Wishlist/Model/Observer.php +++ b/app/code/Magento/Wishlist/Model/Observer.php @@ -121,6 +121,7 @@ class Observer /** * @param \Magento\Framework\Event\Observer $observer * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function processAddToCart($observer) { @@ -176,6 +177,7 @@ class Observer * * @param \Magento\Framework\Event\Observer $observer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function customerLogin(\Magento\Framework\Event\Observer $observer) { @@ -189,6 +191,7 @@ class Observer * * @param \Magento\Framework\Event\Observer $observer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function customerLogout(\Magento\Framework\Event\Observer $observer) { diff --git a/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php b/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php index 8ab2536a38a..d611a28011e 100644 --- a/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php +++ b/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php @@ -6,6 +6,8 @@ namespace Magento\Wishlist\Model\Resource\Item; /** * Wishlist item collection + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { diff --git a/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php b/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php index 06c7bd3b58e..01b96becde9 100644 --- a/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php +++ b/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php @@ -10,6 +10,9 @@ namespace Magento\Wishlist\Model\Resource\Item\Collection; use Magento\Customer\Controller\RegistryConstants as RegistryConstants; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Grid extends \Magento\Wishlist\Model\Resource\Item\Collection { /** diff --git a/app/code/Magento/Wishlist/Model/Wishlist.php b/app/code/Magento/Wishlist/Model/Wishlist.php index 574d389c9eb..b094d118f44 100644 --- a/app/code/Magento/Wishlist/Model/Wishlist.php +++ b/app/code/Magento/Wishlist/Model/Wishlist.php @@ -22,6 +22,7 @@ use Magento\Wishlist\Model\Resource\Wishlist\Collection; * @method \Magento\Wishlist\Model\Wishlist setSharingCode(string $value) * @method string getUpdatedAt() * @method \Magento\Wishlist\Model\Wishlist setUpdatedAt(string $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magento\Framework\Object\IdentityInterface { @@ -134,6 +135,7 @@ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magent * @param ProductRepositoryInterface $productRepository * @param bool $useCurrentWebsite * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -369,6 +371,8 @@ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magent * @param bool $forciblySetQty * @throws \Magento\Framework\Model\Exception * @return Item|string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function addNewItem($product, $buyRequest = null, $forciblySetQty = false) { @@ -599,6 +603,8 @@ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magent * @throws Exception * * @see \Magento\Catalog\Helper\Product::addParamsToBuyRequest() + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function updateItem($itemId, $buyRequest, $params = null) { -- GitLab From 2080fea485b7500250d22a1e58d5471dfcd5a93a Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Tue, 6 Jan 2015 14:33:01 +0200 Subject: [PATCH 014/114] MAGETWO-31575: Remove black/white lists from file system and builds configuration - Updated LiveCodeTest to use github changes - Refactored test framework helper code --- .../Tool/BlacklistInterface.php | 18 +++ .../CodingStandard/Tool/CodeMessDetector.php | 32 ++-- .../CodingStandard/Tool/CodeSniffer.php | 80 ++++------ .../CodingStandard/Tool/CopyPasteDetector.php | 36 +++-- .../Tool/ExtensionInterface.php | 19 +++ .../CodingStandard/ToolInterface.php | 7 +- .../CodingStandard/Tool/CodeSnifferTest.php | 5 - .../Magento/Test/Php/LiveCodeTest.php | 108 +++++-------- .../Test/Php/_files/blacklist/common.txt | 118 -------------- .../Php/_files/phpcs/blacklist/common.txt | 41 ----- .../Php/_files/phpcs/whitelist/common.txt | 8 - .../Test/Php/_files/whitelist/common.txt | 151 +----------------- 12 files changed, 153 insertions(+), 470 deletions(-) create mode 100644 dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/BlacklistInterface.php create mode 100644 dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/ExtensionInterface.php delete mode 100644 dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt delete mode 100644 dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt delete mode 100644 dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/whitelist/common.txt diff --git a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/BlacklistInterface.php b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/BlacklistInterface.php new file mode 100644 index 00000000000..487d0758338 --- /dev/null +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/BlacklistInterface.php @@ -0,0 +1,18 @@ +<?php +/** + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ + +namespace Magento\TestFramework\CodingStandard\Tool; + +interface BlacklistInterface +{ + /** + * Set list of paths to be excluded from tool run + * + * @param array $blackList + * @return void + */ + public function setBlackList(array $blackList); +} \ No newline at end of file diff --git a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeMessDetector.php b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeMessDetector.php index a3e4ebeb972..f52b7d64d21 100644 --- a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeMessDetector.php +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeMessDetector.php @@ -8,21 +8,23 @@ */ namespace Magento\TestFramework\CodingStandard\Tool; -class CodeMessDetector implements \Magento\TestFramework\CodingStandard\ToolInterface +use \Magento\TestFramework\CodingStandard\ToolInterface; + +class CodeMessDetector implements ToolInterface { /** * Ruleset directory * * @var string */ - protected $_rulesetFile; + private $rulesetFile; /** * Report file * * @var string */ - protected $_reportFile; + private $reportFile; /** * Constructor @@ -32,8 +34,8 @@ class CodeMessDetector implements \Magento\TestFramework\CodingStandard\ToolInte */ public function __construct($rulesetFile, $reportFile) { - $this->_reportFile = $reportFile; - $this->_rulesetFile = $rulesetFile; + $this->reportFile = $reportFile; + $this->rulesetFile = $rulesetFile; } /** @@ -47,25 +49,21 @@ class CodeMessDetector implements \Magento\TestFramework\CodingStandard\ToolInte } /** - * Run tool for files specified - * - * @param array $whiteList Files/directories to be inspected - * @param array $blackList Files/directories to be excluded from the inspection - * @param array $extensions Array of alphanumeric strings, for example: 'php', 'xml', 'phtml', 'css'... - * - * @return int + * {@inheritdoc} */ - public function run(array $whiteList, array $blackList = [], array $extensions = []) + public function run(array $whiteList) { + if (empty($whiteList)) { + return \PHP_PMD_TextUI_Command::EXIT_SUCCESS; + } + $commandLineArguments = [ 'run_file_mock', //emulate script name in console arguments implode(',', $whiteList), 'xml', //report format - $this->_rulesetFile, - '--exclude', - implode(',', $blackList), + $this->rulesetFile, '--reportfile', - $this->_reportFile, + $this->reportFile, ]; $options = new \PHP_PMD_TextUI_CommandLineOptions($commandLineArguments); diff --git a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer.php b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer.php index edc994e2c03..b0525aad027 100644 --- a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer.php +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer.php @@ -11,28 +11,35 @@ namespace Magento\TestFramework\CodingStandard\Tool; use Magento\TestFramework\CodingStandard\Tool\CodeSniffer\Wrapper; use Magento\TestFramework\CodingStandard\ToolInterface; -class CodeSniffer implements ToolInterface +class CodeSniffer implements ToolInterface, ExtensionInterface { /** * Ruleset directory * * @var string */ - protected $rulesetDir; + private $rulesetDir; /** * Report file * * @var string */ - protected $reportFile; + private $reportFile; /** * PHPCS cli tool wrapper * * @var Wrapper */ - protected $wrapper; + private $wrapper; + + /** + * List of extensions for tool run + * + * @var array + */ + private $extensions = ['php']; /** * Constructor @@ -49,64 +56,41 @@ class CodeSniffer implements ToolInterface } /** - * Whether the tool can be ran on the current environment - * - * @return bool + * {@inheritdoc} */ - public function canRun() + public function setExtensions(array $extensions) { - return class_exists('PHP_CodeSniffer_CLI'); + $this->extensions = $extensions; } /** - * Return the version of code sniffer found + * Whether the tool can be ran on the current environment * - * @return string + * @return bool */ - public function version() + public function canRun() { - return $this->wrapper->version(); + return class_exists('PHP_CodeSniffer_CLI'); } /** - * Run tool for files specified - * - * @param array $whiteList Files/directories to be inspected - * @param array $blackList Files/directories to be excluded from the inspection - * @param array $extensions Array of alphanumeric strings, for example: 'php', 'xml', 'phtml', 'css'... - * @param int $warningSeverity Severity level of warnings, default is 0 - * - * @return int + * {@inheritdoc} */ - public function run( - array $whiteList, - array $blackList = [], - array $extensions = [], - $warningSeverity = 0 - ) { - $whiteList = array_map( - function ($item) { - return $item; - }, - $whiteList - ); - - $blackList = array_map( - function ($item) { - return preg_quote($item); - }, - $blackList - ); + public function run(array $whiteList) + { + if (empty($whiteList)) { + return 0; + } $this->wrapper->checkRequirements(); $settings = $this->wrapper->getDefaults(); $settings['files'] = $whiteList; $settings['standard'] = [$this->rulesetDir]; - $settings['ignored'] = $blackList; - $settings['extensions'] = $extensions; + $settings['extensions'] = $this->extensions; $settings['reportFile'] = $this->reportFile; - $settings['warningSeverity'] = $warningSeverity; + $settings['warningSeverity'] = 0; $settings['reports']['checkstyle'] = null; + $this->wrapper->setValues($settings); ob_start(); @@ -115,14 +99,4 @@ class CodeSniffer implements ToolInterface return $result; } - - /** - * Get report file - * - * @return string - */ - public function getReportFile() - { - return $this->reportFile; - } } diff --git a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CopyPasteDetector.php b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CopyPasteDetector.php index fb096ac48dd..66a60989ba2 100644 --- a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CopyPasteDetector.php +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CopyPasteDetector.php @@ -8,14 +8,23 @@ */ namespace Magento\TestFramework\CodingStandard\Tool; -class CopyPasteDetector implements \Magento\TestFramework\CodingStandard\ToolInterface +use Magento\TestFramework\CodingStandard\ToolInterface; + +class CopyPasteDetector implements ToolInterface, BlacklistInterface { /** * Report file * * @var string */ - protected $_reportFile; + private $reportFile; + + /** + * List of paths to be excluded from tool run + * + * @var array + */ + private $blacklist; /** * Constructor @@ -24,7 +33,15 @@ class CopyPasteDetector implements \Magento\TestFramework\CodingStandard\ToolInt */ public function __construct($reportFile) { - $this->_reportFile = $reportFile; + $this->reportFile = $reportFile; + } + + /** + * {@inheritdoc} + */ + public function setBlackList(array $blackList) + { + $this->blacklist = $blackList; } /** @@ -44,17 +61,14 @@ class CopyPasteDetector implements \Magento\TestFramework\CodingStandard\ToolInt * Run tool for files specified * * @param array $whiteList Files/directories to be inspected - * @param array $blackList Files/directories to be excluded from the inspection - * @param array $extensions Array of alphanumeric strings, for example: 'php', 'xml', 'phtml', 'css'... + * @return int * * @SuppressWarnings(PHPMD.UnusedLocalVariable) - * - * @return int */ - public function run(array $whiteList, array $blackList = [], array $extensions = []) + public function run(array $whiteList) { $blackListStr = ' '; - foreach ($blackList as $file) { + foreach ($this->blacklist as $file) { $file = escapeshellarg(trim($file)); if (!$file) { continue; @@ -63,8 +77,8 @@ class CopyPasteDetector implements \Magento\TestFramework\CodingStandard\ToolInt } $command = 'phpcpd' . ' --log-pmd ' . escapeshellarg( - $this->_reportFile - ) . ' --min-lines 13' . $blackListStr . ' ' . BP; + $this->reportFile + ) . ' --min-lines 13' . $blackListStr . ' ' . implode(' ', $whiteList); exec($command, $output, $exitCode); diff --git a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/ExtensionInterface.php b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/ExtensionInterface.php new file mode 100644 index 00000000000..08b405ab3d7 --- /dev/null +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/ExtensionInterface.php @@ -0,0 +1,19 @@ +<?php +/** + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + */ + +namespace Magento\TestFramework\CodingStandard\Tool; + +interface ExtensionInterface +{ + /** + * Set extensions for tool to run + * Example: 'php', 'xml', 'phtml', 'css' + * + * @param array $extensions + * @return void + */ + public function setExtensions(array $extensions); +} diff --git a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/ToolInterface.php b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/ToolInterface.php index 4c23b8b6f17..27c83856102 100644 --- a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/ToolInterface.php +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/ToolInterface.php @@ -18,13 +18,10 @@ interface ToolInterface public function canRun(); /** - * Run tool for files cpecified + * Run tool for files specified * * @param array $whiteList Files/directories to be inspected - * @param array $blackList Files/directories to be excluded from the inspection - * @param array $extensions Array of alphanumeric strings, for example: 'php', 'xml', 'phtml', 'css'... - * * @return int */ - public function run(array $whiteList, array $blackList = [], array $extensions = []); + public function run(array $whiteList); } diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/CodingStandard/Tool/CodeSnifferTest.php b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/CodingStandard/Tool/CodeSnifferTest.php index b1f712764f2..af9018f7008 100644 --- a/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/CodingStandard/Tool/CodeSnifferTest.php +++ b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/CodingStandard/Tool/CodeSnifferTest.php @@ -60,9 +60,4 @@ class CodeSnifferTest extends \PHPUnit_Framework_TestCase $this->_tool->run($whiteList, $blackList, $extensions); } - - public function testGetReportFile() - { - $this->assertEquals(self::REPORT_FILE, $this->_tool->getReportFile()); - } } diff --git a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php index 65dc86503fe..cf45282b97a 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php @@ -28,16 +28,6 @@ class LiveCodeTest extends PHPUnit_Framework_TestCase */ protected static $pathToSource = ''; - /** - * @var array - */ - protected static $whiteList = []; - - /** - * @var array - */ - protected static $blackList = []; - /** * Setup basics for all tests * @@ -50,22 +40,39 @@ class LiveCodeTest extends PHPUnit_Framework_TestCase if (!is_dir(self::$reportDir)) { mkdir(self::$reportDir, 0777); } - self::setupFileLists(); } /** - * Helper method to setup the black and white lists + * Returns whitelist based on blacklist and git changed files * - * @param string $type - * @return void + * @param array $fileTypes + * @return array */ - public static function setupFileLists($type = '') + public static function getWhitelist($fileTypes = ['php']) { - if ($type != '' && !preg_match('/\/$/', $type)) { - $type = $type . '/'; + $directoriesToCheck = file(__DIR__ . '/_files/whitelist/whitelist.txt', FILE_IGNORE_NEW_LINES); + + $changedFiles = array_filter( + Utility\Files::readLists(__DIR__ . '/_files/changed_files.txt'), + function ($path) use ($directoriesToCheck) { + foreach ($directoriesToCheck as $directory) { + if (strpos($path, BP . '/' . $directory) === 0) { + return true; + } + } + return false; + } + ); + if (!empty($fileTypes)) { + $changedFiles = array_filter( + $changedFiles, + function ($path) use ($fileTypes) { + return in_array(pathinfo($path, PATHINFO_EXTENSION), $fileTypes); + } + ); } - self::$whiteList = Utility\Files::readLists(__DIR__ . '/_files/' . $type . 'whitelist/*.txt'); - self::$blackList = Utility\Files::readLists(__DIR__ . '/_files/' . $type . 'blacklist/*.txt'); + + return $changedFiles; } /** @@ -82,15 +89,12 @@ class LiveCodeTest extends PHPUnit_Framework_TestCase if (!$codeSniffer->canRun()) { $this->markTestSkipped('PHP Code Sniffer is not installed.'); } - if (version_compare($codeSniffer->version(), '1.4.7') === -1) { + if (version_compare($wrapper->version(), '1.4.7') === -1) { $this->markTestSkipped('PHP Code Sniffer Build Too Old.'); } - self::setupFileLists('phpcs'); - $result = $codeSniffer->run(self::$whiteList, self::$blackList, ['php']); - $this->assertFileExists( - $reportFile, - 'Expected ' . $reportFile . ' to be created by phpcs run with PSR2 standard' - ); + + $result = $codeSniffer->run(self::getWhitelist()); + $this->assertEquals( 0, $result, @@ -111,8 +115,8 @@ class LiveCodeTest extends PHPUnit_Framework_TestCase if (!$codeSniffer->canRun()) { $this->markTestSkipped('PHP Code Sniffer is not installed.'); } - self::setupFileLists(); - $result = $codeSniffer->run(self::$whiteList, self::$blackList, ['php', 'phtml']); + $codeSniffer->setExtensions(['php', 'phtml']); + $result = $codeSniffer->run(self::getWhitelist(['php', 'phtml'])); $this->assertEquals( 0, $result, @@ -138,12 +142,11 @@ class LiveCodeTest extends PHPUnit_Framework_TestCase if (!$codeSniffer->canRun()) { $this->markTestSkipped('PHP Code Sniffer is not installed.'); } - self::setupFileLists('phpcs'); - $severity = 0; // Change to 5 to see the warnings + $result = $codeSniffer->run(self::getWhitelist(['php'])); $this->assertEquals( 0, - $result = $codeSniffer->run(self::$whiteList, self::$blackList, ['php'], $severity), + $result, "PHP Code Sniffer has found {$result} error(s): See detailed report in {$reportFile}" ); } @@ -157,12 +160,7 @@ class LiveCodeTest extends PHPUnit_Framework_TestCase */ public function testCodeMess($whiteList) { - if (count($whiteList) == 1) { - $formattedPath = preg_replace('~/~', '_', preg_replace('~' . self::$pathToSource . '~', '', $whiteList[0])); - } else { - $formattedPath = '_app_lib'; - } - $reportFile = self::$reportDir . '/phpmd_report' . $formattedPath . '.xml'; + $reportFile = self::$reportDir . '/phpmd_report.xml'; $codeMessDetector = new CodeMessDetector(realpath(__DIR__ . '/_files/phpmd/ruleset.xml'), $reportFile); if (!$codeMessDetector->canRun()) { @@ -171,39 +169,14 @@ class LiveCodeTest extends PHPUnit_Framework_TestCase $this->assertEquals( PHP_PMD_TextUI_Command::EXIT_SUCCESS, - $codeMessDetector->run($whiteList, self::$blackList), + $codeMessDetector->run(self::getWhitelist(['php'])), "PHP Code Mess has found error(s): See detailed report in {$reportFile}" ); // delete empty reports - unlink($reportFile); - } - - /** - * To improve the test execution performance the whitelist is split into smaller parts: - * - in case of dev code (tests, tools, etc) each whitelist entry is fed separately to phpmd - * - app/lib code is still being executed within a single whitelist to make sure that all design - * metrics (depth of inheritance, number of children, etc.) are being calculated in a correct way. - * @return array - */ - public function whiteListDataProvider() - { - $whiteList = []; - $testCodePattern = '~' . self::$pathToSource . '/dev/~'; - $nonTestCode = []; - - self::setupFileLists(); - - foreach (self::$whiteList as $path) { - if (!preg_match($testCodePattern, $path)) { - $nonTestCode[] = $path; - } else { - $whiteList[] = [[$path]]; - } + if (file_exists($reportFile)) { + unlink($reportFile); } - $whiteList[] = [$nonTestCode]; - - return $whiteList; } /** @@ -220,14 +193,15 @@ class LiveCodeTest extends PHPUnit_Framework_TestCase $this->markTestSkipped('PHP Copy/Paste Detector is not available.'); } - self::setupFileLists(); $blackList = []; foreach (glob(__DIR__ . '/_files/phpcpd/blacklist/*.txt') as $list) { $blackList = array_merge($blackList, file($list, FILE_IGNORE_NEW_LINES)); } + $copyPasteDetector->setBlackList($blackList); + $this->assertTrue( - $copyPasteDetector->run([], $blackList), + $copyPasteDetector->run([BP]), "PHP Copy/Paste Detector has found error(s): See detailed report in {$reportFile}" ); } diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt deleted file mode 100644 index 8b0e96b4500..00000000000 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt +++ /dev/null @@ -1,118 +0,0 @@ -# Files or directories that are excluded from static code analysis for any reason -# Glob patterns are supported -# Overrides the white list -# -app/code/Magento/Backend/Model/Config.php -app/code/Magento/Backend/Model/Config/Structure/Converter.php -app/code/Magento/Backend/Model/Menu/Config.php -app/code/Magento/Backend/Block/Widget/Grid -app/code/Magento/Backend/view -app/code/Magento/ConfigurableProduct/view -app/code/Magento/DesignEditor/view -app/code/Magento/Email/view -app/code/Magento/Integration/view -app/code/Magento/Msrp/view -app/code/Magento/Theme/view -app/code/Magento/User/view -app/code/Magento/Webapi/view -app/code/Magento/GroupedProduct/view -app/code/Magento/Rss/view -app/code/Magento/UrlRewrite/view -dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php -dev/tests/integration/framework/Magento/TestFramework/Db/Adapter/Mysql.php -dev/tests/integration/framework/Magento/TestFramework/Db/ConnectionAdapter.php -dev/tests/integration/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php -dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php -dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/TemplateFilesTest.php -dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormStub.php -dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture -dev/tests/integration/testsuite/Magento/Framework/Code/_expected -dev/tests/integration/tmp -dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input -dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input -dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/expected -dev/tests/static/testsuite/Magento/Test/Legacy/_files -dev/tests/unit/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php -dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files -dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php -dev/tests/unit/testsuite/Magento/Framework/View/TemplateEngine/_files -lib/internal/Magento/Framework/App/Config/Element.php -lib/internal/Magento/Framework/Archive -lib/internal/Magento/Framework/Backup -lib/internal/Magento/Framework/Cache/Backend/Database.php -lib/internal/Magento/Framework/Cache/Backend/Eaccelerator.php -lib/internal/Magento/Framework/Cache/Backend/Memcached.php -lib/internal/Magento/Framework/Cache/Core.php -lib/internal/Magento/Framework/Data/Collection.php -lib/internal/Magento/Framework/Data/Collection/Db.php -lib/internal/Magento/Framework/Data/Collection/Db/FetchStrategy/Cache.php -lib/internal/Magento/Framework/Data/Collection/Db/FetchStrategy/Query.php -lib/internal/Magento/Framework/Data/Collection/Db/FetchStrategyInterface.php -lib/internal/Magento/Framework/Data/Collection/Filesystem.php -lib/internal/Magento/Framework/Data/Form.php -lib/internal/Magento/Framework/Data/Form/AbstractForm.php -lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php -lib/internal/Magento/Framework/Data/Form/Element/Button.php -lib/internal/Magento/Framework/Data/Form/Element/Checkbox.php -lib/internal/Magento/Framework/Data/Form/Element/Checkboxes.php -lib/internal/Magento/Framework/Data/Form/Element/Collection.php -lib/internal/Magento/Framework/Data/Form/Element/Column.php -lib/internal/Magento/Framework/Data/Form/Element/Date.php -lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php -lib/internal/Magento/Framework/Data/Form/Element/Editor.php -lib/internal/Magento/Framework/Data/Form/Element/Fieldset.php -lib/internal/Magento/Framework/Data/Form/Element/File.php -lib/internal/Magento/Framework/Data/Form/Element/Gallery.php -lib/internal/Magento/Framework/Data/Form/Element/Hidden.php -lib/internal/Magento/Framework/Data/Form/Element/Image.php -lib/internal/Magento/Framework/Data/Form/Element/Imagefile.php -lib/internal/Magento/Framework/Data/Form/Element/Label.php -lib/internal/Magento/Framework/Data/Form/Element/Link.php -lib/internal/Magento/Framework/Data/Form/Element/Multiline.php -lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php -lib/internal/Magento/Framework/Data/Form/Element/Note.php -lib/internal/Magento/Framework/Data/Form/Element/Obscure.php -lib/internal/Magento/Framework/Data/Form/Element/Password.php -lib/internal/Magento/Framework/Data/Form/Element/Radio.php -lib/internal/Magento/Framework/Data/Form/Element/Radios.php -lib/internal/Magento/Framework/Data/Form/Element/Renderer/RendererInterface.php -lib/internal/Magento/Framework/Data/Form/Element/Reset.php -lib/internal/Magento/Framework/Data/Form/Element/Select.php -lib/internal/Magento/Framework/Data/Form/Element/Submit.php -lib/internal/Magento/Framework/Data/Form/Element/Text.php -lib/internal/Magento/Framework/Data/Form/Element/Textarea.php -lib/internal/Magento/Framework/Data/Form/Element/Time.php -lib/internal/Magento/Framework/Data/Form/Filter/Date.php -lib/internal/Magento/Framework/Data/Form/Filter/Escapehtml.php -lib/internal/Magento/Framework/Data/Form/Filter/FilterInterface.php -lib/internal/Magento/Framework/Data/Form/Filter/Striptags.php -lib/internal/Magento/Framework/Data/Tree.php -lib/internal/Magento/Framework/Data/Tree/Db.php -lib/internal/Magento/Framework/Data/Tree/Dbp.php -lib/internal/Magento/Framework/Data/Tree/Node.php -lib/internal/Magento/Framework/Data/Tree/Node/Collection.php -lib/internal/Magento/Framework/DB -lib/internal/Magento/Framework/Stdlib/DateTime.php -lib/internal/Magento/Framework/Debug.php -lib/internal/Magento/Framework/Event.php -lib/internal/Magento/Framework/Event -lib/internal/Magento/Framework/File/Csv.php -lib/internal/Magento/Framework/File/CsvMulty.php -lib/internal/Magento/Framework/File/Transfer/Adapter/Http.php -lib/internal/Magento/Framework/File/Uploader.php -lib/internal/Magento/Framework/Gdata -lib/internal/Magento/Framework/HTTP/Adapter/Curl.php -lib/internal/Magento/Framework/HTTP/Client.php -lib/internal/Magento/Framework/HTTP/Client/Curl.php -lib/internal/Magento/Framework/HTTP/Client/Socket.php -lib/internal/Magento/Framework/HTTP/ClientInterface.php -lib/internal/Magento/Framework/Image -lib/internal/Magento/Framework/Image.php -lib/internal/Magento/Framework/Io -lib/internal/Magento/Framework/Object -lib/internal/Magento/Framework/Object.php -lib/internal/Magento/Framework/Simplexml -lib/internal/Magento/Framework/System -lib/internal/Magento/Framework/Util.php -lib/internal/Magento/Framework/Xml -vendor diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt deleted file mode 100644 index b08055eedb4..00000000000 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt +++ /dev/null @@ -1,41 +0,0 @@ -# Files or directories that are excluded from static code analysis for any reason -# Glob patterns are supported -# Overrides the white list -# -# Formatter introduces long line -app/bootstrap.php -# Formatter introduces long line -app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/NewCategory.php -# Formatter introduces long line -app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php -# Formatter introduces long line -app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php -# Formatter introduces long line -app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php -# Formatter introduces long line -app/code/Magento/Catalog/Block/Adminhtml/Product/Options/Ajax.php -# Formatter introduces long line -app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Design.php -# Formatter introduces long line -app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php -# Formatter introduces long line -app/code/Magento/Backend/Block/System/Store/Edit.php -# Not magento code -dev/tools/layout -# PSR-1 not applied to -dev/tests/js -# Example files that are expected to fail code sniffer -dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input -# Example files that are expected to fail code mess detector -dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input -# __ method for Translate cannot be in camelCase -lib/internal/Magento/Framework/Translate/Adapter.php -# __ method for Translate cannot be in camelCase -lib/internal/Magento/Framework/Translate/AdapterInterface.php -# PSR-1 not applied to -dev/tests/integration/testsuite/Magento -# PSR-1 not applied to -dev/tests/unit/testsuite/Magento -# Newer version of phpcs does not complain about spacing issue. This appears to be a bug in the phpcs version that is currently run in bamboo. -app/code/Magento/Sales/Model/Order/Payment/Transaction.php -vendor diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/whitelist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/whitelist/common.txt deleted file mode 100644 index bd9a1028a5e..00000000000 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/whitelist/common.txt +++ /dev/null @@ -1,8 +0,0 @@ -# Files or directories that are included into php code sniffer analysis -# Glob patterns are supported -# -app -dev -index.php -lib/internal/Magento -pub diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt index 1d53a637557..7f4e36bbdbb 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt @@ -1,148 +1,9 @@ -# Files or directories that are included into static code analysis -# Glob patterns are supported -# -app/bootstrap.php -app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php -app/code/Magento/Backend/Block/System/Store/Edit -app/code/Magento/Backend/Block/System/Store/Edit.php -app/code/Magento/Backend/Model/Observer.php -app/code/Magento/Bundle/Model/Plugin -app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/NewCategory.php -app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php -app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Popup/Grid.php -app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php -app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php -app/code/Magento/Catalog/Block/Adminhtml/Product/Options/Ajax.php -app/code/Magento/Catalog/Block/Product/TemplateSelector.php -app/code/Magento/Catalog/Block/Product/View/BaseImage.php -app/code/Magento/Catalog/Block/Product/View/Gallery.php -app/code/Magento/Catalog/Block/Product/View/Tabs.php -app/code/Magento/Catalog/Model/Attribute/Config -app/code/Magento/Catalog/Model/Attribute/Config.php -app/code/Magento/Catalog/Model/Resource/Category/Collection -app/code/Magento/Catalog/Model/Product/Type.php -app/code/Magento/Catalog/Model/ProductOptions -app/code/Magento/Catalog/Model/ProductTypes -app/code/Magento/Catalog/Model/Plugin -app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php -app/code/Magento/Centinel/Model/State/Jcb.php -app/code/Magento/Checkout/Block/Cart/Link.php -app/code/Magento/Checkout/Block/Link.php -app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Design.php -app/code/Magento/Cms/Controller/Router.php -app/code/Magento/Cms/Model/Template/FilterProvider.php -app/code/Magento/ConfigurableImportExport -app/code/Magento/ConfigurableProduct -app/code/Magento/Core/data -app/code/Magento/Core/Model/Design.php -app/code/Magento/Core/Model/Layout/Update.php -app/code/Magento/Core/Model/Resource/Theme -app/code/Magento/Core/Model/Resource/Theme.php -app/code/Magento/Core/Model/Theme -app/code/Magento/Core/Model/Theme.php -app/code/Magento/Core/Model/Url/SecurityInfo.php -app/code/Magento/Cron/Model/Config/Converter -app/code/Magento/Cron/Model/Config/Reader -app/code/Magento/Cron/Model/Config/Data.php -app/code/Magento/Cron/Model/Config/SchemaLocator.php -app/code/Magento/Cron/Model/Config.php -app/code/Magento/Cron/Model/ConfigInterface.php -app/code/Magento/Directory/Helper -app/code/Magento/Customer/Block -app/code/Magento/Customer/Controller -app/code/Magento/Customer/Helper -app/code/Magento/Customer/Model/Visitor.php -app/code/Magento/Customer/Model/Resource/Visitor.php -app/code/Magento/Customer/Model/Address/Config -app/code/Magento/Customer/Model/Address/Config.php -app/code/Magento/CustomerImportExport/Model/Import/CustomerComposite.php -app/code/Magento/CustomerImportExport/Model/Resource/Import/Customer/Storage.php -app/code/Magento/CustomerImportExport/Model/Resource/Import/CustomerComposite/Data.php -app/code/Magento/Directory/Model/Currency/DefaultLocator.php -app/code/Magento/Directory/Model/Resource/Region -app/code/Magento/Eav/Model/Cache/Type.php -app/code/Magento/GiftMessage/Model/Plugin -app/code/Magento/GiftMessage/Model/Type/Plugin -app/code/Magento/GiftMessage/Service -app/code/Magento/GoogleShopping/Block/SiteVerification.php -app/code/Magento/GoogleShopping/Model/AttributeFactory.php -app/code/Magento/GroupedImportExport -app/code/Magento/Eav/Model/Entity/Attribute/Config -app/code/Magento/Eav/Model/Entity/Attribute/Config.php -app/code/Magento/Email -app/code/Magento/ImportExport/Model/Export/Config -app/code/Magento/ImportExport/Model/Export/Config.php -app/code/Magento/ImportExport/Model/Export/ConfigInterface.php -app/code/Magento/ImportExport/Model/Import/Config -app/code/Magento/ImportExport/Model/Import/Config.php -app/code/Magento/ImportExport/Model/Import/ConfigInterface.php -app/code/Magento/ImportExport/Controller/Adminhtml/Import.php -app/code/Magento/Integration -app/code/Magento/Log/Model/Resource/Helper.php -app/code/Magento/Log/Model/Resource/Shell.php -app/code/Magento/Log/Model/Shell.php -app/code/Magento/Log/Model/Shell -app/code/Magento/Msrp -app/code/Magento/ProductAlert/Block/Product/View -app/code/Magento/Reports/Block/Adminhtml/Customer -app/code/Magento/Reports/Block/Adminhtml/Product -app/code/Magento/Reports/Controller/Adminhtml/Report/Customer.php -app/code/Magento/Reports/Controller/Adminhtml/Report/Product.php -app/code/Magento/Reports/Model/Plugin -app/code/Magento/Reports/Model/Resource/Accounts -app/code/Magento/Reports/Model/Resource/Customer -app/code/Magento/Reports/Model/Resource/Report/Collection.php -app/code/Magento/Sales/Block/Guest/Link.php -app/code/Magento/Sales/Block/Order/Link.php -app/code/Magento/Sales/Block/Order/Info/Buttons/Rss.php -app/code/Magento/Sales/Block/Adminhtml/Order/Details.php -app/code/Magento/Sales/Model/Order/Pdf/Config -app/code/Magento/Sales/Model/Order/Pdf/Config.php -app/code/Magento/Sales/Model/Order/Pdf/Total/Factory.php -app/code/Magento/Sales/Model/Observer -app/code/Magento/Sales/Model/Quote/Address/*Interface.php -app/code/Magento/Sales/Model/Quote/Address/*Interface.php -app/code/Magento/Sales/Model/Resource/Order/Rss/OrderStatus.php -app/code/Magento/Sales/Model/Rss/NewOrder.php -app/code/Magento/Sales/Model/Rss/OrderStatus.php -app/code/Magento/SalesRule/Model/Plugin -app/code/Magento/Sendfriend/Block/Plugin/Catalog/Product/View.php -app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking/Invoice.php -app/code/Magento/Shipping/Model/Observer.php -app/code/Magento/Shipping/Model/Order/Track.php -app/code/Magento/Shipping/Model/CarrierFactory.php -app/code/Magento/Shipping/Model/Resource/Order -app/code/Magento/Theme -app/code/Magento/Webapi -app/code/Magento/GroupedProduct -app/code/Magento/Rss -app/code/Magento/CatalogUrlRewrite -app/code/Magento/CmsUrlRewrite -app/code/Magento/UrlRewrite -app/code/Magento/Wishlist/Block/Link.php -app/code/Magento/Wishlist/Block/Rss -app/code/Magento/Wishlist/Model/Rss/Wishlist.php -dev/shell +app/code/Magento +lib/internal/Magento/Framework +dev/tools/Magento +dev/tests/api-functional dev/tests/functional -dev/tests/integration/* -dev/tests/js +dev/tests/integration dev/tests/performance dev/tests/static -dev/tests/unit/framework -dev/tests/unit/testsuite/Magento/* -dev/tools -lib/internal/Magento/Framework/App -lib/internal/Magento/Framework/Backup/Db -lib/internal/Magento/Framework/Backup/Factory.php -lib/internal/Magento/Framework/Cache/Core.php -lib/internal/Magento/Framework/Convert -lib/internal/Magento/Framework/Exception -lib/internal/Magento/Framework/Stdlib/DateTime.php -lib/internal/Magento/Framework/Object.php -lib/internal/Magento/Framework/Data/Argument -lib/internal/Magento/Framework/ObjectManager -lib/internal/Magento/Framework/Api -lib/internal/Magento/Framework/Url/SecurityInfoInterface.php -lib/internal/Magento/Framework/View -lib/internal/Magento/Framework/Locale/Validator.php -lib/internal/Magento/Framework/Notification +dev/tests/unit \ No newline at end of file -- GitLab From 3ffc38008e8266b4e003293ca8eb260619d01eb3 Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Mon, 29 Dec 2014 18:22:11 +0200 Subject: [PATCH 015/114] MAGETWO-32078: Validation for Terms and Conditions should be the same for OnePage Checkout and Multishipping Flow --- .../Checkout/view/frontend/web/js/overview.js | 13 +++++-------- .../view/frontend/templates/checkout/overview.phtml | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/overview.js b/app/code/Magento/Checkout/view/frontend/web/js/overview.js index 37456a0153f..43819efb7bb 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/overview.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/overview.js @@ -10,13 +10,12 @@ define([ "mage/translate" ], function($){ "use strict"; - + $.widget('mage.orderOverview', { options: { opacity: 0.5, // CSS opacity for the 'Place Order' button when it's clicked and then disabled. pleaseWaitLoader: 'span.please-wait', // 'Submitting order information...' Ajax loader. - placeOrderSubmit: 'button[type="submit"]', // The 'Place Order' button. - agreements: '#checkout-agreements' // Container for all of the checkout agreements and terms/conditions + placeOrderSubmit: 'button[type="submit"]' // The 'Place Order' button. }, /** @@ -28,14 +27,12 @@ define([ }, /** - * Verify that all agreements and terms/conditions are checked. Show the Ajax loader. Disable - * the submit button (i.e. Place Order). + * Show the Ajax loader. Disable the submit button (i.e. Place Order). * @return {Boolean} * @private */ _showLoader: function() { - if ($(this.options.agreements).find('input[type="checkbox"]:not(:checked)').length > 0) { - alert($.mage.__('Please agree to all Terms and Conditions before placing the orders.')); + if (!this.element.validation('isValid')) { return false; } this.element.find(this.options.pleaseWaitLoader).show().end() @@ -43,6 +40,6 @@ define([ return true; } }); - + return $.mage.orderOverview; }); \ No newline at end of file diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview.phtml index e0b908a5a0e..756bae9c4d6 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview.phtml @@ -3,7 +3,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ ?> -<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="review-order-form" data-mage-init='{"orderOverview": {}}' class="form multicheckout order-review"> +<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="review-order-form" data-mage-init='{"orderOverview": {}, "validation":{}}' class="form multicheckout order-review"> <?php echo $this->getBlockHtml('formkey'); ?> <div class="block block-billing"> <div class="block-title"><strong><?php echo __('Billing Information') ?></strong></div> -- GitLab From 47bad3e08fe18c8c02d5b1ef0db37a635e10d79b Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Thu, 8 Jan 2015 15:52:42 +0200 Subject: [PATCH 016/114] MAGETWO-32078: Validation for Terms and Conditions should be the same for OnePage Checkout and Multishipping Flow --- .../view/frontend/templates/product/view/addtocart.phtml | 3 ++- .../Catalog/view/frontend/templates/product/view/form.phtml | 3 ++- .../Magento/Checkout/view/frontend/web/js/opc-order-review.js | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/addtocart.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/addtocart.phtml index 3968a9a1bee..d1b437b7b6d 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/addtocart.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/addtocart.phtml @@ -44,7 +44,8 @@ <script type="text/javascript"> require([ "jquery", - "mage/mage" + "mage/mage", + "Magento_Catalog/product/view/validation" ], function($){ $('#product_addtocart_form').mage('validation', { radioCheckboxClosest: '.nested' diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml index b2754ebd1d9..34f04d40531 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml @@ -35,7 +35,8 @@ <script type="text/javascript"> require([ 'jquery', - 'Magento_Catalog/js/price-box' + 'Magento_Catalog/js/price-box', + 'Magento_Catalog/product/view/validation' ], function($){ var priceBoxes = $('[data-role=priceBox]'); diff --git a/app/code/Magento/Checkout/view/frontend/web/js/opc-order-review.js b/app/code/Magento/Checkout/view/frontend/web/js/opc-order-review.js index 8846321bbc7..b6266cc7704 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/opc-order-review.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/opc-order-review.js @@ -36,8 +36,7 @@ define([ var isAgreementValid = true; agreementFormsGroup.find('form').each( function(){ - $(this).validation(); - isAgreementValid = isAgreementValid && $(this).validation && $(this).validation('isValid'); + isAgreementValid = $(this).validation() && $(this).validation('isValid') && isAgreementValid; } ); -- GitLab From 4633ab9256b90956d601c1abe4982ab2ad138944 Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Thu, 8 Jan 2015 17:14:16 +0200 Subject: [PATCH 017/114] MAGETWO-32078: Validation for Terms and Conditions should be the same for OnePage Checkout and Multishipping Flow --- .../Customer/Test/Repository/CustomerInjectable.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerInjectable.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerInjectable.php index 9a0b737ef27..85cd7002a59 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerInjectable.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerInjectable.php @@ -115,5 +115,15 @@ class CustomerInjectable extends AbstractRepository 'password_confirmation' => '123123q', 'address' => ['presets' => 'US_address_TX'], ]; + + $this->_data['johndoe_with_multiple_addresses'] = [ + 'firstname' => 'John', + 'lastname' => 'Doe', + 'group_id' => ['dataSet' => 'General'], + 'email' => 'JohnDoe_%isolation%@example.com', + 'password' => '123123q', + 'password_confirmation' => '123123q', + 'address' => ['presets' => 'US_address, US_address'], + ]; } } -- GitLab From 01a9fc529f67d2762952058be7884e05c28824bc Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Fri, 9 Jan 2015 17:06:27 +0200 Subject: [PATCH 018/114] MAGETWO-32078: Validation for Terms and Conditions should be the same for OnePage Checkout and Multishipping Flow --- .../Catalog/view/frontend/templates/product/view/form.phtml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml index 34f04d40531..b2754ebd1d9 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml @@ -35,8 +35,7 @@ <script type="text/javascript"> require([ 'jquery', - 'Magento_Catalog/js/price-box', - 'Magento_Catalog/product/view/validation' + 'Magento_Catalog/js/price-box' ], function($){ var priceBoxes = $('[data-role=priceBox]'); -- GitLab From 238860fe779434a07de63c141d673e204c6fafb8 Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Fri, 9 Jan 2015 18:34:25 +0200 Subject: [PATCH 019/114] MAGETWO-31575: Remove black/white lists from file system and builds configuration - make tests to work with several files with changes --- .../TestFramework/Utility/ChangedFiles.php | 9 +++++++- .../Magento/Test/Legacy/ObsoleteCodeTest.php | 2 +- .../Magento/Test/Php/LiveCodeTest.php | 23 +++++++++++-------- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php b/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php index 12f30777c88..2bb78abdba7 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php +++ b/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php @@ -5,6 +5,8 @@ namespace Magento\TestFramework\Utility; +use Magento\Framework\Test\Utility\Files; + /** * A helper to gather various changed files * if INCREMENTAL_BUILD env variable is set by CI build infrastructure, only files changed in the @@ -23,7 +25,12 @@ class ChangedFiles $fileHelper = \Magento\Framework\Test\Utility\Files::init(); $allPhpFiles = $fileHelper->getPhpFiles(); if (isset($_ENV['INCREMENTAL_BUILD'])) { - $phpFiles = file($changedFilesList, FILE_IGNORE_NEW_LINES); + try { + $phpFiles = Files::readLists($changedFilesList); + } catch (\Exception $e){ + $phpFiles = []; + } + foreach ($phpFiles as $key => $phpFile) { $phpFiles[$key] = $fileHelper->getPathToSource() . '/' . $phpFile; } diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php index d70d167aec5..5409481f3bd 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php @@ -129,7 +129,7 @@ class ObsoleteCodeTest extends \PHPUnit_Framework_TestCase $this->_testObsoleteConstants($content); $this->_testObsoletePropertySkipCalculate($content); }, - \Magento\TestFramework\Utility\ChangedFiles::getPhpFiles(__DIR__ . '/_files/changed_files.txt') + \Magento\TestFramework\Utility\ChangedFiles::getPhpFiles(__DIR__ . '/_files/changed_files') ); } diff --git a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php index cf45282b97a..bdace23da6a 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php @@ -52,17 +52,22 @@ class LiveCodeTest extends PHPUnit_Framework_TestCase { $directoriesToCheck = file(__DIR__ . '/_files/whitelist/whitelist.txt', FILE_IGNORE_NEW_LINES); - $changedFiles = array_filter( - Utility\Files::readLists(__DIR__ . '/_files/changed_files.txt'), - function ($path) use ($directoriesToCheck) { - foreach ($directoriesToCheck as $directory) { - if (strpos($path, BP . '/' . $directory) === 0) { - return true; + try { + $changedFiles = array_filter( + Utility\Files::readLists(__DIR__ . '/_files/changed_files'), + function ($path) use ($directoriesToCheck) { + foreach ($directoriesToCheck as $directory) { + if (strpos($path, BP . '/' . $directory) === 0) { + return true; + } } + return false; } - return false; - } - ); + ); + } catch (\Exception $e) { + $changedFiles = []; + } + if (!empty($fileTypes)) { $changedFiles = array_filter( $changedFiles, -- GitLab From 67adf6bde988192d1828668b410e037d6c161b2b Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Fri, 9 Jan 2015 18:38:57 +0200 Subject: [PATCH 020/114] MAGETWO-31575: Remove black/white lists from file system and builds configuration - added whitelist --- dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php index bdace23da6a..42bf38ba1c0 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php @@ -50,7 +50,7 @@ class LiveCodeTest extends PHPUnit_Framework_TestCase */ public static function getWhitelist($fileTypes = ['php']) { - $directoriesToCheck = file(__DIR__ . '/_files/whitelist/whitelist.txt', FILE_IGNORE_NEW_LINES); + $directoriesToCheck = file(__DIR__ . '/_files/whitelist/common.txt', FILE_IGNORE_NEW_LINES); try { $changedFiles = array_filter( -- GitLab From fc0095909cc60285af2ba08318316b1322360bb3 Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Fri, 9 Jan 2015 18:44:05 +0200 Subject: [PATCH 021/114] MAGETWO-31575: Remove black/white lists from file system and builds configuration - removed dataprovider --- dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php index 42bf38ba1c0..7638669ece1 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php @@ -159,11 +159,9 @@ class LiveCodeTest extends PHPUnit_Framework_TestCase /** * Run mess detector on code * - * @param array $whiteList * @return void - * @dataProvider whiteListDataProvider */ - public function testCodeMess($whiteList) + public function testCodeMess() { $reportFile = self::$reportDir . '/phpmd_report.xml'; $codeMessDetector = new CodeMessDetector(realpath(__DIR__ . '/_files/phpmd/ruleset.xml'), $reportFile); -- GitLab From e7a08788c25783dfe0531ce132f90699f5354bb7 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Tue, 13 Jan 2015 11:06:20 +0200 Subject: [PATCH 022/114] MAGETWO-30689: [Service Layer Refactor]: PaymentMethods Service --- .../Magento/Checkout/Api/BillingAddressManagementInterface.php | 3 ++- app/code/Magento/Checkout/Api/CartItemRepositoryInterface.php | 3 ++- app/code/Magento/Checkout/Api/CartManagementInterface.php | 3 ++- app/code/Magento/Checkout/Api/CartRepositoryInterface.php | 3 ++- app/code/Magento/Checkout/Api/CartTotalRepositoryInterface.php | 3 ++- app/code/Magento/Checkout/Api/Data/AddressInterface.php | 3 ++- app/code/Magento/Checkout/Api/Data/CartInterface.php | 3 ++- app/code/Magento/Checkout/Api/Data/CartItemInterface.php | 3 ++- .../Magento/Checkout/Api/Data/CartSearchResultsInterface.php | 3 ++- app/code/Magento/Checkout/Api/Data/CurrencyInterface.php | 3 ++- app/code/Magento/Checkout/Api/Data/CustomerInterface.php | 3 ++- app/code/Magento/Checkout/Api/Data/PaymentMethodInterface.php | 3 ++- app/code/Magento/Checkout/Api/Data/ShippingMethodInterface.php | 3 ++- app/code/Magento/Checkout/Api/Data/TotalsInterface.php | 3 ++- app/code/Magento/Checkout/Api/Data/TotalsItemInterface.php | 3 ++- .../Magento/Checkout/Api/PaymentMethodManagementInterface.php | 3 ++- .../Checkout/Api/ShippingAddressManagementInterface.php | 3 ++- .../Magento/Checkout/Api/ShippingMethodManagementInterface.php | 3 ++- 18 files changed, 36 insertions(+), 18 deletions(-) diff --git a/app/code/Magento/Checkout/Api/BillingAddressManagementInterface.php b/app/code/Magento/Checkout/Api/BillingAddressManagementInterface.php index e8fa596345f..bb48d950b57 100644 --- a/app/code/Magento/Checkout/Api/BillingAddressManagementInterface.php +++ b/app/code/Magento/Checkout/Api/BillingAddressManagementInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\Checkout\Api; diff --git a/app/code/Magento/Checkout/Api/CartItemRepositoryInterface.php b/app/code/Magento/Checkout/Api/CartItemRepositoryInterface.php index 3c993cd1905..94cb23b93c2 100644 --- a/app/code/Magento/Checkout/Api/CartItemRepositoryInterface.php +++ b/app/code/Magento/Checkout/Api/CartItemRepositoryInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\Checkout\Api; diff --git a/app/code/Magento/Checkout/Api/CartManagementInterface.php b/app/code/Magento/Checkout/Api/CartManagementInterface.php index 0a58fd204f0..210f9b2fdc2 100644 --- a/app/code/Magento/Checkout/Api/CartManagementInterface.php +++ b/app/code/Magento/Checkout/Api/CartManagementInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\Checkout\Api; diff --git a/app/code/Magento/Checkout/Api/CartRepositoryInterface.php b/app/code/Magento/Checkout/Api/CartRepositoryInterface.php index a4eaa870e90..1b666a02d8d 100644 --- a/app/code/Magento/Checkout/Api/CartRepositoryInterface.php +++ b/app/code/Magento/Checkout/Api/CartRepositoryInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\Checkout\Api; diff --git a/app/code/Magento/Checkout/Api/CartTotalRepositoryInterface.php b/app/code/Magento/Checkout/Api/CartTotalRepositoryInterface.php index 09e32fa0ebb..213e6649c94 100644 --- a/app/code/Magento/Checkout/Api/CartTotalRepositoryInterface.php +++ b/app/code/Magento/Checkout/Api/CartTotalRepositoryInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\Checkout\Api; diff --git a/app/code/Magento/Checkout/Api/Data/AddressInterface.php b/app/code/Magento/Checkout/Api/Data/AddressInterface.php index fe89e1cdccd..0a0dbbfe8c1 100644 --- a/app/code/Magento/Checkout/Api/Data/AddressInterface.php +++ b/app/code/Magento/Checkout/Api/Data/AddressInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\Checkout\Api\Data; diff --git a/app/code/Magento/Checkout/Api/Data/CartInterface.php b/app/code/Magento/Checkout/Api/Data/CartInterface.php index 3d17775da42..459acd3beb9 100644 --- a/app/code/Magento/Checkout/Api/Data/CartInterface.php +++ b/app/code/Magento/Checkout/Api/Data/CartInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\Checkout\Api\Data; diff --git a/app/code/Magento/Checkout/Api/Data/CartItemInterface.php b/app/code/Magento/Checkout/Api/Data/CartItemInterface.php index 765393da8cb..4a3295902b6 100644 --- a/app/code/Magento/Checkout/Api/Data/CartItemInterface.php +++ b/app/code/Magento/Checkout/Api/Data/CartItemInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\Checkout\Api\Data; diff --git a/app/code/Magento/Checkout/Api/Data/CartSearchResultsInterface.php b/app/code/Magento/Checkout/Api/Data/CartSearchResultsInterface.php index 22d655a6d1a..ada2abf281c 100644 --- a/app/code/Magento/Checkout/Api/Data/CartSearchResultsInterface.php +++ b/app/code/Magento/Checkout/Api/Data/CartSearchResultsInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\Checkout\Api\Data; diff --git a/app/code/Magento/Checkout/Api/Data/CurrencyInterface.php b/app/code/Magento/Checkout/Api/Data/CurrencyInterface.php index 3d4e4c8c6b6..90db76ae2ee 100644 --- a/app/code/Magento/Checkout/Api/Data/CurrencyInterface.php +++ b/app/code/Magento/Checkout/Api/Data/CurrencyInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\Checkout\Api\Data; diff --git a/app/code/Magento/Checkout/Api/Data/CustomerInterface.php b/app/code/Magento/Checkout/Api/Data/CustomerInterface.php index 0628ae3dc3c..32c3eec48d3 100644 --- a/app/code/Magento/Checkout/Api/Data/CustomerInterface.php +++ b/app/code/Magento/Checkout/Api/Data/CustomerInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\Checkout\Api\Data; diff --git a/app/code/Magento/Checkout/Api/Data/PaymentMethodInterface.php b/app/code/Magento/Checkout/Api/Data/PaymentMethodInterface.php index a7534f6165b..8a37f95e281 100644 --- a/app/code/Magento/Checkout/Api/Data/PaymentMethodInterface.php +++ b/app/code/Magento/Checkout/Api/Data/PaymentMethodInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\Checkout\Api\Data; diff --git a/app/code/Magento/Checkout/Api/Data/ShippingMethodInterface.php b/app/code/Magento/Checkout/Api/Data/ShippingMethodInterface.php index e0538da5d3d..1817099b328 100644 --- a/app/code/Magento/Checkout/Api/Data/ShippingMethodInterface.php +++ b/app/code/Magento/Checkout/Api/Data/ShippingMethodInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\Checkout\Api\Data; diff --git a/app/code/Magento/Checkout/Api/Data/TotalsInterface.php b/app/code/Magento/Checkout/Api/Data/TotalsInterface.php index 5ae5532b54f..0b7df0663c3 100644 --- a/app/code/Magento/Checkout/Api/Data/TotalsInterface.php +++ b/app/code/Magento/Checkout/Api/Data/TotalsInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\Checkout\Api\Data; diff --git a/app/code/Magento/Checkout/Api/Data/TotalsItemInterface.php b/app/code/Magento/Checkout/Api/Data/TotalsItemInterface.php index f0cf7813178..a9134b35728 100644 --- a/app/code/Magento/Checkout/Api/Data/TotalsItemInterface.php +++ b/app/code/Magento/Checkout/Api/Data/TotalsItemInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\Checkout\Api\Data; diff --git a/app/code/Magento/Checkout/Api/PaymentMethodManagementInterface.php b/app/code/Magento/Checkout/Api/PaymentMethodManagementInterface.php index ef86e853e17..f8727f140c6 100644 --- a/app/code/Magento/Checkout/Api/PaymentMethodManagementInterface.php +++ b/app/code/Magento/Checkout/Api/PaymentMethodManagementInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\Checkout\Api; diff --git a/app/code/Magento/Checkout/Api/ShippingAddressManagementInterface.php b/app/code/Magento/Checkout/Api/ShippingAddressManagementInterface.php index 01897a39ec8..5676a01a387 100644 --- a/app/code/Magento/Checkout/Api/ShippingAddressManagementInterface.php +++ b/app/code/Magento/Checkout/Api/ShippingAddressManagementInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\Checkout\Api; diff --git a/app/code/Magento/Checkout/Api/ShippingMethodManagementInterface.php b/app/code/Magento/Checkout/Api/ShippingMethodManagementInterface.php index 0808c581fbc..b07e32ecaae 100644 --- a/app/code/Magento/Checkout/Api/ShippingMethodManagementInterface.php +++ b/app/code/Magento/Checkout/Api/ShippingMethodManagementInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\Checkout\Api; -- GitLab From b1a682dd8c5ce32d3166f21966b04181fdced670 Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Tue, 13 Jan 2015 17:20:49 +0200 Subject: [PATCH 023/114] MAGETWO-31575: Remove black/white lists from file system and builds configuration - ObsoleteCodeTest and LiveCodeTest optimized --- .../TestFramework/Utility/ChangedFiles.php | 17 +++++--------- .../Magento/Test/Legacy/ObsoleteCodeTest.php | 2 +- .../Magento/Test/Php/LiveCodeTest.php | 22 ++++++++----------- .../Magento/Framework/Test/Utility/Files.php | 2 +- 4 files changed, 16 insertions(+), 27 deletions(-) diff --git a/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php b/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php index 2bb78abdba7..c2e1b911fa4 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php +++ b/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php @@ -23,21 +23,14 @@ class ChangedFiles public static function getPhpFiles($changedFilesList) { $fileHelper = \Magento\Framework\Test\Utility\Files::init(); - $allPhpFiles = $fileHelper->getPhpFiles(); if (isset($_ENV['INCREMENTAL_BUILD'])) { - try { - $phpFiles = Files::readLists($changedFilesList); - } catch (\Exception $e){ - $phpFiles = []; + $phpFiles = Files::readLists($changedFilesList); + if (!empty($phpFiles)) { + $phpFiles = \Magento\Framework\Test\Utility\Files::composeDataSets($phpFiles); + $phpFiles = array_intersect_key($phpFiles, $fileHelper->getPhpFiles()); } - - foreach ($phpFiles as $key => $phpFile) { - $phpFiles[$key] = $fileHelper->getPathToSource() . '/' . $phpFile; - } - $phpFiles = \Magento\Framework\Test\Utility\Files::composeDataSets($phpFiles); - $phpFiles = array_intersect_key($phpFiles, $allPhpFiles); } else { - $phpFiles = $allPhpFiles; + $phpFiles = $fileHelper->getPhpFiles(); } return $phpFiles; diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php index 5409481f3bd..6ea7b09b0ec 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php @@ -129,7 +129,7 @@ class ObsoleteCodeTest extends \PHPUnit_Framework_TestCase $this->_testObsoleteConstants($content); $this->_testObsoletePropertySkipCalculate($content); }, - \Magento\TestFramework\Utility\ChangedFiles::getPhpFiles(__DIR__ . '/_files/changed_files') + \Magento\TestFramework\Utility\ChangedFiles::getPhpFiles(__DIR__ . '/_files/changed_files*') ); } diff --git a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php index 7638669ece1..e87c0716f88 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php @@ -52,21 +52,17 @@ class LiveCodeTest extends PHPUnit_Framework_TestCase { $directoriesToCheck = file(__DIR__ . '/_files/whitelist/common.txt', FILE_IGNORE_NEW_LINES); - try { - $changedFiles = array_filter( - Utility\Files::readLists(__DIR__ . '/_files/changed_files'), - function ($path) use ($directoriesToCheck) { - foreach ($directoriesToCheck as $directory) { - if (strpos($path, BP . '/' . $directory) === 0) { - return true; - } + $changedFiles = array_filter( + Utility\Files::readLists(__DIR__ . '/_files/changed_files*'), + function ($path) use ($directoriesToCheck) { + foreach ($directoriesToCheck as $directory) { + if (strpos($path, BP . '/' . $directory) === 0) { + return true; } - return false; } - ); - } catch (\Exception $e) { - $changedFiles = []; - } + return false; + } + ); if (!empty($fileTypes)) { $changedFiles = array_filter( diff --git a/lib/internal/Magento/Framework/Test/Utility/Files.php b/lib/internal/Magento/Framework/Test/Utility/Files.php index becc11b1899..3f485a91abb 100644 --- a/lib/internal/Magento/Framework/Test/Utility/Files.php +++ b/lib/internal/Magento/Framework/Test/Utility/Files.php @@ -1068,7 +1068,7 @@ class Files */ $files = glob(self::init()->getPathToSource() . '/' . $pattern, GLOB_BRACE); if (empty($files)) { - throw new \Exception("The glob() pattern '{$pattern}' didn't return any result."); + continue; } $result = array_merge($result, $files); } -- GitLab From cb350a2170fd54f3207bedc83325d54cc50bad95 Mon Sep 17 00:00:00 2001 From: Olexii Korshenko <okorshenko@ebay.com> Date: Tue, 13 Jan 2015 18:46:38 +0200 Subject: [PATCH 024/114] MAGETWO-32537: Implement Checkout Shipping Methods related interfaces - replaced Service classes with new API interfaces --- .../Api/Data/ShippingMethodInterface.php | 35 ++++++ .../Api/ShippingMethodManagementInterface.php | 5 +- .../V1/Data => Model}/Cart/ShippingMethod.php | 42 +------- .../Cart/ShippingMethodConverter.php | 8 +- .../ShippingMethodManagement.php} | 100 ++++++++++++------ .../ShippingMethod/ReadServiceInterface.php | 36 ------- .../V1/ShippingMethod/WriteService.php | 92 ---------------- .../ShippingMethod/WriteServiceInterface.php | 28 ----- app/code/Magento/Checkout/etc/di.xml | 4 +- app/code/Magento/Checkout/etc/webapi.xml | 6 +- app/code/Magento/Quote/Model/Quote.php | 98 ----------------- 11 files changed, 119 insertions(+), 335 deletions(-) rename app/code/Magento/Checkout/{Service/V1/Data => Model}/Cart/ShippingMethod.php (72%) rename app/code/Magento/Checkout/{Service/V1/Data => Model}/Cart/ShippingMethodConverter.php (87%) rename app/code/Magento/Checkout/{Service/V1/ShippingMethod/ReadService.php => Model/ShippingMethodManagement.php} (50%) delete mode 100644 app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceInterface.php delete mode 100644 app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteService.php delete mode 100644 app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceInterface.php diff --git a/app/code/Magento/Checkout/Api/Data/ShippingMethodInterface.php b/app/code/Magento/Checkout/Api/Data/ShippingMethodInterface.php index 1817099b328..5af5f896f0a 100644 --- a/app/code/Magento/Checkout/Api/Data/ShippingMethodInterface.php +++ b/app/code/Magento/Checkout/Api/Data/ShippingMethodInterface.php @@ -10,6 +10,41 @@ namespace Magento\Checkout\Api\Data; */ interface ShippingMethodInterface extends \Magento\Framework\Api\ExtensibleDataInterface { + /** + * Shipping carrier code. + */ + const CARRIER_CODE = 'carrier_code'; + + /** + * Shipping method code. + */ + const METHOD_CODE = 'method_code'; + + /** + * Shipping carrier title. + */ + const CARRIER_TITLE = 'carrier_title'; + + /** + * Shipping method title. + */ + const METHOD_TITLE = 'method_title'; + + /** + * Shipping amount in store currency. + */ + const SHIPPING_AMOUNT = 'amount'; + + /** + * Shipping amount in base currency. + */ + const BASE_SHIPPING_AMOUNT = 'base_amount'; + + /** + * Available. + */ + const AVAILABLE = 'available'; + /** * Returns the shipping carrier code. * diff --git a/app/code/Magento/Checkout/Api/ShippingMethodManagementInterface.php b/app/code/Magento/Checkout/Api/ShippingMethodManagementInterface.php index b07e32ecaae..5edd8e06270 100644 --- a/app/code/Magento/Checkout/Api/ShippingMethodManagementInterface.php +++ b/app/code/Magento/Checkout/Api/ShippingMethodManagementInterface.php @@ -18,7 +18,6 @@ interface ShippingMethodManagementInterface * @throws \Magento\Framework\Exception\CouldNotSaveException The shipping method could not be saved. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart contains only virtual products so the shipping method does not apply. * @throws \Magento\Framework\Exception\StateException The billing or shipping address is not set. - * @see \Magento\Checkout\Service\V1\ShippingMethod\WriteServiceInterface::setMethod */ public function set($cartId, $carrierCode, $methodCode); @@ -26,10 +25,9 @@ interface ShippingMethodManagementInterface * Returns selected shipping method for a specified quote. * * @param int $cartId The shopping cart ID. - * @return \Magento\Checkout\Api\Data\ShippingMethodInterface Shipping method. + * @return \Magento\Checkout\Api\Data\ShippingMethodInterface|null Shipping method. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified shopping cart does not exist. * @throws \Magento\Framework\Exception\StateException The shipping address is not set. - * @see \Magento\Checkout\Service\V1\ShippingMethod\ReadServiceInterface::getMethod */ public function get($cartId); @@ -40,7 +38,6 @@ interface ShippingMethodManagementInterface * @return \Magento\Checkout\Api\Data\ShippingMethodInterface[] An array of shipping methods. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified quote does not exist. * @throws \Magento\Framework\Exception\StateException The shipping address is not set. - * @see \Magento\Checkout\Service\V1\ShippingMethod\ReadServiceInterface::getList */ public function getList($cartId); } diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php b/app/code/Magento/Checkout/Model/Cart/ShippingMethod.php similarity index 72% rename from app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php rename to app/code/Magento/Checkout/Model/Cart/ShippingMethod.php index 2b0d921bdfa..daa6b6f8a12 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php +++ b/app/code/Magento/Checkout/Model/Cart/ShippingMethod.php @@ -3,50 +3,18 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\Data\Cart; +namespace Magento\Checkout\Model\Cart; + +use Magento\Checkout\Api\Data\ShippingMethodInterface; /** * Quote shipping method data. * * @codeCoverageIgnore */ -class ShippingMethod extends \Magento\Framework\Api\AbstractExtensibleObject +class ShippingMethod extends \Magento\Framework\Api\AbstractExtensibleObject implements + ShippingMethodInterface { - /** - * Shipping carrier code. - */ - const CARRIER_CODE = 'carrier_code'; - - /** - * Shipping method code. - */ - const METHOD_CODE = 'method_code'; - - /** - * Shipping carrier title. - */ - const CARRIER_TITLE = 'carrier_title'; - - /** - * Shipping method title. - */ - const METHOD_TITLE = 'method_title'; - - /** - * Shipping amount in store currency. - */ - const SHIPPING_AMOUNT = 'amount'; - - /** - * Shipping amount in base currency. - */ - const BASE_SHIPPING_AMOUNT = 'base_amount'; - - /** - * Available. - */ - const AVAILABLE = 'available'; - /** * Returns the shipping carrier code. * diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethodConverter.php b/app/code/Magento/Checkout/Model/Cart/ShippingMethodConverter.php similarity index 87% rename from app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethodConverter.php rename to app/code/Magento/Checkout/Model/Cart/ShippingMethodConverter.php index b232b4629de..9e14243fce6 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethodConverter.php +++ b/app/code/Magento/Checkout/Model/Cart/ShippingMethodConverter.php @@ -3,7 +3,7 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\Data\Cart; +namespace Magento\Checkout\Model\Cart; /** * Quote shipping method data. @@ -15,18 +15,18 @@ class ShippingMethodConverter /** * Shipping method builder. * - * @var ShippingMethodBuilder + * @var \Magento\Checkout\Api\Data\ShippingMethodDataBuilder */ protected $builder; /** * Constructs a shipping method builder object. * - * @param ShippingMethodBuilder $builder Shipping method builder. + * @param \Magento\Checkout\Api\Data\ShippingMethodDataBuilder $builder Shipping method builder. * @param \Magento\Store\Model\StoreManagerInterface $storeManager Store manager interface. */ public function __construct( - \Magento\Checkout\Service\V1\Data\Cart\ShippingMethodBuilder $builder, + \Magento\Checkout\Api\Data\ShippingMethodDataBuilder $builder, \Magento\Store\Model\StoreManagerInterface $storeManager ) { $this->builder = $builder; diff --git a/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadService.php b/app/code/Magento/Checkout/Model/ShippingMethodManagement.php similarity index 50% rename from app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadService.php rename to app/code/Magento/Checkout/Model/ShippingMethodManagement.php index f0a8c56201a..f62969bd5e5 100644 --- a/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadService.php +++ b/app/code/Magento/Checkout/Model/ShippingMethodManagement.php @@ -4,19 +4,21 @@ * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\ShippingMethod; +namespace Magento\Checkout\Model; -use Magento\Checkout\Service\V1\Data\Cart\ShippingMethod; -use Magento\Checkout\Service\V1\Data\Cart\ShippingMethodBuilder; -use Magento\Checkout\Service\V1\Data\Cart\ShippingMethodConverter; use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\StateException; use Magento\Quote\Model\QuoteRepository; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Exception\CouldNotSaveException; +use Magento\Checkout\Api\ShippingMethodManagementInterface; +use Magento\Checkout\Api\Data\ShippingMethodInterface; + /** * Shipping method read service. */ -class ReadService implements ReadServiceInterface +class ShippingMethodManagement implements ShippingMethodManagementInterface { /** * Quote repository. @@ -28,14 +30,14 @@ class ReadService implements ReadServiceInterface /** * Shipping method builder. * - * @var \Magento\Checkout\Service\V1\Data\Cart\ShippingMethodBuilder + * @var \Magento\Checkout\Api\Data\ShippingMethodDataBuilder */ protected $methodBuilder; /** - * Shipping method converter. + * Shipping method converter * - * @var ShippingMethodConverter + * @var \Magento\Checkout\Model\Cart\ShippingMethodConverter */ protected $converter; @@ -43,28 +45,23 @@ class ReadService implements ReadServiceInterface * Constructs a shipping method read service object. * * @param QuoteRepository $quoteRepository Quote repository. - * @param ShippingMethodConverter $converter Shipping method converter. - * @param \Magento\Checkout\Service\V1\Data\Cart\ShippingMethodBuilder $methodBuilder Shipping method builder. + * @param \Magento\Checkout\Api\Data\ShippingMethodDataBuilder $methodBuilder Shipping method builder. + * @param \Magento\Checkout\Model\Cart\ShippingMethodConverter $converter Shipping method builder converter. */ public function __construct( QuoteRepository $quoteRepository, - ShippingMethodConverter $converter, - \Magento\Checkout\Service\V1\Data\Cart\ShippingMethodBuilder $methodBuilder + \Magento\Checkout\Api\Data\ShippingMethodDataBuilder $methodBuilder, + \Magento\Checkout\Model\Cart\ShippingMethodConverter $converter ) { $this->quoteRepository = $quoteRepository; - $this->converter = $converter; $this->methodBuilder = $methodBuilder; + $this->converter = $converter; } /** * {@inheritDoc} - * - * @param int $cartId The shopping cart ID. - * @return \Magento\Checkout\Service\V1\Data\Cart\ShippingMethod Shipping method. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified shopping cart does not exist. - * @throws \Magento\Framework\Exception\StateException The shipping address is not set. */ - public function getMethod($cartId) + public function get($cartId) { /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->quoteRepository->getActive($cartId); @@ -84,13 +81,13 @@ class ReadService implements ReadServiceInterface list($carrierTitle, $methodTitle) = $this->divideNames(' - ', $shippingAddress->getShippingDescription()); $output = [ - ShippingMethod::CARRIER_CODE => $carrierCode, - ShippingMethod::METHOD_CODE => $methodCode, - ShippingMethod::CARRIER_TITLE => $carrierTitle, - ShippingMethod::METHOD_TITLE => $methodTitle, - ShippingMethod::SHIPPING_AMOUNT => $shippingAddress->getShippingAmount(), - ShippingMethod::BASE_SHIPPING_AMOUNT => $shippingAddress->getBaseShippingAmount(), - ShippingMethod::AVAILABLE => true, + ShippingMethodInterface::CARRIER_CODE => $carrierCode, + ShippingMethodInterface::METHOD_CODE => $methodCode, + ShippingMethodInterface::CARRIER_TITLE => $carrierTitle, + ShippingMethodInterface::METHOD_TITLE => $methodTitle, + ShippingMethodInterface::SHIPPING_AMOUNT => $shippingAddress->getShippingAmount(), + ShippingMethodInterface::BASE_SHIPPING_AMOUNT => $shippingAddress->getBaseShippingAmount(), + ShippingMethodInterface::AVAILABLE => true, ]; return $this->methodBuilder->populateWithArray($output)->create(); @@ -114,11 +111,6 @@ class ReadService implements ReadServiceInterface /** * {@inheritDoc} - * - * @param int $cartId The shopping cart ID. - * @return \Magento\Checkout\Service\V1\Data\Cart\ShippingMethod[] An array of shipping methods. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified quote does not exist. - * @throws \Magento\Framework\Exception\StateException The shipping address is not set. */ public function getList($cartId) { @@ -145,4 +137,50 @@ class ReadService implements ReadServiceInterface } return $output; } + + /** + * {@inheritDoc} + * + * @param int $cartId The shopping cart ID. + * @param string $carrierCode The carrier code. + * @param string $methodCode The shipping method code. + * @return bool + * @throws \Magento\Framework\Exception\InputException The shipping method is not valid for an empty cart. + * @throws \Magento\Framework\Exception\CouldNotSaveException The shipping method could not be saved. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart contains only virtual products and the shipping method is not applicable. + * @throws \Magento\Framework\Exception\StateException The billing or shipping address is not set. + */ + public function set($cartId, $carrierCode, $methodCode) + { + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->quoteRepository->getActive($cartId); + if (0 == $quote->getItemsCount()) { + throw new InputException('Shipping method is not applicable for empty cart'); + } + + if ($quote->isVirtual()) { + throw new NoSuchEntityException( + 'Cart contains virtual product(s) only. Shipping method is not applicable.' + ); + } + $shippingAddress = $quote->getShippingAddress(); + if (!$shippingAddress->getCountryId()) { + throw new StateException('Shipping address is not set'); + } + $billingAddress = $quote->getBillingAddress(); + if (!$billingAddress->getCountryId()) { + throw new StateException('Billing address is not set'); + } + + $shippingAddress->setShippingMethod($carrierCode . '_' . $methodCode); + if (!$shippingAddress->requestShippingRates()) { + throw new NoSuchEntityException('Carrier with such method not found: ' . $carrierCode . ', ' . $methodCode); + } + try { + $this->quoteRepository->save($quote->collectTotals()); + } catch (\Exception $e) { + throw new CouldNotSaveException('Cannot set shipping method. ' . $e->getMessage()); + } + return true; + } } diff --git a/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceInterface.php deleted file mode 100644 index 3f53cc4c832..00000000000 --- a/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceInterface.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\ShippingMethod; - -/** - * Quote shipping method read service interface. - */ -interface ReadServiceInterface -{ - /** - * Returns selected shipping method for a specified quote. - * - * @param int $cartId The shopping cart ID. - * @return \Magento\Checkout\Service\V1\Data\Cart\ShippingMethod Shipping method. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified shopping cart does not exist. - * @throws \Magento\Framework\Exception\StateException The shipping address is not set. - * @deprecated - * @see \Magento\Checkout\Api\ShippingMethodManagementInterface::get - */ - public function getMethod($cartId); - - /** - * Lists applicable shipping methods for a specified quote. - * - * @param int $cartId The shopping cart ID. - * @return \Magento\Checkout\Service\V1\Data\Cart\ShippingMethod[] An array of shipping methods. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified quote does not exist. - * @throws \Magento\Framework\Exception\StateException The shipping address is not set. - * @deprecated - * @see \Magento\Checkout\Api\ShippingMethodManagementInterface::getList - */ - public function getList($cartId); -} diff --git a/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteService.php b/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteService.php deleted file mode 100644 index bfccc0f3dc5..00000000000 --- a/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteService.php +++ /dev/null @@ -1,92 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\ShippingMethod; - -use Magento\Framework\Exception\CouldNotSaveException; -use Magento\Framework\Exception\InputException; -use Magento\Framework\Exception\NoSuchEntityException; -use Magento\Framework\Exception\StateException; -use Magento\Quote\Model\QuoteRepository; - -/** - * Shipping method write service object. - */ -class WriteService implements WriteServiceInterface -{ - /** - * Address factory. - * - * @var \Magento\Quote\Model\Quote\AddressFactory - */ - protected $addressFactory; - - /** - * Quote repository. - * - * @var QuoteRepository - */ - protected $quoteRepository; - - /** - * Constructs a shipping method write service object. - * - * @param \Magento\Quote\Model\Quote\AddressFactory $addressFactory Address factory. - * @param QuoteRepository $quoteRepository Quote repository. - */ - public function __construct( - \Magento\Quote\Model\Quote\AddressFactory $addressFactory, - QuoteRepository $quoteRepository - ) { - $this->addressFactory = $addressFactory; - $this->quoteRepository = $quoteRepository; - } - - /** - * {@inheritDoc} - * - * @param int $cartId The shopping cart ID. - * @param string $carrierCode The carrier code. - * @param string $methodCode The shipping method code. - * @return bool - * @throws \Magento\Framework\Exception\InputException The shipping method is not valid for an empty cart. - * @throws \Magento\Framework\Exception\CouldNotSaveException The shipping method could not be saved. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart contains only virtual products and the shipping method is not applicable. - * @throws \Magento\Framework\Exception\StateException The billing or shipping address is not set. - */ - public function setMethod($cartId, $carrierCode, $methodCode) - { - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->quoteRepository->getActive($cartId); - if (0 == $quote->getItemsCount()) { - throw new InputException('Shipping method is not applicable for empty cart'); - } - - if ($quote->isVirtual()) { - throw new NoSuchEntityException( - 'Cart contains virtual product(s) only. Shipping method is not applicable.' - ); - } - $shippingAddress = $quote->getShippingAddress(); - if (!$shippingAddress->getCountryId()) { - throw new StateException('Shipping address is not set'); - } - $billingAddress = $quote->getBillingAddress(); - if (!$billingAddress->getCountryId()) { - throw new StateException('Billing address is not set'); - } - - $shippingAddress->setShippingMethod($carrierCode . '_' . $methodCode); - if (!$shippingAddress->requestShippingRates()) { - throw new NoSuchEntityException('Carrier with such method not found: ' . $carrierCode . ', ' . $methodCode); - } - try { - $this->quoteRepository->save($quote->collectTotals()); - } catch (\Exception $e) { - throw new CouldNotSaveException('Cannot set shipping method. ' . $e->getMessage()); - } - return true; - } -} diff --git a/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceInterface.php deleted file mode 100644 index cb2d68e9e83..00000000000 --- a/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceInterface.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\ShippingMethod; - -/** - * Interface to choose the shipping method for a cart address. - */ -interface WriteServiceInterface -{ - /** - * Sets the carrier and shipping methods codes for a specified cart. - * - * @param int $cartId The shopping cart ID. - * @param string $carrierCode The carrier code. - * @param string $methodCode The shipping method code. - * @return bool - * @throws \Magento\Framework\Exception\InputException The shipping method is not valid for an empty cart. - * @throws \Magento\Framework\Exception\CouldNotSaveException The shipping method could not be saved. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart contains only virtual products so the shipping method does not apply. - * @throws \Magento\Framework\Exception\StateException The billing or shipping address is not set. - * @deprecated - * @see \Magento\Checkout\Api\ShippingMethodManagementInterface::set - */ - public function setMethod($cartId, $carrierCode, $methodCode); -} diff --git a/app/code/Magento/Checkout/etc/di.xml b/app/code/Magento/Checkout/etc/di.xml index 33ae407c993..c12e622a3f6 100644 --- a/app/code/Magento/Checkout/etc/di.xml +++ b/app/code/Magento/Checkout/etc/di.xml @@ -32,10 +32,10 @@ <preference for="Magento\Checkout\Service\V1\Cart\ReadServiceInterface" type="Magento\Checkout\Service\V1\Cart\ReadService" /> <preference for="Magento\Checkout\Service\V1\Cart\TotalsServiceInterface" type="Magento\Checkout\Service\V1\Cart\TotalsService" /> <preference for="\Magento\Checkout\Service\V1\Cart\WriteServiceInterface" type="Magento\Checkout\Service\V1\Cart\WriteService" /> - <preference for="Magento\Checkout\Service\V1\ShippingMethod\WriteServiceInterface" type="Magento\Checkout\Service\V1\ShippingMethod\WriteService" /> <preference for="Magento\Checkout\Service\V1\Coupon\ReadServiceInterface" type="Magento\Checkout\Service\V1\Coupon\ReadService" /> <preference for="Magento\Checkout\Service\V1\Coupon\WriteServiceInterface" type="Magento\Checkout\Service\V1\Coupon\WriteService" /> - <preference for="Magento\Checkout\Service\V1\ShippingMethod\ReadServiceInterface" type="Magento\Checkout\Service\V1\ShippingMethod\ReadService" /> + <preference for="Magento\Checkout\Api\ShippingMethodManagementInterface" type="Magento\Checkout\Model\ShippingMethodManagement" /> <preference for="Magento\Checkout\Service\V1\PaymentMethod\ReadServiceInterface" type="\Magento\Checkout\Service\V1\PaymentMethod\ReadService" /> <preference for="Magento\Checkout\Service\V1\PaymentMethod\WriteServiceInterface" type="\Magento\Checkout\Service\V1\PaymentMethod\WriteService" /> + <preference for="Magento\Checkout\Api\Data\ShippingMethodInterface" type="Magento\Checkout\Model\Cart\ShippingMethod" /> </config> diff --git a/app/code/Magento/Checkout/etc/webapi.xml b/app/code/Magento/Checkout/etc/webapi.xml index cd264a29523..d311312bcec 100644 --- a/app/code/Magento/Checkout/etc/webapi.xml +++ b/app/code/Magento/Checkout/etc/webapi.xml @@ -86,19 +86,19 @@ </resources> </route> <route url="/V1/carts/:cartId/selected-shipping-method" method="PUT"> - <service class="Magento\Checkout\Service\V1\ShippingMethod\WriteServiceInterface" method="setMethod"/> + <service class="Magento\Checkout\Api\ShippingMethodManagementInterface" method="set"/> <resources> <resource ref="Magento_Sales::sales" /> </resources> </route> <route url="/V1/carts/:cartId/selected-shipping-method" method="GET"> - <service class="Magento\Checkout\Service\V1\ShippingMethod\ReadServiceInterface" method="getMethod"/> + <service class="Magento\Checkout\Api\ShippingMethodManagementInterface" method="get"/> <resources> <resource ref="Magento_Sales::sales" /> </resources> </route> <route url="/V1/carts/:cartId/shipping-methods" method="GET"> - <service class="Magento\Checkout\Service\V1\ShippingMethod\ReadServiceInterface" method="getList"/> + <service class="Magento\Checkout\Api\ShippingMethodManagementInterface" method="getList"/> <resources> <resource ref="Magento_Sales::sales" /> </resources> diff --git a/app/code/Magento/Quote/Model/Quote.php b/app/code/Magento/Quote/Model/Quote.php index 2fa95d7b7c4..e62de748c07 100644 --- a/app/code/Magento/Quote/Model/Quote.php +++ b/app/code/Magento/Quote/Model/Quote.php @@ -21,104 +21,6 @@ use Magento\Sales\Model\Status; * sales_quote_save_after * sales_quote_delete_before * sales_quote_delete_after - * - * @method Quote setStoreId(int $value) - * @method string getCreatedAt() - * @method Quote setCreatedAt(string $value) - * @method string getUpdatedAt() - * @method Quote setUpdatedAt(string $value) - * @method string getConvertedAt() - * @method Quote setConvertedAt(string $value) - * @method int getIsActive() - * @method Quote setIsActive(int $value) - * @method Quote setIsVirtual(int $value) - * @method int getIsMultiShipping() - * @method Quote setIsMultiShipping(int $value) - * @method int getItemsCount() - * @method Quote setItemsCount(int $value) - * @method float getItemsQty() - * @method Quote setItemsQty(float $value) - * @method int getOrigOrderId() - * @method Quote setOrigOrderId(int $value) - * @method float getStoreToBaseRate() - * @method Quote setStoreToBaseRate(float $value) - * @method float getStoreToQuoteRate() - * @method Quote setStoreToQuoteRate(float $value) - * @method string getBaseCurrencyCode() - * @method Quote setBaseCurrencyCode(string $value) - * @method string getStoreCurrencyCode() - * @method Quote setStoreCurrencyCode(string $value) - * @method string getQuoteCurrencyCode() - * @method Quote setQuoteCurrencyCode(string $value) - * @method float getGrandTotal() - * @method Quote setGrandTotal(float $value) - * @method float getBaseGrandTotal() - * @method Quote setBaseGrandTotal(float $value) - * @method Quote setCheckoutMethod(string $value) - * @method int getCustomerId() - * @method Quote setCustomerId(int $value) - * @method Quote setCustomerTaxClassId(int $value) - * @method Quote setCustomerGroupId(int $value) - * @method string getCustomerEmail() - * @method Quote setCustomerEmail(string $value) - * @method string getCustomerPrefix() - * @method Quote setCustomerPrefix(string $value) - * @method string getCustomerFirstname() - * @method Quote setCustomerFirstname(string $value) - * @method string getCustomerMiddlename() - * @method Quote setCustomerMiddlename(string $value) - * @method string getCustomerLastname() - * @method Quote setCustomerLastname(string $value) - * @method string getCustomerSuffix() - * @method Quote setCustomerSuffix(string $value) - * @method string getCustomerDob() - * @method Quote setCustomerDob(string $value) - * @method string getCustomerNote() - * @method Quote setCustomerNote(string $value) - * @method int getCustomerNoteNotify() - * @method Quote setCustomerNoteNotify(int $value) - * @method int getCustomerIsGuest() - * @method Quote setCustomerIsGuest(int $value) - * @method string getRemoteIp() - * @method Quote setRemoteIp(string $value) - * @method string getAppliedRuleIds() - * @method Quote setAppliedRuleIds(string $value) - * @method string getReservedOrderId() - * @method Quote setReservedOrderId(string $value) - * @method string getPasswordHash() - * @method Quote setPasswordHash(string $value) - * @method string getCouponCode() - * @method Quote setCouponCode(string $value) - * @method string getGlobalCurrencyCode() - * @method Quote setGlobalCurrencyCode(string $value) - * @method float getBaseToGlobalRate() - * @method Quote setBaseToGlobalRate(float $value) - * @method float getBaseToQuoteRate() - * @method Quote setBaseToQuoteRate(float $value) - * @method string getCustomerTaxvat() - * @method Quote setCustomerTaxvat(string $value) - * @method string getCustomerGender() - * @method Quote setCustomerGender(string $value) - * @method float getSubtotal() - * @method Quote setSubtotal(float $value) - * @method float getBaseSubtotal() - * @method Quote setBaseSubtotal(float $value) - * @method float getSubtotalWithDiscount() - * @method Quote setSubtotalWithDiscount(float $value) - * @method float getBaseSubtotalWithDiscount() - * @method Quote setBaseSubtotalWithDiscount(float $value) - * @method int getIsChanged() - * @method Quote setIsChanged(int $value) - * @method int getTriggerRecollect() - * @method Quote setTriggerRecollect(int $value) - * @method string getExtShippingInfo() - * @method Quote setExtShippingInfo(string $value) - * @method int getGiftMessageId() - * @method Quote setGiftMessageId(int $value) - * @method bool|null getIsPersistent() - * @method Quote setIsPersistent(bool $value) - * @method Quote setSharedStoreIds(array $values) - * @method Quote setWebsite($value) */ class Quote extends \Magento\Framework\Model\AbstractModel { -- GitLab From 7336cb765547bd043b5aaab1345f218a1227591c Mon Sep 17 00:00:00 2001 From: Olexii Korshenko <okorshenko@ebay.com> Date: Wed, 14 Jan 2015 12:36:37 +0200 Subject: [PATCH 025/114] MAGETWO-32537: Implement Checkout Shipping Methods related interfaces - fixed unit and API test for checkout shipping methods API --- app/code/Magento/Quote/Model/Quote.php | 98 +++++++ .../Magento/Quote/Model/Quote/Address.php | 5 + .../ShippingMethodManagementTest.php} | 118 ++++++-- .../V1/ShippingMethod/WriteServiceTest.php | 107 ------- .../Cart/ShippingMethodConverterTest.php | 8 +- .../ShippingMethodManagementTest.php} | 253 +++++++++++++++-- .../V1/ShippingMethod/ReadServiceTest.php | 268 ------------------ 7 files changed, 431 insertions(+), 426 deletions(-) rename dev/tests/api-functional/testsuite/Magento/Checkout/{Service/V1/ShippingMethod/ReadServiceTest.php => Api/ShippingMethodManagementTest.php} (57%) delete mode 100644 dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceTest.php rename dev/tests/unit/testsuite/Magento/Checkout/{Service/V1/Data => Model}/Cart/ShippingMethodConverterTest.php (92%) rename dev/tests/unit/testsuite/Magento/Checkout/{Service/V1/ShippingMethod/WriteServiceTest.php => Model/ShippingMethodManagementTest.php} (53%) delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceTest.php diff --git a/app/code/Magento/Quote/Model/Quote.php b/app/code/Magento/Quote/Model/Quote.php index e62de748c07..2fa95d7b7c4 100644 --- a/app/code/Magento/Quote/Model/Quote.php +++ b/app/code/Magento/Quote/Model/Quote.php @@ -21,6 +21,104 @@ use Magento\Sales\Model\Status; * sales_quote_save_after * sales_quote_delete_before * sales_quote_delete_after + * + * @method Quote setStoreId(int $value) + * @method string getCreatedAt() + * @method Quote setCreatedAt(string $value) + * @method string getUpdatedAt() + * @method Quote setUpdatedAt(string $value) + * @method string getConvertedAt() + * @method Quote setConvertedAt(string $value) + * @method int getIsActive() + * @method Quote setIsActive(int $value) + * @method Quote setIsVirtual(int $value) + * @method int getIsMultiShipping() + * @method Quote setIsMultiShipping(int $value) + * @method int getItemsCount() + * @method Quote setItemsCount(int $value) + * @method float getItemsQty() + * @method Quote setItemsQty(float $value) + * @method int getOrigOrderId() + * @method Quote setOrigOrderId(int $value) + * @method float getStoreToBaseRate() + * @method Quote setStoreToBaseRate(float $value) + * @method float getStoreToQuoteRate() + * @method Quote setStoreToQuoteRate(float $value) + * @method string getBaseCurrencyCode() + * @method Quote setBaseCurrencyCode(string $value) + * @method string getStoreCurrencyCode() + * @method Quote setStoreCurrencyCode(string $value) + * @method string getQuoteCurrencyCode() + * @method Quote setQuoteCurrencyCode(string $value) + * @method float getGrandTotal() + * @method Quote setGrandTotal(float $value) + * @method float getBaseGrandTotal() + * @method Quote setBaseGrandTotal(float $value) + * @method Quote setCheckoutMethod(string $value) + * @method int getCustomerId() + * @method Quote setCustomerId(int $value) + * @method Quote setCustomerTaxClassId(int $value) + * @method Quote setCustomerGroupId(int $value) + * @method string getCustomerEmail() + * @method Quote setCustomerEmail(string $value) + * @method string getCustomerPrefix() + * @method Quote setCustomerPrefix(string $value) + * @method string getCustomerFirstname() + * @method Quote setCustomerFirstname(string $value) + * @method string getCustomerMiddlename() + * @method Quote setCustomerMiddlename(string $value) + * @method string getCustomerLastname() + * @method Quote setCustomerLastname(string $value) + * @method string getCustomerSuffix() + * @method Quote setCustomerSuffix(string $value) + * @method string getCustomerDob() + * @method Quote setCustomerDob(string $value) + * @method string getCustomerNote() + * @method Quote setCustomerNote(string $value) + * @method int getCustomerNoteNotify() + * @method Quote setCustomerNoteNotify(int $value) + * @method int getCustomerIsGuest() + * @method Quote setCustomerIsGuest(int $value) + * @method string getRemoteIp() + * @method Quote setRemoteIp(string $value) + * @method string getAppliedRuleIds() + * @method Quote setAppliedRuleIds(string $value) + * @method string getReservedOrderId() + * @method Quote setReservedOrderId(string $value) + * @method string getPasswordHash() + * @method Quote setPasswordHash(string $value) + * @method string getCouponCode() + * @method Quote setCouponCode(string $value) + * @method string getGlobalCurrencyCode() + * @method Quote setGlobalCurrencyCode(string $value) + * @method float getBaseToGlobalRate() + * @method Quote setBaseToGlobalRate(float $value) + * @method float getBaseToQuoteRate() + * @method Quote setBaseToQuoteRate(float $value) + * @method string getCustomerTaxvat() + * @method Quote setCustomerTaxvat(string $value) + * @method string getCustomerGender() + * @method Quote setCustomerGender(string $value) + * @method float getSubtotal() + * @method Quote setSubtotal(float $value) + * @method float getBaseSubtotal() + * @method Quote setBaseSubtotal(float $value) + * @method float getSubtotalWithDiscount() + * @method Quote setSubtotalWithDiscount(float $value) + * @method float getBaseSubtotalWithDiscount() + * @method Quote setBaseSubtotalWithDiscount(float $value) + * @method int getIsChanged() + * @method Quote setIsChanged(int $value) + * @method int getTriggerRecollect() + * @method Quote setTriggerRecollect(int $value) + * @method string getExtShippingInfo() + * @method Quote setExtShippingInfo(string $value) + * @method int getGiftMessageId() + * @method Quote setGiftMessageId(int $value) + * @method bool|null getIsPersistent() + * @method Quote setIsPersistent(bool $value) + * @method Quote setSharedStoreIds(array $values) + * @method Quote setWebsite($value) */ class Quote extends \Magento\Framework\Model\AbstractModel { diff --git a/app/code/Magento/Quote/Model/Quote/Address.php b/app/code/Magento/Quote/Model/Quote/Address.php index 70bd917f8e6..53c5aff52ea 100644 --- a/app/code/Magento/Quote/Model/Quote/Address.php +++ b/app/code/Magento/Quote/Model/Quote/Address.php @@ -241,6 +241,11 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress */ protected $addressMapper; + /** + * @var Address\RateRequestFactory + */ + protected $_rateRequestFactory; + /** * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Checkout/Api/ShippingMethodManagementTest.php similarity index 57% rename from dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceTest.php rename to dev/tests/api-functional/testsuite/Magento/Checkout/Api/ShippingMethodManagementTest.php index de4697fd4aa..6278c7183c1 100644 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Checkout/Api/ShippingMethodManagementTest.php @@ -3,27 +3,111 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ +namespace Magento\Checkout\Api; -namespace Magento\Checkout\Service\V1\ShippingMethod; - -use Magento\Checkout\Service\V1\Data\Cart\ShippingMethod; +use Magento\TestFramework\ObjectManager; use Magento\TestFramework\TestCase\WebapiAbstract; +use Magento\Checkout\Api\Data\ShippingMethodInterface; use Magento\Webapi\Model\Rest\Config as RestConfig; -class ReadServiceTest extends WebapiAbstract +class ShippingMethodManagementTest extends WebapiAbstract { const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'checkoutShippingMethodReadServiceV1'; + const SERVICE_NAME = 'checkoutShippingMethodManagementV1'; const RESOURCE_PATH = '/V1/carts/'; /** - * @var \Magento\TestFramework\ObjectManager + * @var ObjectManager */ - protected $objectManager; + private $objectManager; + + /** + * @var \Magento\Quote\Model\Quote + */ + protected $quote; protected function setUp() { $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + $this->quote = $this->objectManager->create('Magento\Quote\Model\Quote'); + } + + protected function getServiceInfo() + { + return [ + 'rest' => [ + 'resourcePath' => '/V1/carts/' . $this->quote->getId() . '/selected-shipping-method', + 'httpMethod' => RestConfig::HTTP_METHOD_PUT, + ], + 'soap' => [ + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME . 'Set', + ], + ]; + } + + /** + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php + */ + public function testSetMethod() + { + $this->quote->load('test_order_1', 'reserved_order_id'); + $serviceInfo = $this->getServiceInfo(); + + $requestData = [ + 'cartId' => $this->quote->getId(), + 'carrierCode' => 'flatrate', + 'methodCode' => 'flatrate', + ]; + $result = $this->_webApiCall($serviceInfo, $requestData); + $this->assertEquals(true, $result); + } + + /** + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php + */ + public function testSetMethodWrongMethod() + { + $this->quote->load('test_order_1', 'reserved_order_id'); + $serviceInfo = $this->getServiceInfo(); + + $requestData = [ + 'cartId' => $this->quote->getId(), + 'carrierCode' => 'flatrate', + 'methodCode' => 'wrongMethod', + ]; + try { + $this->_webApiCall($serviceInfo, $requestData); + } catch (\SoapFault $e) { + $message = $e->getMessage(); + } catch (\Exception $e) { + $message = json_decode($e->getMessage())->message; + } + $this->assertEquals('Carrier with such method not found: flatrate, wrongMethod', $message); + } + + /** + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_simple_product_saved.php + */ + public function testSetMethodWithoutShippingAddress() + { + $this->quote->load('test_order_with_simple_product_without_address', 'reserved_order_id'); + $serviceInfo = $this->getServiceInfo(); + + $requestData = [ + 'cartId' => $this->quote->getId(), + 'carrierCode' => 'flatrate', + 'methodCode' => 'flatrate', + ]; + try { + $this->_webApiCall($serviceInfo, $requestData); + } catch (\SoapFault $e) { + $message = $e->getMessage(); + } catch (\Exception $e) { + $message = json_decode($e->getMessage())->message; + } + $this->assertEquals('Shipping address is not set', $message); } /** @@ -41,13 +125,13 @@ class ReadServiceTest extends WebapiAbstract list($carrierCode, $methodCode) = explode('_', $shippingAddress->getShippingMethod()); list($carrierTitle, $methodTitle) = explode(' - ', $shippingAddress->getShippingDescription()); $data = [ - ShippingMethod::CARRIER_CODE => $carrierCode, - ShippingMethod::METHOD_CODE => $methodCode, - ShippingMethod::CARRIER_TITLE => $carrierTitle, - ShippingMethod::METHOD_TITLE => $methodTitle, - ShippingMethod::SHIPPING_AMOUNT => $shippingAddress->getShippingAmount(), - ShippingMethod::BASE_SHIPPING_AMOUNT => $shippingAddress->getBaseShippingAmount(), - ShippingMethod::AVAILABLE => true, + ShippingMethodInterface::CARRIER_CODE => $carrierCode, + ShippingMethodInterface::METHOD_CODE => $methodCode, + ShippingMethodInterface::CARRIER_TITLE => $carrierTitle, + ShippingMethodInterface::METHOD_TITLE => $methodTitle, + ShippingMethodInterface::SHIPPING_AMOUNT => $shippingAddress->getShippingAmount(), + ShippingMethodInterface::BASE_SHIPPING_AMOUNT => $shippingAddress->getBaseShippingAmount(), + ShippingMethodInterface::AVAILABLE => true, ]; $requestData = ["cartId" => $cartId]; @@ -127,7 +211,7 @@ class ReadServiceTest extends WebapiAbstract 'soap' => [ 'service' => self::SERVICE_NAME, 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'GetMethod', + 'operation' => self::SERVICE_NAME . 'Get', ], ]; } @@ -163,8 +247,8 @@ class ReadServiceTest extends WebapiAbstract protected function convertRates($groupedRates, $currencyCode) { $result = []; - /** @var \Magento\Checkout\Service\V1\Data\Cart\ShippingMethodConverter $converter */ - $converter = $this->objectManager->create('Magento\Checkout\Service\V1\Data\Cart\ShippingMethodConverter'); + /** @var \Magento\Checkout\Model\Cart\ShippingMethodConverter $converter */ + $converter = $this->objectManager->create('\Magento\Checkout\Model\Cart\ShippingMethodConverter'); foreach ($groupedRates as $carrierRates) { foreach ($carrierRates as $rate) { $result[] = $converter->modelToDataObject($rate, $currencyCode)->__toArray(); diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceTest.php deleted file mode 100644 index 372088cd6e2..00000000000 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceTest.php +++ /dev/null @@ -1,107 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\ShippingMethod; - -use Magento\TestFramework\ObjectManager; -use Magento\TestFramework\TestCase\WebapiAbstract; -use Magento\Webapi\Model\Rest\Config as RestConfig; - -class WriteServiceTest extends WebapiAbstract -{ - /** - * @var ObjectManager - */ - private $objectManager; - - /** - * @var \Magento\Quote\Model\Quote - */ - protected $quote; - - protected function setUp() - { - $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->quote = $this->objectManager->create('Magento\Quote\Model\Quote'); - } - - protected function getServiceInfo() - { - return [ - 'rest' => [ - 'resourcePath' => '/V1/carts/' . $this->quote->getId() . '/selected-shipping-method', - 'httpMethod' => RestConfig::HTTP_METHOD_PUT, - ], - 'soap' => [ - 'service' => 'checkoutShippingMethodWriteServiceV1', - 'serviceVersion' => 'V1', - 'operation' => 'checkoutShippingMethodWriteServiceV1SetMethod', - ], - ]; - } - - /** - * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php - */ - public function testSetMethod() - { - $this->quote->load('test_order_1', 'reserved_order_id'); - $serviceInfo = $this->getServiceInfo(); - - $requestData = [ - 'cartId' => $this->quote->getId(), - 'carrierCode' => 'flatrate', - 'methodCode' => 'flatrate', - ]; - $result = $this->_webApiCall($serviceInfo, $requestData); - $this->assertEquals(true, $result); - } - - /** - * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php - */ - public function testSetMethodWrongMethod() - { - $this->quote->load('test_order_1', 'reserved_order_id'); - $serviceInfo = $this->getServiceInfo(); - - $requestData = [ - 'cartId' => $this->quote->getId(), - 'carrierCode' => 'flatrate', - 'methodCode' => 'wrongMethod', - ]; - try { - $this->_webApiCall($serviceInfo, $requestData); - } catch (\SoapFault $e) { - $message = $e->getMessage(); - } catch (\Exception $e) { - $message = json_decode($e->getMessage())->message; - } - $this->assertEquals('Carrier with such method not found: flatrate, wrongMethod', $message); - } - - /** - * @magentoApiDataFixture Magento/Checkout/_files/quote_with_simple_product_saved.php - */ - public function testSetMethodWithoutShippingAddress() - { - $this->quote->load('test_order_with_simple_product_without_address', 'reserved_order_id'); - $serviceInfo = $this->getServiceInfo(); - - $requestData = [ - 'cartId' => $this->quote->getId(), - 'carrierCode' => 'flatrate', - 'methodCode' => 'flatrate', - ]; - try { - $this->_webApiCall($serviceInfo, $requestData); - } catch (\SoapFault $e) { - $message = $e->getMessage(); - } catch (\Exception $e) { - $message = json_decode($e->getMessage())->message; - } - $this->assertEquals('Shipping address is not set', $message); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/ShippingMethodConverterTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/ShippingMethodConverterTest.php similarity index 92% rename from dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/ShippingMethodConverterTest.php rename to dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/ShippingMethodConverterTest.php index 64dcef35521..b6ca0e167c9 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/ShippingMethodConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/ShippingMethodConverterTest.php @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\Data\Cart; +namespace Magento\Checkout\Model\Cart; class ShippingMethodConverterTest extends \PHPUnit_Framework_TestCase { @@ -48,7 +48,7 @@ class ShippingMethodConverterTest extends \PHPUnit_Framework_TestCase { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $this->builderMock = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\ShippingMethodBuilder', + '\Magento\Checkout\Api\Data\ShippingMethodDataBuilder', ['populateWithArray', 'create'], [], '', @@ -57,7 +57,7 @@ class ShippingMethodConverterTest extends \PHPUnit_Framework_TestCase $this->storeManagerMock = $this->getMock('\Magento\Store\Model\StoreManagerInterface'); $this->currencyMock = $this->getMock('\Magento\Directory\Model\Currency', [], [], '', false); $this->shippingMethodMock = - $this->getMock('\Magento\Checkout\Service\V1\Data\Cart\ShippingMethod', [], [], '', false); + $this->getMock('\Magento\Checkout\Model\Cart\ShippingMethod', [], [], '', false); $this->rateModelMock = $this->getMock('\Magento\Quote\Model\Quote\Address\Rate', [ 'getPrice', @@ -73,7 +73,7 @@ class ShippingMethodConverterTest extends \PHPUnit_Framework_TestCase $this->storeMock = $this->getMock('\Magento\Store\Model\Store', [], [], '', false); $this->converter = $objectManager->getObject( - 'Magento\Checkout\Service\V1\Data\Cart\ShippingMethodConverter', + 'Magento\Checkout\Model\Cart\ShippingMethodConverter', [ 'builder' => $this->builderMock, 'storeManager' => $this->storeManagerMock, diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/ShippingMethodManagementTest.php similarity index 53% rename from dev/tests/unit/testsuite/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceTest.php rename to dev/tests/unit/testsuite/Magento/Checkout/Model/ShippingMethodManagementTest.php index 5d2de490851..fd0a2df6909 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/ShippingMethodManagementTest.php @@ -5,79 +5,272 @@ * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\ShippingMethod; +namespace Magento\Checkout\Model; -class WriteServiceTest extends \PHPUnit_Framework_TestCase +use Magento\Checkout\Api\Data\ShippingMethodInterface; +use Magento\TestFramework\Helper\ObjectManager; + +class ShippingMethodManagementTest extends \PHPUnit_Framework_TestCase { /** - * @var WriteService + * @var ShippingMethodManagement */ - protected $service; + protected $model; /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $addressFactoryMock; + protected $quoteRepositoryMock; /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $quoteRepositoryMock; + protected $quoteMock; /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $quoteMock; + protected $shippingAddressMock; /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $shippingAddressMock; + protected $methodBuilderMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $converterMock; + + /** + * @var \Magento\TestFramework\Helper\ObjectManager + */ + protected $objectManager; protected function setUp() { - $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->addressFactoryMock = $this->getMock('\Magento\Quote\Model\Quote\AddressFactory', [], [], '', false); + $this->objectManager = new ObjectManager($this); $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); + $this->methodBuilderMock = $this->getMock( + '\Magento\Checkout\Api\Data\ShippingMethodDataBuilder', + ['populateWithArray', 'create'], + [], + '', + false + ); + $this->storeMock = $this->getMock('\Magento\Store\Model\Store', [], [], '', false); $this->quoteMock = $this->getMock( '\Magento\Quote\Model\Quote', [ - 'getItemsCount', - 'isVirtual', 'getShippingAddress', + 'isVirtual', + 'getItemsCount', + 'getQuoteCurrencyCode', 'getBillingAddress', 'collectTotals', 'save', - '__wakeup' + '__wakeup', ], [], '', false ); - $this->shippingAddressMock = $this->getMock( '\Magento\Quote\Model\Quote\Address', [ - 'setShippingMethod', - 'requestShippingRates', - 'save', 'getCountryId', - '__wakeup' + 'getShippingMethod', + 'getShippingDescription', + 'getShippingAmount', + 'getBaseShippingAmount', + 'getGroupedAllShippingRates', + 'collectShippingRates', + 'requestShippingRates', + 'setShippingMethod', + '__wakeup', ], [], '', false ); + $this->converterMock = $this->getMock( + '\Magento\Checkout\Model\Cart\ShippingMethodConverter', + [], + [], + '', + false + ); - $this->service = $objectManager->getObject( - 'Magento\Checkout\Service\V1\ShippingMethod\WriteService', + $this->model = $this->objectManager->getObject( + 'Magento\Checkout\Model\ShippingMethodManagement', [ - 'addressFactory' => $this->addressFactoryMock, - 'quoteRepository' => $this->quoteRepositoryMock + 'quoteRepository' => $this->quoteRepositoryMock, + 'methodBuilder' => $this->methodBuilderMock, + 'converter' => $this->converterMock, ] ); } + /** + * @expectedException \Magento\Framework\Exception\StateException + * @expectedExceptionMessage Shipping address not set. + */ + public function testGetMethodWhenShippingAddressIsNotSet() + { + $cartId = 666; + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); + $this->quoteMock->expects($this->once()) + ->method('getShippingAddress')->will($this->returnValue($this->shippingAddressMock)); + $this->shippingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(null)); + + $this->assertNull($this->model->get($cartId)); + } + + /** + * @expectedException \Magento\Framework\Exception\InputException + * @expectedExceptionMessage Line "WrongShippingMethod" doesn't contain delimiter _ + */ + public function testGetMethodWhenShippingMethodIsInvalid() + { + $cartId = 884; + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); + $this->quoteMock->expects($this->once()) + ->method('getShippingAddress')->will($this->returnValue($this->shippingAddressMock)); + $this->shippingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(34)); + $this->shippingAddressMock->expects($this->exactly(2)) + ->method('getShippingMethod') + ->will($this->returnValue('WrongShippingMethod')); + + $this->assertNull($this->model->get($cartId)); + } + + public function testGetMethod() + { + $cartId = 666; + $countryId = 1; + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); + $this->quoteMock->expects($this->once()) + ->method('getShippingAddress')->will($this->returnValue($this->shippingAddressMock)); + $this->shippingAddressMock->expects($this->any()) + ->method('getCountryId')->will($this->returnValue($countryId)); + $this->shippingAddressMock->expects($this->any()) + ->method('getShippingMethod')->will($this->returnValue('one_two')); + $this->shippingAddressMock->expects($this->once()) + ->method('getShippingDescription')->will($this->returnValue('carrier - method')); + $this->shippingAddressMock->expects($this->once()) + ->method('getShippingAmount')->will($this->returnValue(123.56)); + $this->shippingAddressMock->expects($this->once()) + ->method('getBaseShippingAmount')->will($this->returnValue(100.06)); + $output = [ + ShippingMethodInterface::CARRIER_CODE => 'one', + ShippingMethodInterface::METHOD_CODE => 'two', + ShippingMethodInterface::CARRIER_TITLE => 'carrier', + ShippingMethodInterface::METHOD_TITLE => 'method', + ShippingMethodInterface::SHIPPING_AMOUNT => 123.56, + ShippingMethodInterface::BASE_SHIPPING_AMOUNT => 100.06, + ShippingMethodInterface::AVAILABLE => true, + ]; + $this->methodBuilderMock->expects($this->once()) + ->method('populateWithArray')->with($output)->will($this->returnValue($this->methodBuilderMock)); + $this->methodBuilderMock->expects($this->once())->method('create'); + + $this->model->get($cartId); + } + + public function testGetMethodIfMethodIsNotSet() + { + $cartId = 666; + $countryId = 1; + + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); + $this->quoteMock->expects($this->once()) + ->method('getShippingAddress')->will($this->returnValue($this->shippingAddressMock)); + $this->shippingAddressMock->expects($this->any()) + ->method('getCountryId')->will($this->returnValue($countryId)); + $this->shippingAddressMock->expects($this->any()) + ->method('getShippingMethod')->will($this->returnValue(null)); + + $this->assertNull($this->model->get($cartId)); + } + + public function testGetListForVirtualCart() + { + $cartId = 834; + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); + $this->quoteMock->expects($this->once()) + ->method('isVirtual')->will($this->returnValue(true)); + + $this->assertEquals([], $this->model->getList($cartId)); + } + + public function testGetListForEmptyCart() + { + $cartId = 834; + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); + $this->quoteMock->expects($this->once()) + ->method('isVirtual')->will($this->returnValue(false)); + $this->quoteMock->expects($this->once()) + ->method('getItemsCount')->will($this->returnValue(0)); + + $this->assertEquals([], $this->model->getList($cartId)); + } + + /** + * @expectedException \Magento\Framework\Exception\StateException + * @expectedExceptionMessage Shipping address not set. + */ + public function testGetListWhenShippingAddressIsNotSet() + { + $cartId = 834; + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); + $this->quoteMock->expects($this->once()) + ->method('isVirtual')->will($this->returnValue(false)); + $this->quoteMock->expects($this->once()) + ->method('getItemsCount')->will($this->returnValue(3)); + $this->quoteMock->expects($this->once()) + ->method('getShippingAddress')->will($this->returnValue($this->shippingAddressMock)); + $this->shippingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(null)); + + $this->model->getList($cartId); + } + + public function testGetList() + { + $cartId = 834; + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); + $this->quoteMock->expects($this->once()) + ->method('isVirtual')->will($this->returnValue(false)); + $this->quoteMock->expects($this->once()) + ->method('getItemsCount')->will($this->returnValue(3)); + $this->quoteMock->expects($this->once()) + ->method('getShippingAddress')->will($this->returnValue($this->shippingAddressMock)); + $this->shippingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(345)); + $this->shippingAddressMock->expects($this->once())->method('collectShippingRates'); + $shippingRateMock = $this->getMock('\Magento\Quote\Model\Quote\Address\Rate', [], [], '', false); + $this->shippingAddressMock->expects($this->once()) + ->method('getGroupedAllShippingRates') + ->will($this->returnValue([[$shippingRateMock]])); + + $currencyCode = 'EUR'; + $this->quoteMock->expects($this->once()) + ->method('getQuoteCurrencyCode') + ->will($this->returnValue($currencyCode)); + + $this->converterMock->expects($this->once()) + ->method('modelToDataObject') + ->with($shippingRateMock, $currencyCode) + ->will($this->returnValue('RateValue')); + $this->assertEquals(['RateValue'], $this->model->getList($cartId)); + } + /** * @expectedException \Magento\Framework\Exception\InputException * @expectedExceptionMessage Shipping method is not applicable for empty cart @@ -92,7 +285,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(0)); $this->quoteMock->expects($this->never())->method('isVirtual'); - $this->service->setMethod($cartId, $carrierCode, $methodCode); + $this->model->set($cartId, $carrierCode, $methodCode); } /** @@ -110,7 +303,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(1)); $this->quoteMock->expects($this->once())->method('isVirtual')->will($this->returnValue(true)); - $this->service->setMethod($cartId, $carrierCode, $methodCode); + $this->model->set($cartId, $carrierCode, $methodCode); } /** @@ -130,7 +323,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase ->method('getShippingAddress')->will($this->returnValue($this->shippingAddressMock)); $this->shippingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(null)); - $this->service->setMethod($cartId, $carrierCode, $methodCode); + $this->model->set($cartId, $carrierCode, $methodCode); } /** @@ -163,7 +356,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase ->method('getBillingAddress')->will($this->returnValue($billingAddressMock)); $billingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(null)); - $this->service->setMethod($cartId, $carrierCode, $methodCode); + $this->model->set($cartId, $carrierCode, $methodCode); } /** @@ -200,7 +393,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase ->method('requestShippingRates')->will($this->returnValue(false)); $this->shippingAddressMock->expects($this->never())->method('save'); - $this->service->setMethod($cartId, $carrierCode, $methodCode); + $this->model->set($cartId, $carrierCode, $methodCode); } /** @@ -246,7 +439,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase ->with($this->quoteMock) ->willThrowException($exception); - $this->service->setMethod($cartId, $carrierCode, $methodCode); + $this->model->set($cartId, $carrierCode, $methodCode); } /** @@ -266,7 +459,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase ->method('getShippingAddress')->will($this->returnValue($this->shippingAddressMock)); $this->shippingAddressMock->expects($this->once())->method('getCountryId'); - $this->service->setMethod($cartId, $carrierCode, $methodCode); + $this->model->set($cartId, $carrierCode, $methodCode); } public function testSetMethod() @@ -303,6 +496,6 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase $this->quoteMock->expects($this->once())->method('collectTotals')->will($this->returnSelf()); $this->quoteRepositoryMock->expects($this->once())->method('save')->with($this->quoteMock); - $this->assertTrue($this->service->setMethod($cartId, $carrierCode, $methodCode)); + $this->assertTrue($this->model->set($cartId, $carrierCode, $methodCode)); } } diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceTest.php deleted file mode 100644 index 196f0db3ceb..00000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceTest.php +++ /dev/null @@ -1,268 +0,0 @@ -<?php -/** - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\ShippingMethod; - -use Magento\Checkout\Service\V1\Data\Cart\ShippingMethod; -use Magento\TestFramework\Helper\ObjectManager; - -class ReadServiceTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var ReadService - */ - protected $service; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteRepositoryMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $shippingAddressMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $methodBuilderMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $converterMock; - - /** - * @var \Magento\TestFramework\Helper\ObjectManager - */ - protected $objectManager; - - protected function setUp() - { - $this->objectManager = new ObjectManager($this); - $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); - $this->methodBuilderMock = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\ShippingMethodBuilder', - ['populateWithArray', 'create'], - [], - '', - false - ); - $this->storeMock = $this->getMock('\Magento\Store\Model\Store', [], [], '', false); - $this->quoteMock = $this->getMock( - '\Magento\Quote\Model\Quote', - [ - 'getShippingAddress', - 'isVirtual', - 'getItemsCount', - 'getQuoteCurrencyCode', - '__wakeup', - ], - [], - '', - false - ); - $this->shippingAddressMock = $this->getMock( - '\Magento\Quote\Model\Quote\Address', - [ - 'getCountryId', - 'getShippingMethod', - 'getShippingDescription', - 'getShippingAmount', - 'getBaseShippingAmount', - 'getGroupedAllShippingRates', - 'collectShippingRates', - '__wakeup', - ], - [], - '', - false - ); - $this->converterMock = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\ShippingMethodConverter', - [], - [], - '', - false - ); - - $this->service = $this->objectManager->getObject( - 'Magento\Checkout\Service\V1\ShippingMethod\ReadService', - [ - 'quoteRepository' => $this->quoteRepositoryMock, - 'methodBuilder' => $this->methodBuilderMock, - 'converter' => $this->converterMock, - ] - ); - } - - /** - * @expectedException \Magento\Framework\Exception\StateException - * @expectedExceptionMessage Shipping address not set. - */ - public function testGetMethodWhenShippingAddressIsNotSet() - { - $cartId = 666; - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); - $this->quoteMock->expects($this->once()) - ->method('getShippingAddress')->will($this->returnValue($this->shippingAddressMock)); - $this->shippingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(null)); - - $this->assertNull($this->service->getMethod($cartId)); - } - - /** - * @expectedException \Magento\Framework\Exception\InputException - * @expectedExceptionMessage Line "WrongShippingMethod" doesn't contain delimiter _ - */ - public function testGetMethodWhenShippingMethodIsInvalid() - { - $cartId = 884; - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); - $this->quoteMock->expects($this->once()) - ->method('getShippingAddress')->will($this->returnValue($this->shippingAddressMock)); - $this->shippingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(34)); - $this->shippingAddressMock->expects($this->exactly(2)) - ->method('getShippingMethod') - ->will($this->returnValue('WrongShippingMethod')); - - $this->assertNull($this->service->getMethod($cartId)); - } - - public function testGetMethod() - { - $cartId = 666; - $countryId = 1; - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); - $this->quoteMock->expects($this->once()) - ->method('getShippingAddress')->will($this->returnValue($this->shippingAddressMock)); - $this->shippingAddressMock->expects($this->any()) - ->method('getCountryId')->will($this->returnValue($countryId)); - $this->shippingAddressMock->expects($this->any()) - ->method('getShippingMethod')->will($this->returnValue('one_two')); - $this->shippingAddressMock->expects($this->once()) - ->method('getShippingDescription')->will($this->returnValue('carrier - method')); - $this->shippingAddressMock->expects($this->once()) - ->method('getShippingAmount')->will($this->returnValue(123.56)); - $this->shippingAddressMock->expects($this->once()) - ->method('getBaseShippingAmount')->will($this->returnValue(100.06)); - $output = [ - ShippingMethod::CARRIER_CODE => 'one', - ShippingMethod::METHOD_CODE => 'two', - ShippingMethod::CARRIER_TITLE => 'carrier', - ShippingMethod::METHOD_TITLE => 'method', - ShippingMethod::SHIPPING_AMOUNT => 123.56, - ShippingMethod::BASE_SHIPPING_AMOUNT => 100.06, - ShippingMethod::AVAILABLE => true, - ]; - $this->methodBuilderMock->expects($this->once()) - ->method('populateWithArray')->with($output)->will($this->returnValue($this->methodBuilderMock)); - $this->methodBuilderMock->expects($this->once())->method('create'); - - $this->service->getMethod($cartId); - } - - public function testGetMethodIfMethodIsNotSet() - { - $cartId = 666; - $countryId = 1; - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); - $this->quoteMock->expects($this->once()) - ->method('getShippingAddress')->will($this->returnValue($this->shippingAddressMock)); - $this->shippingAddressMock->expects($this->any()) - ->method('getCountryId')->will($this->returnValue($countryId)); - $this->shippingAddressMock->expects($this->any()) - ->method('getShippingMethod')->will($this->returnValue(null)); - - $this->assertNull($this->service->getMethod($cartId)); - } - - public function testGetListForVirtualCart() - { - $cartId = 834; - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); - $this->quoteMock->expects($this->once()) - ->method('isVirtual')->will($this->returnValue(true)); - - $this->assertEquals([], $this->service->getList($cartId)); - } - - public function testGetListForEmptyCart() - { - $cartId = 834; - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); - $this->quoteMock->expects($this->once()) - ->method('isVirtual')->will($this->returnValue(false)); - $this->quoteMock->expects($this->once()) - ->method('getItemsCount')->will($this->returnValue(0)); - - $this->assertEquals([], $this->service->getList($cartId)); - } - - /** - * @expectedException \Magento\Framework\Exception\StateException - * @expectedExceptionMessage Shipping address not set. - */ - public function testGetListWhenShippingAddressIsNotSet() - { - $cartId = 834; - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); - $this->quoteMock->expects($this->once()) - ->method('isVirtual')->will($this->returnValue(false)); - $this->quoteMock->expects($this->once()) - ->method('getItemsCount')->will($this->returnValue(3)); - $this->quoteMock->expects($this->once()) - ->method('getShippingAddress')->will($this->returnValue($this->shippingAddressMock)); - $this->shippingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(null)); - - $this->service->getList($cartId); - } - - public function testGetList() - { - $cartId = 834; - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); - $this->quoteMock->expects($this->once()) - ->method('isVirtual')->will($this->returnValue(false)); - $this->quoteMock->expects($this->once()) - ->method('getItemsCount')->will($this->returnValue(3)); - $this->quoteMock->expects($this->once()) - ->method('getShippingAddress')->will($this->returnValue($this->shippingAddressMock)); - $this->shippingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(345)); - $this->shippingAddressMock->expects($this->once())->method('collectShippingRates'); - $shippingRateMock = $this->getMock('\Magento\Quote\Model\Quote\Address\Rate', [], [], '', false); - $this->shippingAddressMock->expects($this->once()) - ->method('getGroupedAllShippingRates') - ->will($this->returnValue([[$shippingRateMock]])); - - $currencyCode = 'EUR'; - $this->quoteMock->expects($this->once()) - ->method('getQuoteCurrencyCode') - ->will($this->returnValue($currencyCode)); - - $this->converterMock->expects($this->once()) - ->method('modelToDataObject') - ->with($shippingRateMock, $currencyCode) - ->will($this->returnValue('RateValue')); - $this->assertEquals(['RateValue'], $this->service->getList($cartId)); - } -} -- GitLab From e6593a83f702cf16b5c720347926638519fd77d3 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Wed, 14 Jan 2015 12:55:08 +0200 Subject: [PATCH 026/114] MAGETWO-32525: Implement Payment methods related interfaces --- .../Checkout/Api/Data/PaymentInterface.php | 68 +++ .../Api/Data/PaymentMethodInterface.php | 55 +-- .../Api/PaymentMethodManagementInterface.php | 6 +- .../Checkout/Model/Cart/PaymentMethod.php | 26 ++ .../Model/PaymentMethodManagement.php | 122 +++++ app/code/Magento/Checkout/etc/di.xml | 3 + app/code/Magento/Checkout/etc/webapi.xml | 6 +- .../Magento/Quote/Model/Quote/Payment.php | 79 +++- .../Api/PaymentMethodManagementTest.php | 289 ++++++++++++ .../Model/PaymentMethodManagementTest.php | 423 ++++++++++++++++++ 10 files changed, 1016 insertions(+), 61 deletions(-) create mode 100644 app/code/Magento/Checkout/Api/Data/PaymentInterface.php create mode 100644 app/code/Magento/Checkout/Model/Cart/PaymentMethod.php create mode 100644 app/code/Magento/Checkout/Model/PaymentMethodManagement.php create mode 100644 dev/tests/api-functional/testsuite/Magento/Checkout/Api/PaymentMethodManagementTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Model/PaymentMethodManagementTest.php diff --git a/app/code/Magento/Checkout/Api/Data/PaymentInterface.php b/app/code/Magento/Checkout/Api/Data/PaymentInterface.php new file mode 100644 index 00000000000..aac43e2de04 --- /dev/null +++ b/app/code/Magento/Checkout/Api/Data/PaymentInterface.php @@ -0,0 +1,68 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Checkout\Api\Data; + +/** + * @see \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod + */ +interface PaymentInterface extends \Magento\Framework\Api\ExtensibleDataInterface +{ + /** + * Get purchase order number + * + * @return string|null + */ + public function getPoNumber(); + + /** + * Get payment method code + * + * @return string + */ + public function getMethod(); + + /** + * Get credit card owner + * + * @return string|null + */ + public function getCcOwner(); + + /** + * Get credit card number + * + * @return string|null + */ + public function getCcNumber(); + + /** + * Get credit card type + * + * @return string|null + */ + public function getCcType(); + + /** + * Get credit card expiration year + * + * @return string|null + */ + public function getCcExpYear(); + + /** + * Get credit card expiration month + * + * @return string|null + */ + public function getCcExpMonth(); + + /** + * Get payment additional details + * + * @return string[]|null + */ + public function getAdditionalData(); +} diff --git a/app/code/Magento/Checkout/Api/Data/PaymentMethodInterface.php b/app/code/Magento/Checkout/Api/Data/PaymentMethodInterface.php index 8a37f95e281..49e295eca1b 100644 --- a/app/code/Magento/Checkout/Api/Data/PaymentMethodInterface.php +++ b/app/code/Magento/Checkout/Api/Data/PaymentMethodInterface.php @@ -5,64 +5,19 @@ */ namespace Magento\Checkout\Api\Data; -/** - * @see \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod - */ -interface PaymentMethodInterface extends \Magento\Framework\Api\ExtensibleDataInterface +interface PaymentMethodInterface { - /** - * Get purchase order number - * - * @return string|null - */ - public function getPoNumber(); - /** * Get payment method code * * @return string */ - public function getMethod(); - - /** - * Get credit card owner - * - * @return string|null - */ - public function getCcOwner(); - - /** - * Get credit card number - * - * @return string|null - */ - public function getCcNumber(); + public function getCode(); /** - * Get credit card type + * Get payment method title * - * @return string|null - */ - public function getCcType(); - - /** - * Get credit card expiration year - * - * @return string|null - */ - public function getCcExpYear(); - - /** - * Get credit card expiration month - * - * @return string|null - */ - public function getCcExpMonth(); - - /** - * Get payment additional details - * - * @return string|null + * @return string */ - public function getPaymentDetails(); + public function getTitle(); } diff --git a/app/code/Magento/Checkout/Api/PaymentMethodManagementInterface.php b/app/code/Magento/Checkout/Api/PaymentMethodManagementInterface.php index f8727f140c6..67e3838128c 100644 --- a/app/code/Magento/Checkout/Api/PaymentMethodManagementInterface.php +++ b/app/code/Magento/Checkout/Api/PaymentMethodManagementInterface.php @@ -10,20 +10,20 @@ interface PaymentMethodManagementInterface /** * Adds a specified payment method to a specified shopping cart. * - * @param \Magento\Checkout\Api\Data\PaymentMethodInterface $method The payment method. + * @param \Magento\Checkout\Api\Data\PaymentInterface $method The payment method. * @param int $cartId The cart ID. * @return int Payment method ID. * @throws \Magento\Framework\Exception\State\InvalidTransitionException The billing or shipping address is not set, or the specified payment method is not available. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. * @see \Magento\Checkout\Service\V1\PaymentMethod\WriteServiceInterface::set */ - public function set(\Magento\Checkout\Api\Data\PaymentMethodInterface $method, $cartId); + public function set(\Magento\Checkout\Api\Data\PaymentInterface $method, $cartId); /** * Returns the payment method for a specified shopping cart. * * @param int $cartId The cart ID. - * @return \Magento\Checkout\Api\Data\PaymentMethodInterface Payment method object. + * @return \Magento\Checkout\Api\Data\PaymentInterface Payment method object. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. * @see \Magento\Checkout\Service\V1\PaymentMethod\ReadServiceInterface::getPayment */ diff --git a/app/code/Magento/Checkout/Model/Cart/PaymentMethod.php b/app/code/Magento/Checkout/Model/Cart/PaymentMethod.php new file mode 100644 index 00000000000..90c0af3ca82 --- /dev/null +++ b/app/code/Magento/Checkout/Model/Cart/PaymentMethod.php @@ -0,0 +1,26 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Checkout\Model\Cart; + +class PaymentMethod extends \Magento\Framework\Model\AbstractExtensibleModel implements + \Magento\Checkout\Api\Data\PaymentMethodInterface +{ + /** + * {@inheritdoc} + */ + public function getCode() + { + return $this->getData('code'); + } + + /** + * {@inheritdoc} + */ + public function getTitle() + { + return $this->getData('title'); + } +} diff --git a/app/code/Magento/Checkout/Model/PaymentMethodManagement.php b/app/code/Magento/Checkout/Model/PaymentMethodManagement.php new file mode 100644 index 00000000000..01b848b8f9c --- /dev/null +++ b/app/code/Magento/Checkout/Model/PaymentMethodManagement.php @@ -0,0 +1,122 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Checkout\Model; + +use Magento\Framework\Exception\State\InvalidTransitionException; + +class PaymentMethodManagement implements \Magento\Checkout\Api\PaymentMethodManagementInterface +{ + /** + * @var \Magento\Quote\Model\QuoteRepository + */ + protected $quoteRepository; + + /** + * @var \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod\Builder + */ + protected $paymentMethodBuilder; + + /** + * @var \Magento\Payment\Model\Checks\ZeroTotal + */ + protected $zeroTotalValidator; + + /** + * @var \Magento\Payment\Model\MethodList + */ + protected $methodList; + + /** + * @param \Magento\Quote\Model\QuoteRepository $quoteRepository + * @param \Magento\Payment\Model\Checks\ZeroTotal $zeroTotalValidator + * @param \Magento\Payment\Model\MethodList $methodList + * @param \Magento\Checkout\Api\Data\PaymentMethodDataBuilder $paymentMethodBuilder + */ + public function __construct( + \Magento\Quote\Model\QuoteRepository $quoteRepository, + \Magento\Payment\Model\Checks\ZeroTotal $zeroTotalValidator, + \Magento\Payment\Model\MethodList $methodList, + \Magento\Checkout\Api\Data\PaymentMethodDataBuilder $paymentMethodBuilder + ) { + $this->quoteRepository = $quoteRepository; + $this->paymentMethodBuilder = $paymentMethodBuilder; + $this->zeroTotalValidator = $zeroTotalValidator; + $this->methodList = $methodList; + } + + /** + * {@inheritdoc} + */ + public function set(\Magento\Checkout\Api\Data\PaymentInterface $method, $cartId) + { + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->quoteRepository->getActive($cartId); + + $method->setChecks([ + \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_CHECKOUT, + \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_FOR_COUNTRY, + \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_FOR_CURRENCY, + \Magento\Payment\Model\Method\AbstractMethod::CHECK_ORDER_TOTAL_MIN_MAX, + ]); + $payment = $quote->getPayment(); + $payment->importData($method->getData()); + + if ($quote->isVirtual()) { + // check if billing address is set + if (is_null($quote->getBillingAddress()->getCountryId())) { + throw new InvalidTransitionException('Billing address is not set'); + } + $quote->getBillingAddress()->setPaymentMethod($payment->getMethod()); + } else { + // check if shipping address is set + if (is_null($quote->getShippingAddress()->getCountryId())) { + throw new InvalidTransitionException('Shipping address is not set'); + } + $quote->getShippingAddress()->setPaymentMethod($payment->getMethod()); + } + if (!$quote->isVirtual() && $quote->getShippingAddress()) { + $quote->getShippingAddress()->setCollectShippingRates(true); + } + + if (!$this->zeroTotalValidator->isApplicable($payment->getMethodInstance(), $quote)) { + throw new InvalidTransitionException('The requested Payment Method is not available.'); + } + + $quote->setTotalsCollectedFlag(false)->collectTotals()->save(); + return $quote->getPayment()->getId(); + } + + /** + * {@inheritdoc} + */ + public function get($cartId) + { + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->quoteRepository->getActive($cartId); + $payment = $quote->getPayment(); + if (!$payment->getId()) { + return null; + } + return $payment; + } + + /** + * {@inheritdoc} + */ + public function getList($cartId) + { + $output = []; + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->quoteRepository->getActive($cartId); + foreach ($this->methodList->getAvailableMethods($quote) as $method) { + $output[] = $this->paymentMethodBuilder + ->setTitle($method->getTitle()) + ->setCode($method->getCode()) + ->create(); + } + return $output; + } +} diff --git a/app/code/Magento/Checkout/etc/di.xml b/app/code/Magento/Checkout/etc/di.xml index c12e622a3f6..fefea396758 100644 --- a/app/code/Magento/Checkout/etc/di.xml +++ b/app/code/Magento/Checkout/etc/di.xml @@ -38,4 +38,7 @@ <preference for="Magento\Checkout\Service\V1\PaymentMethod\ReadServiceInterface" type="\Magento\Checkout\Service\V1\PaymentMethod\ReadService" /> <preference for="Magento\Checkout\Service\V1\PaymentMethod\WriteServiceInterface" type="\Magento\Checkout\Service\V1\PaymentMethod\WriteService" /> <preference for="Magento\Checkout\Api\Data\ShippingMethodInterface" type="Magento\Checkout\Model\Cart\ShippingMethod" /> + <preference for="Magento\Checkout\Api\PaymentMethodManagementInterface" type="\Magento\Checkout\Model\PaymentMethodManagement" /> + <preference for="Magento\Checkout\Api\Data\PaymentInterface" type="\Magento\Quote\Model\Quote\Payment" /> + <preference for="Magento\Checkout\Api\Data\PaymentMethodInterface" type="\Magento\Checkout\Model\Cart\PaymentMethod" /> </config> diff --git a/app/code/Magento/Checkout/etc/webapi.xml b/app/code/Magento/Checkout/etc/webapi.xml index d311312bcec..ef78719378f 100644 --- a/app/code/Magento/Checkout/etc/webapi.xml +++ b/app/code/Magento/Checkout/etc/webapi.xml @@ -122,19 +122,19 @@ </resources> </route> <route url="/V1/carts/:cartId/selected-payment-methods" method="GET"> - <service class="Magento\Checkout\Service\V1\PaymentMethod\ReadServiceInterface" method="getPayment"/> + <service class="Magento\Checkout\Api\PaymentMethodManagementInterface" method="get"/> <resources> <resource ref="Magento_Sales::sales" /> </resources> </route> <route url="/V1/carts/:cartId/selected-payment-methods" method="PUT"> - <service class="Magento\Checkout\Service\V1\PaymentMethod\WriteServiceInterface" method="set"/> + <service class="Magento\Checkout\Api\PaymentMethodManagementInterface" method="set"/> <resources> <resource ref="Magento_Sales::sales" /> </resources> </route> <route url="/V1/carts/:cartId/payment-methods" method="GET"> - <service class="Magento\Checkout\Service\V1\PaymentMethod\ReadServiceInterface" method="getList"/> + <service class="Magento\Checkout\Api\PaymentMethodManagementInterface" method="getList"/> <resources> <resource ref="Magento_Sales::sales" /> </resources> diff --git a/app/code/Magento/Quote/Model/Quote/Payment.php b/app/code/Magento/Quote/Model/Quote/Payment.php index b7ae2cf005c..0c7fad0a96d 100644 --- a/app/code/Magento/Quote/Model/Quote/Payment.php +++ b/app/code/Magento/Quote/Model/Quote/Payment.php @@ -18,9 +18,7 @@ use Magento\Framework\Api\AttributeDataBuilder; * @method \Magento\Quote\Model\Quote\Payment setCreatedAt(string $value) * @method string getUpdatedAt() * @method \Magento\Quote\Model\Quote\Payment setUpdatedAt(string $value) - * @method string getMethod() * @method \Magento\Quote\Model\Quote\Payment setMethod(string $value) - * @method string getCcType() * @method \Magento\Quote\Model\Quote\Payment setCcType(string $value) * @method string getCcNumberEnc() * @method \Magento\Quote\Model\Quote\Payment setCcNumberEnc(string $value) @@ -34,16 +32,14 @@ use Magento\Framework\Api\AttributeDataBuilder; * @method \Magento\Quote\Model\Quote\Payment setCcSsStartMonth(int $value) * @method int getCcSsStartYear() * @method \Magento\Quote\Model\Quote\Payment setCcSsStartYear(int $value) - * @method string getPoNumber() * @method \Magento\Quote\Model\Quote\Payment setPoNumber(string $value) - * @method string getAdditionalData() * @method \Magento\Quote\Model\Quote\Payment setAdditionalData(string $value) * @method string getCcSsIssue() * @method \Magento\Quote\Model\Quote\Payment setCcSsIssue(string $value) * * @author Magento Core Team <core@magentocommerce.com> */ -class Payment extends \Magento\Payment\Model\Info +class Payment extends \Magento\Payment\Model\Info implements \Magento\Checkout\Api\Data\PaymentInterface { /** * @var string @@ -235,4 +231,77 @@ class Payment extends \Magento\Payment\Model\Info $method = parent::getMethodInstance(); return $method->setStore($this->getQuote()->getStore()); } + + /** + * {@inheritdoc} + */ + public function getPoNumber() + { + return $this->getData('po_number'); + } + + /** + * {@inheritdoc} + */ + public function getMethod() + { + return $this->getData('method'); + } + + /** + * {@inheritdoc} + */ + public function getCcOwner() + { + return $this->getData('cc_owner'); + } + + /** + * {@inheritdoc} + */ + public function getCcNumber() + { + return $this->getData('cc_number'); + } + + /** + * {@inheritdoc} + */ + public function getCcType() + { + return $this->getData('cc_type'); + } + + /** + * {@inheritdoc} + */ + public function getCcExpYear() + { + return $this->getData('cc_exp_year'); + } + + /** + * {@inheritdoc} + */ + public function getCcExpMonth() + { + return $this->getData('cc_exp_month'); + } + + /** + * {@inheritdoc} + */ + public function getAdditionalData() + { + $additionalDataValue = $this->getData('additional_data'); + if (is_string($additionalDataValue)) { + $additionalData = @unserialize($additionalDataValue); + if (is_array($additionalData)) { + return $additionalData; + } + } elseif (is_array($additionalDataValue)) { + return $additionalDataValue; + } + return null; + } } diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Api/PaymentMethodManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Checkout/Api/PaymentMethodManagementTest.php new file mode 100644 index 00000000000..c63868ae042 --- /dev/null +++ b/dev/tests/api-functional/testsuite/Magento/Checkout/Api/PaymentMethodManagementTest.php @@ -0,0 +1,289 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Checkout\Api; + +use Magento\Webapi\Model\Rest\Config as RestConfig; + +class PaymentMethodManagementTest extends \Magento\TestFramework\TestCase\WebapiAbstract +{ + const SERVICE_VERSION = 'V1'; + const SERVICE_NAME = 'checkoutPaymentMethodManagementV1'; + const RESOURCE_PATH = '/V1/carts/'; + + /** + * @var \Magento\TestFramework\ObjectManager + */ + protected $objectManager; + + protected function setUp() + { + $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + } + + /** + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_payment_saved.php + */ + public function testReSetPayment() + { + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->objectManager->create('\Magento\Quote\Model\Quote'); + $quote->load('test_order_1_with_payment', 'reserved_order_id'); + $cartId = $quote->getId(); + + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => self::RESOURCE_PATH . $cartId . '/selected-payment-methods', + 'httpMethod' => RestConfig::HTTP_METHOD_PUT, + ], + 'soap' => [ + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME . 'set', + ], + ]; + + $requestData = [ + "cartId" => $cartId, + "method" => [ + 'method' => 'checkmo', + 'po_number' => null, + 'cc_owner' => 'John', + 'cc_type' => null, + 'cc_exp_year' => null, + 'cc_exp_month' => null, + ], + ]; + + $this->assertNotNull($this->_webApiCall($serviceInfo, $requestData)); + } + + /** + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_virtual_product_and_address.php + */ + public function testSetPaymentWithVirtualProduct() + { + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->objectManager->create('\Magento\Quote\Model\Quote'); + $quote->load('test_order_with_virtual_product', 'reserved_order_id'); + $cartId = $quote->getId(); + + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => self::RESOURCE_PATH . $cartId . '/selected-payment-methods', + 'httpMethod' => RestConfig::HTTP_METHOD_PUT, + ], + 'soap' => [ + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME . 'set', + ], + ]; + + $requestData = [ + "cartId" => $cartId, + "method" => [ + 'method' => 'checkmo', + 'po_number' => '200', + 'cc_owner' => 'tester', + 'cc_type' => 'test', + 'cc_exp_year' => '2014', + 'cc_exp_month' => '1', + ], + ]; + $this->assertNotNull($this->_webApiCall($serviceInfo, $requestData)); + } + + /** + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php + */ + public function testSetPaymentWithSimpleProduct() + { + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->objectManager->create('\Magento\Quote\Model\Quote'); + $quote->load('test_order_1', 'reserved_order_id'); + $cartId = $quote->getId(); + + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => self::RESOURCE_PATH . $cartId . '/selected-payment-methods', + 'httpMethod' => RestConfig::HTTP_METHOD_PUT, + ], + 'soap' => [ + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME . 'set', + ], + ]; + + $requestData = [ + "cartId" => $cartId, + "method" => [ + 'method' => 'checkmo', + 'po_number' => '200', + 'cc_owner' => 'tester', + 'cc_type' => 'test', + 'cc_exp_year' => '2014', + 'cc_exp_month' => '1', + ], + ]; + + $this->assertNotNull($this->_webApiCall($serviceInfo, $requestData)); + } + + /** + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_virtual_product_saved.php + * @expectedException \Exception + * @expectedExceptionMessage Billing address is not set + */ + public function testSetPaymentWithVirtualProductWithoutAddress() + { + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->objectManager->create('\Magento\Quote\Model\Quote'); + $quote->load('test_order_with_virtual_product_without_address', 'reserved_order_id'); + $cartId = $quote->getId(); + + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => self::RESOURCE_PATH . $cartId . '/selected-payment-methods', + 'httpMethod' => RestConfig::HTTP_METHOD_PUT, + ], + 'soap' => [ + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME . 'set', + ], + ]; + + $requestData = [ + "cartId" => $cartId, + "method" => [ + 'method' => 'checkmo', + 'po_number' => '200', + 'cc_owner' => 'tester', + 'cc_type' => 'test', + 'cc_exp_year' => '2014', + 'cc_exp_month' => '1', + ], + ]; + $this->assertNotNull($this->_webApiCall($serviceInfo, $requestData)); + } + + /** + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_simple_product_saved.php + * @expectedException \Exception + * @expectedExceptionMessage Shipping address is not set + */ + public function testSetPaymentWithSimpleProductWithoutAddress() + { + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->objectManager->create('\Magento\Quote\Model\Quote'); + $quote->load('test_order_with_simple_product_without_address', 'reserved_order_id'); + $cartId = $quote->getId(); + + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => self::RESOURCE_PATH . $cartId . '/selected-payment-methods', + 'httpMethod' => RestConfig::HTTP_METHOD_PUT, + ], + 'soap' => [ + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME . 'set', + ], + ]; + + $requestData = [ + "cartId" => $cartId, + "method" => [ + 'method' => 'checkmo', + 'po_number' => '200', + 'cc_owner' => 'tester', + 'cc_type' => 'test', + 'cc_exp_year' => '2014', + 'cc_exp_month' => '1', + ], + ]; + $this->assertNotNull($this->_webApiCall($serviceInfo, $requestData)); + } + + /** + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php + */ + public function testGetList() + { + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); + $quote->load('test_order_1', 'reserved_order_id'); + $cartId = $quote->getId(); + + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => self::RESOURCE_PATH . $cartId . '/payment-methods', + 'httpMethod' => RestConfig::HTTP_METHOD_GET, + ], + 'soap' => [ + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME . 'getList', + ], + ]; + + $requestData = ["cartId" => $cartId]; + $requestResponse = $this->_webApiCall($serviceInfo, $requestData); + + $expectedResponse = [ + 'code' => 'checkmo', + 'title' => 'Check / Money order', + ]; + + $this->assertGreaterThan(0, count($requestResponse)); + $this->assertContains($expectedResponse, $requestResponse); + } + + /** + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_payment_saved.php + */ + public function testGet() + { + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); + $quote->load('test_order_1_with_payment', 'reserved_order_id'); + $cartId = $quote->getId(); + + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => self::RESOURCE_PATH . $cartId . '/selected-payment-methods', + 'httpMethod' => RestConfig::HTTP_METHOD_GET, + ], + 'soap' => [ + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME . 'get', + ], + ]; + + $requestData = ["cartId" => $cartId]; + $requestResponse = $this->_webApiCall($serviceInfo, $requestData); + + $this->assertArrayHasKey('method', $requestResponse); + $this->assertArrayHasKey('po_number', $requestResponse); + $this->assertArrayHasKey('cc_owner', $requestResponse); + $this->assertArrayHasKey('cc_type', $requestResponse); + $this->assertArrayHasKey('cc_exp_year', $requestResponse); + $this->assertArrayHasKey('cc_exp_month', $requestResponse); + $this->assertArrayHasKey('additional_data', $requestResponse); + + $this->assertNotNull($requestResponse['method']); + $this->assertNotNull($requestResponse['po_number']); + $this->assertNotNull($requestResponse['cc_owner']); + $this->assertNotNull($requestResponse['cc_type']); + $this->assertNotNull($requestResponse['cc_exp_year']); + $this->assertNotNull($requestResponse['cc_exp_month']); + $this->assertNotNull($requestResponse['additional_data']); + + $this->assertEquals('checkmo', $requestResponse['method']); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/PaymentMethodManagementTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/PaymentMethodManagementTest.php new file mode 100644 index 00000000000..c90913562a6 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/PaymentMethodManagementTest.php @@ -0,0 +1,423 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Checkout\Model; + +class PaymentMethodManagementTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Checkout\Model\PaymentMethodManagement + */ + protected $model; + + /** + * @var \Magento\TestFramework\Helper\ObjectManager + */ + protected $objectManager; + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $quoteRepositoryMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $methodListMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $zeroTotalMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $paymentMethodBuilder; + + protected function setUp() + { + $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); + $this->methodListMock = $this->getMock('\Magento\Payment\Model\MethodList', [], [], '', false); + $this->zeroTotalMock = $this->getMock('\Magento\Payment\Model\Checks\ZeroTotal', [], [], '', false); + $this->paymentMethodBuilder = $this->getMock('\Magento\Checkout\Api\Data\PaymentMethodDataBuilder', [], [], '', false); + + $this->model = $this->objectManager->getObject( + '\Magento\Checkout\Model\PaymentMethodManagement', + [ + 'quoteRepository' => $this->quoteRepositoryMock, + 'methodList' => $this->methodListMock, + 'zeroTotalValidator' => $this->zeroTotalMock, + 'paymentMethodBuilder' => $this->paymentMethodBuilder, + ] + ); + } + + public function testGetPaymentIfPaymentMethodNotSet() + { + $cartId = 11; + $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); + $paymentMock = $this->getMock('\Magento\Quote\Model\Quote\Payment', [], [], '', false); + $quoteMock->expects($this->once())->method('getPayment')->will($this->returnValue($paymentMock)); + $paymentMock->expects($this->once())->method('getId')->will($this->returnValue(null)); + + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive') + ->with($cartId) + ->will($this->returnValue($quoteMock)); + + $this->assertNull($this->model->get($cartId)); + } + + public function testGetPaymentSuccess() + { + $cartId = 11; + + $paymentMock = $this->getMock('\Magento\Quote\Model\Quote\Payment', [], [], '', false); + $paymentMock->expects($this->once())->method('getId')->will($this->returnValue(1)); + + $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); + $quoteMock->expects($this->once())->method('getPayment')->will($this->returnValue($paymentMock)); + + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive') + ->with($cartId) + ->will($this->returnValue($quoteMock)); + $this->assertEquals($paymentMock, $this->model->get($cartId)); + } + + public function testGetList() + { + $cartId = 10; + $title = 'title'; + $code = 'code'; + + $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive') + ->with($cartId) + ->will($this->returnValue($quoteMock)); + + $paymentMethod = $this->getMock('\Magento\Payment\Model\MethodInterface'); + $paymentMethod->expects($this->once())->method('getTitle')->willReturn($title); + $paymentMethod->expects($this->once())->method('getCode')->willReturn($code); + + $this->methodListMock->expects($this->once()) + ->method('getAvailableMethods') + ->with($quoteMock) + ->will($this->returnValue([$paymentMethod])); + + $paymentMethodMock = $this->getMock('\Magento\Checkout\Api\Data\PaymentMethodInterface'); + $this->paymentMethodBuilder->expects($this->once()) + ->method('setTitle') + ->with($title) + ->willReturnSelf(); + $this->paymentMethodBuilder->expects($this->once()) + ->method('setCode') + ->with($code) + ->willReturnSelf(); + $this->paymentMethodBuilder->expects($this->once()) + ->method('create') + ->willReturn($paymentMethodMock); + + $this->assertEquals([$paymentMethodMock], $this->model->getList($cartId)); + } + + public function testSetVirtualProduct() + { + $cartId = 100; + $paymentId = 200; + $methodData = ['method' => 'data']; + $paymentMethod = 'checkmo'; + + $quoteMock = $this->getMock( + '\Magento\Quote\Model\Quote', + ['setTotalsCollectedFlag', 'getPayment', 'isVirtual', 'getBillingAddress', 'collectTotals', 'save'], + [], + '', + false + ); + $this->quoteRepositoryMock->expects($this->once())->method('getActive')->with($cartId)->willReturn($quoteMock); + + $methodMock = $this->getMock('\Magento\Quote\Model\Quote\Payment', ['setChecks', 'getData'], [], '', false); + $methodMock->expects($this->once()) + ->method('setChecks') + ->with([ + \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_CHECKOUT, + \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_FOR_COUNTRY, + \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_FOR_CURRENCY, + \Magento\Payment\Model\Method\AbstractMethod::CHECK_ORDER_TOTAL_MIN_MAX, + ]) + ->willReturnSelf(); + $methodMock->expects($this->once())->method('getData')->willReturn($methodData); + + $paymentMock = $this->getMock( + '\Magento\Quote\Model\Quote\Payment', + ['importData', 'getMethod', 'getMethodInstance', 'getId'], + [], + '', + false + ); + $paymentMock->expects($this->once())->method('importData')->with($methodData)->willReturnSelf(); + $paymentMock->expects($this->once())->method('getMethod')->willReturn($paymentMethod); + + $billingAddressMock = $this->getMock( + '\Magento\Quote\Model\Quote\Address', + ['getCountryId', 'setPaymentMethod'], + [], + '', + false + ); + $billingAddressMock->expects($this->once())->method('getCountryId')->willReturn(100); + $billingAddressMock->expects($this->once()) + ->method('setPaymentMethod') + ->with($paymentMethod) + ->willReturnSelf(); + + $quoteMock->expects($this->exactly(2))->method('getPayment')->willReturn($paymentMock); + $quoteMock->expects($this->exactly(2))->method('isVirtual')->willReturn(true); + $quoteMock->expects($this->exactly(2))->method('getBillingAddress')->willReturn($billingAddressMock); + + $methodInstance = $this->getMock('\Magento\Payment\Model\Checks\PaymentMethodChecksInterface'); + $paymentMock->expects($this->once())->method('getMethodInstance')->willReturn($methodInstance); + + $this->zeroTotalMock->expects($this->once()) + ->method('isApplicable') + ->with($methodInstance, $quoteMock) + ->willReturn(true); + + $quoteMock->expects($this->once())->method('setTotalsCollectedFlag')->with(false)->willReturnSelf(); + $quoteMock->expects($this->once())->method('collectTotals')->willReturnSelf(); + $quoteMock->expects($this->once())->method('save')->willReturnSelf(); + + $paymentMock->expects($this->once())->method('getId')->willReturn($paymentId); + $this->assertEquals($paymentId, $this->model->set($methodMock, $cartId)); + } + + /** + * @expectedException \Magento\Framework\Exception\State\InvalidTransitionException + * @expectedExceptionMessage Billing address is not set + */ + public function testSetVirtualProductThrowsExceptionIfBillingAddressNotSet() + { + $cartId = 100; + $methodData = ['method' => 'data']; + + $quoteMock = $this->getMock( + '\Magento\Quote\Model\Quote', + ['getPayment', 'isVirtual', 'getBillingAddress'], + [], + '', + false + ); + $this->quoteRepositoryMock->expects($this->once())->method('getActive')->with($cartId)->willReturn($quoteMock); + + $methodMock = $this->getMock('\Magento\Quote\Model\Quote\Payment', ['setChecks', 'getData'], [], '', false); + $methodMock->expects($this->once()) + ->method('setChecks') + ->with([ + \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_CHECKOUT, + \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_FOR_COUNTRY, + \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_FOR_CURRENCY, + \Magento\Payment\Model\Method\AbstractMethod::CHECK_ORDER_TOTAL_MIN_MAX, + ]) + ->willReturnSelf(); + $methodMock->expects($this->once())->method('getData')->willReturn($methodData); + + $paymentMock = $this->getMock('\Magento\Quote\Model\Quote\Payment', ['importData', 'getMethod'], [], '', false); + $paymentMock->expects($this->once())->method('importData')->with($methodData)->willReturnSelf(); + + $billingAddressMock = $this->getMock('\Magento\Quote\Model\Quote\Address', ['getCountryId'], [], '', false); + $billingAddressMock->expects($this->once())->method('getCountryId')->willReturn(null); + + $quoteMock->expects($this->once())->method('getPayment')->willReturn($paymentMock); + $quoteMock->expects($this->once())->method('isVirtual')->willReturn(true); + $quoteMock->expects($this->once())->method('getBillingAddress')->willReturn($billingAddressMock); + + $this->model->set($methodMock, $cartId); + } + + /** + * @expectedException \Magento\Framework\Exception\State\InvalidTransitionException + * @expectedExceptionMessage The requested Payment Method is not available. + */ + public function testSetVirtualProductThrowsExceptionIfPaymentMethodNotAvailable() + { + $cartId = 100; + $methodData = ['method' => 'data']; + $paymentMethod = 'checkmo'; + + $quoteMock = $this->getMock( + '\Magento\Quote\Model\Quote', + ['getPayment', 'isVirtual', 'getBillingAddress'], + [], + '', + false + ); + $this->quoteRepositoryMock->expects($this->once())->method('getActive')->with($cartId)->willReturn($quoteMock); + + $methodMock = $this->getMock('\Magento\Quote\Model\Quote\Payment', ['setChecks', 'getData'], [], '', false); + $methodMock->expects($this->once()) + ->method('setChecks') + ->with([ + \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_CHECKOUT, + \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_FOR_COUNTRY, + \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_FOR_CURRENCY, + \Magento\Payment\Model\Method\AbstractMethod::CHECK_ORDER_TOTAL_MIN_MAX, + ]) + ->willReturnSelf(); + $methodMock->expects($this->once())->method('getData')->willReturn($methodData); + + $paymentMock = $this->getMock( + '\Magento\Quote\Model\Quote\Payment', + ['importData', 'getMethod', 'getMethodInstance'], + [], + '', + false + ); + $paymentMock->expects($this->once())->method('importData')->with($methodData)->willReturnSelf(); + $paymentMock->expects($this->once())->method('getMethod')->willReturn($paymentMethod); + + $billingAddressMock = $this->getMock( + '\Magento\Quote\Model\Quote\Address', + ['getCountryId', 'setPaymentMethod'], + [], + '', + false + ); + $billingAddressMock->expects($this->once())->method('getCountryId')->willReturn(100); + $billingAddressMock->expects($this->once()) + ->method('setPaymentMethod') + ->with($paymentMethod) + ->willReturnSelf(); + + $quoteMock->expects($this->once())->method('getPayment')->willReturn($paymentMock); + $quoteMock->expects($this->exactly(2))->method('isVirtual')->willReturn(true); + $quoteMock->expects($this->exactly(2))->method('getBillingAddress')->willReturn($billingAddressMock); + + $methodInstance = $this->getMock('\Magento\Payment\Model\Checks\PaymentMethodChecksInterface'); + $paymentMock->expects($this->once())->method('getMethodInstance')->willReturn($methodInstance); + + $this->zeroTotalMock->expects($this->once()) + ->method('isApplicable') + ->with($methodInstance, $quoteMock) + ->willReturn(false); + $this->model->set($methodMock, $cartId); + } + + public function testSetSimpleProduct() + { + $cartId = 100; + $paymentId = 20; + $methodData = ['method' => 'data']; + $paymentMethod = 'checkmo'; + + $quoteMock = $this->getMock( + '\Magento\Quote\Model\Quote', + ['getPayment', 'isVirtual', 'getShippingAddress', 'setTotalsCollectedFlag', 'collectTotals', 'save'], + [], + '', + false + ); + $this->quoteRepositoryMock->expects($this->once())->method('getActive')->with($cartId)->willReturn($quoteMock); + + $methodMock = $this->getMock('\Magento\Quote\Model\Quote\Payment', ['setChecks', 'getData'], [], '', false); + $methodMock->expects($this->once()) + ->method('setChecks') + ->with([ + \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_CHECKOUT, + \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_FOR_COUNTRY, + \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_FOR_CURRENCY, + \Magento\Payment\Model\Method\AbstractMethod::CHECK_ORDER_TOTAL_MIN_MAX, + ]) + ->willReturnSelf(); + $methodMock->expects($this->once())->method('getData')->willReturn($methodData); + + $paymentMock = $this->getMock( + '\Magento\Quote\Model\Quote\Payment', + ['importData', 'getMethod', 'getMethodInstance', 'getId'], + [], + '', + false + ); + $paymentMock->expects($this->once())->method('importData')->with($methodData)->willReturnSelf(); + $paymentMock->expects($this->once())->method('getMethod')->willReturn($paymentMethod); + + $shippingAddressMock = $this->getMock( + '\Magento\Quote\Model\Quote\Address', + ['getCountryId', 'setPaymentMethod'], + [], + '', + false + ); + $shippingAddressMock->expects($this->once())->method('getCountryId')->willReturn(100); + $shippingAddressMock->expects($this->once()) + ->method('setPaymentMethod') + ->with($paymentMethod) + ->willReturnSelf(); + + $quoteMock->expects($this->exactly(2))->method('getPayment')->willReturn($paymentMock); + $quoteMock->expects($this->exactly(2))->method('isVirtual')->willReturn(false); + $quoteMock->expects($this->exactly(4))->method('getShippingAddress')->willReturn($shippingAddressMock); + + $methodInstance = $this->getMock('\Magento\Payment\Model\Checks\PaymentMethodChecksInterface'); + $paymentMock->expects($this->once())->method('getMethodInstance')->willReturn($methodInstance); + + $this->zeroTotalMock->expects($this->once()) + ->method('isApplicable') + ->with($methodInstance, $quoteMock) + ->willReturn(true); + + $quoteMock->expects($this->once())->method('setTotalsCollectedFlag')->with(false)->willReturnSelf(); + $quoteMock->expects($this->once())->method('collectTotals')->willReturnSelf(); + $quoteMock->expects($this->once())->method('save')->willReturnSelf(); + + $paymentMock->expects($this->once())->method('getId')->willReturn($paymentId); + $this->assertEquals($paymentId, $this->model->set($methodMock, $cartId)); + } + + /** + * @expectedException \Magento\Framework\Exception\State\InvalidTransitionException + * @expectedExceptionMessage Shipping address is not set + */ + public function testSetSimpleProductTrowsExceptionIfShippingAddressNotSet() + { + $cartId = 100; + $methodData = ['method' => 'data']; + + $quoteMock = $this->getMock( + '\Magento\Quote\Model\Quote', + ['getPayment', 'isVirtual', 'getShippingAddress'], + [], + '', + false + ); + $this->quoteRepositoryMock->expects($this->once())->method('getActive')->with($cartId)->willReturn($quoteMock); + + $methodMock = $this->getMock('\Magento\Quote\Model\Quote\Payment', ['setChecks', 'getData'], [], '', false); + $methodMock->expects($this->once()) + ->method('setChecks') + ->with([ + \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_CHECKOUT, + \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_FOR_COUNTRY, + \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_FOR_CURRENCY, + \Magento\Payment\Model\Method\AbstractMethod::CHECK_ORDER_TOTAL_MIN_MAX, + ]) + ->willReturnSelf(); + $methodMock->expects($this->once())->method('getData')->willReturn($methodData); + + $paymentMock = $this->getMock('\Magento\Quote\Model\Quote\Payment', ['importData'], [], '', false); + $paymentMock->expects($this->once())->method('importData')->with($methodData)->willReturnSelf(); + + $shippingAddressMock = $this->getMock('\Magento\Quote\Model\Quote\Address', ['getCountryId'], [], '', false); + $shippingAddressMock->expects($this->once())->method('getCountryId')->willReturn(null); + + $quoteMock->expects($this->once())->method('getPayment')->willReturn($paymentMock); + $quoteMock->expects($this->once())->method('isVirtual')->willReturn(false); + $quoteMock->expects($this->once())->method('getShippingAddress')->willReturn($shippingAddressMock); + + $this->model->set($methodMock, $cartId); + } +} -- GitLab From 004c9bb917b250ae2d6515ec3b96d4099b6f9c2e Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Wed, 14 Jan 2015 14:46:18 +0200 Subject: [PATCH 027/114] MAGETWO-31575: Remove black/white lists from file system and builds configuration - ignore coding standards added to files with defects --- .../AdminNotification/Block/Grid/Renderer/Actions.php | 3 +++ app/code/Magento/AdminNotification/Block/ToolbarEntry.php | 3 +++ .../AdminNotification/Model/Resource/Grid/Collection.php | 2 ++ .../AdminNotification/Model/System/Message/Baseurl.php | 3 +++ .../Model/System/Message/Media/Synchronization/Error.php | 3 +++ .../AdminNotification/Model/System/Message/Security.php | 3 +++ .../view/adminhtml/templates/notification/window.phtml | 3 +++ .../view/adminhtml/templates/system/messages.phtml | 3 +++ .../view/adminhtml/templates/system/messages/popup.phtml | 3 +++ .../view/adminhtml/templates/toolbar_entry.phtml | 3 +++ app/code/Magento/Authorization/Model/Resource/Rules.php | 3 +++ app/code/Magento/Backend/App/Config.php | 3 +++ app/code/Magento/Backend/Block/Dashboard.php | 3 +++ .../Magento/Backend/Block/Dashboard/AbstractDashboard.php | 3 +++ app/code/Magento/Backend/Block/Menu.php | 3 +++ app/code/Magento/Backend/Block/Page/Header.php | 3 +++ app/code/Magento/Backend/Block/Page/Notices.php | 2 ++ .../Backend/Block/Page/System/Config/Robots/Reset.php | 3 +++ .../Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php | 3 +++ app/code/Magento/Backend/Block/System/Config/Form/Field.php | 2 ++ .../Config/Form/Field/FieldArray/AbstractFieldArray.php | 3 +++ .../Block/System/Config/Form/Field/Select/Allowspecific.php | 2 ++ .../Magento/Backend/Block/System/Design/Edit/Tab/General.php | 3 +++ .../Magento/Backend/Block/Widget/Form/Element/Gallery.php | 3 +++ .../Magento/Backend/Block/Widget/Form/Renderer/Element.php | 3 +++ .../Magento/Backend/Block/Widget/Form/Renderer/Fieldset.php | 3 +++ .../Backend/Block/Widget/Form/Renderer/Fieldset/Element.php | 3 +++ app/code/Magento/Backend/Block/Widget/Grid.php | 3 +++ .../Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php | 3 +++ .../Backend/Block/Widget/Grid/Column/Filter/Datetime.php | 3 +++ .../Backend/Block/Widget/Grid/Column/Renderer/Action.php | 3 +++ .../Backend/Block/Widget/Grid/Column/Renderer/Currency.php | 3 +++ app/code/Magento/Backend/Block/Widget/Grid/Export.php | 3 +++ .../Magento/Backend/Controller/Adminhtml/System/Store.php | 3 +++ .../Magento/Backend/Model/Config/Backend/Currency/Base.php | 2 ++ .../Magento/Backend/Model/Config/Backend/Email/Sender.php | 2 ++ app/code/Magento/Backend/Model/Config/Backend/Encrypted.php | 3 +++ .../Magento/Backend/Model/Config/Source/Dev/Dbautoup.php | 3 +++ .../Magento/Backend/Model/Config/Structure/Element/Group.php | 3 +++ app/code/Magento/Backend/Model/Menu/Director/Director.php | 3 +++ app/code/Magento/Backend/Model/Menu/Item.php | 3 +++ .../Magento/Backend/Model/Widget/Grid/AbstractTotals.php | 3 +++ .../view/adminhtml/templates/admin/access_denied.phtml | 3 +++ .../Backend/view/adminhtml/templates/admin/login.phtml | 3 +++ .../view/adminhtml/templates/admin/overlay_popup.phtml | 3 +++ .../Backend/view/adminhtml/templates/admin/page.phtml | 3 +++ .../Backend/view/adminhtml/templates/dashboard/graph.phtml | 3 +++ .../Backend/view/adminhtml/templates/dashboard/grid.phtml | 3 +++ .../Backend/view/adminhtml/templates/dashboard/index.phtml | 3 +++ .../Backend/view/adminhtml/templates/dashboard/salebar.phtml | 3 +++ .../view/adminhtml/templates/dashboard/searches.phtml | 3 +++ .../view/adminhtml/templates/dashboard/store/switcher.phtml | 3 +++ .../view/adminhtml/templates/dashboard/totalbar.phtml | 3 +++ app/code/Magento/Backend/view/adminhtml/templates/menu.phtml | 3 +++ .../Backend/view/adminhtml/templates/page/copyright.phtml | 3 +++ .../Backend/view/adminhtml/templates/page/footer.phtml | 3 +++ .../Backend/view/adminhtml/templates/page/header.phtml | 2 ++ .../view/adminhtml/templates/page/js/components.phtml | 3 +++ .../Backend/view/adminhtml/templates/page/js/translate.phtml | 3 +++ .../Backend/view/adminhtml/templates/page/locale.phtml | 3 +++ .../Backend/view/adminhtml/templates/page/notices.phtml | 3 +++ .../templates/page/system/config/robots/reset.phtml | 2 ++ .../Backend/view/adminhtml/templates/pageactions.phtml | 3 +++ .../Backend/view/adminhtml/templates/store/switcher.phtml | 3 +++ .../templates/store/switcher/form/renderer/fieldset.phtml | 3 +++ .../store/switcher/form/renderer/fieldset/element.phtml | 3 +++ .../view/adminhtml/templates/system/autocomplete.phtml | 3 +++ .../Backend/view/adminhtml/templates/system/cache/edit.phtml | 3 +++ .../view/adminhtml/templates/system/config/edit.phtml | 3 +++ .../adminhtml/templates/system/config/form/field/array.phtml | 3 +++ .../Backend/view/adminhtml/templates/system/config/js.phtml | 3 +++ .../view/adminhtml/templates/system/config/switcher.phtml | 3 +++ .../system/config/system/storage/media/synchronize.phtml | 3 +++ .../view/adminhtml/templates/system/config/tabs.phtml | 2 ++ .../view/adminhtml/templates/system/design/index.phtml | 3 +++ .../Backend/view/adminhtml/templates/system/search.phtml | 2 ++ .../Backend/view/adminhtml/templates/widget/accordion.phtml | 3 +++ .../view/adminhtml/templates/widget/breadcrumbs.phtml | 3 +++ .../Backend/view/adminhtml/templates/widget/button.phtml | 3 +++ .../view/adminhtml/templates/widget/button/split.phtml | 3 +++ .../Backend/view/adminhtml/templates/widget/form.phtml | 3 +++ .../view/adminhtml/templates/widget/form/container.phtml | 3 +++ .../view/adminhtml/templates/widget/form/element.phtml | 3 +++ .../adminhtml/templates/widget/form/element/gallery.phtml | 3 +++ .../adminhtml/templates/widget/form/renderer/element.phtml | 3 +++ .../adminhtml/templates/widget/form/renderer/fieldset.phtml | 3 +++ .../templates/widget/form/renderer/fieldset/element.phtml | 3 +++ .../Backend/view/adminhtml/templates/widget/grid.phtml | 3 +++ .../view/adminhtml/templates/widget/grid/column_set.phtml | 3 +++ .../view/adminhtml/templates/widget/grid/container.phtml | 3 +++ .../adminhtml/templates/widget/grid/container/empty.phtml | 3 +++ .../view/adminhtml/templates/widget/grid/export.phtml | 3 +++ .../view/adminhtml/templates/widget/grid/extended.phtml | 3 +++ .../view/adminhtml/templates/widget/grid/massaction.phtml | 3 +++ .../templates/widget/grid/massaction_extended.phtml | 3 +++ .../view/adminhtml/templates/widget/grid/serializer.phtml | 3 +++ .../Backend/view/adminhtml/templates/widget/tabs.phtml | 2 ++ .../Backend/view/adminhtml/templates/widget/tabshoriz.phtml | 3 +++ .../Backend/view/adminhtml/templates/widget/tabsleft.phtml | 3 +++ .../view/adminhtml/templates/widget/view/container.phtml | 3 +++ .../Backend/view/install/templates/page/copyright.phtml | 3 +++ app/code/Magento/Backup/Model/Resource/Helper.php | 3 +++ .../Backup/view/adminhtml/templates/backup/dialogs.phtml | 3 +++ .../Backup/view/adminhtml/templates/backup/list.phtml | 3 +++ .../Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php | 3 +++ .../Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php | 3 +++ app/code/Magento/Bundle/Model/Product/Type.php | 3 +++ .../Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php | 3 +++ .../product/composite/fieldset/options/bundle.phtml | 3 +++ .../product/composite/fieldset/options/type/checkbox.phtml | 2 ++ .../product/composite/fieldset/options/type/multi.phtml | 2 ++ .../product/composite/fieldset/options/type/radio.phtml | 2 ++ .../product/composite/fieldset/options/type/select.phtml | 2 ++ .../view/adminhtml/templates/product/edit/bundle.phtml | 2 ++ .../adminhtml/templates/product/edit/bundle/option.phtml | 2 ++ .../templates/product/edit/bundle/option/selection.phtml | 2 ++ .../templates/sales/creditmemo/create/items/renderer.phtml | 3 +++ .../templates/sales/creditmemo/view/items/renderer.phtml | 3 +++ .../templates/sales/invoice/create/items/renderer.phtml | 3 +++ .../templates/sales/invoice/view/items/renderer.phtml | 3 +++ .../templates/sales/order/view/items/renderer.phtml | 3 +++ .../templates/sales/shipment/create/items/renderer.phtml | 3 +++ .../templates/sales/shipment/view/items/renderer.phtml | 3 +++ .../view/base/templates/product/price/final_price.phtml | 3 +++ .../view/base/templates/product/price/selection/amount.phtml | 3 +++ .../view/base/templates/product/price/tier_prices.phtml | 3 +++ .../frontend/templates/catalog/product/view/customize.phtml | 3 +++ .../frontend/templates/catalog/product/view/summary.phtml | 3 +++ .../templates/catalog/product/view/type/bundle.phtml | 4 +++- .../catalog/product/view/type/bundle/option/checkbox.phtml | 3 +++ .../catalog/product/view/type/bundle/option/multi.phtml | 2 ++ .../catalog/product/view/type/bundle/option/radio.phtml | 2 ++ .../catalog/product/view/type/bundle/option/select.phtml | 3 +++ .../templates/catalog/product/view/type/bundle/options.phtml | 3 +++ .../templates/email/order/items/creditmemo/default.phtml | 3 +++ .../templates/email/order/items/invoice/default.phtml | 3 +++ .../frontend/templates/email/order/items/order/default.phtml | 3 +++ .../templates/email/order/items/shipment/default.phtml | 3 +++ .../Bundle/view/frontend/templates/js/components.phtml | 3 +++ .../templates/sales/order/creditmemo/items/renderer.phtml | 3 +++ .../templates/sales/order/invoice/items/renderer.phtml | 3 +++ .../view/frontend/templates/sales/order/items/renderer.phtml | 2 ++ .../templates/sales/order/shipment/items/renderer.phtml | 3 +++ app/code/Magento/Captcha/Model/Config/Form/AbstractForm.php | 2 ++ .../Magento/Captcha/view/adminhtml/templates/default.phtml | 3 +++ .../Magento/Captcha/view/frontend/templates/default.phtml | 3 +++ .../Captcha/view/frontend/templates/js/components.phtml | 3 +++ app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php | 2 ++ .../Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php | 2 ++ .../Product/Edit/Action/Attribute/Tab/Attributes.php | 2 ++ .../Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts.php | 2 ++ .../Block/Adminhtml/Product/Edit/Tab/Options/Option.php | 2 ++ .../Catalog/Block/Adminhtml/Product/Helper/Form/Category.php | 3 +++ .../Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php | 2 ++ app/code/Magento/Catalog/Block/Breadcrumbs.php | 2 ++ app/code/Magento/Catalog/Block/Navigation.php | 3 +++ .../Magento/Catalog/Block/Product/ProductList/Related.php | 3 +++ .../Magento/Catalog/Block/Product/ProductList/Upsell.php | 3 +++ .../Controller/Adminhtml/Product/Action/Attribute.php | 3 +++ .../Catalog/Controller/Adminhtml/Product/Attribute/Save.php | 3 +++ app/code/Magento/Catalog/Helper/Product/ProductList.php | 2 ++ app/code/Magento/Catalog/Helper/Product/View.php | 2 ++ app/code/Magento/Catalog/Model/Config.php | 3 +++ app/code/Magento/Catalog/Model/Factory.php | 2 ++ .../Catalog/Model/Indexer/Category/Flat/AbstractAction.php | 3 +++ .../Model/Indexer/Category/Product/AbstractAction.php | 3 +++ .../Model/Indexer/Category/Product/Plugin/IndexerState.php | 3 +++ .../Model/Indexer/Category/Product/Plugin/MviewState.php | 3 +++ .../Catalog/Model/Indexer/Product/Flat/Plugin/Store.php | 3 +++ .../Catalog/Model/Indexer/Product/Flat/Plugin/StoreGroup.php | 3 +++ .../Catalog/Model/Layer/Filter/Dynamic/AlgorithmFactory.php | 3 +++ app/code/Magento/Catalog/Model/Layer/Filter/Item.php | 2 ++ app/code/Magento/Catalog/Model/Layer/Filter/Price.php | 3 +++ app/code/Magento/Catalog/Model/Product/Action.php | 3 +++ .../Attribute/Backend/Groupprice/AbstractGroupprice.php | 3 +++ .../Magento/Catalog/Model/Product/Attribute/Backend/Sku.php | 2 ++ .../Catalog/Model/Product/Attribute/Source/Inputtype.php | 2 ++ app/code/Magento/Catalog/Model/Product/Media/Config.php | 3 +++ app/code/Magento/Catalog/Model/Product/Option.php | 3 +++ .../Catalog/Model/Product/Option/Type/DefaultType.php | 3 +++ app/code/Magento/Catalog/Model/Product/Option/Value.php | 3 +++ .../Magento/Catalog/Model/Product/TypeTransitionManager.php | 3 +++ app/code/Magento/Catalog/Model/Product/Website.php | 2 ++ app/code/Magento/Catalog/Model/Resource/AbstractResource.php | 3 +++ app/code/Magento/Catalog/Model/Resource/Eav/Attribute.php | 3 +++ .../Model/Resource/Product/Attribute/Backend/Media.php | 3 +++ .../Magento/Catalog/Model/Resource/Product/Collection.php | 3 +++ app/code/Magento/Catalog/Model/Template/Filter.php | 2 ++ app/code/Magento/Catalog/Model/Template/Filter/Factory.php | 2 ++ app/code/Magento/Catalog/Pricing/Price/TierPrice.php | 2 ++ .../Catalog/data/catalog_setup/data-install-2.0.0.php | 2 ++ .../templates/catalog/category/checkboxes/tree.phtml | 3 +++ .../view/adminhtml/templates/catalog/category/edit.phtml | 3 +++ .../adminhtml/templates/catalog/category/edit/form.phtml | 2 ++ .../view/adminhtml/templates/catalog/category/tree.phtml | 3 +++ .../adminhtml/templates/catalog/category/widget/tree.phtml | 3 +++ .../templates/catalog/form/renderer/fieldset/element.phtml | 3 +++ .../Catalog/view/adminhtml/templates/catalog/product.phtml | 3 +++ .../adminhtml/templates/catalog/product/attribute/form.phtml | 3 +++ .../adminhtml/templates/catalog/product/attribute/js.phtml | 3 +++ .../templates/catalog/product/attribute/labels.phtml | 3 +++ .../templates/catalog/product/attribute/options.phtml | 3 +++ .../templates/catalog/product/attribute/set/main.phtml | 3 +++ .../catalog/product/attribute/set/toolbar/main.phtml | 3 +++ .../templates/catalog/product/composite/configure.phtml | 3 +++ .../catalog/product/composite/fieldset/options.phtml | 3 +++ .../product/composite/fieldset/options/type/date.phtml | 3 +++ .../product/composite/fieldset/options/type/file.phtml | 3 +++ .../product/composite/fieldset/options/type/select.phtml | 3 +++ .../product/composite/fieldset/options/type/text.phtml | 3 +++ .../templates/catalog/product/composite/fieldset/qty.phtml | 3 +++ .../view/adminhtml/templates/catalog/product/edit.phtml | 3 +++ .../templates/catalog/product/edit/action/attribute.phtml | 3 +++ .../templates/catalog/product/edit/action/inventory.phtml | 3 +++ .../templates/catalog/product/edit/action/websites.phtml | 3 +++ .../templates/catalog/product/edit/attribute_set.phtml | 3 +++ .../adminhtml/templates/catalog/product/edit/options.phtml | 3 +++ .../templates/catalog/product/edit/options/option.phtml | 3 +++ .../templates/catalog/product/edit/options/type/date.phtml | 3 +++ .../templates/catalog/product/edit/options/type/file.phtml | 3 +++ .../templates/catalog/product/edit/options/type/select.phtml | 3 +++ .../templates/catalog/product/edit/options/type/text.phtml | 3 +++ .../templates/catalog/product/edit/price/group.phtml | 3 +++ .../templates/catalog/product/edit/price/tier.phtml | 3 +++ .../templates/catalog/product/edit/serializer.phtml | 3 +++ .../adminhtml/templates/catalog/product/edit/websites.phtml | 3 +++ .../adminhtml/templates/catalog/product/helper/gallery.phtml | 3 +++ .../view/adminhtml/templates/catalog/product/js.phtml | 2 ++ .../view/adminhtml/templates/catalog/product/tab/alert.phtml | 3 +++ .../adminhtml/templates/catalog/product/tab/inventory.phtml | 3 +++ .../view/adminhtml/templates/catalog/wysiwyg/js.phtml | 3 +++ .../adminhtml/templates/product/edit/attribute/search.phtml | 2 ++ .../Catalog/view/adminhtml/templates/product/edit/tabs.phtml | 2 ++ .../templates/product/grid/massaction_extended.phtml | 3 +++ .../Catalog/view/adminhtml/templates/rss/grid/link.phtml | 2 ++ .../view/base/templates/product/price/amount/default.phtml | 3 +++ .../view/base/templates/product/price/amount/option.phtml | 3 +++ .../Catalog/view/base/templates/product/price/default.phtml | 3 +++ .../view/base/templates/product/price/final_price.phtml | 3 +++ .../view/base/templates/product/price/tier_prices.phtml | 3 +++ .../Catalog/view/frontend/templates/category/cms.phtml | 3 +++ .../view/frontend/templates/category/description.phtml | 3 +++ .../Catalog/view/frontend/templates/category/image.phtml | 3 +++ .../Catalog/view/frontend/templates/category/products.phtml | 3 +++ .../Catalog/view/frontend/templates/category/rss.phtml | 3 +++ .../Catalog/view/frontend/templates/category/view.phtml | 3 +++ .../Catalog/view/frontend/templates/js/components.phtml | 3 +++ .../Catalog/view/frontend/templates/navigation/left.phtml | 2 ++ .../view/frontend/templates/product/compare/link.phtml | 3 +++ .../view/frontend/templates/product/compare/list.phtml | 3 +++ .../view/frontend/templates/product/compare/sidebar.phtml | 3 +++ .../Catalog/view/frontend/templates/product/gallery.phtml | 3 +++ .../Catalog/view/frontend/templates/product/list.phtml | 3 +++ .../Catalog/view/frontend/templates/product/list/items.phtml | 3 +++ .../view/frontend/templates/product/list/toolbar.phtml | 3 +++ .../frontend/templates/product/list/toolbar/amount.phtml | 3 +++ .../frontend/templates/product/list/toolbar/limiter.phtml | 3 +++ .../frontend/templates/product/list/toolbar/sorter.phtml | 3 +++ .../frontend/templates/product/list/toolbar/viewmode.phtml | 3 +++ .../Catalog/view/frontend/templates/product/listing.phtml | 3 +++ .../view/frontend/templates/product/view/additional.phtml | 3 +++ .../Catalog/view/frontend/templates/product/view/addto.phtml | 3 +++ .../view/frontend/templates/product/view/addtocart.phtml | 2 ++ .../view/frontend/templates/product/view/attribute.phtml | 2 ++ .../view/frontend/templates/product/view/attributes.phtml | 2 ++ .../view/frontend/templates/product/view/base-image.phtml | 2 ++ .../view/frontend/templates/product/view/description.phtml | 2 ++ .../view/frontend/templates/product/view/details.phtml | 3 +++ .../Catalog/view/frontend/templates/product/view/form.phtml | 2 ++ .../view/frontend/templates/product/view/mailto.phtml | 3 +++ .../frontend/templates/product/view/opengraph/general.phtml | 2 ++ .../view/frontend/templates/product/view/options.phtml | 3 +++ .../frontend/templates/product/view/options/type/date.phtml | 3 +++ .../templates/product/view/options/type/default.phtml | 3 +++ .../frontend/templates/product/view/options/type/file.phtml | 3 +++ .../templates/product/view/options/type/select.phtml | 3 +++ .../frontend/templates/product/view/options/type/text.phtml | 3 +++ .../view/frontend/templates/product/view/price_clone.phtml | 3 +++ .../view/frontend/templates/product/view/review.phtml | 3 +++ .../view/frontend/templates/product/view/type/default.phtml | 3 +++ .../product/widget/new/column/new_default_list.phtml | 3 +++ .../product/widget/new/column/new_images_list.phtml | 3 +++ .../templates/product/widget/new/column/new_names_list.phtml | 3 +++ .../templates/product/widget/new/content/new_grid.phtml | 3 +++ .../templates/product/widget/new/content/new_list.phtml | 3 +++ .../Magento/CatalogImportExport/Model/Import/Product.php | 3 +++ .../CatalogImportExport/Model/Import/Product/Option.php | 3 +++ .../Model/Indexer/Category/Product/Plugin/Import.php | 3 +++ .../Model/Indexer/Product/Category/Plugin/Import.php | 3 +++ .../Model/Resource/Stock/Item/StockItemCriteria.php | 3 +++ .../Model/Resource/Stock/Status/StockStatusCriteria.php | 3 +++ app/code/Magento/CatalogInventory/Model/StockIndex.php | 3 +++ .../Magento/CatalogInventory/Model/StockStateProvider.php | 3 +++ .../view/frontend/templates/qtyincrements.phtml | 2 ++ .../view/frontend/templates/stockqty/composite.phtml | 2 ++ .../view/frontend/templates/stockqty/default.phtml | 2 ++ .../CatalogRule/Controller/Adminhtml/Promo/Catalog.php | 2 ++ .../view/adminhtml/templates/promo/fieldset.phtml | 3 +++ .../CatalogRule/view/adminhtml/templates/promo/form.phtml | 3 +++ .../CatalogSearch/Model/Resource/Search/Collection.php | 3 +++ .../view/frontend/templates/advanced/form.phtml | 3 +++ .../view/frontend/templates/advanced/link.phtml | 3 +++ .../view/frontend/templates/advanced/result.phtml | 3 +++ .../CatalogSearch/view/frontend/templates/result.phtml | 3 +++ .../Magento/CatalogWidget/Block/Product/ProductsList.php | 3 +++ .../view/adminhtml/templates/product/widget/conditions.phtml | 3 +++ .../frontend/templates/product/widget/content/grid.phtml | 3 +++ app/code/Magento/Centinel/Model/Config.php | 2 ++ .../view/adminhtml/templates/authentication/complete.phtml | 3 +++ .../Centinel/view/adminhtml/templates/validation/form.phtml | 3 +++ .../Centinel/view/frontend/templates/authentication.phtml | 3 +++ .../view/frontend/templates/authentication/complete.phtml | 3 +++ app/code/Magento/Centinel/view/frontend/templates/logo.phtml | 3 +++ app/code/Magento/Checkout/Block/Cart/Item/Renderer.php | 3 +++ app/code/Magento/Checkout/Block/Cart/Sidebar.php | 3 +++ app/code/Magento/Checkout/Block/Cart/Sidebar/Totals.php | 3 +++ app/code/Magento/Checkout/Block/Onepage/Failure.php | 3 +++ app/code/Magento/Checkout/Block/Onepage/Progress.php | 3 +++ app/code/Magento/Checkout/Controller/Cart/Add.php | 3 +++ app/code/Magento/Checkout/Controller/Cart/Index.php | 3 +++ .../Magento/Checkout/Controller/Cart/UpdateItemOptions.php | 3 +++ app/code/Magento/Checkout/Controller/Cart/UpdatePost.php | 3 +++ app/code/Magento/Checkout/Helper/Cart.php | 3 +++ app/code/Magento/Checkout/Service/V1/Cart/WriteService.php | 2 ++ app/code/Magento/Checkout/Service/V1/Data/Cart.php | 3 +++ .../Checkout/Service/V1/PaymentMethod/WriteService.php | 3 +++ .../Service/V1/PaymentMethod/WriteServiceInterface.php | 3 +++ .../Checkout/Service/V1/ShippingMethod/ReadService.php | 2 ++ .../Checkout/Service/V1/ShippingMethod/WriteService.php | 3 +++ .../Service/V1/ShippingMethod/WriteServiceInterface.php | 3 +++ .../Magento/Checkout/view/frontend/templates/button.phtml | 3 +++ .../view/frontend/templates/cart/additional/info.phtml | 3 +++ .../Checkout/view/frontend/templates/cart/coupon.phtml | 3 +++ .../Magento/Checkout/view/frontend/templates/cart/form.phtml | 2 ++ .../frontend/templates/cart/item/configure/updatecart.phtml | 2 ++ .../Checkout/view/frontend/templates/cart/item/default.phtml | 2 ++ .../view/frontend/templates/cart/item/price/sidebar.phtml | 2 ++ .../Checkout/view/frontend/templates/cart/methods.phtml | 3 +++ .../Checkout/view/frontend/templates/cart/minicart.phtml | 2 ++ .../Checkout/view/frontend/templates/cart/shipping.phtml | 3 +++ .../view/frontend/templates/cart/sidebar/default.phtml | 3 +++ .../Checkout/view/frontend/templates/item/price/row.phtml | 2 ++ .../Checkout/view/frontend/templates/item/price/unit.phtml | 2 ++ .../Checkout/view/frontend/templates/js/components.phtml | 3 +++ .../Magento/Checkout/view/frontend/templates/onepage.phtml | 2 ++ .../Checkout/view/frontend/templates/onepage/billing.phtml | 3 +++ .../Checkout/view/frontend/templates/onepage/failure.phtml | 3 +++ .../Checkout/view/frontend/templates/onepage/link.phtml | 3 +++ .../Checkout/view/frontend/templates/onepage/login.phtml | 3 +++ .../Checkout/view/frontend/templates/onepage/payment.phtml | 3 +++ .../view/frontend/templates/onepage/payment/methods.phtml | 3 +++ .../Checkout/view/frontend/templates/onepage/progress.phtml | 3 +++ .../view/frontend/templates/onepage/review/info.phtml | 2 ++ .../view/frontend/templates/onepage/review/item.phtml | 2 ++ .../templates/onepage/review/item/price/row_excl_tax.phtml | 2 ++ .../templates/onepage/review/item/price/row_incl_tax.phtml | 2 ++ .../templates/onepage/review/item/price/unit_excl_tax.phtml | 2 ++ .../templates/onepage/review/item/price/unit_incl_tax.phtml | 2 ++ .../view/frontend/templates/onepage/review/totals.phtml | 2 ++ .../Checkout/view/frontend/templates/onepage/shipping.phtml | 3 +++ .../view/frontend/templates/onepage/shipping_method.phtml | 3 +++ .../templates/onepage/shipping_method/additional.phtml | 3 +++ .../templates/onepage/shipping_method/available.phtml | 3 +++ .../Checkout/view/frontend/templates/shipping/price.phtml | 3 +++ .../Magento/Checkout/view/frontend/templates/success.phtml | 3 +++ .../Checkout/view/frontend/templates/total/default.phtml | 3 +++ .../Checkout/view/frontend/templates/total/nominal.phtml | 2 ++ app/code/Magento/CheckoutAgreements/Block/Agreements.php | 3 +++ .../Magento/CheckoutAgreements/Model/Resource/Agreement.php | 3 +++ .../Model/Resource/Agreement/Collection.php | 3 +++ .../CheckoutAgreements/Service/V1/Agreement/ReadService.php | 3 +++ .../view/frontend/templates/agreements.phtml | 3 +++ .../view/frontend/templates/multishipping_agreements.phtml | 3 +++ app/code/Magento/Cms/Block/Block.php | 3 +++ app/code/Magento/Cms/Model/Resource/Page.php | 3 +++ .../Magento/Cms/Model/Wysiwyg/Images/Storage/Collection.php | 3 +++ app/code/Magento/Cms/data/cms_setup/data-install-2.0.0.php | 2 ++ .../Cms/view/adminhtml/templates/browser/content.phtml | 3 +++ .../Cms/view/adminhtml/templates/browser/content/files.phtml | 3 +++ .../view/adminhtml/templates/browser/content/uploader.phtml | 3 +++ .../Magento/Cms/view/adminhtml/templates/browser/tree.phtml | 3 +++ .../templates/page/edit/form/renderer/content.phtml | 3 +++ app/code/Magento/Cms/view/frontend/templates/content.phtml | 3 +++ app/code/Magento/Cms/view/frontend/templates/meta.phtml | 3 +++ .../templates/catalog/product/attribute/set/js.phtml | 3 +++ .../catalog/product/composite/fieldset/configurable.phtml | 3 +++ .../catalog/product/edit/super/attribute-js-template.phtml | 3 +++ .../catalog/product/edit/super/attribute-template.phtml | 3 +++ .../templates/catalog/product/edit/super/config.phtml | 3 +++ .../templates/catalog/product/edit/super/matrix.phtml | 3 +++ .../configurable/affected-attribute-set-selector/form.phtml | 2 ++ .../configurable/affected-attribute-set-selector/js.phtml | 3 +++ .../view/frontend/templates/js/components.phtml | 3 +++ .../templates/product/view/type/options/configurable.phtml | 3 +++ app/code/Magento/Contact/view/frontend/templates/form.phtml | 3 +++ app/code/Magento/Core/Model/Asset/Config.php | 3 +++ app/code/Magento/Core/Model/File/Storage.php | 3 +++ .../Magento/Core/Model/File/Storage/Directory/Database.php | 3 +++ .../Core/Model/File/Validator/NotProtectedExtension.php | 3 +++ app/code/Magento/Core/Model/Resource/Config.php | 3 +++ app/code/Magento/Core/Model/Resource/Design.php | 3 +++ app/code/Magento/Core/Model/Resource/Layout/Update.php | 3 +++ app/code/Magento/Core/Model/Resource/Variable.php | 3 +++ .../Core/Model/TemplateEngine/Decorator/DebugHints.php | 3 +++ .../Magento/Core/Model/TemplateEngine/Plugin/DebugHints.php | 3 +++ app/code/Magento/Core/Model/Url/RouteParamsResolver.php | 3 +++ app/code/Magento/Core/Model/Validator/Factory.php | 3 +++ app/code/Magento/Core/Model/Variable/Config.php | 2 ++ app/code/Magento/Core/view/frontend/templates/messages.phtml | 3 +++ .../Controller/Adminhtml/System/Currency/SaveRates.php | 3 +++ .../CurrencySymbol/view/adminhtml/templates/grid.phtml | 3 +++ .../adminhtml/templates/system/currency/rate/matrix.phtml | 3 +++ .../adminhtml/templates/system/currency/rate/services.phtml | 3 +++ .../view/adminhtml/templates/system/currency/rates.phtml | 3 +++ app/code/Magento/Customer/Model/Metadata/ElementFactory.php | 3 +++ .../Magento/Customer/Model/Metadata/Form/AbstractData.php | 3 +++ app/code/Magento/Customer/Model/Observer.php | 3 +++ .../Magento/Customer/view/adminhtml/templates/edit/js.phtml | 3 +++ .../templates/edit/tab/account/form/renderer/group.phtml | 3 +++ .../templates/edit/tab/account/form/renderer/sendemail.phtml | 3 +++ .../sales/order/create/address/form/renderer/vat.phtml | 3 +++ .../view/adminhtml/templates/system/config/validatevat.phtml | 3 +++ .../Customer/view/adminhtml/templates/tab/addresses.phtml | 3 +++ .../Magento/Customer/view/adminhtml/templates/tab/cart.phtml | 3 +++ .../Customer/view/adminhtml/templates/tab/newsletter.phtml | 3 +++ .../view/adminhtml/templates/tab/view/personal_info.phtml | 2 ++ .../Customer/view/adminhtml/templates/tab/view/sales.phtml | 3 +++ .../Customer/view/frontend/templates/account/customer.phtml | 5 ++++- .../view/frontend/templates/account/dashboard/address.phtml | 2 ++ .../view/frontend/templates/account/dashboard/info.phtml | 2 ++ .../Customer/view/frontend/templates/account/link/back.phtml | 3 +++ .../view/frontend/templates/additionalinfocustomer.phtml | 3 +++ .../Customer/view/frontend/templates/address/book.phtml | 3 +++ .../Customer/view/frontend/templates/address/edit.phtml | 3 +++ .../Customer/view/frontend/templates/form/confirmation.phtml | 3 +++ .../Magento/Customer/view/frontend/templates/form/edit.phtml | 2 ++ .../view/frontend/templates/form/forgotpassword.phtml | 3 +++ .../Customer/view/frontend/templates/form/login.phtml | 2 ++ .../Customer/view/frontend/templates/form/newsletter.phtml | 3 +++ .../Customer/view/frontend/templates/form/register.phtml | 3 +++ .../frontend/templates/form/resetforgottenpassword.phtml | 2 ++ .../Customer/view/frontend/templates/js/components.phtml | 3 +++ .../Customer/view/frontend/templates/newcustomer.phtml | 3 +++ .../Customer/view/frontend/templates/widget/dob.phtml | 2 ++ .../Customer/view/frontend/templates/widget/gender.phtml | 3 +++ .../Customer/view/frontend/templates/widget/name.phtml | 2 ++ .../Customer/view/frontend/templates/widget/taxvat.phtml | 3 +++ .../DesignEditor/Block/Adminhtml/Editor/Container.php | 3 +++ .../DesignEditor/Block/Adminhtml/Editor/Form/Renderer.php | 2 ++ .../Block/Adminhtml/Editor/Form/Renderer/LogoUploader.php | 3 +++ .../Adminhtml/System/Design/Editor/Tools/JsList.php | 3 +++ .../Model/Editor/Tools/QuickStyles/Form/Renderer/Factory.php | 3 +++ .../Model/Editor/Tools/QuickStyles/Renderer/Factory.php | 3 +++ .../view/adminhtml/templates/editor/container.phtml | 3 +++ .../templates/editor/form/renderer/color-picker.phtml | 3 +++ .../adminhtml/templates/editor/form/renderer/composite.phtml | 3 +++ .../templates/editor/form/renderer/composite/children.phtml | 3 +++ .../templates/editor/form/renderer/composite/wrapper.phtml | 3 +++ .../templates/editor/form/renderer/element/wrapper.phtml | 3 +++ .../templates/editor/form/renderer/logo-uploader.phtml | 3 +++ .../adminhtml/templates/editor/form/renderer/simple.phtml | 3 +++ .../adminhtml/templates/editor/form/renderer/template.phtml | 3 +++ .../view/adminhtml/templates/editor/toolbar/buttons.phtml | 3 +++ .../adminhtml/templates/editor/toolbar/buttons/edit.phtml | 3 +++ .../DesignEditor/view/adminhtml/templates/editor/tools.phtml | 3 +++ .../view/adminhtml/templates/editor/tools/block.phtml | 3 +++ .../view/adminhtml/templates/editor/tools/code/custom.phtml | 3 +++ .../view/adminhtml/templates/editor/tools/code/js.phtml | 3 +++ .../templates/editor/tools/files/content/files.phtml | 3 +++ .../view/adminhtml/templates/editor/tools/settings.phtml | 3 +++ .../view/adminhtml/templates/editor/tools/tabs.phtml | 3 +++ .../adminhtml/templates/editor/tools/tabs/super-handle.phtml | 3 +++ .../view/adminhtml/templates/theme/available.phtml | 3 +++ .../DesignEditor/view/adminhtml/templates/theme/button.phtml | 3 +++ .../view/adminhtml/templates/theme/customized.phtml | 3 +++ .../view/adminhtml/templates/theme/list/available.phtml | 3 +++ .../view/adminhtml/templates/theme/list/customized.phtml | 3 +++ .../adminhtml/templates/theme/selector/first_entrance.phtml | 3 +++ .../view/adminhtml/templates/theme/selector/storeview.phtml | 3 +++ .../view/adminhtml/templates/theme/selector/theme_edit.phtml | 3 +++ .../view/frontend/templates/translate_inline.phtml | 3 +++ app/code/Magento/Dhl/Block/Adminhtml/Unitofmeasure.php | 3 +++ app/code/Magento/Dhl/Model/Carrier.php | 3 +++ .../Dhl/Model/Plugin/Checkout/Block/Cart/Shipping.php | 3 +++ app/code/Magento/Directory/Model/Country.php | 2 ++ app/code/Magento/Directory/Model/Currency/Import/Factory.php | 3 +++ .../Magento/Directory/Model/Currency/Import/Webservicex.php | 2 ++ .../Magento/Directory/Model/Resource/Country/Collection.php | 2 ++ app/code/Magento/Directory/Model/Resource/Region.php | 2 ++ .../Magento/Directory/view/frontend/templates/currency.phtml | 3 +++ .../Directory/view/frontend/templates/currency/switch.phtml | 3 +++ .../Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php | 3 +++ .../Magento/Downloadable/Block/Catalog/Product/Samples.php | 3 +++ .../Downloadable/Block/Customer/Products/ListProducts.php | 3 +++ .../Block/Sales/Order/Email/Items/Downloadable.php | 3 +++ .../Block/Sales/Order/Email/Items/Order/Downloadable.php | 3 +++ .../Block/Sales/Order/Item/Renderer/Downloadable.php | 3 +++ .../Magento/Downloadable/Controller/Customer/Products.php | 3 +++ .../Downloadable/Helper/Catalog/Product/Configuration.php | 3 +++ app/code/Magento/Downloadable/Helper/Download.php | 3 +++ .../Model/Sales/Order/Pdf/Items/AbstractItems.php | 3 +++ .../templates/product/composite/fieldset/downloadable.phtml | 3 +++ .../view/adminhtml/templates/product/edit/downloadable.phtml | 3 +++ .../templates/product/edit/downloadable/links.phtml | 3 +++ .../templates/product/edit/downloadable/samples.phtml | 3 +++ .../sales/items/column/downloadable/creditmemo/name.phtml | 3 +++ .../sales/items/column/downloadable/invoice/name.phtml | 3 +++ .../templates/sales/items/column/downloadable/name.phtml | 3 +++ .../view/frontend/templates/catalog/product/links.phtml | 3 +++ .../view/frontend/templates/catalog/product/samples.phtml | 2 ++ .../view/frontend/templates/catalog/product/type.phtml | 2 ++ .../view/frontend/templates/checkout/cart/item/default.phtml | 3 +++ .../view/frontend/templates/checkout/links.phtml | 3 +++ .../view/frontend/templates/checkout/success.phtml | 3 +++ .../view/frontend/templates/customer/products/list.phtml | 3 +++ .../email/order/items/creditmemo/downloadable.phtml | 3 +++ .../templates/email/order/items/invoice/downloadable.phtml | 3 +++ .../templates/email/order/items/order/downloadable.phtml | 3 +++ .../Downloadable/view/frontend/templates/js/components.phtml | 3 +++ .../sales/order/creditmemo/items/renderer/downloadable.phtml | 2 ++ .../sales/order/invoice/items/renderer/downloadable.phtml | 2 ++ .../templates/sales/order/items/renderer/downloadable.phtml | 2 ++ .../Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php | 2 ++ app/code/Magento/Eav/Helper/Data.php | 3 +++ app/code/Magento/Eav/Model/Attribute.php | 2 ++ app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php | 3 +++ app/code/Magento/Eav/Model/AttributeDataFactory.php | 3 +++ app/code/Magento/Eav/Model/Entity/AbstractEntity.php | 3 +++ .../Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php | 3 +++ .../Magento/Eav/Model/Entity/Attribute/Frontend/Datetime.php | 3 +++ .../Email/view/adminhtml/templates/template/edit.phtml | 3 +++ .../Email/view/adminhtml/templates/template/list.phtml | 3 +++ app/code/Magento/Fedex/Model/Carrier.php | 3 +++ app/code/Magento/GiftMessage/Helper/Message.php | 3 +++ .../view/adminhtml/templates/giftoptionsform.phtml | 3 +++ .../Magento/GiftMessage/view/adminhtml/templates/popup.phtml | 3 +++ .../adminhtml/templates/sales/order/create/giftoptions.phtml | 3 +++ .../view/adminhtml/templates/sales/order/create/items.phtml | 3 +++ .../adminhtml/templates/sales/order/view/giftoptions.phtml | 3 +++ .../view/adminhtml/templates/sales/order/view/items.phtml | 3 +++ .../Magento/GiftMessage/view/frontend/templates/inline.phtml | 3 +++ app/code/Magento/GoogleAnalytics/Block/Ga.php | 3 +++ app/code/Magento/GoogleAnalytics/Helper/Data.php | 3 +++ .../Magento/GoogleAnalytics/view/frontend/templates/ga.phtml | 3 +++ app/code/Magento/GoogleOptimizer/Block/Code/Category.php | 3 +++ app/code/Magento/GoogleOptimizer/Block/Code/Product.php | 3 +++ app/code/Magento/GoogleOptimizer/Helper/Data.php | 3 +++ .../GoogleOptimizer/Model/Observer/Block/Category/Tab.php | 3 +++ .../Magento/GoogleShopping/Block/Adminhtml/Items/Item.php | 3 +++ .../Controller/Adminhtml/Googleshopping/Items/Index.php | 3 +++ .../Controller/Adminhtml/Googleshopping/Items/Refresh.php | 3 +++ app/code/Magento/GoogleShopping/Helper/Category.php | 3 +++ .../GoogleShopping/Model/Attribute/DefaultAttribute.php | 2 ++ app/code/Magento/GoogleShopping/Model/Attribute/Price.php | 3 +++ app/code/Magento/GoogleShopping/Model/Config.php | 3 +++ .../GoogleShopping/Model/Resource/Attribute/Collection.php | 3 +++ .../GoogleShopping/Model/Resource/Grid/Collection.php | 2 ++ app/code/Magento/GoogleShopping/Model/Service.php | 3 +++ .../GoogleShopping/Model/Source/Destinationstates.php | 3 +++ .../GoogleShopping/view/adminhtml/templates/captcha.phtml | 3 +++ .../GoogleShopping/view/adminhtml/templates/types/edit.phtml | 3 +++ .../view/adminhtml/templates/types/edit/attributes.phtml | 3 +++ .../view/adminhtml/templates/types/edit/select.phtml | 3 +++ .../catalog/product/composite/fieldset/grouped.phtml | 3 +++ .../view/adminhtml/templates/product/grouped/grouped.phtml | 2 ++ .../view/base/templates/product/price/final_price.phtml | 2 ++ .../view/frontend/templates/product/view/type/default.phtml | 3 +++ .../view/frontend/templates/product/view/type/grouped.phtml | 2 ++ app/code/Magento/ImportExport/Helper/Data.php | 3 +++ app/code/Magento/ImportExport/Model/Export.php | 3 +++ .../Magento/ImportExport/Model/Export/Entity/Factory.php | 2 ++ app/code/Magento/ImportExport/Model/Import.php | 3 +++ .../Magento/ImportExport/Model/Import/Entity/Factory.php | 2 ++ .../adminhtml/templates/integration/tokens_exchange.phtml | 3 +++ .../view/frontend/templates/layer/filter.phtml | 3 +++ .../view/frontend/templates/layer/state.phtml | 3 +++ .../view/frontend/templates/layer/view.phtml | 3 +++ app/code/Magento/Log/Model/Resource/Visitor/Online.php | 3 +++ .../Log/view/adminhtml/templates/customer/status.phtml | 2 ++ app/code/Magento/Log/view/adminhtml/templates/online.phtml | 3 +++ .../Msrp/view/base/templates/product/price/msrp.phtml | 2 ++ app/code/Magento/Msrp/view/frontend/templates/popup.phtml | 3 +++ .../frontend/templates/render/item/price_msrp_item.phtml | 3 +++ .../view/frontend/templates/render/item/price_msrp_rss.phtml | 3 +++ app/code/Magento/Multishipping/Helper/Data.php | 3 +++ .../Multishipping/Model/Checkout/Type/Multishipping.php | 3 +++ .../view/frontend/templates/checkout/address/select.phtml | 2 ++ .../view/frontend/templates/checkout/addresses.phtml | 3 +++ .../view/frontend/templates/checkout/billing.phtml | 3 +++ .../view/frontend/templates/checkout/billing/items.phtml | 3 +++ .../view/frontend/templates/checkout/item/default.phtml | 3 +++ .../view/frontend/templates/checkout/link.phtml | 3 +++ .../view/frontend/templates/checkout/overview.phtml | 3 +++ .../view/frontend/templates/checkout/overview/item.phtml | 3 +++ .../view/frontend/templates/checkout/shipping.phtml | 3 +++ .../view/frontend/templates/checkout/state.phtml | 3 +++ .../view/frontend/templates/checkout/success.phtml | 3 +++ .../view/frontend/templates/js/components.phtml | 3 +++ .../view/frontend/templates/multishipping/item/default.phtml | 3 +++ .../Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php | 3 +++ .../Magento/Newsletter/Block/Adminhtml/Template/Edit.php | 2 ++ .../Magento/Newsletter/Controller/Adminhtml/Queue/Save.php | 3 +++ .../Magento/Newsletter/Model/Resource/Grid/Collection.php | 2 ++ app/code/Magento/Newsletter/Model/Resource/Template.php | 3 +++ .../view/adminhtml/templates/preview/iframeswitcher.phtml | 3 +++ .../Newsletter/view/adminhtml/templates/preview/store.phtml | 3 +++ .../Newsletter/view/adminhtml/templates/problem/list.phtml | 3 +++ .../Newsletter/view/adminhtml/templates/queue/edit.phtml | 3 +++ .../Newsletter/view/adminhtml/templates/queue/list.phtml | 3 +++ .../view/adminhtml/templates/subscriber/list.phtml | 3 +++ .../Newsletter/view/adminhtml/templates/template/edit.phtml | 3 +++ .../Newsletter/view/adminhtml/templates/template/list.phtml | 3 +++ .../Newsletter/view/frontend/templates/js/components.phtml | 3 +++ .../Newsletter/view/frontend/templates/subscribe.phtml | 3 +++ .../view/adminhtml/templates/form/banktransfer.phtml | 3 +++ .../view/adminhtml/templates/form/cashondelivery.phtml | 2 ++ .../view/adminhtml/templates/form/checkmo.phtml | 3 +++ .../view/adminhtml/templates/form/purchaseorder.phtml | 3 +++ .../view/adminhtml/templates/info/checkmo.phtml | 3 +++ .../view/adminhtml/templates/info/pdf/checkmo.phtml | 3 +++ .../view/frontend/templates/form/banktransfer.phtml | 3 +++ .../view/frontend/templates/form/cashondelivery.phtml | 2 ++ .../view/frontend/templates/form/checkmo.phtml | 3 +++ .../view/frontend/templates/form/purchaseorder.phtml | 3 +++ .../view/frontend/templates/info/checkmo.phtml | 3 +++ .../Model/Plugin/Checkout/Block/Cart/Shipping.php | 2 ++ .../PageCache/view/frontend/templates/js/components.phtml | 3 +++ app/code/Magento/Payment/Model/Method/AbstractMethod.php | 3 +++ .../Magento/Payment/view/adminhtml/templates/form/cc.phtml | 3 +++ .../Payment/view/adminhtml/templates/info/default.phtml | 3 +++ .../Payment/view/adminhtml/templates/info/instructions.phtml | 3 +++ .../Payment/view/adminhtml/templates/info/pdf/default.phtml | 3 +++ .../Payment/view/adminhtml/templates/info/substitution.phtml | 3 +++ .../Magento/Payment/view/frontend/templates/form/cc.phtml | 3 +++ .../Payment/view/frontend/templates/info/default.phtml | 3 +++ .../Payment/view/frontend/templates/info/instructions.phtml | 3 +++ .../Persistent/view/frontend/templates/remember_me.phtml | 3 +++ app/code/Magento/ProductAlert/Block/Email/AbstractEmail.php | 3 +++ app/code/Magento/ProductAlert/Model/Resource/Price.php | 3 +++ app/code/Magento/ProductAlert/Model/Resource/Stock.php | 3 +++ .../ProductAlert/view/frontend/templates/email/price.phtml | 2 ++ .../ProductAlert/view/frontend/templates/email/stock.phtml | 2 ++ app/code/Magento/Reports/Block/Adminhtml/Filter/Form.php | 3 +++ app/code/Magento/Reports/Block/Adminhtml/Grid.php | 3 +++ .../Block/Adminhtml/Grid/Column/Renderer/Currency.php | 3 +++ .../Magento/Reports/Block/Adminhtml/Sales/Invoiced/Grid.php | 3 +++ .../Magento/Reports/Block/Adminhtml/Sales/Refunded/Grid.php | 3 +++ .../Magento/Reports/Block/Adminhtml/Sales/Sales/Grid.php | 3 +++ .../Magento/Reports/Block/Adminhtml/Sales/Shipping/Grid.php | 3 +++ app/code/Magento/Reports/Block/Adminhtml/Sales/Tax/Grid.php | 3 +++ app/code/Magento/Reports/Block/Adminhtml/Wishlist.php | 3 +++ app/code/Magento/Reports/Block/Product/Compared.php | 3 +++ app/code/Magento/Reports/Block/Product/Viewed.php | 3 +++ app/code/Magento/Reports/Helper/Data.php | 2 ++ app/code/Magento/Reports/Model/DateFactory.php | 3 +++ .../Entity/Summary/Collection/AbstractCollection.php | 2 ++ app/code/Magento/Reports/Model/Resource/Order/Collection.php | 3 +++ .../Reports/Model/Resource/Product/Index/AbstractIndex.php | 3 +++ app/code/Magento/Reports/Model/Resource/Quote/Collection.php | 2 ++ .../Magento/Reports/Model/Resource/Report/AbstractReport.php | 2 ++ .../Magento/Reports/Model/Resource/Report/Product/Viewed.php | 2 ++ .../Model/Resource/Report/Product/Viewed/Collection.php | 2 ++ .../Reports/data/reports_setup/data-install-2.0.0.php | 2 ++ app/code/Magento/Reports/view/adminhtml/templates/grid.phtml | 3 +++ .../view/adminhtml/templates/report/grid/container.phtml | 3 +++ .../view/adminhtml/templates/report/refresh/statistics.phtml | 3 +++ .../Reports/view/adminhtml/templates/store/switcher.phtml | 3 +++ .../view/adminhtml/templates/store/switcher/enhanced.phtml | 3 +++ .../Reports/view/frontend/templates/js/components.phtml | 3 +++ .../view/frontend/templates/product/widget/viewed.phtml | 3 +++ .../view/frontend/templates/product/widget/viewed/item.phtml | 3 +++ .../widget/compared/column/compared_default_list.phtml | 3 +++ .../widget/compared/column/compared_images_list.phtml | 3 +++ .../widget/compared/column/compared_names_list.phtml | 3 +++ .../templates/widget/compared/content/compared_grid.phtml | 3 +++ .../templates/widget/compared/content/compared_list.phtml | 3 +++ .../templates/widget/viewed/column/viewed_default_list.phtml | 3 +++ .../templates/widget/viewed/column/viewed_images_list.phtml | 3 +++ .../templates/widget/viewed/column/viewed_names_list.phtml | 3 +++ .../templates/widget/viewed/content/viewed_grid.phtml | 3 +++ .../templates/widget/viewed/content/viewed_list.phtml | 3 +++ app/code/Magento/Review/Block/Adminhtml/Add.php | 3 +++ app/code/Magento/Review/Block/Adminhtml/Grid.php | 2 ++ app/code/Magento/Review/Helper/Action/Pager.php | 3 +++ app/code/Magento/Review/Helper/Data.php | 3 +++ .../Review/view/adminhtml/templates/rating/detailed.phtml | 3 +++ .../Review/view/adminhtml/templates/rating/form.phtml | 3 +++ .../Review/view/adminhtml/templates/rating/options.phtml | 3 +++ .../view/adminhtml/templates/rating/stars/detailed.phtml | 3 +++ .../view/adminhtml/templates/rating/stars/summary.phtml | 3 +++ .../Review/view/adminhtml/templates/rss/grid/link.phtml | 2 ++ .../Review/view/frontend/templates/customer/list.phtml | 3 +++ .../Review/view/frontend/templates/customer/recent.phtml | 3 +++ .../Review/view/frontend/templates/customer/view.phtml | 3 +++ .../Magento/Review/view/frontend/templates/detailed.phtml | 3 +++ app/code/Magento/Review/view/frontend/templates/form.phtml | 3 +++ .../Review/view/frontend/templates/helper/summary.phtml | 3 +++ .../view/frontend/templates/helper/summary_short.phtml | 3 +++ .../Review/view/frontend/templates/product/view/count.phtml | 3 +++ .../Review/view/frontend/templates/product/view/list.phtml | 3 +++ .../Review/view/frontend/templates/product/view/other.phtml | 3 +++ .../Magento/Review/view/frontend/templates/redirect.phtml | 3 +++ app/code/Magento/Review/view/frontend/templates/view.phtml | 3 +++ app/code/Magento/Rss/view/frontend/templates/feeds.phtml | 3 +++ app/code/Magento/Rule/Model/AbstractModel.php | 2 ++ .../Sales/Api/CreditmemoCommentRepositoryInterface.php | 3 +++ app/code/Magento/Sales/Api/CreditmemoManagementInterface.php | 3 +++ app/code/Magento/Sales/Api/Data/CreditmemoInterface.php | 3 +++ app/code/Magento/Sales/Api/OrderManagementInterface.php | 3 +++ .../Sales/Api/OrderStatusHistoryRepositoryInterface.php | 3 +++ .../Magento/Sales/Block/Adminhtml/Order/Invoice/View.php | 3 +++ app/code/Magento/Sales/Block/Order/Creditmemo/Totals.php | 3 +++ .../Sales/Block/Order/Item/Renderer/DefaultRenderer.php | 3 +++ app/code/Magento/Sales/Helper/Reorder.php | 3 +++ app/code/Magento/Sales/Model/AdminOrder/Create.php | 3 +++ app/code/Magento/Sales/Model/Order/Creditmemo.php | 3 +++ app/code/Magento/Sales/Model/Order/Email/NotifySender.php | 3 +++ app/code/Magento/Sales/Model/Order/Payment.php | 3 +++ app/code/Magento/Sales/Model/Order/Payment/Transaction.php | 3 +++ app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php | 3 +++ .../Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php | 3 +++ app/code/Magento/Sales/Model/Order/Shipment/Item.php | 3 +++ app/code/Magento/Sales/Model/Quote.php | 3 +++ .../Magento/Sales/Model/Quote/Address/Total/Collector.php | 3 +++ app/code/Magento/Sales/Model/Quote/Item.php | 3 +++ app/code/Magento/Sales/Model/Resource/Quote.php | 3 +++ .../Sales/Model/Resource/Report/Bestsellers/Collection.php | 3 +++ .../Sales/view/adminhtml/templates/items/column/name.phtml | 3 +++ .../Sales/view/adminhtml/templates/items/column/qty.phtml | 3 +++ .../Sales/view/adminhtml/templates/items/price/row.phtml | 3 +++ .../Sales/view/adminhtml/templates/items/price/total.phtml | 3 +++ .../Sales/view/adminhtml/templates/items/price/unit.phtml | 3 +++ .../view/adminhtml/templates/items/renderer/default.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/address/form.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/comments/view.phtml | 3 +++ .../view/adminhtml/templates/order/create/abstract.phtml | 3 +++ .../templates/order/create/billing/method/form.phtml | 3 +++ .../view/adminhtml/templates/order/create/comment.phtml | 3 +++ .../view/adminhtml/templates/order/create/coupons/form.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/create/data.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/create/form.phtml | 3 +++ .../view/adminhtml/templates/order/create/form/address.phtml | 2 ++ .../view/adminhtml/templates/order/create/giftmessage.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/create/items.phtml | 3 +++ .../view/adminhtml/templates/order/create/items/grid.phtml | 2 ++ .../adminhtml/templates/order/create/items/price/row.phtml | 3 +++ .../adminhtml/templates/order/create/items/price/total.phtml | 3 +++ .../adminhtml/templates/order/create/items/price/unit.phtml | 3 +++ .../adminhtml/templates/order/create/newsletter/form.phtml | 3 +++ .../templates/order/create/shipping/method/form.phtml | 3 +++ .../view/adminhtml/templates/order/create/sidebar.phtml | 2 ++ .../adminhtml/templates/order/create/sidebar/items.phtml | 3 +++ .../view/adminhtml/templates/order/create/store/select.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/create/totals.phtml | 3 +++ .../adminhtml/templates/order/create/totals/default.phtml | 3 +++ .../adminhtml/templates/order/create/totals/grandtotal.phtml | 3 +++ .../adminhtml/templates/order/create/totals/shipping.phtml | 3 +++ .../adminhtml/templates/order/create/totals/subtotal.phtml | 3 +++ .../view/adminhtml/templates/order/create/totals/tax.phtml | 3 +++ .../adminhtml/templates/order/creditmemo/create/form.phtml | 3 +++ .../adminhtml/templates/order/creditmemo/create/items.phtml | 3 +++ .../order/creditmemo/create/items/renderer/default.phtml | 3 +++ .../order/creditmemo/create/totals/adjustments.phtml | 3 +++ .../adminhtml/templates/order/creditmemo/view/form.phtml | 3 +++ .../adminhtml/templates/order/creditmemo/view/items.phtml | 3 +++ .../order/creditmemo/view/items/renderer/default.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/details.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/giftoptions.phtml | 3 +++ .../view/adminhtml/templates/order/invoice/create/form.phtml | 3 +++ .../adminhtml/templates/order/invoice/create/items.phtml | 3 +++ .../order/invoice/create/items/renderer/default.phtml | 3 +++ .../view/adminhtml/templates/order/invoice/view/form.phtml | 3 +++ .../view/adminhtml/templates/order/invoice/view/items.phtml | 3 +++ .../order/invoice/view/items/renderer/default.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/totalbar.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/totals.phtml | 3 +++ .../view/adminhtml/templates/order/totals/discount.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/totals/due.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/totals/grand.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/totals/item.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/totals/paid.phtml | 3 +++ .../view/adminhtml/templates/order/totals/refunded.phtml | 3 +++ .../view/adminhtml/templates/order/totals/shipping.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/totals/tax.phtml | 3 +++ .../view/adminhtml/templates/order/view/giftmessage.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/view/history.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/view/info.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/view/items.phtml | 3 +++ .../templates/order/view/items/renderer/default.phtml | 3 +++ .../view/adminhtml/templates/order/view/tab/history.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/view/tab/info.phtml | 3 +++ .../Sales/view/adminhtml/templates/page/js/components.phtml | 3 +++ .../Sales/view/adminhtml/templates/rss/order/grid/link.phtml | 2 ++ .../Sales/view/adminhtml/templates/transactions/detail.phtml | 3 +++ .../view/frontend/templates/email/creditmemo/items.phtml | 3 +++ .../Sales/view/frontend/templates/email/invoice/items.phtml | 3 +++ .../Magento/Sales/view/frontend/templates/email/items.phtml | 3 +++ .../frontend/templates/email/items/creditmemo/default.phtml | 3 +++ .../frontend/templates/email/items/invoice/default.phtml | 3 +++ .../view/frontend/templates/email/items/order/default.phtml | 2 ++ .../view/frontend/templates/email/items/price/row.phtml | 3 +++ .../frontend/templates/email/items/shipment/default.phtml | 3 +++ .../Sales/view/frontend/templates/email/shipment/items.phtml | 3 +++ .../Sales/view/frontend/templates/email/shipment/track.phtml | 3 +++ .../Magento/Sales/view/frontend/templates/guest/form.phtml | 3 +++ .../Sales/view/frontend/templates/items/price/row.phtml | 2 ++ .../templates/items/price/total_after_discount.phtml | 2 ++ .../Sales/view/frontend/templates/items/price/unit.phtml | 2 ++ .../Sales/view/frontend/templates/js/components.phtml | 3 +++ .../Sales/view/frontend/templates/order/comments.phtml | 3 +++ .../view/frontend/templates/order/creditmemo/items.phtml | 3 +++ .../templates/order/creditmemo/items/renderer/default.phtml | 3 +++ .../Sales/view/frontend/templates/order/history.phtml | 3 +++ .../Magento/Sales/view/frontend/templates/order/info.phtml | 3 +++ .../Sales/view/frontend/templates/order/info/buttons.phtml | 3 +++ .../view/frontend/templates/order/info/buttons/rss.phtml | 2 ++ .../Sales/view/frontend/templates/order/invoice/items.phtml | 3 +++ .../templates/order/invoice/items/renderer/default.phtml | 3 +++ .../Magento/Sales/view/frontend/templates/order/items.phtml | 3 +++ .../frontend/templates/order/items/renderer/default.phtml | 2 ++ .../Sales/view/frontend/templates/order/order_comments.phtml | 3 +++ .../Sales/view/frontend/templates/order/order_date.phtml | 3 +++ .../view/frontend/templates/order/print/creditmemo.phtml | 3 +++ .../Sales/view/frontend/templates/order/print/invoice.phtml | 3 +++ .../Sales/view/frontend/templates/order/print/shipment.phtml | 3 +++ .../Magento/Sales/view/frontend/templates/order/recent.phtml | 3 +++ .../templates/order/shipment/items/renderer/default.phtml | 3 +++ .../Magento/Sales/view/frontend/templates/order/totals.phtml | 3 +++ .../Magento/Sales/view/frontend/templates/order/view.phtml | 3 +++ .../Sales/view/frontend/templates/reorder/sidebar.phtml | 3 +++ .../Sales/view/frontend/templates/widget/guest/form.phtml | 3 +++ .../Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Grid.php | 3 +++ .../SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php | 3 +++ app/code/Magento/SalesRule/Helper/Coupon.php | 3 +++ .../SalesRule/Model/Resource/Report/Rule/Createdat.php | 3 +++ .../Magento/SalesRule/Model/Resource/Rule/Collection.php | 3 +++ app/code/Magento/SalesRule/Model/Validator.php | 3 +++ app/code/Magento/Search/Model/Resource/Query.php | 3 +++ .../Magento/Search/view/frontend/templates/search_data.phtml | 3 +++ app/code/Magento/Search/view/frontend/templates/term.phtml | 3 +++ app/code/Magento/Sendfriend/Controller/Product/Sendmail.php | 3 +++ app/code/Magento/Sendfriend/Helper/Data.php | 3 +++ .../Magento/Sendfriend/view/frontend/templates/send.phtml | 3 +++ app/code/Magento/Shipping/Block/Tracking/Popup.php | 3 +++ app/code/Magento/Shipping/Helper/Data.php | 2 ++ app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php | 3 +++ app/code/Magento/Shipping/Model/Config.php | 3 +++ app/code/Magento/Shipping/Model/Info.php | 3 +++ app/code/Magento/Shipping/Model/Shipping/Labels.php | 3 +++ .../Shipping/view/adminhtml/templates/create/form.phtml | 3 +++ .../Shipping/view/adminhtml/templates/create/items.phtml | 3 +++ .../adminhtml/templates/create/items/renderer/default.phtml | 3 +++ .../view/adminhtml/templates/order/Tracking/view.phtml | 3 +++ .../view/adminhtml/templates/order/packaging/grid.phtml | 3 +++ .../view/adminhtml/templates/order/packaging/packed.phtml | 3 +++ .../view/adminhtml/templates/order/packaging/popup.phtml | 3 +++ .../Shipping/view/adminhtml/templates/order/tracking.phtml | 3 +++ .../Shipping/view/adminhtml/templates/order/view/info.phtml | 3 +++ .../Shipping/view/adminhtml/templates/view/form.phtml | 3 +++ .../Shipping/view/adminhtml/templates/view/items.phtml | 3 +++ .../adminhtml/templates/view/items/renderer/default.phtml | 3 +++ .../Magento/Shipping/view/frontend/templates/items.phtml | 3 +++ .../Shipping/view/frontend/templates/tracking/link.phtml | 3 +++ .../Shipping/view/frontend/templates/tracking/popup.phtml | 3 +++ app/code/Magento/Sitemap/Model/Sitemap.php | 3 +++ app/code/Magento/Store/Model/Resource/Website.php | 3 +++ .../Magento/Store/view/frontend/templates/switch/flags.phtml | 3 +++ .../Store/view/frontend/templates/switch/languages.phtml | 3 +++ .../Store/view/frontend/templates/switch/stores.phtml | 3 +++ app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php | 2 ++ app/code/Magento/Tax/Helper/Data.php | 3 +++ app/code/Magento/Tax/Model/Calculation/Rate.php | 2 ++ app/code/Magento/Tax/Model/Observer.php | 2 ++ app/code/Magento/Tax/Model/Resource/Sales/Order/Tax/Item.php | 2 ++ .../Tax/Model/Sales/Total/Quote/CommonTaxCollector.php | 3 +++ .../Tax/view/adminhtml/templates/items/price/row.phtml | 3 +++ .../Tax/view/adminhtml/templates/items/price/total.phtml | 3 +++ .../Tax/view/adminhtml/templates/items/price/unit.phtml | 3 +++ .../adminhtml/templates/order/create/items/price/row.phtml | 3 +++ .../adminhtml/templates/order/create/items/price/total.phtml | 3 +++ .../adminhtml/templates/order/create/items/price/unit.phtml | 3 +++ .../Magento/Tax/view/adminhtml/templates/rate/form.phtml | 3 +++ app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml | 3 +++ .../Magento/Tax/view/adminhtml/templates/rate/title.phtml | 3 +++ .../Tax/view/adminhtml/templates/toolbar/class/save.phtml | 3 +++ .../Tax/view/adminhtml/templates/toolbar/rate/add.phtml | 3 +++ .../Tax/view/adminhtml/templates/toolbar/rate/save.phtml | 3 +++ .../Tax/view/adminhtml/templates/toolbar/rule/save.phtml | 3 +++ .../Magento/Tax/view/base/templates/pricing/adjustment.phtml | 3 +++ .../Tax/view/base/templates/pricing/adjustment/bundle.phtml | 3 +++ .../templates/checkout/cart/item/price/sidebar.phtml | 2 ++ .../frontend/templates/checkout/cart/minicart/totals.phtml | 2 ++ .../Tax/view/frontend/templates/checkout/grandtotal.phtml | 3 +++ .../Tax/view/frontend/templates/checkout/shipping.phtml | 3 +++ .../view/frontend/templates/checkout/shipping/price.phtml | 3 +++ .../Tax/view/frontend/templates/checkout/subtotal.phtml | 3 +++ .../Magento/Tax/view/frontend/templates/checkout/tax.phtml | 3 +++ .../Tax/view/frontend/templates/email/items/price/row.phtml | 3 +++ .../Magento/Tax/view/frontend/templates/item/price/row.phtml | 2 ++ .../frontend/templates/item/price/total_after_discount.phtml | 2 ++ .../Tax/view/frontend/templates/item/price/unit.phtml | 2 ++ app/code/Magento/Tax/view/frontend/templates/order/tax.phtml | 3 +++ .../view/adminhtml/templates/importExport.phtml | 3 +++ .../view/adminhtml/templates/browser/content/files.phtml | 3 +++ app/code/Magento/Theme/view/base/templates/root.phtml | 3 +++ .../Theme/view/frontend/templates/callouts/left_col.phtml | 3 +++ .../Theme/view/frontend/templates/callouts/right_col.phtml | 3 +++ .../Magento/Theme/view/frontend/templates/html/block.phtml | 3 +++ .../Theme/view/frontend/templates/html/breadcrumbs.phtml | 3 +++ .../Theme/view/frontend/templates/html/collapsible.phtml | 3 +++ .../Theme/view/frontend/templates/html/container.phtml | 3 +++ .../Magento/Theme/view/frontend/templates/html/footer.phtml | 3 +++ .../Magento/Theme/view/frontend/templates/html/header.phtml | 3 +++ .../Theme/view/frontend/templates/html/header/logo.phtml | 3 +++ .../Magento/Theme/view/frontend/templates/html/notices.phtml | 3 +++ .../Magento/Theme/view/frontend/templates/html/pager.phtml | 3 +++ .../Theme/view/frontend/templates/html/sections.phtml | 3 +++ .../Theme/view/frontend/templates/html/skiptarget.phtml | 3 +++ .../Magento/Theme/view/frontend/templates/html/title.phtml | 2 ++ .../Magento/Theme/view/frontend/templates/html/topmenu.phtml | 3 +++ .../Theme/view/frontend/templates/js/components.phtml | 3 +++ app/code/Magento/Theme/view/frontend/templates/link.phtml | 3 +++ app/code/Magento/Translation/Model/Js/DataProvider.php | 2 ++ .../view/adminhtml/templates/translate_inline.phtml | 3 +++ .../view/frontend/templates/translate_inline.phtml | 3 +++ app/code/Magento/Ui/Controller/Adminhtml/Form/Fieldset.php | 3 +++ app/code/Magento/Ui/DataProvider/Config/Converter.php | 2 ++ .../Ui/view/base/templates/control/button/default.phtml | 3 +++ .../Magento/Ui/view/base/templates/filter_pool/active.phtml | 3 +++ .../Ui/view/base/templates/form/fieldset/default.phtml | 3 +++ .../Ui/view/base/templates/layout/group/default.phtml | 3 +++ app/code/Magento/Ups/Model/Carrier.php | 3 +++ .../adminhtml/templates/system/shipping/carrier_config.phtml | 2 ++ .../UrlRewrite/view/adminhtml/templates/categories.phtml | 3 +++ .../Magento/UrlRewrite/view/adminhtml/templates/edit.phtml | 3 +++ .../UrlRewrite/view/adminhtml/templates/selector.phtml | 3 +++ app/code/Magento/User/Block/User/Edit/Tab/Main.php | 3 +++ app/code/Magento/User/Model/Resource/User.php | 3 +++ .../User/view/adminhtml/templates/admin/forgotpassword.phtml | 3 +++ .../view/adminhtml/templates/admin/forgotpassword_url.phtml | 3 +++ .../adminhtml/templates/admin/resetforgottenpassword.phtml | 3 +++ .../Magento/User/view/adminhtml/templates/role/edit.phtml | 3 +++ .../User/view/adminhtml/templates/role/users_grid_js.phtml | 3 +++ .../User/view/adminhtml/templates/user/roles_grid_js.phtml | 3 +++ app/code/Magento/Usps/Model/Carrier.php | 3 +++ app/code/Magento/Usps/Model/Source/Method.php | 3 +++ .../integration/activate/permissions/tab/webapi.phtml | 3 +++ .../Webapi/view/adminhtml/templates/resourcetree.phtml | 3 +++ app/code/Magento/Weee/Block/Renderer/Weee/Tax.php | 3 +++ app/code/Magento/Weee/Model/Total/Quote/Weee.php | 3 +++ .../Weee/view/adminhtml/templates/items/price/row.phtml | 3 +++ .../Weee/view/adminhtml/templates/items/price/total.phtml | 3 +++ .../Weee/view/adminhtml/templates/items/price/unit.phtml | 3 +++ .../adminhtml/templates/order/create/items/price/row.phtml | 3 +++ .../adminhtml/templates/order/create/items/price/total.phtml | 3 +++ .../adminhtml/templates/order/create/items/price/unit.phtml | 3 +++ .../Magento/Weee/view/adminhtml/templates/renderer/tax.phtml | 3 +++ .../Weee/view/base/templates/pricing/adjustment.phtml | 3 +++ .../templates/checkout/cart/item/price/sidebar.phtml | 2 ++ .../checkout/onepage/review/item/price/row_excl_tax.phtml | 2 ++ .../checkout/onepage/review/item/price/row_incl_tax.phtml | 2 ++ .../checkout/onepage/review/item/price/unit_excl_tax.phtml | 2 ++ .../checkout/onepage/review/item/price/unit_incl_tax.phtml | 2 ++ .../Weee/view/frontend/templates/email/items/price/row.phtml | 3 +++ .../Weee/view/frontend/templates/item/price/row.phtml | 2 ++ .../frontend/templates/item/price/total_after_discount.phtml | 2 ++ .../Weee/view/frontend/templates/item/price/unit.phtml | 2 ++ app/code/Magento/Widget/Block/Adminhtml/Widget.php | 2 ++ .../Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php | 3 +++ app/code/Magento/Widget/Model/Widget.php | 2 ++ .../view/adminhtml/templates/instance/edit/layout.phtml | 3 +++ app/code/Magento/Wishlist/Model/Item.php | 3 +++ .../Magento/Wishlist/sql/wishlist_setup/install-2.0.0.php | 2 ++ .../adminhtml/templates/customer/edit/tab/wishlist.phtml | 2 ++ .../Wishlist/view/frontend/templates/button/share.phtml | 2 ++ .../Wishlist/view/frontend/templates/button/tocart.phtml | 3 +++ .../Wishlist/view/frontend/templates/button/update.phtml | 3 +++ .../Wishlist/view/frontend/templates/email/items.phtml | 3 +++ .../view/frontend/templates/item/column/actions.phtml | 2 ++ .../Wishlist/view/frontend/templates/item/column/cart.phtml | 2 ++ .../view/frontend/templates/item/column/comment.phtml | 2 ++ .../Wishlist/view/frontend/templates/item/column/edit.phtml | 2 ++ .../Wishlist/view/frontend/templates/item/column/image.phtml | 2 ++ .../Wishlist/view/frontend/templates/item/column/name.phtml | 2 ++ .../Wishlist/view/frontend/templates/item/column/price.phtml | 2 ++ .../view/frontend/templates/item/column/remove.phtml | 3 +++ .../view/frontend/templates/item/configure/addto.phtml | 3 +++ .../Magento/Wishlist/view/frontend/templates/item/list.phtml | 3 +++ .../Wishlist/view/frontend/templates/js/components.phtml | 3 +++ app/code/Magento/Wishlist/view/frontend/templates/link.phtml | 3 +++ .../Wishlist/view/frontend/templates/options_list.phtml | 3 +++ .../Magento/Wishlist/view/frontend/templates/rss/email.phtml | 3 +++ .../Wishlist/view/frontend/templates/rss/wishlist.phtml | 3 +++ .../Magento/Wishlist/view/frontend/templates/shared.phtml | 3 +++ .../Magento/Wishlist/view/frontend/templates/sharing.phtml | 2 ++ .../Magento/Wishlist/view/frontend/templates/sidebar.phtml | 3 +++ app/code/Magento/Wishlist/view/frontend/templates/view.phtml | 3 +++ .../TestModule4/Service/V1/DataObjectServiceInterface.php | 3 +++ .../TestModule4/Service/V1/Entity/ExtensibleRequest.php | 3 +++ .../TestModuleMSC/Model/Data/CustomAttributeDataObject.php | 3 +++ .../Model/Data/CustomAttributeNestedDataObject.php | 3 +++ .../_files/Magento/TestModuleMSC/Model/Data/Item.php | 3 +++ .../Magento/TestFramework/Annotation/ApiDataFixture.php | 3 +++ .../testsuite/Magento/Catalog/Api/CategoryManagementTest.php | 3 +++ .../Magento/Catalog/Api/ProductAttributeManagementTest.php | 3 +++ .../Catalog/Api/ProductCustomOptionRepositoryTest.php | 2 ++ .../Catalog/Api/ProductMediaAttributeManagementTest.php | 3 +++ .../Magento/Catalog/Api/ProductTierPriceManagementTest.php | 2 ++ .../testsuite/Magento/CatalogInventory/Api/StockItemTest.php | 3 +++ .../Magento/ConfigurableProduct/Api/OptionRepositoryTest.php | 3 +++ .../testsuite/Magento/Customer/Api/AddressRepositoryTest.php | 2 ++ .../Service/V1/DownloadableLink/WriteServiceTest.php | 3 +++ .../Service/V1/DownloadableSample/WriteServiceTest.php | 3 +++ .../Magento/GiftMessage/Service/V1/WriteServiceTest.php | 2 ++ .../Magento/Sales/Service/V1/CreditmemoCreateTest.php | 3 +++ .../Magento/Sales/Service/V1/OrderStatusHistoryAddTest.php | 3 +++ .../Magento/Sales/Service/V1/ShipmentCreateTest.php | 3 +++ .../testsuite/Magento/Tax/Api/TaxClassRepositoryTest.php | 2 ++ .../Magento/Webapi/WsdlGenerationFromDataObjectTest.php | 2 ++ .../framework/Magento/TestFramework/Db/Adapter/Mysql.php | 2 ++ .../integration/framework/Magento/TestFramework/Db/Mysql.php | 2 ++ .../Magento/Backend/Block/Widget/Grid/MassactionTest.php | 3 +++ .../Catalog/Controller/Adminhtml/Product/NewActionTest.php | 3 +++ .../Magento/Catalog/Controller/Product/CompareTest.php | 3 +++ .../testsuite/Magento/Catalog/Model/Product/ImageTest.php | 3 +++ .../Magento/Catalog/Model/Resource/Product/OptionTest.php | 3 +++ .../Magento/CatalogImportExport/Model/Import/ProductTest.php | 2 ++ .../Block/Adminhtml/Form/Field/CustomergroupTest.php | 3 +++ .../CatalogSearch/Model/Layer/Filter/CategoryTest.php | 3 +++ .../Model/CategoryUrlRewriteGeneratorTest.php | 3 +++ .../Checkout/_files/quote_with_simple_product_saved.php | 2 ++ .../_files/quote_with_virtual_product_and_address.php | 3 +++ .../testsuite/Magento/Cms/Controller/RouterTest.php | 3 +++ .../Block/Adminhtml/Product/Edit/Tab/Super/ConfigTest.php | 3 +++ .../Model/Product/Type/ConfigurableTest.php | 3 +++ .../testsuite/Magento/Core/Model/Variable/ConfigTest.php | 3 +++ .../testsuite/Magento/Customer/Controller/AccountTest.php | 2 ++ .../testsuite/Magento/Customer/Controller/AjaxLoginTest.php | 2 ++ .../Magento/Customer/Model/CustomerRegistryTest.php | 2 ++ .../Customer/_files/customer_non_default_website_id.php | 2 ++ .../CustomerImportExport/Model/Export/AddressTest.php | 3 +++ .../CustomerImportExport/Model/Import/CustomerTest.php | 3 +++ .../testsuite/Magento/Directory/Model/ObserverTest.php | 2 ++ .../Downloadable/_files/order_with_downloadable_product.php | 2 ++ .../testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php | 2 ++ .../Magento/Framework/Interception/Fixture/Intercepted.php | 3 +++ .../Framework/Interception/Fixture/InterceptedInterface.php | 3 +++ .../Framework/Interception/Fixture/InterceptedParent.php | 3 +++ .../Interception/Fixture/InterceptedParentInterface.php | 3 +++ .../Magento/Framework/Less/File/Collector/AggregatedTest.php | 3 +++ .../Magento/Framework/Model/Resource/Db/AbstractTest.php | 3 +++ .../Magento/Framework/Stdlib/Cookie/CookieScopeTest.php | 2 ++ .../Magento/Framework/Stdlib/Cookie/PhpCookieReaderTest.php | 4 +++- .../Magento/ImportExport/Model/Export/EntityAbstractTest.php | 2 ++ .../Multishipping/Block/Checkout/Address/SelectTest.php | 2 ++ .../Magento/Multishipping/Block/Checkout/OverviewTest.php | 3 +++ .../Controller/Adminhtml/Report/Product/ViewedTest.php | 3 +++ .../testsuite/Magento/Reports/_files/viewed_products.php | 2 ++ .../Magento/Review/Block/Adminhtml/Edit/FormTest.php | 2 ++ .../integration/testsuite/Magento/Review/Block/FormTest.php | 3 +++ .../Magento/Sales/Model/Resource/Order/StatusTest.php | 2 ++ .../integration/testsuite/Magento/Sales/_files/order.php | 3 +++ .../testsuite/Magento/Sales/_files/order_fixture_store.php | 2 ++ .../integration/testsuite/Magento/Store/Model/StoreTest.php | 3 +++ .../Magento/Tax/Model/Sales/Total/Quote/SetupUtil.php | 3 +++ .../Magento/Tax/Model/Sales/Total/Quote/SubtotalTest.php | 2 ++ .../testsuite/Magento/Tax/Pricing/AdjustmentTest.php | 2 ++ .../testsuite/Magento/Test/Integrity/LayoutTest.php | 3 +++ .../User/Controller/Adminhtml/User/InvalidateTokenTest.php | 2 ++ .../integration/testsuite/Magento/User/Model/UserTest.php | 3 +++ .../testsuite/Magento/Widget/Model/Config/ReaderTest.php | 3 +++ .../testsuite/Magento/Wishlist/Helper/RssTest.php | 2 ++ .../TestFramework/CodingStandard/Tool/BlacklistInterface.php | 4 +++- .../TestFramework/CodingStandard/Tool/CopyPasteDetector.php | 2 ++ .../Magento/Test/Legacy/_files/obsolete_config_nodes.php | 3 +++ .../Magento/Test/Legacy/_files/obsolete_constants.php | 3 +++ .../Magento/Test/Legacy/_files/obsolete_methods.php | 3 +++ .../Magento/Test/Legacy/_files/obsolete_properties.php | 3 +++ .../phpcs/input/coding_style/classes/normal_class.php | 2 ++ .../input/coding_style/functions/method_without_scope.php | 2 ++ .../coding_style/functions/multiline_wrong_declaration.php | 3 +++ .../phpcs/input/coding_style/functions/normal_func.php | 3 +++ .../input/coding_style/functions/unneeded_multiline.php | 3 +++ .../input/coding_style/inline_doc/format/wrong_align.php | 3 +++ .../phpcs/input/coding_style/inline_doc/normal.php | 3 +++ .../phpcs/input/naming/property/normal_underscore.php | 3 +++ dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php | 3 +++ .../Magento/AdminNotification/Block/ToolbarEntryTest.php | 2 ++ .../Backend/Block/System/Config/Form/Field/ImageTest.php | 2 ++ .../Magento/Backend/Block/System/Config/FormTest.php | 3 +++ .../Magento/Backend/Block/Widget/Grid/ColumnSetTest.php | 3 +++ .../Backend/Controller/Adminhtml/Cache/CleanMediaTest.php | 3 +++ .../Controller/Adminhtml/Dashboard/AbstractTestCase.php | 5 ++++- .../Controller/Adminhtml/Dashboard/CustomersMostTest.php | 5 ++++- .../Controller/Adminhtml/Dashboard/CustomersNewestTest.php | 5 ++++- .../Controller/Adminhtml/Dashboard/ProductsViewedTest.php | 5 ++++- .../Backend/Model/Config/Backend/Cookie/LifetimeTest.php | 3 +++ .../Magento/Backend/Model/Config/Backend/Cookie/PathTest.php | 3 +++ .../Model/Config/Source/Storage/Media/DatabaseTest.php | 3 +++ .../testsuite/Magento/Backend/Model/Config/StructureTest.php | 3 +++ dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php | 2 ++ .../Block/Catalog/Product/View/Type/Bundle/OptionTest.php | 3 +++ .../Bundle/Block/Catalog/Product/View/Type/BundleTest.php | 3 +++ .../testsuite/Magento/Bundle/Model/LinkManagementTest.php | 2 ++ .../Magento/Bundle/Pricing/Adjustment/CalculatorTest.php | 3 +++ .../Magento/Bundle/Pricing/Price/DiscountCalculatorTest.php | 2 ++ .../Magento/Bundle/Pricing/Price/GroupPriceTest.php | 3 +++ .../Block/Adminhtml/Category/AbstractCategoryTest.php | 3 +++ .../unit/testsuite/Magento/Catalog/Block/Layer/ViewTest.php | 3 +++ .../Magento/Catalog/Block/Product/AbstractProductTest.php | 3 +++ .../testsuite/Magento/Catalog/Block/Product/ViewTest.php | 3 +++ .../Adminhtml/Category/Widget/CategoriesJsonTest.php | 3 +++ .../Controller/Adminhtml/Category/Widget/ChooserTest.php | 3 +++ .../Magento/Catalog/Controller/Product/Compare/IndexTest.php | 3 +++ .../Magento/Catalog/Model/App/Action/ContextPluginTest.php | 2 ++ .../Model/Attribute/Backend/CustomlayoutupdateTest.php | 3 +++ .../Catalog/Model/Category/Attribute/Backend/SortbyTest.php | 3 +++ .../Catalog/Model/Category/AttributeRepositoryTest.php | 2 ++ .../testsuite/Magento/Catalog/Model/Category/TreeTest.php | 2 ++ .../unit/testsuite/Magento/Catalog/Model/CategoryTest.php | 2 ++ .../Catalog/Model/Indexer/Category/AffectCacheTest.php | 2 ++ .../Catalog/Model/Indexer/Product/AffectCacheTest.php | 2 ++ .../Catalog/Model/Indexer/Product/Flat/Action/EraserTest.php | 2 ++ .../Catalog/Model/Indexer/Product/Flat/Action/RowTest.php | 3 +++ .../Catalog/Model/Indexer/Product/Flat/Action/RowsTest.php | 3 +++ .../Model/Indexer/Product/Price/Plugin/CustomerGroupTest.php | 3 +++ .../Catalog/Model/Layer/Category/AvailabilityFlagTest.php | 2 ++ .../Catalog/Model/Layer/Category/CollectionFilterTest.php | 2 ++ .../Model/Layer/Category/FilterableAttributeListTest.php | 2 ++ .../testsuite/Magento/Catalog/Model/Layer/FilterListTest.php | 2 ++ .../Model/Layer/Search/FilterableAttributeListTest.php | 2 ++ .../Magento/Catalog/Model/Layout/DepersonalizePluginTest.php | 2 ++ .../Catalog/Model/Product/Attribute/ManagementTest.php | 3 +++ .../Catalog/Model/Product/Attribute/RepositoryTest.php | 2 ++ .../Catalog/Model/Product/Attribute/Source/StatusTest.php | 2 ++ .../Catalog/Model/Product/Attribute/TypesListTest.php | 2 ++ .../Magento/Catalog/Model/Product/LinkTypeProviderTest.php | 3 +++ .../Catalog/Model/Product/Option/Validator/PoolTest.php | 2 ++ .../Magento/Catalog/Model/Product/PriceModifierTest.php | 2 ++ .../Catalog/Model/Product/TierPriceManagementTest.php | 3 +++ .../unit/testsuite/Magento/Catalog/Model/ProductTest.php | 3 +++ .../Magento/Catalog/Model/Resource/Category/TreeTest.php | 3 +++ .../Magento/Catalog/Model/Resource/Eav/AttributeTest.php | 3 +++ .../Model/Resource/Product/Attribute/Backend/MediaTest.php | 3 +++ .../Catalog/Model/Resource/Product/Option/CollectionTest.php | 3 +++ .../Magento/Catalog/Pricing/Price/BasePriceTest.php | 3 +++ .../Magento/Catalog/Pricing/Price/GroupPriceTest.php | 2 ++ .../Magento/Catalog/Pricing/Price/TierPriceTest.php | 2 ++ .../unit/testsuite/Magento/CatalogRule/Model/CronTest.php | 2 ++ .../Magento/CatalogRule/Plugin/Indexer/CategoryTest.php | 3 +++ .../Magento/CatalogRule/Plugin/Indexer/CustomerGroupTest.php | 3 +++ .../Magento/CatalogRule/Plugin/Indexer/ImportExportTest.php | 3 +++ .../Magento/CatalogRule/Plugin/Indexer/WebsiteTest.php | 3 +++ .../unit/testsuite/Magento/Checkout/Helper/CartTest.php | 3 +++ .../unit/testsuite/Magento/Checkout/Helper/DataTest.php | 3 +++ .../Checkout/Model/Layout/DepersonalizePluginTest.php | 2 ++ .../unit/testsuite/Magento/Checkout/Model/SessionTest.php | 2 ++ .../testsuite/Magento/Checkout/Model/Type/OnepageTest.php | 2 ++ .../Checkout/Service/V1/Address/Billing/WriteServiceTest.php | 2 ++ .../Magento/Checkout/Service/V1/Address/ConverterTest.php | 2 ++ .../Service/V1/Address/Shipping/WriteServiceTest.php | 2 ++ .../Magento/Checkout/Service/V1/Address/ValidatorTest.php | 2 ++ .../Checkout/Service/V1/Cart/PaymentMethod/BuilderTest.php | 2 ++ .../Checkout/Service/V1/Cart/PaymentMethod/ConverterTest.php | 2 ++ .../Magento/Checkout/Service/V1/Cart/ReadServiceTest.php | 2 ++ .../Magento/Checkout/Service/V1/Cart/TotalsServiceTest.php | 3 +++ .../Magento/Checkout/Service/V1/Cart/WriteServiceTest.php | 3 +++ .../Magento/Checkout/Service/V1/Coupon/ReadServiceTest.php | 2 ++ .../Magento/Checkout/Service/V1/Coupon/WriteServiceTest.php | 2 ++ .../Service/V1/Data/Cart/ShippingMethodConverterTest.php | 2 ++ .../Checkout/Service/V1/Data/PaymentMethod/ConverterTest.php | 2 ++ .../Magento/Checkout/Service/V1/Item/ReaderServiceTest.php | 2 ++ .../Checkout/Service/V1/PaymentMethod/ReadServiceTest.php | 2 ++ .../Checkout/Service/V1/PaymentMethod/WriteServiceTest.php | 2 ++ .../Model/Export/RowCustomizerTest.php | 3 +++ .../Magento/ConfigurableProduct/Helper/DataTest.php | 3 +++ .../Model/Product/Type/ConfigurableTest.php | 3 +++ .../ConfigurableProduct/Model/Product/Type/PluginTest.php | 3 +++ .../Initializer/Option/Plugin/ConfigurableProductTest.php | 3 +++ .../ConfigurableProduct/Model/SuggestedAttributeListTest.php | 3 +++ .../testsuite/Magento/Contact/Controller/Index/IndexTest.php | 3 +++ .../unit/testsuite/Magento/Contact/Controller/IndexTest.php | 2 ++ dev/tests/unit/testsuite/Magento/Contact/Helper/DataTest.php | 2 ++ .../testsuite/Magento/Core/App/Router/NoRouteHandlerTest.php | 3 +++ dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php | 3 +++ .../unit/testsuite/Magento/Core/Model/App/EmulationTest.php | 3 +++ .../unit/testsuite/Magento/Core/Model/Asset/ConfigTest.php | 3 +++ .../Magento/Core/Model/Asset/Plugin/CleanMergedJsCssTest.php | 3 +++ .../Magento/Core/Model/Layout/DepersonalizePluginTest.php | 2 ++ .../testsuite/Magento/Core/Model/Theme/Image/PathTest.php | 2 ++ .../unit/testsuite/Magento/Core/Model/View/DesignTest.php | 3 +++ .../Magento/Customer/Block/Account/Dashboard/InfoTest.php | 3 +++ .../Customer/Block/Adminhtml/Edit/Tab/AccountTest.php | 2 ++ .../unit/testsuite/Magento/Customer/Block/Widget/DobTest.php | 3 +++ .../testsuite/Magento/Customer/Block/Widget/GenderTest.php | 3 +++ .../testsuite/Magento/Customer/Block/Widget/NameTest.php | 3 +++ .../testsuite/Magento/Customer/Block/Widget/TaxvatTest.php | 3 +++ .../Magento/Customer/Controller/Account/ConfirmTest.php | 2 ++ .../Magento/Customer/Controller/Account/CreatePostTest.php | 3 +++ .../Magento/Customer/Controller/Account/CreateTest.php | 3 +++ .../Controller/Adminhtml/Index/ResetPasswordTest.php | 3 +++ .../testsuite/Magento/Customer/Controller/Ajax/LoginTest.php | 2 ++ .../Magento/Customer/Helper/Session/CurrentCustomerTest.php | 3 +++ .../Magento/Customer/Model/Resource/AddressTest.php | 2 ++ .../testsuite/Magento/Customer/Model/Resource/GroupTest.php | 2 ++ .../Model/Import/CustomerCompositeTest.php | 3 +++ .../CustomerImportExport/Model/Import/CustomerTest.php | 2 ++ .../DesignEditor/Controller/Varien/Router/StandardTest.php | 3 +++ .../Directory/Model/Resource/Country/CollectionTest.php | 3 +++ .../Magento/Eav/Model/Attribute/Data/AbstractDataTest.php | 3 +++ .../testsuite/Magento/Eav/Model/Attribute/Data/FileTest.php | 3 +++ .../testsuite/Magento/Eav/Model/Attribute/Data/ImageTest.php | 3 +++ .../testsuite/Magento/Eav/Model/AttributeManagementTest.php | 2 ++ .../Eav/Model/Entity/Attribute/Source/BooleanTest.php | 3 +++ .../Magento/Eav/Model/Resource/Attribute/CollectionTest.php | 3 +++ .../Magento/Eav/Model/Resource/Entity/AttributeTest.php | 3 +++ .../Eav/Plugin/Model/Resource/Entity/AttributeTest.php | 2 ++ .../Magento/Email/Block/Adminhtml/Template/PreviewTest.php | 3 +++ .../testsuite/Magento/Framework/App/Action/ActionTest.php | 2 ++ .../unit/testsuite/Magento/Framework/App/AreaListTest.php | 3 +++ .../unit/testsuite/Magento/Framework/App/BootstrapTest.php | 2 ++ .../Magento/Framework/App/ObjectManager/ConfigLoaderTest.php | 3 +++ .../testsuite/Magento/Framework/App/Request/HttpTest.php | 3 +++ .../unit/testsuite/Magento/Framework/App/ResourceTest.php | 2 ++ .../testsuite/Magento/Framework/App/StaticResourceTest.php | 3 +++ .../Magento/Framework/Autoload/ClassLoaderWrapperTest.php | 3 +++ .../unit/testsuite/Magento/Framework/Cache/CoreTest.php | 2 ++ .../Code/Reader/_files/ClassesForArgumentsReader.php | 3 +++ .../Code/Validator/_files/ClassesForArgumentSequence.php | 3 +++ .../Code/Validator/_files/ClassesForConstructorIntegrity.php | 3 +++ .../Code/Validator/_files/ClassesForContextAggregation.php | 3 +++ .../Code/Validator/_files/ClassesForTypeDuplication.php | 3 +++ .../Magento/Framework/Config/Composer/PackageTest.php | 2 ++ .../unit/testsuite/Magento/Framework/Config/DataTest.php | 3 +++ .../testsuite/Magento/Framework/DB/AbstractMapperTest.php | 3 +++ .../testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php | 2 ++ .../testsuite/Magento/Framework/Data/Collection/DbTest.php | 3 +++ .../Framework/Data/Form/Element/AbstractElementTest.php | 2 ++ dev/tests/unit/testsuite/Magento/Framework/File/CsvTest.php | 2 ++ .../Interception/Code/Generator/InterceptorTest.php | 2 ++ .../Framework/Interception/Code/InterfaceValidatorTest.php | 2 ++ .../Model/InterfaceValidator/ItemPlugin/ExtraParameters.php | 3 +++ .../ItemPlugin/IncompatibleArgumentsCount.php | 3 +++ .../ItemPlugin/IncompatibleArgumentsType.php | 3 +++ .../Model/InterfaceValidator/ItemPlugin/InvalidProceed.php | 3 +++ .../Model/InterfaceValidator/ItemPlugin/ValidPlugin.php | 3 +++ .../testsuite/Magento/Framework/Less/FileGeneratorTest.php | 2 ++ .../Framework/Less/PreProcessor/Instruction/ImportTest.php | 2 ++ .../Less/PreProcessor/Instruction/MagentoImportTest.php | 2 ++ .../unit/testsuite/Magento/Framework/Locale/ConfigTest.php | 2 ++ .../unit/testsuite/Magento/Framework/Locale/CurrencyTest.php | 2 ++ .../Magento/Framework/Model/Resource/Db/AbstractDbTest.php | 2 ++ .../Model/Resource/Db/Collection/AbstractCollectionTest.php | 2 ++ .../Magento/Framework/Mview/Config/Data/ProxyTest.php | 3 +++ .../unit/testsuite/Magento/Framework/Mview/ConfigTest.php | 3 +++ .../Magento/Framework/Mview/View/CollectionTest.php | 3 +++ .../Magento/Framework/Mview/View/SubscriptionFactoryTest.php | 3 +++ .../Magento/Framework/Mview/View/SubscriptionTest.php | 3 +++ .../ObjectManager/Config/Reader/_files/ConfigDomMock.php | 2 ++ .../Magento/Framework/Phrase/Renderer/CompositeTest.php | 3 +++ .../unit/testsuite/Magento/Framework/Session/ConfigTest.php | 2 ++ dev/tests/unit/testsuite/Magento/Framework/ShellTest.php | 3 +++ .../Magento/Framework/Stdlib/Cookie/CookieScopeTest.php | 2 ++ .../Magento/Framework/Stdlib/Cookie/PhpCookieManagerTest.php | 2 ++ dev/tests/unit/testsuite/Magento/Framework/UrlTest.php | 2 ++ .../testsuite/Magento/Framework/ValidatorFactoryTest.php | 3 +++ .../testsuite/Magento/Framework/View/Asset/MergedTest.php | 3 +++ .../Framework/View/Asset/ModuleNotation/ResolverTest.php | 2 ++ .../Framework/View/Asset/PreProcessor/ModuleNotationTest.php | 2 ++ .../Magento/Framework/View/Asset/RepositoryTest.php | 2 ++ .../testsuite/Magento/Framework/View/Asset/SourceTest.php | 2 ++ .../unit/testsuite/Magento/Framework/View/BlockPoolTest.php | 2 ++ .../testsuite/Magento/Framework/View/DataSourcePoolTest.php | 2 ++ .../Design/FileResolution/Fallback/CacheData/FlatTest.php | 2 ++ .../Design/FileResolution/Fallback/CacheData/GroupedTest.php | 2 ++ .../FileResolution/Fallback/Resolver/AlternativeTest.php | 2 ++ .../Design/FileResolution/Fallback/Resolver/SimpleTest.php | 2 ++ .../Magento/Framework/View/Design/Theme/ImageTest.php | 2 ++ .../View/File/Collector/Decorator/ModuleDependencyTest.php | 2 ++ .../View/File/Collector/Decorator/ModuleOutputTest.php | 2 ++ .../Framework/View/File/Collector/Override/BaseTest.php | 2 ++ .../View/File/Collector/Override/ThemeModularTest.php | 2 ++ .../testsuite/Magento/Framework/View/File/FileListTest.php | 2 ++ .../unit/testsuite/Magento/Framework/View/FileSystemTest.php | 2 ++ .../Magento/Framework/View/Layout/Reader/MoveTest.php | 2 ++ .../testsuite/Magento/Framework/View/Result/LayoutTest.php | 2 ++ .../Framework/View/TemplateEngine/_files/simple.phtml | 3 +++ .../Magento/GiftMessage/Model/GiftMessageManagerTest.php | 2 ++ .../Magento/GiftMessage/Model/Type/Plugin/OnepageTest.php | 2 ++ .../Magento/GiftMessage/Service/V1/ReadServiceTest.php | 2 ++ .../Magento/Indexer/Model/Processor/InvalidateCacheTest.php | 2 ++ .../Controller/Adminhtml/Integration/DeleteTest.php | 3 +++ .../Controller/Adminhtml/Integration/EditTest.php | 3 +++ .../Controller/Adminhtml/Integration/NewActionTest.php | 3 +++ .../Adminhtml/Integration/PermissionsDialogTest.php | 3 +++ .../Controller/Adminhtml/Integration/SaveTest.php | 3 +++ .../Controller/Adminhtml/Integration/TokensDialogTest.php | 3 +++ .../unit/testsuite/Magento/Integration/Oauth/OauthTest.php | 3 +++ .../Magento/Integration/Service/V1/AdminTokenServiceTest.php | 2 ++ dev/tests/unit/testsuite/Magento/Msrp/Helper/DataTest.php | 2 ++ .../Multishipping/Block/Checkout/Address/SelectTest.php | 3 +++ .../Magento/Multishipping/Block/Checkout/OverviewTest.php | 2 ++ .../Multishipping/Block/Checkout/Payment/InfoTest.php | 2 ++ .../Magento/Multishipping/Block/Checkout/ShippingTest.php | 2 ++ .../Magento/Multishipping/Block/Checkout/StateTest.php | 2 ++ .../Magento/Multishipping/Block/Checkout/SuccessTest.php | 2 ++ .../Controller/Checkout/Address/EditAddressTest.php | 3 +++ .../Controller/Checkout/Address/EditBillingTest.php | 3 +++ .../Controller/Checkout/Address/EditShippingTest.php | 3 +++ .../Controller/Checkout/Address/NewBillingTest.php | 3 +++ .../Controller/Checkout/Address/NewShippingTest.php | 3 +++ .../Magento/Newsletter/Controller/Manage/SaveTest.php | 3 +++ .../testsuite/Magento/PageCache/Controller/Block/EsiTest.php | 3 +++ .../Magento/PageCache/Controller/Block/RenderTest.php | 2 ++ .../PageCache/Model/Controller/Result/BuiltinPluginTest.php | 3 +++ .../Magento/PageCache/Model/Observer/FlushAllCacheTest.php | 3 +++ .../PageCache/Model/Observer/FlushCacheByTagsTest.php | 3 +++ .../Model/Observer/ProcessLayoutRenderElementTest.php | 3 +++ dev/tests/unit/testsuite/Magento/Payment/Block/FormTest.php | 3 +++ .../Magento/Payment/Block/Info/SubstitutionTest.php | 2 ++ .../Magento/Payment/Model/Config/Source/AllmethodsTest.php | 2 ++ .../unit/testsuite/Magento/Payment/Model/ConfigTest.php | 2 ++ .../unit/testsuite/Magento/Payment/Model/MethodListTest.php | 2 ++ .../Model/Observer/ApplyBlockPersistentDataTest.php | 3 +++ .../Persistent/Model/Observer/RemovePersistentCookieTest.php | 2 ++ .../Persistent/Model/Observer/UpdateCustomerCookiesTest.php | 3 +++ .../testsuite/Magento/Persistent/Model/QuoteManagerTest.php | 2 ++ .../Resource/Report/Collection/AbstractCollectionTest.php | 5 ++++- .../Magento/Review/Controller/Adminhtml/Product/PostTest.php | 2 ++ .../unit/testsuite/Magento/Rss/Model/RssManagerTest.php | 2 ++ .../unit/testsuite/Magento/Rss/Model/UrlBuilderTest.php | 2 ++ .../Rule/Model/Condition/Product/AbstractProductTest.php | 2 ++ .../Sales/Block/Adminhtml/Order/Create/Items/GridTest.php | 3 +++ .../Sales/Block/Adminhtml/Order/Create/TotalsTest.php | 3 +++ .../Sales/Block/Order/Email/Items/DefaultItemsTest.php | 3 +++ .../Sales/Block/Order/Email/Items/Order/DefaultOrderTest.php | 3 +++ .../Sales/Block/Order/Item/Renderer/DefaultRendererTest.php | 3 +++ .../Sales/Controller/Adminhtml/Order/Creditmemo/SaveTest.php | 3 +++ .../Magento/Sales/Helper/Quote/Item/CompareTest.php | 2 ++ .../testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php | 3 +++ .../Magento/Sales/Model/Grid/Child/CollectionUpdaterTest.php | 2 ++ .../Magento/Sales/Model/Grid/CollectionUpdaterTest.php | 2 ++ .../Sales/Model/Observer/Backend/CustomerQuoteTest.php | 3 +++ .../Observer/Frontend/Quote/Address/CollectTotalsTest.php | 3 +++ .../Magento/Sales/Model/Order/Creditmemo/Total/TaxTest.php | 3 +++ .../testsuite/Magento/Sales/Model/Order/CreditmemoTest.php | 3 +++ .../Magento/Sales/Model/Order/Invoice/Total/ShippingTest.php | 3 +++ .../unit/testsuite/Magento/Sales/Model/Order/InvoiceTest.php | 3 +++ .../unit/testsuite/Magento/Sales/Model/Quote/AddressTest.php | 3 +++ .../unit/testsuite/Magento/Sales/Model/Quote/ItemTest.php | 3 +++ dev/tests/unit/testsuite/Magento/Sales/Model/QuoteTest.php | 3 +++ .../testsuite/Magento/Sales/Model/Resource/GridPoolTest.php | 3 +++ .../Magento/Sales/Model/Resource/Order/StatusTest.php | 3 +++ .../SalesRule/Model/Resource/Report/CollectionTest.php | 3 +++ .../Controller/Adminhtml/Order/Shipment/AddTrackTest.php | 2 ++ .../Controller/Adminhtml/Order/Shipment/SaveTest.php | 2 ++ .../unit/testsuite/Magento/Shipping/Model/ShipmentTest.php | 2 ++ .../Magento/Store/App/Action/Plugin/ContextTest.php | 2 ++ .../Magento/Store/App/Action/Plugin/StoreCheckTest.php | 3 +++ .../Magento/Store/Model/Config/Reader/ReaderPoolTest.php | 3 +++ .../unit/testsuite/Magento/Store/Model/Storage/DbTest.php | 3 +++ dev/tests/unit/testsuite/Magento/Store/Model/StoreTest.php | 3 +++ .../Magento/Tax/Block/Checkout/Cart/Sidebar/TotalsTest.php | 3 +++ dev/tests/unit/testsuite/Magento/Tax/Helper/DataTest.php | 3 +++ .../Calculation/RowBaseAndTotalBaseCalculatorTestCase.php | 2 ++ .../unit/testsuite/Magento/Tax/Model/Config/TaxClassTest.php | 2 ++ dev/tests/unit/testsuite/Magento/Tax/Model/ConfigTest.php | 2 ++ .../Tax/Model/Sales/Total/Quote/CommonTaxCollectorTest.php | 3 +++ .../Magento/Tax/Model/Sales/Total/Quote/ShippingTest.php | 3 +++ .../Magento/Tax/Model/Sales/Total/Quote/TaxTest.php | 3 +++ .../Block/Adminhtml/System/Design/Theme/Tab/CssTest.php | 3 +++ .../Magento/Theme/Model/Url/Plugin/SignatureTest.php | 2 ++ .../Magento/Tools/Di/Compiler/ArgumentsResolverTest.php | 3 +++ .../testsuite/Magento/Tools/Di/Definition/CollectionTest.php | 3 +++ .../unit/testsuite/Magento/Tools/I18n/Parser/ParserTest.php | 3 +++ .../Magento/UrlRewrite/Block/Catalog/Edit/FormTest.php | 2 ++ .../Magento/UrlRewrite/Model/Storage/DbStorageTest.php | 3 +++ .../unit/testsuite/Magento/Webapi/Controller/RestTest.php | 3 +++ .../Magento/Webapi/Controller/Soap/Request/HandlerTest.php | 3 +++ .../unit/testsuite/Magento/Webapi/_files/test_interfaces.php | 3 +++ .../Magento/Weee/Model/Attribute/Backend/Weee/TaxTest.php | 2 ++ .../unit/testsuite/Magento/Weee/Pricing/AdjustmentTest.php | 2 ++ .../testsuite/Magento/Wishlist/Model/Rss/WishlistTest.php | 2 ++ lib/internal/Magento/Framework/Acl/Resource/Provider.php | 3 +++ lib/internal/Magento/Framework/Archive/Helper/File.php | 2 ++ lib/internal/Magento/Framework/Archive/Helper/File/Gz.php | 2 ++ lib/internal/Magento/Framework/Backup/Archive/Tar.php | 2 ++ lib/internal/Magento/Framework/Backup/Db/BackupFactory.php | 3 +++ lib/internal/Magento/Framework/Backup/Factory.php | 3 +++ lib/internal/Magento/Framework/Backup/Filesystem.php | 3 +++ lib/internal/Magento/Framework/Cache/Backend/Database.php | 2 ++ .../Magento/Framework/Cache/Backend/Eaccelerator.php | 3 +++ lib/internal/Magento/Framework/Config/Dom.php | 2 ++ lib/internal/Magento/Framework/CurrencyFactory.php | 3 +++ lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php | 3 +++ lib/internal/Magento/Framework/DB/MapperFactory.php | 2 ++ lib/internal/Magento/Framework/DB/QueryFactory.php | 3 +++ lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php | 2 ++ lib/internal/Magento/Framework/Data/Form/Element/Editor.php | 3 +++ lib/internal/Magento/Framework/Data/Form/Element/Gallery.php | 2 ++ lib/internal/Magento/Framework/Data/Form/Element/Time.php | 2 ++ lib/internal/Magento/Framework/Data/FormFactory.php | 3 +++ lib/internal/Magento/Framework/Encryption/Crypt.php | 3 +++ .../Magento/Framework/Event/Invoker/InvokerDefault.php | 3 +++ lib/internal/Magento/Framework/File/Csv.php | 3 +++ lib/internal/Magento/Framework/File/CsvMulty.php | 2 ++ .../Magento/Framework/File/Transfer/Adapter/Http.php | 2 ++ .../Magento/Framework/Filter/Input/MaliciousCode.php | 3 +++ .../Magento/Framework/Gdata/Gshopping/HttpException.php | 3 +++ lib/internal/Magento/Framework/HTTP/Adapter/Curl.php | 2 ++ lib/internal/Magento/Framework/HTTP/Header.php | 3 +++ lib/internal/Magento/Framework/Image/Factory.php | 3 +++ .../Framework/Interception/Code/Generator/Interceptor.php | 3 +++ lib/internal/Magento/Framework/Io/Sftp.php | 3 +++ .../Framework/Less/PreProcessor/Instruction/Import.php | 2 ++ lib/internal/Magento/Framework/Locale/Lists.php | 3 +++ .../Magento/Framework/Mail/Template/TransportBuilder.php | 3 +++ lib/internal/Magento/Framework/Message/Factory.php | 3 +++ .../Magento/Framework/Model/Resource/AbstractResource.php | 3 +++ .../Model/Resource/Db/Collection/AbstractCollection.php | 3 +++ .../Magento/Framework/Model/Resource/Type/Db/Pdo/Mysql.php | 3 +++ .../Magento/Framework/Module/Plugin/DbStatusValidator.php | 3 +++ lib/internal/Magento/Framework/Module/Resource.php | 3 +++ .../Magento/Framework/Module/Setup/MigrationFactory.php | 3 +++ lib/internal/Magento/Framework/Mview/ActionFactory.php | 3 +++ lib/internal/Magento/Framework/Mview/View.php | 3 +++ lib/internal/Magento/Framework/Mview/View/Subscription.php | 3 +++ .../Framework/ObjectManager/Code/Generator/Persistor.php | 3 +++ .../Framework/ObjectManager/Code/Generator/Repository.php | 3 +++ .../Magento/Framework/ObjectManager/DefinitionFactory.php | 3 +++ .../Magento/Framework/Pricing/Render/RendererPool.php | 3 +++ lib/internal/Magento/Framework/Profiler/Driver/Factory.php | 3 +++ .../Magento/Framework/Stdlib/DateTime/DateInterface.php | 3 +++ .../Magento/Framework/Stdlib/DateTime/TimezoneInterface.php | 3 +++ lib/internal/Magento/Framework/Translate/Adapter.php | 2 ++ .../Magento/Framework/Translate/AdapterInterface.php | 2 ++ lib/internal/Magento/Framework/Translate/Inline.php | 3 +++ lib/internal/Magento/Framework/Url.php | 2 ++ lib/internal/Magento/Framework/UrlFactory.php | 3 +++ lib/internal/Magento/Framework/Validator/Builder.php | 3 +++ .../Magento/Framework/Validator/Constraint/Property.php | 3 +++ .../Magento/Framework/Validator/ConstraintFactory.php | 2 ++ 1442 files changed, 3980 insertions(+), 9 deletions(-) mode change 100755 => 100644 dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php mode change 100755 => 100644 dev/tests/integration/testsuite/Magento/Customer/Controller/AjaxLoginTest.php diff --git a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php index baa57d81bab..d0e9f207ed4 100644 --- a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php +++ b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\AdminNotification\Block\Grid\Renderer; class Actions extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer diff --git a/app/code/Magento/AdminNotification/Block/ToolbarEntry.php b/app/code/Magento/AdminNotification/Block/ToolbarEntry.php index 30d2793ef9d..f7c604d0d84 100644 --- a/app/code/Magento/AdminNotification/Block/ToolbarEntry.php +++ b/app/code/Magento/AdminNotification/Block/ToolbarEntry.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\AdminNotification\Block; /** diff --git a/app/code/Magento/AdminNotification/Model/Resource/Grid/Collection.php b/app/code/Magento/AdminNotification/Model/Resource/Grid/Collection.php index 33880cfb708..242cb283bcc 100644 --- a/app/code/Magento/AdminNotification/Model/Resource/Grid/Collection.php +++ b/app/code/Magento/AdminNotification/Model/Resource/Grid/Collection.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * AdminNotification Inbox model * diff --git a/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php b/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php index e8041a763ce..d168b9037bd 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\AdminNotification\Model\System\Message; class Baseurl implements \Magento\Framework\Notification\MessageInterface diff --git a/app/code/Magento/AdminNotification/Model/System/Message/Media/Synchronization/Error.php b/app/code/Magento/AdminNotification/Model/System/Message/Media/Synchronization/Error.php index cdec54248b8..03b2ff284af 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/Media/Synchronization/Error.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/Media/Synchronization/Error.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\AdminNotification\Model\System\Message\Media\Synchronization; class Error extends \Magento\AdminNotification\Model\System\Message\Media\AbstractSynchronization diff --git a/app/code/Magento/AdminNotification/Model/System/Message/Security.php b/app/code/Magento/AdminNotification/Model/System/Message/Security.php index f7e44190cb0..99b6868f6cd 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/Security.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/Security.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\AdminNotification\Model\System\Message; class Security implements \Magento\Framework\Notification\MessageInterface diff --git a/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml index f18d2b5cbd7..90f09911356 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml index 482c38a1fdc..5e3593b8b48 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\AdminNotification\Block\System\Messages */ ?> diff --git a/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml index c384f2a10ed..bf9d006c7f7 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup */ ?> <div id="system_messages_list" title="<?php echo $this->escapeHtml($this->getPopupTitle()); ?>"> diff --git a/app/code/Magento/AdminNotification/view/adminhtml/templates/toolbar_entry.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/toolbar_entry.phtml index 8ffdbd265e0..dd880fa47c6 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/templates/toolbar_entry.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/toolbar_entry.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\AdminNotification\Block\ToolbarEntry */ ?> <?php $notificationCount = $this->getUnreadNotificationCount(); ?> diff --git a/app/code/Magento/Authorization/Model/Resource/Rules.php b/app/code/Magento/Authorization/Model/Resource/Rules.php index d1f16dbe54a..8ade47a994e 100644 --- a/app/code/Magento/Authorization/Model/Resource/Rules.php +++ b/app/code/Magento/Authorization/Model/Resource/Rules.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Authorization\Model\Resource; /** diff --git a/app/code/Magento/Backend/App/Config.php b/app/code/Magento/Backend/App/Config.php index f4fb4115773..ab9f053b99f 100644 --- a/app/code/Magento/Backend/App/Config.php +++ b/app/code/Magento/Backend/App/Config.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\App; /** diff --git a/app/code/Magento/Backend/Block/Dashboard.php b/app/code/Magento/Backend/Block/Dashboard.php index 2f59e29741b..e61baaebd90 100644 --- a/app/code/Magento/Backend/Block/Dashboard.php +++ b/app/code/Magento/Backend/Block/Dashboard.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block; class Dashboard extends \Magento\Backend\Block\Template diff --git a/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php b/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php index 43f034166cf..f6e55363ec6 100644 --- a/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php +++ b/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Dashboard; /** diff --git a/app/code/Magento/Backend/Block/Menu.php b/app/code/Magento/Backend/Block/Menu.php index b77cb7c86c4..7413dc5c7a8 100644 --- a/app/code/Magento/Backend/Block/Menu.php +++ b/app/code/Magento/Backend/Block/Menu.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block; /** diff --git a/app/code/Magento/Backend/Block/Page/Header.php b/app/code/Magento/Backend/Block/Page/Header.php index 39574f1ec15..08ed3799f85 100644 --- a/app/code/Magento/Backend/Block/Page/Header.php +++ b/app/code/Magento/Backend/Block/Page/Header.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Page; /** diff --git a/app/code/Magento/Backend/Block/Page/Notices.php b/app/code/Magento/Backend/Block/Page/Notices.php index 20d8be4eaf0..b7e5cb9c716 100644 --- a/app/code/Magento/Backend/Block/Page/Notices.php +++ b/app/code/Magento/Backend/Block/Page/Notices.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Adminhtml header notices block * diff --git a/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php b/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php index 4ce47621586..867f138c7f4 100644 --- a/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php +++ b/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Page\System\Config\Robots; /** diff --git a/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php b/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php index a983e672e09..dc4a2e0abbd 100644 --- a/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php +++ b/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Store\Switcher\Form\Renderer; /** diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field.php b/app/code/Magento/Backend/Block/System/Config/Form/Field.php index f97740950c7..91415bce932 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Abstract config form element renderer * diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php index c853eabc971..e07c3d0ebeb 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\System\Config\Form\Field\FieldArray; /** diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/Select/Allowspecific.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/Select/Allowspecific.php index efd49c62846..ae28b64a469 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/Select/Allowspecific.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/Select/Allowspecific.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * System configuration shipping methods allow all countries select * diff --git a/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php b/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php index 1b2a4d61960..239dc7d2cc2 100644 --- a/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php +++ b/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\System\Design\Edit\Tab; class General extends \Magento\Backend\Block\Widget\Form\Generic diff --git a/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php b/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php index 70fbebbb72b..f7e17e2f8c5 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Form\Element; use Magento\Framework\Data\Form\Element\AbstractElement; diff --git a/app/code/Magento/Backend/Block/Widget/Form/Renderer/Element.php b/app/code/Magento/Backend/Block/Widget/Form/Renderer/Element.php index 028e461fc1c..c7819085ba9 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Renderer/Element.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Renderer/Element.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Form\Renderer; use Magento\Framework\Data\Form\Element\AbstractElement; diff --git a/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset.php b/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset.php index 230557518ce..d073b6e758a 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Form\Renderer; use Magento\Framework\Data\Form\Element\AbstractElement; diff --git a/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset/Element.php b/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset/Element.php index 66953aae94e..6913efdc479 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset/Element.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset/Element.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Form\Renderer\Fieldset; use Magento\Framework\Data\Form\Element\AbstractElement; diff --git a/app/code/Magento/Backend/Block/Widget/Grid.php b/app/code/Magento/Backend/Block/Widget/Grid.php index f089a3e0603..d0195ea6753 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid.php +++ b/app/code/Magento/Backend/Block/Widget/Grid.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget; /** diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php index 239c649110e..f7fdad4c65c 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Grid\Column\Filter; /** diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php index 47f5e07ccc0..3ea080c4876 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Grid\Column\Filter; /** diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php index 33630b4a59a..45e03bd1d90 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Grid\Column\Renderer; /** diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php index 076ff34ceda..c479c14c770 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Grid\Column\Renderer; /** diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Export.php b/app/code/Magento/Backend/Block/Widget/Grid/Export.php index 5ec6857e3ab..6ad2a1b2b7d 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Export.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Export.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Grid; use Magento\Framework\App\Filesystem\DirectoryList; diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php index 92e18a9b7c7..18eba24c23a 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Controller\Adminhtml\System; use Magento\Backend\App\Action; diff --git a/app/code/Magento/Backend/Model/Config/Backend/Currency/Base.php b/app/code/Magento/Backend/Model/Config/Backend/Currency/Base.php index 930f2655009..212d6c5abfe 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Currency/Base.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Currency/Base.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Backend Directory currency backend model * Allows dispatching before and after events for each controller action diff --git a/app/code/Magento/Backend/Model/Config/Backend/Email/Sender.php b/app/code/Magento/Backend/Model/Config/Backend/Email/Sender.php index 0a670a2ca9f..b6d06614896 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Email/Sender.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Email/Sender.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * System config email sender field backend model */ diff --git a/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php b/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php index ca827699e2f..464cc4a897a 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Config\Backend; class Encrypted extends \Magento\Framework\App\Config\Value implements \Magento\Framework\App\Config\Data\ProcessorInterface diff --git a/app/code/Magento/Backend/Model/Config/Source/Dev/Dbautoup.php b/app/code/Magento/Backend/Model/Config/Source/Dev/Dbautoup.php index 5ee09db4892..ded1c1b303b 100644 --- a/app/code/Magento/Backend/Model/Config/Source/Dev/Dbautoup.php +++ b/app/code/Magento/Backend/Model/Config/Source/Dev/Dbautoup.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Config\Source\Dev; class Dbautoup implements \Magento\Framework\Option\ArrayInterface diff --git a/app/code/Magento/Backend/Model/Config/Structure/Element/Group.php b/app/code/Magento/Backend/Model/Config/Structure/Element/Group.php index ec69736a687..9d79c743406 100644 --- a/app/code/Magento/Backend/Model/Config/Structure/Element/Group.php +++ b/app/code/Magento/Backend/Model/Config/Structure/Element/Group.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Config\Structure\Element; class Group extends AbstractComposite diff --git a/app/code/Magento/Backend/Model/Menu/Director/Director.php b/app/code/Magento/Backend/Model/Menu/Director/Director.php index 0d77330ecb0..c1178d64e3d 100644 --- a/app/code/Magento/Backend/Model/Menu/Director/Director.php +++ b/app/code/Magento/Backend/Model/Menu/Director/Director.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Menu\Director; class Director extends \Magento\Backend\Model\Menu\AbstractDirector diff --git a/app/code/Magento/Backend/Model/Menu/Item.php b/app/code/Magento/Backend/Model/Menu/Item.php index 8091747ede2..a98a0083320 100644 --- a/app/code/Magento/Backend/Model/Menu/Item.php +++ b/app/code/Magento/Backend/Model/Menu/Item.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Menu; /** diff --git a/app/code/Magento/Backend/Model/Widget/Grid/AbstractTotals.php b/app/code/Magento/Backend/Model/Widget/Grid/AbstractTotals.php index c9aaee12553..bb6d1f32148 100644 --- a/app/code/Magento/Backend/Model/Widget/Grid/AbstractTotals.php +++ b/app/code/Magento/Backend/Model/Widget/Grid/AbstractTotals.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Widget\Grid; abstract class AbstractTotals implements \Magento\Backend\Model\Widget\Grid\TotalsInterface diff --git a/app/code/Magento/Backend/view/adminhtml/templates/admin/access_denied.phtml b/app/code/Magento/Backend/view/adminhtml/templates/admin/access_denied.phtml index d2f903e71e5..da046cab059 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/admin/access_denied.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/admin/access_denied.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Backend/view/adminhtml/templates/admin/login.phtml b/app/code/Magento/Backend/view/adminhtml/templates/admin/login.phtml index 676d6c743d6..dc44ab9062f 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/admin/login.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/admin/login.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div id="page-login" class="page-login"> <div class="wrapper"> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/admin/overlay_popup.phtml b/app/code/Magento/Backend/view/adminhtml/templates/admin/overlay_popup.phtml index 0bd8eefc84f..c0fbf4f4bd4 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/admin/overlay_popup.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/admin/overlay_popup.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="wrapper-popup"> <div class="middle" id="anchor-content"> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/admin/page.phtml b/app/code/Magento/Backend/view/adminhtml/templates/admin/page.phtml index e6edc5b0cf4..1e54ab6a51d 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/admin/page.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/admin/page.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Backend\Block\Page */ ?> <!doctype html> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/graph.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/graph.phtml index e92e7d5af95..8c5061a48e8 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/graph.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/graph.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="dashboard-diagram"> <div class="dashboard-diagram-switcher"> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/grid.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/grid.phtml index 5589f4668f5..285d35dabb2 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/grid.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/grid.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/index.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/index.phtml index 3510a20e8e9..8979c49491f 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/index.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/index.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if (is_array($this->getChildBlock('diagrams')->getTabsIds())) : ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/salebar.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/salebar.phtml index 6ccae935bf4..d802f74c96c 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/salebar.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/salebar.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if (sizeof($this->getTotals()) > 0): ?> <?php foreach ($this->getTotals() as $_total): ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/searches.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/searches.phtml index 5ba7b3b433d..09f2361be1b 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/searches.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/searches.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div style="padding:5px;"> <?php if (count($this->getCollection()->getItems()) > 0): ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml index ba4ac800ce3..92ea01998b1 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <p class="switcher"><label for="store_switcher"><?php echo __('View Statistics For:') ?></label> <?php echo $this->getHintHtml() ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/totalbar.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/totalbar.phtml index 09cfb73dc0d..a2c954377ec 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/totalbar.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/totalbar.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if (sizeof($this->getTotals()) > 0): ?> <div class="dashboard-totals" id="dashboard_diagram_totals"> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/menu.phtml b/app/code/Magento/Backend/view/adminhtml/templates/menu.phtml index cd0b34cb15b..83b5e3cac18 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/menu.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/menu.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <nav class="navigation"> <?php echo $this->renderNavigation($this->getMenuModel(), 0, 12); ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/page/copyright.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/copyright.phtml index f159b628c76..d4ee283c310 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/copyright.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/copyright.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <small class="copyright"> <?php echo __('Magento is an eBay Inc. company. Copyright© %1 Magento, Inc. All rights reserved.', date('Y')) ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/page/footer.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/footer.phtml index a3b87f4c6a4..5304ea03103 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/footer.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/footer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <small class="magento-version"><?php echo __('Magento ver. %1', \Magento\Framework\AppInterface::VERSION) ?></small> <?php if ($this->getBugreportUrl()): ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml index 5dbde87fe5e..8fe9c65b58d 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Backend\Block\Page\Header */ ?> <?php switch ($this->getShowPart()): diff --git a/app/code/Magento/Backend/view/adminhtml/templates/page/js/components.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/js/components.phtml index c3d65413e27..c364e6f5940 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/js/components.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/js/components.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Backend/view/adminhtml/templates/page/js/translate.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/js/translate.phtml index a99050ebce2..516c2d3185f 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/js/translate.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/js/translate.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Backend/view/adminhtml/templates/page/locale.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/locale.phtml index 44628b3d318..3e0270d06cc 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/locale.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/locale.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="locale-switcher-field field"> <label class="label" for="locale-switcher"><span><?php echo __('Interface Locale'); ?></span></label> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/page/notices.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/notices.phtml index 3a8f3eb0e95..c0ff697acae 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/notices.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/notices.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Backend/view/adminhtml/templates/page/system/config/robots/reset.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/system/config/robots/reset.phtml index 2988aabd9cf..d3d44e7e9d2 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/system/config/robots/reset.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/system/config/robots/reset.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * @var $this \Magento\Backend\Block\Page\System\Config\Robots\Reset * @var $coreHelper \Magento\Core\Helper\Data diff --git a/app/code/Magento/Backend/view/adminhtml/templates/pageactions.phtml b/app/code/Magento/Backend/view/adminhtml/templates/pageactions.phtml index e4d496a5ce8..43a9bbca075 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/pageactions.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/pageactions.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getChildHtml()):?> <div class="page-actions" <?php echo $this->getUiId('content-header') ?>> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml index 4b776da1be1..6831eec8d99 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Backend\Block\Store\Switcher */ ?> <?php if ($websites = $this->getWebsites()): ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset.phtml b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset.phtml index 1fe73942204..30ed99515a7 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_element = $this->getElement() ?> <?php if ($_element->getFieldsetContainerId()): ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset/element.phtml b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset/element.phtml index d0b34c26af3..3f32e240828 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset/element.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset/element.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Backend\Block\Widget\Form\Renderer\Fieldset\Element */ diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/autocomplete.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/autocomplete.phtml index d66de1b3478..f7b47860fb7 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/system/autocomplete.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/system/autocomplete.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <ul class="dropdown-menu"> <?php foreach ($items as $item): ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml index 72deaa09a1a..904094a6bce 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/config/edit.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/config/edit.phtml index a043f39c7c2..8c1d2785729 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/system/config/edit.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/system/config/edit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/config/form/field/array.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/config/form/field/array.phtml index 74729edf5fa..f607771dc6f 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/system/config/form/field/array.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/system/config/form/field/array.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/config/js.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/config/js.phtml index 016997793c8..e1d1f6e5289 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/system/config/js.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/system/config/js.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <script type="text/javascript"> //<![CDATA[ diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/config/switcher.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/config/switcher.phtml index 31913887f3e..b132922b85a 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/system/config/switcher.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/system/config/switcher.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Backend\Block\Template */ ?> <div class="field field-store-switcher"> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/config/system/storage/media/synchronize.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/config/system/storage/media/synchronize.phtml index 3a3986d3bc4..53a9097390e 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/system/config/system/storage/media/synchronize.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/system/config/system/storage/media/synchronize.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Backend\Block\System\Config\System\Storage\Media\Synchronize */ ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/config/tabs.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/config/tabs.phtml index 89a431fb85a..776a7556d69 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/system/config/tabs.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/system/config/tabs.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Backend\Block\System\Config\Tabs */ ?> <?php if ($this->getTitle()): ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/design/index.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/design/index.phtml index d446e7eaee5..26850ee918e 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/system/design/index.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/system/design/index.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml('grid') ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml index 2f662fdf4df..00bd42d4e27 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Backend\Block\GlobalSearch */ ?> <div class="search-global miniform"> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/accordion.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/accordion.phtml index 74304aff6d3..68f35e9e196 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/accordion.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/accordion.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/breadcrumbs.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/breadcrumbs.phtml index ab661716c0b..6c29f19b652 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/breadcrumbs.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/breadcrumbs.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if (!empty($links)): ?> <ul class="breadcrumbs"> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/button.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/button.phtml index f3ec6cd5578..24610de7c1c 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/button.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/button.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml index 28124fa057a..a5b8a5b7e38 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Backend\Block\Widget\Button\SplitButton */ diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/form.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form.phtml index a31be4d4715..c1b0ae3c8f5 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/form.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var $this \Magento\Backend\Block\Widget\Form */ ?> <?php /* @todo replace .form-inline with better class name */?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/container.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/container.phtml index f8b5bc88e0a..598d5b41b98 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/container.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/container.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var $this \Magento\Backend\Block\Widget\Form\Container */ ?> <?php echo $this->getFormInitScripts() ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element.phtml index bbf25aa6d1b..52db4120fa1 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php switch ($element->getType()) { case 'fieldset': ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml index af44009869f..61a8d45c836 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <tr> <td colspan="2"> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/element.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/element.phtml index 425cb215d06..90d8e9d094a 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/element.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/element.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_element = $this->getElement() ?> <?php if ($_element->getNoSpan() !== true): ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/fieldset.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/fieldset.phtml index 0cfb8087247..0ccf78a0171 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/fieldset.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/fieldset.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $element \Magento\Framework\Data\Form\Element\Fieldset */ diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/fieldset/element.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/fieldset/element.phtml index 5d9dbcfde5e..c35963ae88a 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/fieldset/element.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/fieldset/element.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Backend\Block\Widget\Form\Renderer\Fieldset\Element */ diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml index dbd268eba23..1e2aa1a3418 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/column_set.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/column_set.phtml index 0bc71362345..e7a5e2f5151 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/column_set.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/column_set.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/container.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/container.phtml index 983a87fd0d1..d80c81a51ab 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/container.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/container.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getButtonsHtml()): ?> <div class="page-actions"><?php echo $this->getButtonsHtml() ?></div> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/container/empty.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/container/empty.phtml index af3dfe91251..150772e9391 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/container/empty.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/container/empty.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getGridHtml() ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/export.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/export.phtml index 1d9ce337a1f..b0132ce9658 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/export.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/export.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <label for="<?php echo $this->getId() ?>_export" class="label"> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml index 6d1992849b9..7695ba3445e 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction.phtml index eb14158f785..92cde7496b8 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div id="<?php echo $this->getHtmlId() ?>"> <div class="massaction"> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction_extended.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction_extended.phtml index 9f251e539d3..6e151dd07d8 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction_extended.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction_extended.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * @deprecated support Magento 1.x grid massaction implementation */ diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/serializer.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/serializer.phtml index 9ed8467ac1f..b2803d5c873 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/serializer.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/serializer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml index 2e7b52e59b2..d7249c2eaf5 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Backend\Block\Widget\Tabs */ ?> <?php if (!empty($tabs)): ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml index 51be2598ad0..4737be64f14 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <!-- <?php if ($this->getTitle()): ?> <h3><?php echo $this->getTitle() ?></h3> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabsleft.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabsleft.phtml index 47cefba32fc..e6087d06dad 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabsleft.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabsleft.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <dl id="dl-<?php echo $id ?>" class="accordion"> <?php foreach ($sections as $sectionId => $section): ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/view/container.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/view/container.phtml index c7c2f9e62a4..e4403b32832 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/view/container.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/view/container.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="page-actions"><?php echo $this->getButtonsHtml() ?></div> <?php echo $this->getViewHtml() ?> diff --git a/app/code/Magento/Backend/view/install/templates/page/copyright.phtml b/app/code/Magento/Backend/view/install/templates/page/copyright.phtml index a815a6e0a82..4ecfdda83b8 100644 --- a/app/code/Magento/Backend/view/install/templates/page/copyright.phtml +++ b/app/code/Magento/Backend/view/install/templates/page/copyright.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo __('Magento is an eBay Inc. company. Copyright© %1 Magento, Inc. All rights reserved.', date('Y')) ?> diff --git a/app/code/Magento/Backup/Model/Resource/Helper.php b/app/code/Magento/Backup/Model/Resource/Helper.php index a2e8c11c931..230615e1df3 100644 --- a/app/code/Magento/Backup/Model/Resource/Helper.php +++ b/app/code/Magento/Backup/Model/Resource/Helper.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backup\Model\Resource; class Helper extends \Magento\Framework\DB\Helper diff --git a/app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml b/app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml index f8be02c6c7a..4e6c669d1d9 100644 --- a/app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml +++ b/app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <!-- TODO: refactor form styles and js --> <div class="fade backup-dialog" id="rollback-warning" style="display: none;"> diff --git a/app/code/Magento/Backup/view/adminhtml/templates/backup/list.phtml b/app/code/Magento/Backup/view/adminhtml/templates/backup/list.phtml index 4890801d06c..a3b9a3914db 100644 --- a/app/code/Magento/Backup/view/adminhtml/templates/backup/list.phtml +++ b/app/code/Magento/Backup/view/adminhtml/templates/backup/list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml('grid') ?> <?php echo $this->getGridHtml() ?> diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php index 46398975c1e..0463025dcd3 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab; /** diff --git a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php index 5b33daae698..fa1c03557ce 100644 --- a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php +++ b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Bundle\Block\Catalog\Product\View\Type\Bundle; use Magento\Bundle\Model\Product\Price; diff --git a/app/code/Magento/Bundle/Model/Product/Type.php b/app/code/Magento/Bundle/Model/Product/Type.php index b4d55aeaf03..0a4d6b5ad58 100644 --- a/app/code/Magento/Bundle/Model/Product/Type.php +++ b/app/code/Magento/Bundle/Model/Product/Type.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Bundle\Model\Product; use Magento\Catalog\Api\ProductRepositoryInterface; diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php index 6ee362083a2..cebcbdca199 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Bundle\Model\Sales\Order\Pdf\Items; /** diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/bundle.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/bundle.phtml index 0dd8f47a45b..17e2d92d6b4 100644 --- a/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/bundle.phtml +++ b/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/bundle.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Bundle */ ?> diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/checkbox.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/checkbox.phtml index e0279995200..35ded4722e6 100644 --- a/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/checkbox.phtml +++ b/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/checkbox.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type\Checkbox */ ?> <?php $_option = $this->getOption(); ?> diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/multi.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/multi.phtml index bdcb14c80da..d89b7bd1648 100644 --- a/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/multi.phtml +++ b/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/multi.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type\Multi */ ?> <?php $_option = $this->getOption(); ?> diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/radio.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/radio.phtml index c532c260a86..7ff5ed32228 100644 --- a/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/radio.phtml +++ b/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/radio.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type\Radio */ ?> <?php $_option = $this->getOption(); ?> diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/select.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/select.phtml index b45d981208d..85c4547b905 100644 --- a/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/select.phtml +++ b/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/select.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type\Select */ ?> <?php $_option = $this->getOption(); ?> diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle.phtml index a1fd8483e06..d93b48fabef 100644 --- a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle.phtml +++ b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle */ ?> <script type="text/javascript"> diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml index 766cfdb8d4a..778654be471 100644 --- a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml +++ b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option */ ?> <script id="bundle-option-template" type="text/x-jquery-tmpl"> diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml index da53c811c3d..e63a8d0e95f 100644 --- a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml +++ b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option\Selection */ ?> <script id="bundle-option-selection-box-template" type="text/x-jquery-tmpl"> diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/create/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/create/items/renderer.phtml index 5d1546a0df4..b0416116999 100644 --- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/create/items/renderer.phtml +++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/create/items/renderer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/view/items/renderer.phtml index 8c67f2dc070..38b53ce60bf 100644 --- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/view/items/renderer.phtml +++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/view/items/renderer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml index fa85a07d579..bfc0b754349 100644 --- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml +++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/view/items/renderer.phtml index f3c032c5655..7ab0c1b6505 100644 --- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/view/items/renderer.phtml +++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/view/items/renderer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml index 29db5b5ff2b..61b24d168ef 100644 --- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml +++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/create/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/create/items/renderer.phtml index 8ad4f69c737..ab052a6a6e4 100644 --- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/create/items/renderer.phtml +++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/create/items/renderer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/view/items/renderer.phtml index d8476a41d4b..3f6e78c5a60 100644 --- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/view/items/renderer.phtml +++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/view/items/renderer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Bundle/view/base/templates/product/price/final_price.phtml b/app/code/Magento/Bundle/view/base/templates/product/price/final_price.phtml index a31e68636bd..8f35800e308 100644 --- a/app/code/Magento/Bundle/view/base/templates/product/price/final_price.phtml +++ b/app/code/Magento/Bundle/view/base/templates/product/price/final_price.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Bundle/view/base/templates/product/price/selection/amount.phtml b/app/code/Magento/Bundle/view/base/templates/product/price/selection/amount.phtml index b13e56552ea..d6ba3e02b2d 100644 --- a/app/code/Magento/Bundle/view/base/templates/product/price/selection/amount.phtml +++ b/app/code/Magento/Bundle/view/base/templates/product/price/selection/amount.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Framework\Pricing\Render\Amount $this */ ?> diff --git a/app/code/Magento/Bundle/view/base/templates/product/price/tier_prices.phtml b/app/code/Magento/Bundle/view/base/templates/product/price/tier_prices.phtml index 314e7f89b79..5f4256ad9ae 100644 --- a/app/code/Magento/Bundle/view/base/templates/product/price/tier_prices.phtml +++ b/app/code/Magento/Bundle/view/base/templates/product/price/tier_prices.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/customize.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/customize.phtml index 3fc03996788..9764d20c754 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/customize.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/customize.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_product = $this->getProduct() ?> diff --git a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/summary.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/summary.phtml index fe40024dc8c..f76861cabc4 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/summary.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/summary.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle.phtml index af04e619c3e..6b9ebcde339 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /* @var $this \Magento\Bundle\Block\Catalog\Product\View\Type\Bundle */ ?> <?php $_product = $this->getProduct() ?> @@ -17,4 +19,4 @@ </p> <?php endif; ?> <?php endif; ?> -<?php echo $this->getChildHtml('bundle_prices') ?> \ No newline at end of file +<?php echo $this->getChildHtml('bundle_prices') ?> diff --git a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/checkbox.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/checkbox.phtml index bde619ee0bb..1c0aae577ce 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/checkbox.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/checkbox.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Checkbox */ ?> diff --git a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/multi.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/multi.phtml index 1038c70641a..04552c6ccbe 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/multi.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/multi.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Multi */ ?> <?php $_option = $this->getOption() ?> diff --git a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/radio.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/radio.phtml index 836287f629b..88b08b469da 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/radio.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/radio.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Radio */ ?> <?php $_option = $this->getOption(); ?> diff --git a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/select.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/select.phtml index b549558dd5a..d7bcf671ad1 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/select.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/select.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Select */ ?> diff --git a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/options.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/options.phtml index 36081fadf10..ed9dbc49d44 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/options.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/options.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this Magento\Bundle\Block\Catalog\Product\View\Type\Bundle */ ?> <?php diff --git a/app/code/Magento/Bundle/view/frontend/templates/email/order/items/creditmemo/default.phtml b/app/code/Magento/Bundle/view/frontend/templates/email/order/items/creditmemo/default.phtml index 6e876c6da53..a8347ee82dd 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/email/order/items/creditmemo/default.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/email/order/items/creditmemo/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Bundle\Block\Sales\Order\Items\Renderer */ ?> <?php $parentItem = $this->getItem() ?> diff --git a/app/code/Magento/Bundle/view/frontend/templates/email/order/items/invoice/default.phtml b/app/code/Magento/Bundle/view/frontend/templates/email/order/items/invoice/default.phtml index 6389bf74e61..1ae97068724 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/email/order/items/invoice/default.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/email/order/items/invoice/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Bundle\Block\Sales\Order\Items\Renderer */ ?> diff --git a/app/code/Magento/Bundle/view/frontend/templates/email/order/items/order/default.phtml b/app/code/Magento/Bundle/view/frontend/templates/email/order/items/order/default.phtml index cc49ed9047d..275273b525c 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/email/order/items/order/default.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/email/order/items/order/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Bundle\Block\Sales\Order\Items\Renderer */ ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/Bundle/view/frontend/templates/email/order/items/shipment/default.phtml b/app/code/Magento/Bundle/view/frontend/templates/email/order/items/shipment/default.phtml index ec997a63f52..7e371c79912 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/email/order/items/shipment/default.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/email/order/items/shipment/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $parentItem = $this->getItem() ?> diff --git a/app/code/Magento/Bundle/view/frontend/templates/js/components.phtml b/app/code/Magento/Bundle/view/frontend/templates/js/components.phtml index 5c84082b62f..e5fab539878 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/js/components.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml() ?> diff --git a/app/code/Magento/Bundle/view/frontend/templates/sales/order/creditmemo/items/renderer.phtml b/app/code/Magento/Bundle/view/frontend/templates/sales/order/creditmemo/items/renderer.phtml index cb1d9bf17c6..9d21951fe9b 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/sales/order/creditmemo/items/renderer.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/sales/order/creditmemo/items/renderer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Bundle\Block\Sales\Order\Items\Renderer */ ?> <?php $parentItem = $this->getItem() ?> diff --git a/app/code/Magento/Bundle/view/frontend/templates/sales/order/invoice/items/renderer.phtml b/app/code/Magento/Bundle/view/frontend/templates/sales/order/invoice/items/renderer.phtml index 04de3e5afcb..e6c4c28e7e9 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/sales/order/invoice/items/renderer.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/sales/order/invoice/items/renderer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Bundle\Block\Sales\Order\Items\Renderer */ ?> <?php $parentItem = $this->getItem() ?> diff --git a/app/code/Magento/Bundle/view/frontend/templates/sales/order/items/renderer.phtml b/app/code/Magento/Bundle/view/frontend/templates/sales/order/items/renderer.phtml index e2f2383d9a4..737e8ecc84c 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/sales/order/items/renderer.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/sales/order/items/renderer.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Bundle\Block\Sales\Order\Items\Renderer */ ?> <?php $parentItem = $this->getItem() ?> diff --git a/app/code/Magento/Bundle/view/frontend/templates/sales/order/shipment/items/renderer.phtml b/app/code/Magento/Bundle/view/frontend/templates/sales/order/shipment/items/renderer.phtml index d78f0ea882d..2f903f002a6 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/sales/order/shipment/items/renderer.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/sales/order/shipment/items/renderer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $parentItem = $this->getItem() ?> <?php $items = array_merge([$parentItem->getOrderItem()], $parentItem->getOrderItem()->getChildrenItems()) ?> diff --git a/app/code/Magento/Captcha/Model/Config/Form/AbstractForm.php b/app/code/Magento/Captcha/Model/Config/Form/AbstractForm.php index 178349437c2..36ef651548f 100644 --- a/app/code/Magento/Captcha/Model/Config/Form/AbstractForm.php +++ b/app/code/Magento/Captcha/Model/Config/Form/AbstractForm.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Data source to fill "Forms" field * diff --git a/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml b/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml index 157363d6dfd..a9df7ca92e5 100644 --- a/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml +++ b/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $captcha \Magento\Captcha\Model\DefaultModel */ ?> <?php /* @var $this \Magento\Captcha\Block\Captcha\DefaultCaptcha */ ?> diff --git a/app/code/Magento/Captcha/view/frontend/templates/default.phtml b/app/code/Magento/Captcha/view/frontend/templates/default.phtml index 469409aca6c..6ad86a35ccc 100644 --- a/app/code/Magento/Captcha/view/frontend/templates/default.phtml +++ b/app/code/Magento/Captcha/view/frontend/templates/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $captcha \Magento\Captcha\Model\DefaultModel */ ?> <?php /* @var $this \Magento\Captcha\Block\Captcha\DefaultCaptcha */ ?> diff --git a/app/code/Magento/Captcha/view/frontend/templates/js/components.phtml b/app/code/Magento/Captcha/view/frontend/templates/js/components.phtml index 5c84082b62f..e5fab539878 100644 --- a/app/code/Magento/Captcha/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Captcha/view/frontend/templates/js/components.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml() ?> diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php index 9abf8ed3f23..a582b3c2f75 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Categories tree block */ diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php index a266bae27ad..4ab06353511 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Product attribute add/edit form main tab * diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php index 7dd12041a74..142ca258035 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Adminhtml catalog product edit action attributes update tab block * diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts.php index c3b53c1f3f4..27feb11a253 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Product alerts tab * diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php index 5850fc36e56..8fd26c84e9f 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Customers defined options */ diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php index e0eec0d5ba6..21a606eabf2 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Block\Adminhtml\Product\Helper\Form; use Magento\Catalog\Model\Resource\Category\Collection; diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php index c62ed8ef09f..5e67c7ca356 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Catalog product gallery attribute diff --git a/app/code/Magento/Catalog/Block/Breadcrumbs.php b/app/code/Magento/Catalog/Block/Breadcrumbs.php index 80087dcc281..93b564e7f6b 100644 --- a/app/code/Magento/Catalog/Block/Breadcrumbs.php +++ b/app/code/Magento/Catalog/Block/Breadcrumbs.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Catalog breadcrumbs */ diff --git a/app/code/Magento/Catalog/Block/Navigation.php b/app/code/Magento/Catalog/Block/Navigation.php index 7ffe52b6eb4..85c13303864 100644 --- a/app/code/Magento/Catalog/Block/Navigation.php +++ b/app/code/Magento/Catalog/Block/Navigation.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Block; use Magento\Catalog\Model\Category; diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Related.php b/app/code/Magento/Catalog/Block/Product/ProductList/Related.php index ac48c37b377..af53df1c0b6 100644 --- a/app/code/Magento/Catalog/Block/Product/ProductList/Related.php +++ b/app/code/Magento/Catalog/Block/Product/ProductList/Related.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Block\Product\ProductList; use Magento\Catalog\Model\Resource\Product\Collection; diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php b/app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php index 249c016154e..06e9c320caf 100644 --- a/app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php +++ b/app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Block\Product\ProductList; use Magento\Catalog\Model\Resource\Product\Collection; diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute.php index b33bb614eb1..7a53121b985 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Controller\Adminhtml\Product\Action; use Magento\Backend\App\Action; diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php index c9875cf4773..2f9ebd97dcc 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Controller\Adminhtml\Product\Attribute; use Magento\Catalog\Model\Product\AttributeSet\AlreadyExistsException; diff --git a/app/code/Magento/Catalog/Helper/Product/ProductList.php b/app/code/Magento/Catalog/Helper/Product/ProductList.php index 5f4f62e5590..03e835ea40c 100644 --- a/app/code/Magento/Catalog/Helper/Product/ProductList.php +++ b/app/code/Magento/Catalog/Helper/Product/ProductList.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Helper\Product; /** diff --git a/app/code/Magento/Catalog/Helper/Product/View.php b/app/code/Magento/Catalog/Helper/Product/View.php index cae94027454..ee41828aa41 100644 --- a/app/code/Magento/Catalog/Helper/Product/View.php +++ b/app/code/Magento/Catalog/Helper/Product/View.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Helper\Product; use Magento\Framework\View\Result\Page as ResultPage; diff --git a/app/code/Magento/Catalog/Model/Config.php b/app/code/Magento/Catalog/Model/Config.php index c952319dd55..9aa94feeab0 100644 --- a/app/code/Magento/Catalog/Model/Config.php +++ b/app/code/Magento/Catalog/Model/Config.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model; /** diff --git a/app/code/Magento/Catalog/Model/Factory.php b/app/code/Magento/Catalog/Model/Factory.php index 3927fba5c60..61c2cc9491e 100644 --- a/app/code/Magento/Catalog/Model/Factory.php +++ b/app/code/Magento/Catalog/Model/Factory.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Model factory */ diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Flat/AbstractAction.php b/app/code/Magento/Catalog/Model/Indexer/Category/Flat/AbstractAction.php index a3d2ef62ea8..8a0614e3d6b 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Flat/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Flat/AbstractAction.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Indexer\Category\Flat; class AbstractAction diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php b/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php index 9df68e4fc9a..eb2a59bebe1 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Indexer\Category\Product; abstract class AbstractAction diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/IndexerState.php b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/IndexerState.php index e736c9f96bc..495b5e0b7a4 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/IndexerState.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/IndexerState.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Indexer\Category\Product\Plugin; class IndexerState diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/MviewState.php b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/MviewState.php index 34c2d865fd4..a70c1d0a12c 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/MviewState.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/MviewState.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Indexer\Category\Product\Plugin; class MviewState diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Plugin/Store.php b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Plugin/Store.php index a65361a3a7d..4110be1eb41 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Plugin/Store.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Plugin/Store.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Indexer\Product\Flat\Plugin; class Store diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Plugin/StoreGroup.php b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Plugin/StoreGroup.php index 10e7533aa7c..d53ddfbbb09 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Plugin/StoreGroup.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Plugin/StoreGroup.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Indexer\Product\Flat\Plugin; class StoreGroup diff --git a/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/AlgorithmFactory.php b/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/AlgorithmFactory.php index 3a6fb7f72a7..3df515c872b 100644 --- a/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/AlgorithmFactory.php +++ b/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/AlgorithmFactory.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Layer\Filter\Dynamic; use Magento\Framework\App\Config\ScopeConfigInterface; diff --git a/app/code/Magento/Catalog/Model/Layer/Filter/Item.php b/app/code/Magento/Catalog/Model/Layer/Filter/Item.php index 3e9985cbc88..d5646809665 100644 --- a/app/code/Magento/Catalog/Model/Layer/Filter/Item.php +++ b/app/code/Magento/Catalog/Model/Layer/Filter/Item.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Filter item model * diff --git a/app/code/Magento/Catalog/Model/Layer/Filter/Price.php b/app/code/Magento/Catalog/Model/Layer/Filter/Price.php index 30502703baa..6025d2020a7 100644 --- a/app/code/Magento/Catalog/Model/Layer/Filter/Price.php +++ b/app/code/Magento/Catalog/Model/Layer/Filter/Price.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Layer\Filter; /** diff --git a/app/code/Magento/Catalog/Model/Product/Action.php b/app/code/Magento/Catalog/Model/Product/Action.php index f978227925c..e4c7a7882bb 100644 --- a/app/code/Magento/Catalog/Model/Product/Action.php +++ b/app/code/Magento/Catalog/Model/Product/Action.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product; /** diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractGroupprice.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractGroupprice.php index 2f07f6ea542..e02c9c5b9f2 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractGroupprice.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractGroupprice.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product\Attribute\Backend\Groupprice; use Magento\Catalog\Model\Product\Attribute\Backend\Price; diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Sku.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Sku.php index ed176345402..b52d4a19c20 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Sku.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Sku.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Catalog product SKU backend attribute model * diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Source/Inputtype.php b/app/code/Magento/Catalog/Model/Product/Attribute/Source/Inputtype.php index b47b04bbbba..da5d9604f8b 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Source/Inputtype.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Source/Inputtype.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Product attribute source input types */ diff --git a/app/code/Magento/Catalog/Model/Product/Media/Config.php b/app/code/Magento/Catalog/Model/Product/Media/Config.php index b43d5ad77d5..a861e329155 100644 --- a/app/code/Magento/Catalog/Model/Product/Media/Config.php +++ b/app/code/Magento/Catalog/Model/Product/Media/Config.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product\Media; /** diff --git a/app/code/Magento/Catalog/Model/Product/Option.php b/app/code/Magento/Catalog/Model/Product/Option.php index cdc0c608ba6..5bef8a350a7 100644 --- a/app/code/Magento/Catalog/Model/Product/Option.php +++ b/app/code/Magento/Catalog/Model/Product/Option.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product; use Magento\Catalog\Api\Data\ProductCustomOptionValuesInterface; diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php b/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php index 76a465081d4..bea3ab26db0 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product\Option\Type; use Magento\Framework\Model\Exception; diff --git a/app/code/Magento/Catalog/Model/Product/Option/Value.php b/app/code/Magento/Catalog/Model/Product/Option/Value.php index c412c77f588..af2b8d26f0b 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Value.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Value.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product\Option; use Magento\Framework\Model\AbstractExtensibleModel; diff --git a/app/code/Magento/Catalog/Model/Product/TypeTransitionManager.php b/app/code/Magento/Catalog/Model/Product/TypeTransitionManager.php index 621f518e169..45666da1e25 100644 --- a/app/code/Magento/Catalog/Model/Product/TypeTransitionManager.php +++ b/app/code/Magento/Catalog/Model/Product/TypeTransitionManager.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product; use Magento\Catalog\Model\Product; diff --git a/app/code/Magento/Catalog/Model/Product/Website.php b/app/code/Magento/Catalog/Model/Product/Website.php index 74839de58ff..b4fb2e1934b 100644 --- a/app/code/Magento/Catalog/Model/Product/Website.php +++ b/app/code/Magento/Catalog/Model/Product/Website.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Catalog Product Website Model * diff --git a/app/code/Magento/Catalog/Model/Resource/AbstractResource.php b/app/code/Magento/Catalog/Model/Resource/AbstractResource.php index ecb67e61160..0cd1293c0b0 100644 --- a/app/code/Magento/Catalog/Model/Resource/AbstractResource.php +++ b/app/code/Magento/Catalog/Model/Resource/AbstractResource.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Resource; use Magento\Eav\Model\Entity\Attribute\AbstractAttribute; diff --git a/app/code/Magento/Catalog/Model/Resource/Eav/Attribute.php b/app/code/Magento/Catalog/Model/Resource/Eav/Attribute.php index da3f8ce04f1..ad80534edaa 100644 --- a/app/code/Magento/Catalog/Model/Resource/Eav/Attribute.php +++ b/app/code/Magento/Catalog/Model/Resource/Eav/Attribute.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Resource\Eav; use Magento\Catalog\Model\Attribute\LockValidatorInterface; diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Backend/Media.php b/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Backend/Media.php index 267a3afc26c..d9aeeb2f1ff 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Backend/Media.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Backend/Media.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Resource\Product\Attribute\Backend; /** diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Collection.php b/app/code/Magento/Catalog/Model/Resource/Product/Collection.php index cc0bb42dd95..d2c0f43e208 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Collection.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Collection.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Resource\Product; use Magento\Catalog\Model\Product\Attribute\Source\Status as ProductStatus; diff --git a/app/code/Magento/Catalog/Model/Template/Filter.php b/app/code/Magento/Catalog/Model/Template/Filter.php index 5ef2dab0e02..0571d9de7ab 100644 --- a/app/code/Magento/Catalog/Model/Template/Filter.php +++ b/app/code/Magento/Catalog/Model/Template/Filter.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Catalog Template Filter Model * diff --git a/app/code/Magento/Catalog/Model/Template/Filter/Factory.php b/app/code/Magento/Catalog/Model/Template/Filter/Factory.php index 0148b6d711c..669d4aa5df2 100644 --- a/app/code/Magento/Catalog/Model/Template/Filter/Factory.php +++ b/app/code/Magento/Catalog/Model/Template/Filter/Factory.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Template filter factory */ diff --git a/app/code/Magento/Catalog/Pricing/Price/TierPrice.php b/app/code/Magento/Catalog/Pricing/Price/TierPrice.php index 757eb4dd4f1..6d7cd1e6b81 100644 --- a/app/code/Magento/Catalog/Pricing/Price/TierPrice.php +++ b/app/code/Magento/Catalog/Pricing/Price/TierPrice.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Pricing\Price; use Magento\Catalog\Model\Product; diff --git a/app/code/Magento/Catalog/data/catalog_setup/data-install-2.0.0.php b/app/code/Magento/Catalog/data/catalog_setup/data-install-2.0.0.php index 07df76dfd8c..25875da59ea 100644 --- a/app/code/Magento/Catalog/data/catalog_setup/data-install-2.0.0.php +++ b/app/code/Magento/Catalog/data/catalog_setup/data-install-2.0.0.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $installer \Magento\Catalog\Model\Resource\Setup */ $installer = $this; $installer->installEntities(); diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/checkboxes/tree.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/checkboxes/tree.phtml index 5fbb102415a..1bdf23fe3d5 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/checkboxes/tree.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/checkboxes/tree.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_divId = 'tree-div_' . time() ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit.phtml index d1d3ec2b114..a007d61db67 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit/form.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit/form.phtml index 7e1c69ed49a..6e0c141cd02 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit/form.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit/form.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var \Magento\Catalog\Block\Adminhtml\Category\Edit\Form $this */ $parentId = $this->getParentCategoryId(); $categoryId = $this->getCategoryId(); diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml index 456b61cbb17..bef46bb34f1 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="categories-side-col"> <div class="sidebar-actions"> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/widget/tree.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/widget/tree.phtml index c66b2cf0b17..f05d74712e8 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/widget/tree.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/widget/tree.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_divId = 'tree' . $this->getId() ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/form/renderer/fieldset/element.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/form/renderer/fieldset/element.phtml index eb2a991cbbf..d977abdcaaf 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/form/renderer/fieldset/element.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/form/renderer/fieldset/element.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product.phtml index f3e140ef620..a2f06c803a3 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/form.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/form.phtml index 3249103e9fa..e47439652c9 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/form.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/js.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/js.phtml index ed16b596237..dc9f97436f8 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/js.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/js.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <script type="text/javascript"> require(["jquery", "js/theme", "prototype"], function(jQuery){ diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/labels.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/labels.phtml index 2f074979ba1..dc697e8074f 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/labels.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/labels.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var $this \Magento\Eav\Block\Adminhtml\Attribute\Edit\Options\Labels */ ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml index 2ed20b3a563..01965c083f4 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var $this \Magento\Eav\Block\Adminhtml\Attribute\Edit\Options\Options */ ?> <fieldset class="fieldset"> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml index ffd8c32625d..54a1ca3e820 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="attribute-set"> <div class="edit-attribute-set attribute-set-col"> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/toolbar/main.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/toolbar/main.phtml index d446e7eaee5..26850ee918e 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/toolbar/main.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/toolbar/main.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml('grid') ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml index da52b2f3579..fce93c1ee4c 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div id="product_composite_configure" class="product-configure-popup" style="display:none;"> <iframe name="product_composite_configure_iframe" id="product_composite_configure_iframe" style="width:0; height:0; border:0px solid #fff; position:absolute; top:-1000px; left:-1000px" onload="window.productConfigure && productConfigure.onLoadIFrame()"></iframe> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options.phtml index 6ab4ee7c165..c6b6dc0bffc 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Catalog\Block\Adminhtml\Product\Composite\Fieldset\Options */ ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/date.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/date.phtml index 4b84adec046..7444e1931a3 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/date.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/date.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Catalog\Block\Product\View\Options\Type\Date */ ?> <?php $_option = $this->getOption(); ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml index b208c2b5a63..2b03d05a3cc 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_option = $this->getOption(); ?> <?php $_fileInfo = $this->getFileInfo(); ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/select.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/select.phtml index 68b668b44ec..83a9ec12657 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/select.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/select.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Catalog\Block\Product\View\Options\Type\Select */ ?> <?php $_option = $this->getOption(); ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/text.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/text.phtml index 0fc119948ce..4cd7063ece9 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/text.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/text.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Catalog\Block\Product\View\Options\Type\Text */ ?> <?php $_option = $this->getOption(); ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/qty.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/qty.phtml index 889740de6f8..ad72399f666 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/qty.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/qty.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Catalog\Block\Adminhtml\Product\Composite\Fieldset\Qty */ ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit.phtml index af9c18595b2..e1d846e01af 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/attribute.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/attribute.phtml index cf9a8a37057..1b7f2d6d4f6 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/attribute.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/attribute.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <form action="<?php echo $this->getSaveUrl() ?>" method="post" id="attributes-edit-form" class="attributes-edit-form" enctype="multipart/form-data"> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/inventory.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/inventory.phtml index 9480035933a..2328dd37211 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/inventory.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/inventory.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <script type="text/javascript"> require(['jquery'], function($){ diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/websites.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/websites.phtml index a02b8c7e7d6..4bbaa64001c 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/websites.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/websites.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="fieldset-wrapper" id="add-products-to-website-wrapper"> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml index 4507fa43ba0..73e1d702c27 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Catalog\Block\Adminhtml\Product\Edit\AttributeSet */ ?> <script id="product-template-selector-template" type="text/x-jquery-tmpl"> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options.phtml index a1b60b7b5c5..1da0c734b85 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options */ ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml index fe1ff5237a0..f252d700a83 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Option */ ?> <?php echo $this->getTemplatesHtml() ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/date.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/date.phtml index 15705121dad..7946f0b44b7 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/date.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/date.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Type\Date */ ?> <script id="custom-option-date-type-template" type="text/x-jquery-tmpl"> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/file.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/file.phtml index 1cf4ad82515..0d4026c0491 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/file.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/file.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Type\File */ ?> <script id="custom-option-file-type-template" type="text/x-jquery-tmpl"> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/select.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/select.phtml index 741c71d74ab..1bf1389819e 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/select.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/select.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Type\Select */ ?> <script id="custom-option-select-type-template" type="text/x-jquery-tmpl"> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/text.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/text.phtml index 1d9434de61f..02ba5bf1bc5 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/text.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/text.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Type\Text */ ?> <script id="custom-option-text-type-template" type="text/x-jquery-tmpl"> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/group.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/group.phtml index 9d6f501719a..cbe8580f24e 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/group.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/group.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Price\Group */ diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml index e345090a9a9..42c0d7ec9ac 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Price\Tier */ $element = $this->getElement(); ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/serializer.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/serializer.phtml index 52771523afa..3468b76d56e 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/serializer.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/serializer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_id = 'id_' . md5(microtime()) ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/websites.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/websites.phtml index 736e32c1033..067914af181 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/websites.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/websites.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <fieldset id="grop_fields" class="fieldset"> <legend class="legend"><span><?php echo __('Product In Websites') ?></span></legend> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml index 7f8f17716dc..3c37d414813 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var $this \Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery\Content */ $elementName = $this->getElement()->getName() . '[images]'; ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/js.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/js.phtml index bedf2fe0214..4d0fa7c9030 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/js.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/js.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var \Magento\Catalog\Block\Adminhtml\Product\Edit\Js $this */ ?> <script type="text/javascript"> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/alert.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/alert.phtml index 61a542dd5e0..a9fe6c4aef7 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/alert.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/alert.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/inventory.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/inventory.phtml index 6f7f4a94f2d..9df7cd82110 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/inventory.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/inventory.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var $this \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Inventory */ ?> <?php if ($this->isReadonly()): ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/wysiwyg/js.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/wysiwyg/js.phtml index 6bfb7af0965..ece0322a310 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/wysiwyg/js.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/wysiwyg/js.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <script type="text/javascript"> require([ diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml index 8047a950b64..3b7bb0cbcef 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attributes\Search */ ?> <div id="product-attribute-search-container" class="suggest-expandable attribute-selector"> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/tabs.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/tabs.phtml index 6a8eb1c0afd..351464c8c55 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/tabs.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/tabs.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Catalog\Block\Adminhtml\Product\Edit\Tabs */ ?> <?php if (!empty($tabs)): ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/product/grid/massaction_extended.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/product/grid/massaction_extended.phtml index 13a2e60bcc7..fe02f311816 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/product/grid/massaction_extended.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/product/grid/massaction_extended.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * @deprecated support Magento 1.x grid massaction implementation (MAGETWO-11122) */ diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/rss/grid/link.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/rss/grid/link.phtml index cf96940fd96..45ba60e26cf 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/rss/grid/link.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/rss/grid/link.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Catalog\Block\Adminhtml\Rss\Grid\Link */ ?> <?php if ($this->isRssAllowed() && $this->getLink()): ?> diff --git a/app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml index d28cbe9ddf3..bc854d00047 100644 --- a/app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml +++ b/app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Framework\Pricing\Render\Amount $this */ ?> diff --git a/app/code/Magento/Catalog/view/base/templates/product/price/amount/option.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/amount/option.phtml index b764824a41a..f0d8221f2f4 100644 --- a/app/code/Magento/Catalog/view/base/templates/product/price/amount/option.phtml +++ b/app/code/Magento/Catalog/view/base/templates/product/price/amount/option.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Framework\Pricing\Render\Amount $this */ diff --git a/app/code/Magento/Catalog/view/base/templates/product/price/default.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/default.phtml index 5d4a9db17c2..06c0c98e84a 100644 --- a/app/code/Magento/Catalog/view/base/templates/product/price/default.phtml +++ b/app/code/Magento/Catalog/view/base/templates/product/price/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Catalog/view/base/templates/product/price/final_price.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/final_price.phtml index 6bc29782f85..1443870da7a 100644 --- a/app/code/Magento/Catalog/view/base/templates/product/price/final_price.phtml +++ b/app/code/Magento/Catalog/view/base/templates/product/price/final_price.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Catalog/view/base/templates/product/price/tier_prices.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/tier_prices.phtml index 82d3149d268..a7dd12fb2e8 100644 --- a/app/code/Magento/Catalog/view/base/templates/product/price/tier_prices.phtml +++ b/app/code/Magento/Catalog/view/base/templates/product/price/tier_prices.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Catalog/view/frontend/templates/category/cms.phtml b/app/code/Magento/Catalog/view/frontend/templates/category/cms.phtml index 8a47f406c2d..bb00ff2c77c 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/category/cms.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/category/cms.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/frontend/templates/category/description.phtml b/app/code/Magento/Catalog/view/frontend/templates/category/description.phtml index 57fe5194888..47c9960b434 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/category/description.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/category/description.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/frontend/templates/category/image.phtml b/app/code/Magento/Catalog/view/frontend/templates/category/image.phtml index 42bb865ebcf..49fe477fe87 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/category/image.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/category/image.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/frontend/templates/category/products.phtml b/app/code/Magento/Catalog/view/frontend/templates/category/products.phtml index 1f82ddb5298..daf00d660c7 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/category/products.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/category/products.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/frontend/templates/category/rss.phtml b/app/code/Magento/Catalog/view/frontend/templates/category/rss.phtml index 1e9e4478322..4555ad21e6d 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/category/rss.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/category/rss.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->isRssAllowed() && $this->getLink() && $this->isTopCategory()): ?> <a href="<?php echo $this->getLink() ?>" class="action link rss"><span><?php echo $this->getLabel() ?></span></a> diff --git a/app/code/Magento/Catalog/view/frontend/templates/category/view.phtml b/app/code/Magento/Catalog/view/frontend/templates/category/view.phtml index 619b6814ad6..9f8dd8e6a57 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/category/view.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/category/view.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/frontend/templates/js/components.phtml b/app/code/Magento/Catalog/view/frontend/templates/js/components.phtml index 5c84082b62f..e5fab539878 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/js/components.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml() ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/navigation/left.phtml b/app/code/Magento/Catalog/view/frontend/templates/navigation/left.phtml index 0b4492e4f8d..730bc394a6f 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/navigation/left.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/navigation/left.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Category left navigation * diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/compare/link.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/compare/link.phtml index 6a87380edfa..0561acac389 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/compare/link.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/compare/link.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Catalog\Block\Product\Compare\Sidebar */ ?> <?php diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml index abaf0c4a29b..662fe7fb95a 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Catalog\Block\Product\Compare\ListCompare */ ?> <?php $_total = $this->getItems()->getSize() ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/compare/sidebar.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/compare/sidebar.phtml index e808ca97ecc..42e95d39dd1 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/compare/sidebar.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/compare/sidebar.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Catalog\Block\Product\Compare\Sidebar */ ?> <?php diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/gallery.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/gallery.phtml index 2e8ceebe178..7bf71c84f5b 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/gallery.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/gallery.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_width = $this->getImageWidth(); ?> <div class="product-image-popup" style="width:<?php echo $_width; ?>px;"> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml index fd357f59d89..883733afa86 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml index 99b0a48846f..2cec2a9a7d1 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Catalog\Block\Product\AbstractProduct */ ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar.phtml index 7fa828ff6b5..4323e1af22f 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/amount.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/amount.phtml index f2cbd86b6b3..bda75f3544e 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/amount.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/amount.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/limiter.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/limiter.phtml index 07df6bdce7d..d9ed43e21ea 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/limiter.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/limiter.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/sorter.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/sorter.phtml index f07151ced50..f891b1f8549 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/sorter.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/sorter.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/viewmode.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/viewmode.phtml index 90e118bfc12..fea7eb31c09 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/viewmode.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/viewmode.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml index 6352a0a825c..180d1c0e2c9 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/additional.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/additional.phtml index 31d07ae91ac..49cbdd1266a 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/additional.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/additional.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php foreach ($this->getChildHtmlList() as $_html): ?> <?php echo $_html ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/addto.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/addto.phtml index 684fb0cbc3f..9edb3855782 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/addto.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/addto.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var $this \Magento\Catalog\Block\Product\View*/ ?> <?php diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/addtocart.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/addtocart.phtml index 3968a9a1bee..647322ac36a 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/addtocart.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/addtocart.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Catalog\Block\Product\View */ ?> <?php $_product = $this->getProduct(); ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/attribute.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/attribute.phtml index bb4f4797f3d..99898b9491f 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/attribute.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/attribute.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Product view template * diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/attributes.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/attributes.phtml index b48e3b0f41e..a735867c0eb 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/attributes.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/attributes.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Product additional attributes template * diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/base-image.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/base-image.phtml index 36d3e310f72..a644e02201e 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/base-image.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/base-image.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Product media data template * diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/description.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/description.phtml index 2d7896bf346..83b24ff62d0 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/description.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/description.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Product description template * diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/details.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/details.phtml index 4cbea0ba4fa..9e0c2f29d20 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/details.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/details.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($detailedInfoGroup = $this->getGroupChildNames('detailed_info', 'getChildHtml')):?> <div class="product info detailed"> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml index b2754ebd1d9..3a1505e640e 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Product view template * diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/mailto.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/mailto.phtml index baf782bf963..405e46469ca 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/mailto.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/mailto.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_product = $this->getProduct() ?> <?php if ($this->canEmailToFriend()): ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph/general.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph/general.phtml index e83d3e88b8a..2aea7a7b544 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph/general.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph/general.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Catalog\Block\Product\View */ ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/options.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options.phtml index dca61d0bb5a..4c9ba208d01 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/options.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/options.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Catalog\Block\Product\View\Options */ ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/date.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/date.phtml index 5ab93a09f9f..fcef64f933d 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/date.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/date.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_option = $this->getOption() ?> <?php $_optionId = $_option->getId() ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/default.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/default.phtml index f5960788749..3a6ade2f7c5 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/default.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_option = $this->getOption() ?> <div class="field"> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml index 69ac13c41ff..5ab64bda0c3 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_option = $this->getOption(); ?> <?php $_fileInfo = $this->getFileInfo(); ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/select.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/select.phtml index 9174ad001fc..71362df40c9 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/select.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/select.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Catalog\Block\Product\View\Options\Type\Select */ ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/text.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/text.phtml index 41707933556..3f18c8b8c55 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/text.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/text.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_option = $this->getOption(); diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/price_clone.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/price_clone.phtml index 7fc39b05695..e0ce434e672 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/price_clone.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/price_clone.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Catalog\Block\Product\AbstractProduct $this */ ?> <?php $_product = $this->getProduct() ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/review.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/review.phtml index ce96fe87bd9..9b2212deaf6 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/review.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/review.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Catalog\Block\Product\AbstractProduct */ ?> <?php echo $this->getReviewsSummaryHtml($this->getProduct(), false, true)?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/type/default.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/type/default.phtml index 7b6fe8501b0..676593b9774 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/type/default.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/type/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Catalog\Block\Product\View\AbstractView */?> <?php $_product = $this->getProduct() ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml index 5dda83c4eab..d7ba4083294 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?> <?php $imageBlock = $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Image');?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_images_list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_images_list.phtml index 7056f08948a..85f30c240a7 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_images_list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_images_list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?> <?php $imageBlock = $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Image'); ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_names_list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_names_list.phtml index 381c873ed35..a8534dd21ac 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_names_list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_names_list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?> <div class="block widget block-new-products-names"> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml index 11fbb9a7863..6d61fc02e55 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml index 6f6a5f85504..12a7c06ac5f 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index 0164b490e1c..27e4398ca11 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogImportExport\Model\Import; use Magento\Framework\App\Filesystem\DirectoryList; diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php index bb1c2245c6b..f60474bd854 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogImportExport\Model\Import\Product; /** diff --git a/app/code/Magento/CatalogImportExport/Model/Indexer/Category/Product/Plugin/Import.php b/app/code/Magento/CatalogImportExport/Model/Indexer/Category/Product/Plugin/Import.php index fb8f91a4efe..b5247dcd358 100644 --- a/app/code/Magento/CatalogImportExport/Model/Indexer/Category/Product/Plugin/Import.php +++ b/app/code/Magento/CatalogImportExport/Model/Indexer/Category/Product/Plugin/Import.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogImportExport\Model\Indexer\Category\Product\Plugin; class Import diff --git a/app/code/Magento/CatalogImportExport/Model/Indexer/Product/Category/Plugin/Import.php b/app/code/Magento/CatalogImportExport/Model/Indexer/Product/Category/Plugin/Import.php index 0f3ed1740f4..3213c142bc6 100644 --- a/app/code/Magento/CatalogImportExport/Model/Indexer/Product/Category/Plugin/Import.php +++ b/app/code/Magento/CatalogImportExport/Model/Indexer/Product/Category/Plugin/Import.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogImportExport\Model\Indexer\Product\Category\Plugin; class Import diff --git a/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item/StockItemCriteria.php b/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item/StockItemCriteria.php index 4b5081f75bc..b9ba31f0ad0 100644 --- a/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item/StockItemCriteria.php +++ b/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item/StockItemCriteria.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogInventory\Model\Resource\Stock\Item; use Magento\Framework\Data\AbstractCriteria; diff --git a/app/code/Magento/CatalogInventory/Model/Resource/Stock/Status/StockStatusCriteria.php b/app/code/Magento/CatalogInventory/Model/Resource/Stock/Status/StockStatusCriteria.php index 234e06f1fdf..f3296d0905a 100644 --- a/app/code/Magento/CatalogInventory/Model/Resource/Stock/Status/StockStatusCriteria.php +++ b/app/code/Magento/CatalogInventory/Model/Resource/Stock/Status/StockStatusCriteria.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogInventory\Model\Resource\Stock\Status; use Magento\Framework\Data\AbstractCriteria; diff --git a/app/code/Magento/CatalogInventory/Model/StockIndex.php b/app/code/Magento/CatalogInventory/Model/StockIndex.php index c7a1d895e09..21323b9aca2 100644 --- a/app/code/Magento/CatalogInventory/Model/StockIndex.php +++ b/app/code/Magento/CatalogInventory/Model/StockIndex.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogInventory\Model; use Magento\Catalog\Model\Product\Type as ProductType; diff --git a/app/code/Magento/CatalogInventory/Model/StockStateProvider.php b/app/code/Magento/CatalogInventory/Model/StockStateProvider.php index bb82b4c100f..3fdd864e82f 100644 --- a/app/code/Magento/CatalogInventory/Model/StockStateProvider.php +++ b/app/code/Magento/CatalogInventory/Model/StockStateProvider.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogInventory\Model; use Magento\Catalog\Model\ProductFactory; diff --git a/app/code/Magento/CatalogInventory/view/frontend/templates/qtyincrements.phtml b/app/code/Magento/CatalogInventory/view/frontend/templates/qtyincrements.phtml index 7409088b2bb..e2c061ce209 100644 --- a/app/code/Magento/CatalogInventory/view/frontend/templates/qtyincrements.phtml +++ b/app/code/Magento/CatalogInventory/view/frontend/templates/qtyincrements.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * @var $this \Magento\CatalogInventory\Block\Qtyincrements */ diff --git a/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/composite.phtml b/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/composite.phtml index ef447eddc5f..425ddbb1a21 100644 --- a/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/composite.phtml +++ b/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/composite.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * @var $this \Magento\CatalogInventory\Block\Stockqty\Composite */ diff --git a/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/default.phtml b/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/default.phtml index 062821a2898..c0a89544bf0 100644 --- a/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/default.phtml +++ b/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/default.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * @var $this \Magento\CatalogInventory\Block\Stockqty\DefaultStockqty */ diff --git a/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog.php b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog.php index 8851a48afd7..aff2d8c2903 100644 --- a/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog.php +++ b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Backend Catalog Price Rules controller * diff --git a/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/fieldset.phtml b/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/fieldset.phtml index d71ef901ced..ec5aeb9569f 100644 --- a/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/fieldset.phtml +++ b/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/fieldset.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_element = $this->getElement() ?> <div class="rule-tree"> diff --git a/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/form.phtml b/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/form.phtml index 7aef8857122..3716a316d20 100644 --- a/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/form.phtml +++ b/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="entry-edit rule-tree"> <?php echo $this->getFormHtml() ?> diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php b/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php index 678ffa8339b..431d8ab3822 100644 --- a/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php +++ b/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogSearch\Model\Resource\Search; /** diff --git a/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/form.phtml b/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/form.phtml index eea1f416d64..83516b2e332 100644 --- a/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/form.phtml +++ b/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/link.phtml b/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/link.phtml index ad6479f3e0c..8101d33fce5 100644 --- a/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/link.phtml +++ b/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/link.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var \Magento\CatalogSearch\Helper\Data $helper */ $helper = $this->helper('Magento\CatalogSearch\Helper\Data'); ?> diff --git a/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/result.phtml b/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/result.phtml index da9c8d96d66..7e28575267e 100644 --- a/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/result.phtml +++ b/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/result.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/CatalogSearch/view/frontend/templates/result.phtml b/app/code/Magento/CatalogSearch/view/frontend/templates/result.phtml index fbe2888a5ad..f15e1730f76 100644 --- a/app/code/Magento/CatalogSearch/view/frontend/templates/result.phtml +++ b/app/code/Magento/CatalogSearch/view/frontend/templates/result.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getResultCount()): ?> <?php echo $this->getChildHtml('tagged_product_list_rss_link'); ?> diff --git a/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php b/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php index c20e511bf7e..2cb2dcc7fef 100644 --- a/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php +++ b/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogWidget\Block\Product; /** diff --git a/app/code/Magento/CatalogWidget/view/adminhtml/templates/product/widget/conditions.phtml b/app/code/Magento/CatalogWidget/view/adminhtml/templates/product/widget/conditions.phtml index 5b368274432..f4d960c5954 100644 --- a/app/code/Magento/CatalogWidget/view/adminhtml/templates/product/widget/conditions.phtml +++ b/app/code/Magento/CatalogWidget/view/adminhtml/templates/product/widget/conditions.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $element = $this->getElement(); diff --git a/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml b/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml index 833bc4e70b6..6d2cb0a7f4e 100644 --- a/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml +++ b/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Centinel/Model/Config.php b/app/code/Magento/Centinel/Model/Config.php index 89cc104a3c5..6fbb3448561 100644 --- a/app/code/Magento/Centinel/Model/Config.php +++ b/app/code/Magento/Centinel/Model/Config.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Config centinel model */ diff --git a/app/code/Magento/Centinel/view/adminhtml/templates/authentication/complete.phtml b/app/code/Magento/Centinel/view/adminhtml/templates/authentication/complete.phtml index 43160f4f02b..28dbf71cc19 100644 --- a/app/code/Magento/Centinel/view/adminhtml/templates/authentication/complete.phtml +++ b/app/code/Magento/Centinel/view/adminhtml/templates/authentication/complete.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getIsProcessed()):?> <?php if ($this->getIsSuccess()):?> diff --git a/app/code/Magento/Centinel/view/adminhtml/templates/validation/form.phtml b/app/code/Magento/Centinel/view/adminhtml/templates/validation/form.phtml index 49669db1688..01a1cf3048d 100644 --- a/app/code/Magento/Centinel/view/adminhtml/templates/validation/form.phtml +++ b/app/code/Magento/Centinel/view/adminhtml/templates/validation/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="centinel"> diff --git a/app/code/Magento/Centinel/view/frontend/templates/authentication.phtml b/app/code/Magento/Centinel/view/frontend/templates/authentication.phtml index 17c213b1ae6..c5b9e07b338 100644 --- a/app/code/Magento/Centinel/view/frontend/templates/authentication.phtml +++ b/app/code/Magento/Centinel/view/frontend/templates/authentication.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getAuthenticationStart()):?> <div class="centinel" id="centinel-authenticate-block" data-mage-init='{"centinelAuthenticate": {"frameUrl": "<?php echo $this->getFrameUrl() ?>"}}'> diff --git a/app/code/Magento/Centinel/view/frontend/templates/authentication/complete.phtml b/app/code/Magento/Centinel/view/frontend/templates/authentication/complete.phtml index 7f5f86bcac4..4bd06d4f022 100644 --- a/app/code/Magento/Centinel/view/frontend/templates/authentication/complete.phtml +++ b/app/code/Magento/Centinel/view/frontend/templates/authentication/complete.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getIsProcessed()):?> <?php if ($this->getIsSuccess()):?> diff --git a/app/code/Magento/Centinel/view/frontend/templates/logo.phtml b/app/code/Magento/Centinel/view/frontend/templates/logo.phtml index 879143eefbf..37e3b437c2f 100644 --- a/app/code/Magento/Centinel/view/frontend/templates/logo.phtml +++ b/app/code/Magento/Centinel/view/frontend/templates/logo.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="field note <?php echo $this->getCode() ?> logos" id="<?php echo $this->getCode() ?>_centinel_logo"> <label class="label"><span><?php echo __('To ensure the security of your transactions') ?></span></label> diff --git a/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php b/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php index 77aa7bb122d..3ea6b78b24f 100644 --- a/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php +++ b/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Block\Cart\Item; use Magento\Framework\Pricing\PriceCurrencyInterface; diff --git a/app/code/Magento/Checkout/Block/Cart/Sidebar.php b/app/code/Magento/Checkout/Block/Cart/Sidebar.php index 6e08aebd3d7..e0cd7845470 100644 --- a/app/code/Magento/Checkout/Block/Cart/Sidebar.php +++ b/app/code/Magento/Checkout/Block/Cart/Sidebar.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Block\Cart; use Magento\Framework\View\Block\IdentityInterface; diff --git a/app/code/Magento/Checkout/Block/Cart/Sidebar/Totals.php b/app/code/Magento/Checkout/Block/Cart/Sidebar/Totals.php index 4fb64b5e0c8..58347d21e22 100644 --- a/app/code/Magento/Checkout/Block/Cart/Sidebar/Totals.php +++ b/app/code/Magento/Checkout/Block/Cart/Sidebar/Totals.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Block\Cart\Sidebar; use Magento\Checkout\Block\Cart\AbstractCart; diff --git a/app/code/Magento/Checkout/Block/Onepage/Failure.php b/app/code/Magento/Checkout/Block/Onepage/Failure.php index 860faeec8f1..ae0219acdc7 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Failure.php +++ b/app/code/Magento/Checkout/Block/Onepage/Failure.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Block\Onepage; class Failure extends \Magento\Framework\View\Element\Template diff --git a/app/code/Magento/Checkout/Block/Onepage/Progress.php b/app/code/Magento/Checkout/Block/Onepage/Progress.php index f500c66bcef..49450355472 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Progress.php +++ b/app/code/Magento/Checkout/Block/Onepage/Progress.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Block\Onepage; use Magento\Sales\Model\Quote\Address; diff --git a/app/code/Magento/Checkout/Controller/Cart/Add.php b/app/code/Magento/Checkout/Controller/Cart/Add.php index 805d58e89c5..1e5fbd4275b 100644 --- a/app/code/Magento/Checkout/Controller/Cart/Add.php +++ b/app/code/Magento/Checkout/Controller/Cart/Add.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Controller\Cart; use Magento\Catalog\Api\ProductRepositoryInterface; diff --git a/app/code/Magento/Checkout/Controller/Cart/Index.php b/app/code/Magento/Checkout/Controller/Cart/Index.php index 32d273a31fa..8c9805ee555 100644 --- a/app/code/Magento/Checkout/Controller/Cart/Index.php +++ b/app/code/Magento/Checkout/Controller/Cart/Index.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Controller\Cart; class Index extends \Magento\Checkout\Controller\Cart diff --git a/app/code/Magento/Checkout/Controller/Cart/UpdateItemOptions.php b/app/code/Magento/Checkout/Controller/Cart/UpdateItemOptions.php index 36d2d63ffad..757d23c111f 100644 --- a/app/code/Magento/Checkout/Controller/Cart/UpdateItemOptions.php +++ b/app/code/Magento/Checkout/Controller/Cart/UpdateItemOptions.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Controller\Cart; class UpdateItemOptions extends \Magento\Checkout\Controller\Cart diff --git a/app/code/Magento/Checkout/Controller/Cart/UpdatePost.php b/app/code/Magento/Checkout/Controller/Cart/UpdatePost.php index 314755827a7..9366b674a32 100644 --- a/app/code/Magento/Checkout/Controller/Cart/UpdatePost.php +++ b/app/code/Magento/Checkout/Controller/Cart/UpdatePost.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Controller\Cart; class UpdatePost extends \Magento\Checkout\Controller\Cart diff --git a/app/code/Magento/Checkout/Helper/Cart.php b/app/code/Magento/Checkout/Helper/Cart.php index 215468d34b6..15d27b62272 100644 --- a/app/code/Magento/Checkout/Helper/Cart.php +++ b/app/code/Magento/Checkout/Helper/Cart.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Helper; /** diff --git a/app/code/Magento/Checkout/Service/V1/Cart/WriteService.php b/app/code/Magento/Checkout/Service/V1/Cart/WriteService.php index 9fbaebf61f2..34d6f24fdf7 100644 --- a/app/code/Magento/Checkout/Service/V1/Cart/WriteService.php +++ b/app/code/Magento/Checkout/Service/V1/Cart/WriteService.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\Cart; use Magento\Authorization\Model\UserContextInterface; diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart.php b/app/code/Magento/Checkout/Service/V1/Data/Cart.php index 5e5903b6063..9cc064cafbc 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\Data; /** diff --git a/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteService.php b/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteService.php index c9b05597bc1..05af45dbde3 100644 --- a/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteService.php +++ b/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteService.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\PaymentMethod; use Magento\Checkout\Service\V1\Data\Cart\PaymentMethod\Builder; diff --git a/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceInterface.php index 4b4bca3c9fd..955486054ae 100644 --- a/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceInterface.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\PaymentMethod; /** diff --git a/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadService.php b/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadService.php index 0be80cdfd2e..06d04be8581 100644 --- a/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadService.php +++ b/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadService.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\ShippingMethod; use Magento\Checkout\Service\V1\Data\Cart\ShippingMethod; diff --git a/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteService.php b/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteService.php index 02c1ec0c48b..e435a5a9e93 100644 --- a/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteService.php +++ b/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteService.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\ShippingMethod; use Magento\Framework\Exception\CouldNotSaveException; diff --git a/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceInterface.php index fa77d39e24c..b3fe0664977 100644 --- a/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceInterface.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\ShippingMethod; /** diff --git a/app/code/Magento/Checkout/view/frontend/templates/button.phtml b/app/code/Magento/Checkout/view/frontend/templates/button.phtml index edd17cd6029..7ae40579920 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/button.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/button.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Checkout\Block\Onepage\Success */ ?> diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/additional/info.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/additional/info.phtml index e2e6512057a..3e477bc47ff 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/additional/info.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/additional/info.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/coupon.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/coupon.phtml index 569010cbbe3..da50fe7b163 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/coupon.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/coupon.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="block discount" id="block-discount" data-mage-init='{"collapsible":{"openedState": "active", "saveState": false}}'> <div class="title" data-role="title"> diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml index 73eb202b6a8..9ffbd839a8d 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Checkout\Block\Cart */ ?> <?php $mergedCells = ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices() ? 2 : 1); ?> diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/item/configure/updatecart.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/item/configure/updatecart.phtml index 0d5682e37e5..447c6635900 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/item/configure/updatecart.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/item/configure/updatecart.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Catalog\Block\Product\View */ ?> <?php $_product = $this->getProduct(); ?> 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 405c4e466df..5de80c8982c 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 @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Checkout\Block\Cart\Item\Renderer */ $_item = $this->getItem(); diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/item/price/sidebar.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/item/price/sidebar.phtml index 9547e113c94..772f3f2e6c3 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/item/price/sidebar.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/item/price/sidebar.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Checkout\Block\Item\Price\Renderer */ ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/methods.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/methods.phtml index ef22ef332b8..5c85077606f 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/methods.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/methods.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Checkout\Block\Cart */ diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml index 374146939ab..ded2c034cba 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Checkout\Block\Cart\Sidebar */ ?> <?php if ($this->getInList()): ?> diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml index aa931e8c923..bcef6cdebe8 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Checkout\Block\Cart\Shipping */ ?> <div class="block shipping" id="block-shipping" data-mage-init='{"collapsible":{"openedState": "active", "saveState": false}}'> diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/sidebar/default.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/sidebar/default.phtml index 216039991e1..0b59abc1840 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/sidebar/default.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/sidebar/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Checkout\Block\Cart\Item\Renderer */ diff --git a/app/code/Magento/Checkout/view/frontend/templates/item/price/row.phtml b/app/code/Magento/Checkout/view/frontend/templates/item/price/row.phtml index e8c4c8ec48f..422ce854d3c 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/item/price/row.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/item/price/row.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Checkout\Block\Item\Price\Renderer */ $_item = $this->getItem(); diff --git a/app/code/Magento/Checkout/view/frontend/templates/item/price/unit.phtml b/app/code/Magento/Checkout/view/frontend/templates/item/price/unit.phtml index a31091f4830..54c41431d37 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/item/price/unit.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/item/price/unit.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Checkout\Block\Item\Price\Renderer */ $_item = $this->getItem(); diff --git a/app/code/Magento/Checkout/view/frontend/templates/js/components.phtml b/app/code/Magento/Checkout/view/frontend/templates/js/components.phtml index 5c84082b62f..e5fab539878 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/js/components.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml() ?> diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml index 884047490b1..58d1d163bf3 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var \Magento\Checkout\Block\Onepage\Payment $_paymentBlock */ $_paymentBlock = $this->getLayout()->getBlock('checkout.onepage.payment'); ?> diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/billing.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/billing.phtml index e3ba09c0a7c..2b975d9d611 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/billing.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/billing.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var \Magento\Checkout\Block\Onepage\Billing $this */ ?> <form class="form billing" id="co-billing-form" data-hasrequired="<?php echo __('* Required Fields') ?>"> diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/failure.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/failure.phtml index e3c993483b0..74ed53707c5 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/failure.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/failure.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getRealOrderId()) : ?><p><?php echo __('Order #') . $this->getRealOrderId() ?></p><?php endif ?> <?php if ($error = $this->getErrorMessage()) : ?><p><?php echo $error ?></p><?php endif ?> diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/link.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/link.phtml index 43379c6513e..b9a69e47d40 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/link.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/link.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->isPossibleOnepageCheckout()):?> <button type="button" diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/login.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/login.phtml index d331ea8a907..4ca3d22364d 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/login.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/login.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/payment.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/payment.phtml index 6ee944452d7..dd4352f9f44 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/payment.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/payment.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <form id="co-payment-form" class="form payments"> <?php echo $this->getBlockHtml('formkey') ?> diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/payment/methods.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/payment/methods.phtml index 04aaf741f01..f463ab36c79 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/payment/methods.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/payment/methods.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/progress.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/progress.phtml index c0478e9a6d9..25e8651fd6a 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/progress.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/progress.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Checkout\Block\Onepage\Progress */ ?> <div class="opc-block-progress<?php if ($this->isStepComplete('billing')): ?> active<?php endif; ?><?php if ($this->isStepComplete('payment')): ?> order-review-step<?php endif; ?>"> diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/review/info.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/info.phtml index 00068e1f772..0ea79906d06 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/review/info.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/info.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Checkout\Block\Onepage\Review\Info */ ?> <?php echo $this->getChildHtml('items_before'); ?> diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item.phtml index 39e387775c5..a288c9198af 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this Magento\Checkout\Block\Cart\Item\Renderer */ $_item = $this->getItem(); diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item/price/row_excl_tax.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item/price/row_excl_tax.phtml index 2e63be53734..ce835ae7df4 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item/price/row_excl_tax.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item/price/row_excl_tax.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Checkout\Block\Item\Price\Renderer */ $_item = $this->getItem(); diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item/price/row_incl_tax.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item/price/row_incl_tax.phtml index 7dd4f879ae3..812ce6c3afe 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item/price/row_incl_tax.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item/price/row_incl_tax.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Checkout\Block\Item\Price\Renderer */ $_item = $this->getItem(); diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item/price/unit_excl_tax.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item/price/unit_excl_tax.phtml index f81da666b80..9450a550ede 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item/price/unit_excl_tax.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item/price/unit_excl_tax.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Checkout\Block\Item\Price\Renderer */ $_item = $this->getItem(); diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item/price/unit_incl_tax.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item/price/unit_incl_tax.phtml index 42682923008..655e9e9ed17 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item/price/unit_incl_tax.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item/price/unit_incl_tax.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Checkout\Block\Item\Price\Renderer */ $_item = $this->getItem(); diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/review/totals.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/totals.phtml index 8a74155302e..b66f06d8bcc 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/review/totals.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/totals.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * @see \Magento\Checkout\Block\Cart\Totals */ diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping.phtml index 59c0c325c73..bd06a70a72b 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <form class="form shipping address" id="co-shipping-form" data-hasrequired="<?php echo __('* Required Fields') ?>"> diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method.phtml index f453b269577..86fb17c6cd7 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <form class="form methods-shipping" id="co-shipping-method-form"> <div id="checkout-shipping-method-load"></div> diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method/additional.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method/additional.phtml index aa3470fc76d..073ed920f8c 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method/additional.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method/additional.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if (!$this->getQuote()->isVirtual()): ?> <?php echo $this->helper('Magento\GiftMessage\Helper\Message')->getInline('onepage_checkout', $this->getQuote(), $this->getDontDisplayContainer()) ?> diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method/available.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method/available.phtml index 005f29bee5e..344999996d1 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method/available.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method/available.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Checkout\Block\Onepage\Shipping\Method\Available */ ?> <?php $_shippingRateGroups = $this->getShippingRates(); ?> diff --git a/app/code/Magento/Checkout/view/frontend/templates/shipping/price.phtml b/app/code/Magento/Checkout/view/frontend/templates/shipping/price.phtml index ad4d53fe050..7948c4d0322 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/shipping/price.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/shipping/price.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Checkout\Block\Shipping\Price */ ?> diff --git a/app/code/Magento/Checkout/view/frontend/templates/success.phtml b/app/code/Magento/Checkout/view/frontend/templates/success.phtml index d3343a283af..e82375bbb3f 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/success.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/success.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Checkout\Block\Onepage\Success */ ?> <div class="checkout-success"> diff --git a/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml b/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml index 58dfaa9d881..bf4d35ac51d 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <tr class="totals"> <th colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotal()->getStyle() ?>" class="mark" scope="row"> diff --git a/app/code/Magento/Checkout/view/frontend/templates/total/nominal.phtml b/app/code/Magento/Checkout/view/frontend/templates/total/nominal.phtml index cf2381900e9..c1ea4a7873e 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/total/nominal.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/total/nominal.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Checkout\Block\Total\Nominal */ ?> <tr class="totals nominal"> diff --git a/app/code/Magento/CheckoutAgreements/Block/Agreements.php b/app/code/Magento/CheckoutAgreements/Block/Agreements.php index a9ebd6d2284..0fe31a67925 100644 --- a/app/code/Magento/CheckoutAgreements/Block/Agreements.php +++ b/app/code/Magento/CheckoutAgreements/Block/Agreements.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CheckoutAgreements\Block; class Agreements extends \Magento\Framework\View\Element\Template diff --git a/app/code/Magento/CheckoutAgreements/Model/Resource/Agreement.php b/app/code/Magento/CheckoutAgreements/Model/Resource/Agreement.php index b01a7ad2ac5..866ec3f1398 100644 --- a/app/code/Magento/CheckoutAgreements/Model/Resource/Agreement.php +++ b/app/code/Magento/CheckoutAgreements/Model/Resource/Agreement.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CheckoutAgreements\Model\Resource; /** diff --git a/app/code/Magento/CheckoutAgreements/Model/Resource/Agreement/Collection.php b/app/code/Magento/CheckoutAgreements/Model/Resource/Agreement/Collection.php index 3ed8a7fe901..80e4ab8c9a7 100644 --- a/app/code/Magento/CheckoutAgreements/Model/Resource/Agreement/Collection.php +++ b/app/code/Magento/CheckoutAgreements/Model/Resource/Agreement/Collection.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CheckoutAgreements\Model\Resource\Agreement; /** diff --git a/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadService.php b/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadService.php index dd14b0ea705..8e4f24f43cc 100644 --- a/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadService.php +++ b/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadService.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CheckoutAgreements\Service\V1\Agreement; use \Magento\CheckoutAgreements\Model\Resource\Agreement\CollectionFactory as AgreementCollectionFactory; diff --git a/app/code/Magento/CheckoutAgreements/view/frontend/templates/agreements.phtml b/app/code/Magento/CheckoutAgreements/view/frontend/templates/agreements.phtml index a1227bf951b..a0e86109c92 100644 --- a/app/code/Magento/CheckoutAgreements/view/frontend/templates/agreements.phtml +++ b/app/code/Magento/CheckoutAgreements/view/frontend/templates/agreements.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/CheckoutAgreements/view/frontend/templates/multishipping_agreements.phtml b/app/code/Magento/CheckoutAgreements/view/frontend/templates/multishipping_agreements.phtml index e901e40f403..23b5271e7e6 100644 --- a/app/code/Magento/CheckoutAgreements/view/frontend/templates/multishipping_agreements.phtml +++ b/app/code/Magento/CheckoutAgreements/view/frontend/templates/multishipping_agreements.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Cms/Block/Block.php b/app/code/Magento/Cms/Block/Block.php index d45bf1a9aa6..ba27904ea54 100644 --- a/app/code/Magento/Cms/Block/Block.php +++ b/app/code/Magento/Cms/Block/Block.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Cms\Block; /** diff --git a/app/code/Magento/Cms/Model/Resource/Page.php b/app/code/Magento/Cms/Model/Resource/Page.php index f0af2d9ca05..1597d315059 100644 --- a/app/code/Magento/Cms/Model/Resource/Page.php +++ b/app/code/Magento/Cms/Model/Resource/Page.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Cms\Model\Resource; /** diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage/Collection.php b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage/Collection.php index 8c59d142024..48d0f2d75ad 100644 --- a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage/Collection.php +++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage/Collection.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Cms\Model\Wysiwyg\Images\Storage; use Magento\Framework\App\Filesystem\DirectoryList; diff --git a/app/code/Magento/Cms/data/cms_setup/data-install-2.0.0.php b/app/code/Magento/Cms/data/cms_setup/data-install-2.0.0.php index f396184b430..fa6e663f4a0 100644 --- a/app/code/Magento/Cms/data/cms_setup/data-install-2.0.0.php +++ b/app/code/Magento/Cms/data/cms_setup/data-install-2.0.0.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Cms\Model\Resource\Setup */ $cmsPages = [ diff --git a/app/code/Magento/Cms/view/adminhtml/templates/browser/content.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/content.phtml index da746ded436..d1318d07c2b 100644 --- a/app/code/Magento/Cms/view/adminhtml/templates/browser/content.phtml +++ b/app/code/Magento/Cms/view/adminhtml/templates/browser/content.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var $this \Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Content */ ?> diff --git a/app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml index f779ba75e03..dc11c68432c 100644 --- a/app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml +++ b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var $this \Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Content\Files */ $_width = $this->getImagesWidth(); diff --git a/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml index 0be818bcc60..b3ee32e14a2 100644 --- a/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml +++ b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var $this \Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Content\Uploader */ ?> diff --git a/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml index 74748232596..0a6fff4a82f 100644 --- a/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml +++ b/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var \Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Tree $this */ ?> <div class="tree-panel" > diff --git a/app/code/Magento/Cms/view/adminhtml/templates/page/edit/form/renderer/content.phtml b/app/code/Magento/Cms/view/adminhtml/templates/page/edit/form/renderer/content.phtml index 3cafa1bf967..ad41e6bed92 100644 --- a/app/code/Magento/Cms/view/adminhtml/templates/page/edit/form/renderer/content.phtml +++ b/app/code/Magento/Cms/view/adminhtml/templates/page/edit/form/renderer/content.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_element = $this->getElement() ?> diff --git a/app/code/Magento/Cms/view/frontend/templates/content.phtml b/app/code/Magento/Cms/view/frontend/templates/content.phtml index 7f241022a4a..f416bf9ca60 100644 --- a/app/code/Magento/Cms/view/frontend/templates/content.phtml +++ b/app/code/Magento/Cms/view/frontend/templates/content.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $pageData->getPageContent(); ?> diff --git a/app/code/Magento/Cms/view/frontend/templates/meta.phtml b/app/code/Magento/Cms/view/frontend/templates/meta.phtml index f74344da0a3..8adf0a935f7 100644 --- a/app/code/Magento/Cms/view/frontend/templates/meta.phtml +++ b/app/code/Magento/Cms/view/frontend/templates/meta.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($pageData->getPageMetaKeywords()): ?> <meta name="keywords" content="<?php echo $pageData->getPageMetaKeywords() ?>"/> diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/set/js.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/set/js.phtml index c169df06e58..7344eab6908 100644 --- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/set/js.phtml +++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/set/js.phtml @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <script type="text/javascript"> require(['jquery'], function(){ diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/composite/fieldset/configurable.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/composite/fieldset/configurable.phtml index 3ddc6d13b00..4ed5f8ed10b 100644 --- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/composite/fieldset/configurable.phtml +++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/composite/fieldset/configurable.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\ConfigurableProduct\Block\Adminhtml\Product\Composite\Fieldset\Configurable */ ?> diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/attribute-js-template.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/attribute-js-template.phtml index c7206853b19..17ad9b344f2 100644 --- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/attribute-js-template.phtml +++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/attribute-js-template.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Framework\View\Element\Template */ ?> <script data-template-for="configurable-attribute" type="text/x-jquery-tmpl"> diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/attribute-template.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/attribute-template.phtml index 1e10e7be638..4c91bc84a12 100644 --- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/attribute-template.phtml +++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/attribute-template.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Framework\View\Element\Template */ $havePriceVariation = array_reduce( diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/config.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/config.phtml index 4adacf909f3..e6fafada2cd 100644 --- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/config.phtml +++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/config.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var $this \Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super\Config */ use \Magento\ConfigurableProduct\Model\Product\Type\Configurable; diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml index 6a17b3c1b40..f60f2ab9cbb 100644 --- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml +++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var $this \Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super\Config\Matrix */ ?> <?php diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/form.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/form.phtml index 68f71e49ef5..1affca7b85a 100644 --- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/form.phtml +++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/form.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /* @var $this \Magento\Framework\View\Element\Template */ ?> <div id="<?php echo $this->getNameInLayout() ?>" style="display:none" data-role="dialog" data-id="affected-attribute-set-selector"> diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/js.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/js.phtml index b4ac2d48cec..d92b6c463d4 100644 --- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/js.phtml +++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/js.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\ConfigurableProduct\Block\Product\Configurable\AttributeSelector */ ?> <script type="text/javascript"> diff --git a/app/code/Magento/ConfigurableProduct/view/frontend/templates/js/components.phtml b/app/code/Magento/ConfigurableProduct/view/frontend/templates/js/components.phtml index 5c84082b62f..e5fab539878 100644 --- a/app/code/Magento/ConfigurableProduct/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/ConfigurableProduct/view/frontend/templates/js/components.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml() ?> diff --git a/app/code/Magento/ConfigurableProduct/view/frontend/templates/product/view/type/options/configurable.phtml b/app/code/Magento/ConfigurableProduct/view/frontend/templates/product/view/type/options/configurable.phtml index e90ba87bc3b..dff8b181cb0 100644 --- a/app/code/Magento/ConfigurableProduct/view/frontend/templates/product/view/type/options/configurable.phtml +++ b/app/code/Magento/ConfigurableProduct/view/frontend/templates/product/view/type/options/configurable.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Contact/view/frontend/templates/form.phtml b/app/code/Magento/Contact/view/frontend/templates/form.phtml index 74406921c5f..57df477a6a8 100644 --- a/app/code/Magento/Contact/view/frontend/templates/form.phtml +++ b/app/code/Magento/Contact/view/frontend/templates/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <form class="form contact" action="<?php echo $this->getFormAction(); ?>" diff --git a/app/code/Magento/Core/Model/Asset/Config.php b/app/code/Magento/Core/Model/Asset/Config.php index 2cc432a6558..6d295d8389c 100644 --- a/app/code/Magento/Core/Model/Asset/Config.php +++ b/app/code/Magento/Core/Model/Asset/Config.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\Asset; /** diff --git a/app/code/Magento/Core/Model/File/Storage.php b/app/code/Magento/Core/Model/File/Storage.php index b610a3c3cd4..5bdbf7f7450 100644 --- a/app/code/Magento/Core/Model/File/Storage.php +++ b/app/code/Magento/Core/Model/File/Storage.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\File; use Magento\Framework\App\Filesystem\DirectoryList; diff --git a/app/code/Magento/Core/Model/File/Storage/Directory/Database.php b/app/code/Magento/Core/Model/File/Storage/Directory/Database.php index 34d7fd72e34..7298984ae67 100644 --- a/app/code/Magento/Core/Model/File/Storage/Directory/Database.php +++ b/app/code/Magento/Core/Model/File/Storage/Directory/Database.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\File\Storage\Directory; /** diff --git a/app/code/Magento/Core/Model/File/Validator/NotProtectedExtension.php b/app/code/Magento/Core/Model/File/Validator/NotProtectedExtension.php index 9254b1fc3b0..453904a2e50 100644 --- a/app/code/Magento/Core/Model/File/Validator/NotProtectedExtension.php +++ b/app/code/Magento/Core/Model/File/Validator/NotProtectedExtension.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\File\Validator; /** diff --git a/app/code/Magento/Core/Model/Resource/Config.php b/app/code/Magento/Core/Model/Resource/Config.php index 7db3fd5b112..6c18d8200b3 100644 --- a/app/code/Magento/Core/Model/Resource/Config.php +++ b/app/code/Magento/Core/Model/Resource/Config.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\Resource; /** diff --git a/app/code/Magento/Core/Model/Resource/Design.php b/app/code/Magento/Core/Model/Resource/Design.php index 0e7d6525dbc..54fb9492c99 100644 --- a/app/code/Magento/Core/Model/Resource/Design.php +++ b/app/code/Magento/Core/Model/Resource/Design.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\Resource; use Magento\Framework\Stdlib\DateTime; diff --git a/app/code/Magento/Core/Model/Resource/Layout/Update.php b/app/code/Magento/Core/Model/Resource/Layout/Update.php index cc9aea582bf..35cd626fbd7 100644 --- a/app/code/Magento/Core/Model/Resource/Layout/Update.php +++ b/app/code/Magento/Core/Model/Resource/Layout/Update.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\Resource\Layout; /** diff --git a/app/code/Magento/Core/Model/Resource/Variable.php b/app/code/Magento/Core/Model/Resource/Variable.php index 28fcaff741e..be932a88743 100644 --- a/app/code/Magento/Core/Model/Resource/Variable.php +++ b/app/code/Magento/Core/Model/Resource/Variable.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\Resource; /** diff --git a/app/code/Magento/Core/Model/TemplateEngine/Decorator/DebugHints.php b/app/code/Magento/Core/Model/TemplateEngine/Decorator/DebugHints.php index f2245e8eacd..6d43acfa6ec 100644 --- a/app/code/Magento/Core/Model/TemplateEngine/Decorator/DebugHints.php +++ b/app/code/Magento/Core/Model/TemplateEngine/Decorator/DebugHints.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\TemplateEngine\Decorator; class DebugHints implements \Magento\Framework\View\TemplateEngineInterface diff --git a/app/code/Magento/Core/Model/TemplateEngine/Plugin/DebugHints.php b/app/code/Magento/Core/Model/TemplateEngine/Plugin/DebugHints.php index 8e801710074..f6e2743d510 100644 --- a/app/code/Magento/Core/Model/TemplateEngine/Plugin/DebugHints.php +++ b/app/code/Magento/Core/Model/TemplateEngine/Plugin/DebugHints.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\TemplateEngine\Plugin; class DebugHints diff --git a/app/code/Magento/Core/Model/Url/RouteParamsResolver.php b/app/code/Magento/Core/Model/Url/RouteParamsResolver.php index 5ea49391c63..612f592d79a 100644 --- a/app/code/Magento/Core/Model/Url/RouteParamsResolver.php +++ b/app/code/Magento/Core/Model/Url/RouteParamsResolver.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\Url; class RouteParamsResolver extends \Magento\Framework\Object implements \Magento\Framework\Url\RouteParamsResolverInterface diff --git a/app/code/Magento/Core/Model/Validator/Factory.php b/app/code/Magento/Core/Model/Validator/Factory.php index 3986ec0b775..b5c4fb12004 100644 --- a/app/code/Magento/Core/Model/Validator/Factory.php +++ b/app/code/Magento/Core/Model/Validator/Factory.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\Validator; class Factory diff --git a/app/code/Magento/Core/Model/Variable/Config.php b/app/code/Magento/Core/Model/Variable/Config.php index a9bddcc0c06..e4f21ae73cb 100644 --- a/app/code/Magento/Core/Model/Variable/Config.php +++ b/app/code/Magento/Core/Model/Variable/Config.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Variable Wysiwyg Plugin Config * diff --git a/app/code/Magento/Core/view/frontend/templates/messages.phtml b/app/code/Magento/Core/view/frontend/templates/messages.phtml index 8f7fc147465..eca088f952b 100644 --- a/app/code/Magento/Core/view/frontend/templates/messages.phtml +++ b/app/code/Magento/Core/view/frontend/templates/messages.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php foreach ($types as $type) { if ($messages = $this->getMessages($type)) { diff --git a/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currency/SaveRates.php b/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currency/SaveRates.php index 3820ae88a33..e32c6d6fb43 100644 --- a/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currency/SaveRates.php +++ b/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currency/SaveRates.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CurrencySymbol\Controller\Adminhtml\System\Currency; class SaveRates extends \Magento\CurrencySymbol\Controller\Adminhtml\System\Currency diff --git a/app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml index d0e5720b9e0..896af4be3c2 100644 --- a/app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml +++ b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rate/matrix.phtml b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rate/matrix.phtml index 782729d99fa..9b0a235a3fd 100644 --- a/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rate/matrix.phtml +++ b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rate/matrix.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rate/services.phtml b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rate/services.phtml index d370cfcf72d..bc6de335351 100644 --- a/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rate/services.phtml +++ b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rate/services.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rates.phtml b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rates.phtml index fd7d842d4f5..54ac616dd2f 100644 --- a/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rates.phtml +++ b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rates.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Customer/Model/Metadata/ElementFactory.php b/app/code/Magento/Customer/Model/Metadata/ElementFactory.php index c40429cb314..6a8a1fd6e60 100644 --- a/app/code/Magento/Customer/Model/Metadata/ElementFactory.php +++ b/app/code/Magento/Customer/Model/Metadata/ElementFactory.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Customer\Model\Metadata; class ElementFactory diff --git a/app/code/Magento/Customer/Model/Metadata/Form/AbstractData.php b/app/code/Magento/Customer/Model/Metadata/Form/AbstractData.php index 78461578f47..4bbb589c25b 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/AbstractData.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/AbstractData.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Customer\Model\Metadata\Form; use Magento\Framework\Api\ArrayObjectSearch; diff --git a/app/code/Magento/Customer/Model/Observer.php b/app/code/Magento/Customer/Model/Observer.php index 692055fddcb..513e0041d7d 100644 --- a/app/code/Magento/Customer/Model/Observer.php +++ b/app/code/Magento/Customer/Model/Observer.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Customer\Model; /** diff --git a/app/code/Magento/Customer/view/adminhtml/templates/edit/js.phtml b/app/code/Magento/Customer/view/adminhtml/templates/edit/js.phtml index 4cb74e9c17c..3872f0cc0a4 100644 --- a/app/code/Magento/Customer/view/adminhtml/templates/edit/js.phtml +++ b/app/code/Magento/Customer/view/adminhtml/templates/edit/js.phtml @@ -2,4 +2,7 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> diff --git a/app/code/Magento/Customer/view/adminhtml/templates/edit/tab/account/form/renderer/group.phtml b/app/code/Magento/Customer/view/adminhtml/templates/edit/tab/account/form/renderer/group.phtml index 6ef6a1b2f53..277fc22f0e1 100644 --- a/app/code/Magento/Customer/view/adminhtml/templates/edit/tab/account/form/renderer/group.phtml +++ b/app/code/Magento/Customer/view/adminhtml/templates/edit/tab/account/form/renderer/group.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Customer\Block\Adminhtml\Edit\Renderer\Attribute\Group $this */ diff --git a/app/code/Magento/Customer/view/adminhtml/templates/edit/tab/account/form/renderer/sendemail.phtml b/app/code/Magento/Customer/view/adminhtml/templates/edit/tab/account/form/renderer/sendemail.phtml index 428bba3cd9b..215edd599f4 100644 --- a/app/code/Magento/Customer/view/adminhtml/templates/edit/tab/account/form/renderer/sendemail.phtml +++ b/app/code/Magento/Customer/view/adminhtml/templates/edit/tab/account/form/renderer/sendemail.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Customer\Block\Adminhtml\Edit\Renderer\Attribute\Sendemail $this */ diff --git a/app/code/Magento/Customer/view/adminhtml/templates/sales/order/create/address/form/renderer/vat.phtml b/app/code/Magento/Customer/view/adminhtml/templates/sales/order/create/address/form/renderer/vat.phtml index 76c7a19bfcb..81441737c06 100644 --- a/app/code/Magento/Customer/view/adminhtml/templates/sales/order/create/address/form/renderer/vat.phtml +++ b/app/code/Magento/Customer/view/adminhtml/templates/sales/order/create/address/form/renderer/vat.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_element = $this->getElement(); diff --git a/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml b/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml index deb8c19c908..ce995f421c4 100644 --- a/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml +++ b/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Customer/view/adminhtml/templates/tab/addresses.phtml b/app/code/Magento/Customer/view/adminhtml/templates/tab/addresses.phtml index 2b7c7ce9967..3fdac219205 100644 --- a/app/code/Magento/Customer/view/adminhtml/templates/tab/addresses.phtml +++ b/app/code/Magento/Customer/view/adminhtml/templates/tab/addresses.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Customer\Block\Adminhtml\Edit\Tab\Addresses */ ?> <script data-template="tab-address-content" type="text/x-jquery-tmpl"> diff --git a/app/code/Magento/Customer/view/adminhtml/templates/tab/cart.phtml b/app/code/Magento/Customer/view/adminhtml/templates/tab/cart.phtml index 54114a4f227..720a9550b46 100644 --- a/app/code/Magento/Customer/view/adminhtml/templates/tab/cart.phtml +++ b/app/code/Magento/Customer/view/adminhtml/templates/tab/cart.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Customer\Block\Adminhtml\Edit\Tab\Cart */ ?> <?php if ($this->getCartHeader()): ?> diff --git a/app/code/Magento/Customer/view/adminhtml/templates/tab/newsletter.phtml b/app/code/Magento/Customer/view/adminhtml/templates/tab/newsletter.phtml index e799291b210..07661535074 100644 --- a/app/code/Magento/Customer/view/adminhtml/templates/tab/newsletter.phtml +++ b/app/code/Magento/Customer/view/adminhtml/templates/tab/newsletter.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="entry-edit"> <?php echo $this->getForm()->getHtml() ?> diff --git a/app/code/Magento/Customer/view/adminhtml/templates/tab/view/personal_info.phtml b/app/code/Magento/Customer/view/adminhtml/templates/tab/view/personal_info.phtml index 80029014aa0..c6fc50c537b 100644 --- a/app/code/Magento/Customer/view/adminhtml/templates/tab/view/personal_info.phtml +++ b/app/code/Magento/Customer/view/adminhtml/templates/tab/view/personal_info.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Template for block \Magento\Customer\Block\Adminhtml\Edit\Tab\View\Status\PersonalInfo */ diff --git a/app/code/Magento/Customer/view/adminhtml/templates/tab/view/sales.phtml b/app/code/Magento/Customer/view/adminhtml/templates/tab/view/sales.phtml index 273d4a1edf0..1fc93e9df8c 100644 --- a/app/code/Magento/Customer/view/adminhtml/templates/tab/view/sales.phtml +++ b/app/code/Magento/Customer/view/adminhtml/templates/tab/view/sales.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Customer\Block\Adminhtml\Edit\Tab\View\Sales */ ?> <?php $singleStoreMode = $this->isSingleStoreMode(); ?> diff --git a/app/code/Magento/Customer/view/frontend/templates/account/customer.phtml b/app/code/Magento/Customer/view/frontend/templates/account/customer.phtml index 477dc7d40ab..f5a820d5aad 100644 --- a/app/code/Magento/Customer/view/frontend/templates/account/customer.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/account/customer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if($this->customerLoggedIn()): ?> <li class="customer-welcome"> @@ -15,4 +18,4 @@ </div> <?php endif; ?> </li> -<?php endif; ?> \ No newline at end of file +<?php endif; ?> diff --git a/app/code/Magento/Customer/view/frontend/templates/account/dashboard/address.phtml b/app/code/Magento/Customer/view/frontend/templates/account/dashboard/address.phtml index 354c0429be6..3cda4a333d4 100644 --- a/app/code/Magento/Customer/view/frontend/templates/account/dashboard/address.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/account/dashboard/address.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var \Magento\Customer\Block\Account\Dashboard\Address $this */ ?> <div class="block block-dashboard-addresses"> diff --git a/app/code/Magento/Customer/view/frontend/templates/account/dashboard/info.phtml b/app/code/Magento/Customer/view/frontend/templates/account/dashboard/info.phtml index e9b3b049ba4..6eb4a4ff8fe 100644 --- a/app/code/Magento/Customer/view/frontend/templates/account/dashboard/info.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/account/dashboard/info.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var \Magento\Customer\Block\Account\Dashboard\Info $this */ ?> <div class="block block-dashboard-info"> diff --git a/app/code/Magento/Customer/view/frontend/templates/account/link/back.phtml b/app/code/Magento/Customer/view/frontend/templates/account/link/back.phtml index ddd54b0f1df..45d756c0d6e 100644 --- a/app/code/Magento/Customer/view/frontend/templates/account/link/back.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/account/link/back.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="actions-toolbar"> <div class="secondary"><a class="action back" href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><span><?php echo __('Back') ?></span></a></div> diff --git a/app/code/Magento/Customer/view/frontend/templates/additionalinfocustomer.phtml b/app/code/Magento/Customer/view/frontend/templates/additionalinfocustomer.phtml index 11e79521443..c531dab269b 100644 --- a/app/code/Magento/Customer/view/frontend/templates/additionalinfocustomer.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/additionalinfocustomer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Customer/view/frontend/templates/address/book.phtml b/app/code/Magento/Customer/view/frontend/templates/address/book.phtml index bbab39ccd7f..0f1b7aceabd 100644 --- a/app/code/Magento/Customer/view/frontend/templates/address/book.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/address/book.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml b/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml index f70e56a2e88..b15874282b4 100644 --- a/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Customer/view/frontend/templates/form/confirmation.phtml b/app/code/Magento/Customer/view/frontend/templates/form/confirmation.phtml index 9f04f3fe4d6..83361224280 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/confirmation.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/confirmation.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <form action="" method="post" id="form-validate" class="form send confirmation" data-mage-init='{"validation":{}}'> <fieldset class="fieldset" data-hasrequired="<?php echo __('* Required Fields') ?>"> diff --git a/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml b/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml index babbdaf77b9..1fa862e0043 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var \Magento\Customer\Block\Form\Edit $this */ ?> <form class="form form-edit-account" action="<?php echo $this->getUrl('customer/account/editPost') ?>" method="post" id="form-validate" enctype="multipart/form-data" data-hasrequired="<?php echo __('* Required Fields') ?>" autocomplete="off"> diff --git a/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml b/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml index 8e1fa8860d9..28cc7814248 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml @@ -4,6 +4,9 @@ * * @var $this \Magento\Customer\Block\Account\Forgotpassword */ + +// @codingStandardsIgnoreFile + ?> <form class="form password forget" action="<?php echo $this->getUrl('*/*/forgotpasswordpost') ?>" diff --git a/app/code/Magento/Customer/view/frontend/templates/form/login.phtml b/app/code/Magento/Customer/view/frontend/templates/form/login.phtml index 030d3f3c872..c927be6e5f6 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/login.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/login.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var \Magento\Customer\Block\Form\Login $this */ ?> <?php diff --git a/app/code/Magento/Customer/view/frontend/templates/form/newsletter.phtml b/app/code/Magento/Customer/view/frontend/templates/form/newsletter.phtml index c89cb88cebb..16fa9d1ccf9 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/newsletter.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/newsletter.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml('form_before')?> <form class="form form-newsletter-manage" action="<?php echo $this->getAction() ?>" method="post" id="form-validate"> diff --git a/app/code/Magento/Customer/view/frontend/templates/form/register.phtml b/app/code/Magento/Customer/view/frontend/templates/form/register.phtml index 6d51ea5df88..b7e1e02273e 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/register.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/register.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Customer/view/frontend/templates/form/resetforgottenpassword.phtml b/app/code/Magento/Customer/view/frontend/templates/form/resetforgottenpassword.phtml index c5517a8abd0..a8910d54c5b 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/resetforgottenpassword.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/resetforgottenpassword.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var \Magento\Customer\Block\Account\Resetpassword $this */ ?> <form action="<?php echo $this->getUrl('*/*/resetpasswordpost', ['_query' => ['id' => $this->getCustomerId(), 'token' => $this->getResetPasswordLinkToken()]]); ?>" diff --git a/app/code/Magento/Customer/view/frontend/templates/js/components.phtml b/app/code/Magento/Customer/view/frontend/templates/js/components.phtml index 5c84082b62f..e5fab539878 100644 --- a/app/code/Magento/Customer/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/js/components.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml() ?> diff --git a/app/code/Magento/Customer/view/frontend/templates/newcustomer.phtml b/app/code/Magento/Customer/view/frontend/templates/newcustomer.phtml index f6cd50d708b..f49e12df3c0 100644 --- a/app/code/Magento/Customer/view/frontend/templates/newcustomer.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/newcustomer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Customer/view/frontend/templates/widget/dob.phtml b/app/code/Magento/Customer/view/frontend/templates/widget/dob.phtml index d5ec17c6afa..d1bf89af0c7 100644 --- a/app/code/Magento/Customer/view/frontend/templates/widget/dob.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/widget/dob.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** USAGE: diff --git a/app/code/Magento/Customer/view/frontend/templates/widget/gender.phtml b/app/code/Magento/Customer/view/frontend/templates/widget/gender.phtml index 48fb76fc769..76c6508d5aa 100644 --- a/app/code/Magento/Customer/view/frontend/templates/widget/gender.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/widget/gender.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="field gender<?php if ($this->isRequired()) echo ' required' ?>"> <label class="label" for="<?php echo $this->getFieldId('gender')?>"><span><?php echo __('Gender') ?></span></label> diff --git a/app/code/Magento/Customer/view/frontend/templates/widget/name.phtml b/app/code/Magento/Customer/view/frontend/templates/widget/name.phtml index 26920c9db5d..0f7c9f22c67 100644 --- a/app/code/Magento/Customer/view/frontend/templates/widget/name.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/widget/name.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** USAGE: diff --git a/app/code/Magento/Customer/view/frontend/templates/widget/taxvat.phtml b/app/code/Magento/Customer/view/frontend/templates/widget/taxvat.phtml index 1c229b058db..30347f82c89 100644 --- a/app/code/Magento/Customer/view/frontend/templates/widget/taxvat.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/widget/taxvat.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="field taxvat<?php if ($this->isRequired()) echo ' required'; ?>"> <label class="label" for="<?php echo $this->getFieldId('taxvat')?>"><span><?php echo __('Tax/VAT number') ?></span></label> diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Container.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Container.php index 2575c905f07..53edea241e4 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Container.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Container.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\DesignEditor\Block\Adminhtml\Editor; /** diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Renderer.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Renderer.php index 610e3665cbb..c2695d5c595 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Renderer.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Renderer.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Color-picker form element renderer */ diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Renderer/LogoUploader.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Renderer/LogoUploader.php index fc85a193f80..7f7268a6f1a 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Renderer/LogoUploader.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Renderer/LogoUploader.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\DesignEditor\Block\Adminhtml\Editor\Form\Renderer; /** diff --git a/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Tools/JsList.php b/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Tools/JsList.php index b260d9e175d..bc49781f0b4 100644 --- a/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Tools/JsList.php +++ b/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Tools/JsList.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\DesignEditor\Controller\Adminhtml\System\Design\Editor\Tools; class JsList extends \Magento\DesignEditor\Controller\Adminhtml\System\Design\Editor\Tools diff --git a/app/code/Magento/DesignEditor/Model/Editor/Tools/QuickStyles/Form/Renderer/Factory.php b/app/code/Magento/DesignEditor/Model/Editor/Tools/QuickStyles/Form/Renderer/Factory.php index 3d60fd98ba0..2fa624d4dd1 100644 --- a/app/code/Magento/DesignEditor/Model/Editor/Tools/QuickStyles/Form/Renderer/Factory.php +++ b/app/code/Magento/DesignEditor/Model/Editor/Tools/QuickStyles/Form/Renderer/Factory.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Form\Renderer; use Magento\Framework\Data\Form\Element\Renderer\RendererInterface; diff --git a/app/code/Magento/DesignEditor/Model/Editor/Tools/QuickStyles/Renderer/Factory.php b/app/code/Magento/DesignEditor/Model/Editor/Tools/QuickStyles/Renderer/Factory.php index f7dc0322137..d56ad3726a9 100644 --- a/app/code/Magento/DesignEditor/Model/Editor/Tools/QuickStyles/Renderer/Factory.php +++ b/app/code/Magento/DesignEditor/Model/Editor/Tools/QuickStyles/Renderer/Factory.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Renderer; /** diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/container.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/container.phtml index 9f03bae070d..f81d99d5de6 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/container.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/container.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Editor\Container */ ?> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/color-picker.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/color-picker.phtml index a987a55fc89..67fb49b96ce 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/color-picker.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/color-picker.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Editor\Form\Renderer\ColorPicker */ ?> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/composite.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/composite.phtml index e24d3441c81..d100ff99107 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/composite.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/composite.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Editor\Form\Renderer\Composite */ ?> <?php diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/composite/children.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/composite/children.phtml index f00a7c3adac..240d4f209dd 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/composite/children.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/composite/children.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Editor\Form\Renderer\Composite */ ?> <?php diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/composite/wrapper.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/composite/wrapper.phtml index 1abc9f75d70..20edfe1140c 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/composite/wrapper.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/composite/wrapper.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Editor\Form\Renderer\Composite */ ?> <?php diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/element/wrapper.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/element/wrapper.phtml index a9cd7406452..46007d42574 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/element/wrapper.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/element/wrapper.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* former part of \Magento\Framework\Data\Form\Element\AbstractElement::getElementHtml() */ ?> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/logo-uploader.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/logo-uploader.phtml index d2cb10c8a7c..fa1dcddddb2 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/logo-uploader.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/logo-uploader.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Editor\Form\Renderer\LogoUploader */ ?> <?php /** @var $element \Magento\DesignEditor\Block\Adminhtml\Editor\Form\Element\LogoUploader */?> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/simple.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/simple.phtml index 05c3b442342..c9f5d71fe08 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/simple.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/simple.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Editor\Form\Renderer\ColorPicker */ ?> <?php diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/template.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/template.phtml index 608ba8b7ef4..376fa3b89f6 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/template.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/template.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Editor\Form\Renderer\Checkbox */ ?> <?php diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/toolbar/buttons.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/toolbar/buttons.phtml index ad4e76c0af8..7ce1d90b958 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/toolbar/buttons.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/toolbar/buttons.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Editor\Toolbar\Buttons */ ?> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/toolbar/buttons/edit.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/toolbar/buttons/edit.phtml index 799a4fa8d28..9260d4dd7fa 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/toolbar/buttons/edit.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/toolbar/buttons/edit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Editor\Toolbar\Buttons\Edit */ diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools.phtml index f2e1c0d4b8f..77b08a026c4 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Editor\Tools */ ?> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/block.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/block.phtml index 54206f70ce4..c1a2e35d7b1 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/block.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/block.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Block */ ?> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/custom.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/custom.phtml index d96df2ce229..671ed6c08c0 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/custom.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/custom.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Custom */ ?> <div id="vde-tab-custom-messages-placeholder"></div> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/js.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/js.phtml index b5f2404ab9f..8fc622b1fd2 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/js.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/js.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Js */ ?> <div id="vde-tab-js-messages-placeholder"></div> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/content/files.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/content/files.phtml index f32451c1488..1fa31c3cba7 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/content/files.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/content/files.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/settings.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/settings.phtml index e19b2371010..ff1e0cde803 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/settings.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/settings.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Settings */ ?> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/tabs.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/tabs.phtml index 3b4aac6ef80..0f66a5a2c59 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/tabs.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/tabs.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Tabs\AbstractTabs */ ?> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/tabs/super-handle.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/tabs/super-handle.phtml index a66ad51cc73..2ba74bfe8aa 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/tabs/super-handle.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/tabs/super-handle.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Backend\Block\Template */ ?> <li class="item<?php echo ' ',$this->getClass(); ?><?php echo $this->getIsHidden() ? ' hidden' : '' ?><?php echo $this->getIsDisabled() ? ' disabled' : '' ?>"> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/available.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/available.phtml index c409e5b8e0a..0f601bd92d7 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/available.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/available.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Theme */?> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/button.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/button.phtml index 1016b7c4657..e1b66fafccb 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/button.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/button.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/customized.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/customized.phtml index 7e9108809d2..a3b75377af0 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/customized.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/customized.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Theme */?> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/list/available.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/list/available.phtml index ad5cf2f73bd..f232e349b01 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/list/available.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/list/available.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Theme\Selector\SelectorList\Available */?> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/list/customized.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/list/customized.phtml index ffb28a1b2d7..1621d068167 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/list/customized.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/list/customized.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Theme\Selector\SelectorList\AbstractSelectorList */?> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/first_entrance.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/first_entrance.phtml index cc3df5c3ea0..46335bf5799 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/first_entrance.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/first_entrance.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Backend\Block\Template */?> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/storeview.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/storeview.phtml index 9462d3553da..e8b06a7d9de 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/storeview.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/storeview.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Theme\Selector\StoreView */?> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/theme_edit.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/theme_edit.phtml index bb995d2097d..516c3e4af73 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/theme_edit.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/theme_edit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <script type="text/javascript"> diff --git a/app/code/Magento/DesignEditor/view/frontend/templates/translate_inline.phtml b/app/code/Magento/DesignEditor/view/frontend/templates/translate_inline.phtml index e5c989dd441..ffaaf0abf34 100644 --- a/app/code/Magento/DesignEditor/view/frontend/templates/translate_inline.phtml +++ b/app/code/Magento/DesignEditor/view/frontend/templates/translate_inline.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Framework\View\Element\Template */ ?> diff --git a/app/code/Magento/Dhl/Block/Adminhtml/Unitofmeasure.php b/app/code/Magento/Dhl/Block/Adminhtml/Unitofmeasure.php index 168d07c7ed2..032040d5520 100644 --- a/app/code/Magento/Dhl/Block/Adminhtml/Unitofmeasure.php +++ b/app/code/Magento/Dhl/Block/Adminhtml/Unitofmeasure.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Dhl\Block\Adminhtml; /** diff --git a/app/code/Magento/Dhl/Model/Carrier.php b/app/code/Magento/Dhl/Model/Carrier.php index 77d2105726f..aaf416d8e92 100644 --- a/app/code/Magento/Dhl/Model/Carrier.php +++ b/app/code/Magento/Dhl/Model/Carrier.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Dhl\Model; use Magento\Catalog\Model\Product\Type; diff --git a/app/code/Magento/Dhl/Model/Plugin/Checkout/Block/Cart/Shipping.php b/app/code/Magento/Dhl/Model/Plugin/Checkout/Block/Cart/Shipping.php index bafe51f5197..b9b17c3c1b6 100644 --- a/app/code/Magento/Dhl/Model/Plugin/Checkout/Block/Cart/Shipping.php +++ b/app/code/Magento/Dhl/Model/Plugin/Checkout/Block/Cart/Shipping.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Dhl\Model\Plugin\Checkout\Block\Cart; /** diff --git a/app/code/Magento/Directory/Model/Country.php b/app/code/Magento/Directory/Model/Country.php index 6088a6c6cc2..59780d30f34 100644 --- a/app/code/Magento/Directory/Model/Country.php +++ b/app/code/Magento/Directory/Model/Country.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Country model * diff --git a/app/code/Magento/Directory/Model/Currency/Import/Factory.php b/app/code/Magento/Directory/Model/Currency/Import/Factory.php index d9fb7f9d7dd..80f3cc1b538 100644 --- a/app/code/Magento/Directory/Model/Currency/Import/Factory.php +++ b/app/code/Magento/Directory/Model/Currency/Import/Factory.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Directory\Model\Currency\Import; class Factory diff --git a/app/code/Magento/Directory/Model/Currency/Import/Webservicex.php b/app/code/Magento/Directory/Model/Currency/Import/Webservicex.php index 7bb28d2acc8..f4e1763b885 100644 --- a/app/code/Magento/Directory/Model/Currency/Import/Webservicex.php +++ b/app/code/Magento/Directory/Model/Currency/Import/Webservicex.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Currency rate import model (From www.webservicex.net) */ diff --git a/app/code/Magento/Directory/Model/Resource/Country/Collection.php b/app/code/Magento/Directory/Model/Resource/Country/Collection.php index c382f1089b5..d328c2dc28f 100644 --- a/app/code/Magento/Directory/Model/Resource/Country/Collection.php +++ b/app/code/Magento/Directory/Model/Resource/Country/Collection.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Directory Country Resource Collection */ diff --git a/app/code/Magento/Directory/Model/Resource/Region.php b/app/code/Magento/Directory/Model/Resource/Region.php index 7ba5179fa82..4f941f951c5 100644 --- a/app/code/Magento/Directory/Model/Resource/Region.php +++ b/app/code/Magento/Directory/Model/Resource/Region.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Directory Region Resource Model */ diff --git a/app/code/Magento/Directory/view/frontend/templates/currency.phtml b/app/code/Magento/Directory/view/frontend/templates/currency.phtml index c1e14282366..309df630937 100644 --- a/app/code/Magento/Directory/view/frontend/templates/currency.phtml +++ b/app/code/Magento/Directory/view/frontend/templates/currency.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Directory/view/frontend/templates/currency/switch.phtml b/app/code/Magento/Directory/view/frontend/templates/currency/switch.phtml index 1689b70cb04..1e2bea31346 100644 --- a/app/code/Magento/Directory/view/frontend/templates/currency/switch.phtml +++ b/app/code/Magento/Directory/view/frontend/templates/currency/switch.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <p><?php echo __('Your current currency is: %1.', $currency->getCode()) ?></p> <p><a href="<?php echo $this->getBaseUrl(); ?>" class="action continue"><span><?php echo __('Continue') ?></span></a></p> diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php b/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php index 88dbba4d548..140f2b53b49 100644 --- a/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php +++ b/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Downloadable\Block\Adminhtml\Sales\Items\Column\Downloadable; use Magento\Downloadable\Model\Link\Purchased; diff --git a/app/code/Magento/Downloadable/Block/Catalog/Product/Samples.php b/app/code/Magento/Downloadable/Block/Catalog/Product/Samples.php index a8dd75adeb9..cdf1ca310c8 100644 --- a/app/code/Magento/Downloadable/Block/Catalog/Product/Samples.php +++ b/app/code/Magento/Downloadable/Block/Catalog/Product/Samples.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Downloadable\Block\Catalog\Product; use Magento\Downloadable\Model\Resource\Sample; diff --git a/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php b/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php index ef08619fa24..a9e78dee382 100644 --- a/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php +++ b/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Downloadable\Block\Customer\Products; use Magento\Downloadable\Model\Link\Purchased\Item; diff --git a/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Downloadable.php b/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Downloadable.php index 60fd876e575..90afafa070a 100644 --- a/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Downloadable.php +++ b/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Downloadable.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Downloadable\Block\Sales\Order\Email\Items; use Magento\Downloadable\Model\Link\Purchased; diff --git a/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Order/Downloadable.php b/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Order/Downloadable.php index 449554f610a..e55486a1887 100644 --- a/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Order/Downloadable.php +++ b/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Order/Downloadable.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Downloadable\Block\Sales\Order\Email\Items\Order; use Magento\Downloadable\Model\Link\Purchased\Item; diff --git a/app/code/Magento/Downloadable/Block/Sales/Order/Item/Renderer/Downloadable.php b/app/code/Magento/Downloadable/Block/Sales/Order/Item/Renderer/Downloadable.php index cb15e958f12..61b32968273 100644 --- a/app/code/Magento/Downloadable/Block/Sales/Order/Item/Renderer/Downloadable.php +++ b/app/code/Magento/Downloadable/Block/Sales/Order/Item/Renderer/Downloadable.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Downloadable\Block\Sales\Order\Item\Renderer; use Magento\Downloadable\Model\Link\Purchased; diff --git a/app/code/Magento/Downloadable/Controller/Customer/Products.php b/app/code/Magento/Downloadable/Controller/Customer/Products.php index d1fc8beecbb..ec9f9fcade4 100644 --- a/app/code/Magento/Downloadable/Controller/Customer/Products.php +++ b/app/code/Magento/Downloadable/Controller/Customer/Products.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Downloadable\Controller\Customer; use Magento\Framework\App\RequestInterface; diff --git a/app/code/Magento/Downloadable/Helper/Catalog/Product/Configuration.php b/app/code/Magento/Downloadable/Helper/Catalog/Product/Configuration.php index 1a8864ed182..f03b3de46fe 100644 --- a/app/code/Magento/Downloadable/Helper/Catalog/Product/Configuration.php +++ b/app/code/Magento/Downloadable/Helper/Catalog/Product/Configuration.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Downloadable\Helper\Catalog\Product; /** diff --git a/app/code/Magento/Downloadable/Helper/Download.php b/app/code/Magento/Downloadable/Helper/Download.php index 2efd55ef364..ca073b90471 100644 --- a/app/code/Magento/Downloadable/Helper/Download.php +++ b/app/code/Magento/Downloadable/Helper/Download.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Downloadable\Helper; use Magento\Framework\App\Filesystem\DirectoryList; diff --git a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/AbstractItems.php b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/AbstractItems.php index 21be2eae6bc..54e67bbf583 100644 --- a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/AbstractItems.php +++ b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/AbstractItems.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Downloadable\Model\Sales\Order\Pdf\Items; /** diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/product/composite/fieldset/downloadable.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/product/composite/fieldset/downloadable.phtml index b9b726e3e26..899298ee5ff 100644 --- a/app/code/Magento/Downloadable/view/adminhtml/templates/product/composite/fieldset/downloadable.phtml +++ b/app/code/Magento/Downloadable/view/adminhtml/templates/product/composite/fieldset/downloadable.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Downloadable\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Downloadable */ ?> <?php $_linksPurchasedSeparately = $this->getLinksPurchasedSeparately(); ?> diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable.phtml index faf39261b3d..b2106cc4eaa 100644 --- a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable.phtml +++ b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/links.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/links.phtml index a6ec0c51425..e4a45d29568 100644 --- a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/links.phtml +++ b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/links.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/samples.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/samples.phtml index 077837d6bda..1896a064caf 100644 --- a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/samples.phtml +++ b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/samples.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/creditmemo/name.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/creditmemo/name.phtml index c6e755ef89e..f3ddf20f18d 100644 --- a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/creditmemo/name.phtml +++ b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/creditmemo/name.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($_item = $this->getItem()): ?> diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/invoice/name.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/invoice/name.phtml index cba0dd9dfcb..582abcb2de0 100644 --- a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/invoice/name.phtml +++ b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/invoice/name.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($_item = $this->getItem()): ?> diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml index 90c9582901d..984a9de8f22 100644 --- a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml +++ b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($_item = $this->getItem()): ?> diff --git a/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/links.phtml b/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/links.phtml index 326554bbd32..7be7d7c676f 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/links.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/links.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Downloadable\Block\Catalog\Product\Links */ ?> <?php $_linksPurchasedSeparately = $this->getLinksPurchasedSeparately(); ?> diff --git a/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/samples.phtml b/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/samples.phtml index b179dfe188d..0c162526ec2 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/samples.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/samples.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Downloadable product links * diff --git a/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/type.phtml b/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/type.phtml index 72953983dd3..59933ac0d2d 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/type.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/type.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Downloadable product type * diff --git a/app/code/Magento/Downloadable/view/frontend/templates/checkout/cart/item/default.phtml b/app/code/Magento/Downloadable/view/frontend/templates/checkout/cart/item/default.phtml index c3f11cd169a..ff116091174 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/checkout/cart/item/default.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/checkout/cart/item/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_item = $this->getItem(); diff --git a/app/code/Magento/Downloadable/view/frontend/templates/checkout/links.phtml b/app/code/Magento/Downloadable/view/frontend/templates/checkout/links.phtml index 156964a739f..6b5c05b8c5b 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/checkout/links.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/checkout/links.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($links = $this->getLinks()): ?> <dl class="cart item options"> diff --git a/app/code/Magento/Downloadable/view/frontend/templates/checkout/success.phtml b/app/code/Magento/Downloadable/view/frontend/templates/checkout/success.phtml index 2084b189534..5876330ebda 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/checkout/success.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/checkout/success.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getOrderHasDownloadable()): ?> <?php echo __('Go to <a href="%1">My Downloadable Products</a>', $this->getDownloadableProductsUrl()) ?> diff --git a/app/code/Magento/Downloadable/view/frontend/templates/customer/products/list.phtml b/app/code/Magento/Downloadable/view/frontend/templates/customer/products/list.phtml index 64a8f637191..345b5595268 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/customer/products/list.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/customer/products/list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Downloadable/view/frontend/templates/email/order/items/creditmemo/downloadable.phtml b/app/code/Magento/Downloadable/view/frontend/templates/email/order/items/creditmemo/downloadable.phtml index 5f859dba712..7db2f4dcf16 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/email/order/items/creditmemo/downloadable.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/email/order/items/creditmemo/downloadable.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Downloadable\Block\Sales\Order\Email\Items\Downloadable */ ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/Downloadable/view/frontend/templates/email/order/items/invoice/downloadable.phtml b/app/code/Magento/Downloadable/view/frontend/templates/email/order/items/invoice/downloadable.phtml index b87afc9266a..b1fb4678bd9 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/email/order/items/invoice/downloadable.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/email/order/items/invoice/downloadable.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Downloadable\Block\Sales\Order\Email\Items\Downloadable */ ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/Downloadable/view/frontend/templates/email/order/items/order/downloadable.phtml b/app/code/Magento/Downloadable/view/frontend/templates/email/order/items/order/downloadable.phtml index 57eebb03175..542dd88e4c4 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/email/order/items/order/downloadable.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/email/order/items/order/downloadable.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Downloadable\Block\Sales\Order\Email\Items\Order\Downloadable */ ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/Downloadable/view/frontend/templates/js/components.phtml b/app/code/Magento/Downloadable/view/frontend/templates/js/components.phtml index 5c84082b62f..e5fab539878 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/js/components.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml() ?> diff --git a/app/code/Magento/Downloadable/view/frontend/templates/sales/order/creditmemo/items/renderer/downloadable.phtml b/app/code/Magento/Downloadable/view/frontend/templates/sales/order/creditmemo/items/renderer/downloadable.phtml index a5bd2a22ede..1941a836ba4 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/sales/order/creditmemo/items/renderer/downloadable.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/sales/order/creditmemo/items/renderer/downloadable.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Downloadable\Block\Sales\Order\Item\Renderer\Downloadable */ ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/Downloadable/view/frontend/templates/sales/order/invoice/items/renderer/downloadable.phtml b/app/code/Magento/Downloadable/view/frontend/templates/sales/order/invoice/items/renderer/downloadable.phtml index d087699cc11..4fc0c6dccd8 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/sales/order/invoice/items/renderer/downloadable.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/sales/order/invoice/items/renderer/downloadable.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Downloadable\Block\Sales\Order\Item\Renderer\Downloadable */ ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/Downloadable/view/frontend/templates/sales/order/items/renderer/downloadable.phtml b/app/code/Magento/Downloadable/view/frontend/templates/sales/order/items/renderer/downloadable.phtml index becaabbf76c..759179a1193 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/sales/order/items/renderer/downloadable.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/sales/order/items/renderer/downloadable.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Downloadable\Block\Sales\Order\Item\Renderer\Downloadable */ ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php index b75bfeab278..5fd3eca4c9b 100644 --- a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php +++ b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Product attribute add/edit form main tab * diff --git a/app/code/Magento/Eav/Helper/Data.php b/app/code/Magento/Eav/Helper/Data.php index 2c283d95330..d09f95a40ca 100644 --- a/app/code/Magento/Eav/Helper/Data.php +++ b/app/code/Magento/Eav/Helper/Data.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Eav\Helper; /** diff --git a/app/code/Magento/Eav/Model/Attribute.php b/app/code/Magento/Eav/Model/Attribute.php index 34cb0c6c5dc..f38ac881adf 100644 --- a/app/code/Magento/Eav/Model/Attribute.php +++ b/app/code/Magento/Eav/Model/Attribute.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * EAV attribute resource model (Using Forms) * diff --git a/app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php b/app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php index 27dff63da40..15d45d12feb 100644 --- a/app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php +++ b/app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Eav\Model\Attribute\Data; use Magento\Framework\App\RequestInterface; diff --git a/app/code/Magento/Eav/Model/AttributeDataFactory.php b/app/code/Magento/Eav/Model/AttributeDataFactory.php index 3e69316fcfa..fc35af0da10 100644 --- a/app/code/Magento/Eav/Model/AttributeDataFactory.php +++ b/app/code/Magento/Eav/Model/AttributeDataFactory.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Eav\Model; /** diff --git a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php index aab51c7333d..59c36e1a1f0 100644 --- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Eav\Model\Entity; use Magento\Eav\Model\Entity\Attribute\AbstractAttribute; 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 bedc1ee81be..196c707e7a2 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Eav\Model\Entity\Attribute\Backend; use Magento\Eav\Exception as EavException; 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 b35370fcd49..ff888017617 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Frontend/Datetime.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Frontend/Datetime.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Eav\Model\Entity\Attribute\Frontend; class Datetime extends \Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFrontend diff --git a/app/code/Magento/Email/view/adminhtml/templates/template/edit.phtml b/app/code/Magento/Email/view/adminhtml/templates/template/edit.phtml index f386155a979..fa7a2520d6d 100644 --- a/app/code/Magento/Email/view/adminhtml/templates/template/edit.phtml +++ b/app/code/Magento/Email/view/adminhtml/templates/template/edit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if (!$this->getEditMode()): ?> <form action="<?php echo $this->getLoadUrl() ?>" method="post" id="email_template_load_form"> diff --git a/app/code/Magento/Email/view/adminhtml/templates/template/list.phtml b/app/code/Magento/Email/view/adminhtml/templates/template/list.phtml index f21550eb169..e97b32003cb 100644 --- a/app/code/Magento/Email/view/adminhtml/templates/template/list.phtml +++ b/app/code/Magento/Email/view/adminhtml/templates/template/list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="page-actions"><?php echo $this->getChildHtml('add_button') ?></div> <?php echo $this->getChildHtml('grid') ?> diff --git a/app/code/Magento/Fedex/Model/Carrier.php b/app/code/Magento/Fedex/Model/Carrier.php index 42e80b5d504..acd25bd1611 100644 --- a/app/code/Magento/Fedex/Model/Carrier.php +++ b/app/code/Magento/Fedex/Model/Carrier.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Fedex\Model; use Magento\Sales\Model\Quote\Address\RateRequest; diff --git a/app/code/Magento/GiftMessage/Helper/Message.php b/app/code/Magento/GiftMessage/Helper/Message.php index 31045f4063e..e3072fd5d59 100644 --- a/app/code/Magento/GiftMessage/Helper/Message.php +++ b/app/code/Magento/GiftMessage/Helper/Message.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\GiftMessage\Helper; /** diff --git a/app/code/Magento/GiftMessage/view/adminhtml/templates/giftoptionsform.phtml b/app/code/Magento/GiftMessage/view/adminhtml/templates/giftoptionsform.phtml index 6bf0315e9a6..310bebbb254 100644 --- a/app/code/Magento/GiftMessage/view/adminhtml/templates/giftoptionsform.phtml +++ b/app/code/Magento/GiftMessage/view/adminhtml/templates/giftoptionsform.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->canDisplayGiftmessageForm()): ?> diff --git a/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml b/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml index 1322070685b..2471c21fdf9 100644 --- a/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml +++ b/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getChildHtml()) :?> diff --git a/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/create/giftoptions.phtml b/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/create/giftoptions.phtml index 1ba3e1b8d67..c263ecbd5a5 100644 --- a/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/create/giftoptions.phtml +++ b/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/create/giftoptions.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/create/items.phtml b/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/create/items.phtml index 65342e2aee9..402c7ddb617 100644 --- a/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/create/items.phtml +++ b/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/create/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->canDisplayGiftMessage()): ?> diff --git a/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/view/giftoptions.phtml b/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/view/giftoptions.phtml index 5a9677792c6..6fa1f494462 100644 --- a/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/view/giftoptions.phtml +++ b/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/view/giftoptions.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_childHtml = trim($this->getChildHtml('', false)); ?> diff --git a/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/view/items.phtml b/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/view/items.phtml index 81dbd92b8cd..5435ae8d8dc 100644 --- a/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/view/items.phtml +++ b/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/view/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->canDisplayGiftmessage()): ?> diff --git a/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml b/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml index d2166f8652c..ac5ea1a59a8 100644 --- a/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml +++ b/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_giftMessage = false; ?> <?php switch ($this->getCheckoutType()): ?> diff --git a/app/code/Magento/GoogleAnalytics/Block/Ga.php b/app/code/Magento/GoogleAnalytics/Block/Ga.php index 7a4eac437ad..8b10a6e2932 100644 --- a/app/code/Magento/GoogleAnalytics/Block/Ga.php +++ b/app/code/Magento/GoogleAnalytics/Block/Ga.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleAnalytics\Block; /** diff --git a/app/code/Magento/GoogleAnalytics/Helper/Data.php b/app/code/Magento/GoogleAnalytics/Helper/Data.php index 2a1eff33235..8a9e6af494e 100644 --- a/app/code/Magento/GoogleAnalytics/Helper/Data.php +++ b/app/code/Magento/GoogleAnalytics/Helper/Data.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleAnalytics\Helper; use Magento\Store\Model\Store; diff --git a/app/code/Magento/GoogleAnalytics/view/frontend/templates/ga.phtml b/app/code/Magento/GoogleAnalytics/view/frontend/templates/ga.phtml index 34df717bb6c..3cacc7cacfa 100644 --- a/app/code/Magento/GoogleAnalytics/view/frontend/templates/ga.phtml +++ b/app/code/Magento/GoogleAnalytics/view/frontend/templates/ga.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\GoogleAnalytics\Block\Ga */ ?> <?php if (!$this->helper('Magento\Store\Helper\Cookie')->isUserNotAllowSaveCookie()): ?> diff --git a/app/code/Magento/GoogleOptimizer/Block/Code/Category.php b/app/code/Magento/GoogleOptimizer/Block/Code/Category.php index f422c147581..dab0b107d3f 100644 --- a/app/code/Magento/GoogleOptimizer/Block/Code/Category.php +++ b/app/code/Magento/GoogleOptimizer/Block/Code/Category.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleOptimizer\Block\Code; class Category extends \Magento\GoogleOptimizer\Block\AbstractCode implements \Magento\Framework\View\Block\IdentityInterface diff --git a/app/code/Magento/GoogleOptimizer/Block/Code/Product.php b/app/code/Magento/GoogleOptimizer/Block/Code/Product.php index fcd2e2b788d..820f1df8961 100644 --- a/app/code/Magento/GoogleOptimizer/Block/Code/Product.php +++ b/app/code/Magento/GoogleOptimizer/Block/Code/Product.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleOptimizer\Block\Code; class Product extends \Magento\GoogleOptimizer\Block\AbstractCode implements \Magento\Framework\View\Block\IdentityInterface diff --git a/app/code/Magento/GoogleOptimizer/Helper/Data.php b/app/code/Magento/GoogleOptimizer/Helper/Data.php index f4acf980c83..ae1da817379 100644 --- a/app/code/Magento/GoogleOptimizer/Helper/Data.php +++ b/app/code/Magento/GoogleOptimizer/Helper/Data.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleOptimizer\Helper; class Data extends \Magento\Framework\App\Helper\AbstractHelper diff --git a/app/code/Magento/GoogleOptimizer/Model/Observer/Block/Category/Tab.php b/app/code/Magento/GoogleOptimizer/Model/Observer/Block/Category/Tab.php index 62507ff8e17..7594ce711ea 100644 --- a/app/code/Magento/GoogleOptimizer/Model/Observer/Block/Category/Tab.php +++ b/app/code/Magento/GoogleOptimizer/Model/Observer/Block/Category/Tab.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleOptimizer\Model\Observer\Block\Category; use Magento\Framework\Event\Observer as EventObserver; diff --git a/app/code/Magento/GoogleShopping/Block/Adminhtml/Items/Item.php b/app/code/Magento/GoogleShopping/Block/Adminhtml/Items/Item.php index 82e0b208702..55e45907c98 100644 --- a/app/code/Magento/GoogleShopping/Block/Adminhtml/Items/Item.php +++ b/app/code/Magento/GoogleShopping/Block/Adminhtml/Items/Item.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleShopping\Block\Adminhtml\Items; /** diff --git a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items/Index.php b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items/Index.php index a4d0d85baec..ccb228e0878 100644 --- a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items/Index.php +++ b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items/Index.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleShopping\Controller\Adminhtml\Googleshopping\Items; use Magento\Backend\App\Action; diff --git a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items/Refresh.php b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items/Refresh.php index 8d9a12f1ee3..da17b264b89 100644 --- a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items/Refresh.php +++ b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items/Refresh.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleShopping\Controller\Adminhtml\Googleshopping\Items; class Refresh extends \Magento\GoogleShopping\Controller\Adminhtml\Googleshopping\Items diff --git a/app/code/Magento/GoogleShopping/Helper/Category.php b/app/code/Magento/GoogleShopping/Helper/Category.php index b3b545629e5..792ac6cfaf8 100644 --- a/app/code/Magento/GoogleShopping/Helper/Category.php +++ b/app/code/Magento/GoogleShopping/Helper/Category.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleShopping\Helper; /** diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/DefaultAttribute.php b/app/code/Magento/GoogleShopping/Model/Attribute/DefaultAttribute.php index c0ed3c62b4d..aab7e53702c 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/DefaultAttribute.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/DefaultAttribute.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Default attribute model * diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/Price.php b/app/code/Magento/GoogleShopping/Model/Attribute/Price.php index dcc81a1a9ab..69ab21bdd6a 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/Price.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/Price.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleShopping\Model\Attribute; use Magento\Catalog\Model\Product; diff --git a/app/code/Magento/GoogleShopping/Model/Config.php b/app/code/Magento/GoogleShopping/Model/Config.php index 41be2b38879..a3095ce40ba 100644 --- a/app/code/Magento/GoogleShopping/Model/Config.php +++ b/app/code/Magento/GoogleShopping/Model/Config.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleShopping\Model; /** diff --git a/app/code/Magento/GoogleShopping/Model/Resource/Attribute/Collection.php b/app/code/Magento/GoogleShopping/Model/Resource/Attribute/Collection.php index e2eb66de035..279ccd93327 100644 --- a/app/code/Magento/GoogleShopping/Model/Resource/Attribute/Collection.php +++ b/app/code/Magento/GoogleShopping/Model/Resource/Attribute/Collection.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleShopping\Model\Resource\Attribute; /** diff --git a/app/code/Magento/GoogleShopping/Model/Resource/Grid/Collection.php b/app/code/Magento/GoogleShopping/Model/Resource/Grid/Collection.php index c10f42d0128..b6dde9031cf 100644 --- a/app/code/Magento/GoogleShopping/Model/Resource/Grid/Collection.php +++ b/app/code/Magento/GoogleShopping/Model/Resource/Grid/Collection.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * GoogleShopping Types collection * diff --git a/app/code/Magento/GoogleShopping/Model/Service.php b/app/code/Magento/GoogleShopping/Model/Service.php index f1a9814e9c2..bae461dc251 100644 --- a/app/code/Magento/GoogleShopping/Model/Service.php +++ b/app/code/Magento/GoogleShopping/Model/Service.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleShopping\Model; /** diff --git a/app/code/Magento/GoogleShopping/Model/Source/Destinationstates.php b/app/code/Magento/GoogleShopping/Model/Source/Destinationstates.php index 9b3ac0a0084..87cf42670d2 100644 --- a/app/code/Magento/GoogleShopping/Model/Source/Destinationstates.php +++ b/app/code/Magento/GoogleShopping/Model/Source/Destinationstates.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleShopping\Model\Source; /** diff --git a/app/code/Magento/GoogleShopping/view/adminhtml/templates/captcha.phtml b/app/code/Magento/GoogleShopping/view/adminhtml/templates/captcha.phtml index 40872fb9898..2dbfab84deb 100644 --- a/app/code/Magento/GoogleShopping/view/adminhtml/templates/captcha.phtml +++ b/app/code/Magento/GoogleShopping/view/adminhtml/templates/captcha.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getGcontentCaptchaToken() && $this->getGcontentCaptchaUrl()): ?> diff --git a/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit.phtml b/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit.phtml index 413d8912319..e4522f4ee07 100644 --- a/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit.phtml +++ b/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <script type="text/javascript"> diff --git a/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit/attributes.phtml b/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit/attributes.phtml index 2f30af6148a..8e7874fdb9a 100644 --- a/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit/attributes.phtml +++ b/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit/attributes.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getAttributeSetSelected()): ?> diff --git a/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit/select.phtml b/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit/select.phtml index f96ab95b15b..12d6240c2a3 100644 --- a/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit/select.phtml +++ b/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit/select.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <select id="<?php echo $this->getId() ?>" name="<?php echo $this->getName() ?>" class="<?php echo $this->getClass() ?>" title=""> diff --git a/app/code/Magento/GroupedProduct/view/adminhtml/templates/catalog/product/composite/fieldset/grouped.phtml b/app/code/Magento/GroupedProduct/view/adminhtml/templates/catalog/product/composite/fieldset/grouped.phtml index 4a56a6d0201..313e4d7609f 100644 --- a/app/code/Magento/GroupedProduct/view/adminhtml/templates/catalog/product/composite/fieldset/grouped.phtml +++ b/app/code/Magento/GroupedProduct/view/adminhtml/templates/catalog/product/composite/fieldset/grouped.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped */ ?> diff --git a/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/grouped.phtml b/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/grouped.phtml index cc004245ca1..606ffd2db79 100644 --- a/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/grouped.phtml +++ b/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/grouped.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Framework\View\Element\Template */ /** @var $this \Magento\Framework\View\Element\Template */ diff --git a/app/code/Magento/GroupedProduct/view/base/templates/product/price/final_price.phtml b/app/code/Magento/GroupedProduct/view/base/templates/product/price/final_price.phtml index 32f56c0335d..4fd443ebd0e 100644 --- a/app/code/Magento/GroupedProduct/view/base/templates/product/price/final_price.phtml +++ b/app/code/Magento/GroupedProduct/view/base/templates/product/price/final_price.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Template for displaying grouped product price */ diff --git a/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/default.phtml b/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/default.phtml index bc523529d2b..101b03c27ad 100644 --- a/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/default.phtml +++ b/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Catalog\Block\Product\View\AbstractView */?> <?php $_product = $this->getProduct() ?> diff --git a/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/grouped.phtml b/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/grouped.phtml index d967773835b..d7b5be26440 100644 --- a/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/grouped.phtml +++ b/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/grouped.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Grouped product data template * diff --git a/app/code/Magento/ImportExport/Helper/Data.php b/app/code/Magento/ImportExport/Helper/Data.php index 35b01913433..a78aa24f6f5 100644 --- a/app/code/Magento/ImportExport/Helper/Data.php +++ b/app/code/Magento/ImportExport/Helper/Data.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\ImportExport\Helper; /** diff --git a/app/code/Magento/ImportExport/Model/Export.php b/app/code/Magento/ImportExport/Model/Export.php index d4555391afd..10086e5d375 100644 --- a/app/code/Magento/ImportExport/Model/Export.php +++ b/app/code/Magento/ImportExport/Model/Export.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\ImportExport\Model; /** diff --git a/app/code/Magento/ImportExport/Model/Export/Entity/Factory.php b/app/code/Magento/ImportExport/Model/Export/Entity/Factory.php index 2b1be05028d..a4b1ce26bb1 100644 --- a/app/code/Magento/ImportExport/Model/Export/Entity/Factory.php +++ b/app/code/Magento/ImportExport/Model/Export/Entity/Factory.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Export entity factory */ diff --git a/app/code/Magento/ImportExport/Model/Import.php b/app/code/Magento/ImportExport/Model/Import.php index 00d0d4e6710..1391395f6ce 100644 --- a/app/code/Magento/ImportExport/Model/Import.php +++ b/app/code/Magento/ImportExport/Model/Import.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\ImportExport\Model; use Magento\Framework\App\Filesystem\DirectoryList; diff --git a/app/code/Magento/ImportExport/Model/Import/Entity/Factory.php b/app/code/Magento/ImportExport/Model/Import/Entity/Factory.php index a0b66d93451..534a9a956a9 100644 --- a/app/code/Magento/ImportExport/Model/Import/Entity/Factory.php +++ b/app/code/Magento/ImportExport/Model/Import/Entity/Factory.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Import entity factory */ diff --git a/app/code/Magento/Integration/view/adminhtml/templates/integration/tokens_exchange.phtml b/app/code/Magento/Integration/view/adminhtml/templates/integration/tokens_exchange.phtml index f21c7f420bf..7eebfd9c028 100644 --- a/app/code/Magento/Integration/view/adminhtml/templates/integration/tokens_exchange.phtml +++ b/app/code/Magento/Integration/view/adminhtml/templates/integration/tokens_exchange.phtml @@ -6,5 +6,8 @@ * * @var \Magento\Backend\Block\Template $this */ + +// @codingStandardsIgnoreFile + ?> <div><p><?php echo __("Please setup or sign in into your 3rd party account to complete setup of this integration."); ?></p></div> diff --git a/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/filter.phtml b/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/filter.phtml index 113ab36c993..a0a41bca4fa 100644 --- a/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/filter.phtml +++ b/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/filter.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/state.phtml b/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/state.phtml index 2be4ce8e96c..729e92d1be0 100644 --- a/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/state.phtml +++ b/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/state.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/view.phtml b/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/view.phtml index 6f6e77d8237..784dc05e886 100644 --- a/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/view.phtml +++ b/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/view.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Log/Model/Resource/Visitor/Online.php b/app/code/Magento/Log/Model/Resource/Visitor/Online.php index be4001bac13..26b2d2d5f97 100644 --- a/app/code/Magento/Log/Model/Resource/Visitor/Online.php +++ b/app/code/Magento/Log/Model/Resource/Visitor/Online.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Log\Model\Resource\Visitor; /** diff --git a/app/code/Magento/Log/view/adminhtml/templates/customer/status.phtml b/app/code/Magento/Log/view/adminhtml/templates/customer/status.phtml index d194d71f65f..075377b3b1d 100644 --- a/app/code/Magento/Log/view/adminhtml/templates/customer/status.phtml +++ b/app/code/Magento/Log/view/adminhtml/templates/customer/status.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Template for block \Magento\Log\Block\Adminhtml\Customer\Edit\Tab\View\Status */ diff --git a/app/code/Magento/Log/view/adminhtml/templates/online.phtml b/app/code/Magento/Log/view/adminhtml/templates/online.phtml index d446e7eaee5..26850ee918e 100644 --- a/app/code/Magento/Log/view/adminhtml/templates/online.phtml +++ b/app/code/Magento/Log/view/adminhtml/templates/online.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml('grid') ?> diff --git a/app/code/Magento/Msrp/view/base/templates/product/price/msrp.phtml b/app/code/Magento/Msrp/view/base/templates/product/price/msrp.phtml index bfe801cccb8..e74bb547f20 100644 --- a/app/code/Magento/Msrp/view/base/templates/product/price/msrp.phtml +++ b/app/code/Magento/Msrp/view/base/templates/product/price/msrp.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Template for displaying product price at product view page, gift registry and wish-list * diff --git a/app/code/Magento/Msrp/view/frontend/templates/popup.phtml b/app/code/Magento/Msrp/view/frontend/templates/popup.phtml index ee3ec7be46e..d61236583e9 100644 --- a/app/code/Magento/Msrp/view/frontend/templates/popup.phtml +++ b/app/code/Magento/Msrp/view/frontend/templates/popup.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Msrp\Block\Popup $this */ diff --git a/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_item.phtml b/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_item.phtml index 9979e1bb584..75097e82228 100644 --- a/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_item.phtml +++ b/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_item.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_rss.phtml b/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_rss.phtml index e4ee99a8851..9b8f6510f2e 100644 --- a/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_rss.phtml +++ b/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_rss.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Multishipping/Helper/Data.php b/app/code/Magento/Multishipping/Helper/Data.php index fe169a55d15..92443ba7a48 100644 --- a/app/code/Magento/Multishipping/Helper/Data.php +++ b/app/code/Magento/Multishipping/Helper/Data.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Multishipping\Helper; /** diff --git a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php index f8366b4b746..1a897fe5fc2 100644 --- a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php +++ b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Multishipping\Model\Checkout\Type; use Magento\Customer\Api\AddressRepositoryInterface; diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/address/select.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/address/select.phtml index e0ef6d0cfea..b8cf32fd4bf 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/address/select.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/address/select.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var \Magento\Multishipping\Block\Checkout\Address\Select $this */ ?> <div class="multicheckout"> diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml index 1d14b7d4ab2..040ee3d8cd0 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml index 1abfdde62aa..3fa83ad0a73 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing/items.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing/items.phtml index a10fd958370..7c2f483c605 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing/items.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getQuote()->hasVirtualItems()): ?> <div class="block block-other"> diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/item/default.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/item/default.phtml index da88fce05fe..3f2e0ccf6e6 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/item/default.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/item/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <strong class="product name product-item-name"><a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a></strong> <?php if ($_options = $this->getOptionList()): ?> diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/link.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/link.phtml index dc3aad22a5f..8c777825062 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/link.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/link.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <a class="action multicheckout" href="<?php echo $this->getCheckoutUrl()?>" title="<?php echo __('Checkout with Multiple Addresses');?>"><span><?php echo __('Checkout with Multiple Addresses');?></span></a> diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview.phtml index e0b908a5a0e..d5b6400097c 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="review-order-form" data-mage-init='{"orderOverview": {}}' class="form multicheckout order-review"> <?php echo $this->getBlockHtml('formkey'); ?> diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview/item.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview/item.phtml index 7d00a603a54..6ee611275c8 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview/item.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview/item.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/shipping.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/shipping.phtml index 455d4ac40e3..0554bc601f7 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/shipping.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/shipping.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/state.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/state.phtml index e57a5ff45e8..6eaac144936 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/state.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/state.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/success.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/success.phtml index fef56ef0c7a..88e71617a42 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/success.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/success.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="multicheckout success"> <h2 class="subtitle"><?php echo __('Thank you for your purchase!') ?></h2> diff --git a/app/code/Magento/Multishipping/view/frontend/templates/js/components.phtml b/app/code/Magento/Multishipping/view/frontend/templates/js/components.phtml index 5c84082b62f..e5fab539878 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/js/components.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml() ?> diff --git a/app/code/Magento/Multishipping/view/frontend/templates/multishipping/item/default.phtml b/app/code/Magento/Multishipping/view/frontend/templates/multishipping/item/default.phtml index 75203ad64d3..7340932a0e5 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/multishipping/item/default.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/multishipping/item/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="product details"> <strong class="product name"><a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a></strong> diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php index 511c0b44b4a..a2589666709 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Newsletter\Block\Adminhtml\Queue\Edit; /** diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php index 8f7674d8a1b..54b1c99aba0 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Newsletter Template Edit Block * diff --git a/app/code/Magento/Newsletter/Controller/Adminhtml/Queue/Save.php b/app/code/Magento/Newsletter/Controller/Adminhtml/Queue/Save.php index f6dc01385e4..fc66ca0bdfc 100644 --- a/app/code/Magento/Newsletter/Controller/Adminhtml/Queue/Save.php +++ b/app/code/Magento/Newsletter/Controller/Adminhtml/Queue/Save.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Newsletter\Controller\Adminhtml\Queue; class Save extends \Magento\Newsletter\Controller\Adminhtml\Queue diff --git a/app/code/Magento/Newsletter/Model/Resource/Grid/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Grid/Collection.php index 74ee11375f4..2c6863654c8 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Grid/Collection.php +++ b/app/code/Magento/Newsletter/Model/Resource/Grid/Collection.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Newsletter problems collection * diff --git a/app/code/Magento/Newsletter/Model/Resource/Template.php b/app/code/Magento/Newsletter/Model/Resource/Template.php index 5a301cee8dc..f74165d7be9 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Template.php +++ b/app/code/Magento/Newsletter/Model/Resource/Template.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Newsletter\Model\Resource; /** diff --git a/app/code/Magento/Newsletter/view/adminhtml/templates/preview/iframeswitcher.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/preview/iframeswitcher.phtml index 44c2d72ca23..935d3eece31 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/templates/preview/iframeswitcher.phtml +++ b/app/code/Magento/Newsletter/view/adminhtml/templates/preview/iframeswitcher.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div id="preview" class="cms-revision-preview"> <div class="toolbar"> diff --git a/app/code/Magento/Newsletter/view/adminhtml/templates/preview/store.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/preview/store.phtml index 33a1ba8d67c..a974d63832c 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/templates/preview/store.phtml +++ b/app/code/Magento/Newsletter/view/adminhtml/templates/preview/store.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($websites = $this->getWebsites()): ?> diff --git a/app/code/Magento/Newsletter/view/adminhtml/templates/problem/list.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/problem/list.phtml index d4a1be5154d..9c0badadde1 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/templates/problem/list.phtml +++ b/app/code/Magento/Newsletter/view/adminhtml/templates/problem/list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml('grid') ?> diff --git a/app/code/Magento/Newsletter/view/adminhtml/templates/queue/edit.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/queue/edit.phtml index 13814175625..c287058e404 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/templates/queue/edit.phtml +++ b/app/code/Magento/Newsletter/view/adminhtml/templates/queue/edit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Newsletter\Block\Adminhtml\Queue\Edit */ ?> <div class="page-actions"> diff --git a/app/code/Magento/Newsletter/view/adminhtml/templates/queue/list.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/queue/list.phtml index 758e619d385..7c2de12b44d 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/templates/queue/list.phtml +++ b/app/code/Magento/Newsletter/view/adminhtml/templates/queue/list.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml('grid'); ?> diff --git a/app/code/Magento/Newsletter/view/adminhtml/templates/subscriber/list.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/subscriber/list.phtml index 7c48786418a..e806bd0ada5 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/templates/subscriber/list.phtml +++ b/app/code/Magento/Newsletter/view/adminhtml/templates/subscriber/list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml('grid') ?> <?php if (count($this->getQueueAsOptions())>0 && $this->getShowQueueAdd()): ?> diff --git a/app/code/Magento/Newsletter/view/adminhtml/templates/template/edit.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/template/edit.phtml index 7e1bc32c1e0..ed3488b7586 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/templates/template/edit.phtml +++ b/app/code/Magento/Newsletter/view/adminhtml/templates/template/edit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Newsletter\Block\Adminhtml\Template\Edit */ ?> <form action="<?php echo $this->getSaveUrl() ?>" method="post" id="newsletter_template_edit_form"> diff --git a/app/code/Magento/Newsletter/view/adminhtml/templates/template/list.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/template/list.phtml index d446e7eaee5..26850ee918e 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/templates/template/list.phtml +++ b/app/code/Magento/Newsletter/view/adminhtml/templates/template/list.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml('grid') ?> diff --git a/app/code/Magento/Newsletter/view/frontend/templates/js/components.phtml b/app/code/Magento/Newsletter/view/frontend/templates/js/components.phtml index 5c84082b62f..e5fab539878 100644 --- a/app/code/Magento/Newsletter/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Newsletter/view/frontend/templates/js/components.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml() ?> diff --git a/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml b/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml index d53d0c501c9..c550e269158 100644 --- a/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml +++ b/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="block newsletter"> <div class="title"><strong>Newsletter</strong></div> diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/banktransfer.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/banktransfer.phtml index a0caf19b3fe..b30fede309c 100644 --- a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/banktransfer.phtml +++ b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/banktransfer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($instructions = $this->getInstructions()): ?> <ul class="form-list checkout-agreements" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none;"> diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/cashondelivery.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/cashondelivery.phtml index a9b75a73efd..6a985d49748 100644 --- a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/cashondelivery.phtml +++ b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/cashondelivery.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * @var $this \Magento\OfflinePayments\Block\Form\Cashondelivery */ diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/checkmo.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/checkmo.phtml index 950cb3e4650..19494ad6f23 100644 --- a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/checkmo.phtml +++ b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/checkmo.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <fieldset class="fieldset payment method" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none"> <?php if ($this->getMethod()->getPayableTo()): ?> diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/purchaseorder.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/purchaseorder.phtml index a2052716743..04450ad8600 100644 --- a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/purchaseorder.phtml +++ b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/purchaseorder.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <fieldset class="fieldset payment method" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none"> <div class="field field-number required"> diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/templates/info/checkmo.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/info/checkmo.phtml index 02135b9bd9f..f23d494e4de 100644 --- a/app/code/Magento/OfflinePayments/view/adminhtml/templates/info/checkmo.phtml +++ b/app/code/Magento/OfflinePayments/view/adminhtml/templates/info/checkmo.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?> <?php if ($this->getInfo()->getAdditionalData()): ?> diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/templates/info/pdf/checkmo.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/info/pdf/checkmo.phtml index 30a7fa5b3f2..17f92446862 100644 --- a/app/code/Magento/OfflinePayments/view/adminhtml/templates/info/pdf/checkmo.phtml +++ b/app/code/Magento/OfflinePayments/view/adminhtml/templates/info/pdf/checkmo.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?> {{pdf_row_separator}} diff --git a/app/code/Magento/OfflinePayments/view/frontend/templates/form/banktransfer.phtml b/app/code/Magento/OfflinePayments/view/frontend/templates/form/banktransfer.phtml index 6b6dad86dea..0f128fc4300 100644 --- a/app/code/Magento/OfflinePayments/view/frontend/templates/form/banktransfer.phtml +++ b/app/code/Magento/OfflinePayments/view/frontend/templates/form/banktransfer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($instructions = $this->getInstructions()): ?> <div class="items <?php echo $this->getMethodCode() ?> instructions agreement content" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display: none;"> diff --git a/app/code/Magento/OfflinePayments/view/frontend/templates/form/cashondelivery.phtml b/app/code/Magento/OfflinePayments/view/frontend/templates/form/cashondelivery.phtml index 62a4c36e5d3..b203c318e86 100644 --- a/app/code/Magento/OfflinePayments/view/frontend/templates/form/cashondelivery.phtml +++ b/app/code/Magento/OfflinePayments/view/frontend/templates/form/cashondelivery.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * @see \Magento\OfflinePayments\Block\Form\Cashondelivery */ diff --git a/app/code/Magento/OfflinePayments/view/frontend/templates/form/checkmo.phtml b/app/code/Magento/OfflinePayments/view/frontend/templates/form/checkmo.phtml index cfd2fc328e4..d58f4d569c5 100644 --- a/app/code/Magento/OfflinePayments/view/frontend/templates/form/checkmo.phtml +++ b/app/code/Magento/OfflinePayments/view/frontend/templates/form/checkmo.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getMethod()->getMailingAddress() || $this->getMethod()->getPayableTo()): ?> <dl class="items check payable" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none;"> diff --git a/app/code/Magento/OfflinePayments/view/frontend/templates/form/purchaseorder.phtml b/app/code/Magento/OfflinePayments/view/frontend/templates/form/purchaseorder.phtml index c5573da40a5..e723450bd71 100644 --- a/app/code/Magento/OfflinePayments/view/frontend/templates/form/purchaseorder.phtml +++ b/app/code/Magento/OfflinePayments/view/frontend/templates/form/purchaseorder.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <fieldset class="fieldset items <?php echo $this->getMethodCode() ?>" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display: none"> <div class="field number required"> diff --git a/app/code/Magento/OfflinePayments/view/frontend/templates/info/checkmo.phtml b/app/code/Magento/OfflinePayments/view/frontend/templates/info/checkmo.phtml index e03520ebba5..3a028d8d9e9 100644 --- a/app/code/Magento/OfflinePayments/view/frontend/templates/info/checkmo.phtml +++ b/app/code/Magento/OfflinePayments/view/frontend/templates/info/checkmo.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <dl class="payment-method checkmemo"> <dt class="title"><?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?></dt> diff --git a/app/code/Magento/OfflineShipping/Model/Plugin/Checkout/Block/Cart/Shipping.php b/app/code/Magento/OfflineShipping/Model/Plugin/Checkout/Block/Cart/Shipping.php index 21d23a56374..eb1db1026ce 100644 --- a/app/code/Magento/OfflineShipping/Model/Plugin/Checkout/Block/Cart/Shipping.php +++ b/app/code/Magento/OfflineShipping/Model/Plugin/Checkout/Block/Cart/Shipping.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Checkout cart shipping block plugin * diff --git a/app/code/Magento/PageCache/view/frontend/templates/js/components.phtml b/app/code/Magento/PageCache/view/frontend/templates/js/components.phtml index 5c84082b62f..e5fab539878 100644 --- a/app/code/Magento/PageCache/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/PageCache/view/frontend/templates/js/components.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml() ?> diff --git a/app/code/Magento/Payment/Model/Method/AbstractMethod.php b/app/code/Magento/Payment/Model/Method/AbstractMethod.php index 1261f429355..eeb33441e6c 100644 --- a/app/code/Magento/Payment/Model/Method/AbstractMethod.php +++ b/app/code/Magento/Payment/Model/Method/AbstractMethod.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Payment\Model\Method; use Magento\Payment\Model\Checks\PaymentMethodChecksInterface; diff --git a/app/code/Magento/Payment/view/adminhtml/templates/form/cc.phtml b/app/code/Magento/Payment/view/adminhtml/templates/form/cc.phtml index 095cfba6dad..7c1ee601478 100644 --- a/app/code/Magento/Payment/view/adminhtml/templates/form/cc.phtml +++ b/app/code/Magento/Payment/view/adminhtml/templates/form/cc.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_code = $this->getMethodCode() ?> <fieldset class="fieldset payment method" id="payment_form_<?php echo $_code ?>" style="display:none"> diff --git a/app/code/Magento/Payment/view/adminhtml/templates/info/default.phtml b/app/code/Magento/Payment/view/adminhtml/templates/info/default.phtml index 7e1284aa40d..277c645043e 100644 --- a/app/code/Magento/Payment/view/adminhtml/templates/info/default.phtml +++ b/app/code/Magento/Payment/view/adminhtml/templates/info/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Payment/view/adminhtml/templates/info/instructions.phtml b/app/code/Magento/Payment/view/adminhtml/templates/info/instructions.phtml index d40d7c99fb8..214c01fc2fd 100644 --- a/app/code/Magento/Payment/view/adminhtml/templates/info/instructions.phtml +++ b/app/code/Magento/Payment/view/adminhtml/templates/info/instructions.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Payment/view/adminhtml/templates/info/pdf/default.phtml b/app/code/Magento/Payment/view/adminhtml/templates/info/pdf/default.phtml index 31aba635836..17a383897ff 100644 --- a/app/code/Magento/Payment/view/adminhtml/templates/info/pdf/default.phtml +++ b/app/code/Magento/Payment/view/adminhtml/templates/info/pdf/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Payment/view/adminhtml/templates/info/substitution.phtml b/app/code/Magento/Payment/view/adminhtml/templates/info/substitution.phtml index efc3e14c003..bd9c8864abe 100644 --- a/app/code/Magento/Payment/view/adminhtml/templates/info/substitution.phtml +++ b/app/code/Magento/Payment/view/adminhtml/templates/info/substitution.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div><?php echo __('%1 is not available. You still can process offline actions.', $this->escapeHtml($this->getMethod()->getTitle())) ?></div> diff --git a/app/code/Magento/Payment/view/frontend/templates/form/cc.phtml b/app/code/Magento/Payment/view/frontend/templates/form/cc.phtml index 381f63f6ba9..b2cb2922c14 100644 --- a/app/code/Magento/Payment/view/frontend/templates/form/cc.phtml +++ b/app/code/Magento/Payment/view/frontend/templates/form/cc.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_code = $this->getMethodCode() ?> <fieldset class="fieldset payment items ccard <?php echo $_code ?>" id="payment_form_<?php echo $_code ?>" style="display: none;"> diff --git a/app/code/Magento/Payment/view/frontend/templates/info/default.phtml b/app/code/Magento/Payment/view/frontend/templates/info/default.phtml index f72277eb033..e72a7db8b2f 100644 --- a/app/code/Magento/Payment/view/frontend/templates/info/default.phtml +++ b/app/code/Magento/Payment/view/frontend/templates/info/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Payment/view/frontend/templates/info/instructions.phtml b/app/code/Magento/Payment/view/frontend/templates/info/instructions.phtml index 4578445a580..0b86114aa42 100644 --- a/app/code/Magento/Payment/view/frontend/templates/info/instructions.phtml +++ b/app/code/Magento/Payment/view/frontend/templates/info/instructions.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Persistent/view/frontend/templates/remember_me.phtml b/app/code/Magento/Persistent/view/frontend/templates/remember_me.phtml index 963b0b303b1..0989f4badb1 100644 --- a/app/code/Magento/Persistent/view/frontend/templates/remember_me.phtml +++ b/app/code/Magento/Persistent/view/frontend/templates/remember_me.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/ProductAlert/Block/Email/AbstractEmail.php b/app/code/Magento/ProductAlert/Block/Email/AbstractEmail.php index 25cdfd3fe4f..2fd4d4c5bbf 100644 --- a/app/code/Magento/ProductAlert/Block/Email/AbstractEmail.php +++ b/app/code/Magento/ProductAlert/Block/Email/AbstractEmail.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\ProductAlert\Block\Email; use Magento\Framework\Pricing\PriceCurrencyInterface; diff --git a/app/code/Magento/ProductAlert/Model/Resource/Price.php b/app/code/Magento/ProductAlert/Model/Resource/Price.php index 786460ccb58..f414b0399f9 100644 --- a/app/code/Magento/ProductAlert/Model/Resource/Price.php +++ b/app/code/Magento/ProductAlert/Model/Resource/Price.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\ProductAlert\Model\Resource; /** diff --git a/app/code/Magento/ProductAlert/Model/Resource/Stock.php b/app/code/Magento/ProductAlert/Model/Resource/Stock.php index 69757090fe0..0c11463f35a 100644 --- a/app/code/Magento/ProductAlert/Model/Resource/Stock.php +++ b/app/code/Magento/ProductAlert/Model/Resource/Stock.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\ProductAlert\Model\Resource; /** diff --git a/app/code/Magento/ProductAlert/view/frontend/templates/email/price.phtml b/app/code/Magento/ProductAlert/view/frontend/templates/email/price.phtml index 0057aab7aa8..19d1fe4829a 100644 --- a/app/code/Magento/ProductAlert/view/frontend/templates/email/price.phtml +++ b/app/code/Magento/ProductAlert/view/frontend/templates/email/price.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\ProductAlert\Block\Email\Price */ ?> <?php if ($_products = $this->getProducts()): ?> diff --git a/app/code/Magento/ProductAlert/view/frontend/templates/email/stock.phtml b/app/code/Magento/ProductAlert/view/frontend/templates/email/stock.phtml index ef2e54319e9..2929072d9db 100644 --- a/app/code/Magento/ProductAlert/view/frontend/templates/email/stock.phtml +++ b/app/code/Magento/ProductAlert/view/frontend/templates/email/stock.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\ProductAlert\Block\Email\Stock */ ?> <?php if ($_products = $this->getProducts()): ?> diff --git a/app/code/Magento/Reports/Block/Adminhtml/Filter/Form.php b/app/code/Magento/Reports/Block/Adminhtml/Filter/Form.php index c70792b3b7d..af43aba1250 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Filter/Form.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Filter/Form.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Block\Adminhtml\Filter; /** diff --git a/app/code/Magento/Reports/Block/Adminhtml/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Grid.php index b8f61390531..2d9b1a9c3cb 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Grid.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Block\Adminhtml; /** diff --git a/app/code/Magento/Reports/Block/Adminhtml/Grid/Column/Renderer/Currency.php b/app/code/Magento/Reports/Block/Adminhtml/Grid/Column/Renderer/Currency.php index 589babea74d..4c35712dee5 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Grid/Column/Renderer/Currency.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Grid/Column/Renderer/Currency.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Block\Adminhtml\Grid\Column\Renderer; /** diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced/Grid.php index 38d3beec3ad..82552c5ecc7 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced/Grid.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Block\Adminhtml\Sales\Invoiced; /** diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded/Grid.php index 13eaebac77f..2bb43e23e23 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded/Grid.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Block\Adminhtml\Sales\Refunded; /** diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales/Grid.php index e6518ab8daa..3ea21242098 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales/Grid.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Block\Adminhtml\Sales\Sales; /** diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping/Grid.php index 2c36b41b634..22c68d6239e 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping/Grid.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Block\Adminhtml\Sales\Shipping; /** diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax/Grid.php index bc26a7aa772..41a1496dcc0 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax/Grid.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Block\Adminhtml\Sales\Tax; /** diff --git a/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php b/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php index f8f00d0359b..c50cb761fe9 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Block\Adminhtml; /** diff --git a/app/code/Magento/Reports/Block/Product/Compared.php b/app/code/Magento/Reports/Block/Product/Compared.php index df1806c11eb..0651603c16a 100644 --- a/app/code/Magento/Reports/Block/Product/Compared.php +++ b/app/code/Magento/Reports/Block/Product/Compared.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Block\Product; /** diff --git a/app/code/Magento/Reports/Block/Product/Viewed.php b/app/code/Magento/Reports/Block/Product/Viewed.php index 3d04074d380..f0fcfaedf29 100644 --- a/app/code/Magento/Reports/Block/Product/Viewed.php +++ b/app/code/Magento/Reports/Block/Product/Viewed.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Block\Product; /** diff --git a/app/code/Magento/Reports/Helper/Data.php b/app/code/Magento/Reports/Helper/Data.php index dbc868823e0..f55f55e7e42 100644 --- a/app/code/Magento/Reports/Helper/Data.php +++ b/app/code/Magento/Reports/Helper/Data.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Reports data helper */ diff --git a/app/code/Magento/Reports/Model/DateFactory.php b/app/code/Magento/Reports/Model/DateFactory.php index b271d5d276e..0f244ecd8e1 100644 --- a/app/code/Magento/Reports/Model/DateFactory.php +++ b/app/code/Magento/Reports/Model/DateFactory.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Model; class DateFactory diff --git a/app/code/Magento/Reports/Model/Resource/Entity/Summary/Collection/AbstractCollection.php b/app/code/Magento/Reports/Model/Resource/Entity/Summary/Collection/AbstractCollection.php index 2b83d5ed6a7..29305569112 100644 --- a/app/code/Magento/Reports/Model/Resource/Entity/Summary/Collection/AbstractCollection.php +++ b/app/code/Magento/Reports/Model/Resource/Entity/Summary/Collection/AbstractCollection.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Reports summary collection * diff --git a/app/code/Magento/Reports/Model/Resource/Order/Collection.php b/app/code/Magento/Reports/Model/Resource/Order/Collection.php index ce22dd6b495..842d1c99fb6 100644 --- a/app/code/Magento/Reports/Model/Resource/Order/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Order/Collection.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Model\Resource\Order; use Magento\Framework\DB\Select; diff --git a/app/code/Magento/Reports/Model/Resource/Product/Index/AbstractIndex.php b/app/code/Magento/Reports/Model/Resource/Product/Index/AbstractIndex.php index 630fd2ca978..c09f169bdc7 100644 --- a/app/code/Magento/Reports/Model/Resource/Product/Index/AbstractIndex.php +++ b/app/code/Magento/Reports/Model/Resource/Product/Index/AbstractIndex.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Model\Resource\Product\Index; /** diff --git a/app/code/Magento/Reports/Model/Resource/Quote/Collection.php b/app/code/Magento/Reports/Model/Resource/Quote/Collection.php index 50a0031ab5f..1cbb1e8ad2f 100644 --- a/app/code/Magento/Reports/Model/Resource/Quote/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Quote/Collection.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Reports quote collection * diff --git a/app/code/Magento/Reports/Model/Resource/Report/AbstractReport.php b/app/code/Magento/Reports/Model/Resource/Report/AbstractReport.php index e52ccfcba2d..9a02448ae02 100644 --- a/app/code/Magento/Reports/Model/Resource/Report/AbstractReport.php +++ b/app/code/Magento/Reports/Model/Resource/Report/AbstractReport.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Reports\Model\Resource\Report; /** diff --git a/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed.php b/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed.php index 49b2e991485..a4b3afce59c 100644 --- a/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed.php +++ b/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Most viewed product report aggregate resource model * diff --git a/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed/Collection.php b/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed/Collection.php index 322f2672dd0..949e590dfcb 100644 --- a/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed/Collection.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Report most viewed collection */ diff --git a/app/code/Magento/Reports/data/reports_setup/data-install-2.0.0.php b/app/code/Magento/Reports/data/reports_setup/data-install-2.0.0.php index 9a757eefedd..42efcf641c4 100644 --- a/app/code/Magento/Reports/data/reports_setup/data-install-2.0.0.php +++ b/app/code/Magento/Reports/data/reports_setup/data-install-2.0.0.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $installer \Magento\Reports\Model\Resource\Setup */ $installer = $this; /* diff --git a/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml b/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml index 9177665ad96..93c0e9f8267 100644 --- a/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml +++ b/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Reports\Block\Adminhtml\Grid */ diff --git a/app/code/Magento/Reports/view/adminhtml/templates/report/grid/container.phtml b/app/code/Magento/Reports/view/adminhtml/templates/report/grid/container.phtml index 1e195c0d2b5..cf4099dafa6 100644 --- a/app/code/Magento/Reports/view/adminhtml/templates/report/grid/container.phtml +++ b/app/code/Magento/Reports/view/adminhtml/templates/report/grid/container.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="reports-content"> diff --git a/app/code/Magento/Reports/view/adminhtml/templates/report/refresh/statistics.phtml b/app/code/Magento/Reports/view/adminhtml/templates/report/refresh/statistics.phtml index f402f631970..5e5f565f376 100644 --- a/app/code/Magento/Reports/view/adminhtml/templates/report/refresh/statistics.phtml +++ b/app/code/Magento/Reports/view/adminhtml/templates/report/refresh/statistics.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="page-actions"><?php echo $this->getButtonsHtml() ?></div> <?php echo $this->getChildHtml('grid') ?> diff --git a/app/code/Magento/Reports/view/adminhtml/templates/store/switcher.phtml b/app/code/Magento/Reports/view/adminhtml/templates/store/switcher.phtml index f4245f6886d..4e190b604b6 100644 --- a/app/code/Magento/Reports/view/adminhtml/templates/store/switcher.phtml +++ b/app/code/Magento/Reports/view/adminhtml/templates/store/switcher.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Reports/view/adminhtml/templates/store/switcher/enhanced.phtml b/app/code/Magento/Reports/view/adminhtml/templates/store/switcher/enhanced.phtml index dace3ba2fd5..e8e2331757f 100644 --- a/app/code/Magento/Reports/view/adminhtml/templates/store/switcher/enhanced.phtml +++ b/app/code/Magento/Reports/view/adminhtml/templates/store/switcher/enhanced.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Reports/view/frontend/templates/js/components.phtml b/app/code/Magento/Reports/view/frontend/templates/js/components.phtml index 5c84082b62f..e5fab539878 100644 --- a/app/code/Magento/Reports/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/js/components.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml() ?> diff --git a/app/code/Magento/Reports/view/frontend/templates/product/widget/viewed.phtml b/app/code/Magento/Reports/view/frontend/templates/product/widget/viewed.phtml index 5d58c3f3f27..a5de72bd43d 100644 --- a/app/code/Magento/Reports/view/frontend/templates/product/widget/viewed.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/product/widget/viewed.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Reports\Block\Product\Widget\Viewed */ ?> diff --git a/app/code/Magento/Reports/view/frontend/templates/product/widget/viewed/item.phtml b/app/code/Magento/Reports/view/frontend/templates/product/widget/viewed/item.phtml index 3bf84970fcb..8bc88f7b483 100644 --- a/app/code/Magento/Reports/view/frontend/templates/product/widget/viewed/item.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/product/widget/viewed/item.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Reports\Block\Product\Widget\Viewed\Item */ ?> diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml index 09568d162a6..0b60d456a10 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($exist = $this->getRecentlyComparedProducts()) { diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_images_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_images_list.phtml index b359b234abb..e6b1b6d2ac5 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_images_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_images_list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($exist = $this->getRecentlyComparedProducts()) { diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_names_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_names_list.phtml index ebd6bfdf55e..31c7b6dc453 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_names_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_names_list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($_products = $this->getRecentlyComparedProducts()): ?> <div class="block widget block-compared-products-names"> diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_grid.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_grid.phtml index c26b9f6e768..9576e984570 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_grid.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_grid.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml index 9033fa3bfe5..444bd13efcb 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml index 584ffdc88a9..4193f2697de 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_images_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_images_list.phtml index 351e92b2d24..dbd8cd98cdd 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_images_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_images_list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_names_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_names_list.phtml index a082370dbd0..909e8aa65d1 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_names_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_names_list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml index b5313c7e613..84a0c8428ec 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml index c352b463f3d..f07e3bc5a1e 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Review/Block/Adminhtml/Add.php b/app/code/Magento/Review/Block/Adminhtml/Add.php index e4e67dea6b3..03588d6af6a 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Add.php +++ b/app/code/Magento/Review/Block/Adminhtml/Add.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Review\Block\Adminhtml; /** diff --git a/app/code/Magento/Review/Block/Adminhtml/Grid.php b/app/code/Magento/Review/Block/Adminhtml/Grid.php index 0e0542f0c13..a73a35d27f3 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Grid.php +++ b/app/code/Magento/Review/Block/Adminhtml/Grid.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Adminhtml reviews grid * diff --git a/app/code/Magento/Review/Helper/Action/Pager.php b/app/code/Magento/Review/Helper/Action/Pager.php index f6569d1d3e0..de47f0b1b02 100644 --- a/app/code/Magento/Review/Helper/Action/Pager.php +++ b/app/code/Magento/Review/Helper/Action/Pager.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Review\Helper\Action; use Magento\Framework\Model\Exception; diff --git a/app/code/Magento/Review/Helper/Data.php b/app/code/Magento/Review/Helper/Data.php index 4174eccc53d..9b1dd906314 100644 --- a/app/code/Magento/Review/Helper/Data.php +++ b/app/code/Magento/Review/Helper/Data.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Review\Helper; /** diff --git a/app/code/Magento/Review/view/adminhtml/templates/rating/detailed.phtml b/app/code/Magento/Review/view/adminhtml/templates/rating/detailed.phtml index e87f63b0174..68f16846ce8 100644 --- a/app/code/Magento/Review/view/adminhtml/templates/rating/detailed.phtml +++ b/app/code/Magento/Review/view/adminhtml/templates/rating/detailed.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getRating() && $this->getRating()->getSize()): ?> <div class="nested"> diff --git a/app/code/Magento/Review/view/adminhtml/templates/rating/form.phtml b/app/code/Magento/Review/view/adminhtml/templates/rating/form.phtml index 0f4b8c6bd6d..c0f4ea304a0 100644 --- a/app/code/Magento/Review/view/adminhtml/templates/rating/form.phtml +++ b/app/code/Magento/Review/view/adminhtml/templates/rating/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="message info"> <div><?php echo __('Please specify a rating title for a store, or we\'ll just use the default value.'); ?></div> diff --git a/app/code/Magento/Review/view/adminhtml/templates/rating/options.phtml b/app/code/Magento/Review/view/adminhtml/templates/rating/options.phtml index 0ab7a3b4de2..3d5a1c0c009 100644 --- a/app/code/Magento/Review/view/adminhtml/templates/rating/options.phtml +++ b/app/code/Magento/Review/view/adminhtml/templates/rating/options.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="entry-edit-head"> <h4 class="icon-head head-edit-form fieldset-legend"><?php echo __('Assigned Options') ?></h4> diff --git a/app/code/Magento/Review/view/adminhtml/templates/rating/stars/detailed.phtml b/app/code/Magento/Review/view/adminhtml/templates/rating/stars/detailed.phtml index 4ec6674c39b..d32974f321e 100644 --- a/app/code/Magento/Review/view/adminhtml/templates/rating/stars/detailed.phtml +++ b/app/code/Magento/Review/view/adminhtml/templates/rating/stars/detailed.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getRating() && $this->getRating()->getSize()): ?> <div class="ratings-container"> diff --git a/app/code/Magento/Review/view/adminhtml/templates/rating/stars/summary.phtml b/app/code/Magento/Review/view/adminhtml/templates/rating/stars/summary.phtml index 7716d00fbd4..0d4c03f154e 100644 --- a/app/code/Magento/Review/view/adminhtml/templates/rating/stars/summary.phtml +++ b/app/code/Magento/Review/view/adminhtml/templates/rating/stars/summary.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getRatingSummary()->getCount()): ?> <div class="rating-box"> diff --git a/app/code/Magento/Review/view/adminhtml/templates/rss/grid/link.phtml b/app/code/Magento/Review/view/adminhtml/templates/rss/grid/link.phtml index 6419f60be39..ccbfb102d96 100644 --- a/app/code/Magento/Review/view/adminhtml/templates/rss/grid/link.phtml +++ b/app/code/Magento/Review/view/adminhtml/templates/rss/grid/link.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Review\Block\Adminhtml\Grid\Rss\Link */ ?> <?php if ($this->isRssAllowed() && $this->getLink()): ?> diff --git a/app/code/Magento/Review/view/frontend/templates/customer/list.phtml b/app/code/Magento/Review/view/frontend/templates/customer/list.phtml index 94054fc4fe4..d8e8aef972c 100644 --- a/app/code/Magento/Review/view/frontend/templates/customer/list.phtml +++ b/app/code/Magento/Review/view/frontend/templates/customer/list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getCollection() && $this->count()): ?> <div class="table-wrapper reviews"> diff --git a/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml b/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml index 161ed7f6b3b..de795d1cce0 100644 --- a/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml +++ b/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Review/view/frontend/templates/customer/view.phtml b/app/code/Magento/Review/view/frontend/templates/customer/view.phtml index a6a19b0e2a4..653f8aae0fb 100644 --- a/app/code/Magento/Review/view/frontend/templates/customer/view.phtml +++ b/app/code/Magento/Review/view/frontend/templates/customer/view.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getProductData()->getId()): ?> <?php $imageBlock = $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Image'); ?> diff --git a/app/code/Magento/Review/view/frontend/templates/detailed.phtml b/app/code/Magento/Review/view/frontend/templates/detailed.phtml index fdb61786f7b..cd663213fa9 100644 --- a/app/code/Magento/Review/view/frontend/templates/detailed.phtml +++ b/app/code/Magento/Review/view/frontend/templates/detailed.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if (!empty($collection) && $collection->getSize()): ?> <div class="table-wrapper"> diff --git a/app/code/Magento/Review/view/frontend/templates/form.phtml b/app/code/Magento/Review/view/frontend/templates/form.phtml index 25f20f4d2fa..a4deea40cc0 100644 --- a/app/code/Magento/Review/view/frontend/templates/form.phtml +++ b/app/code/Magento/Review/view/frontend/templates/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * @var $this \Magento\Review\Block\Form */ diff --git a/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml b/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml index 76be7566071..ecc695d9b51 100644 --- a/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml +++ b/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $url = $this->getReviewsUrl() . '#reviews'; ?> <?php $urlForm = $this->getReviewsUrl() . '#review-form'; ?> diff --git a/app/code/Magento/Review/view/frontend/templates/helper/summary_short.phtml b/app/code/Magento/Review/view/frontend/templates/helper/summary_short.phtml index d89c9ef7b0b..a6a4f5eda7d 100644 --- a/app/code/Magento/Review/view/frontend/templates/helper/summary_short.phtml +++ b/app/code/Magento/Review/view/frontend/templates/helper/summary_short.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $url = $this->getReviewsUrl() . '#reviews'; ?> <?php $urlForm = $this->getReviewsUrl() . '#review-form'; ?> diff --git a/app/code/Magento/Review/view/frontend/templates/product/view/count.phtml b/app/code/Magento/Review/view/frontend/templates/product/view/count.phtml index 9dd9d50e13a..46a99525725 100644 --- a/app/code/Magento/Review/view/frontend/templates/product/view/count.phtml +++ b/app/code/Magento/Review/view/frontend/templates/product/view/count.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if (!empty($count)):?> <a href="#customer-reviews" class="nobr"><?php echo __('%1 Review(s)', $count) ?></a> diff --git a/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml b/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml index 3cdf1a211cd..1d84497c0ae 100644 --- a/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml +++ b/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Review/view/frontend/templates/product/view/other.phtml b/app/code/Magento/Review/view/frontend/templates/product/view/other.phtml index ea8ec1c0314..d09c42cad3b 100644 --- a/app/code/Magento/Review/view/frontend/templates/product/view/other.phtml +++ b/app/code/Magento/Review/view/frontend/templates/product/view/other.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Review\Block\Product\View\Other */ ?> diff --git a/app/code/Magento/Review/view/frontend/templates/redirect.phtml b/app/code/Magento/Review/view/frontend/templates/redirect.phtml index 761e33d93c1..5611ccbb5f3 100644 --- a/app/code/Magento/Review/view/frontend/templates/redirect.phtml +++ b/app/code/Magento/Review/view/frontend/templates/redirect.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* if(isset($GET['limit'])) { diff --git a/app/code/Magento/Review/view/frontend/templates/view.phtml b/app/code/Magento/Review/view/frontend/templates/view.phtml index da96f08fb51..ebd70fcaf18 100644 --- a/app/code/Magento/Review/view/frontend/templates/view.phtml +++ b/app/code/Magento/Review/view/frontend/templates/view.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getProductData()->getId()): ?> <div class="product-review"> diff --git a/app/code/Magento/Rss/view/frontend/templates/feeds.phtml b/app/code/Magento/Rss/view/frontend/templates/feeds.phtml index f3a591f456e..6e13f8dc8e1 100644 --- a/app/code/Magento/Rss/view/frontend/templates/feeds.phtml +++ b/app/code/Magento/Rss/view/frontend/templates/feeds.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <table class="data table rss"> <caption class="table-caption"><?php echo __('Feed'); ?></caption> diff --git a/app/code/Magento/Rule/Model/AbstractModel.php b/app/code/Magento/Rule/Model/AbstractModel.php index cff0edf79a2..dd193d7d2e8 100644 --- a/app/code/Magento/Rule/Model/AbstractModel.php +++ b/app/code/Magento/Rule/Model/AbstractModel.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Abstract Rule entity data model */ diff --git a/app/code/Magento/Sales/Api/CreditmemoCommentRepositoryInterface.php b/app/code/Magento/Sales/Api/CreditmemoCommentRepositoryInterface.php index 767f850e2ec..ae03a9aeb69 100644 --- a/app/code/Magento/Sales/Api/CreditmemoCommentRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/CreditmemoCommentRepositoryInterface.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Api; /** diff --git a/app/code/Magento/Sales/Api/CreditmemoManagementInterface.php b/app/code/Magento/Sales/Api/CreditmemoManagementInterface.php index 5b647f2886c..d95815dd523 100644 --- a/app/code/Magento/Sales/Api/CreditmemoManagementInterface.php +++ b/app/code/Magento/Sales/Api/CreditmemoManagementInterface.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Api; /** diff --git a/app/code/Magento/Sales/Api/Data/CreditmemoInterface.php b/app/code/Magento/Sales/Api/Data/CreditmemoInterface.php index b2b02ee6b00..0f5871a9c64 100644 --- a/app/code/Magento/Sales/Api/Data/CreditmemoInterface.php +++ b/app/code/Magento/Sales/Api/Data/CreditmemoInterface.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Api\Data; /** diff --git a/app/code/Magento/Sales/Api/OrderManagementInterface.php b/app/code/Magento/Sales/Api/OrderManagementInterface.php index 0d32179b90f..ec90f4bd277 100644 --- a/app/code/Magento/Sales/Api/OrderManagementInterface.php +++ b/app/code/Magento/Sales/Api/OrderManagementInterface.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Api; /** diff --git a/app/code/Magento/Sales/Api/OrderStatusHistoryRepositoryInterface.php b/app/code/Magento/Sales/Api/OrderStatusHistoryRepositoryInterface.php index bb832f7f15b..7e8f3570896 100644 --- a/app/code/Magento/Sales/Api/OrderStatusHistoryRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/OrderStatusHistoryRepositoryInterface.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Api; /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View.php index 2db7a175216..8ab3b2d2e63 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Block\Adminhtml\Order\Invoice; /** diff --git a/app/code/Magento/Sales/Block/Order/Creditmemo/Totals.php b/app/code/Magento/Sales/Block/Order/Creditmemo/Totals.php index 9d7dc71e8b6..ccdfd7e6580 100644 --- a/app/code/Magento/Sales/Block/Order/Creditmemo/Totals.php +++ b/app/code/Magento/Sales/Block/Order/Creditmemo/Totals.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Block\Order\Creditmemo; use Magento\Sales\Model\Order\Creditmemo; diff --git a/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php b/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php index af07fc6f6c1..b4587540980 100644 --- a/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php +++ b/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Block\Order\Item\Renderer; use Magento\Sales\Model\Order\CreditMemo\Item as CreditMemoItem; diff --git a/app/code/Magento/Sales/Helper/Reorder.php b/app/code/Magento/Sales/Helper/Reorder.php index 34d5c0b6fd9..cebabfd67ac 100644 --- a/app/code/Magento/Sales/Helper/Reorder.php +++ b/app/code/Magento/Sales/Helper/Reorder.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Helper; /** diff --git a/app/code/Magento/Sales/Model/AdminOrder/Create.php b/app/code/Magento/Sales/Model/AdminOrder/Create.php index 68ef0a37779..5e066409466 100644 --- a/app/code/Magento/Sales/Model/AdminOrder/Create.php +++ b/app/code/Magento/Sales/Model/AdminOrder/Create.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\AdminOrder; use Magento\Customer\Api\AddressMetadataInterface; diff --git a/app/code/Magento/Sales/Model/Order/Creditmemo.php b/app/code/Magento/Sales/Model/Order/Creditmemo.php index 7002d8eb093..12935e98f01 100644 --- a/app/code/Magento/Sales/Model/Order/Creditmemo.php +++ b/app/code/Magento/Sales/Model/Order/Creditmemo.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order; use Magento\Framework\Api\AttributeDataBuilder; diff --git a/app/code/Magento/Sales/Model/Order/Email/NotifySender.php b/app/code/Magento/Sales/Model/Order/Email/NotifySender.php index 18c1082bce0..cc6092272f9 100644 --- a/app/code/Magento/Sales/Model/Order/Email/NotifySender.php +++ b/app/code/Magento/Sales/Model/Order/Email/NotifySender.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order\Email; use Magento\Sales\Model\Order; diff --git a/app/code/Magento/Sales/Model/Order/Payment.php b/app/code/Magento/Sales/Model/Order/Payment.php index 43f6ef48533..dd1f4ead7ce 100644 --- a/app/code/Magento/Sales/Model/Order/Payment.php +++ b/app/code/Magento/Sales/Model/Order/Payment.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order; use Magento\Framework\Api\AttributeDataBuilder; diff --git a/app/code/Magento/Sales/Model/Order/Payment/Transaction.php b/app/code/Magento/Sales/Model/Order/Payment/Transaction.php index 9114cf39237..0499e74c01b 100644 --- a/app/code/Magento/Sales/Model/Order/Payment/Transaction.php +++ b/app/code/Magento/Sales/Model/Order/Payment/Transaction.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order\Payment; use Magento\Framework\Api\AttributeDataBuilder; diff --git a/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php b/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php index e053da1df33..c6fd1ad7b99 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order\Pdf; use Magento\Framework\App\Filesystem\DirectoryList; diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php b/app/code/Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php index 6676f2cce6b..1fd18c1b367 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order\Pdf\Total; /** diff --git a/app/code/Magento/Sales/Model/Order/Shipment/Item.php b/app/code/Magento/Sales/Model/Order/Shipment/Item.php index a608d8f5016..9eeb2193402 100644 --- a/app/code/Magento/Sales/Model/Order/Shipment/Item.php +++ b/app/code/Magento/Sales/Model/Order/Shipment/Item.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order\Shipment; use Magento\Framework\Api\AttributeDataBuilder; diff --git a/app/code/Magento/Sales/Model/Quote.php b/app/code/Magento/Sales/Model/Quote.php index 7d88bdcc0e4..aa5c83060c8 100644 --- a/app/code/Magento/Sales/Model/Quote.php +++ b/app/code/Magento/Sales/Model/Quote.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model; use Magento\Customer\Api\Data\CustomerInterface; diff --git a/app/code/Magento/Sales/Model/Quote/Address/Total/Collector.php b/app/code/Magento/Sales/Model/Quote/Address/Total/Collector.php index 95a40c1bea9..e6b600e7eca 100644 --- a/app/code/Magento/Sales/Model/Quote/Address/Total/Collector.php +++ b/app/code/Magento/Sales/Model/Quote/Address/Total/Collector.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Quote\Address\Total; /** diff --git a/app/code/Magento/Sales/Model/Quote/Item.php b/app/code/Magento/Sales/Model/Quote/Item.php index 6c22d70b3b7..03f0888df94 100644 --- a/app/code/Magento/Sales/Model/Quote/Item.php +++ b/app/code/Magento/Sales/Model/Quote/Item.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Quote; /** diff --git a/app/code/Magento/Sales/Model/Resource/Quote.php b/app/code/Magento/Sales/Model/Resource/Quote.php index 250be344a84..3cfc84af7c4 100644 --- a/app/code/Magento/Sales/Model/Resource/Quote.php +++ b/app/code/Magento/Sales/Model/Resource/Quote.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Resource; use Magento\Framework\Model\Resource\Db\AbstractDb; diff --git a/app/code/Magento/Sales/Model/Resource/Report/Bestsellers/Collection.php b/app/code/Magento/Sales/Model/Resource/Report/Bestsellers/Collection.php index 4d1c4c36ef1..a2b8ba3e9e1 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Bestsellers/Collection.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Bestsellers/Collection.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Resource\Report\Bestsellers; /** diff --git a/app/code/Magento/Sales/view/adminhtml/templates/items/column/name.phtml b/app/code/Magento/Sales/view/adminhtml/templates/items/column/name.phtml index 519e5b3e68e..8d3c69444f9 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/items/column/name.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/items/column/name.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Sales/view/adminhtml/templates/items/column/qty.phtml b/app/code/Magento/Sales/view/adminhtml/templates/items/column/qty.phtml index b255146d420..77d5fd1e7fb 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/items/column/qty.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/items/column/qty.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($_item = $this->getItem()): ?> <table cellspacing="0" class="qty-table"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/items/price/row.phtml b/app/code/Magento/Sales/view/adminhtml/templates/items/price/row.phtml index 7d363e70ccc..e57fa265976 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/items/price/row.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/items/price/row.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn $this */ diff --git a/app/code/Magento/Sales/view/adminhtml/templates/items/price/total.phtml b/app/code/Magento/Sales/view/adminhtml/templates/items/price/total.phtml index 9c6650f18ee..20b2cc31a23 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/items/price/total.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/items/price/total.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn $this */ diff --git a/app/code/Magento/Sales/view/adminhtml/templates/items/price/unit.phtml b/app/code/Magento/Sales/view/adminhtml/templates/items/price/unit.phtml index ca2e21778a2..f97f9a8c938 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/items/price/unit.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/items/price/unit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn $this */ diff --git a/app/code/Magento/Sales/view/adminhtml/templates/items/renderer/default.phtml b/app/code/Magento/Sales/view/adminhtml/templates/items/renderer/default.phtml index a7bfbcd9617..c5589d01e83 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/items/renderer/default.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/items/renderer/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getItem()->getName() ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/address/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/address/form.phtml index 1c46d142149..ebc150ed621 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/address/form.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/address/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="message message-info"> <div class="message-inner"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/comments/view.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/comments/view.phtml index ada39f1593a..b1b2aa3d32c 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/comments/view.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/comments/view.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($_entity = $this->getEntity()): ?> <div id="comments_block"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/abstract.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/abstract.phtml index eb071a3440c..e313049794a 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/abstract.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/abstract.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="fieldset-wrapper-title"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml index cb9bef73ec7..79d8b8ae664 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->hasMethods()): ?> <div id="order-billing_method_form"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/comment.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/comment.phtml index f93c4f07bb1..65c1bd7eac8 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/comment.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/comment.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <!--<h4 class="icon-head fieldset-legend <?php echo $this->getHeaderCssClass() ?>"><?php echo $this->getHeaderText() ?></h4>--> <label for="order-comment"><?php echo __('Order Comments') ?></label><br /> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/coupons/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/coupons/form.phtml index 9170b2880bf..3fce3b2f108 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/coupons/form.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/coupons/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml index 82625c1d411..f4eb81b3544 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="page-create-order"> <script type="text/javascript"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form.phtml index 7f26d7ff227..58057cb1feb 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/form.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var \Magento\Sales\Block\Adminhtml\Order\Create\Form $this */ ?> <form id="edit_form" data-order-config='<?php echo $this->getOrderDataJson() ?>' data-load-base-url="<?php echo $this->getLoadBlockUrl() ?>" action="<?php echo $this->getSaveUrl() ?>" method="post" enctype="multipart/form-data"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/form/address.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form/address.phtml index d6e662f5278..7a9c5f8b4d8 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/form/address.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form/address.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * @var \Magento\Sales\Block\Adminhtml\Order\Create\Billing\Address|\Magento\Sales\Block\Adminhtml\Order\Create\Shipping\Address $this */ diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/giftmessage.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/giftmessage.phtml index eda3a0f0dec..b0842fc1767 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/giftmessage.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/giftmessage.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->helper('Magento\GiftMessage\Helper\Message')->getIsMessagesAvailable('main', $this->getQuote(), $this->getStoreId())): ?> <?php $_items = $this->getItems(); ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items.phtml index 5fdcca863ee..1d5e5921066 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/items.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="fieldset-wrapper-title"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml index 7f23a13121c..9696739315d 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/price/row.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/price/row.phtml index fdeabd1b444..1befb76ba03 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/price/row.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/price/row.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Sales\Block\Adminhtml\Order\Create\Items\Grid $this */ diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/price/total.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/price/total.phtml index 0d534bcf45e..5c20a10738c 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/price/total.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/price/total.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Sales\Block\Adminhtml\Order\Create\Items\Grid $this */ diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/price/unit.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/price/unit.phtml index fea0677f5da..ffac0783458 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/price/unit.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/price/unit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Sales\Block\Adminhtml\Order\Create\Items\Grid $this */ diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/newsletter/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/newsletter/form.phtml index 9cd6c7963fa..82fb4afb665 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/newsletter/form.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/newsletter/form.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <input type="checkbox" name="newsletter:subscribe"> <label for="newsletter:subscribe" style="width: 90%; float: none;"><?php echo __('Subscribe to Newsletter'); ?></label><br/> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml index 68bf81c5536..40fe38703b5 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Sales\Block\Adminhtml\Order\Create\Shipping\Method\Form */ ?> <?php $_shippingRateGroups = $this->getShippingRates(); ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar.phtml index 1c4913e139a..d5fbf31b575 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Sales\Block\Adminhtml\Order\Create\Sidebar */ ?> <div class="customer-current-activity-inner"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml index 6cf88fc1dab..893ab9c9b8e 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Sales\Block\Adminhtml\Order\Create\Sidebar\AbstractSidebar */ ?> <div class="create-order-sidebar-block" id="sidebar_data_<?php echo $this->getDataId() ?>"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/store/select.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/store/select.phtml index 91b45e7fd67..0485b169647 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/store/select.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/store/select.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Sales\Block\Adminhtml\Order\Create\Store\Select */ ?> <div class="store-scope form-inline"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals.phtml index 2e104cccf9e..8e4d263c53b 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <legend class="legend"><span><?php echo __('Order Totals') ?></span></legend> <table class="data-table" cellspacing="0"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/default.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/default.phtml index 0f331e6a0af..5b32627562f 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/default.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <tr class="<?php echo $this->getTotal()->getCode(); ?> row-totals"> <td style="<?php echo $this->getTotal()->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/grandtotal.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/grandtotal.phtml index f2a4cd5a1d0..51ce92e3598 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/grandtotal.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/grandtotal.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * @var $this \Magento\Tax\Block\Checkout\Grandtotal * @see \Magento\Tax\Block\Checkout\Grandtotal diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/shipping.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/shipping.phtml index c5b290ac5f7..efbc26f196b 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/shipping.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/shipping.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * @var $this \Magento\Tax\Block\Checkout\Shipping * @see \Magento\Tax\Block\Checkout\Shipping diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/subtotal.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/subtotal.phtml index fb0a27f446d..71c96cbfbb4 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/subtotal.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/subtotal.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * @var $this \Magento\Sales\Block\Adminhtml\Order\Create\Totals\Subtotal * @see \Magento\Sales\Block\Adminhtml\Order\Create\Totals\Subtotal diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/tax.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/tax.phtml index f64d1da1839..bbbaa1ca77e 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/tax.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/tax.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php global $taxIter; $taxIter++; ?> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary()): ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/form.phtml index eae3da23e55..aa63e877558 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/form.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <form id="edit_form" method="post" action="<?php echo $this->getSaveUrl() ?>"> <?php echo $this->getBlockHtml('formkey')?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml index 950ee8924e2..0a2c428b5a0 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_items = $this->getCreditmemo()->getAllItems() ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items/renderer/default.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items/renderer/default.phtml index aff253dff4c..59f46c662a6 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items/renderer/default.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items/renderer/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRenderer */ ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/totals/adjustments.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/totals/adjustments.phtml index 186b5446d5f..06444eb5263 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/totals/adjustments.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/totals/adjustments.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_source = $this->getSource() ?> <?php if ($_source): ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/form.phtml index 8ee3b543057..abbb470f388 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/form.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_order = $this->getCreditmemo()->getOrder() ?> <?php echo $this->getChildHtml('order_info') ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/items.phtml index 6be4dcb0a2d..158a272adfe 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/items.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_items = $this->getCreditmemo()->getAllItems() ?> <div class="fieldset-wrapper"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/items/renderer/default.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/items/renderer/default.phtml index ba302de8070..d2ceff2c1c3 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/items/renderer/default.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/items/renderer/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRenderer */ ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/details.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/details.phtml index 69c9ab2574b..1368f92200b 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/details.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/details.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* store view name = $_order->getStore()->getName() web site name = $_order->getStore()->getWebsite()->getName() diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/giftoptions.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/giftoptions.phtml index 51e5e222558..c2fe3ea1aba 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/giftoptions.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/giftoptions.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getChildHtml()): ?> <div class="fieldset-wrapper order-gift-options clearfix"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/form.phtml index 5035e246171..6f98d653f50 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/form.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <form id="edit_form" method="post" action="<?php echo $this->getSaveUrl() ?>"> <?php echo $this->getBlockHtml('formkey')?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items.phtml index 177f53f0197..422a923d1ee 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="fieldset-wrapper"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items/renderer/default.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items/renderer/default.phtml index a7c7049e09c..07bd49db823 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items/renderer/default.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items/renderer/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRenderer */ ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/form.phtml index 980af530e4a..ad12949a6cc 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/form.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_invoice = $this->getInvoice() ?> <?php $_order = $_invoice->getOrder() ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/items.phtml index ef5544f0780..66b49c171fe 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/items.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="grid"> <table cellspacing="0" class="data order-tables"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/items/renderer/default.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/items/renderer/default.phtml index 762891e7b32..b3634df67ac 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/items/renderer/default.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/items/renderer/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRenderer */ ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totalbar.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totalbar.phtml index 46292a943cb..40f83cd7334 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/totalbar.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totalbar.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if (sizeof($this->getTotals()) > 0): ?> <table cellspacing="0" class="items-to-invoice"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totals.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals.phtml index 6bdc2fe5d6d..46f596912bd 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /*$_source = $this->getSource(); ?> <?php $this->setPriceDataObject($_source) ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/discount.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/discount.phtml index 596aff2434d..5956bddd6cb 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/discount.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/discount.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_source = $this->getSource() ?> <?php $_order = $this->getOrder() ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/due.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/due.phtml index 3d02eba8a2d..61103197bf5 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/due.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/due.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getCanDisplayTotalDue()): ?> <tr> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/grand.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/grand.phtml index 508d1b7aac0..1b95ecf71a7 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/grand.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/grand.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_source = $this->getSource() ?> <?php $this->setPriceDataObject($_source) ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/item.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/item.phtml index e47869a564b..0623d147361 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/item.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/item.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_source = $this->getSource() ?> <?php $this->setPriceDataObject($_source) ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/paid.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/paid.phtml index 967c4928877..d20d7e4bcdc 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/paid.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/paid.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getCanDisplayTotalPaid()): ?> <tr> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/refunded.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/refunded.phtml index 07e5bbed476..b55c9e340d1 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/refunded.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/refunded.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getCanDisplayTotalRefunded()): ?> <tr> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/shipping.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/shipping.phtml index cc5648f8f6b..c277ae9d9a3 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/shipping.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/shipping.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_source = $this->getSource() ?> <?php $this->setPriceDataObject($_source) ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml index fa722011455..3c3d049033e 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var $this \Magento\Sales\Block\Adminhtml\Order\Totals\Tax */ ?> <?php diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/view/giftmessage.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/view/giftmessage.phtml index ec102d8ebc5..6010922f306 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/view/giftmessage.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/view/giftmessage.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->canDisplayGiftmessage()): ?> <?php $_required = $this->getMessage()->getMessage() != ''?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/view/history.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/view/history.phtml index f0da4ff39b3..25aed99fcc1 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/view/history.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/view/history.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div id="order_history_block"> <?php if ($this->canAddComment()):?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/view/info.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/view/info.phtml index 1730a37eafc..dffeab82385 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/view/info.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/view/info.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Sales\Block\Adminhtml\Order\View\Info */ ?> <?php $_order = $this->getOrder() ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/view/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/view/items.phtml index 43c27507f86..08578d38444 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/view/items.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/view/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_order = $this->getOrder() ?> <div class="grid"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/view/items/renderer/default.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/view/items/renderer/default.phtml index f5524285298..6458770622c 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/view/items/renderer/default.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/view/items/renderer/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\DefaultRenderer */ ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/history.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/history.phtml index 2cbde7390de..76373d02353 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/history.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/history.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="fieldset-wrapper"> <ul class="note-list"> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/info.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/info.phtml index 94e3ea54f1f..8f21bfc33d4 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/info.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/info.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Sales\Block\Adminhtml\Order\View\Tab\Info */ ?> <?php $_order = $this->getOrder() ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/page/js/components.phtml b/app/code/Magento/Sales/view/adminhtml/templates/page/js/components.phtml index bc3c624aa2a..5f4b579cdc4 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/page/js/components.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/page/js/components.phtml @@ -4,5 +4,8 @@ * @package default_default * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml() ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/rss/order/grid/link.phtml b/app/code/Magento/Sales/view/adminhtml/templates/rss/order/grid/link.phtml index aa146cc2ca2..6c1ff7b5508 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/rss/order/grid/link.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/rss/order/grid/link.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Sales\Block\Adminhtml\Rss\Order\Grid\Link */ ?> <?php if ($this->isRssAllowed() && $this->getLink()): ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/transactions/detail.phtml b/app/code/Magento/Sales/view/adminhtml/templates/transactions/detail.phtml index 1962f3da508..2f50f4cb33f 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/transactions/detail.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/transactions/detail.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="page-actions"><?php echo $this->getButtonsHtml() ?></div> <div class="fieldset-wrapper"> diff --git a/app/code/Magento/Sales/view/frontend/templates/email/creditmemo/items.phtml b/app/code/Magento/Sales/view/frontend/templates/email/creditmemo/items.phtml index a9249f10557..9c8f3ca2255 100644 --- a/app/code/Magento/Sales/view/frontend/templates/email/creditmemo/items.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/email/creditmemo/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_creditmemo = $this->getCreditmemo() ?> <?php $_order = $this->getOrder() ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/email/invoice/items.phtml b/app/code/Magento/Sales/view/frontend/templates/email/invoice/items.phtml index 50db65c6478..133b13202ff 100644 --- a/app/code/Magento/Sales/view/frontend/templates/email/invoice/items.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/email/invoice/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_invoice = $this->getInvoice() ?> <?php $_order = $this->getOrder() ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/email/items.phtml b/app/code/Magento/Sales/view/frontend/templates/email/items.phtml index 1f0ffd7b2a8..79b72ec2be8 100644 --- a/app/code/Magento/Sales/view/frontend/templates/email/items.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/email/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_order = $this->getOrder() ?> <?php if ($_order): ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/email/items/creditmemo/default.phtml b/app/code/Magento/Sales/view/frontend/templates/email/items/creditmemo/default.phtml index 8123dbc48d6..a61e3b7c20b 100644 --- a/app/code/Magento/Sales/view/frontend/templates/email/items/creditmemo/default.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/email/items/creditmemo/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_item = $this->getItem() ?> <?php $_order = $this->getItem()->getOrder(); ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/email/items/invoice/default.phtml b/app/code/Magento/Sales/view/frontend/templates/email/items/invoice/default.phtml index 8123dbc48d6..a61e3b7c20b 100644 --- a/app/code/Magento/Sales/view/frontend/templates/email/items/invoice/default.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/email/items/invoice/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_item = $this->getItem() ?> <?php $_order = $this->getItem()->getOrder(); ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/email/items/order/default.phtml b/app/code/Magento/Sales/view/frontend/templates/email/items/order/default.phtml index a3be386b186..2af89a9cf5d 100644 --- a/app/code/Magento/Sales/view/frontend/templates/email/items/order/default.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/email/items/order/default.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Sales\Block\Order\Email\Items\DefaultItems */ /** @var $_item \Magento\Sales\Model\Order\Item */ diff --git a/app/code/Magento/Sales/view/frontend/templates/email/items/price/row.phtml b/app/code/Magento/Sales/view/frontend/templates/email/items/price/row.phtml index 967646fa004..014a13d59b3 100644 --- a/app/code/Magento/Sales/view/frontend/templates/email/items/price/row.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/email/items/price/row.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Sales\Block\Order\Email\Items\DefaultItems $this */ diff --git a/app/code/Magento/Sales/view/frontend/templates/email/items/shipment/default.phtml b/app/code/Magento/Sales/view/frontend/templates/email/items/shipment/default.phtml index c96af8de1f6..1b38c04936d 100644 --- a/app/code/Magento/Sales/view/frontend/templates/email/items/shipment/default.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/email/items/shipment/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_item = $this->getItem() ?> <tr> diff --git a/app/code/Magento/Sales/view/frontend/templates/email/shipment/items.phtml b/app/code/Magento/Sales/view/frontend/templates/email/shipment/items.phtml index 3d5782e31df..b084de2b18e 100644 --- a/app/code/Magento/Sales/view/frontend/templates/email/shipment/items.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/email/shipment/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_shipment = $this->getShipment() ?> <?php $_order = $this->getOrder() ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/email/shipment/track.phtml b/app/code/Magento/Sales/view/frontend/templates/email/shipment/track.phtml index cbfb62293a7..2fe60b4472f 100644 --- a/app/code/Magento/Sales/view/frontend/templates/email/shipment/track.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/email/shipment/track.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_shipment = $this->getShipment() ?> <?php $_order = $this->getOrder() ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/guest/form.phtml b/app/code/Magento/Sales/view/frontend/templates/guest/form.phtml index 6b2b37cc31a..a7a2ce70722 100644 --- a/app/code/Magento/Sales/view/frontend/templates/guest/form.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/guest/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <form class="form form-orders-search" id="oar-widget-orders-and-returns-form" data-mage-init='{"ordersReturns":{}, "validation":{}}' action="<?php echo $this->getActionUrl() ?>" method="post" name="guest_post"> diff --git a/app/code/Magento/Sales/view/frontend/templates/items/price/row.phtml b/app/code/Magento/Sales/view/frontend/templates/items/price/row.phtml index ed5afa8b933..7fdd74e6d72 100644 --- a/app/code/Magento/Sales/view/frontend/templates/items/price/row.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/items/price/row.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var \Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer $this */ $_item = $this->getItem(); ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/items/price/total_after_discount.phtml b/app/code/Magento/Sales/view/frontend/templates/items/price/total_after_discount.phtml index d42083696c5..af5fa63203e 100644 --- a/app/code/Magento/Sales/view/frontend/templates/items/price/total_after_discount.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/items/price/total_after_discount.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var \Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer $this */ $_item = $this->getItem(); ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/items/price/unit.phtml b/app/code/Magento/Sales/view/frontend/templates/items/price/unit.phtml index ffd6df9093b..591d0862e9a 100644 --- a/app/code/Magento/Sales/view/frontend/templates/items/price/unit.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/items/price/unit.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var \Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer $this */ $_item = $this->getItem(); ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/js/components.phtml b/app/code/Magento/Sales/view/frontend/templates/js/components.phtml index 5c84082b62f..e5fab539878 100644 --- a/app/code/Magento/Sales/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/js/components.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml() ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/comments.phtml b/app/code/Magento/Sales/view/frontend/templates/order/comments.phtml index dc3ca8a5635..6ef07e872da 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/comments.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/comments.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Sales/view/frontend/templates/order/creditmemo/items.phtml b/app/code/Magento/Sales/view/frontend/templates/order/creditmemo/items.phtml index 8e96c8edb5e..2fc730a7b31 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/creditmemo/items.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/creditmemo/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_order = $this->getOrder() ?> <div class="actions-toolbar"> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/creditmemo/items/renderer/default.phtml b/app/code/Magento/Sales/view/frontend/templates/order/creditmemo/items/renderer/default.phtml index 84e0e1cd018..580b665330e 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/creditmemo/items/renderer/default.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/creditmemo/items/renderer/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer */ ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/history.phtml b/app/code/Magento/Sales/view/frontend/templates/order/history.phtml index 0ebbd64381e..e553afd98c4 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/history.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/history.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_orders = $this->getOrders(); ?> <?php echo $this->getChildHtml('info');?> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/info.phtml b/app/code/Magento/Sales/view/frontend/templates/order/info.phtml index d1ff5110b9d..841bd59b768 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/info.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/info.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Sales\Block\Order\Info */ ?> <?php $_order = $this->getOrder() ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/info/buttons.phtml b/app/code/Magento/Sales/view/frontend/templates/order/info/buttons.phtml index 0990b63c159..523e2aa40a7 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/info/buttons.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/info/buttons.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="actions"> <?php $_order = $this->getOrder() ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/info/buttons/rss.phtml b/app/code/Magento/Sales/view/frontend/templates/order/info/buttons/rss.phtml index fc790dcc09c..db8253f05cf 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/info/buttons/rss.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/info/buttons/rss.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Sales\Block\Order\Info\Buttons\Rss */ ?> <?php if ($this->isRssAllowed() && $this->getLink()): ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/invoice/items.phtml b/app/code/Magento/Sales/view/frontend/templates/order/invoice/items.phtml index 083a5dac41a..c3fee2c92cf 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/invoice/items.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/invoice/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_order = $this->getOrder() ?> <div class="actions-toolbar"> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/invoice/items/renderer/default.phtml b/app/code/Magento/Sales/view/frontend/templates/order/invoice/items/renderer/default.phtml index 91d20d726ff..99ae1a8a14e 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/invoice/items/renderer/default.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/invoice/items/renderer/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer */ ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/items.phtml b/app/code/Magento/Sales/view/frontend/templates/order/items.phtml index 756e2750df0..3698703edf0 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/items.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_order = $this->getOrder() ?> <?php $_giftMessage; ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/items/renderer/default.phtml b/app/code/Magento/Sales/view/frontend/templates/order/items/renderer/default.phtml index 9aab4c59be6..e0c4105438e 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/items/renderer/default.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/items/renderer/default.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer */ $_item = $this->getItem(); ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/order_comments.phtml b/app/code/Magento/Sales/view/frontend/templates/order/order_comments.phtml index e2f81e8768a..79704c3c39c 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/order_comments.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/order_comments.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Sales\Block\Order\View*/?> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/order_date.phtml b/app/code/Magento/Sales/view/frontend/templates/order/order_date.phtml index b7e54c73b68..2823699fa3d 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/order_date.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/order_date.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="order-date"><?php echo __('<span class="label">Order Date:</span> %1', '<date>' . $this->formatDate($this->getOrder()->getCreatedAtStoreDate(), 'long') . '</date>') ?></div> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/print/creditmemo.phtml b/app/code/Magento/Sales/view/frontend/templates/order/print/creditmemo.phtml index 3c7dc88ec35..82d2f959548 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/print/creditmemo.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/print/creditmemo.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_order = $this->getOrder() ?> <?php $_creditmemo = $this->getCreditmemo() ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/print/invoice.phtml b/app/code/Magento/Sales/view/frontend/templates/order/print/invoice.phtml index 648f6faa76d..99ed950904d 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/print/invoice.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/print/invoice.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_order = $this->getOrder() ?> <?php $_invoice = $this->getInvoice() ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/print/shipment.phtml b/app/code/Magento/Sales/view/frontend/templates/order/print/shipment.phtml index 9b8f7209a1d..d3e98e975ee 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/print/shipment.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/print/shipment.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /* @var $this \Magento\Sales\Block\Order\PrintOrder\Shipment */ ?> <?php $order = $this->getOrder(); ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/recent.phtml b/app/code/Magento/Sales/view/frontend/templates/order/recent.phtml index 62a4384812e..86dc8de7bb0 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/recent.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/recent.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="block block-dashboard-orders"> <?php $_orders = $this->getOrders(); ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/shipment/items/renderer/default.phtml b/app/code/Magento/Sales/view/frontend/templates/order/shipment/items/renderer/default.phtml index a545799b193..f9c5ff8daa8 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/shipment/items/renderer/default.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/shipment/items/renderer/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_item = $this->getItem() ?> <?php $_order = $this->getItem()->getOrderItem()->getOrder() ?> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/totals.phtml b/app/code/Magento/Sales/view/frontend/templates/order/totals.phtml index 6fd0974e25b..4437fef157a 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/totals.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/totals.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * @var $this \Magento\Sales\Block\Order\Totals * @see \Magento\Sales\Block\Order\Totals diff --git a/app/code/Magento/Sales/view/frontend/templates/order/view.phtml b/app/code/Magento/Sales/view/frontend/templates/order/view.phtml index 5bb0838aa3f..4bb5b582a83 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/view.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/view.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Sales\Block\Order\View*/?> <div class="order-details-items ordered"> diff --git a/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml b/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml index 6ce21418899..64b11d21a6b 100644 --- a/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Sales/view/frontend/templates/widget/guest/form.phtml b/app/code/Magento/Sales/view/frontend/templates/widget/guest/form.phtml index d240974b7ee..7ccb75b8263 100644 --- a/app/code/Magento/Sales/view/frontend/templates/widget/guest/form.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/widget/guest/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var $this \Magento\Sales\Block\Widget\Guest\Form */ ?> <?php if ($this->isEnable()): ?> diff --git a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Grid.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Grid.php index 7c299424dc6..8136a7e579b 100644 --- a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Grid.php +++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Grid.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons; /** diff --git a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php index 7f911a3ef4a..5e8daffc61b 100644 --- a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php +++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab; use Magento\Backend\Block\Template\Context; diff --git a/app/code/Magento/SalesRule/Helper/Coupon.php b/app/code/Magento/SalesRule/Helper/Coupon.php index 958119bef18..4d5339fb414 100644 --- a/app/code/Magento/SalesRule/Helper/Coupon.php +++ b/app/code/Magento/SalesRule/Helper/Coupon.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\SalesRule\Helper; /** diff --git a/app/code/Magento/SalesRule/Model/Resource/Report/Rule/Createdat.php b/app/code/Magento/SalesRule/Model/Resource/Report/Rule/Createdat.php index 38f92fde3a8..da9690947d5 100644 --- a/app/code/Magento/SalesRule/Model/Resource/Report/Rule/Createdat.php +++ b/app/code/Magento/SalesRule/Model/Resource/Report/Rule/Createdat.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\SalesRule\Model\Resource\Report\Rule; /** diff --git a/app/code/Magento/SalesRule/Model/Resource/Rule/Collection.php b/app/code/Magento/SalesRule/Model/Resource/Rule/Collection.php index ba0fb345b26..c70156e782e 100644 --- a/app/code/Magento/SalesRule/Model/Resource/Rule/Collection.php +++ b/app/code/Magento/SalesRule/Model/Resource/Rule/Collection.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\SalesRule\Model\Resource\Rule; /** diff --git a/app/code/Magento/SalesRule/Model/Validator.php b/app/code/Magento/SalesRule/Model/Validator.php index 4dc6fcd0ba1..4514edbe79e 100644 --- a/app/code/Magento/SalesRule/Model/Validator.php +++ b/app/code/Magento/SalesRule/Model/Validator.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\SalesRule\Model; use Magento\Sales\Model\Quote\Address; diff --git a/app/code/Magento/Search/Model/Resource/Query.php b/app/code/Magento/Search/Model/Resource/Query.php index f608fac3a1b..7b7a4c05d3d 100644 --- a/app/code/Magento/Search/Model/Resource/Query.php +++ b/app/code/Magento/Search/Model/Resource/Query.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Search\Model\Resource; use Magento\Framework\DB\Select; diff --git a/app/code/Magento/Search/view/frontend/templates/search_data.phtml b/app/code/Magento/Search/view/frontend/templates/search_data.phtml index 6c8680646d9..808611a0f82 100644 --- a/app/code/Magento/Search/view/frontend/templates/search_data.phtml +++ b/app/code/Magento/Search/view/frontend/templates/search_data.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Search/view/frontend/templates/term.phtml b/app/code/Magento/Search/view/frontend/templates/term.phtml index 9e9977e7781..9bda4cfeddd 100644 --- a/app/code/Magento/Search/view/frontend/templates/term.phtml +++ b/app/code/Magento/Search/view/frontend/templates/term.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if (sizeof($this->getTerms()) > 0): ?> <ul class="search-terms"> diff --git a/app/code/Magento/Sendfriend/Controller/Product/Sendmail.php b/app/code/Magento/Sendfriend/Controller/Product/Sendmail.php index 4cffba0bbcb..2376f8d2099 100644 --- a/app/code/Magento/Sendfriend/Controller/Product/Sendmail.php +++ b/app/code/Magento/Sendfriend/Controller/Product/Sendmail.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sendfriend\Controller\Product; use Magento\Framework\Exception\NoSuchEntityException; diff --git a/app/code/Magento/Sendfriend/Helper/Data.php b/app/code/Magento/Sendfriend/Helper/Data.php index c667b891280..9d575ccc492 100644 --- a/app/code/Magento/Sendfriend/Helper/Data.php +++ b/app/code/Magento/Sendfriend/Helper/Data.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sendfriend\Helper; /** diff --git a/app/code/Magento/Sendfriend/view/frontend/templates/send.phtml b/app/code/Magento/Sendfriend/view/frontend/templates/send.phtml index b64bbf90280..dd1e7876143 100644 --- a/app/code/Magento/Sendfriend/view/frontend/templates/send.phtml +++ b/app/code/Magento/Sendfriend/view/frontend/templates/send.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * Send to friend form * diff --git a/app/code/Magento/Shipping/Block/Tracking/Popup.php b/app/code/Magento/Shipping/Block/Tracking/Popup.php index 670b6e7f7cf..50d5c70d237 100644 --- a/app/code/Magento/Shipping/Block/Tracking/Popup.php +++ b/app/code/Magento/Shipping/Block/Tracking/Popup.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Shipping\Block\Tracking; class Popup extends \Magento\Framework\View\Element\Template diff --git a/app/code/Magento/Shipping/Helper/Data.php b/app/code/Magento/Shipping/Helper/Data.php index 17309f09692..7d27a44e2e5 100644 --- a/app/code/Magento/Shipping/Helper/Data.php +++ b/app/code/Magento/Shipping/Helper/Data.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Shipping data helper */ diff --git a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php index b1f367ae006..e6c651a302e 100644 --- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php +++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Shipping\Model\Carrier; use Magento\Sales\Model\Quote\Address\AbstractCarrierInterface; diff --git a/app/code/Magento/Shipping/Model/Config.php b/app/code/Magento/Shipping/Model/Config.php index 4f82211ccac..25a2430b514 100644 --- a/app/code/Magento/Shipping/Model/Config.php +++ b/app/code/Magento/Shipping/Model/Config.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Shipping\Model; class Config extends \Magento\Framework\Object diff --git a/app/code/Magento/Shipping/Model/Info.php b/app/code/Magento/Shipping/Model/Info.php index f718ab0277e..df370cd303f 100644 --- a/app/code/Magento/Shipping/Model/Info.php +++ b/app/code/Magento/Shipping/Model/Info.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Shipping\Model; use Magento\Sales\Model\Order\Shipment; diff --git a/app/code/Magento/Shipping/Model/Shipping/Labels.php b/app/code/Magento/Shipping/Model/Shipping/Labels.php index 4ea4dccda13..898715c3f2f 100644 --- a/app/code/Magento/Shipping/Model/Shipping/Labels.php +++ b/app/code/Magento/Shipping/Model/Shipping/Labels.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Shipping\Model\Shipping; use Magento\Sales\Model\Order\Shipment; diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/create/form.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/create/form.phtml index bf74e67e85c..ce1a8f6da9c 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/create/form.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/create/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <form id="edit_form" method="post" action="<?php echo $this->getSaveUrl() ?>"> <?php echo $this->getBlockHtml('formkey')?> diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/create/items.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/create/items.phtml index a5d7c4ece05..81e8a5d9743 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/create/items.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/create/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="fieldset-wrapper"> <div class="fieldset-wrapper-title"> diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/create/items/renderer/default.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/create/items/renderer/default.phtml index bed8376665a..0ebab3550bd 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/create/items/renderer/default.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/create/items/renderer/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_item = $this->getItem() ?> <tr> diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/Tracking/view.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/Tracking/view.phtml index 4dabbaf9a59..3a27498d4a4 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/order/Tracking/view.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/Tracking/view.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this Magento\Shipping\Block\Adminhtml\Order\Tracking\View */ ?> <table cellspacing="0" class="data-table" id="shipment_tracking_info"> diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/grid.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/grid.phtml index cda9ee0705a..63dbe0c0e65 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/grid.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/grid.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="grid"> <table cellspacing="0" class="data-table"> diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/packed.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/packed.phtml index 93f8b2b34fa..683bd63f31f 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/packed.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/packed.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div id="popup-window-mask" style="display:none;"></div> <div id="packed_window" style="display:none;" class="packed-window"> diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml index 270a0dacd17..79c038eebb4 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Shipping\Block\Adminhtml\Order\Packaging */ ?> <?php diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking.phtml index 1a5298c2d28..cde0f859c86 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this Magento\Shipping\Block\Adminhtml\Order\Tracking */?> <script type="text/javascript"> diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/view/info.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/view/info.phtml index 80e89197c69..6a1df536752 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/order/view/info.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/view/info.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Shipping\Block\Adminhtml\View */ ?> <?php $order = $this->getOrder() ?> diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/view/form.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/view/form.phtml index fd35a00fef0..03ac2d49108 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/view/form.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/view/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_order = $this->getShipment()->getOrder() ?> <?php echo $this->getChildHtml('order_info') ?> diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/view/items.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/view/items.phtml index d80c031bc20..1795c067208 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/view/items.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/view/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="grid"> <table cellspacing="0" class="data"> diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/view/items/renderer/default.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/view/items/renderer/default.phtml index e9d14683585..7bb7483c65f 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/view/items/renderer/default.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/view/items/renderer/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_item = $this->getItem() ?> <tr class="border"> diff --git a/app/code/Magento/Shipping/view/frontend/templates/items.phtml b/app/code/Magento/Shipping/view/frontend/templates/items.phtml index 7b1d6465dad..1376e2b38b0 100644 --- a/app/code/Magento/Shipping/view/frontend/templates/items.phtml +++ b/app/code/Magento/Shipping/view/frontend/templates/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Shipping\Block\Items */ ?> <?php $_order = $this->getOrder() ?> diff --git a/app/code/Magento/Shipping/view/frontend/templates/tracking/link.phtml b/app/code/Magento/Shipping/view/frontend/templates/tracking/link.phtml index 8d2a368bb83..7fb288cf39f 100644 --- a/app/code/Magento/Shipping/view/frontend/templates/tracking/link.phtml +++ b/app/code/Magento/Shipping/view/frontend/templates/tracking/link.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Shipping\Block\Tracking\Link */ ?> <?php $order = $this->getOrder() ?> diff --git a/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml b/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml index d9f69a82b08..c0ebf8bffe0 100644 --- a/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml +++ b/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Shipping\Block\Tracking\Popup */ ?> <?php $_results = $this->getTrackingInfo(); ?> diff --git a/app/code/Magento/Sitemap/Model/Sitemap.php b/app/code/Magento/Sitemap/Model/Sitemap.php index be8003120f4..b1612183a93 100644 --- a/app/code/Magento/Sitemap/Model/Sitemap.php +++ b/app/code/Magento/Sitemap/Model/Sitemap.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sitemap\Model; use Magento\Framework\App\Filesystem\DirectoryList; diff --git a/app/code/Magento/Store/Model/Resource/Website.php b/app/code/Magento/Store/Model/Resource/Website.php index 548a8083aca..448edec74c0 100644 --- a/app/code/Magento/Store/Model/Resource/Website.php +++ b/app/code/Magento/Store/Model/Resource/Website.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Store\Model\Resource; /** diff --git a/app/code/Magento/Store/view/frontend/templates/switch/flags.phtml b/app/code/Magento/Store/view/frontend/templates/switch/flags.phtml index 48096cdd58d..e097cddf11d 100644 --- a/app/code/Magento/Store/view/frontend/templates/switch/flags.phtml +++ b/app/code/Magento/Store/view/frontend/templates/switch/flags.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if (count($this->getStores())>1): ?> <div class="form-language"> diff --git a/app/code/Magento/Store/view/frontend/templates/switch/languages.phtml b/app/code/Magento/Store/view/frontend/templates/switch/languages.phtml index d1d7d491ff0..0e78be04411 100644 --- a/app/code/Magento/Store/view/frontend/templates/switch/languages.phtml +++ b/app/code/Magento/Store/view/frontend/templates/switch/languages.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Store/view/frontend/templates/switch/stores.phtml b/app/code/Magento/Store/view/frontend/templates/switch/stores.phtml index 3d2fd8e2da4..42351714c38 100644 --- a/app/code/Magento/Store/view/frontend/templates/switch/stores.phtml +++ b/app/code/Magento/Store/view/frontend/templates/switch/stores.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php index 1b772520e42..ba9569bf869 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Admin product tax class add form * diff --git a/app/code/Magento/Tax/Helper/Data.php b/app/code/Magento/Tax/Helper/Data.php index c1f82df0eae..6432eb45335 100644 --- a/app/code/Magento/Tax/Helper/Data.php +++ b/app/code/Magento/Tax/Helper/Data.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Tax\Helper; use Magento\Framework\Pricing\PriceCurrencyInterface; diff --git a/app/code/Magento/Tax/Model/Calculation/Rate.php b/app/code/Magento/Tax/Model/Calculation/Rate.php index 69f0dba1804..bdec4205b13 100644 --- a/app/code/Magento/Tax/Model/Calculation/Rate.php +++ b/app/code/Magento/Tax/Model/Calculation/Rate.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Tax\Model\Calculation; use Magento\Directory\Model\Region; diff --git a/app/code/Magento/Tax/Model/Observer.php b/app/code/Magento/Tax/Model/Observer.php index ec9589dff5c..47d1cde738f 100644 --- a/app/code/Magento/Tax/Model/Observer.php +++ b/app/code/Magento/Tax/Model/Observer.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Tax Event Observer */ diff --git a/app/code/Magento/Tax/Model/Resource/Sales/Order/Tax/Item.php b/app/code/Magento/Tax/Model/Resource/Sales/Order/Tax/Item.php index fb839507c2e..74c983b9900 100644 --- a/app/code/Magento/Tax/Model/Resource/Sales/Order/Tax/Item.php +++ b/app/code/Magento/Tax/Model/Resource/Sales/Order/Tax/Item.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Sales order tax resource model * diff --git a/app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php b/app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php index f575b6bb03c..71c0bdabda5 100644 --- a/app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php +++ b/app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Tax\Model\Sales\Total\Quote; use Magento\Customer\Api\Data\AddressDataBuilder as CustomerAddressBuilder; diff --git a/app/code/Magento/Tax/view/adminhtml/templates/items/price/row.phtml b/app/code/Magento/Tax/view/adminhtml/templates/items/price/row.phtml index 0f301d33b21..d8cda36b215 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/items/price/row.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/items/price/row.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Tax\Block\Adminhtml\Items\Price\Renderer $this */ diff --git a/app/code/Magento/Tax/view/adminhtml/templates/items/price/total.phtml b/app/code/Magento/Tax/view/adminhtml/templates/items/price/total.phtml index d079c32a759..79fdfa9f687 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/items/price/total.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/items/price/total.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Tax\Block\Adminhtml\Items\Price\Renderer $this */ diff --git a/app/code/Magento/Tax/view/adminhtml/templates/items/price/unit.phtml b/app/code/Magento/Tax/view/adminhtml/templates/items/price/unit.phtml index 2fe5025ef94..5ec16e360ee 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/items/price/unit.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/items/price/unit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Tax\Block\Adminhtml\Items\Price\Renderer $this */ diff --git a/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/row.phtml b/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/row.phtml index 624ba4526e2..8f3c9ef80ab 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/row.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/row.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Tax\Block\Adminhtml\Items\Price\Renderer $this */ diff --git a/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/total.phtml b/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/total.phtml index 734c136f61b..ddbe2a3fd7e 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/total.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/total.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Tax\Block\Adminhtml\Items\Price\Renderer $this */ diff --git a/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/unit.phtml b/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/unit.phtml index ad283eea65b..4159ac07676 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/unit.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/unit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Tax\Block\Adminhtml\Items\Price\Renderer $this */ diff --git a/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml index 2685d059ee4..641305d142f 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="entry-edit"> <?php echo $this->getFormHtml() ?> diff --git a/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml index d0237f14711..f0b1ab2acb2 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <script type="text/javascript"> require([ diff --git a/app/code/Magento/Tax/view/adminhtml/templates/rate/title.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rate/title.phtml index 281fe9331e5..38819c3eab8 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/rate/title.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/rate/title.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div id="tax-rate-titles-table" class="form-inline"> <?php $_labels = $this->getTitles() ?> diff --git a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/save.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/save.phtml index 2d28250e695..a71a12c7202 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/save.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/save.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="page-actions"> <?php echo $this->getBackButtonHtml() ?> diff --git a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/add.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/add.phtml index ceed44961a2..15eb9d51b40 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/add.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/add.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildhtml('grid') ?> diff --git a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml index 9c6113d0da0..421cd3b3239 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($form): ?> <?php echo $form->toHtml();?> diff --git a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/save.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/save.phtml index ead9b0b414b..b5907ad2ee5 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/save.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/save.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="page-actions"> <?php echo $this->getBackButtonHtml(); ?> diff --git a/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml b/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml index 2fd76b7cd61..c01e095fe15 100644 --- a/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml +++ b/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Tax\Pricing\Render\Adjustment $this */ ?> diff --git a/app/code/Magento/Tax/view/base/templates/pricing/adjustment/bundle.phtml b/app/code/Magento/Tax/view/base/templates/pricing/adjustment/bundle.phtml index 15aed83feb8..e972bd5651a 100644 --- a/app/code/Magento/Tax/view/base/templates/pricing/adjustment/bundle.phtml +++ b/app/code/Magento/Tax/view/base/templates/pricing/adjustment/bundle.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Tax\Pricing\Render\Adjustment $this */ ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/cart/item/price/sidebar.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/cart/item/price/sidebar.phtml index b930750abc9..5f88389446c 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/cart/item/price/sidebar.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/cart/item/price/sidebar.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Tax\Block\Item\Price\Renderer */ ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/cart/minicart/totals.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/cart/minicart/totals.phtml index 946521249ec..df95da06201 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/cart/minicart/totals.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/cart/minicart/totals.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this Magento\Tax\Block\Checkout\Cart\Sidebar\Totals */ ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml index 7ab38d71ab1..cd11d781466 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * @var $this \Magento\Tax\Block\Checkout\Grandtotal */ diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml index f8b87ef4a10..22673c575cd 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * @var $this \Magento\Tax\Block\Checkout\Shipping * @see \Magento\Tax\Block\Checkout\Shipping diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping/price.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping/price.phtml index 3ad02aae527..3d50543b0fc 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping/price.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping/price.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Tax\Block\Checkout\Shipping\Price */ ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml index 829df718b86..2dd61d500e9 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * @var $this \Magento\Tax\Block\Checkout\Subtotal * @see \Magento\Tax\Block\Checkout\Subtotal diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml index 68d4b3f2ff9..ae22b56b776 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * @var $this \Magento\Tax\Block\Checkout\Tax * @see \Magento\Tax\Block\Checkout\Tax diff --git a/app/code/Magento/Tax/view/frontend/templates/email/items/price/row.phtml b/app/code/Magento/Tax/view/frontend/templates/email/items/price/row.phtml index ec1a29b7a72..4ebcb9c378c 100644 --- a/app/code/Magento/Tax/view/frontend/templates/email/items/price/row.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/email/items/price/row.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Tax\Block\Item\Price\Renderer $this */ diff --git a/app/code/Magento/Tax/view/frontend/templates/item/price/row.phtml b/app/code/Magento/Tax/view/frontend/templates/item/price/row.phtml index 2e76a49591e..234fcea3bf4 100644 --- a/app/code/Magento/Tax/view/frontend/templates/item/price/row.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/item/price/row.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Tax\Block\Item\Price\Renderer */ $_item = $this->getItem(); diff --git a/app/code/Magento/Tax/view/frontend/templates/item/price/total_after_discount.phtml b/app/code/Magento/Tax/view/frontend/templates/item/price/total_after_discount.phtml index e69611624e7..2f2fbddda1d 100644 --- a/app/code/Magento/Tax/view/frontend/templates/item/price/total_after_discount.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/item/price/total_after_discount.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var \Magento\Tax\Block\Item\Price\Renderer $this */ $_item = $this->getItem(); ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/item/price/unit.phtml b/app/code/Magento/Tax/view/frontend/templates/item/price/unit.phtml index aabf553634e..9fc07d92073 100644 --- a/app/code/Magento/Tax/view/frontend/templates/item/price/unit.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/item/price/unit.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Tax\Block\Item\Price\Renderer */ $_item = $this->getItem(); diff --git a/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml b/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml index 8daf282fea4..e2ee082bde6 100644 --- a/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php $_order = $this->getOrder(); diff --git a/app/code/Magento/TaxImportExport/view/adminhtml/templates/importExport.phtml b/app/code/Magento/TaxImportExport/view/adminhtml/templates/importExport.phtml index f79729b10da..a13d84f23d4 100644 --- a/app/code/Magento/TaxImportExport/view/adminhtml/templates/importExport.phtml +++ b/app/code/Magento/TaxImportExport/view/adminhtml/templates/importExport.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="import-export-tax-rates"> <?php if (!$this->getIsReadonly()): ?> diff --git a/app/code/Magento/Theme/view/adminhtml/templates/browser/content/files.phtml b/app/code/Magento/Theme/view/adminhtml/templates/browser/content/files.phtml index e46e59f10af..e1fbb788614 100644 --- a/app/code/Magento/Theme/view/adminhtml/templates/browser/content/files.phtml +++ b/app/code/Magento/Theme/view/adminhtml/templates/browser/content/files.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Theme/view/base/templates/root.phtml b/app/code/Magento/Theme/view/base/templates/root.phtml index 481476a5e03..5bc71b96745 100644 --- a/app/code/Magento/Theme/view/base/templates/root.phtml +++ b/app/code/Magento/Theme/view/base/templates/root.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <!doctype html> <html <?php echo $htmlAttributes ?>> diff --git a/app/code/Magento/Theme/view/frontend/templates/callouts/left_col.phtml b/app/code/Magento/Theme/view/frontend/templates/callouts/left_col.phtml index 45a357610b3..b0bf824f988 100644 --- a/app/code/Magento/Theme/view/frontend/templates/callouts/left_col.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/callouts/left_col.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="block block-banner"> <div class="block-content"> diff --git a/app/code/Magento/Theme/view/frontend/templates/callouts/right_col.phtml b/app/code/Magento/Theme/view/frontend/templates/callouts/right_col.phtml index 45a357610b3..b0bf824f988 100644 --- a/app/code/Magento/Theme/view/frontend/templates/callouts/right_col.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/callouts/right_col.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="block block-banner"> <div class="block-content"> diff --git a/app/code/Magento/Theme/view/frontend/templates/html/block.phtml b/app/code/Magento/Theme/view/frontend/templates/html/block.phtml index e86e664b36b..92d60c6d1fd 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/block.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/block.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="block <?php echo $this->getBlockCss(); ?>"> <div class="block-title <?php echo $this->getBlockCss(); ?>-title"><strong><?php echo $this->getBlockTitle(); ?></strong></div> diff --git a/app/code/Magento/Theme/view/frontend/templates/html/breadcrumbs.phtml b/app/code/Magento/Theme/view/frontend/templates/html/breadcrumbs.phtml index 30d91506c29..1ecabb513bd 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/breadcrumbs.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/breadcrumbs.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($crumbs && is_array($crumbs)) : ?> <div class="breadcrumbs"> diff --git a/app/code/Magento/Theme/view/frontend/templates/html/collapsible.phtml b/app/code/Magento/Theme/view/frontend/templates/html/collapsible.phtml index ad4aac8bc79..ab8fd4c9075 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/collapsible.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/collapsible.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="block <?php echo $this->getBlockCss(); ?>"> diff --git a/app/code/Magento/Theme/view/frontend/templates/html/container.phtml b/app/code/Magento/Theme/view/frontend/templates/html/container.phtml index 4699d3b7704..2e31dbdbb21 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/container.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/container.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml(); ?> diff --git a/app/code/Magento/Theme/view/frontend/templates/html/footer.phtml b/app/code/Magento/Theme/view/frontend/templates/html/footer.phtml index 267fcc72588..047c46e45c2 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/footer.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/footer.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="footer-container"> <div class="footer"> diff --git a/app/code/Magento/Theme/view/frontend/templates/html/header.phtml b/app/code/Magento/Theme/view/frontend/templates/html/header.phtml index 1648be0c0db..157be693875 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/header.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/header.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * @var \Magento\Theme\Block\Html\Header $this */ diff --git a/app/code/Magento/Theme/view/frontend/templates/html/header/logo.phtml b/app/code/Magento/Theme/view/frontend/templates/html/header/logo.phtml index 5f0e686d547..da9a26af1fc 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/header/logo.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/header/logo.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * @var \Magento\Theme\Block\Html\Header\Logo $this */ diff --git a/app/code/Magento/Theme/view/frontend/templates/html/notices.phtml b/app/code/Magento/Theme/view/frontend/templates/html/notices.phtml index 35d3676c265..5b4fbf797ae 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/notices.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/notices.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Theme/view/frontend/templates/html/pager.phtml b/app/code/Magento/Theme/view/frontend/templates/html/pager.phtml index ebe4d17aa28..589624562aa 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/pager.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/pager.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Theme/view/frontend/templates/html/sections.phtml b/app/code/Magento/Theme/view/frontend/templates/html/sections.phtml index 8bd11572cba..16216e23cdd 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/sections.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/sections.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Theme/view/frontend/templates/html/skiptarget.phtml b/app/code/Magento/Theme/view/frontend/templates/html/skiptarget.phtml index 6a79fa0907a..1193780c555 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/skiptarget.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/skiptarget.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + $target_id = $this->getTargetId(); ?> <a id="<?php echo $target_id?>" name="<?php echo $target_id?>" tabindex="0"></a> diff --git a/app/code/Magento/Theme/view/frontend/templates/html/title.phtml b/app/code/Magento/Theme/view/frontend/templates/html/title.phtml index b61e594fa18..5abf4b62b1e 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/title.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/title.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * @var $this \Magento\Theme\Block\Html\Title */ diff --git a/app/code/Magento/Theme/view/frontend/templates/html/topmenu.phtml b/app/code/Magento/Theme/view/frontend/templates/html/topmenu.phtml index 10a6fd1622d..84fe61d1961 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/topmenu.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/topmenu.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Theme/view/frontend/templates/js/components.phtml b/app/code/Magento/Theme/view/frontend/templates/js/components.phtml index 5c84082b62f..e5fab539878 100644 --- a/app/code/Magento/Theme/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/js/components.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml() ?> diff --git a/app/code/Magento/Theme/view/frontend/templates/link.phtml b/app/code/Magento/Theme/view/frontend/templates/link.phtml index 35f23c92ccd..31fc2b41d81 100644 --- a/app/code/Magento/Theme/view/frontend/templates/link.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/link.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * @var $this \Magento\Framework\View\Element\Html\Link */ diff --git a/app/code/Magento/Translation/Model/Js/DataProvider.php b/app/code/Magento/Translation/Model/Js/DataProvider.php index db333e01f16..5f0263b09e2 100644 --- a/app/code/Magento/Translation/Model/Js/DataProvider.php +++ b/app/code/Magento/Translation/Model/Js/DataProvider.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Translation\Model\Js; class DataProvider implements DataProviderInterface diff --git a/app/code/Magento/Translation/view/adminhtml/templates/translate_inline.phtml b/app/code/Magento/Translation/view/adminhtml/templates/translate_inline.phtml index 2cf7a616767..cba382fffdc 100644 --- a/app/code/Magento/Translation/view/adminhtml/templates/translate_inline.phtml +++ b/app/code/Magento/Translation/view/adminhtml/templates/translate_inline.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <link rel="stylesheet" type="text/css" href="<?php echo $this->getViewFileUrl('prototype/windows/themes/default.css') ?>"/> diff --git a/app/code/Magento/Translation/view/frontend/templates/translate_inline.phtml b/app/code/Magento/Translation/view/frontend/templates/translate_inline.phtml index 43dff0209fc..016e2c49f2b 100644 --- a/app/code/Magento/Translation/view/frontend/templates/translate_inline.phtml +++ b/app/code/Magento/Translation/view/frontend/templates/translate_inline.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <link rel="stylesheet" type="text/css" href="<?php echo $this->getViewFileUrl('prototype/windows/themes/default.css') ?>"/> diff --git a/app/code/Magento/Ui/Controller/Adminhtml/Form/Fieldset.php b/app/code/Magento/Ui/Controller/Adminhtml/Form/Fieldset.php index cb2f2d6e2f2..13588324672 100644 --- a/app/code/Magento/Ui/Controller/Adminhtml/Form/Fieldset.php +++ b/app/code/Magento/Ui/Controller/Adminhtml/Form/Fieldset.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Ui\Controller\Adminhtml\Form; /** diff --git a/app/code/Magento/Ui/DataProvider/Config/Converter.php b/app/code/Magento/Ui/DataProvider/Config/Converter.php index 7a3d8c2a29f..0791d17f06c 100644 --- a/app/code/Magento/Ui/DataProvider/Config/Converter.php +++ b/app/code/Magento/Ui/DataProvider/Config/Converter.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Ui\DataProvider\Config; use Magento\Framework\Config\ConverterInterface; diff --git a/app/code/Magento/Ui/view/base/templates/control/button/default.phtml b/app/code/Magento/Ui/view/base/templates/control/button/default.phtml index 7e1c36d645c..6846378433b 100644 --- a/app/code/Magento/Ui/view/base/templates/control/button/default.phtml +++ b/app/code/Magento/Ui/view/base/templates/control/button/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Ui/view/base/templates/filter_pool/active.phtml b/app/code/Magento/Ui/view/base/templates/filter_pool/active.phtml index 09384d47f2f..da0679d3282 100644 --- a/app/code/Magento/Ui/view/base/templates/filter_pool/active.phtml +++ b/app/code/Magento/Ui/view/base/templates/filter_pool/active.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * @var \Magento\Ui\Component\Filter $this */ diff --git a/app/code/Magento/Ui/view/base/templates/form/fieldset/default.phtml b/app/code/Magento/Ui/view/base/templates/form/fieldset/default.phtml index 4a6d9131c18..86d60f9638e 100644 --- a/app/code/Magento/Ui/view/base/templates/form/fieldset/default.phtml +++ b/app/code/Magento/Ui/view/base/templates/form/fieldset/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * @var \Magento\Ui\Component\Form\Fieldset $this */ diff --git a/app/code/Magento/Ui/view/base/templates/layout/group/default.phtml b/app/code/Magento/Ui/view/base/templates/layout/group/default.phtml index 76ad70c6fee..d84bc43894d 100644 --- a/app/code/Magento/Ui/view/base/templates/layout/group/default.phtml +++ b/app/code/Magento/Ui/view/base/templates/layout/group/default.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * @var \Magento\Ui\Component\Layout\Group $this */ diff --git a/app/code/Magento/Ups/Model/Carrier.php b/app/code/Magento/Ups/Model/Carrier.php index 460bf55511c..d7feaf5c2cb 100644 --- a/app/code/Magento/Ups/Model/Carrier.php +++ b/app/code/Magento/Ups/Model/Carrier.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Ups\Model; use Magento\Sales\Model\Quote\Address\RateRequest; diff --git a/app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml b/app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml index c7b4f5c18dc..191d55b13ad 100644 --- a/app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml +++ b/app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $upsModel \Magento\Ups\Helper\Config */ /** @var $this \Magento\Ups\Block\Backend\System\CarrierConfig */ $upsCarrierConfig = $this->getCarrierConfig(); diff --git a/app/code/Magento/UrlRewrite/view/adminhtml/templates/categories.phtml b/app/code/Magento/UrlRewrite/view/adminhtml/templates/categories.phtml index 8542333da72..ac187b9594c 100644 --- a/app/code/Magento/UrlRewrite/view/adminhtml/templates/categories.phtml +++ b/app/code/Magento/UrlRewrite/view/adminhtml/templates/categories.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var $this \Magento\UrlRewrite\Block\Catalog\Category\Tree */ ?> <fieldset class="fieldset" data-ui-id="category-selector"> diff --git a/app/code/Magento/UrlRewrite/view/adminhtml/templates/edit.phtml b/app/code/Magento/UrlRewrite/view/adminhtml/templates/edit.phtml index 0f2a5ddafa9..bbf5b0f6acc 100644 --- a/app/code/Magento/UrlRewrite/view/adminhtml/templates/edit.phtml +++ b/app/code/Magento/UrlRewrite/view/adminhtml/templates/edit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** * @var $this \Magento\UrlRewrite\Block\Edit */ diff --git a/app/code/Magento/UrlRewrite/view/adminhtml/templates/selector.phtml b/app/code/Magento/UrlRewrite/view/adminhtml/templates/selector.phtml index 35f5655cbbc..52e3e82fcae 100644 --- a/app/code/Magento/UrlRewrite/view/adminhtml/templates/selector.phtml +++ b/app/code/Magento/UrlRewrite/view/adminhtml/templates/selector.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /** @var $this \Magento\UrlRewrite\Block\Selector */ ?> <div class="form-inline"> diff --git a/app/code/Magento/User/Block/User/Edit/Tab/Main.php b/app/code/Magento/User/Block/User/Edit/Tab/Main.php index 6ca4d9cac52..89e9630f550 100644 --- a/app/code/Magento/User/Block/User/Edit/Tab/Main.php +++ b/app/code/Magento/User/Block/User/Edit/Tab/Main.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\User\Block\User\Edit\Tab; /** diff --git a/app/code/Magento/User/Model/Resource/User.php b/app/code/Magento/User/Model/Resource/User.php index c27a049e6ee..7d5481635e8 100644 --- a/app/code/Magento/User/Model/Resource/User.php +++ b/app/code/Magento/User/Model/Resource/User.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\User\Model\Resource; use Magento\Authorization\Model\Acl\Role\Group as RoleGroup; diff --git a/app/code/Magento/User/view/adminhtml/templates/admin/forgotpassword.phtml b/app/code/Magento/User/view/adminhtml/templates/admin/forgotpassword.phtml index b25246cdd46..9af7eed661a 100644 --- a/app/code/Magento/User/view/adminhtml/templates/admin/forgotpassword.phtml +++ b/app/code/Magento/User/view/adminhtml/templates/admin/forgotpassword.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <!doctype html> <html lang="en"> diff --git a/app/code/Magento/User/view/adminhtml/templates/admin/forgotpassword_url.phtml b/app/code/Magento/User/view/adminhtml/templates/admin/forgotpassword_url.phtml index 676830a8f63..ef6a32d25b5 100644 --- a/app/code/Magento/User/view/adminhtml/templates/admin/forgotpassword_url.phtml +++ b/app/code/Magento/User/view/adminhtml/templates/admin/forgotpassword_url.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="links"> <a class="action-forgotpassword" href="<?php echo $this->helper('Magento\Backend\Helper\Data')->getUrl('adminhtml/auth/forgotpassword', ['_nosecret' => true])?>"><?php echo __('Forgot your password?') ?></a> diff --git a/app/code/Magento/User/view/adminhtml/templates/admin/resetforgottenpassword.phtml b/app/code/Magento/User/view/adminhtml/templates/admin/resetforgottenpassword.phtml index 3b9a9403052..5d2e0a9d26d 100644 --- a/app/code/Magento/User/view/adminhtml/templates/admin/resetforgottenpassword.phtml +++ b/app/code/Magento/User/view/adminhtml/templates/admin/resetforgottenpassword.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="en"> diff --git a/app/code/Magento/User/view/adminhtml/templates/role/edit.phtml b/app/code/Magento/User/view/adminhtml/templates/role/edit.phtml index ba0ee818fa6..ef92304ae22 100644 --- a/app/code/Magento/User/view/adminhtml/templates/role/edit.phtml +++ b/app/code/Magento/User/view/adminhtml/templates/role/edit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/User/view/adminhtml/templates/role/users_grid_js.phtml b/app/code/Magento/User/view/adminhtml/templates/role/users_grid_js.phtml index 83dc6b1943c..39d6852091a 100644 --- a/app/code/Magento/User/view/adminhtml/templates/role/users_grid_js.phtml +++ b/app/code/Magento/User/view/adminhtml/templates/role/users_grid_js.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <script type="text/javascript"> require([ diff --git a/app/code/Magento/User/view/adminhtml/templates/user/roles_grid_js.phtml b/app/code/Magento/User/view/adminhtml/templates/user/roles_grid_js.phtml index b94106dcd12..f3838f446df 100644 --- a/app/code/Magento/User/view/adminhtml/templates/user/roles_grid_js.phtml +++ b/app/code/Magento/User/view/adminhtml/templates/user/roles_grid_js.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <script type="text/javascript"> require([ diff --git a/app/code/Magento/Usps/Model/Carrier.php b/app/code/Magento/Usps/Model/Carrier.php index 3d7afd722b9..8fa9ee89476 100644 --- a/app/code/Magento/Usps/Model/Carrier.php +++ b/app/code/Magento/Usps/Model/Carrier.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Usps\Model; use Magento\Shipping\Helper\Carrier as CarrierHelper; diff --git a/app/code/Magento/Usps/Model/Source/Method.php b/app/code/Magento/Usps/Model/Source/Method.php index 33f8a195eff..ee910bddbfa 100644 --- a/app/code/Magento/Usps/Model/Source/Method.php +++ b/app/code/Magento/Usps/Model/Source/Method.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Usps\Model\Source; /** diff --git a/app/code/Magento/Webapi/view/adminhtml/templates/integration/activate/permissions/tab/webapi.phtml b/app/code/Magento/Webapi/view/adminhtml/templates/integration/activate/permissions/tab/webapi.phtml index 76d3c48ef3f..34eb8c157d3 100644 --- a/app/code/Magento/Webapi/view/adminhtml/templates/integration/activate/permissions/tab/webapi.phtml +++ b/app/code/Magento/Webapi/view/adminhtml/templates/integration/activate/permissions/tab/webapi.phtml @@ -6,6 +6,9 @@ * * @var \Magento\Webapi\Block\Adminhtml\Integration\Activate\Permissions\Tab\Webapi $this */ + +// @codingStandardsIgnoreFile + ?> <fieldset class="fieldset form-inline entry-edit"> <?php if ($this->isTreeEmpty()): ?> diff --git a/app/code/Magento/Webapi/view/adminhtml/templates/resourcetree.phtml b/app/code/Magento/Webapi/view/adminhtml/templates/resourcetree.phtml index 1893fddb85a..59dcf8c2d90 100644 --- a/app/code/Magento/Webapi/view/adminhtml/templates/resourcetree.phtml +++ b/app/code/Magento/Webapi/view/adminhtml/templates/resourcetree.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php b/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php index 6b2559a89f4..1a173068d05 100644 --- a/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php +++ b/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Weee\Block\Renderer\Weee; use Magento\Framework\Data\Form\Element\AbstractElement; diff --git a/app/code/Magento/Weee/Model/Total/Quote/Weee.php b/app/code/Magento/Weee/Model/Total/Quote/Weee.php index 2c51cd9b25d..b806a1f7939 100644 --- a/app/code/Magento/Weee/Model/Total/Quote/Weee.php +++ b/app/code/Magento/Weee/Model/Total/Quote/Weee.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Weee\Model\Total\Quote; use Magento\Framework\Pricing\PriceCurrencyInterface; diff --git a/app/code/Magento/Weee/view/adminhtml/templates/items/price/row.phtml b/app/code/Magento/Weee/view/adminhtml/templates/items/price/row.phtml index cb217711f95..d2df4da6cb0 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/items/price/row.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/items/price/row.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Weee\Block\Adminhtml\Items\Price\Renderer $this */ diff --git a/app/code/Magento/Weee/view/adminhtml/templates/items/price/total.phtml b/app/code/Magento/Weee/view/adminhtml/templates/items/price/total.phtml index 05007acd55a..6a522a55135 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/items/price/total.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/items/price/total.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Weee\Block\Adminhtml\Items\Price\Renderer $this */ diff --git a/app/code/Magento/Weee/view/adminhtml/templates/items/price/unit.phtml b/app/code/Magento/Weee/view/adminhtml/templates/items/price/unit.phtml index e19dbc5fa1a..2b36dd996c6 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/items/price/unit.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/items/price/unit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Weee\Block\Adminhtml\Items\Price\Renderer $this */ diff --git a/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/row.phtml b/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/row.phtml index a760ff6692f..3adcabf701b 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/row.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/row.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Weee\Block\Item\Price\Renderer */ diff --git a/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/total.phtml b/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/total.phtml index 13b1e2abcbb..a3fd6503b2e 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/total.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/total.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Weee\Block\Item\Price\Renderer $this */ diff --git a/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/unit.phtml b/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/unit.phtml index 1026f33572d..c6735267c10 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/unit.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/unit.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Weee\Block\Item\Price\Renderer $this */ diff --git a/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml b/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml index 6dbbb324363..98bcb5c61aa 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Weee\Block\Renderer\Weee\Tax */ diff --git a/app/code/Magento/Weee/view/base/templates/pricing/adjustment.phtml b/app/code/Magento/Weee/view/base/templates/pricing/adjustment.phtml index ba8d7c13836..4cc2e4d1148 100644 --- a/app/code/Magento/Weee/view/base/templates/pricing/adjustment.phtml +++ b/app/code/Magento/Weee/view/base/templates/pricing/adjustment.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php diff --git a/app/code/Magento/Weee/view/frontend/templates/checkout/cart/item/price/sidebar.phtml b/app/code/Magento/Weee/view/frontend/templates/checkout/cart/item/price/sidebar.phtml index 627b34dcb62..1c9a420c244 100644 --- a/app/code/Magento/Weee/view/frontend/templates/checkout/cart/item/price/sidebar.phtml +++ b/app/code/Magento/Weee/view/frontend/templates/checkout/cart/item/price/sidebar.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Weee\Block\Item\Price\Renderer */ ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml index d70e069496b..870946394a3 100644 --- a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml +++ b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Weee\Block\Item\Price\Renderer */ $_item = $this->getItem(); diff --git a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_incl_tax.phtml b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_incl_tax.phtml index cb7ebc067e0..42f9a6107bc 100644 --- a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_incl_tax.phtml +++ b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_incl_tax.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Weee\Block\Item\Price\Renderer */ $_item = $this->getItem(); diff --git a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_excl_tax.phtml b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_excl_tax.phtml index dc8a8ede6e8..fea2b69caa6 100644 --- a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_excl_tax.phtml +++ b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_excl_tax.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Weee\Block\Item\Price\Renderer */ $_item = $this->getItem(); diff --git a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_incl_tax.phtml b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_incl_tax.phtml index 81623a5d2e1..4d4d16aa982 100644 --- a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_incl_tax.phtml +++ b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_incl_tax.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Weee\Block\Item\Price\Renderer */ $_item = $this->getItem(); diff --git a/app/code/Magento/Weee/view/frontend/templates/email/items/price/row.phtml b/app/code/Magento/Weee/view/frontend/templates/email/items/price/row.phtml index 7c5040932f4..d62f36df8b8 100644 --- a/app/code/Magento/Weee/view/frontend/templates/email/items/price/row.phtml +++ b/app/code/Magento/Weee/view/frontend/templates/email/items/price/row.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Weee\Block\Item\Price\Renderer $this */ diff --git a/app/code/Magento/Weee/view/frontend/templates/item/price/row.phtml b/app/code/Magento/Weee/view/frontend/templates/item/price/row.phtml index be55f2e342e..4feacf64289 100644 --- a/app/code/Magento/Weee/view/frontend/templates/item/price/row.phtml +++ b/app/code/Magento/Weee/view/frontend/templates/item/price/row.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Weee\Block\Item\Price\Renderer */ $item = $this->getItem(); diff --git a/app/code/Magento/Weee/view/frontend/templates/item/price/total_after_discount.phtml b/app/code/Magento/Weee/view/frontend/templates/item/price/total_after_discount.phtml index b664e81b131..e38036411f9 100644 --- a/app/code/Magento/Weee/view/frontend/templates/item/price/total_after_discount.phtml +++ b/app/code/Magento/Weee/view/frontend/templates/item/price/total_after_discount.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var \Magento\Weee\Block\Item\Price\Renderer $this */ $_item = $this->getItem(); ?> diff --git a/app/code/Magento/Weee/view/frontend/templates/item/price/unit.phtml b/app/code/Magento/Weee/view/frontend/templates/item/price/unit.phtml index 4c949754ddf..909642497e3 100644 --- a/app/code/Magento/Weee/view/frontend/templates/item/price/unit.phtml +++ b/app/code/Magento/Weee/view/frontend/templates/item/price/unit.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Weee\Block\Item\Price\Renderer */ $item = $this->getItem(); diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget.php b/app/code/Magento/Widget/Block/Adminhtml/Widget.php index bc397bb6c1e..71664c22cf9 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * WYSIWYG widget plugin main block * diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php index 2c1848c89a6..f7f5750ad48 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Tab\Main; use Magento\Framework\Data\Form\Element\AbstractElement; diff --git a/app/code/Magento/Widget/Model/Widget.php b/app/code/Magento/Widget/Model/Widget.php index df0679c6def..1cee5293c37 100644 --- a/app/code/Magento/Widget/Model/Widget.php +++ b/app/code/Magento/Widget/Model/Widget.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Widget model for different purposes * diff --git a/app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml b/app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml index 7d616b11baa..389740ad484 100644 --- a/app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml +++ b/app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <fieldset class="fieldset"> <legend class="legend"><span><?php echo __('Layout Updates') ?></span></legend> diff --git a/app/code/Magento/Wishlist/Model/Item.php b/app/code/Magento/Wishlist/Model/Item.php index cc3f2edf3a3..dc4b102b16e 100644 --- a/app/code/Magento/Wishlist/Model/Item.php +++ b/app/code/Magento/Wishlist/Model/Item.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Wishlist\Model; use Magento\Catalog\Api\ProductRepositoryInterface; diff --git a/app/code/Magento/Wishlist/sql/wishlist_setup/install-2.0.0.php b/app/code/Magento/Wishlist/sql/wishlist_setup/install-2.0.0.php index 421dbbc9046..9a3da3b5bfb 100644 --- a/app/code/Magento/Wishlist/sql/wishlist_setup/install-2.0.0.php +++ b/app/code/Magento/Wishlist/sql/wishlist_setup/install-2.0.0.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; diff --git a/app/code/Magento/Wishlist/view/adminhtml/templates/customer/edit/tab/wishlist.phtml b/app/code/Magento/Wishlist/view/adminhtml/templates/customer/edit/tab/wishlist.phtml index b7c3458d9de..3e8c26d5c6a 100644 --- a/app/code/Magento/Wishlist/view/adminhtml/templates/customer/edit/tab/wishlist.phtml +++ b/app/code/Magento/Wishlist/view/adminhtml/templates/customer/edit/tab/wishlist.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * @var $this \Magento\Framework\View\Element\Template */ diff --git a/app/code/Magento/Wishlist/view/frontend/templates/button/share.phtml b/app/code/Magento/Wishlist/view/frontend/templates/button/share.phtml index 6ff6cd8eb40..ac6d8e1e250 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/button/share.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/button/share.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Wishlist\Block\Customer\Wishlist\Button */ ?> <?php if ($this->getWishlist()->getItemsCount() && $this->getWishlist()->getShared() < $this->getConfig()->getSharingEmailLimit()): ?> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/button/tocart.phtml b/app/code/Magento/Wishlist/view/frontend/templates/button/tocart.phtml index c7b5f99310e..814924c39ab 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/button/tocart.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/button/tocart.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getWishlist()->getItemsCount() && $this->getWishlist()->isSalable()): ?> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/button/update.phtml b/app/code/Magento/Wishlist/view/frontend/templates/button/update.phtml index 59608264124..34cd7dc6456 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/button/update.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/button/update.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php if ($this->getWishlist()->getItemsCount()): ?> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/email/items.phtml b/app/code/Magento/Wishlist/view/frontend/templates/email/items.phtml index f9e858a77ea..d44fdb83b9f 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/email/items.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/email/items.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Wishlist\Block\Share\Email\Items */ ?> <?php $l = $this->getWishlistItemsCount() ?> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/actions.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/actions.phtml index dbdbff44a1f..99b1caa1e0c 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/actions.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/actions.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /* @var \Magento\Wishlist\Model\Item $item */ ?> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/cart.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/cart.phtml index 96866177392..a32dbe9f24b 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/cart.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/cart.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /* @var $this \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Cart */ /* @var \Magento\Wishlist\Model\Item $item */ $item = $this->getItem(); diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml index b9fbb3abdab..d1320c06137 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /* @var \Magento\Wishlist\Model\Item $item */ $item = $this->getItem(); diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/edit.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/edit.phtml index 8ebb3112383..d0c4e977b03 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/edit.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/edit.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /* @var \Magento\Wishlist\Model\Item $item */ $item = $this->getItem(); $product = $item->getProduct(); diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/image.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/image.phtml index 2aa5e3f2bf9..8af920fa493 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/image.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/image.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /* @var \Magento\Wishlist\Model\Item $item */ $item = $this->getItem(); $product = $item->getProduct(); diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/name.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/name.phtml index fb18ae64155..e10c4f68270 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/name.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/name.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /* @var \Magento\Wishlist\Model\Item $item */ $item = $this->getItem(); $product = $item->getProduct(); diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/price.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/price.phtml index 5cae1894aa8..967f2c542c0 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/price.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/price.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /* @var \Magento\Wishlist\Model\Item $item */ ?> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml index 34f9ad64ffb..cd1db8ad0b6 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <a href="#" data-role="remove" data-post-remove='<?php echo $this->getItemRemoveParams($this->getItem()); ?>' title="<?php echo __('Remove Item') ?>" class="btn-remove action delete"> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto.phtml index 824105a48ab..34de05f4690 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <div class="product-addto-links" data-role="add-to-links"> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml index 90c4ac35665..61bd8197877 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var \Magento\Wishlist\Block\Customer\Wishlist\Items $this */ diff --git a/app/code/Magento/Wishlist/view/frontend/templates/js/components.phtml b/app/code/Magento/Wishlist/view/frontend/templates/js/components.phtml index 5c84082b62f..e5fab539878 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/js/components.phtml @@ -2,5 +2,8 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml() ?> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/link.phtml b/app/code/Magento/Wishlist/view/frontend/templates/link.phtml index f065020ba8e..ec4c6377e37 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/link.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/link.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Wishlist\Block\Link */ ?> <li class="link wishlist"> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/options_list.phtml b/app/code/Magento/Wishlist/view/frontend/templates/options_list.phtml index 174bd04011b..5f6e9c6d427 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/options_list.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/options_list.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Wishlist\Block\Customer\Wishlist\Item\Options */ ?> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/rss/email.phtml b/app/code/Magento/Wishlist/view/frontend/templates/rss/email.phtml index 8199de3bc66..7eafde04c26 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/rss/email.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/rss/email.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Wishlist\Block\Rss\EmailLink */ ?> <?php if ($this->getLink()): ?> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/rss/wishlist.phtml b/app/code/Magento/Wishlist/view/frontend/templates/rss/wishlist.phtml index bf85e444ab0..903123301b0 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/rss/wishlist.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/rss/wishlist.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Wishlist\Block\Rss\Link */ ?> <?php if ($this->isRssAllowed() && $this->getLink() && $this->helper('Magento\Wishlist\Helper\Data')->getWishlist()->getItemsCount()): ?> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml b/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml index 0e2b0de7ea9..48421dbc74b 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Wishlist\Block\Share\Wishlist */ $imageBlock = $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Image'); ?> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/sharing.phtml b/app/code/Magento/Wishlist/view/frontend/templates/sharing.phtml index 249a56682c1..eb6bc6ced93 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/sharing.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/sharing.phtml @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Wishlist\Block\Customer\Sharing */ ?> <form class="form wishlist share" diff --git a/app/code/Magento/Wishlist/view/frontend/templates/sidebar.phtml b/app/code/Magento/Wishlist/view/frontend/templates/sidebar.phtml index 38b4f5cd12b..647e2159fb1 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/sidebar.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/sidebar.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Wishlist\Block\Customer\Sidebar */ ?> <?php diff --git a/app/code/Magento/Wishlist/view/frontend/templates/view.phtml b/app/code/Magento/Wishlist/view/frontend/templates/view.phtml index 8ee612a7637..0fcc0b4fa60 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/view.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/view.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Wishlist\Block\Customer\Wishlist */ ?> diff --git a/dev/tests/api-functional/_files/Magento/TestModule4/Service/V1/DataObjectServiceInterface.php b/dev/tests/api-functional/_files/Magento/TestModule4/Service/V1/DataObjectServiceInterface.php index f189b2c9ef4..4bfee64dbb6 100644 --- a/dev/tests/api-functional/_files/Magento/TestModule4/Service/V1/DataObjectServiceInterface.php +++ b/dev/tests/api-functional/_files/Magento/TestModule4/Service/V1/DataObjectServiceInterface.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\TestModule4\Service\V1; use Magento\TestModule4\Service\V1\Entity\DataObjectRequest; diff --git a/dev/tests/api-functional/_files/Magento/TestModule4/Service/V1/Entity/ExtensibleRequest.php b/dev/tests/api-functional/_files/Magento/TestModule4/Service/V1/Entity/ExtensibleRequest.php index 41f78a2ed61..219d530cbe9 100644 --- a/dev/tests/api-functional/_files/Magento/TestModule4/Service/V1/Entity/ExtensibleRequest.php +++ b/dev/tests/api-functional/_files/Magento/TestModule4/Service/V1/Entity/ExtensibleRequest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\TestModule4\Service\V1\Entity; class ExtensibleRequest extends \Magento\Framework\Model\AbstractExtensibleModel diff --git a/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/CustomAttributeDataObject.php b/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/CustomAttributeDataObject.php index dc3a1c1a17e..ae2774402b5 100644 --- a/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/CustomAttributeDataObject.php +++ b/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/CustomAttributeDataObject.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\TestModuleMSC\Model\Data; use Magento\TestModuleMSC\Api\Data\CustomAttributeDataObjectInterface; diff --git a/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/CustomAttributeNestedDataObject.php b/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/CustomAttributeNestedDataObject.php index 9ea73d87ace..2df0fb0ccd0 100644 --- a/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/CustomAttributeNestedDataObject.php +++ b/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/CustomAttributeNestedDataObject.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\TestModuleMSC\Model\Data; use Magento\TestModuleMSC\Api\Data\CustomAttributeNestedDataObjectInterface; diff --git a/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/Item.php b/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/Item.php index 5593ffcffb4..664e428b484 100644 --- a/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/Item.php +++ b/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/Item.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\TestModuleMSC\Model\Data; use Magento\TestModuleMSC\Api\Data\ItemInterface; diff --git a/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiDataFixture.php b/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiDataFixture.php index 6bc41d3a3f4..9d8ee24e5a8 100644 --- a/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiDataFixture.php +++ b/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiDataFixture.php @@ -8,6 +8,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\TestFramework\Annotation; class ApiDataFixture diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/CategoryManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/CategoryManagementTest.php index eaa58bae0e5..ed13f1d45a0 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/CategoryManagementTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/CategoryManagementTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Api; use Magento\TestFramework\TestCase\WebapiAbstract; diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeManagementTest.php index 14f8614829e..73236d2741c 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeManagementTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeManagementTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Api; use Magento\TestFramework\Helper\Bootstrap; diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductCustomOptionRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductCustomOptionRepositoryTest.php index 1995c194bd5..a40da8c2af5 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductCustomOptionRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductCustomOptionRepositoryTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Api; use Magento\TestFramework\Helper\Bootstrap; diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductMediaAttributeManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductMediaAttributeManagementTest.php index 8939bf5c362..787b7c03f0d 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductMediaAttributeManagementTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductMediaAttributeManagementTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Api; use Magento\TestFramework\TestCase\WebapiAbstract; diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductTierPriceManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductTierPriceManagementTest.php index 04f3d9c3d44..e41327ad016 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductTierPriceManagementTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductTierPriceManagementTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Api; use Magento\TestFramework\TestCase\WebapiAbstract; diff --git a/dev/tests/api-functional/testsuite/Magento/CatalogInventory/Api/StockItemTest.php b/dev/tests/api-functional/testsuite/Magento/CatalogInventory/Api/StockItemTest.php index bab5b01aa08..5b443ce8a61 100644 --- a/dev/tests/api-functional/testsuite/Magento/CatalogInventory/Api/StockItemTest.php +++ b/dev/tests/api-functional/testsuite/Magento/CatalogInventory/Api/StockItemTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogInventory\Api; use Magento\TestFramework\Helper\Bootstrap; diff --git a/dev/tests/api-functional/testsuite/Magento/ConfigurableProduct/Api/OptionRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/ConfigurableProduct/Api/OptionRepositoryTest.php index 01f3bd7a1bd..08caeab1247 100644 --- a/dev/tests/api-functional/testsuite/Magento/ConfigurableProduct/Api/OptionRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/ConfigurableProduct/Api/OptionRepositoryTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\ConfigurableProduct\Api; use Magento\Webapi\Model\Rest\Config; diff --git a/dev/tests/api-functional/testsuite/Magento/Customer/Api/AddressRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/Customer/Api/AddressRepositoryTest.php index 5bc344be717..35b651ae893 100644 --- a/dev/tests/api-functional/testsuite/Magento/Customer/Api/AddressRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Customer/Api/AddressRepositoryTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Customer\Api; use Magento\TestFramework\Helper\Bootstrap; diff --git a/dev/tests/api-functional/testsuite/Magento/Downloadable/Service/V1/DownloadableLink/WriteServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Downloadable/Service/V1/DownloadableLink/WriteServiceTest.php index 6f96f195175..80c36ec1a0d 100644 --- a/dev/tests/api-functional/testsuite/Magento/Downloadable/Service/V1/DownloadableLink/WriteServiceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Downloadable/Service/V1/DownloadableLink/WriteServiceTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Downloadable\Service\V1\DownloadableLink; use Magento\Catalog\Model\Product; diff --git a/dev/tests/api-functional/testsuite/Magento/Downloadable/Service/V1/DownloadableSample/WriteServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Downloadable/Service/V1/DownloadableSample/WriteServiceTest.php index 542e1527f8e..450cca45c1e 100644 --- a/dev/tests/api-functional/testsuite/Magento/Downloadable/Service/V1/DownloadableSample/WriteServiceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Downloadable/Service/V1/DownloadableSample/WriteServiceTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Downloadable\Service\V1\DownloadableSample; use Magento\Catalog\Model\Product; diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Service/V1/WriteServiceTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Service/V1/WriteServiceTest.php index 79185a68dca..0d5b133bc29 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Service/V1/WriteServiceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Service/V1/WriteServiceTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\GiftMessage\Service\V1; use Magento\TestFramework\TestCase\WebapiAbstract; diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/CreditmemoCreateTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/CreditmemoCreateTest.php index e7fb134e9d2..a583c45e80b 100644 --- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/CreditmemoCreateTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/CreditmemoCreateTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Service\V1; use Magento\TestFramework\TestCase\WebapiAbstract; diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderStatusHistoryAddTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderStatusHistoryAddTest.php index c9a46103a9c..4673d76dc98 100644 --- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderStatusHistoryAddTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderStatusHistoryAddTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Service\V1; use Magento\Sales\Api\Data\OrderStatusHistoryInterface; diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipmentCreateTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipmentCreateTest.php index b73cd43ee82..d484246e16f 100644 --- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipmentCreateTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipmentCreateTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Service\V1; use Magento\TestFramework\TestCase\WebapiAbstract; diff --git a/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxClassRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxClassRepositoryTest.php index 4a462cbc3fb..829888c3443 100644 --- a/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxClassRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxClassRepositoryTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Tax\Api; use Magento\Framework\Api\FilterBuilder; diff --git a/dev/tests/api-functional/testsuite/Magento/Webapi/WsdlGenerationFromDataObjectTest.php b/dev/tests/api-functional/testsuite/Magento/Webapi/WsdlGenerationFromDataObjectTest.php index 3f27b6179ec..06beecd1b99 100644 --- a/dev/tests/api-functional/testsuite/Magento/Webapi/WsdlGenerationFromDataObjectTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Webapi/WsdlGenerationFromDataObjectTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Webapi; use Magento\TestFramework\Helper\Bootstrap; diff --git a/dev/tests/integration/framework/Magento/TestFramework/Db/Adapter/Mysql.php b/dev/tests/integration/framework/Magento/TestFramework/Db/Adapter/Mysql.php index dbbc6e449db..c224c313ea1 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Db/Adapter/Mysql.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Db/Adapter/Mysql.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * See \Magento\TestFramework\Db\Adapter\TransactionInterface */ diff --git a/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php b/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php index b20d22b4382..5ccb0771d18 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * MySQL platform database handler */ diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php index 2deb8c176ed..7cde467f0ec 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Grid; use Magento\Framework\App\Bootstrap; diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/NewActionTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/NewActionTest.php index 02b82f8996f..b984e413763 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/NewActionTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/NewActionTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Controller\Adminhtml\Product; /** diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/CompareTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/CompareTest.php index 9f0003eab39..ea5a6402354 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/CompareTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/CompareTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Controller\Product; /** diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php index 38a3237e65f..39d23e20bc3 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product; /** diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Resource/Product/OptionTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Resource/Product/OptionTest.php index c0b5b823179..44ce3a9c953 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Resource/Product/OptionTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Resource/Product/OptionTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Resource\Product; class OptionTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php index 2e46af3a1d2..25a5b3982b2 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Test class for \Magento\CatalogImportExport\Model\Import\Product * diff --git a/dev/tests/integration/testsuite/Magento/CatalogInventory/Block/Adminhtml/Form/Field/CustomergroupTest.php b/dev/tests/integration/testsuite/Magento/CatalogInventory/Block/Adminhtml/Form/Field/CustomergroupTest.php index d3d95928265..bbb408931f9 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogInventory/Block/Adminhtml/Form/Field/CustomergroupTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogInventory/Block/Adminhtml/Form/Field/CustomergroupTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogInventory\Block\Adminhtml\Form\Field; class CustomergroupTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/integration/testsuite/Magento/CatalogSearch/Model/Layer/Filter/CategoryTest.php b/dev/tests/integration/testsuite/Magento/CatalogSearch/Model/Layer/Filter/CategoryTest.php index 10a89ad5793..25507d7f2c2 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogSearch/Model/Layer/Filter/CategoryTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogSearch/Model/Layer/Filter/CategoryTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogSearch\Model\Layer\Filter; /** diff --git a/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/CategoryUrlRewriteGeneratorTest.php b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/CategoryUrlRewriteGeneratorTest.php index 315a9832467..0c44b81bdec 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/CategoryUrlRewriteGeneratorTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/CategoryUrlRewriteGeneratorTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogUrlRewrite\Model; use Magento\UrlRewrite\Service\V1\Data\UrlRewrite; diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_simple_product_saved.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_simple_product_saved.php index ef770525c80..629282c5804 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_simple_product_saved.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_simple_product_saved.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + require 'simple_product.php'; /** @var \Magento\Sales\Model\Quote $quote */ diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_virtual_product_and_address.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_virtual_product_and_address.php index b9627f05dd8..05449837b0c 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_virtual_product_and_address.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_virtual_product_and_address.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + require __DIR__ . '/../../Customer/_files/customer.php'; require __DIR__ . '/../../Customer/_files/customer_address.php'; require __DIR__ . '/../../../Magento/Catalog/_files/product_virtual.php'; diff --git a/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php b/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php index a7cb4bc3a3b..539e93800a6 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Cms\Controller; class RouterTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/ConfigTest.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/ConfigTest.php index f9450efff01..c815e317821 100644 --- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/ConfigTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super; use Magento\Catalog\Model\Resource\Eav\Attribute; diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php index 32e13662012..69660d121c2 100644 --- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php +++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\ConfigurableProduct\Model\Product\Type; /** diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Variable/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Variable/ConfigTest.php index 7624cba1b93..6e1b0c0c255 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Variable/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Variable/ConfigTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\Variable; /** diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php old mode 100755 new mode 100644 index 278aec01be9..1dbed91a74b --- a/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Customer\Controller; use Magento\Framework\Message\MessageInterface; diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/AjaxLoginTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/AjaxLoginTest.php old mode 100755 new mode 100644 index 14f4f633f27..116b41cb489 --- a/dev/tests/integration/testsuite/Magento/Customer/Controller/AjaxLoginTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/AjaxLoginTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Customer\Controller; use Magento\TestFramework\Helper\Bootstrap; diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/CustomerRegistryTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/CustomerRegistryTest.php index 9bbb4abb87f..4ebc493d441 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/CustomerRegistryTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/CustomerRegistryTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Customer\Model; use Magento\Framework\Exception\NoSuchEntityException; diff --git a/dev/tests/integration/testsuite/Magento/Customer/_files/customer_non_default_website_id.php b/dev/tests/integration/testsuite/Magento/Customer/_files/customer_non_default_website_id.php index 0625ddcc040..5748a9531d7 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/_files/customer_non_default_website_id.php +++ b/dev/tests/integration/testsuite/Magento/Customer/_files/customer_non_default_website_id.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * @var \Magento\Store\Model\Website $website */ diff --git a/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Export/AddressTest.php b/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Export/AddressTest.php index 63c1f682bad..b8f8c57adac 100644 --- a/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Export/AddressTest.php +++ b/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Export/AddressTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CustomerImportExport\Model\Export; use Magento\CustomerImportExport\Model\Import\Address as ImportAddress; diff --git a/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php b/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php index f699d5ff253..e16a75a6fca 100644 --- a/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php +++ b/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CustomerImportExport\Model\Import; use Magento\Framework\App\Filesystem\DirectoryList; diff --git a/dev/tests/integration/testsuite/Magento/Directory/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/Directory/Model/ObserverTest.php index 05dbbb15f82..58cdb85ce7e 100644 --- a/dev/tests/integration/testsuite/Magento/Directory/Model/ObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/Directory/Model/ObserverTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Directory\Model; use Magento\Framework\ObjectManagerInterface; diff --git a/dev/tests/integration/testsuite/Magento/Downloadable/_files/order_with_downloadable_product.php b/dev/tests/integration/testsuite/Magento/Downloadable/_files/order_with_downloadable_product.php index d925eda75bb..72ed334d97b 100644 --- a/dev/tests/integration/testsuite/Magento/Downloadable/_files/order_with_downloadable_product.php +++ b/dev/tests/integration/testsuite/Magento/Downloadable/_files/order_with_downloadable_product.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + $billingAddress = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Sales\Model\Order\Address', [ diff --git a/dev/tests/integration/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php b/dev/tests/integration/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php index ab85665a851..0dab21964dd 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Test for an PDO MySQL adapter */ diff --git a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php index d005d25826a..528f8087003 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Interception\Fixture; class Intercepted extends InterceptedParent implements InterceptedInterface diff --git a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedInterface.php b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedInterface.php index 7a951369e38..fd107192031 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedInterface.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedInterface.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Interception\Fixture; interface InterceptedInterface diff --git a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParent.php b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParent.php index 72ec8842a52..cdcb8fb8276 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParent.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParent.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Interception\Fixture; class InterceptedParent implements InterceptedParentInterface diff --git a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParentInterface.php b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParentInterface.php index 263e6d7bab5..9111ee6d8e0 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParentInterface.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParentInterface.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Interception\Fixture; interface InterceptedParentInterface diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/File/Collector/AggregatedTest.php b/dev/tests/integration/testsuite/Magento/Framework/Less/File/Collector/AggregatedTest.php index 0ff52725cb4..9868303c464 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/File/Collector/AggregatedTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Less/File/Collector/AggregatedTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Less\File\Collector; use Magento\Framework\App\Bootstrap; diff --git a/dev/tests/integration/testsuite/Magento/Framework/Model/Resource/Db/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Framework/Model/Resource/Db/AbstractTest.php index f6f95d32bb6..a85db471a15 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Model/Resource/Db/AbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Model/Resource/Db/AbstractTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Model\Resource\Db; class AbstractTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/integration/testsuite/Magento/Framework/Stdlib/Cookie/CookieScopeTest.php b/dev/tests/integration/testsuite/Magento/Framework/Stdlib/Cookie/CookieScopeTest.php index 4c15da838ad..63a84511452 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Stdlib/Cookie/CookieScopeTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Stdlib/Cookie/CookieScopeTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\Stdlib\Cookie; use Magento\Framework\ObjectManagerInterface; diff --git a/dev/tests/integration/testsuite/Magento/Framework/Stdlib/Cookie/PhpCookieReaderTest.php b/dev/tests/integration/testsuite/Magento/Framework/Stdlib/Cookie/PhpCookieReaderTest.php index 2185d74ad3a..fa22fd44751 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Stdlib/Cookie/PhpCookieReaderTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Stdlib/Cookie/PhpCookieReaderTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\Stdlib\Cookie; use Magento\Framework\Stdlib\Cookie\PhpCookieReader; @@ -51,4 +53,4 @@ class PhpCookieReaderTest extends \PHPUnit_Framework_TestCase { $_COOKIE = $this->preTestCookies; } -} \ No newline at end of file +} diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/EntityAbstractTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/EntityAbstractTest.php index 4eaa8dfe815..f2112082396 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/EntityAbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/EntityAbstractTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Test for abstract export model */ diff --git a/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/Address/SelectTest.php b/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/Address/SelectTest.php index ba1ea5ac55f..c59967f56e3 100644 --- a/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/Address/SelectTest.php +++ b/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/Address/SelectTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Multishipping\Block\Checkout\Address; use Magento\TestFramework\Helper\Bootstrap; diff --git a/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php b/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php index f4518206185..dbb9639f9d0 100644 --- a/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php +++ b/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Multishipping\Block\Checkout; /** diff --git a/dev/tests/integration/testsuite/Magento/Reports/Controller/Adminhtml/Report/Product/ViewedTest.php b/dev/tests/integration/testsuite/Magento/Reports/Controller/Adminhtml/Report/Product/ViewedTest.php index 73416a46d5e..d385563f7c8 100644 --- a/dev/tests/integration/testsuite/Magento/Reports/Controller/Adminhtml/Report/Product/ViewedTest.php +++ b/dev/tests/integration/testsuite/Magento/Reports/Controller/Adminhtml/Report/Product/ViewedTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Controller\Adminhtml\Report\Product; /** diff --git a/dev/tests/integration/testsuite/Magento/Reports/_files/viewed_products.php b/dev/tests/integration/testsuite/Magento/Reports/_files/viewed_products.php index 313c605ee8a..11e04a1560a 100644 --- a/dev/tests/integration/testsuite/Magento/Reports/_files/viewed_products.php +++ b/dev/tests/integration/testsuite/Magento/Reports/_files/viewed_products.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\AreaList') ->getArea('adminhtml') ->load(\Magento\Framework\App\Area::PART_CONFIG); diff --git a/dev/tests/integration/testsuite/Magento/Review/Block/Adminhtml/Edit/FormTest.php b/dev/tests/integration/testsuite/Magento/Review/Block/Adminhtml/Edit/FormTest.php index 0c5398262b1..bdabd72aa06 100644 --- a/dev/tests/integration/testsuite/Magento/Review/Block/Adminhtml/Edit/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Review/Block/Adminhtml/Edit/FormTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Review\Block\Adminhtml\Edit; class FormTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/integration/testsuite/Magento/Review/Block/FormTest.php b/dev/tests/integration/testsuite/Magento/Review/Block/FormTest.php index 0641d4cb384..31bfc21a04e 100644 --- a/dev/tests/integration/testsuite/Magento/Review/Block/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Review/Block/FormTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Review\Block; class FormTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Resource/Order/StatusTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Resource/Order/StatusTest.php index 753a7c1d614..abd91473c39 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Resource/Order/StatusTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Resource/Order/StatusTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Resource\Order; use Magento\TestFramework\Helper\Bootstrap; diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/order.php b/dev/tests/integration/testsuite/Magento/Sales/_files/order.php index 72f9d33a5dc..4ff04ed35d4 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/_files/order.php +++ b/dev/tests/integration/testsuite/Magento/Sales/_files/order.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + require 'default_rollback.php'; require __DIR__ . '/../../../Magento/Catalog/_files/product_simple.php'; /** @var \Magento\Catalog\Model\Product $product */ diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/order_fixture_store.php b/dev/tests/integration/testsuite/Magento/Sales/_files/order_fixture_store.php index 3e39ac4c321..e9e4b7b54be 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/_files/order_fixture_store.php +++ b/dev/tests/integration/testsuite/Magento/Sales/_files/order_fixture_store.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + require __DIR__ . '/../../../Magento/Core/_files/store.php'; require __DIR__ . '/../../../Magento/Catalog/_files/product_simple_duplicated.php'; diff --git a/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php index 73c61a5af10..f9df463d1ba 100644 --- a/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php +++ b/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Store\Model; use Magento\Framework\App\Bootstrap; diff --git a/dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote/SetupUtil.php b/dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote/SetupUtil.php index ac9e5a14168..8adffbf713a 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote/SetupUtil.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote/SetupUtil.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Tax\Model\Sales\Total\Quote; use Magento\Tax\Model\Config; diff --git a/dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote/SubtotalTest.php b/dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote/SubtotalTest.php index 6f24cee6597..93e4071ff7f 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote/SubtotalTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote/SubtotalTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Tax\Model\Sales\Total\Quote; use Magento\Tax\Model\ClassModel; diff --git a/dev/tests/integration/testsuite/Magento/Tax/Pricing/AdjustmentTest.php b/dev/tests/integration/testsuite/Magento/Tax/Pricing/AdjustmentTest.php index 02abbe0801f..bdc1f25f0b1 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Pricing/AdjustmentTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Pricing/AdjustmentTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Tax\Pricing; class AdjustmentTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php index 040c88dfe67..b2a3d9b1200 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Test\Integrity; class LayoutTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/User/InvalidateTokenTest.php b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/User/InvalidateTokenTest.php index 42ce74dccc7..312414f4019 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/User/InvalidateTokenTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/User/InvalidateTokenTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\User\Controller\Adminhtml\User; use Magento\Framework\Message\MessageInterface; diff --git a/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php b/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php index aa5c6886e45..fa43d4b61b0 100644 --- a/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\User\Model; /** diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php index 0965b51e8d6..10eac1836f0 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Widget\Model\Config; use Magento\TestFramework\Helper\Bootstrap; diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Helper/RssTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Helper/RssTest.php index efa37b33401..c58b29a5b03 100644 --- a/dev/tests/integration/testsuite/Magento/Wishlist/Helper/RssTest.php +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Helper/RssTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Wishlist\Helper; class RssTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/BlacklistInterface.php b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/BlacklistInterface.php index 487d0758338..ee20c1e1196 100644 --- a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/BlacklistInterface.php +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/BlacklistInterface.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\TestFramework\CodingStandard\Tool; interface BlacklistInterface @@ -15,4 +17,4 @@ interface BlacklistInterface * @return void */ public function setBlackList(array $blackList); -} \ No newline at end of file +} diff --git a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CopyPasteDetector.php b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CopyPasteDetector.php index 66a60989ba2..9b36e1cfe47 100644 --- a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CopyPasteDetector.php +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CopyPasteDetector.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * PHP Copy Paste Detector v1.4.0 tool wrapper */ diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php index a3087c320e5..6a5c9e2af59 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php @@ -6,6 +6,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + return [ '/config/global/fieldsets' => '', '/config/global/cache/betatypes' => '', diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php index 97baa914473..76e6bcb7d11 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php @@ -6,6 +6,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + return [ ['ADMIN_STORE_ID', 'Magento\Framework\AppInterface'], ['BACKORDERS_BELOW'], diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php index fa7d5001d20..cc675f9462e 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php @@ -4,6 +4,9 @@ * Format: array(<method_name = ''>[, <class_scope> = ''[, <replacement>[, <is_deprecated>]]]) * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + return [ ['__get', 'Magento\Framework\Object'], ['__set', 'Magento\Framework\Object'], diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php index 9edcd2c881a..2cb95cdc147 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php @@ -6,6 +6,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + return [ ['_addresses', 'Magento\Customer\Model\Customer'], ['_addMinimalPrice', 'Magento\Catalog\Model\Resource\Product\Collection'], diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/classes/normal_class.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/classes/normal_class.php index fe93af54335..657908ba822 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/classes/normal_class.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/classes/normal_class.php @@ -3,6 +3,8 @@ * Doc block for this file */ +// @codingStandardsIgnoreFile + /** * Doc block for this class * @SuppressWarnings(PHPMD.UnusedPrivateField) diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/method_without_scope.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/method_without_scope.php index 146fae12ef8..368e768525f 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/method_without_scope.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/method_without_scope.php @@ -3,6 +3,8 @@ * Doc block for this file */ +// @codingStandardsIgnoreFile + /** * Doc block for this class */ diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/multiline_wrong_declaration.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/multiline_wrong_declaration.php index 7a09f309800..f70fe08470a 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/multiline_wrong_declaration.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/multiline_wrong_declaration.php @@ -10,6 +10,9 @@ * @return string * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ + +// @codingStandardsIgnoreFile + function thereGoesFunc($someLongParam, $anotherLongParam, $moreEvenLongerParamForAllThatRoutineStuff, $andThereGoesOneParameter ) { diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/normal_func.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/normal_func.php index c2567f2fbe9..72c8cc4ad1c 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/normal_func.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/normal_func.php @@ -6,6 +6,9 @@ * @param string|null $inParam * @return string */ + +// @codingStandardsIgnoreFile + function someFunc($inParam) { if ($inParam === null) { diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/unneeded_multiline.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/unneeded_multiline.php index e4d2fe3639e..b5f9052441e 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/unneeded_multiline.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/unneeded_multiline.php @@ -8,6 +8,9 @@ * @return string * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ + +// @codingStandardsIgnoreFile + function thereGoesFunc($a, $b ) { diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/inline_doc/format/wrong_align.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/inline_doc/format/wrong_align.php index 312abd2e855..1c80b5708e9 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/inline_doc/format/wrong_align.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/inline_doc/format/wrong_align.php @@ -8,6 +8,9 @@ * @copyright ... * @license ... */ + +// @codingStandardsIgnoreFile + class Magento_Test_Php_Exemplar_CodeStyleTest_phpcs_input_coding_style_inline_doc_format_wrong_align { /** diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/inline_doc/normal.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/inline_doc/normal.php index de702f43d38..15c44b8e078 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/inline_doc/normal.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/inline_doc/normal.php @@ -7,6 +7,9 @@ * @copyright ... * @license ... */ + +// @codingStandardsIgnoreFile + class Magento_Test_Php_Exemplar_CodeStyleTest_phpcs_input_coding_style_inline_doc_normal { /** diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/property/normal_underscore.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/property/normal_underscore.php index c722fe07a81..ff4ac13b9d0 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/property/normal_underscore.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/property/normal_underscore.php @@ -2,6 +2,9 @@ /** * @SuppressWarnings(PHPMD.UnusedPrivateField) */ + +// @codingStandardsIgnoreFile + class Magento_Test_Php_Exemplar_CodeStyleTest_phpcs_input_naming_property_normal_underscore { private $_private = 1; diff --git a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php index e87c0716f88..e59ff9a6874 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Test\Php; use Magento\Framework\Test\Utility; diff --git a/dev/tests/unit/testsuite/Magento/AdminNotification/Block/ToolbarEntryTest.php b/dev/tests/unit/testsuite/Magento/AdminNotification/Block/ToolbarEntryTest.php index 5e1486cb1fb..df21637b88d 100644 --- a/dev/tests/unit/testsuite/Magento/AdminNotification/Block/ToolbarEntryTest.php +++ b/dev/tests/unit/testsuite/Magento/AdminNotification/Block/ToolbarEntryTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Test class for \Magento\AdminNotification\Block\ToolbarEntry */ diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/ImageTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/ImageTest.php index 7592870e9e8..a8ca5011378 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/ImageTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/ImageTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Tests for \Magento\Framework\Data\Form\Element\Image */ diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/FormTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/FormTest.php index c5a1b48228a..07cf1d1eed0 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/FormTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/FormTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\System\Config; class FormTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnSetTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnSetTest.php index 1a04a905088..a5adc015623 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnSetTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnSetTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Grid; class ColumnSetTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Cache/CleanMediaTest.php b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Cache/CleanMediaTest.php index da072d569e7..7f3fb0f9837 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Cache/CleanMediaTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Cache/CleanMediaTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Controller\Adminhtml\Cache; class CleanMediaTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard/AbstractTestCase.php b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard/AbstractTestCase.php index bdcdb6b7f0f..99ec1c0288a 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard/AbstractTestCase.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard/AbstractTestCase.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Controller\Adminhtml\Dashboard; /** @@ -46,4 +49,4 @@ class AbstractTestCase extends \PHPUnit_Framework_TestCase $result = $controller->execute(); $this->assertInstanceOf('Magento\Framework\Controller\Result\Raw', $result); } -} \ No newline at end of file +} diff --git a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard/CustomersMostTest.php b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard/CustomersMostTest.php index c3d08dccc63..9e6aa1a1fc0 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard/CustomersMostTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard/CustomersMostTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Controller\Adminhtml\Dashboard; /** @@ -16,4 +19,4 @@ class CustomersMostTest extends AbstractTestCase 'Magento\Backend\Block\Dashboard\Tab\Customers\Most' ); } -} \ No newline at end of file +} diff --git a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard/CustomersNewestTest.php b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard/CustomersNewestTest.php index 34174f545ac..5bc378ee3b4 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard/CustomersNewestTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard/CustomersNewestTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Controller\Adminhtml\Dashboard; /** @@ -16,4 +19,4 @@ class CustomersNewestTest extends AbstractTestCase 'Magento\Backend\Block\Dashboard\Tab\Customers\Newest' ); } -} \ No newline at end of file +} diff --git a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard/ProductsViewedTest.php b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard/ProductsViewedTest.php index 13760c01d64..cf2b1be5dd0 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard/ProductsViewedTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard/ProductsViewedTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Controller\Adminhtml\Dashboard; /** @@ -16,4 +19,4 @@ class ProductsViewedTest extends AbstractTestCase 'Magento\Backend\Block\Dashboard\Tab\Products\Viewed' ); } -} \ No newline at end of file +} diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/LifetimeTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/LifetimeTest.php index 29851754978..41d13fb57b8 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/LifetimeTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/LifetimeTest.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Config\Backend\Cookie; use Magento\Framework\Session\Config\Validator\CookieLifetimeValidator; diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/PathTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/PathTest.php index 07686131cb6..ebcbec3608b 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/PathTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/PathTest.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Config\Backend\Cookie; use Magento\Framework\Session\Config\Validator\CookiePathValidator; diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Storage/Media/DatabaseTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Storage/Media/DatabaseTest.php index a54e9a269d6..b6fee4bac4b 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Storage/Media/DatabaseTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Storage/Media/DatabaseTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Config\Source\Storage\Media; use Magento\Framework\App\DeploymentConfig\ResourceConfig; diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/StructureTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/StructureTest.php index 5b6ef58dc8c..7c03e3af8fc 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/StructureTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/StructureTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Config; class StructureTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php index 74d4b10a1eb..2d7b0d4d673 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Test class for \Magento\Backend\Model\Url */ diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/OptionTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/OptionTest.php index c175bba7d17..b7945dad2f6 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/OptionTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/OptionTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Bundle\Block\Catalog\Product\View\Type\Bundle; class OptionTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Block/Catalog/Product/View/Type/BundleTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Block/Catalog/Product/View/Type/BundleTest.php index 4094f875f13..50d231147a0 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Block/Catalog/Product/View/Type/BundleTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Block/Catalog/Product/View/Type/BundleTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Bundle\Block\Catalog\Product\View\Type; use Magento\Bundle\Block\Catalog\Product\View\Type\Bundle as BundleBlock; diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Model/LinkManagementTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Model/LinkManagementTest.php index 47c3e8d52b1..2250c7bc8cc 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Model/LinkManagementTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Model/LinkManagementTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Bundle\Model; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Adjustment/CalculatorTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Adjustment/CalculatorTest.php index ac5fbc2ef58..6bf40c3189e 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Adjustment/CalculatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Adjustment/CalculatorTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Bundle\Pricing\Adjustment; use Magento\Bundle\Model\Product\Price as ProductPrice; diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/DiscountCalculatorTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/DiscountCalculatorTest.php index 581df0d0956..1e95b9c3836 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/DiscountCalculatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/DiscountCalculatorTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Bundle\Pricing\Price; use Magento\Catalog\Pricing\Price\FinalPrice; diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/GroupPriceTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/GroupPriceTest.php index 4dff0a77fce..1d5d39feb0d 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/GroupPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/GroupPriceTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Bundle\Pricing\Price; class GroupPriceTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Category/AbstractCategoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Category/AbstractCategoryTest.php index be0554b982b..b27918ab113 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Category/AbstractCategoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Category/AbstractCategoryTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Block\Adminhtml\Category; class AbstractCategoryTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Layer/ViewTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Layer/ViewTest.php index b6e452abe69..8ba8436d3ad 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Layer/ViewTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Layer/ViewTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Block\Layer; class ViewTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/AbstractProductTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/AbstractProductTest.php index 5745e650450..b65408ca2e1 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/AbstractProductTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/AbstractProductTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Block\Product; /** diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ViewTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ViewTest.php index adc2c1894c8..9bae6624288 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ViewTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ViewTest.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Block\Product; class ViewTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Widget/CategoriesJsonTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Widget/CategoriesJsonTest.php index b30b61a01c1..9dac4577e2c 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Widget/CategoriesJsonTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Widget/CategoriesJsonTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Controller\Adminhtml\Category\Widget; class CategoriesJsonTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Widget/ChooserTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Widget/ChooserTest.php index a13c96be969..75887932ef3 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Widget/ChooserTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Widget/ChooserTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Controller\Adminhtml\Category\Widget; class ChooserTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Product/Compare/IndexTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Product/Compare/IndexTest.php index 60cafb13995..a02bdcdfec9 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Product/Compare/IndexTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Product/Compare/IndexTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Controller\Product\Compare; use Magento\Catalog\Model\Resource\Product\Compare\Item; diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/App/Action/ContextPluginTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/App/Action/ContextPluginTest.php index c38b82f9b89..1e131df3fc0 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/App/Action/ContextPluginTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/App/Action/ContextPluginTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\App\Action; /** diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Backend/CustomlayoutupdateTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Backend/CustomlayoutupdateTest.php index 30bb4837424..4afd091229c 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Backend/CustomlayoutupdateTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Backend/CustomlayoutupdateTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Attribute\Backend; use Magento\Framework\Object; diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/Attribute/Backend/SortbyTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/Attribute/Backend/SortbyTest.php index 8429250a06a..363dba4ed24 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/Attribute/Backend/SortbyTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/Attribute/Backend/SortbyTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Category\Attribute\Backend; class SortbyTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/AttributeRepositoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/AttributeRepositoryTest.php index ed60492b140..6b032d353e9 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/AttributeRepositoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/AttributeRepositoryTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Category; class AttributeRepositoryTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/TreeTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/TreeTest.php index 27795b2501b..d1eb0ca38e3 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/TreeTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/TreeTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Category; class TreeTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/CategoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/CategoryTest.php index a63f7682958..8980b9fe6d7 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/CategoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/CategoryTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model; /** diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Category/AffectCacheTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Category/AffectCacheTest.php index 21d1440527c..c3d4faaeac8 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Category/AffectCacheTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Category/AffectCacheTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Indexer\Category; class AffectCacheTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/AffectCacheTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/AffectCacheTest.php index d2e8328def0..8149a75da88 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/AffectCacheTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/AffectCacheTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Indexer\Product; class AffectCacheTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/EraserTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/EraserTest.php index 47a5cc9ca08..49df96737de 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/EraserTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/EraserTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Indexer\Product\Flat\Action; class EraserTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowTest.php index 22c1100a3d1..619c2916452 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Indexer\Product\Flat\Action; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowsTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowsTest.php index 51855dbf341..6a34399408e 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowsTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowsTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Indexer\Product\Flat\Action; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Price/Plugin/CustomerGroupTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Price/Plugin/CustomerGroupTest.php index 52b3b6a1fc8..7cf5724b1e1 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Price/Plugin/CustomerGroupTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Price/Plugin/CustomerGroupTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Indexer\Product\Price\Plugin; class CustomerGroupTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/AvailabilityFlagTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/AvailabilityFlagTest.php index 1348c634a00..5161790a00b 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/AvailabilityFlagTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/AvailabilityFlagTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Layer\Category; class AvailabilityFlagTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/CollectionFilterTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/CollectionFilterTest.php index 973f7f3eff2..6629e512cfe 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/CollectionFilterTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/CollectionFilterTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Layer\Category; class CollectionFilterTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/FilterableAttributeListTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/FilterableAttributeListTest.php index df927d51a90..0a582c3752c 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/FilterableAttributeListTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/FilterableAttributeListTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Layer\Category; class FilterableAttributeListTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/FilterListTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/FilterListTest.php index 8873ba300b1..cb030eb9a89 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/FilterListTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/FilterListTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Layer; class FilterListTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/FilterableAttributeListTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/FilterableAttributeListTest.php index b7a4da94d3b..20c12f6a4ce 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/FilterableAttributeListTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/FilterableAttributeListTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Layer\Search; class FilterableAttributeListTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layout/DepersonalizePluginTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layout/DepersonalizePluginTest.php index bb911d04a89..023e059b375 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layout/DepersonalizePluginTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layout/DepersonalizePluginTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Layout; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/ManagementTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/ManagementTest.php index 8c9fac5e2e4..8eda004ea8a 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/ManagementTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/ManagementTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product\Attribute; class ManagementTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/RepositoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/RepositoryTest.php index ee31d84d3ae..cb66e3d7627 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/RepositoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/RepositoryTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product\Attribute; class RepositoryTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Source/StatusTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Source/StatusTest.php index f1fb1f6c3c5..4e40eb93dba 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Source/StatusTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Source/StatusTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product\Attribute\Source; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/TypesListTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/TypesListTest.php index e429e821089..5a8ef299157 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/TypesListTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/TypesListTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product\Attribute; class TypesListTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/LinkTypeProviderTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/LinkTypeProviderTest.php index 53bb94fc97d..2d7f0fd62f7 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/LinkTypeProviderTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/LinkTypeProviderTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product; class LinkTypeProviderTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Option/Validator/PoolTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Option/Validator/PoolTest.php index af4fdb6d7de..df7d461c1a8 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Option/Validator/PoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Option/Validator/PoolTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product\Option\Validator; class PoolTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/PriceModifierTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/PriceModifierTest.php index 0f8dbe5516a..cd55c6c49ce 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/PriceModifierTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/PriceModifierTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product; class PriceModifierTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/TierPriceManagementTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/TierPriceManagementTest.php index e9a9b8ec15b..f18ee8b5c3e 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/TierPriceManagementTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/TierPriceManagementTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product; use Magento\Customer\Model\GroupManagement; diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTest.php index c94f539159a..3d2e0e07152 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/TreeTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/TreeTest.php index e410f6b4fec..85e00714f27 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/TreeTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/TreeTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Resource\Category; class TreeTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Eav/AttributeTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Eav/AttributeTest.php index 363a4056506..6e7f73f2ab8 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Eav/AttributeTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Eav/AttributeTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Resource\Eav; use \Magento\Catalog\Model\Resource\Eav\Attribute; diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Attribute/Backend/MediaTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Attribute/Backend/MediaTest.php index 306d779e1f2..823bc7305f9 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Attribute/Backend/MediaTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Attribute/Backend/MediaTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Resource\Product\Attribute\Backend; /** diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/CollectionTest.php index cbaa9833206..6ce43051315 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/CollectionTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Resource\Product\Option; class CollectionTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/BasePriceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/BasePriceTest.php index 577b8abf638..da0ce432644 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/BasePriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/BasePriceTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Pricing\Price; /** diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/GroupPriceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/GroupPriceTest.php index e3f452cc9c2..c947407edba 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/GroupPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/GroupPriceTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Pricing\Price; /** diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/TierPriceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/TierPriceTest.php index c0c1f7bfe5e..ba717775a7b 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/TierPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/TierPriceTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Pricing\Price; use Magento\Customer\Model\Group; diff --git a/dev/tests/unit/testsuite/Magento/CatalogRule/Model/CronTest.php b/dev/tests/unit/testsuite/Magento/CatalogRule/Model/CronTest.php index ada8e4c92e9..c2a8e41ff33 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogRule/Model/CronTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogRule/Model/CronTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\CatalogRule\Model; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/CategoryTest.php b/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/CategoryTest.php index c1521b2c77e..090aafbedcf 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/CategoryTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/CategoryTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogRule\Plugin\Indexer; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/CustomerGroupTest.php b/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/CustomerGroupTest.php index d468b48ef68..51748bc1a0d 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/CustomerGroupTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/CustomerGroupTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogRule\Plugin\Indexer; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/ImportExportTest.php b/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/ImportExportTest.php index d8816c9af2d..78c915f8d11 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/ImportExportTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/ImportExportTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogRule\Plugin\Indexer; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/WebsiteTest.php b/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/WebsiteTest.php index ff6dac40497..ef69b13b88b 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/WebsiteTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/WebsiteTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogRule\Plugin\Indexer; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Helper/CartTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Helper/CartTest.php index dee612d5bb9..e380d14a6d5 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Helper/CartTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Helper/CartTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Helper; use Magento\Framework\App\Action\Action; diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Helper/DataTest.php index ddb71d0d481..20035d76b23 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Helper/DataTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Helper; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/Layout/DepersonalizePluginTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/Layout/DepersonalizePluginTest.php index caba8173660..a871f4e6830 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/Layout/DepersonalizePluginTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/Layout/DepersonalizePluginTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Model\Layout; /** diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/SessionTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/SessionTest.php index d5bb6fe1b0f..d418bcb745b 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/SessionTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/SessionTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Test class for \Magento\Checkout\Model\Session */ diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php index bad1ba8493c..6d0db00c22d 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Model\Type; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Billing/WriteServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Billing/WriteServiceTest.php index 46358567666..d4203291ac3 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Billing/WriteServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Billing/WriteServiceTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\Address\Billing; class WriteServiceTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ConverterTest.php index c4993a45099..fedaa1038b7 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ConverterTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\Address; use Magento\Checkout\Service\V1\Data\Cart\Address; diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceTest.php index d8ba19ff325..654f89a3320 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\Address\Shipping; class WriteServiceTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ValidatorTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ValidatorTest.php index 52fe4ee0589..8bafc8bbbf7 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ValidatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ValidatorTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\Address; use Magento\Checkout\Service\V1\Data\Cart\Address; diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/PaymentMethod/BuilderTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/PaymentMethod/BuilderTest.php index 04324909f39..80e2deb5862 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/PaymentMethod/BuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/PaymentMethod/BuilderTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\Cart\PaymentMethod; class BuilderTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/PaymentMethod/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/PaymentMethod/ConverterTest.php index 9e2c0ea62ad..4463a051bd9 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/PaymentMethod/ConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/PaymentMethod/ConverterTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\Cart\PaymentMethod; use Magento\Checkout\Service\V1\Data\Cart\PaymentMethod; diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php index da0cdc677b3..0ce65b90b32 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\Cart; use Magento\Framework\Api\SearchCriteria; diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/TotalsServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/TotalsServiceTest.php index dae1d6b9e59..7c6d5d44c94 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/TotalsServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/TotalsServiceTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\Cart; class TotalsServiceTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/WriteServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/WriteServiceTest.php index 5e683c74434..7ff2a75a5e7 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/WriteServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/WriteServiceTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\Cart; use Magento\Framework\Exception\CouldNotSaveException; diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Coupon/ReadServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Coupon/ReadServiceTest.php index 18f1afad761..752f466406e 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Coupon/ReadServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Coupon/ReadServiceTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\Coupon; use Magento\Checkout\Service\V1\Data\Cart\Coupon as Coupon; diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Coupon/WriteServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Coupon/WriteServiceTest.php index 6e10100ae9b..e9e2fe6d248 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Coupon/WriteServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Coupon/WriteServiceTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\Coupon; class WriteServiceTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/ShippingMethodConverterTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/ShippingMethodConverterTest.php index 8987aa4f1e6..a3e5f5e5baa 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/ShippingMethodConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/ShippingMethodConverterTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\Data\Cart; class ShippingMethodConverterTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/PaymentMethod/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/PaymentMethod/ConverterTest.php index 58f49fce129..6b9bf408aa2 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/PaymentMethod/ConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/PaymentMethod/ConverterTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\Data\PaymentMethod; use Magento\Checkout\Service\V1\Data\PaymentMethod; diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Item/ReaderServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Item/ReaderServiceTest.php index 940bfd6272a..adc831d231b 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Item/ReaderServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Item/ReaderServiceTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\Item; use Magento\Checkout\Service\V1\Data\Cart\Item as Item; diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceTest.php index 7bfdd2524ba..b38a7a8bbf4 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\PaymentMethod; class ReadServiceTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceTest.php index 918124800a2..85bdaedec6c 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\PaymentMethod; class WriteServiceTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableImportExport/Model/Export/RowCustomizerTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableImportExport/Model/Export/RowCustomizerTest.php index 125e01506a6..67a8c39095f 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableImportExport/Model/Export/RowCustomizerTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableImportExport/Model/Export/RowCustomizerTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\ConfigurableImportExport\Model\Export; class RowCustomizerTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Helper/DataTest.php index ae2abde41c9..e2956b8fa27 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Helper/DataTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\ConfigurableProduct\Helper; class DataTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php index 7f282cceff0..edf2462c469 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\ConfigurableProduct\Model\Product\Type; /** diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Type/PluginTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Type/PluginTest.php index 6e5fcef1693..3059ade03dc 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Type/PluginTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Type/PluginTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\ConfigurableProduct\Model\Product\Type; /** diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Quote/Item/QuantityValidator/Initializer/Option/Plugin/ConfigurableProductTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Quote/Item/QuantityValidator/Initializer/Option/Plugin/ConfigurableProductTest.php index 06ee725aa90..3576d8f94a8 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Quote/Item/QuantityValidator/Initializer/Option/Plugin/ConfigurableProductTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Quote/Item/QuantityValidator/Initializer/Option/Plugin/ConfigurableProductTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\ConfigurableProduct\Model\Quote\Item\QuantityValidator\Initializer\Option\Plugin; class ConfigurableProductTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/SuggestedAttributeListTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/SuggestedAttributeListTest.php index f0d6bc8fa39..08c19635374 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/SuggestedAttributeListTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/SuggestedAttributeListTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\ConfigurableProduct\Model; class SuggestedAttributeListTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Contact/Controller/Index/IndexTest.php b/dev/tests/unit/testsuite/Magento/Contact/Controller/Index/IndexTest.php index 22211b87391..361a9147d67 100644 --- a/dev/tests/unit/testsuite/Magento/Contact/Controller/Index/IndexTest.php +++ b/dev/tests/unit/testsuite/Magento/Contact/Controller/Index/IndexTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Contact\Controller\Index; class IndexTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Contact/Controller/IndexTest.php b/dev/tests/unit/testsuite/Magento/Contact/Controller/IndexTest.php index b5207f4f577..276ade4eae1 100644 --- a/dev/tests/unit/testsuite/Magento/Contact/Controller/IndexTest.php +++ b/dev/tests/unit/testsuite/Magento/Contact/Controller/IndexTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Contact\Controller; class IndexTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Contact/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Contact/Helper/DataTest.php index 9a4c562723a..02e03fec846 100644 --- a/dev/tests/unit/testsuite/Magento/Contact/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Contact/Helper/DataTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Contact\Helper; class DataTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Core/App/Router/NoRouteHandlerTest.php b/dev/tests/unit/testsuite/Magento/Core/App/Router/NoRouteHandlerTest.php index 2cc5967daf4..7a4aaa95f0c 100644 --- a/dev/tests/unit/testsuite/Magento/Core/App/Router/NoRouteHandlerTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/App/Router/NoRouteHandlerTest.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\App\Router; class NoRouteHandlerTest extends \Magento\Test\BaseTestCase diff --git a/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php b/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php index eeb24e00d5f..89f0ff8f0ef 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Helper; class ThemeTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/App/EmulationTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/App/EmulationTest.php index 2560e454160..f18e426f12d 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/App/EmulationTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/App/EmulationTest.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\App; class EmulationTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Asset/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Asset/ConfigTest.php index 01fedc22451..2f979674770 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Asset/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Asset/ConfigTest.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\Asset; class ConfigTest extends \Magento\Test\BaseTestCase diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Asset/Plugin/CleanMergedJsCssTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Asset/Plugin/CleanMergedJsCssTest.php index c0b124e603b..ece9fdccd6b 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Asset/Plugin/CleanMergedJsCssTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Asset/Plugin/CleanMergedJsCssTest.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\Asset\Plugin; use Magento\Framework\App\Filesystem\DirectoryList; diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/DepersonalizePluginTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/DepersonalizePluginTest.php index fe5768540aa..d459eb8003f 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/DepersonalizePluginTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/DepersonalizePluginTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\Layout; /** diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php index de3b022ae5a..22ebb73f8dd 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Test of image path model */ diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/View/DesignTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/View/DesignTest.php index 2304f6ff1be..bb8a12efc54 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/View/DesignTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/View/DesignTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\View; class DesignTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Account/Dashboard/InfoTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Account/Dashboard/InfoTest.php index 4216c722b53..b8487b2297a 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Account/Dashboard/InfoTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Account/Dashboard/InfoTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Customer\Block\Account\Dashboard; use Magento\Framework\Exception\NoSuchEntityException; diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AccountTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AccountTest.php index 0cce2cb3e3f..3494b4474f9 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AccountTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AccountTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Customer\Block\Adminhtml\Edit\Tab; use Magento\Customer\Api\AccountManagementInterface; diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/DobTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/DobTest.php index 63e82abc9ee..6bc6a7d7b84 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/DobTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/DobTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Customer\Block\Widget; use Magento\Framework\Exception\NoSuchEntityException; diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/GenderTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/GenderTest.php index 9ea96fad746..e8ba0a2920a 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/GenderTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/GenderTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Customer\Block\Widget; use Magento\Customer\Api\Data\CustomerInterface; diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/NameTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/NameTest.php index 5aad6669d1f..b100b7661b7 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/NameTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/NameTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Customer\Block\Widget; use Magento\Customer\Api\Data\AttributeMetadataInterface; diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/TaxvatTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/TaxvatTest.php index 8e9d5099103..65d8c4b9bce 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/TaxvatTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/TaxvatTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Customer\Block\Widget; use Magento\Framework\Exception\NoSuchEntityException; diff --git a/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/ConfirmTest.php b/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/ConfirmTest.php index ce15530aaae..ce3d60f7814 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/ConfirmTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/ConfirmTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Customer\Controller\Account; use Magento\Customer\Helper\Address; diff --git a/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreatePostTest.php b/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreatePostTest.php index 6fbbddb9bc8..07586c22a98 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreatePostTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreatePostTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Customer\Controller\Account; use Magento\Customer\Api\AccountManagementInterface; diff --git a/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreateTest.php b/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreateTest.php index 93ce0d56de5..93f0f1f37f1 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreateTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreateTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Customer\Controller\Account; class CreateTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Customer/Controller/Adminhtml/Index/ResetPasswordTest.php b/dev/tests/unit/testsuite/Magento/Customer/Controller/Adminhtml/Index/ResetPasswordTest.php index 47f04e261c3..df9872a1796 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Controller/Adminhtml/Index/ResetPasswordTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Controller/Adminhtml/Index/ResetPasswordTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Customer\Controller\Adminhtml\Index; use Magento\Customer\Api\Data\CustomerInterface; diff --git a/dev/tests/unit/testsuite/Magento/Customer/Controller/Ajax/LoginTest.php b/dev/tests/unit/testsuite/Magento/Customer/Controller/Ajax/LoginTest.php index 2751cda1ee1..03943cf773e 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Controller/Ajax/LoginTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Controller/Ajax/LoginTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Test customer ajax login controller */ diff --git a/dev/tests/unit/testsuite/Magento/Customer/Helper/Session/CurrentCustomerTest.php b/dev/tests/unit/testsuite/Magento/Customer/Helper/Session/CurrentCustomerTest.php index 2778332f6fc..01cc25afdd1 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Helper/Session/CurrentCustomerTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Helper/Session/CurrentCustomerTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Customer\Helper\Session; class CurrentCustomerTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/AddressTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/AddressTest.php index 425cd597eab..8f4fc57edf1 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/AddressTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/AddressTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Customer\Model\Resource; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/GroupTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/GroupTest.php index 694f9b79ef5..c669e5d7776 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/GroupTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/GroupTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Customer\Model\Resource; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; diff --git a/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Import/CustomerCompositeTest.php b/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Import/CustomerCompositeTest.php index 662858bed44..dd73a542952 100644 --- a/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Import/CustomerCompositeTest.php +++ b/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Import/CustomerCompositeTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\CustomerImportExport\Model\Import; use Magento\Framework\Filesystem\Driver\File; diff --git a/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php b/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php index 7a9aa71f0ff..13e4eb08225 100644 --- a/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php +++ b/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Test class for \Magento\CustomerImportExport\Model\Import\Customer */ diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php index 564b2ad3ac6..ea5cf91b73d 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\DesignEditor\Controller\Varien\Router; class StandardTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Directory/Model/Resource/Country/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Directory/Model/Resource/Country/CollectionTest.php index 00158413afe..d4586d3b506 100644 --- a/dev/tests/unit/testsuite/Magento/Directory/Model/Resource/Country/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Directory/Model/Resource/Country/CollectionTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Directory\Model\Resource\Country; class CollectionTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/AbstractDataTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/AbstractDataTest.php index f1d427f3744..294ffca613c 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/AbstractDataTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/AbstractDataTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Eav\Model\Attribute\Data; class AbstractDataTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/FileTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/FileTest.php index 1560e4e3048..6880a016eb3 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/FileTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/FileTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Eav\Model\Attribute\Data; class FileTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/ImageTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/ImageTest.php index 626e8b99683..8bddc1e2252 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/ImageTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/ImageTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Eav\Model\Attribute\Data; class ImageTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/AttributeManagementTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/AttributeManagementTest.php index 03959f7ef8f..2f8acf66481 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/AttributeManagementTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/AttributeManagementTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Eav\Model; use Magento\Framework\Exception\NoSuchEntityException; diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Source/BooleanTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Source/BooleanTest.php index 4850fbbcd47..90b0884ecc9 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Source/BooleanTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Source/BooleanTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Eav\Model\Entity\Attribute\Source; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Attribute/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Attribute/CollectionTest.php index b7bfd64d583..b6d40ce7c33 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Attribute/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Attribute/CollectionTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Eav\Model\Resource\Attribute; class CollectionTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/AttributeTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/AttributeTest.php index d71079bcd85..947e15858bf 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/AttributeTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/AttributeTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Eav\Model\Resource\Entity; class AttributeTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Eav/Plugin/Model/Resource/Entity/AttributeTest.php b/dev/tests/unit/testsuite/Magento/Eav/Plugin/Model/Resource/Entity/AttributeTest.php index b4814c92230..9353b3d0762 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Plugin/Model/Resource/Entity/AttributeTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Plugin/Model/Resource/Entity/AttributeTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Eav\Plugin\Model\Resource\Entity; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/PreviewTest.php b/dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/PreviewTest.php index 97acc066c40..e2c54c4f00a 100644 --- a/dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/PreviewTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/PreviewTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Email\Block\Adminhtml\Template; class PreviewTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Action/ActionTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Action/ActionTest.php index a28e4ab127c..9200c47ad4c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Action/ActionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Action/ActionTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\App\Action; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/AreaListTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/AreaListTest.php index 566594220be..a4bcccb8bc7 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/AreaListTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/AreaListTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\App; class AreaListTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/BootstrapTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/BootstrapTest.php index 986ad6a02af..59aec77d003 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/BootstrapTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/BootstrapTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\App; use Magento\Framework\App\Filesystem\DirectoryList; diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManager/ConfigLoaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManager/ConfigLoaderTest.php index 61c5ba85004..0bf381f9a5b 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManager/ConfigLoaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManager/ConfigLoaderTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\App\ObjectManager; class ConfigLoaderTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Request/HttpTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Request/HttpTest.php index 48140770efc..40530f66723 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Request/HttpTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Request/HttpTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\App\Request; use Magento\Framework\App\Request\Http as Request; diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/ResourceTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/ResourceTest.php index 9c928641c86..7b7957d6fbd 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/ResourceTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/ResourceTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\App; class ResourceTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/StaticResourceTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/StaticResourceTest.php index 25ffcac9bdd..31808c05bb3 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/StaticResourceTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/StaticResourceTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\App; class StaticResourceTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/Autoload/ClassLoaderWrapperTest.php b/dev/tests/unit/testsuite/Magento/Framework/Autoload/ClassLoaderWrapperTest.php index 66bfa5c5ef7..f340912df93 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Autoload/ClassLoaderWrapperTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Autoload/ClassLoaderWrapperTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Autoload; use Composer\Autoload\ClassLoader; diff --git a/dev/tests/unit/testsuite/Magento/Framework/Cache/CoreTest.php b/dev/tests/unit/testsuite/Magento/Framework/Cache/CoreTest.php index e9d37a5d1f9..3fe7035fb4f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Cache/CoreTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Cache/CoreTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * \Magento\Framework\Cache\Core test case */ diff --git a/dev/tests/unit/testsuite/Magento/Framework/Code/Reader/_files/ClassesForArgumentsReader.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Reader/_files/ClassesForArgumentsReader.php index 37b79aa8449..e5043aef8f9 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Code/Reader/_files/ClassesForArgumentsReader.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Reader/_files/ClassesForArgumentsReader.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + class ClassWithAllArgumentTypes { const DEFAULT_VALUE = 'Const Value'; diff --git a/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForArgumentSequence.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForArgumentSequence.php index da2693ceafe..8fd7d25b71c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForArgumentSequence.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForArgumentSequence.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace ArgumentSequence; class ContextObject implements \Magento\Framework\ObjectManager\ContextInterface diff --git a/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForConstructorIntegrity.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForConstructorIntegrity.php index 3f5728a081c..ec4793e4f91 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForConstructorIntegrity.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForConstructorIntegrity.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + class ClassA { } diff --git a/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForContextAggregation.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForContextAggregation.php index fbb19917b9d..b4f8248570c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForContextAggregation.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForContextAggregation.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + class ClassFirst { } diff --git a/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForTypeDuplication.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForTypeDuplication.php index 29764b911ba..5d26f6ae3ca 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForTypeDuplication.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForTypeDuplication.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace TypeDuplication; interface ArgumentInterface diff --git a/dev/tests/unit/testsuite/Magento/Framework/Config/Composer/PackageTest.php b/dev/tests/unit/testsuite/Magento/Framework/Config/Composer/PackageTest.php index 03759d24c02..b7b8b55841b 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Config/Composer/PackageTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/Composer/PackageTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\Config\Composer; class PackageTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/Config/DataTest.php b/dev/tests/unit/testsuite/Magento/Framework/Config/DataTest.php index 22f55ab0ba6..6329fd74499 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Config/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/DataTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Config; class DataTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/DB/AbstractMapperTest.php b/dev/tests/unit/testsuite/Magento/Framework/DB/AbstractMapperTest.php index 7ccd46efefa..223bf328f93 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/DB/AbstractMapperTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/DB/AbstractMapperTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\DB; /** diff --git a/dev/tests/unit/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php b/dev/tests/unit/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php index f073f7f6250..60b5c4d9f04 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * \Magento\Framework\DB\Adapter\Pdo\Mysql class test */ diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Collection/DbTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Collection/DbTest.php index 34dbe81ac59..2e9407b2d62 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Collection/DbTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Collection/DbTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Data\Collection; class DbTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/AbstractElementTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/AbstractElementTest.php index 9e28e2437cd..9f457093b39 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/AbstractElementTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/AbstractElementTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Tests for \Magento\Framework\Data\Form\Element\AbstractElement */ diff --git a/dev/tests/unit/testsuite/Magento/Framework/File/CsvTest.php b/dev/tests/unit/testsuite/Magento/Framework/File/CsvTest.php index 84d4264812c..27062a4abd9 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/File/CsvTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/File/CsvTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Test class for \Magento\Framework\File\Csv. */ diff --git a/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/Generator/InterceptorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/Generator/InterceptorTest.php index 117368c8d09..63923900063 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/Generator/InterceptorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/Generator/InterceptorTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\Interception\Code\Generator; class InterceptorTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/InterfaceValidatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/InterfaceValidatorTest.php index a0f69f7303e..95fec76a36b 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/InterfaceValidatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/InterfaceValidatorTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\Interception\Code; class InterfaceValidatorTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ExtraParameters.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ExtraParameters.php index 9334c5663f5..c875acf177a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ExtraParameters.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ExtraParameters.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; class ExtraParameters diff --git a/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsCount.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsCount.php index 791a5c82422..ea33862ec17 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsCount.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsCount.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; class IncompatibleArgumentsCount diff --git a/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsType.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsType.php index 53545ade3b6..02bc1345f30 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsType.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsType.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; class IncompatibleArgumentsType diff --git a/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/InvalidProceed.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/InvalidProceed.php index 6aba9346b04..a133b09d023 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/InvalidProceed.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/InvalidProceed.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; class InvalidProceed diff --git a/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ValidPlugin.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ValidPlugin.php index e6c9060066c..a4664725764 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ValidPlugin.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ValidPlugin.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; class ValidPlugin diff --git a/dev/tests/unit/testsuite/Magento/Framework/Less/FileGeneratorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Less/FileGeneratorTest.php index 9d59b0a818b..7a5a85b2142 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Less/FileGeneratorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Less/FileGeneratorTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\Less; use Magento\Framework\App\Filesystem\DirectoryList; diff --git a/dev/tests/unit/testsuite/Magento/Framework/Less/PreProcessor/Instruction/ImportTest.php b/dev/tests/unit/testsuite/Magento/Framework/Less/PreProcessor/Instruction/ImportTest.php index 8cded2c0b64..6270db5f1dd 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Less/PreProcessor/Instruction/ImportTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Less/PreProcessor/Instruction/ImportTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\Less\PreProcessor\Instruction; class ImportTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/Less/PreProcessor/Instruction/MagentoImportTest.php b/dev/tests/unit/testsuite/Magento/Framework/Less/PreProcessor/Instruction/MagentoImportTest.php index 761a6bee5a8..aee67c8b7a4 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Less/PreProcessor/Instruction/MagentoImportTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Less/PreProcessor/Instruction/MagentoImportTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\Less\PreProcessor\Instruction; class MagentoImportTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/Locale/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/Locale/ConfigTest.php index 09efd05e404..e8b76bc4547 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Locale/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Locale/ConfigTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\Locale; class ConfigTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/Locale/CurrencyTest.php b/dev/tests/unit/testsuite/Magento/Framework/Locale/CurrencyTest.php index af11d14133a..7fbe9654af0 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Locale/CurrencyTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Locale/CurrencyTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\Locale; diff --git a/dev/tests/unit/testsuite/Magento/Framework/Model/Resource/Db/AbstractDbTest.php b/dev/tests/unit/testsuite/Magento/Framework/Model/Resource/Db/AbstractDbTest.php index 4911958db6a..0a410e47023 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Model/Resource/Db/AbstractDbTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Model/Resource/Db/AbstractDbTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\Model\Resource\Db; class AbstractDbTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/Model/Resource/Db/Collection/AbstractCollectionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Model/Resource/Db/Collection/AbstractCollectionTest.php index 8212036d79c..d22c172e0f2 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Model/Resource/Db/Collection/AbstractCollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Model/Resource/Db/Collection/AbstractCollectionTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\Model\Resource\Db\Collection; use Magento\Framework\Object as MagentoObject; diff --git a/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/Data/ProxyTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/Data/ProxyTest.php index 6239850ab11..125981b2d0c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/Data/ProxyTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/Data/ProxyTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Mview\Config\Data; class ProxyTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/Mview/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/ConfigTest.php index 4fe20738441..7a417e9ea13 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mview/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/ConfigTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Mview; class ConfigTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/Mview/View/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/View/CollectionTest.php index 8b03c593317..d5ddaefd6e4 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mview/View/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/View/CollectionTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Mview\View; class CollectionTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/Mview/View/SubscriptionFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/View/SubscriptionFactoryTest.php index 1d65b1a1b32..50eab75ab12 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mview/View/SubscriptionFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/View/SubscriptionFactoryTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Mview\View; class SubscriptionFactoryTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/Mview/View/SubscriptionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/View/SubscriptionTest.php index 33e6ce43774..4103091a8c5 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mview/View/SubscriptionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/View/SubscriptionTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Mview\View; class SubscriptionTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/_files/ConfigDomMock.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/_files/ConfigDomMock.php index 06a229d25e5..5c3297ae73a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/_files/ConfigDomMock.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/_files/ConfigDomMock.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + class ConfigDomMock extends \PHPUnit_Framework_TestCase { /** diff --git a/dev/tests/unit/testsuite/Magento/Framework/Phrase/Renderer/CompositeTest.php b/dev/tests/unit/testsuite/Magento/Framework/Phrase/Renderer/CompositeTest.php index 9b333381b04..bb173cd2559 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Phrase/Renderer/CompositeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Phrase/Renderer/CompositeTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Phrase\Renderer; class CompositeTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php index 1348e691e7f..0e47d1988d1 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Test class for \Magento\Framework\Session\Config */ diff --git a/dev/tests/unit/testsuite/Magento/Framework/ShellTest.php b/dev/tests/unit/testsuite/Magento/Framework/ShellTest.php index 71075b07749..4a77a6aca9e 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/ShellTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ShellTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework; class ShellTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/Stdlib/Cookie/CookieScopeTest.php b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/Cookie/CookieScopeTest.php index 671b12ea40a..0b2d7406a4b 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Stdlib/Cookie/CookieScopeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/Cookie/CookieScopeTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\Stdlib\Cookie; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Framework/Stdlib/Cookie/PhpCookieManagerTest.php b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/Cookie/PhpCookieManagerTest.php index 055bc74586a..606ae7937d6 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Stdlib/Cookie/PhpCookieManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/Cookie/PhpCookieManagerTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + // @codingStandardsIgnoreStart namespace { $mockTranslateSetCookie = false; diff --git a/dev/tests/unit/testsuite/Magento/Framework/UrlTest.php b/dev/tests/unit/testsuite/Magento/Framework/UrlTest.php index de6c9f4b227..0b263a4e494 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/UrlTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/UrlTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework; /** diff --git a/dev/tests/unit/testsuite/Magento/Framework/ValidatorFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/ValidatorFactoryTest.php index 496be625178..65bc41aad90 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/ValidatorFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ValidatorFactoryTest.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergedTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergedTest.php index 0075409fc18..06f2dd55762 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergedTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergedTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\View\Asset; class MergedTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/ModuleNotation/ResolverTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/ModuleNotation/ResolverTest.php index 7d7dfce5aa1..f32832d703f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/ModuleNotation/ResolverTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/ModuleNotation/ResolverTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\View\Asset\ModuleNotation; class ResolverTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PreProcessor/ModuleNotationTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PreProcessor/ModuleNotationTest.php index 3494e9b0618..6a8798aef23 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PreProcessor/ModuleNotationTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PreProcessor/ModuleNotationTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\View\Asset\PreProcessor; class ModuleNotationTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/RepositoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/RepositoryTest.php index 7fc3c15a3e3..20959aeb3fc 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/RepositoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/RepositoryTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\View\Asset; class RepositoryTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/SourceTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/SourceTest.php index 08079b95dd1..13dfa486ff5 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/SourceTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/SourceTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\View\Asset; use Magento\Framework\App\Filesystem\DirectoryList; diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/BlockPoolTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/BlockPoolTest.php index c57b4687869..fa0a5304355 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/BlockPoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/BlockPoolTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\View; /** diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/DataSourcePoolTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/DataSourcePoolTest.php index 0943caf4863..5541878c93f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/DataSourcePoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/DataSourcePoolTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\View; /** diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/FlatTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/FlatTest.php index 651367a3bd5..54a2390ab2f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/FlatTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/FlatTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\View\Design\FileResolution\Fallback\CacheData; class FlatTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/GroupedTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/GroupedTest.php index 42b8152b14f..75ae3a23075 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/GroupedTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/GroupedTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\View\Design\FileResolution\Fallback\CacheData; class GroupedTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/AlternativeTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/AlternativeTest.php index 51f1f79b7a7..c53ce990723 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/AlternativeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/AlternativeTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\View\Design\FileResolution\Fallback\Resolver; use Magento\Framework\App\Filesystem\DirectoryList; diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/SimpleTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/SimpleTest.php index b0a88281728..bbd1227b4f9 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/SimpleTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/SimpleTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\View\Design\FileResolution\Fallback\Resolver; use Magento\Framework\App\Filesystem\DirectoryList; diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/ImageTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/ImageTest.php index 406399dfcda..d6ac0fb0760 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/ImageTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/ImageTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Test theme image model */ diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Decorator/ModuleDependencyTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Decorator/ModuleDependencyTest.php index fd0fec48b1d..2baf978e897 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Decorator/ModuleDependencyTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Decorator/ModuleDependencyTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\View\File\Collector\Decorator; class ModuleDependencyTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Decorator/ModuleOutputTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Decorator/ModuleOutputTest.php index 4146f771366..d9887ff4d56 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Decorator/ModuleOutputTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Decorator/ModuleOutputTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\View\File\Collector\Decorator; class ModuleOutputTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/BaseTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/BaseTest.php index 9f133a61ca7..e18e12c3b00 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/BaseTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/BaseTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\View\File\Collector\Override; use Magento\Framework\App\Filesystem\DirectoryList; diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/ThemeModularTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/ThemeModularTest.php index 7d0c32c164c..b5170c5fca7 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/ThemeModularTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/ThemeModularTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\View\File\Collector\Override; use Magento\Framework\App\Filesystem\DirectoryList; diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/File/FileListTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/FileListTest.php index 3665577b027..9cfb6f25081 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/File/FileListTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/FileListTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\View\File; class FileListTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/FileSystemTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/FileSystemTest.php index 1dd3114e845..72ad1e78c39 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/FileSystemTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/FileSystemTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Test for view filesystem model */ diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Reader/MoveTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Reader/MoveTest.php index c504a0c62ae..4c8c6437ea1 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Reader/MoveTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Reader/MoveTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\View\Layout\Reader; use Magento\Framework\View\Layout\ScheduledStructure; diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Result/LayoutTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Result/LayoutTest.php index a3bce8163ed..49970f6da99 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Result/LayoutTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Result/LayoutTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\View\Result; /** diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/TemplateEngine/_files/simple.phtml b/dev/tests/unit/testsuite/Magento/Framework/View/TemplateEngine/_files/simple.phtml index bbcf8b73186..039af8f1788 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/TemplateEngine/_files/simple.phtml +++ b/dev/tests/unit/testsuite/Magento/Framework/View/TemplateEngine/_files/simple.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> <html><?php $this->testMethod(); diff --git a/dev/tests/unit/testsuite/Magento/GiftMessage/Model/GiftMessageManagerTest.php b/dev/tests/unit/testsuite/Magento/GiftMessage/Model/GiftMessageManagerTest.php index 2261826231b..d87abc0ed85 100644 --- a/dev/tests/unit/testsuite/Magento/GiftMessage/Model/GiftMessageManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/GiftMessage/Model/GiftMessageManagerTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\GiftMessage\Model; class GiftMessageManagerTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/GiftMessage/Model/Type/Plugin/OnepageTest.php b/dev/tests/unit/testsuite/Magento/GiftMessage/Model/Type/Plugin/OnepageTest.php index a276752d4f1..0451bcfe160 100644 --- a/dev/tests/unit/testsuite/Magento/GiftMessage/Model/Type/Plugin/OnepageTest.php +++ b/dev/tests/unit/testsuite/Magento/GiftMessage/Model/Type/Plugin/OnepageTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\GiftMessage\Model\Type\Plugin; class OnepageTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/GiftMessage/Service/V1/ReadServiceTest.php b/dev/tests/unit/testsuite/Magento/GiftMessage/Service/V1/ReadServiceTest.php index c63e2dd3992..2bf23488ecb 100644 --- a/dev/tests/unit/testsuite/Magento/GiftMessage/Service/V1/ReadServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/GiftMessage/Service/V1/ReadServiceTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\GiftMessage\Service\V1; class ReadServiceTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Indexer/Model/Processor/InvalidateCacheTest.php b/dev/tests/unit/testsuite/Magento/Indexer/Model/Processor/InvalidateCacheTest.php index bd30ec79c46..ad299f594b5 100644 --- a/dev/tests/unit/testsuite/Magento/Indexer/Model/Processor/InvalidateCacheTest.php +++ b/dev/tests/unit/testsuite/Magento/Indexer/Model/Processor/InvalidateCacheTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Indexer\Model\Processor; class InvalidateCacheTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/DeleteTest.php b/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/DeleteTest.php index 07e0a94f88f..b1558ee5bd8 100644 --- a/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/DeleteTest.php +++ b/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/DeleteTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Integration\Controller\Adminhtml\Integration; use Magento\Integration\Block\Adminhtml\Integration\Edit\Tab\Info; diff --git a/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/EditTest.php b/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/EditTest.php index 406be4339fc..2388f76d34c 100644 --- a/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/EditTest.php +++ b/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/EditTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Integration\Controller\Adminhtml\Integration; use Magento\Integration\Block\Adminhtml\Integration\Edit\Tab\Info; diff --git a/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/NewActionTest.php b/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/NewActionTest.php index 3eec1df0c4b..c3c39f65b16 100644 --- a/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/NewActionTest.php +++ b/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/NewActionTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Integration\Controller\Adminhtml\Integration; class NewActionTest extends \Magento\Integration\Controller\Adminhtml\IntegrationTest diff --git a/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/PermissionsDialogTest.php b/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/PermissionsDialogTest.php index 05f22f64ecf..693cb158bd4 100644 --- a/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/PermissionsDialogTest.php +++ b/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/PermissionsDialogTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Integration\Controller\Adminhtml\Integration; use Magento\Framework\View\Layout\Element as LayoutElement; diff --git a/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/SaveTest.php b/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/SaveTest.php index fc65180d490..07d2cd1e1df 100644 --- a/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/SaveTest.php +++ b/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/SaveTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Integration\Controller\Adminhtml\Integration; use Magento\Integration\Block\Adminhtml\Integration\Edit\Tab\Info; diff --git a/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/TokensDialogTest.php b/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/TokensDialogTest.php index fce26a11d7b..10e0e688e61 100644 --- a/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/TokensDialogTest.php +++ b/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/Integration/TokensDialogTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Integration\Controller\Adminhtml\Integration; diff --git a/dev/tests/unit/testsuite/Magento/Integration/Oauth/OauthTest.php b/dev/tests/unit/testsuite/Magento/Integration/Oauth/OauthTest.php index 9daf41a124f..6e7932735e6 100644 --- a/dev/tests/unit/testsuite/Magento/Integration/Oauth/OauthTest.php +++ b/dev/tests/unit/testsuite/Magento/Integration/Oauth/OauthTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Integration\Oauth; /** diff --git a/dev/tests/unit/testsuite/Magento/Integration/Service/V1/AdminTokenServiceTest.php b/dev/tests/unit/testsuite/Magento/Integration/Service/V1/AdminTokenServiceTest.php index e69c373d791..b2a1a317688 100644 --- a/dev/tests/unit/testsuite/Magento/Integration/Service/V1/AdminTokenServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Integration/Service/V1/AdminTokenServiceTest.php @@ -5,6 +5,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Integration\Service\V1; use Magento\Integration\Model\Integration; diff --git a/dev/tests/unit/testsuite/Magento/Msrp/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Msrp/Helper/DataTest.php index 9590d75057f..4d6dfc50b40 100644 --- a/dev/tests/unit/testsuite/Magento/Msrp/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Msrp/Helper/DataTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Msrp\Helper; diff --git a/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/Address/SelectTest.php b/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/Address/SelectTest.php index 2b87525d0ba..8a22471bce6 100644 --- a/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/Address/SelectTest.php +++ b/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/Address/SelectTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Multishipping\Block\Checkout\Address; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php b/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php index f1e1ba1c0a0..98d3bff6d22 100644 --- a/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php +++ b/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Multishipping\Block\Checkout; use Magento\Sales\Model\Quote\Address; diff --git a/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/Payment/InfoTest.php b/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/Payment/InfoTest.php index 1935a36c940..a7ce1291040 100644 --- a/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/Payment/InfoTest.php +++ b/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/Payment/InfoTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Multishipping\Block\Checkout\Payment; class InfoTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/ShippingTest.php b/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/ShippingTest.php index 2a89729348c..9a3d8e93439 100644 --- a/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/ShippingTest.php +++ b/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/ShippingTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Multishipping\Block\Checkout; use Magento\Framework\Pricing\PriceCurrencyInterface; diff --git a/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/StateTest.php b/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/StateTest.php index 002875c92f6..2e3e367fade 100644 --- a/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/StateTest.php +++ b/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/StateTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Multishipping\Block\Checkout; class StateTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/SuccessTest.php b/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/SuccessTest.php index e2b54595d34..9add1cd7517 100644 --- a/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/SuccessTest.php +++ b/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/SuccessTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Multishipping\Block\Checkout; class SuccessTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/EditAddressTest.php b/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/EditAddressTest.php index 458b6a186d1..422821efe81 100644 --- a/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/EditAddressTest.php +++ b/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/EditAddressTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Multishipping\Controller\Checkout\Address; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/EditBillingTest.php b/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/EditBillingTest.php index 3ba5dec0909..d7467c8edba 100644 --- a/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/EditBillingTest.php +++ b/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/EditBillingTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Multishipping\Controller\Checkout\Address; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/EditShippingTest.php b/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/EditShippingTest.php index fd8ca051567..43d68e77aef 100644 --- a/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/EditShippingTest.php +++ b/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/EditShippingTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Multishipping\Controller\Checkout\Address; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/NewBillingTest.php b/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/NewBillingTest.php index 0c3925db9b7..3fb83cbb10b 100644 --- a/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/NewBillingTest.php +++ b/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/NewBillingTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Multishipping\Controller\Checkout\Address; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/NewShippingTest.php b/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/NewShippingTest.php index a0e703c3e20..8b9f12539ba 100644 --- a/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/NewShippingTest.php +++ b/dev/tests/unit/testsuite/Magento/Multishipping/Controller/Checkout/Address/NewShippingTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Multishipping\Controller\Checkout\Address; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Newsletter/Controller/Manage/SaveTest.php b/dev/tests/unit/testsuite/Magento/Newsletter/Controller/Manage/SaveTest.php index e9ae0cf0b38..c140de1a059 100644 --- a/dev/tests/unit/testsuite/Magento/Newsletter/Controller/Manage/SaveTest.php +++ b/dev/tests/unit/testsuite/Magento/Newsletter/Controller/Manage/SaveTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Newsletter\Controller\Manage; use Magento\Framework\Exception\NoSuchEntityException; diff --git a/dev/tests/unit/testsuite/Magento/PageCache/Controller/Block/EsiTest.php b/dev/tests/unit/testsuite/Magento/PageCache/Controller/Block/EsiTest.php index cee299481f3..2cd91f81250 100644 --- a/dev/tests/unit/testsuite/Magento/PageCache/Controller/Block/EsiTest.php +++ b/dev/tests/unit/testsuite/Magento/PageCache/Controller/Block/EsiTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\PageCache\Controller\Block; class EsiTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/PageCache/Controller/Block/RenderTest.php b/dev/tests/unit/testsuite/Magento/PageCache/Controller/Block/RenderTest.php index 7fd3cd3d354..163d642fe0e 100644 --- a/dev/tests/unit/testsuite/Magento/PageCache/Controller/Block/RenderTest.php +++ b/dev/tests/unit/testsuite/Magento/PageCache/Controller/Block/RenderTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\PageCache\Controller\Block; class RenderTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/PageCache/Model/Controller/Result/BuiltinPluginTest.php b/dev/tests/unit/testsuite/Magento/PageCache/Model/Controller/Result/BuiltinPluginTest.php index c36e168ea3d..ff37a47604b 100644 --- a/dev/tests/unit/testsuite/Magento/PageCache/Model/Controller/Result/BuiltinPluginTest.php +++ b/dev/tests/unit/testsuite/Magento/PageCache/Model/Controller/Result/BuiltinPluginTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\PageCache\Model\Controller\Result; class BuiltinPluginTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/PageCache/Model/Observer/FlushAllCacheTest.php b/dev/tests/unit/testsuite/Magento/PageCache/Model/Observer/FlushAllCacheTest.php index 68ae59f6057..e79eb4a2864 100644 --- a/dev/tests/unit/testsuite/Magento/PageCache/Model/Observer/FlushAllCacheTest.php +++ b/dev/tests/unit/testsuite/Magento/PageCache/Model/Observer/FlushAllCacheTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\PageCache\Model\Observer; class FlushAllCacheTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/PageCache/Model/Observer/FlushCacheByTagsTest.php b/dev/tests/unit/testsuite/Magento/PageCache/Model/Observer/FlushCacheByTagsTest.php index 21814a1c3f6..42ef3eea4ef 100644 --- a/dev/tests/unit/testsuite/Magento/PageCache/Model/Observer/FlushCacheByTagsTest.php +++ b/dev/tests/unit/testsuite/Magento/PageCache/Model/Observer/FlushCacheByTagsTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\PageCache\Model\Observer; class FlushCacheByTagsTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/PageCache/Model/Observer/ProcessLayoutRenderElementTest.php b/dev/tests/unit/testsuite/Magento/PageCache/Model/Observer/ProcessLayoutRenderElementTest.php index d6d289037dc..148ab10d0f3 100644 --- a/dev/tests/unit/testsuite/Magento/PageCache/Model/Observer/ProcessLayoutRenderElementTest.php +++ b/dev/tests/unit/testsuite/Magento/PageCache/Model/Observer/ProcessLayoutRenderElementTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\PageCache\Model\Observer; class ProcessLayoutRenderElementTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Payment/Block/FormTest.php b/dev/tests/unit/testsuite/Magento/Payment/Block/FormTest.php index 727348dc885..ee15ae647ea 100644 --- a/dev/tests/unit/testsuite/Magento/Payment/Block/FormTest.php +++ b/dev/tests/unit/testsuite/Magento/Payment/Block/FormTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Payment\Block; use Magento\Framework\Object; diff --git a/dev/tests/unit/testsuite/Magento/Payment/Block/Info/SubstitutionTest.php b/dev/tests/unit/testsuite/Magento/Payment/Block/Info/SubstitutionTest.php index 8986f9e3837..1f47da26976 100644 --- a/dev/tests/unit/testsuite/Magento/Payment/Block/Info/SubstitutionTest.php +++ b/dev/tests/unit/testsuite/Magento/Payment/Block/Info/SubstitutionTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Payment\Block\Info; class SubstitutionTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Payment/Model/Config/Source/AllmethodsTest.php b/dev/tests/unit/testsuite/Magento/Payment/Model/Config/Source/AllmethodsTest.php index 6332424244a..94d223ad336 100644 --- a/dev/tests/unit/testsuite/Magento/Payment/Model/Config/Source/AllmethodsTest.php +++ b/dev/tests/unit/testsuite/Magento/Payment/Model/Config/Source/AllmethodsTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Payment\Model\Config\Source; class AllmethodsTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Payment/Model/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Payment/Model/ConfigTest.php index 4e2d75ea2e7..0a7a834e22e 100644 --- a/dev/tests/unit/testsuite/Magento/Payment/Model/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Payment/Model/ConfigTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Payment\Model; use Magento\Store\Model\ScopeInterface; diff --git a/dev/tests/unit/testsuite/Magento/Payment/Model/MethodListTest.php b/dev/tests/unit/testsuite/Magento/Payment/Model/MethodListTest.php index c4dc8081188..07c27db5051 100644 --- a/dev/tests/unit/testsuite/Magento/Payment/Model/MethodListTest.php +++ b/dev/tests/unit/testsuite/Magento/Payment/Model/MethodListTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Payment\Model; class MethodListTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/ApplyBlockPersistentDataTest.php b/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/ApplyBlockPersistentDataTest.php index 0721fd63004..28b3b3b7eac 100644 --- a/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/ApplyBlockPersistentDataTest.php +++ b/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/ApplyBlockPersistentDataTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Persistent\Model\Observer; class ApplyBlockPersistentDataTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/RemovePersistentCookieTest.php b/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/RemovePersistentCookieTest.php index 8b3e6f5f2c8..a50a1666cbe 100644 --- a/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/RemovePersistentCookieTest.php +++ b/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/RemovePersistentCookieTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Persistent\Model\Observer; class RemovePersistentCookieTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/UpdateCustomerCookiesTest.php b/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/UpdateCustomerCookiesTest.php index 33c8360aead..ba53bb124dd 100644 --- a/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/UpdateCustomerCookiesTest.php +++ b/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/UpdateCustomerCookiesTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Persistent\Model\Observer; /** diff --git a/dev/tests/unit/testsuite/Magento/Persistent/Model/QuoteManagerTest.php b/dev/tests/unit/testsuite/Magento/Persistent/Model/QuoteManagerTest.php index a03f9a48444..1a7d33201e3 100644 --- a/dev/tests/unit/testsuite/Magento/Persistent/Model/QuoteManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Persistent/Model/QuoteManagerTest.php @@ -4,6 +4,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Persistent\Model; class QuoteManagerTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Reports/Model/Resource/Report/Collection/AbstractCollectionTest.php b/dev/tests/unit/testsuite/Magento/Reports/Model/Resource/Report/Collection/AbstractCollectionTest.php index 69d555efe55..7a203670c91 100644 --- a/dev/tests/unit/testsuite/Magento/Reports/Model/Resource/Report/Collection/AbstractCollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Reports/Model/Resource/Report/Collection/AbstractCollectionTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Model\Resource\Report\Collection; class AbstractCollectionTest extends \PHPUnit_Framework_TestCase @@ -48,4 +51,4 @@ class AbstractCollectionTest extends \PHPUnit_Framework_TestCase $this->_model->setIsSubTotals(false); $this->assertFalse($this->_model->isSubTotals()); } -} \ No newline at end of file +} diff --git a/dev/tests/unit/testsuite/Magento/Review/Controller/Adminhtml/Product/PostTest.php b/dev/tests/unit/testsuite/Magento/Review/Controller/Adminhtml/Product/PostTest.php index 966eac3eb0d..bfc47a2b5b4 100644 --- a/dev/tests/unit/testsuite/Magento/Review/Controller/Adminhtml/Product/PostTest.php +++ b/dev/tests/unit/testsuite/Magento/Review/Controller/Adminhtml/Product/PostTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Review\Controller\Adminhtml\Product; /** diff --git a/dev/tests/unit/testsuite/Magento/Rss/Model/RssManagerTest.php b/dev/tests/unit/testsuite/Magento/Rss/Model/RssManagerTest.php index d3c6a2e2ba1..42550e8aa15 100644 --- a/dev/tests/unit/testsuite/Magento/Rss/Model/RssManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Rss/Model/RssManagerTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Rss\Model; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; diff --git a/dev/tests/unit/testsuite/Magento/Rss/Model/UrlBuilderTest.php b/dev/tests/unit/testsuite/Magento/Rss/Model/UrlBuilderTest.php index e2b16fea4a8..0d59e735313 100644 --- a/dev/tests/unit/testsuite/Magento/Rss/Model/UrlBuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Rss/Model/UrlBuilderTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Rss\Model; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; diff --git a/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/Product/AbstractProductTest.php b/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/Product/AbstractProductTest.php index e5eaaccb1eb..52b4c89bf62 100644 --- a/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/Product/AbstractProductTest.php +++ b/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/Product/AbstractProductTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Rule\Model\Condition\Product; use ReflectionMethod; diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Items/GridTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Items/GridTest.php index dd392679ad8..505b8a82540 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Items/GridTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Items/GridTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Block\Adminhtml\Order\Create\Items; class GridTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/TotalsTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/TotalsTest.php index 79deefa5c8c..019448993cb 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/TotalsTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/TotalsTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Block\Adminhtml\Order\Create; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Order/Email/Items/DefaultItemsTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Order/Email/Items/DefaultItemsTest.php index dcf22b9f81e..ade7d612760 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Block/Order/Email/Items/DefaultItemsTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Order/Email/Items/DefaultItemsTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Block\Order\Email\Items; class DefaultItemsTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Order/Email/Items/Order/DefaultOrderTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Order/Email/Items/Order/DefaultOrderTest.php index 7f2e7b55693..27b32f3f7de 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Block/Order/Email/Items/Order/DefaultOrderTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Order/Email/Items/Order/DefaultOrderTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Block\Order\Email\Items\Order; class DefaultOrderTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Order/Item/Renderer/DefaultRendererTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Order/Item/Renderer/DefaultRendererTest.php index 037184e8e34..4c11c684f63 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Block/Order/Item/Renderer/DefaultRendererTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Order/Item/Renderer/DefaultRendererTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Block\Order\Item\Renderer; class DefaultRendererTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/SaveTest.php b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/SaveTest.php index b07ed3c1225..d3733118cef 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/SaveTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/SaveTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Controller\Adminhtml\Order\Creditmemo; class SaveTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Sales/Helper/Quote/Item/CompareTest.php b/dev/tests/unit/testsuite/Magento/Sales/Helper/Quote/Item/CompareTest.php index f7fb1140622..f8f4c8743cf 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Helper/Quote/Item/CompareTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Helper/Quote/Item/CompareTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Sales\Helper\Quote\Item; /** diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php index 7a6214ef4f6..cdd97519a2e 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\AdminOrder; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Grid/Child/CollectionUpdaterTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Grid/Child/CollectionUpdaterTest.php index a8c8dbf205e..db2d2e120db 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Grid/Child/CollectionUpdaterTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Grid/Child/CollectionUpdaterTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Grid\Child; class CollectionUpdaterTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Grid/CollectionUpdaterTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Grid/CollectionUpdaterTest.php index 26c89fe6093..2bf23dec6d9 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Grid/CollectionUpdaterTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Grid/CollectionUpdaterTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Grid; class CollectionUpdaterTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Backend/CustomerQuoteTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Backend/CustomerQuoteTest.php index 6bf211f5c26..3cbba164451 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Backend/CustomerQuoteTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Backend/CustomerQuoteTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Observer\Backend; class CustomerQuoteTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php index c098b04913b..da6338831ce 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Observer\Frontend\Quote\Address; /** diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Creditmemo/Total/TaxTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Creditmemo/Total/TaxTest.php index bf1a3485a1c..50e3222d7aa 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Creditmemo/Total/TaxTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Creditmemo/Total/TaxTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order\Creditmemo\Total; use Magento\Framework\Object as MagentoObject; diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/CreditmemoTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/CreditmemoTest.php index 7e746c92e69..2281c1cd624 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/CreditmemoTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/CreditmemoTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order; use Magento\Sales\Model\Resource\OrderFactory; diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Invoice/Total/ShippingTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Invoice/Total/ShippingTest.php index c4a03afbd75..97cd3d07826 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Invoice/Total/ShippingTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Invoice/Total/ShippingTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order\Invoice\Total; class ShippingTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/InvoiceTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/InvoiceTest.php index 2c0359006b8..0352b2bc91b 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/InvoiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/InvoiceTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order; use Magento\Sales\Model\Resource\OrderFactory; diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Quote/AddressTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Quote/AddressTest.php index a3a7cbe61f0..7bb4d088318 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Quote/AddressTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Quote/AddressTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Quote; use Magento\Store\Model\ScopeInterface; diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Quote/ItemTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Quote/ItemTest.php index ae2bec1ebe6..02b355ca649 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Quote/ItemTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Quote/ItemTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Quote; class ItemTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/QuoteTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/QuoteTest.php index f8597c45e51..2df6831b0ef 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/QuoteTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/QuoteTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model; use Magento\Sales\Model\Quote\Address; diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Resource/GridPoolTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Resource/GridPoolTest.php index 659753f8b8d..e5043d883f2 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Resource/GridPoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Resource/GridPoolTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Resource; /** diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Resource/Order/StatusTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Resource/Order/StatusTest.php index 3f2b304c15c..d85816db63f 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Resource/Order/StatusTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Resource/Order/StatusTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Resource\Order; /** diff --git a/dev/tests/unit/testsuite/Magento/SalesRule/Model/Resource/Report/CollectionTest.php b/dev/tests/unit/testsuite/Magento/SalesRule/Model/Resource/Report/CollectionTest.php index 25e0312732b..34d66cef119 100644 --- a/dev/tests/unit/testsuite/Magento/SalesRule/Model/Resource/Report/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/SalesRule/Model/Resource/Report/CollectionTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\SalesRule\Model\Resource\Report; class CollectionTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/AddTrackTest.php b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/AddTrackTest.php index bd6a7501e36..355715ad198 100644 --- a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/AddTrackTest.php +++ b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/AddTrackTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Shipping\Controller\Adminhtml\Order\Shipment; use Magento\Backend\App\Action; diff --git a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/SaveTest.php b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/SaveTest.php index 095e8db8128..d71f1fc519a 100644 --- a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/SaveTest.php +++ b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/SaveTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Shipping\Controller\Adminhtml\Order\Shipment; use Magento\Backend\App\Action; diff --git a/dev/tests/unit/testsuite/Magento/Shipping/Model/ShipmentTest.php b/dev/tests/unit/testsuite/Magento/Shipping/Model/ShipmentTest.php index 64fee5a0ea3..f8c6dbf614d 100644 --- a/dev/tests/unit/testsuite/Magento/Shipping/Model/ShipmentTest.php +++ b/dev/tests/unit/testsuite/Magento/Shipping/Model/ShipmentTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Shipping\Model; use Magento\Sales\Model\Resource\OrderFactory; diff --git a/dev/tests/unit/testsuite/Magento/Store/App/Action/Plugin/ContextTest.php b/dev/tests/unit/testsuite/Magento/Store/App/Action/Plugin/ContextTest.php index 0980d33f46e..267306c9302 100644 --- a/dev/tests/unit/testsuite/Magento/Store/App/Action/Plugin/ContextTest.php +++ b/dev/tests/unit/testsuite/Magento/Store/App/Action/Plugin/ContextTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Store\App\Action\Plugin; /** diff --git a/dev/tests/unit/testsuite/Magento/Store/App/Action/Plugin/StoreCheckTest.php b/dev/tests/unit/testsuite/Magento/Store/App/Action/Plugin/StoreCheckTest.php index 78d664fba54..11cb06f6ebf 100644 --- a/dev/tests/unit/testsuite/Magento/Store/App/Action/Plugin/StoreCheckTest.php +++ b/dev/tests/unit/testsuite/Magento/Store/App/Action/Plugin/StoreCheckTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Store\App\Action\Plugin; class StoreCheckTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/ReaderPoolTest.php b/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/ReaderPoolTest.php index a0d8769e133..83632b7070e 100644 --- a/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/ReaderPoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/ReaderPoolTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Store\Model\Config\Reader; class ReaderPoolTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Store/Model/Storage/DbTest.php b/dev/tests/unit/testsuite/Magento/Store/Model/Storage/DbTest.php index 542595fb040..d72b2acad81 100644 --- a/dev/tests/unit/testsuite/Magento/Store/Model/Storage/DbTest.php +++ b/dev/tests/unit/testsuite/Magento/Store/Model/Storage/DbTest.php @@ -3,6 +3,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Store\Model\Storage; /** diff --git a/dev/tests/unit/testsuite/Magento/Store/Model/StoreTest.php b/dev/tests/unit/testsuite/Magento/Store/Model/StoreTest.php index 27915e5bd7a..7c6b2742e38 100644 --- a/dev/tests/unit/testsuite/Magento/Store/Model/StoreTest.php +++ b/dev/tests/unit/testsuite/Magento/Store/Model/StoreTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Store\Model; use Magento\Framework\App\Config\ReinitableConfigInterface; diff --git a/dev/tests/unit/testsuite/Magento/Tax/Block/Checkout/Cart/Sidebar/TotalsTest.php b/dev/tests/unit/testsuite/Magento/Tax/Block/Checkout/Cart/Sidebar/TotalsTest.php index ae4eb2b7d0e..8db8a8612df 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Block/Checkout/Cart/Sidebar/TotalsTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Block/Checkout/Cart/Sidebar/TotalsTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Tax\Block\Checkout\Cart\Sidebar; use Magento\Framework\Object; diff --git a/dev/tests/unit/testsuite/Magento/Tax/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Tax/Helper/DataTest.php index c6cd649c02d..fc0e221a7f2 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Helper/DataTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Tax\Helper; use Magento\Framework\Object as MagentoObject; diff --git a/dev/tests/unit/testsuite/Magento/Tax/Model/Calculation/RowBaseAndTotalBaseCalculatorTestCase.php b/dev/tests/unit/testsuite/Magento/Tax/Model/Calculation/RowBaseAndTotalBaseCalculatorTestCase.php index 9b0f2daaa9d..78bb472f837 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Model/Calculation/RowBaseAndTotalBaseCalculatorTestCase.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Model/Calculation/RowBaseAndTotalBaseCalculatorTestCase.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Tax\Model\Calculation; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Tax/Model/Config/TaxClassTest.php b/dev/tests/unit/testsuite/Magento/Tax/Model/Config/TaxClassTest.php index a79821a4a1c..16186b3a4a0 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Model/Config/TaxClassTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Model/Config/TaxClassTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Test class for \Magento\Tax\Model\Config\TaxClass */ diff --git a/dev/tests/unit/testsuite/Magento/Tax/Model/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Tax/Model/ConfigTest.php index 4b5a55b7eb7..d92a81311fe 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Model/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Model/ConfigTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Test class for \Magento\Tax\Model\Config */ diff --git a/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollectorTest.php b/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollectorTest.php index 26a7e189f42..43aabc9e3dc 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollectorTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollectorTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Tax\Model\Sales\Total\Quote; /** diff --git a/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/ShippingTest.php b/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/ShippingTest.php index b4bdb92c385..29dde2f9f02 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/ShippingTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/ShippingTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Tax\Model\Sales\Total\Quote; class ShippingTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php b/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php index f684763168f..58f08ff8068 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Tax\Model\Sales\Total\Quote; /** diff --git a/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Tab/CssTest.php b/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Tab/CssTest.php index 8b4662e216b..b2aabe17d13 100644 --- a/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Tab/CssTest.php +++ b/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Tab/CssTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Theme\Block\Adminhtml\System\Design\Theme\Tab; class CssTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Theme/Model/Url/Plugin/SignatureTest.php b/dev/tests/unit/testsuite/Magento/Theme/Model/Url/Plugin/SignatureTest.php index e61539bd72b..6739feebd6d 100644 --- a/dev/tests/unit/testsuite/Magento/Theme/Model/Url/Plugin/SignatureTest.php +++ b/dev/tests/unit/testsuite/Magento/Theme/Model/Url/Plugin/SignatureTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Theme\Model\Url\Plugin; class SignatureTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Tools/Di/Compiler/ArgumentsResolverTest.php b/dev/tests/unit/testsuite/Magento/Tools/Di/Compiler/ArgumentsResolverTest.php index 92de43dd322..8ef62e0519e 100644 --- a/dev/tests/unit/testsuite/Magento/Tools/Di/Compiler/ArgumentsResolverTest.php +++ b/dev/tests/unit/testsuite/Magento/Tools/Di/Compiler/ArgumentsResolverTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Tools\Di\Compiler; class ArgumentsResolverTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Tools/Di/Definition/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Tools/Di/Definition/CollectionTest.php index fcd6ed55b73..d51844a4cde 100644 --- a/dev/tests/unit/testsuite/Magento/Tools/Di/Definition/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Tools/Di/Definition/CollectionTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Tools\Di\Definition; /** diff --git a/dev/tests/unit/testsuite/Magento/Tools/I18n/Parser/ParserTest.php b/dev/tests/unit/testsuite/Magento/Tools/I18n/Parser/ParserTest.php index 805c73c038b..0a1b7e9514c 100644 --- a/dev/tests/unit/testsuite/Magento/Tools/I18n/Parser/ParserTest.php +++ b/dev/tests/unit/testsuite/Magento/Tools/I18n/Parser/ParserTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Tools\I18n\Parser; use Magento\Tools\I18n\Parser as Parser; diff --git a/dev/tests/unit/testsuite/Magento/UrlRewrite/Block/Catalog/Edit/FormTest.php b/dev/tests/unit/testsuite/Magento/UrlRewrite/Block/Catalog/Edit/FormTest.php index 7f9db1c58b5..cfb8d279cb2 100644 --- a/dev/tests/unit/testsuite/Magento/UrlRewrite/Block/Catalog/Edit/FormTest.php +++ b/dev/tests/unit/testsuite/Magento/UrlRewrite/Block/Catalog/Edit/FormTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\UrlRewrite\Block\Catalog\Edit; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/UrlRewrite/Model/Storage/DbStorageTest.php b/dev/tests/unit/testsuite/Magento/UrlRewrite/Model/Storage/DbStorageTest.php index 8b0fe1f2a17..579dd03a4eb 100644 --- a/dev/tests/unit/testsuite/Magento/UrlRewrite/Model/Storage/DbStorageTest.php +++ b/dev/tests/unit/testsuite/Magento/UrlRewrite/Model/Storage/DbStorageTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\UrlRewrite\Model\Storage; use Magento\Framework\App\Resource; diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Controller/RestTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Controller/RestTest.php index 15856b87210..18d6421c25a 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Controller/RestTest.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Controller/RestTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Webapi\Controller; use Magento\Authorization\Model\UserContextInterface; diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Controller/Soap/Request/HandlerTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Controller/Soap/Request/HandlerTest.php index 8d980bc40f7..ce2063eb9b7 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Controller/Soap/Request/HandlerTest.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Controller/Soap/Request/HandlerTest.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Webapi\Controller\Soap\Request; use Magento\Framework\Api\SimpleDataObjectConverter; diff --git a/dev/tests/unit/testsuite/Magento/Webapi/_files/test_interfaces.php b/dev/tests/unit/testsuite/Magento/Webapi/_files/test_interfaces.php index 5edc27a9685..17f8013c623 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/_files/test_interfaces.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/_files/test_interfaces.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Module\Service; /** diff --git a/dev/tests/unit/testsuite/Magento/Weee/Model/Attribute/Backend/Weee/TaxTest.php b/dev/tests/unit/testsuite/Magento/Weee/Model/Attribute/Backend/Weee/TaxTest.php index 6a47ac0eea7..07188e92cf5 100644 --- a/dev/tests/unit/testsuite/Magento/Weee/Model/Attribute/Backend/Weee/TaxTest.php +++ b/dev/tests/unit/testsuite/Magento/Weee/Model/Attribute/Backend/Weee/TaxTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Test class for \Magento\Weee\Model\Attribute\Backend\Weee\Tax */ diff --git a/dev/tests/unit/testsuite/Magento/Weee/Pricing/AdjustmentTest.php b/dev/tests/unit/testsuite/Magento/Weee/Pricing/AdjustmentTest.php index 8128e1b1b09..9490589f172 100644 --- a/dev/tests/unit/testsuite/Magento/Weee/Pricing/AdjustmentTest.php +++ b/dev/tests/unit/testsuite/Magento/Weee/Pricing/AdjustmentTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Weee\Pricing; use Magento\Framework\Pricing\Object\SaleableInterface; diff --git a/dev/tests/unit/testsuite/Magento/Wishlist/Model/Rss/WishlistTest.php b/dev/tests/unit/testsuite/Magento/Wishlist/Model/Rss/WishlistTest.php index fab22b9c611..99e7a849ebb 100644 --- a/dev/tests/unit/testsuite/Magento/Wishlist/Model/Rss/WishlistTest.php +++ b/dev/tests/unit/testsuite/Magento/Wishlist/Model/Rss/WishlistTest.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Wishlist\Model\Rss; class WishlistTest extends \PHPUnit_Framework_TestCase diff --git a/lib/internal/Magento/Framework/Acl/Resource/Provider.php b/lib/internal/Magento/Framework/Acl/Resource/Provider.php index 0168c1a303a..2c5807d784f 100644 --- a/lib/internal/Magento/Framework/Acl/Resource/Provider.php +++ b/lib/internal/Magento/Framework/Acl/Resource/Provider.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Acl\Resource; class Provider implements ProviderInterface diff --git a/lib/internal/Magento/Framework/Archive/Helper/File.php b/lib/internal/Magento/Framework/Archive/Helper/File.php index 22c4ed76ea6..5e5cdc8af3e 100644 --- a/lib/internal/Magento/Framework/Archive/Helper/File.php +++ b/lib/internal/Magento/Framework/Archive/Helper/File.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Helper class that simplifies files stream reading and writing */ diff --git a/lib/internal/Magento/Framework/Archive/Helper/File/Gz.php b/lib/internal/Magento/Framework/Archive/Helper/File/Gz.php index 66eaacffb8a..8c2c1e559b9 100644 --- a/lib/internal/Magento/Framework/Archive/Helper/File/Gz.php +++ b/lib/internal/Magento/Framework/Archive/Helper/File/Gz.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Helper class that simplifies gz files stream reading and writing */ diff --git a/lib/internal/Magento/Framework/Backup/Archive/Tar.php b/lib/internal/Magento/Framework/Backup/Archive/Tar.php index c5bfd7af492..0fa6cbb2492 100644 --- a/lib/internal/Magento/Framework/Backup/Archive/Tar.php +++ b/lib/internal/Magento/Framework/Backup/Archive/Tar.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Extended version of \Magento\Framework\Archive\Tar that supports filtering * diff --git a/lib/internal/Magento/Framework/Backup/Db/BackupFactory.php b/lib/internal/Magento/Framework/Backup/Db/BackupFactory.php index 9712a66ba0b..11a02cc970f 100644 --- a/lib/internal/Magento/Framework/Backup/Db/BackupFactory.php +++ b/lib/internal/Magento/Framework/Backup/Db/BackupFactory.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Backup\Db; class BackupFactory diff --git a/lib/internal/Magento/Framework/Backup/Factory.php b/lib/internal/Magento/Framework/Backup/Factory.php index 3a1735c75c4..63d844ae00d 100644 --- a/lib/internal/Magento/Framework/Backup/Factory.php +++ b/lib/internal/Magento/Framework/Backup/Factory.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Backup; class Factory diff --git a/lib/internal/Magento/Framework/Backup/Filesystem.php b/lib/internal/Magento/Framework/Backup/Filesystem.php index b2b0add03da..9c65ecbf236 100644 --- a/lib/internal/Magento/Framework/Backup/Filesystem.php +++ b/lib/internal/Magento/Framework/Backup/Filesystem.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Backup; /** diff --git a/lib/internal/Magento/Framework/Cache/Backend/Database.php b/lib/internal/Magento/Framework/Cache/Backend/Database.php index ee8e1a89f33..a12de8add65 100644 --- a/lib/internal/Magento/Framework/Cache/Backend/Database.php +++ b/lib/internal/Magento/Framework/Cache/Backend/Database.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** Tables declaration: diff --git a/lib/internal/Magento/Framework/Cache/Backend/Eaccelerator.php b/lib/internal/Magento/Framework/Cache/Backend/Eaccelerator.php index 739b2a832ad..1e275b32109 100644 --- a/lib/internal/Magento/Framework/Cache/Backend/Eaccelerator.php +++ b/lib/internal/Magento/Framework/Cache/Backend/Eaccelerator.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Cache\Backend; class Eaccelerator extends \Zend_Cache_Backend implements \Zend_Cache_Backend_ExtendedInterface diff --git a/lib/internal/Magento/Framework/Config/Dom.php b/lib/internal/Magento/Framework/Config/Dom.php index a18c7a734a2..5b726f37728 100644 --- a/lib/internal/Magento/Framework/Config/Dom.php +++ b/lib/internal/Magento/Framework/Config/Dom.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Magento configuration XML DOM utility */ diff --git a/lib/internal/Magento/Framework/CurrencyFactory.php b/lib/internal/Magento/Framework/CurrencyFactory.php index cb7b44b485c..9d9aa26bbdd 100644 --- a/lib/internal/Magento/Framework/CurrencyFactory.php +++ b/lib/internal/Magento/Framework/CurrencyFactory.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework; class CurrencyFactory diff --git a/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php b/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php index 919699158c5..ff6a3b5ce5e 100644 --- a/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php +++ b/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\DB\Adapter\Pdo; use Magento\Framework\Cache\FrontendInterface; diff --git a/lib/internal/Magento/Framework/DB/MapperFactory.php b/lib/internal/Magento/Framework/DB/MapperFactory.php index 9995c5587a9..5444423848c 100644 --- a/lib/internal/Magento/Framework/DB/MapperFactory.php +++ b/lib/internal/Magento/Framework/DB/MapperFactory.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\DB; /** diff --git a/lib/internal/Magento/Framework/DB/QueryFactory.php b/lib/internal/Magento/Framework/DB/QueryFactory.php index a6da22b5930..d21a71d845f 100644 --- a/lib/internal/Magento/Framework/DB/QueryFactory.php +++ b/lib/internal/Magento/Framework/DB/QueryFactory.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\DB; /** diff --git a/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php b/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php index 1b12e7aab20..5adb1f112e4 100644 --- a/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php +++ b/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Mysql DB Statement * diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Editor.php b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php index d8417a67d69..9a075d9d920 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Editor.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Data\Form\Element; use Magento\Framework\Escaper; diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php b/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php index 8a0c8a4a6ae..794ad2d8488 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Category form input image element * diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Time.php b/lib/internal/Magento/Framework/Data/Form/Element/Time.php index 98ce8886b35..fe721a31f84 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Time.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Time.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Form time element * diff --git a/lib/internal/Magento/Framework/Data/FormFactory.php b/lib/internal/Magento/Framework/Data/FormFactory.php index 349c74e8a1d..83d4eb9b3c8 100644 --- a/lib/internal/Magento/Framework/Data/FormFactory.php +++ b/lib/internal/Magento/Framework/Data/FormFactory.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Data; /** diff --git a/lib/internal/Magento/Framework/Encryption/Crypt.php b/lib/internal/Magento/Framework/Encryption/Crypt.php index c95d48665b3..61d7648397d 100644 --- a/lib/internal/Magento/Framework/Encryption/Crypt.php +++ b/lib/internal/Magento/Framework/Encryption/Crypt.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Encryption; /** diff --git a/lib/internal/Magento/Framework/Event/Invoker/InvokerDefault.php b/lib/internal/Magento/Framework/Event/Invoker/InvokerDefault.php index 771ef1085a3..89466bc17a8 100644 --- a/lib/internal/Magento/Framework/Event/Invoker/InvokerDefault.php +++ b/lib/internal/Magento/Framework/Event/Invoker/InvokerDefault.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Event\Invoker; use Magento\Framework\Event\Observer; diff --git a/lib/internal/Magento/Framework/File/Csv.php b/lib/internal/Magento/Framework/File/Csv.php index 9c5a6740780..9a6b107d01f 100644 --- a/lib/internal/Magento/Framework/File/Csv.php +++ b/lib/internal/Magento/Framework/File/Csv.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\File; /** diff --git a/lib/internal/Magento/Framework/File/CsvMulty.php b/lib/internal/Magento/Framework/File/CsvMulty.php index 4e1c654fe40..062f61b2388 100644 --- a/lib/internal/Magento/Framework/File/CsvMulty.php +++ b/lib/internal/Magento/Framework/File/CsvMulty.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Csv parse * diff --git a/lib/internal/Magento/Framework/File/Transfer/Adapter/Http.php b/lib/internal/Magento/Framework/File/Transfer/Adapter/Http.php index b50c4874dd2..4af85a7a6d7 100644 --- a/lib/internal/Magento/Framework/File/Transfer/Adapter/Http.php +++ b/lib/internal/Magento/Framework/File/Transfer/Adapter/Http.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\File\Transfer\Adapter; class Http diff --git a/lib/internal/Magento/Framework/Filter/Input/MaliciousCode.php b/lib/internal/Magento/Framework/Filter/Input/MaliciousCode.php index 6b8f9300732..eb688bd6cb8 100644 --- a/lib/internal/Magento/Framework/Filter/Input/MaliciousCode.php +++ b/lib/internal/Magento/Framework/Filter/Input/MaliciousCode.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Filter\Input; class MaliciousCode implements \Zend_Filter_Interface diff --git a/lib/internal/Magento/Framework/Gdata/Gshopping/HttpException.php b/lib/internal/Magento/Framework/Gdata/Gshopping/HttpException.php index 8af0a157150..06a787f906c 100644 --- a/lib/internal/Magento/Framework/Gdata/Gshopping/HttpException.php +++ b/lib/internal/Magento/Framework/Gdata/Gshopping/HttpException.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Gdata\Gshopping; /** diff --git a/lib/internal/Magento/Framework/HTTP/Adapter/Curl.php b/lib/internal/Magento/Framework/HTTP/Adapter/Curl.php index d9702d7e330..53de5cec1cc 100644 --- a/lib/internal/Magento/Framework/HTTP/Adapter/Curl.php +++ b/lib/internal/Magento/Framework/HTTP/Adapter/Curl.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * HTTP CURL Adapter * diff --git a/lib/internal/Magento/Framework/HTTP/Header.php b/lib/internal/Magento/Framework/HTTP/Header.php index 933b3a2b937..fdf7ebfbfde 100644 --- a/lib/internal/Magento/Framework/HTTP/Header.php +++ b/lib/internal/Magento/Framework/HTTP/Header.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\HTTP; /** diff --git a/lib/internal/Magento/Framework/Image/Factory.php b/lib/internal/Magento/Framework/Image/Factory.php index f7b48a48230..ebaa79d74b0 100644 --- a/lib/internal/Magento/Framework/Image/Factory.php +++ b/lib/internal/Magento/Framework/Image/Factory.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Image; use Magento\Framework\ObjectManagerInterface; diff --git a/lib/internal/Magento/Framework/Interception/Code/Generator/Interceptor.php b/lib/internal/Magento/Framework/Interception/Code/Generator/Interceptor.php index 53bd630f3b0..2790f37166d 100644 --- a/lib/internal/Magento/Framework/Interception/Code/Generator/Interceptor.php +++ b/lib/internal/Magento/Framework/Interception/Code/Generator/Interceptor.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Interception\Code\Generator; class Interceptor extends \Magento\Framework\Code\Generator\EntityAbstract diff --git a/lib/internal/Magento/Framework/Io/Sftp.php b/lib/internal/Magento/Framework/Io/Sftp.php index 2ed666aa87b..fff0e876ccb 100644 --- a/lib/internal/Magento/Framework/Io/Sftp.php +++ b/lib/internal/Magento/Framework/Io/Sftp.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Io; /** diff --git a/lib/internal/Magento/Framework/Less/PreProcessor/Instruction/Import.php b/lib/internal/Magento/Framework/Less/PreProcessor/Instruction/Import.php index 26adfb470ad..d4bfee72f7f 100644 --- a/lib/internal/Magento/Framework/Less/PreProcessor/Instruction/Import.php +++ b/lib/internal/Magento/Framework/Less/PreProcessor/Instruction/Import.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\Less\PreProcessor\Instruction; use Magento\Framework\View\Asset\LocalInterface; diff --git a/lib/internal/Magento/Framework/Locale/Lists.php b/lib/internal/Magento/Framework/Locale/Lists.php index 9297a08df36..0ce28dda50f 100644 --- a/lib/internal/Magento/Framework/Locale/Lists.php +++ b/lib/internal/Magento/Framework/Locale/Lists.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Locale; class Lists implements \Magento\Framework\Locale\ListsInterface diff --git a/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php b/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php index 24897f7acf1..243632928a4 100644 --- a/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php +++ b/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Mail\Template; class TransportBuilder diff --git a/lib/internal/Magento/Framework/Message/Factory.php b/lib/internal/Magento/Framework/Message/Factory.php index eb6ddf0ed6a..f9c7f51cb5e 100644 --- a/lib/internal/Magento/Framework/Message/Factory.php +++ b/lib/internal/Magento/Framework/Message/Factory.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Message; use Magento\Framework\ObjectManagerInterface; diff --git a/lib/internal/Magento/Framework/Model/Resource/AbstractResource.php b/lib/internal/Magento/Framework/Model/Resource/AbstractResource.php index 0d5a11c7b55..3ee152e5e2f 100644 --- a/lib/internal/Magento/Framework/Model/Resource/AbstractResource.php +++ b/lib/internal/Magento/Framework/Model/Resource/AbstractResource.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Model\Resource; /** diff --git a/lib/internal/Magento/Framework/Model/Resource/Db/Collection/AbstractCollection.php b/lib/internal/Magento/Framework/Model/Resource/Db/Collection/AbstractCollection.php index b82cc776430..7a8efc589fd 100644 --- a/lib/internal/Magento/Framework/Model/Resource/Db/Collection/AbstractCollection.php +++ b/lib/internal/Magento/Framework/Model/Resource/Db/Collection/AbstractCollection.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Model\Resource\Db\Collection; /** diff --git a/lib/internal/Magento/Framework/Model/Resource/Type/Db/Pdo/Mysql.php b/lib/internal/Magento/Framework/Model/Resource/Type/Db/Pdo/Mysql.php index 848be00e52d..f71cb570ba1 100644 --- a/lib/internal/Magento/Framework/Model/Resource/Type/Db/Pdo/Mysql.php +++ b/lib/internal/Magento/Framework/Model/Resource/Type/Db/Pdo/Mysql.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Model\Resource\Type\Db\Pdo; use Magento\Framework\App\Resource\ConnectionAdapterInterface; diff --git a/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php b/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php index d5b04050fd4..4dae9043044 100644 --- a/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php +++ b/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Module\Plugin; use Magento\Framework\Cache\FrontendInterface; diff --git a/lib/internal/Magento/Framework/Module/Resource.php b/lib/internal/Magento/Framework/Module/Resource.php index bad4056e69b..658d5e8b549 100644 --- a/lib/internal/Magento/Framework/Module/Resource.php +++ b/lib/internal/Magento/Framework/Module/Resource.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Module; diff --git a/lib/internal/Magento/Framework/Module/Setup/MigrationFactory.php b/lib/internal/Magento/Framework/Module/Setup/MigrationFactory.php index 20cec5dab7f..a9ab782ac63 100644 --- a/lib/internal/Magento/Framework/Module/Setup/MigrationFactory.php +++ b/lib/internal/Magento/Framework/Module/Setup/MigrationFactory.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Module\Setup; /** diff --git a/lib/internal/Magento/Framework/Mview/ActionFactory.php b/lib/internal/Magento/Framework/Mview/ActionFactory.php index f981c63c2c4..32cc21a864c 100644 --- a/lib/internal/Magento/Framework/Mview/ActionFactory.php +++ b/lib/internal/Magento/Framework/Mview/ActionFactory.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Mview; class ActionFactory diff --git a/lib/internal/Magento/Framework/Mview/View.php b/lib/internal/Magento/Framework/Mview/View.php index 925bfd4a545..e4def87e9f1 100644 --- a/lib/internal/Magento/Framework/Mview/View.php +++ b/lib/internal/Magento/Framework/Mview/View.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Mview; /** diff --git a/lib/internal/Magento/Framework/Mview/View/Subscription.php b/lib/internal/Magento/Framework/Mview/View/Subscription.php index 545ee3dc709..cae9006e3ff 100644 --- a/lib/internal/Magento/Framework/Mview/View/Subscription.php +++ b/lib/internal/Magento/Framework/Mview/View/Subscription.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Mview\View; class Subscription implements SubscriptionInterface diff --git a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Persistor.php b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Persistor.php index 1a62645d567..fb478ba6cd4 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Persistor.php +++ b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Persistor.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\ObjectManager\Code\Generator; /** diff --git a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php index c1ab90e4f89..775f40644f2 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php +++ b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\ObjectManager\Code\Generator; /** diff --git a/lib/internal/Magento/Framework/ObjectManager/DefinitionFactory.php b/lib/internal/Magento/Framework/ObjectManager/DefinitionFactory.php index c4297dd6e9f..4f27aefbd85 100644 --- a/lib/internal/Magento/Framework/ObjectManager/DefinitionFactory.php +++ b/lib/internal/Magento/Framework/ObjectManager/DefinitionFactory.php @@ -5,6 +5,9 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\ObjectManager; use Magento\Framework\Api\Code\Generator\DataBuilder as DataBuilderGenerator; diff --git a/lib/internal/Magento/Framework/Pricing/Render/RendererPool.php b/lib/internal/Magento/Framework/Pricing/Render/RendererPool.php index bb4c3ee2e8f..f89d1be3251 100644 --- a/lib/internal/Magento/Framework/Pricing/Render/RendererPool.php +++ b/lib/internal/Magento/Framework/Pricing/Render/RendererPool.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Pricing\Render; use Magento\Framework\Pricing\Amount\AmountInterface; diff --git a/lib/internal/Magento/Framework/Profiler/Driver/Factory.php b/lib/internal/Magento/Framework/Profiler/Driver/Factory.php index 447bd5bcbb6..26e0da2e97b 100644 --- a/lib/internal/Magento/Framework/Profiler/Driver/Factory.php +++ b/lib/internal/Magento/Framework/Profiler/Driver/Factory.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Profiler\Driver; use Magento\Framework\Profiler\DriverInterface; diff --git a/lib/internal/Magento/Framework/Stdlib/DateTime/DateInterface.php b/lib/internal/Magento/Framework/Stdlib/DateTime/DateInterface.php index b77d959b4f6..0bf0a4f3031 100644 --- a/lib/internal/Magento/Framework/Stdlib/DateTime/DateInterface.php +++ b/lib/internal/Magento/Framework/Stdlib/DateTime/DateInterface.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Stdlib\DateTime; interface DateInterface diff --git a/lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php b/lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php index 29d1897a22a..3615561c520 100644 --- a/lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php +++ b/lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Stdlib\DateTime; interface TimezoneInterface diff --git a/lib/internal/Magento/Framework/Translate/Adapter.php b/lib/internal/Magento/Framework/Translate/Adapter.php index 3e8fe9ffb3f..5af7934cb43 100644 --- a/lib/internal/Magento/Framework/Translate/Adapter.php +++ b/lib/internal/Magento/Framework/Translate/Adapter.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Magento translate adapter */ diff --git a/lib/internal/Magento/Framework/Translate/AdapterInterface.php b/lib/internal/Magento/Framework/Translate/AdapterInterface.php index 5df5ac73f21..efbb760464d 100644 --- a/lib/internal/Magento/Framework/Translate/AdapterInterface.php +++ b/lib/internal/Magento/Framework/Translate/AdapterInterface.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Magento translate adapter interface */ diff --git a/lib/internal/Magento/Framework/Translate/Inline.php b/lib/internal/Magento/Framework/Translate/Inline.php index 5e51404920c..c3cbbc129a8 100644 --- a/lib/internal/Magento/Framework/Translate/Inline.php +++ b/lib/internal/Magento/Framework/Translate/Inline.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Translate; class Inline implements \Magento\Framework\Translate\InlineInterface diff --git a/lib/internal/Magento/Framework/Url.php b/lib/internal/Magento/Framework/Url.php index 7b4b6baedab..4e6ce8112e2 100644 --- a/lib/internal/Magento/Framework/Url.php +++ b/lib/internal/Magento/Framework/Url.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + namespace Magento\Framework; /** diff --git a/lib/internal/Magento/Framework/UrlFactory.php b/lib/internal/Magento/Framework/UrlFactory.php index ebfa053c171..006f4658abf 100644 --- a/lib/internal/Magento/Framework/UrlFactory.php +++ b/lib/internal/Magento/Framework/UrlFactory.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework; class UrlFactory diff --git a/lib/internal/Magento/Framework/Validator/Builder.php b/lib/internal/Magento/Framework/Validator/Builder.php index 86645c60050..88170fd724d 100644 --- a/lib/internal/Magento/Framework/Validator/Builder.php +++ b/lib/internal/Magento/Framework/Validator/Builder.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Validator; use Magento\Framework\Validator\Constraint\OptionInterface; diff --git a/lib/internal/Magento/Framework/Validator/Constraint/Property.php b/lib/internal/Magento/Framework/Validator/Constraint/Property.php index 3ff4c43f602..61c79783ae5 100644 --- a/lib/internal/Magento/Framework/Validator/Constraint/Property.php +++ b/lib/internal/Magento/Framework/Validator/Constraint/Property.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Validator\Constraint; class Property extends \Magento\Framework\Validator\Constraint diff --git a/lib/internal/Magento/Framework/Validator/ConstraintFactory.php b/lib/internal/Magento/Framework/Validator/ConstraintFactory.php index 8ef00d71761..30a851c637b 100644 --- a/lib/internal/Magento/Framework/Validator/ConstraintFactory.php +++ b/lib/internal/Magento/Framework/Validator/ConstraintFactory.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Factory class for \Magento\Framework\Validator\Constraint */ -- GitLab From f38cc64f9512d6efca462187ed12f6463ee5a122 Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Wed, 14 Jan 2015 15:28:12 +0200 Subject: [PATCH 028/114] MAGETWO-31578: Implement tool for adding annotations to existing code - removed ignore annotations from statics --- .../phpmd/input/cyclomatic_complexity.php | 1 - .../CodeMessTest/phpmd/input/descendant_count.php | 3 --- .../CodeMessTest/phpmd/input/field_count.php | 1 - .../CodeMessTest/phpmd/input/method_length.php | 1 - .../CodeMessTest/phpmd/input/parameter_list.php | 1 - .../phpmd/input/prohibited_statement.php | 6 ------ .../phpmd/input/prohibited_statement_goto.php | 3 --- .../CodeMessTest/phpmd/input/public_count.php | 1 - .../Php/Exemplar/CodeMessTest/phpmd/input/unused.php | 12 ------------ .../phpcs/input/naming/constant/minuscule_letter.php | 3 --- .../input/naming/method/normal_underscore_start.php | 3 --- 11 files changed, 35 deletions(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/cyclomatic_complexity.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/cyclomatic_complexity.php index 2795d100cc8..e78ad0a73d1 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/cyclomatic_complexity.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/cyclomatic_complexity.php @@ -4,7 +4,6 @@ abstract class Foo { /** * Method that violates the allowed cyclomatic complexity - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function bar() { diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/descendant_count.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/descendant_count.php index 4c035e76005..a559b0c1f59 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/descendant_count.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/descendant_count.php @@ -1,8 +1,5 @@ <?php -/** - * @SuppressWarnings(PHPMD.NumberOfChildren) - */ class Magento_Test_Php_Exemplar_CodeMessTest_phpmd_input_descendant_count { } diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/field_count.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/field_count.php index 397ece72b54..3e07302931d 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/field_count.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/field_count.php @@ -2,7 +2,6 @@ /** * Class that violates the allowed field number - * @SuppressWarnings(PHPMD.TooManyFields) */ abstract class Foo { diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/method_length.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/method_length.php index 2f0ca8b5370..48a58a39dbe 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/method_length.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/method_length.php @@ -4,7 +4,6 @@ class Magento_Test_Php_Exemplar_CodeMessTest_phpmd_input_method_length { /** * Method that violates the allowed method length - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function bar() // 001 { // 002 diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/parameter_list.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/parameter_list.php index 30b9260dbaa..59f733a5301 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/parameter_list.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/parameter_list.php @@ -4,7 +4,6 @@ class Magento_Test_Php_Exemplar_CodeMessTest_phpmd_input_parameter_list { /** * Method that violates the allowed parameter list length - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function bar($param1, $param2, $param3, $param4, $param5, $param6, $param7, $param8, $param9, $param10) { diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/prohibited_statement.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/prohibited_statement.php index 49dc3365e49..17639a25e72 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/prohibited_statement.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/prohibited_statement.php @@ -2,17 +2,11 @@ class Magento_Test_Php_Exemplar_CodeMessTest_phpmd_input_prohibited_statement { - /** - * @SuppressWarnings(PHPMD.ExitExpression) - */ public function terminateApplication($exitCode = 0) { exit($exitCode); } - /** - * @SuppressWarnings(PHPMD.EvalExpression) - */ public function evaluateExpression($expression) { return eval($expression); diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/prohibited_statement_goto.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/prohibited_statement_goto.php index 8fe82d85b96..69cbbddcbf6 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/prohibited_statement_goto.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/prohibited_statement_goto.php @@ -2,9 +2,6 @@ class Magento_Test_Php_Exemplar_CodeMessTest_phpmd_input_prohibited_statement_goto { - /** - * @SuppressWarnings(PHPMD.GotoStatement) - */ public function loopArrayCallback(array $array, $callback) { $index = 0; diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/public_count.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/public_count.php index cede88939f0..89cc599042d 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/public_count.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/public_count.php @@ -7,7 +7,6 @@ * * @SuppressWarnings(PHPMD.TooManyFields) * @SuppressWarnings(PHPMD.TooManyMethods) - * @SuppressWarnings(PHPMD.ExcessivePublicCount) */ abstract class Foo { diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/unused.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/unused.php index f5edffd765b..c1b9b30a59c 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/unused.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/unused.php @@ -1,25 +1,13 @@ <?php -/** - * @SuppressWarnings(PHPMD.UnusedPrivateField) - */ class Magento_Test_Php_Exemplar_CodeMessTest_phpmd_input_unused { private $_unusedField; - /** - * @SuppressWarnings(PHPMD.UnusedPrivateMethod) - */ private function _unusedMethod() { } - /** - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - /** - * @SuppressWarnings(PHPMD.UnusedLocalVariable) - */ public function bar($unusedParameter) { $unusedLocalVariable = 'unused value'; diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/constant/minuscule_letter.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/constant/minuscule_letter.php index 9f2166f5946..ae52ab28aed 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/constant/minuscule_letter.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/constant/minuscule_letter.php @@ -1,9 +1,6 @@ <?php define('SOME_CONSTaNT_2_ACT_4_YOU', 42); define("SOME_CONSTaNT_2_ACT_4_YOU", 2783); -/** - * @SuppressWarnings(PHPMD.ConstantNamingConventions) - */ class Magento_Test_Php_Exemplar_CodeStyleTest_phpcs_input_naming_constant_minuscule_letter { const SOME_LONG_CONSTaNT_2_ACT_4_YOU = 1; diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/method/normal_underscore_start.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/method/normal_underscore_start.php index 6fffaa5f938..eb8932a74cc 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/method/normal_underscore_start.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/method/normal_underscore_start.php @@ -1,9 +1,6 @@ <?php class Magento_Test_Php_Exemplar_CodeStyleTest_phpcs_input_naming_method_normal_underscore_start { - /** - * @SuppressWarnings(PHPMD.UnusedPrivateMethod) - */ private function _testFunctionPrivate() { } -- GitLab From 422cb45e2684b45f9c624074f2518403904b08e9 Mon Sep 17 00:00:00 2001 From: Iryna Lagno <ilagno@ebay.com> Date: Wed, 14 Jan 2015 15:42:16 +0200 Subject: [PATCH 029/114] MAGETWO-32504: Implement Cart Items interfaces --- .../Checkout/Service/V1/Item/ReadService.php | 60 ------- .../Service/V1/Item/ReadServiceInterface.php | 22 --- .../Checkout/Service/V1/Item/WriteService.php | 137 --------------- .../Service/V1/Item/WriteServiceInterface.php | 51 ------ app/code/Magento/Checkout/etc/di.xml | 2 - app/code/Magento/Checkout/etc/webapi.xml | 24 --- .../Api/CartItemRepositoryInterface.php | 24 +-- .../Api/Data/CartItemInterface.php | 6 +- app/code/Magento/Quote/Model/Quote/Item.php | 73 ++++++-- .../Quote/Model/Quote/Item/AbstractItem.php | 17 +- .../Quote/Model/Quote/Item/Repository.php | 142 +++++++++++++++ app/code/Magento/Quote/etc/di.xml | 2 + .../Service/V1/Item/ReadServiceTest.php | 66 ------- .../Api/CartItemRepositoryTest.php} | 92 +++++++--- .../Service/V1/Item/ReaderServiceTest.php | 62 ------- .../Model/Quote/Item/RepositoryTest.php} | 166 ++++++++++++------ 16 files changed, 412 insertions(+), 534 deletions(-) delete mode 100644 app/code/Magento/Checkout/Service/V1/Item/ReadService.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Item/ReadServiceInterface.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Item/WriteService.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Item/WriteServiceInterface.php rename app/code/Magento/{Checkout => Quote}/Api/CartItemRepositoryInterface.php (60%) rename app/code/Magento/{Checkout => Quote}/Api/Data/CartItemInterface.php (88%) create mode 100644 app/code/Magento/Quote/Model/Quote/Item/Repository.php delete mode 100644 dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Item/ReadServiceTest.php rename dev/tests/api-functional/testsuite/Magento/{Checkout/Service/V1/Item/WriteServiceTest.php => Quote/Api/CartItemRepositoryTest.php} (61%) delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Item/ReaderServiceTest.php rename dev/tests/unit/testsuite/Magento/{Checkout/Service/V1/Item/WriteServiceTest.php => Quote/Model/Quote/Item/RepositoryTest.php} (59%) diff --git a/app/code/Magento/Checkout/Service/V1/Item/ReadService.php b/app/code/Magento/Checkout/Service/V1/Item/ReadService.php deleted file mode 100644 index 68ca13033f5..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Item/ReadService.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Item; - -/** - * Read service object. - */ -class ReadService implements ReadServiceInterface -{ - /** - * Quote repository. - * - * @var \Magento\Quote\Model\QuoteRepository - */ - protected $quoteRepository; - - /** - * Item mapper. - * - * @var \Magento\Checkout\Service\V1\Data\Cart\ItemMapper - */ - protected $itemMapper; - - /** - * Constructs a read service object. - * - * @param \Magento\Quote\Model\QuoteRepository $quoteRepository Quote repository. - * @param \Magento\Checkout\Service\V1\Data\Cart\ItemMapper $itemMapper Item mapper. - */ - public function __construct( - \Magento\Quote\Model\QuoteRepository $quoteRepository, - \Magento\Checkout\Service\V1\Data\Cart\ItemMapper $itemMapper - ) { - $this->quoteRepository = $quoteRepository; - $this->itemMapper = $itemMapper; - } - - /** - * {@inheritDoc} - * - * @param int $cartId The cart ID. - * @return \Magento\Checkout\Service\V1\Data\Cart\Item[] Array of items. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - */ - public function getList($cartId) - { - $output = []; - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->quoteRepository->getActive($cartId); - - /** @var \Magento\Quote\Model\Quote\Item $item */ - foreach ($quote->getAllItems() as $item) { - $output[] = $this->itemMapper->extractDto($item); - } - return $output; - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Item/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Item/ReadServiceInterface.php deleted file mode 100644 index f49b6174fbb..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Item/ReadServiceInterface.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Item; - -/** - * Read service interface. - */ -interface ReadServiceInterface -{ - /** - * Lists items that are assigned to a specified cart. - * - * @param int $cartId The cart ID. - * @return \Magento\Checkout\Service\V1\Data\Cart\Item[] Array of items. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @see \Magento\Checkout\Api\CartItemRepositoryInterface::getList - */ - public function getList($cartId); -} diff --git a/app/code/Magento/Checkout/Service/V1/Item/WriteService.php b/app/code/Magento/Checkout/Service/V1/Item/WriteService.php deleted file mode 100644 index b8fc3a97ceb..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Item/WriteService.php +++ /dev/null @@ -1,137 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Item; - -use Magento\Framework\Exception\CouldNotSaveException; -use Magento\Framework\Exception\InputException; -use Magento\Framework\Exception\NoSuchEntityException; - -/** - * Write service object. - */ -class WriteService implements WriteServiceInterface -{ - /** - * Quote repository. - * - * @var \Magento\Quote\Model\QuoteRepository - */ - protected $quoteRepository; - - /** - * Product repository. - * - * @var \Magento\Catalog\Api\ProductRepositoryInterface - */ - protected $productRepository; - - /** - * Constructs a write service object. - * - * @param \Magento\Quote\Model\QuoteRepository $quoteRepository Quote repository. - * @param \Magento\Catalog\Api\ProductRepositoryInterface $productRepository - */ - public function __construct( - \Magento\Quote\Model\QuoteRepository $quoteRepository, - \Magento\Catalog\Api\ProductRepositoryInterface $productRepository - ) { - $this->quoteRepository = $quoteRepository; - $this->productRepository = $productRepository; - } - - /** - * {@inheritDoc} - * - * @param int $cartId The cart ID. - * @param \Magento\Checkout\Service\V1\Data\Cart\Item $data The item. - * @return int Item ID. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @throws \Magento\Framework\Exception\CouldNotSaveException The specified item could not be saved to the cart. - * @throws \Magento\Framework\Exception\InputException The specified item or cart is not valid. - */ - public function addItem($cartId, \Magento\Checkout\Service\V1\Data\Cart\Item $data) - { - $qty = $data->getQty(); - if (!is_numeric($qty) || $qty <= 0) { - throw InputException::invalidFieldValue('qty', $qty); - } - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->quoteRepository->getActive($cartId); - - $product = $this->productRepository->get($data->getSku()); - - try { - $quote->addProduct($product, $qty); - $this->quoteRepository->save($quote->collectTotals()); - } catch (\Exception $e) { - throw new CouldNotSaveException('Could not add item to quote'); - } - return $quote->getItemByProduct($product)->getId(); - } - - /** - * {@inheritDoc} - * - * @param int $cartId The cart ID. - * @param int $itemId The item ID of the item to be updated. - * @param \Magento\Checkout\Service\V1\Data\Cart\Item $data The item. - * @return bool - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item or cart does not exist. - * @throws \Magento\Framework\Exception\CouldNotSaveException The item could not be updated. - * @throws \Magento\Framework\Exception\InputException The specified item or cart is not valid. - */ - public function updateItem($cartId, $itemId, \Magento\Checkout\Service\V1\Data\Cart\Item $data) - { - $qty = $data->getQty(); - if (!is_numeric($qty) || $qty <= 0) { - throw InputException::invalidFieldValue('qty', $qty); - } - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->quoteRepository->getActive($cartId); - $quoteItem = $quote->getItemById($itemId); - if (!$quoteItem) { - throw new NoSuchEntityException("Cart $cartId doesn't contain item $itemId"); - } - $quoteItem->setData('qty', $qty); - - try { - $this->quoteRepository->save($quote->collectTotals()); - } catch (\Exception $e) { - throw new CouldNotSaveException('Could not update quote item'); - } - return true; - } - - /** - * {@inheritDoc} - * - * @param int $cartId The cart ID. - * @param int $itemId The item ID of the item to be removed. - * @return bool - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item or cart does not exist. - * @throws \Magento\Framework\Exception\CouldNotSaveException The item could not be removed. - */ - public function removeItem($cartId, $itemId) - { - /** - * Quote. - * - * @var \Magento\Quote\Model\Quote $quote - */ - $quote = $this->quoteRepository->getActive($cartId); - $quoteItem = $quote->getItemById($itemId); - if (!$quoteItem) { - throw new NoSuchEntityException("Cart $cartId doesn't contain item $itemId"); - } - try { - $quote->removeItem($itemId); - $this->quoteRepository->save($quote->collectTotals()); - } catch (\Exception $e) { - throw new CouldNotSaveException('Could not remove item from quote'); - } - return true; - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Item/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Item/WriteServiceInterface.php deleted file mode 100644 index 81dfb82dd0e..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Item/WriteServiceInterface.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Item; - -/** - * Write service interface. - */ -interface WriteServiceInterface -{ - /** - * Adds the specified item to the specified cart. - * - * @param int $cartId The cart ID. - * @param \Magento\Checkout\Service\V1\Data\Cart\Item $data The item. - * @return int Item ID. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @throws \Magento\Framework\Exception\CouldNotSaveException The specified item could not be saved to the cart. - * @throws \Magento\Framework\Exception\InputException The specified item or cart is not valid. - * @see \Magento\Checkout\Api\CartItemRepositoryInterface::save - */ - public function addItem($cartId, \Magento\Checkout\Service\V1\Data\Cart\Item $data); - - /** - * Updates the specified item in the specified cart. - * - * @param int $cartId The cart ID. - * @param int $itemId The item ID of the item to be updated. - * @param \Magento\Checkout\Service\V1\Data\Cart\Item $data The item. - * @return bool - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item or cart does not exist. - * @throws \Magento\Framework\Exception\CouldNotSaveException The item could not be updated. - * @throws \Magento\Framework\Exception\InputException The specified item or cart is not valid. - * @see \Magento\Checkout\Api\CartItemRepositoryInterface::save - */ - public function updateItem($cartId, $itemId, \Magento\Checkout\Service\V1\Data\Cart\Item $data); - - /** - * Removes the specified item from the specified cart. - * - * @param int $cartId The cart ID. - * @param int $itemId The item ID of the item to be removed. - * @return bool - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item or cart does not exist. - * @throws \Magento\Framework\Exception\CouldNotSaveException The item could not be removed. - * @see \Magento\Checkout\Api\CartItemRepositoryInterface::deleteById - */ - public function removeItem($cartId, $itemId); -} diff --git a/app/code/Magento/Checkout/etc/di.xml b/app/code/Magento/Checkout/etc/di.xml index fefea396758..a12a460cbd8 100644 --- a/app/code/Magento/Checkout/etc/di.xml +++ b/app/code/Magento/Checkout/etc/di.xml @@ -23,8 +23,6 @@ <argument name="storage" xsi:type="object">Magento\Checkout\Model\Session\Storage</argument> </arguments> </type> - <preference for="Magento\Checkout\Service\V1\Item\ReadServiceInterface" type="Magento\Checkout\Service\V1\Item\ReadService" /> - <preference for="\Magento\Checkout\Service\V1\Item\WriteServiceInterface" type="Magento\Checkout\Service\V1\Item\WriteService" /> <preference for="\Magento\Checkout\Service\V1\Address\Shipping\ReadServiceInterface" type="Magento\Checkout\Service\V1\Address\Shipping\ReadService" /> <preference for="\Magento\Checkout\Service\V1\Address\Shipping\WriteServiceInterface" type="Magento\Checkout\Service\V1\Address\Shipping\WriteService" /> <preference for="\Magento\Checkout\Service\V1\Address\Billing\ReadServiceInterface" type="Magento\Checkout\Service\V1\Address\Billing\ReadService" /> diff --git a/app/code/Magento/Checkout/etc/webapi.xml b/app/code/Magento/Checkout/etc/webapi.xml index ef78719378f..821001e5f9f 100644 --- a/app/code/Magento/Checkout/etc/webapi.xml +++ b/app/code/Magento/Checkout/etc/webapi.xml @@ -19,30 +19,6 @@ <resource ref="Magento_Sales::create" /> </resources> </route> - <route url="/V1/carts/:cartId/items" method="GET"> - <service class="Magento\Checkout\Service\V1\Item\ReadServiceInterface" method="getList"/> - <resources> - <resource ref="Magento_Catalog::products" /> - </resources> - </route> - <route url="/V1/carts/:cartId/items" method="POST"> - <service class="Magento\Checkout\Service\V1\Item\WriteServiceInterface" method="addItem"/> - <resources> - <resource ref="Magento_Catalog::products" /> - </resources> - </route> - <route url="/V1/carts/:cartId/items/:itemId" method="PUT"> - <service class="Magento\Checkout\Service\V1\Item\WriteServiceInterface" method="updateItem"/> - <resources> - <resource ref="Magento_Catalog::products" /> - </resources> - </route> - <route url="/V1/carts/:cartId/items/:itemId" method="DELETE"> - <service class="Magento\Checkout\Service\V1\Item\WriteServiceInterface" method="removeItem"/> - <resources> - <resource ref="Magento_Catalog::products" /> - </resources> - </route> <route url="/V1/carts/:cartId" method="GET"> <service class="Magento\Checkout\Service\V1\Cart\ReadServiceInterface" method="getCart"/> <resources> diff --git a/app/code/Magento/Checkout/Api/CartItemRepositoryInterface.php b/app/code/Magento/Quote/Api/CartItemRepositoryInterface.php similarity index 60% rename from app/code/Magento/Checkout/Api/CartItemRepositoryInterface.php rename to app/code/Magento/Quote/Api/CartItemRepositoryInterface.php index 94cb23b93c2..c1b81ece07d 100644 --- a/app/code/Magento/Checkout/Api/CartItemRepositoryInterface.php +++ b/app/code/Magento/Quote/Api/CartItemRepositoryInterface.php @@ -3,47 +3,39 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api; +namespace Magento\Quote\Api; -/** - * @see \Magento\Checkout\Service\V1\Item\ReadServiceInterface - * @see \Magento\Checkout\Service\V1\Item\WriteServiceInterface - */ interface CartItemRepositoryInterface { /** * Lists items that are assigned to a specified cart. * * @param int $cartId The cart ID. - * @return \Magento\Checkout\Api\Data\CartItemInterface[] Array of items. + * @return \Magento\Quote\Api\Data\CartItemInterface[] Array of items. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @see \Magento\Checkout\Service\V1\Item\ReadServiceInterface::getList */ public function getList($cartId); /** * Adds the specified item to the specified cart. * - * @param int $cartId The cart ID. - * @param \Magento\Checkout\Api\Data\CartItemInterface $cartItem The item. - * @return \Magento\Checkout\Api\Data\CartItemInterface Item ID. + * @param \Magento\Quote\Api\Data\CartItemInterface $cartItem The item. + * @return \Magento\Quote\Api\Data\CartItemInterface Item ID. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. * @throws \Magento\Framework\Exception\CouldNotSaveException The specified item could not be saved to the cart. * @throws \Magento\Framework\Exception\InputException The specified item or cart is not valid. - * @see \Magento\Checkout\Service\V1\Item\WriteServiceInterface::addItem - * @see \Magento\Checkout\Service\V1\Item\WriteServiceInterface::updateItem */ - public function save(\Magento\Checkout\Api\Data\CartItemInterface $cartItem); + public function save(\Magento\Quote\Api\Data\CartItemInterface $cartItem); /** * Remove bundle option * - * @param \Magento\Checkout\Api\Data\CartItemInterface $cartItem - * @return bool + * @param \Magento\Quote\Api\Data\CartItemInterface $cartItem + * @return void * @throws \Magento\Framework\Exception\CouldNotSaveException * @throws \Magento\Webapi\Exception */ - public function delete(\Magento\Checkout\Api\Data\CartItemInterface $cartItem); + public function delete(\Magento\Quote\Api\Data\CartItemInterface $cartItem); /** * Removes the specified item from the specified cart. diff --git a/app/code/Magento/Checkout/Api/Data/CartItemInterface.php b/app/code/Magento/Quote/Api/Data/CartItemInterface.php similarity index 88% rename from app/code/Magento/Checkout/Api/Data/CartItemInterface.php rename to app/code/Magento/Quote/Api/Data/CartItemInterface.php index 4a3295902b6..7e931438f86 100644 --- a/app/code/Magento/Checkout/Api/Data/CartItemInterface.php +++ b/app/code/Magento/Quote/Api/Data/CartItemInterface.php @@ -3,12 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api\Data; +namespace Magento\Quote\Api\Data; -/** - * @see \Magento\Checkout\Service\V1\Data\Cart\Item - * can be implemented by \Magento\Sales\Model\Quote\Item - */ interface CartItemInterface extends \Magento\Framework\Api\ExtensibleDataInterface { /** diff --git a/app/code/Magento/Quote/Model/Quote/Item.php b/app/code/Magento/Quote/Model/Quote/Item.php index 27808700ed1..e17377308f5 100644 --- a/app/code/Magento/Quote/Model/Quote/Item.php +++ b/app/code/Magento/Quote/Model/Quote/Item.php @@ -5,18 +5,18 @@ */ namespace Magento\Quote\Model\Quote; +use Magento\Framework\Api\AttributeDataBuilder; +use Magento\Framework\Api\MetadataServiceInterface; + /** * Sales Quote Item Model * * @method \Magento\Quote\Model\Resource\Quote\Item _getResource() * @method \Magento\Quote\Model\Resource\Quote\Item getResource() - * @method int getQuoteId() - * @method \Magento\Quote\Model\Quote\Item setQuoteId(int $value) * @method string getCreatedAt() * @method \Magento\Quote\Model\Quote\Item setCreatedAt(string $value) * @method string getUpdatedAt() * @method \Magento\Quote\Model\Quote\Item setUpdatedAt(string $value) - * @method int getProductId() * @method \Magento\Quote\Model\Quote\Item setProductId(int $value) * @method int getStoreId() * @method \Magento\Quote\Model\Quote\Item setStoreId(int $value) @@ -24,10 +24,6 @@ namespace Magento\Quote\Model\Quote; * @method \Magento\Quote\Model\Quote\Item setParentItemId(int $value) * @method int getIsVirtual() * @method \Magento\Quote\Model\Quote\Item setIsVirtual(int $value) - * @method string getSku() - * @method \Magento\Quote\Model\Quote\Item setSku(string $value) - * @method string getName() - * @method \Magento\Quote\Model\Quote\Item setName(string $value) * @method string getDescription() * @method \Magento\Quote\Model\Quote\Item setDescription(string $value) * @method string getAdditionalData() @@ -98,7 +94,7 @@ namespace Magento\Quote\Model\Quote; * @method \Magento\Quote\Model\Quote\Item setHasConfigurationUnavailableError(bool $value) * @method \Magento\Quote\Model\Quote\Item unsHasConfigurationUnavailableError() */ -class Item extends \Magento\Quote\Model\Quote\Item\AbstractItem +class Item extends \Magento\Quote\Model\Quote\Item\AbstractItem implements \Magento\Quote\Api\Data\CartItemInterface { /** * Prefix of model events names @@ -180,12 +176,14 @@ class Item extends \Magento\Quote\Model\Quote\Item\AbstractItem /** * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry - * @param \Magento\Catalog\Api\ProductRepositoryInterface $productRepository, + * @param MetadataServiceInterface $metadataService + * @param AttributeDataBuilder $customAttributeBuilder + * @param \Magento\Catalog\Api\ProductRepositoryInterface $productRepository * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency * @param \Magento\Sales\Model\Status\ListFactory $statusListFactory * @param \Magento\Framework\Locale\FormatInterface $localeFormat * @param Item\OptionFactory $itemOptionFactory - * @param \Magento\Quote\Model\Quote\Item\Compare $quoteItemCompare + * @param Item\Compare $quoteItemCompare * @param \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection @@ -196,6 +194,8 @@ class Item extends \Magento\Quote\Model\Quote\Item\AbstractItem public function __construct( \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, + MetadataServiceInterface $metadataService, + AttributeDataBuilder $customAttributeBuilder, \Magento\Catalog\Api\ProductRepositoryInterface $productRepository, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, \Magento\Sales\Model\Status\ListFactory $statusListFactory, @@ -215,6 +215,8 @@ class Item extends \Magento\Quote\Model\Quote\Item\AbstractItem parent::__construct( $context, $registry, + $metadataService, + $customAttributeBuilder, $productRepository, $priceCurrency, $resource, @@ -896,4 +898,55 @@ class Item extends \Magento\Quote\Model\Quote\Item\AbstractItem return $this; } + + /** + * @codeCoverageIgnoreStart + * + * {@inheritdoc} + */ + public function getItemId() + { + return $this->getData('item_id'); + } + + /** + * {@inheritdoc} + */ + public function getSku() + { + return $this->getData('sku'); + } + + /** + * {@inheritdoc} + */ + public function getQty() + { + return $this->getData('qty'); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return $this->getData('name'); + } + + /** + * {@inheritdoc} + */ + public function getPrice() + { + return $this->getData('price'); + } + + /** + * {@inheritdoc} + */ + public function getQuoteId() + { + return $this->getData('quote_id'); + } + //@codeCoverageIgnoreEnd } diff --git a/app/code/Magento/Quote/Model/Quote/Item/AbstractItem.php b/app/code/Magento/Quote/Model/Quote/Item/AbstractItem.php index ae72f846dc4..b4989e4d095 100644 --- a/app/code/Magento/Quote/Model/Quote/Item/AbstractItem.php +++ b/app/code/Magento/Quote/Model/Quote/Item/AbstractItem.php @@ -6,6 +6,7 @@ namespace Magento\Quote\Model\Quote\Item; use Magento\Quote\Model\Quote\Item; +use Magento\Framework\Api\AttributeDataBuilder; /** * Quote item abstract model @@ -43,7 +44,7 @@ use Magento\Quote\Model\Quote\Item; * @method float getRowTotal() * @method float getPriceInclTax() */ -abstract class AbstractItem extends \Magento\Framework\Model\AbstractModel implements +abstract class AbstractItem extends \Magento\Framework\Model\AbstractExtensibleModel implements \Magento\Catalog\Model\Product\Configuration\Item\ItemInterface { /** @@ -81,6 +82,8 @@ abstract class AbstractItem extends \Magento\Framework\Model\AbstractModel imple /** * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService + * @param AttributeDataBuilder $customAttributeBuilder * @param \Magento\Catalog\Api\ProductRepositoryInterface $productRepository * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency * @param \Magento\Framework\Model\Resource\AbstractResource $resource @@ -90,13 +93,23 @@ abstract class AbstractItem extends \Magento\Framework\Model\AbstractModel imple public function __construct( \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, + \Magento\Framework\Api\MetadataServiceInterface $metadataService, + AttributeDataBuilder $customAttributeBuilder, \Magento\Catalog\Api\ProductRepositoryInterface $productRepository, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = [] ) { - parent::__construct($context, $registry, $resource, $resourceCollection, $data); + parent::__construct( + $context, + $registry, + $metadataService, + $customAttributeBuilder, + $resource, + $resourceCollection, + $data + ); $this->productRepository = $productRepository; $this->priceCurrency = $priceCurrency; } diff --git a/app/code/Magento/Quote/Model/Quote/Item/Repository.php b/app/code/Magento/Quote/Model/Quote/Item/Repository.php new file mode 100644 index 00000000000..3bb2ef01ec7 --- /dev/null +++ b/app/code/Magento/Quote/Model/Quote/Item/Repository.php @@ -0,0 +1,142 @@ +<?php +/** + * + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Quote\Model\Quote\Item; + +use Magento\Framework\Exception\CouldNotSaveException; +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\NoSuchEntityException; + +class Repository implements \Magento\Quote\Api\CartItemRepositoryInterface +{ + /** + * Quote repository. + * + * @var \Magento\Quote\Model\QuoteRepository + */ + protected $quoteRepository; + + /** + * Product repository. + * + * @var \Magento\Catalog\Api\ProductRepositoryInterface + */ + protected $productRepository; + + /** + * @var \Magento\Quote\Api\Data\CartItemDataBuilder + */ + protected $itemDataBuilder; + + /** + * Constructs a read service object. + * + * @param \Magento\Quote\Model\QuoteRepository $quoteRepository + * @param \Magento\Catalog\Api\ProductRepositoryInterface $productRepository + * @param \Magento\Quote\Api\Data\CartItemDataBuilder $itemDataBuilder + */ + public function __construct( + \Magento\Quote\Model\QuoteRepository $quoteRepository, + \Magento\Catalog\Api\ProductRepositoryInterface $productRepository, + \Magento\Quote\Api\Data\CartItemDataBuilder $itemDataBuilder + + ) { + $this->quoteRepository = $quoteRepository; + $this->productRepository = $productRepository; + $this->itemDataBuilder = $itemDataBuilder; + } + + /** + * {@inheritdoc} + */ + public function getList($cartId) + { + $output = []; + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->quoteRepository->getActive($cartId); + + /** @var \Magento\Quote\Model\Quote\Item $item */ + foreach ($quote->getAllItems() as $item) { + $output[] = $item; + } + return $output; + } + + /** + * {@inheritdoc} + */ + public function save(\Magento\Quote\Api\Data\CartItemInterface $cartItem) + { + $qty = $cartItem->getQty(); + if (!is_numeric($qty) || $qty <= 0) { + throw InputException::invalidFieldValue('qty', $qty); + } + $cartId = $cartItem->getQuoteId(); + + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->quoteRepository->getActive($cartId); + + $itemId = $cartItem->getItemId(); + try { + /** update item qty */ + if (isset($itemId)) { + $cartItem = $quote->getItemById($itemId); + if (!$cartItem) { + throw new NoSuchEntityException("Cart $cartId doesn't contain item $itemId"); + } + $product = $this->productRepository->get($cartItem->getSku()); + $cartItem->setData('qty', $qty); + } else { + $product = $this->productRepository->get($cartItem->getSku()); + $quote->addProduct($product, $qty); + } + $this->quoteRepository->save($quote->collectTotals()); + } catch (\Exception $e) { + if ($e instanceof NoSuchEntityException) + { + throw $e; + } + throw new CouldNotSaveException('Could not save quote'); + } + return $quote->getItemByProduct($product); + + } + + /** + * {@inheritdoc} + */ + public function delete(\Magento\Quote\Api\Data\CartItemInterface $cartItem) + { + $cartId = $cartItem->getQuoteId(); + $itemId = $cartItem->getItemId(); + /** + * Quote. + * + * @var \Magento\Quote\Model\Quote $quote + */ + $quote = $this->quoteRepository->getActive($cartId); + $quoteItem = $quote->getItemById($itemId); + if (!$quoteItem) { + throw new NoSuchEntityException("Cart $cartId doesn't contain item $itemId"); + } + try { + $quote->removeItem($itemId); + $this->quoteRepository->save($quote->collectTotals()); + } catch (\Exception $e) { + throw new CouldNotSaveException('Could not remove item from quote'); + } + } + + /** + * {@inheritdoc} + */ + public function deleteById($cartId, $itemId) + { + $item = $this->itemDataBuilder->setQuoteId($cartId)->setItemId($itemId)->create(); + $this->delete($item); + return true; + } +} diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index 072334a39d2..55c9a296bbe 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -13,4 +13,6 @@ </argument> </arguments> </type> + <preference for="Magento\Quote\Api\Data\CartItemInterface" type="Magento\Quote\Model\Quote\Item" /> + <preference for="Magento\Quote\Api\CartItemRepositoryInterface" type="Magento\Quote\Model\Quote\Item\Repository" /> </config> diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Item/ReadServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Item/ReadServiceTest.php deleted file mode 100644 index af342783b7a..00000000000 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Item/ReadServiceTest.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Item; - -use Magento\Checkout\Service\V1\Data\Cart\Item as Item; -use Magento\TestFramework\TestCase\WebapiAbstract; -use Magento\Webapi\Model\Rest\Config as RestConfig; - -class ReadServiceTest extends WebapiAbstract -{ - const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'checkoutItemReadServiceV1'; - const RESOURCE_PATH = '/V1/carts/'; - - /** - * @var \Magento\TestFramework\ObjectManager - */ - protected $objectManager; - - protected function setUp() - { - $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - } - - /** - * @magentoApiDataFixture Magento/Checkout/_files/quote_with_items_saved.php - */ - public function testGetList() - { - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); - $quote->load('test_order_item_with_items', 'reserved_order_id'); - $cartId = $quote->getId(); - $output = []; - foreach ($quote->getAllItems() as $item) { - $data = [ - Item::ITEM_ID => $item->getId(), - Item::SKU => $item->getSku(), - Item::NAME => $item->getName(), - Item::PRICE => $item->getPrice(), - Item::QTY => $item->getQty(), - Item::PRODUCT_TYPE => $item->getProductType(), - ]; - - $output[] = $data; - } - $serviceInfo = [ - 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH . $cartId . '/items', - 'httpMethod' => RestConfig::HTTP_METHOD_GET, - ], - 'soap' => [ - 'service' => self::SERVICE_NAME, - 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'GetList', - ], - ]; - - $requestData = ["cartId" => $cartId]; - $this->assertEquals($output, $this->_webApiCall($serviceInfo, $requestData)); - } -} diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Item/WriteServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartItemRepositoryTest.php similarity index 61% rename from dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Item/WriteServiceTest.php rename to dev/tests/api-functional/testsuite/Magento/Quote/Api/CartItemRepositoryTest.php index 4faa6cd4ffe..39388204172 100644 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Item/WriteServiceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartItemRepositoryTest.php @@ -1,18 +1,18 @@ <?php /** + * * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ - -namespace Magento\Checkout\Service\V1\Item; +namespace Magento\Quote\Api; use Magento\TestFramework\TestCase\WebapiAbstract; use Magento\Webapi\Model\Rest\Config as RestConfig; -class WriteServiceTest extends WebapiAbstract +class CartItemRepositoryTest extends WebapiAbstract { const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'checkoutItemWriteServiceV1'; + const SERVICE_NAME = 'quoteCartItemRepositoryV1'; const RESOURCE_PATH = '/V1/carts/'; /** @@ -25,12 +25,53 @@ class WriteServiceTest extends WebapiAbstract $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); } + /** + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_items_saved.php + */ + public function testGetList() + { + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); + $quote->load('test_order_item_with_items', 'reserved_order_id'); + $cartId = $quote->getId(); + $output = []; + /** @var \Magento\Quote\Api\Data\CartItemInterface $item */ + foreach ($quote->getAllItems() as $item) { + $data = [ + 'item_id' => $item->getItemId(), + 'sku' => $item->getSku(), + 'name' => $item->getName(), + 'price' => $item->getPrice(), + 'qty' => $item->getQty(), + 'product_type' => $item->getProductType(), + 'quote_id' => $item->getQuoteId() + ]; + + $output[] = $data; + } + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => self::RESOURCE_PATH . $cartId . '/items', + 'httpMethod' => RestConfig::HTTP_METHOD_GET, + ], + 'soap' => [ + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME . 'GetList', + ], + ]; + + $requestData = ["cartId" => $cartId]; + $this->assertEquals($output, $this->_webApiCall($serviceInfo, $requestData)); + } + /** * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php */ public function testAddItem() { + /** @var \Magento\Catalog\Model\Product $product */ $product = $this->objectManager->create('Magento\Catalog\Model\Product')->load(2); $productSku = $product->getSku(); /** @var \Magento\Quote\Model\Quote $quote */ @@ -39,21 +80,21 @@ class WriteServiceTest extends WebapiAbstract $cartId = $quote->getId(); $serviceInfo = [ 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH . $cartId . '/items', + 'resourcePath' => self::RESOURCE_PATH . 'items', 'httpMethod' => RestConfig::HTTP_METHOD_POST, ], 'soap' => [ 'service' => self::SERVICE_NAME, 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'AddItem', + 'operation' => self::SERVICE_NAME . 'Save', ], ]; $requestData = [ - "cartId" => $cartId, - "data" => [ + "cartItem" => [ "sku" => $productSku, "qty" => 7, + "quote_id" => $cartId, ], ]; $this->_webApiCall($serviceInfo, $requestData); @@ -82,7 +123,7 @@ class WriteServiceTest extends WebapiAbstract 'soap' => [ 'service' => self::SERVICE_NAME, 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'RemoveItem', + 'operation' => self::SERVICE_NAME . 'DeleteById', ], ]; @@ -111,27 +152,38 @@ class WriteServiceTest extends WebapiAbstract $itemId = $quote->getItemByProduct($product)->getId(); $serviceInfo = [ 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH . $cartId . '/items/' . $itemId, + 'resourcePath' => self::RESOURCE_PATH . 'items/' . $itemId, 'httpMethod' => RestConfig::HTTP_METHOD_PUT, ], 'soap' => [ 'service' => self::SERVICE_NAME, 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'UpdateItem', + 'operation' => self::SERVICE_NAME . 'Save', ], ]; - $requestData = [ - "cartId" => $cartId, - "itemId" => $itemId, - "data" => [ - "qty" => 5, - ], - ]; - $this->assertTrue($this->_webApiCall($serviceInfo, $requestData)); + if (TESTS_WEB_API_ADAPTER == self::ADAPTER_SOAP) { + $requestData = [ + "cartItem" => [ + "qty" => 5, + "quote_id" => $cartId, + "itemId" => $itemId, + ], + ]; + } else { + $requestData = [ + "cartItem" => [ + "qty" => 5, + "quote_id" => $cartId, + ], + ]; + } + $this->_webApiCall($serviceInfo, $requestData); $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); $quote->load('test_order_item_with_items', 'reserved_order_id'); $this->assertTrue($quote->hasProductId(1)); - $this->assertEquals(5, $quote->getItemByProduct($product)->getQty()); + $item = $quote->getItemByProduct($product); + $this->assertEquals(5, $item->getQty()); + $this->assertEquals($itemId, $item->getItemId()); } } diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Item/ReaderServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Item/ReaderServiceTest.php deleted file mode 100644 index 1aabf10474c..00000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Item/ReaderServiceTest.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php -/** - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Item; - -use Magento\Checkout\Service\V1\Data\Cart\Item as Item; - -class ReaderServiceTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var ReadService - */ - protected $service; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteRepositoryMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $itemMapperMock; - - protected function setUp() - { - $this->quoteRepositoryMock = $this->getMock('Magento\Quote\Model\QuoteRepository', [], [], '', false); - $this->itemMapperMock = - $this->getMock('\Magento\Checkout\Service\V1\Data\Cart\ItemMapper', ['extractDto'], [], '', false); - $this->service = new ReadService($this->quoteRepositoryMock, $this->itemMapperMock); - } - - public function testGetList() - { - $quoteMock = $this->getMock('Magento\Quote\Model\Quote', [], [], '', false); - $this->quoteRepositoryMock->expects($this->once())->method('getActive') - ->with(33) - ->will($this->returnValue($quoteMock)); - $itemMock = $this->getMock('\Magento\Quote\Model\Quote\Item', - ['getSku', 'getName', 'getPrice', 'getQty', 'getProductType', '__wakeup'], [], '', false); - $quoteMock->expects($this->any())->method('getAllItems')->will($this->returnValue([$itemMock])); - $testData = [ - Item::ITEM_ID => 7, - Item::SKU => 'prd_SKU', - Item::NAME => 'prd_NAME', - Item::PRICE => 100.15, - Item::QTY => 16, - Item::PRODUCT_TYPE => 'simple', - ]; - - $this->itemMapperMock - ->expects($this->once()) - ->method('extractDto') - ->with($itemMock) - ->will($this->returnValue($testData)); - $this->assertEquals([$testData], $this->service->getList(33)); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Item/WriteServiceTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/Item/RepositoryTest.php similarity index 59% rename from dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Item/WriteServiceTest.php rename to dev/tests/unit/testsuite/Magento/Quote/Model/Quote/Item/RepositoryTest.php index ee0069f4135..8d814d30d59 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Item/WriteServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/Item/RepositoryTest.php @@ -5,14 +5,14 @@ * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\Item; +namespace Magento\Quote\Model\Quote\Item; -class WriteServiceTest extends \PHPUnit_Framework_TestCase +class RepositoryTest extends \PHPUnit_Framework_TestCase { /** - * @var WriteService + * @var Repository */ - protected $service; + protected $repository; /** * @var \PHPUnit_Framework_MockObject_MockObject @@ -44,19 +44,30 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase */ protected $quoteItemMock; + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $itemBuilderMock; + protected function setUp() { $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); $this->productRepositoryMock = $this->getMock('Magento\Catalog\Api\ProductRepositoryInterface', [], [], '', false); - $this->dataMock = $this->getMock('\Magento\Checkout\Service\V1\Data\Cart\Item', [], [], '', false); + $methods = ['setQuoteId', 'setItemId', 'create']; + $this->itemBuilderMock = $this->getMock('Magento\Quote\Api\Data\CartItemDataBuilder', $methods, [], '', false); + $this->dataMock = $this->getMock('Magento\Quote\Api\Data\CartItemInterface'); $this->quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); $this->productMock = $this->getMock('\Magento\Catalog\Model\Product', [], [], '', false); $this->quoteItemMock = - $this->getMock('\Magento\Quote\Model\Quote\Item', ['getId', 'setData', '__wakeUp'], [], '', false); + $this->getMock('Magento\Quote\Model\Quote\Item', ['getId', 'getSku', 'setData', '__wakeUp'], [], '', false); - $this->service = new WriteService($this->quoteRepositoryMock, $this->productRepositoryMock); + $this->repository = new Repository( + $this->quoteRepositoryMock, + $this->productRepositoryMock, + $this->itemBuilderMock + ); } /** @@ -65,12 +76,10 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase * @expectedExceptionMessage Invalid value of * @dataProvider addItemWithInvalidQtyDataProvider */ - public function testAddItemWithInvalidQty($value) + public function testSaveItemWithInvalidQty($value) { - $cartId = 12; $this->dataMock->expects($this->once())->method('getQty')->will($this->returnValue($value)); - - $this->service->addItem($cartId, $this->dataMock); + $this->repository->save($this->dataMock); } public function addItemWithInvalidQtyDataProvider() @@ -88,33 +97,37 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase /** * @expectedException \Magento\Framework\Exception\CouldNotSaveException - * @expectedExceptionMessage Could not add item to quote + * @expectedExceptionMessage Could not save quote */ - public function testAddItemCouldNotSaveException() + public function testSaveCouldNotSaveException() { $cartId = 13; $this->dataMock->expects($this->once())->method('getQty')->will($this->returnValue(12)); + $this->dataMock->expects($this->once())->method('getQuoteId')->willReturn($cartId); $this->quoteRepositoryMock->expects($this->once())->method('getActive') ->with($cartId)->will($this->returnValue($this->quoteMock)); $this->dataMock->expects($this->once())->method('getSku')->will($this->returnValue('product_sku')); + $this->dataMock->expects($this->once())->method('getItemId')->will($this->returnValue(null)); + $this->quoteMock->expects($this->never())->method('getItemById'); $this->productRepositoryMock->expects($this->once()) ->method('get')->with('product_sku')->will($this->returnValue($this->productMock)); $this->quoteMock->expects($this->once())->method('addProduct')->with($this->productMock, 12); $this->quoteMock->expects($this->once())->method('collectTotals')->will($this->returnValue($this->quoteMock)); - $exceptionMessage = 'Could not add item to quote'; + $exceptionMessage = 'Could not save quote'; $exception = new \Magento\Framework\Exception\CouldNotSaveException($exceptionMessage); $this->quoteRepositoryMock->expects($this->once()) ->method('save') ->with($this->quoteMock) ->willThrowException($exception); - $this->service->addItem($cartId, $this->dataMock); + $this->repository->save($this->dataMock); } - public function testAddItem() + public function testSave() { $cartId = 13; $this->dataMock->expects($this->once())->method('getQty')->will($this->returnValue(12)); + $this->dataMock->expects($this->once())->method('getQuoteId')->willReturn($cartId); $this->quoteRepositoryMock->expects($this->once()) ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); $this->productRepositoryMock->expects($this->once()) @@ -122,6 +135,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($this->productMock)); $this->dataMock->expects($this->once())->method('getSku'); $this->quoteMock->expects($this->once())->method('addProduct')->with($this->productMock, 12); + $this->quoteMock->expects($this->never())->method('getItemById'); $this->quoteMock->expects($this->once())->method('collectTotals')->will($this->returnValue($this->quoteMock)); $this->quoteRepositoryMock->expects($this->once())->method('save')->with($this->quoteMock); $this->quoteMock @@ -129,35 +143,8 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase ->method('getItemByProduct') ->with($this->productMock) ->will($this->returnValue($this->quoteItemMock)); - $this->quoteItemMock->expects($this->once())->method('getId')->will($this->returnValue(5)); - $this->assertEquals(5, $this->service->addItem($cartId, $this->dataMock)); - } - - /** - * @param null|string|bool|int|float $value - * @expectedException \Magento\Framework\Exception\InputException - * @expectedExceptionMessage Invalid value of - * @dataProvider updateItemWithInvalidQtyDataProvider - */ - public function testUpdateItemWithInvalidQty($value) - { - $cartId = 11; - $itemID = 'item_sku'; - $this->dataMock->expects($this->once())->method('getQty')->will($this->returnValue($value)); - $this->service->updateItem($cartId, $itemID, $this->dataMock); - } - - public function updateItemWithInvalidQtyDataProvider() - { - return [ - ['string'], - [0], - [''], - [null], - [-12], - [false], - [-13.1], - ]; + $this->dataMock->expects($this->once())->method('getItemId')->will($this->returnValue(null)); + $this->assertEquals($this->quoteItemMock, $this->repository->save($this->dataMock)); } /** @@ -169,81 +156,112 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase $cartId = 11; $itemId = 5; $this->dataMock->expects($this->once())->method('getQty')->will($this->returnValue(12)); + $this->dataMock->expects($this->once())->method('getQuoteId')->willReturn($cartId); + $this->dataMock->expects($this->once())->method('getItemId')->will($this->returnValue($itemId)); $this->quoteRepositoryMock->expects($this->once()) ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); $this->quoteMock->expects($this->once()) ->method('getItemById')->with($itemId)->will($this->returnValue(false)); $this->quoteItemMock->expects($this->never())->method('setData'); + $this->quoteItemMock->expects($this->never())->method('addProduct'); - $this->service->updateItem($cartId, $itemId, $this->dataMock); + $this->repository->save($this->dataMock); } /** * @expectedException \Magento\Framework\Exception\CouldNotSaveException - * @expectedExceptionMessage Could not update quote item + * @expectedExceptionMessage Could not save quote */ public function testUpdateItemWithCouldNotSaveException() { $cartId = 11; $itemId = 5; + $productSku = 'product_sku'; $this->dataMock->expects($this->once())->method('getQty')->will($this->returnValue(12)); + $this->dataMock->expects($this->once())->method('getItemId')->will($this->returnValue($itemId)); + $this->dataMock->expects($this->once())->method('getQuoteId')->willReturn($cartId); $this->quoteRepositoryMock->expects($this->once()) ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); $this->quoteMock->expects($this->once()) ->method('getItemById')->with($itemId)->will($this->returnValue($this->quoteItemMock)); $this->quoteItemMock->expects($this->once())->method('setData')->with('qty', 12); + $this->quoteItemMock->expects($this->once())->method('getSku')->willReturn($productSku); + $this->productRepositoryMock + ->expects($this->once()) + ->method('get') + ->with($productSku) + ->willReturn($this->productMock); $this->quoteMock->expects($this->once())->method('collectTotals')->will($this->returnValue($this->quoteMock)); - $exceptionMessage = 'Could not update quote item'; + $this->quoteItemMock->expects($this->never())->method('addProduct'); + $exceptionMessage = 'Could not save quote'; $exception = new \Magento\Framework\Exception\CouldNotSaveException($exceptionMessage); $this->quoteRepositoryMock->expects($this->once()) ->method('save') ->with($this->quoteMock) ->willThrowException($exception); - $this->service->updateItem($cartId, $itemId, $this->dataMock); + $this->repository->save($this->dataMock); } public function testUpdateItem() { $cartId = 11; $itemId = 5; + $productSku = 'product_sku'; $this->dataMock->expects($this->once())->method('getQty')->will($this->returnValue(12)); + $this->dataMock->expects($this->once())->method('getItemId')->will($this->returnValue($itemId)); + $this->dataMock->expects($this->once())->method('getQuoteId')->willReturn($cartId); $this->quoteRepositoryMock->expects($this->once()) ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); $this->quoteMock->expects($this->once()) ->method('getItemById')->with($itemId)->will($this->returnValue($this->quoteItemMock)); $this->quoteItemMock->expects($this->once())->method('setData')->with('qty', 12); + $this->quoteItemMock->expects($this->once())->method('getSku')->willReturn($productSku); + $this->productRepositoryMock + ->expects($this->once()) + ->method('get') + ->with($productSku) + ->willReturn($this->productMock); + $this->quoteItemMock->expects($this->never())->method('addProduct'); $this->quoteMock->expects($this->once())->method('collectTotals')->will($this->returnValue($this->quoteMock)); $this->quoteRepositoryMock->expects($this->once())->method('save')->with($this->quoteMock); - - $this->assertTrue($this->service->updateItem($cartId, $itemId, $this->dataMock)); + $this->quoteMock + ->expects($this->once()) + ->method('getItemByProduct') + ->with($this->productMock) + ->willReturn($this->quoteItemMock); + $this->assertEquals($this->quoteItemMock, $this->repository->save($this->dataMock)); } /** * @expectedException \Magento\Framework\Exception\NoSuchEntityException * @expectedExceptionMessage Cart 11 doesn't contain item 5 */ - public function testRemoveItemWithInvalidQuoteItem() + public function testDeleteWithInvalidQuoteItem() { $cartId = 11; $itemId = 5; + $this->dataMock->expects($this->once())->method('getQuoteId')->willReturn($cartId); + $this->dataMock->expects($this->once())->method('getItemId')->willReturn($itemId); $this->quoteRepositoryMock->expects($this->once()) ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); $this->quoteMock->expects($this->once()) ->method('getItemById')->with($itemId)->will($this->returnValue(false)); $this->quoteMock->expects($this->never())->method('removeItem'); - $this->service->removeItem($cartId, $itemId, $this->dataMock); + $this->repository->delete($this->dataMock); } /** * @expectedException \Magento\Framework\Exception\CouldNotSaveException * @expectedExceptionMessage Could not remove item from quote */ - public function testRemoveItemWithCouldNotSaveException() + public function testDeleteWithCouldNotSaveException() { $cartId = 11; $itemId = 5; + $this->dataMock->expects($this->once())->method('getQuoteId')->willReturn($cartId); + $this->dataMock->expects($this->once())->method('getItemId')->willReturn($itemId); $this->quoteRepositoryMock->expects($this->once()) ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); $this->quoteMock->expects($this->once()) @@ -258,13 +276,47 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase ->with($this->quoteMock) ->willThrowException($exception); - $this->service->removeItem($cartId, $itemId, $this->dataMock); + $this->repository->delete($this->dataMock); + } + + public function testDelete() + { + $cartId = 11; + $itemId = 5; + $this->dataMock->expects($this->once())->method('getQuoteId')->willReturn($cartId); + $this->dataMock->expects($this->once())->method('getItemId')->willReturn($itemId); + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); + $this->quoteMock->expects($this->once()) + ->method('getItemById')->with($itemId)->will($this->returnValue($this->quoteItemMock)); + $this->quoteMock->expects($this->once())->method('removeItem'); + $this->quoteMock->expects($this->once())->method('collectTotals')->will($this->returnValue($this->quoteMock)); + $this->quoteRepositoryMock->expects($this->once())->method('save')->with($this->quoteMock); + + $this->repository->delete($this->dataMock); + } + + public function testGetList() + { + $quoteMock = $this->getMock('Magento\Quote\Model\Quote', [], [], '', false); + $this->quoteRepositoryMock->expects($this->once())->method('getActive') + ->with(33) + ->will($this->returnValue($quoteMock)); + $itemMock = $this->getMock('\Magento\Quote\Model\Quote\Item', [], [], '', false); + $quoteMock->expects($this->any())->method('getAllItems')->will($this->returnValue([$itemMock])); + + $this->assertEquals([$itemMock], $this->repository->getList(33)); } - public function testRemoveItem() + public function testDeleteById() { $cartId = 11; $itemId = 5; + $this->itemBuilderMock->expects($this->once())->method('setQuoteId')->with($cartId)->willReturnSelf(); + $this->itemBuilderMock->expects($this->once())->method('setItemId')->with($itemId)->willReturnSelf(); + $this->itemBuilderMock->expects($this->once())->method('create')->willReturn($this->dataMock); + $this->dataMock->expects($this->once())->method('getQuoteId')->willReturn($cartId); + $this->dataMock->expects($this->once())->method('getItemId')->willReturn($itemId); $this->quoteRepositoryMock->expects($this->once()) ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); $this->quoteMock->expects($this->once()) @@ -273,6 +325,6 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase $this->quoteMock->expects($this->once())->method('collectTotals')->will($this->returnValue($this->quoteMock)); $this->quoteRepositoryMock->expects($this->once())->method('save')->with($this->quoteMock); - $this->assertTrue($this->service->removeItem($cartId, $itemId, $this->dataMock)); + $this->assertTrue($this->repository->deleteById($cartId, $itemId)); } } -- GitLab From 860210a408742e93a8103b08ed1354bc8eb89fab Mon Sep 17 00:00:00 2001 From: Olexii Korshenko <okorshenko@ebay.com> Date: Wed, 14 Jan 2015 15:52:03 +0200 Subject: [PATCH 030/114] MAGETWO-32537: Implement Checkout Shipping Methods related interfaces - moved classes from Checkout to Quote namespace --- app/code/Magento/Checkout/etc/di.xml | 2 -- app/code/Magento/Checkout/etc/webapi.xml | 18 ------------ .../Api/Data/ShippingMethodInterface.php | 5 +--- .../Api/ShippingMethodManagementInterface.php | 6 ++-- .../Model/Cart/ShippingMethod.php | 4 +-- .../Model/Cart/ShippingMethodConverter.php | 9 +++--- .../Model/ShippingMethodManagement.php | 19 ++++++------- app/code/Magento/Quote/etc/di.xml | 2 ++ app/code/Magento/Quote/etc/webapi.xml | 28 +++++++++++++++++++ .../Api/ShippingMethodManagementTest.php | 10 +++---- .../Cart/ShippingMethodConverterTest.php | 8 +++--- .../Model/ShippingMethodManagementTest.php | 10 +++---- 12 files changed, 63 insertions(+), 58 deletions(-) rename app/code/Magento/{Checkout => Quote}/Api/Data/ShippingMethodInterface.php (94%) rename app/code/Magento/{Checkout => Quote}/Api/ShippingMethodManagementInterface.php (88%) rename app/code/Magento/{Checkout => Quote}/Model/Cart/ShippingMethod.php (95%) rename app/code/Magento/{Checkout => Quote}/Model/Cart/ShippingMethodConverter.php (86%) rename app/code/Magento/{Checkout => Quote}/Model/ShippingMethodManagement.php (90%) create mode 100644 app/code/Magento/Quote/etc/webapi.xml rename dev/tests/api-functional/testsuite/Magento/{Checkout => Quote}/Api/ShippingMethodManagementTest.php (96%) rename dev/tests/unit/testsuite/Magento/{Checkout => Quote}/Model/Cart/ShippingMethodConverterTest.php (93%) rename dev/tests/unit/testsuite/Magento/{Checkout => Quote}/Model/ShippingMethodManagementTest.php (98%) diff --git a/app/code/Magento/Checkout/etc/di.xml b/app/code/Magento/Checkout/etc/di.xml index a12a460cbd8..d3feb090aaf 100644 --- a/app/code/Magento/Checkout/etc/di.xml +++ b/app/code/Magento/Checkout/etc/di.xml @@ -32,10 +32,8 @@ <preference for="\Magento\Checkout\Service\V1\Cart\WriteServiceInterface" type="Magento\Checkout\Service\V1\Cart\WriteService" /> <preference for="Magento\Checkout\Service\V1\Coupon\ReadServiceInterface" type="Magento\Checkout\Service\V1\Coupon\ReadService" /> <preference for="Magento\Checkout\Service\V1\Coupon\WriteServiceInterface" type="Magento\Checkout\Service\V1\Coupon\WriteService" /> - <preference for="Magento\Checkout\Api\ShippingMethodManagementInterface" type="Magento\Checkout\Model\ShippingMethodManagement" /> <preference for="Magento\Checkout\Service\V1\PaymentMethod\ReadServiceInterface" type="\Magento\Checkout\Service\V1\PaymentMethod\ReadService" /> <preference for="Magento\Checkout\Service\V1\PaymentMethod\WriteServiceInterface" type="\Magento\Checkout\Service\V1\PaymentMethod\WriteService" /> - <preference for="Magento\Checkout\Api\Data\ShippingMethodInterface" type="Magento\Checkout\Model\Cart\ShippingMethod" /> <preference for="Magento\Checkout\Api\PaymentMethodManagementInterface" type="\Magento\Checkout\Model\PaymentMethodManagement" /> <preference for="Magento\Checkout\Api\Data\PaymentInterface" type="\Magento\Quote\Model\Quote\Payment" /> <preference for="Magento\Checkout\Api\Data\PaymentMethodInterface" type="\Magento\Checkout\Model\Cart\PaymentMethod" /> diff --git a/app/code/Magento/Checkout/etc/webapi.xml b/app/code/Magento/Checkout/etc/webapi.xml index 821001e5f9f..102fcc793df 100644 --- a/app/code/Magento/Checkout/etc/webapi.xml +++ b/app/code/Magento/Checkout/etc/webapi.xml @@ -61,24 +61,6 @@ <resource ref="Magento_Sales::sales" /> </resources> </route> - <route url="/V1/carts/:cartId/selected-shipping-method" method="PUT"> - <service class="Magento\Checkout\Api\ShippingMethodManagementInterface" method="set"/> - <resources> - <resource ref="Magento_Sales::sales" /> - </resources> - </route> - <route url="/V1/carts/:cartId/selected-shipping-method" method="GET"> - <service class="Magento\Checkout\Api\ShippingMethodManagementInterface" method="get"/> - <resources> - <resource ref="Magento_Sales::sales" /> - </resources> - </route> - <route url="/V1/carts/:cartId/shipping-methods" method="GET"> - <service class="Magento\Checkout\Api\ShippingMethodManagementInterface" method="getList"/> - <resources> - <resource ref="Magento_Sales::sales" /> - </resources> - </route> <route url="/V1/carts/:cartId/coupons" method="GET"> <service class="Magento\Checkout\Service\V1\Coupon\ReadServiceInterface" method="get"/> <resources> diff --git a/app/code/Magento/Checkout/Api/Data/ShippingMethodInterface.php b/app/code/Magento/Quote/Api/Data/ShippingMethodInterface.php similarity index 94% rename from app/code/Magento/Checkout/Api/Data/ShippingMethodInterface.php rename to app/code/Magento/Quote/Api/Data/ShippingMethodInterface.php index 5af5f896f0a..de59f648042 100644 --- a/app/code/Magento/Checkout/Api/Data/ShippingMethodInterface.php +++ b/app/code/Magento/Quote/Api/Data/ShippingMethodInterface.php @@ -3,11 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api\Data; +namespace Magento\Quote\Api\Data; -/** - * @see \Magento\Checkout\Service\V1\Data\Cart\ShippingMethod - */ interface ShippingMethodInterface extends \Magento\Framework\Api\ExtensibleDataInterface { /** diff --git a/app/code/Magento/Checkout/Api/ShippingMethodManagementInterface.php b/app/code/Magento/Quote/Api/ShippingMethodManagementInterface.php similarity index 88% rename from app/code/Magento/Checkout/Api/ShippingMethodManagementInterface.php rename to app/code/Magento/Quote/Api/ShippingMethodManagementInterface.php index 5edd8e06270..47b10d540b1 100644 --- a/app/code/Magento/Checkout/Api/ShippingMethodManagementInterface.php +++ b/app/code/Magento/Quote/Api/ShippingMethodManagementInterface.php @@ -3,7 +3,7 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api; +namespace Magento\Quote\Api; interface ShippingMethodManagementInterface { @@ -25,7 +25,7 @@ interface ShippingMethodManagementInterface * Returns selected shipping method for a specified quote. * * @param int $cartId The shopping cart ID. - * @return \Magento\Checkout\Api\Data\ShippingMethodInterface|null Shipping method. + * @return \Magento\Quote\Api\Data\ShippingMethodInterface|null Shipping method. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified shopping cart does not exist. * @throws \Magento\Framework\Exception\StateException The shipping address is not set. */ @@ -35,7 +35,7 @@ interface ShippingMethodManagementInterface * Lists applicable shipping methods for a specified quote. * * @param int $cartId The shopping cart ID. - * @return \Magento\Checkout\Api\Data\ShippingMethodInterface[] An array of shipping methods. + * @return \Magento\Quote\Api\Data\ShippingMethodInterface[] An array of shipping methods. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified quote does not exist. * @throws \Magento\Framework\Exception\StateException The shipping address is not set. */ diff --git a/app/code/Magento/Checkout/Model/Cart/ShippingMethod.php b/app/code/Magento/Quote/Model/Cart/ShippingMethod.php similarity index 95% rename from app/code/Magento/Checkout/Model/Cart/ShippingMethod.php rename to app/code/Magento/Quote/Model/Cart/ShippingMethod.php index daa6b6f8a12..ad19b14bca0 100644 --- a/app/code/Magento/Checkout/Model/Cart/ShippingMethod.php +++ b/app/code/Magento/Quote/Model/Cart/ShippingMethod.php @@ -3,9 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Model\Cart; +namespace Magento\Quote\Model\Cart; -use Magento\Checkout\Api\Data\ShippingMethodInterface; +use Magento\Quote\Api\Data\ShippingMethodInterface; /** * Quote shipping method data. diff --git a/app/code/Magento/Checkout/Model/Cart/ShippingMethodConverter.php b/app/code/Magento/Quote/Model/Cart/ShippingMethodConverter.php similarity index 86% rename from app/code/Magento/Checkout/Model/Cart/ShippingMethodConverter.php rename to app/code/Magento/Quote/Model/Cart/ShippingMethodConverter.php index 9e14243fce6..6a41f4a20ab 100644 --- a/app/code/Magento/Checkout/Model/Cart/ShippingMethodConverter.php +++ b/app/code/Magento/Quote/Model/Cart/ShippingMethodConverter.php @@ -3,30 +3,29 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Model\Cart; +namespace Magento\Quote\Model\Cart; /** * Quote shipping method data. * - * @codeCoverageIgnore */ class ShippingMethodConverter { /** * Shipping method builder. * - * @var \Magento\Checkout\Api\Data\ShippingMethodDataBuilder + * @var \Magento\Quote\Api\Data\ShippingMethodDataBuilder */ protected $builder; /** * Constructs a shipping method builder object. * - * @param \Magento\Checkout\Api\Data\ShippingMethodDataBuilder $builder Shipping method builder. + * @param \Magento\Quote\Api\Data\ShippingMethodDataBuilder $builder Shipping method builder. * @param \Magento\Store\Model\StoreManagerInterface $storeManager Store manager interface. */ public function __construct( - \Magento\Checkout\Api\Data\ShippingMethodDataBuilder $builder, + \Magento\Quote\Api\Data\ShippingMethodDataBuilder $builder, \Magento\Store\Model\StoreManagerInterface $storeManager ) { $this->builder = $builder; diff --git a/app/code/Magento/Checkout/Model/ShippingMethodManagement.php b/app/code/Magento/Quote/Model/ShippingMethodManagement.php similarity index 90% rename from app/code/Magento/Checkout/Model/ShippingMethodManagement.php rename to app/code/Magento/Quote/Model/ShippingMethodManagement.php index f62969bd5e5..d93eb6c86e8 100644 --- a/app/code/Magento/Checkout/Model/ShippingMethodManagement.php +++ b/app/code/Magento/Quote/Model/ShippingMethodManagement.php @@ -4,15 +4,14 @@ * See COPYING.txt for license details. */ -namespace Magento\Checkout\Model; +namespace Magento\Quote\Model; use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\StateException; -use Magento\Quote\Model\QuoteRepository; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Exception\CouldNotSaveException; -use Magento\Checkout\Api\ShippingMethodManagementInterface; -use Magento\Checkout\Api\Data\ShippingMethodInterface; +use Magento\Quote\Api\ShippingMethodManagementInterface; +use Magento\Quote\Api\Data\ShippingMethodInterface; /** @@ -30,14 +29,14 @@ class ShippingMethodManagement implements ShippingMethodManagementInterface /** * Shipping method builder. * - * @var \Magento\Checkout\Api\Data\ShippingMethodDataBuilder + * @var \Magento\Quote\Api\Data\ShippingMethodDataBuilder */ protected $methodBuilder; /** * Shipping method converter * - * @var \Magento\Checkout\Model\Cart\ShippingMethodConverter + * @var \Magento\Quote\Model\Cart\ShippingMethodConverter */ protected $converter; @@ -45,13 +44,13 @@ class ShippingMethodManagement implements ShippingMethodManagementInterface * Constructs a shipping method read service object. * * @param QuoteRepository $quoteRepository Quote repository. - * @param \Magento\Checkout\Api\Data\ShippingMethodDataBuilder $methodBuilder Shipping method builder. - * @param \Magento\Checkout\Model\Cart\ShippingMethodConverter $converter Shipping method builder converter. + * @param \Magento\Quote\Api\Data\ShippingMethodDataBuilder $methodBuilder Shipping method builder. + * @param \Magento\Quote\Model\Cart\ShippingMethodConverter $converter Shipping method builder converter. */ public function __construct( QuoteRepository $quoteRepository, - \Magento\Checkout\Api\Data\ShippingMethodDataBuilder $methodBuilder, - \Magento\Checkout\Model\Cart\ShippingMethodConverter $converter + \Magento\Quote\Api\Data\ShippingMethodDataBuilder $methodBuilder, + Cart\ShippingMethodConverter $converter ) { $this->quoteRepository = $quoteRepository; $this->methodBuilder = $methodBuilder; diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index 55c9a296bbe..4ca0e5cafd6 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -6,6 +6,8 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> + <preference for="Magento\Quote\Api\ShippingMethodManagementInterface" type="Magento\Quote\Model\ShippingMethodManagement" /> + <preference for="Magento\Quote\Api\Data\ShippingMethodInterface" type="Magento\Quote\Model\Cart\ShippingMethod" /> <type name="Magento\Framework\Module\Updater\SetupFactory"> <arguments> <argument name="resourceTypes" xsi:type="array"> diff --git a/app/code/Magento/Quote/etc/webapi.xml b/app/code/Magento/Quote/etc/webapi.xml new file mode 100644 index 00000000000..ca75c18f11d --- /dev/null +++ b/app/code/Magento/Quote/etc/webapi.xml @@ -0,0 +1,28 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../app/code/Magento/Webapi/etc/webapi.xsd"> + <route url="/V1/carts/:cartId/selected-shipping-method" method="PUT"> + <service class="Magento\Quote\Api\ShippingMethodManagementInterface" method="set"/> + <resources> + <resource ref="Magento_Sales::sales" /> + </resources> + </route> + <route url="/V1/carts/:cartId/selected-shipping-method" method="GET"> + <service class="Magento\Quote\Api\ShippingMethodManagementInterface" method="get"/> + <resources> + <resource ref="Magento_Sales::sales" /> + </resources> + </route> + <route url="/V1/carts/:cartId/shipping-methods" method="GET"> + <service class="Magento\Quote\Api\ShippingMethodManagementInterface" method="getList"/> + <resources> + <resource ref="Magento_Sales::sales" /> + </resources> + </route> +</routes> diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Api/ShippingMethodManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/ShippingMethodManagementTest.php similarity index 96% rename from dev/tests/api-functional/testsuite/Magento/Checkout/Api/ShippingMethodManagementTest.php rename to dev/tests/api-functional/testsuite/Magento/Quote/Api/ShippingMethodManagementTest.php index 6278c7183c1..248e66551e3 100644 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Api/ShippingMethodManagementTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/ShippingMethodManagementTest.php @@ -3,17 +3,17 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api; +namespace Magento\Quote\Api; use Magento\TestFramework\ObjectManager; use Magento\TestFramework\TestCase\WebapiAbstract; -use Magento\Checkout\Api\Data\ShippingMethodInterface; +use Magento\Quote\Api\Data\ShippingMethodInterface; use Magento\Webapi\Model\Rest\Config as RestConfig; class ShippingMethodManagementTest extends WebapiAbstract { const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'checkoutShippingMethodManagementV1'; + const SERVICE_NAME = 'quoteShippingMethodManagementV1'; const RESOURCE_PATH = '/V1/carts/'; /** @@ -247,8 +247,8 @@ class ShippingMethodManagementTest extends WebapiAbstract protected function convertRates($groupedRates, $currencyCode) { $result = []; - /** @var \Magento\Checkout\Model\Cart\ShippingMethodConverter $converter */ - $converter = $this->objectManager->create('\Magento\Checkout\Model\Cart\ShippingMethodConverter'); + /** @var \Magento\Quote\Model\Cart\ShippingMethodConverter $converter */ + $converter = $this->objectManager->create('\Magento\Quote\Model\Cart\ShippingMethodConverter'); foreach ($groupedRates as $carrierRates) { foreach ($carrierRates as $rate) { $result[] = $converter->modelToDataObject($rate, $currencyCode)->__toArray(); diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/ShippingMethodConverterTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/Cart/ShippingMethodConverterTest.php similarity index 93% rename from dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/ShippingMethodConverterTest.php rename to dev/tests/unit/testsuite/Magento/Quote/Model/Cart/ShippingMethodConverterTest.php index b6ca0e167c9..2932b655210 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/ShippingMethodConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/Cart/ShippingMethodConverterTest.php @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ -namespace Magento\Checkout\Model\Cart; +namespace Magento\Quote\Model\Cart; class ShippingMethodConverterTest extends \PHPUnit_Framework_TestCase { @@ -48,7 +48,7 @@ class ShippingMethodConverterTest extends \PHPUnit_Framework_TestCase { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $this->builderMock = $this->getMock( - '\Magento\Checkout\Api\Data\ShippingMethodDataBuilder', + '\Magento\Quote\Api\Data\ShippingMethodDataBuilder', ['populateWithArray', 'create'], [], '', @@ -57,7 +57,7 @@ class ShippingMethodConverterTest extends \PHPUnit_Framework_TestCase $this->storeManagerMock = $this->getMock('\Magento\Store\Model\StoreManagerInterface'); $this->currencyMock = $this->getMock('\Magento\Directory\Model\Currency', [], [], '', false); $this->shippingMethodMock = - $this->getMock('\Magento\Checkout\Model\Cart\ShippingMethod', [], [], '', false); + $this->getMock('\Magento\Quote\Model\Cart\ShippingMethod', [], [], '', false); $this->rateModelMock = $this->getMock('\Magento\Quote\Model\Quote\Address\Rate', [ 'getPrice', @@ -73,7 +73,7 @@ class ShippingMethodConverterTest extends \PHPUnit_Framework_TestCase $this->storeMock = $this->getMock('\Magento\Store\Model\Store', [], [], '', false); $this->converter = $objectManager->getObject( - 'Magento\Checkout\Model\Cart\ShippingMethodConverter', + 'Magento\Quote\Model\Cart\ShippingMethodConverter', [ 'builder' => $this->builderMock, 'storeManager' => $this->storeManagerMock, diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/ShippingMethodManagementTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/ShippingMethodManagementTest.php similarity index 98% rename from dev/tests/unit/testsuite/Magento/Checkout/Model/ShippingMethodManagementTest.php rename to dev/tests/unit/testsuite/Magento/Quote/Model/ShippingMethodManagementTest.php index fd0a2df6909..e9e69c90ea8 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/ShippingMethodManagementTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/ShippingMethodManagementTest.php @@ -5,9 +5,9 @@ * See COPYING.txt for license details. */ -namespace Magento\Checkout\Model; +namespace Magento\Quote\Model; -use Magento\Checkout\Api\Data\ShippingMethodInterface; +use Magento\Quote\Api\Data\ShippingMethodInterface; use Magento\TestFramework\Helper\ObjectManager; class ShippingMethodManagementTest extends \PHPUnit_Framework_TestCase @@ -52,7 +52,7 @@ class ShippingMethodManagementTest extends \PHPUnit_Framework_TestCase $this->objectManager = new ObjectManager($this); $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); $this->methodBuilderMock = $this->getMock( - '\Magento\Checkout\Api\Data\ShippingMethodDataBuilder', + '\Magento\Quote\Api\Data\ShippingMethodDataBuilder', ['populateWithArray', 'create'], [], '', @@ -94,7 +94,7 @@ class ShippingMethodManagementTest extends \PHPUnit_Framework_TestCase false ); $this->converterMock = $this->getMock( - '\Magento\Checkout\Model\Cart\ShippingMethodConverter', + '\Magento\Quote\Model\Cart\ShippingMethodConverter', [], [], '', @@ -102,7 +102,7 @@ class ShippingMethodManagementTest extends \PHPUnit_Framework_TestCase ); $this->model = $this->objectManager->getObject( - 'Magento\Checkout\Model\ShippingMethodManagement', + 'Magento\Quote\Model\ShippingMethodManagement', [ 'quoteRepository' => $this->quoteRepositoryMock, 'methodBuilder' => $this->methodBuilderMock, -- GitLab From 5474a06b8b81c3f618a74bcdb6b2bcf87d26dfab Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Wed, 14 Jan 2015 16:00:58 +0200 Subject: [PATCH 031/114] MAGETWO-32498: Implement Checkout Agreement interfaces --- .../CheckoutAgreements/Model/Agreement.php | 80 ++++++++++++++----- 1 file changed, 62 insertions(+), 18 deletions(-) diff --git a/app/code/Magento/CheckoutAgreements/Model/Agreement.php b/app/code/Magento/CheckoutAgreements/Model/Agreement.php index 8a565ffb74e..b7084b0cac6 100644 --- a/app/code/Magento/CheckoutAgreements/Model/Agreement.php +++ b/app/code/Magento/CheckoutAgreements/Model/Agreement.php @@ -5,24 +5,10 @@ */ namespace Magento\CheckoutAgreements\Model; -/** - * @method \Magento\CheckoutAgreements\Model\Resource\Agreement _getResource() - * @method \Magento\CheckoutAgreements\Model\Resource\Agreement getResource() - * @method string getName() - * @method \Magento\CheckoutAgreements\Model\Agreement setName(string $value) - * @method string getContent() - * @method \Magento\CheckoutAgreements\Model\Agreement setContent(string $value) - * @method string getContentHeight() - * @method \Magento\CheckoutAgreements\Model\Agreement setContentHeight(string $value) - * @method string getCheckboxText() - * @method \Magento\CheckoutAgreements\Model\Agreement setCheckboxText(string $value) - * @method int getIsActive() - * @method \Magento\CheckoutAgreements\Model\Agreement setIsActive(int $value) - * @method int getIsHtml() - * @method \Magento\CheckoutAgreements\Model\Agreement setIsHtml(int $value) - * - */ -class Agreement extends \Magento\Framework\Model\AbstractModel +use Magento\CheckoutAgreements\Api\Data\AgreementInterface; +use Magento\Framework\Model\AbstractExtensibleModel; + +class Agreement extends AbstractExtensibleModel implements AgreementInterface { /** * Allowed CSS units for height field @@ -77,4 +63,62 @@ class Agreement extends \Magento\Framework\Model\AbstractModel return parent::beforeSave(); } + + //@codeCoverageIgnoreStart + /** + * @inheritdoc + */ + public function getId() + { + return $this->getData('agreement_id'); + } + + /** + * @inheritdoc + */ + public function getName() + { + return $this->getData('name'); + } + + /** + * @inheritdoc + */ + public function getContent() + { + return $this->getData('content'); + } + + /** + * @inheritdoc + */ + public function getContentHeight() + { + return $this->getData('content_height'); + } + + /** + * @inheritdoc + */ + public function getCheckboxText() + { + return $this->getData('checkbox_text'); + } + + /** + * @inheritdoc + */ + public function getIsActive() + { + return $this->getData('is_active'); + } + + /** + * @inheritdoc + */ + public function getIsHtml() + { + return $this->getData('is_html'); + } + //@codeCoverageIgnoreEnd } -- GitLab From e46023b2785127fd424e4f89a0aa15400a37b15b Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Wed, 14 Jan 2015 16:02:04 +0200 Subject: [PATCH 032/114] MAGETWO-32498: Implement Checkout Agreement interfaces --- .../CheckoutAgreementsRepository.php} | 40 +++--- .../V1/Agreement/ReadServiceInterface.php | 21 --- .../Service/V1/Data/Agreement.php | 122 ------------------ .../Service/V1/Data/AgreementBuilder.php | 93 ------------- .../Magento/CheckoutAgreements/etc/di.xml | 3 +- .../Magento/CheckoutAgreements/etc/webapi.xml | 2 +- .../Api/CheckoutAgreementsRepositoryTest.php | 85 ++++++++++++ .../CheckoutAgreementsRepositoryTest.php} | 18 +-- 8 files changed, 117 insertions(+), 267 deletions(-) rename app/code/Magento/CheckoutAgreements/{Service/V1/Agreement/ReadService.php => Model/CheckoutAgreementsRepository.php} (64%) delete mode 100644 app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceInterface.php delete mode 100644 app/code/Magento/CheckoutAgreements/Service/V1/Data/Agreement.php delete mode 100644 app/code/Magento/CheckoutAgreements/Service/V1/Data/AgreementBuilder.php create mode 100644 dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php rename dev/tests/unit/testsuite/Magento/CheckoutAgreements/{Service/V1/Agreement/ReadServiceTest.php => Model/CheckoutAgreementsRepositoryTest.php} (91%) diff --git a/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadService.php b/app/code/Magento/CheckoutAgreements/Model/CheckoutAgreementsRepository.php similarity index 64% rename from app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadService.php rename to app/code/Magento/CheckoutAgreements/Model/CheckoutAgreementsRepository.php index 9dec4550693..a5f249bccb6 100644 --- a/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadService.php +++ b/app/code/Magento/CheckoutAgreements/Model/CheckoutAgreementsRepository.php @@ -3,21 +3,21 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\CheckoutAgreements\Service\V1\Agreement; +namespace Magento\CheckoutAgreements\Model; -use \Magento\CheckoutAgreements\Model\Resource\Agreement\CollectionFactory as AgreementCollectionFactory; -use \Magento\CheckoutAgreements\Model\Resource\Agreement\Collection as AgreementCollection; -use \Magento\CheckoutAgreements\Model\Agreement; -use \Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\CheckoutAgreements\Model\Resource\Agreement\CollectionFactory as AgreementCollectionFactory; +use Magento\CheckoutAgreements\Model\Resource\Agreement\Collection as AgreementCollection; +use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Store\Model\StoreManagerInterface; -use \Magento\Store\Model\ScopeInterface; -use \Magento\CheckoutAgreements\Service\V1\Data\AgreementBuilder; -use \Magento\CheckoutAgreements\Service\V1\Data\Agreement as AgreementDataObject; +use Magento\Store\Model\ScopeInterface; +use Magento\CheckoutAgreements\Api\Data\AgreementDataBuilder; +use Magento\CheckoutAgreements\Model\Agreement as AgreementDataObject; +use Magento\CheckoutAgreements\Api\CheckoutAgreementsRepositoryInterface; /** * Checkout agreement service. */ -class ReadService implements ReadServiceInterface +class CheckoutAgreementsRepository implements CheckoutAgreementsRepositoryInterface { /** * Collection factory. @@ -29,7 +29,7 @@ class ReadService implements ReadServiceInterface /** * Agreement builder. * - * @var AgreementBuilder + * @var AgreementDataBuilder */ private $agreementBuilder; @@ -51,13 +51,13 @@ class ReadService implements ReadServiceInterface * Constructs a checkout agreement service object. * * @param AgreementCollectionFactory $collectionFactory Collection factory. - * @param AgreementBuilder $agreementBuilder Agreement builder. + * @param AgreementDataBuilder $agreementBuilder Agreement builder. * @param \Magento\Store\Model\StoreManagerInterface $storeManager Store manager. * @param ScopeConfigInterface $scopeConfig Scope config. */ public function __construct( AgreementCollectionFactory $collectionFactory, - AgreementBuilder $agreementBuilder, + AgreementDataBuilder $agreementBuilder, StoreManagerInterface $storeManager, ScopeConfigInterface $scopeConfig ) { @@ -70,7 +70,7 @@ class ReadService implements ReadServiceInterface /** * {@inheritdoc} * - * @return array|\Magento\CheckoutAgreements\Service\V1\Data\Agreement[] Array of checkout agreement service objects. + * @return \Magento\CheckoutAgreements\Api\Data\AgreementInterface[] Array of checkout agreement service objects. */ public function getList() { @@ -100,13 +100,13 @@ class ReadService implements ReadServiceInterface protected function createAgreementDataObject(Agreement $agreement) { $this->agreementBuilder->populateWithArray([ - AgreementDataObject::ID => $agreement->getId(), - AgreementDataObject::NAME => $agreement->getName(), - AgreementDataObject::CONTENT => $agreement->getContent(), - AgreementDataObject::CONTENT_HEIGHT => $agreement->getContentHeight(), - AgreementDataObject::CHECKBOX_TEXT => $agreement->getCheckboxText(), - AgreementDataObject::ACTIVE => (bool)$agreement->getIsActive(), - AgreementDataObject::HTML => (bool)$agreement->getIsHtml(), + 'id' => $agreement->getId(), + 'name' => $agreement->getName(), + 'content' => $agreement->getContent(), + 'content_height' => $agreement->getContentHeight(), + 'checkbox_text' => $agreement->getCheckboxText(), + 'is_active' => (bool)$agreement->getIsActive(), + 'is_html' => (bool)$agreement->getIsHtml(), ]); return $this->agreementBuilder->create(); } diff --git a/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceInterface.php b/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceInterface.php deleted file mode 100644 index a9df293fce8..00000000000 --- a/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceInterface.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\CheckoutAgreements\Service\V1\Agreement; - -/** - * Checkout agreement service interface. - */ -interface ReadServiceInterface -{ - /** - * Lists active checkout agreements. - * - * @return \Magento\CheckoutAgreements\Service\V1\Data\Agreement[] Array of active checkout agreements. - * @deprecated - * @see \app\code\Magento\CheckoutAgreements\Api\CheckoutAgreementsRepositoryInterface::getList - */ - public function getList(); -} diff --git a/app/code/Magento/CheckoutAgreements/Service/V1/Data/Agreement.php b/app/code/Magento/CheckoutAgreements/Service/V1/Data/Agreement.php deleted file mode 100644 index 52275580119..00000000000 --- a/app/code/Magento/CheckoutAgreements/Service/V1/Data/Agreement.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\CheckoutAgreements\Service\V1\Data; - -use Magento\Framework\Api\AbstractExtensibleObject; - -/** - * Checkout agreement data object. - * - * @codeCoverageIgnore - */ -class Agreement extends AbstractExtensibleObject -{ - /** - * Agreement ID. - */ - const ID = 'id'; - - /** - * Agreement name. - */ - const NAME = 'name'; - - /** - * Agreement content. - */ - const CONTENT = 'content'; - - /** - * Agreement content height. Optional CSS property. - */ - const CONTENT_HEIGHT = 'content_height'; - - /** - * Agreement checkbox text. Caption of UI component. - */ - const CHECKBOX_TEXT = 'checkbox_text'; - - /** - * Agreement status. - */ - const ACTIVE = 'active'; - - /** - * Agreement content type. True is HTML. False is plain text. - */ - const HTML = 'html'; - - /** - * Returns the agreement ID. - * - * @return int Agreement ID. - */ - public function getId() - { - return $this->_get(self::ID); - } - - /** - * Returns the agreement name. - * - * @return string Agreement name. - */ - public function getName() - { - return $this->_get(self::NAME); - } - - /** - * Returns the agreement content. - * - * @return string Agreement content. - */ - public function getContent() - { - return $this->_get(self::CONTENT); - } - - /** - * Returns the agreement content height, which is an optional CSS property. - * - * @return string|null Agreement content height. Otherwise, null. - */ - public function getContentHeight() - { - return $this->_get(self::CONTENT_HEIGHT); - } - - /** - * Returns the agreement checkbox text. - * - * @return string Agreement checkbox text. - */ - public function getCheckboxText() - { - return $this->_get(self::CHECKBOX_TEXT); - } - - /** - * Returns the agreement status. - * - * @return bool Agreement status. - */ - public function isActive() - { - return $this->_get(self::ACTIVE); - } - - /** - * Returns the agreement content type. - * - * @return bool * true - HTML. - * * false - plain text. - */ - public function isHtml() - { - return $this->_get(self::HTML); - } -} diff --git a/app/code/Magento/CheckoutAgreements/Service/V1/Data/AgreementBuilder.php b/app/code/Magento/CheckoutAgreements/Service/V1/Data/AgreementBuilder.php deleted file mode 100644 index 82f11f5f6b4..00000000000 --- a/app/code/Magento/CheckoutAgreements/Service/V1/Data/AgreementBuilder.php +++ /dev/null @@ -1,93 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\CheckoutAgreements\Service\V1\Data; - -use Magento\Framework\Api\ExtensibleObjectBuilder; - -/** - * Checkout agreement data object builder. - * - * @codeCoverageIgnore - */ -class AgreementBuilder extends ExtensibleObjectBuilder -{ - /** - * Sets the agreement ID. - * - * @param int $value The agreement ID. - * @return $this - */ - public function setId($value) - { - return $this->_set(Agreement::ID, $value); - } - - /** - * Sets the agreement name. - * - * @param string $value The agreement name. - * @return $this - */ - public function setName($value) - { - return $this->_set(Agreement::NAME, $value); - } - - /** - * Sets the agreement content. - * - * @param string $value The agreement content. - * @return $this - */ - public function setContent($value) - { - return $this->_set(Agreement::CONTENT, $value); - } - - /** - * Sets the agreement content height, which is an optional CSS property. - * - * @param string $value The agreement content height. - * @return $this - */ - public function setContentHeight($value) - { - return $this->_set(Agreement::CONTENT_HEIGHT, $value); - } - - /** - * Sets the agreement checkbox text. - * - * @param string $value The agreement checkbox text. - * @return $this - */ - public function setCheckboxText($value) - { - return $this->_set(Agreement::CHECKBOX_TEXT, $value); - } - - /** - * Sets the agreement status. - * - * @param bool $value The agreement status value. Set to true for active. - * @return $this - */ - public function setActive($value) - { - return $this->_set(Agreement::ACTIVE, $value); - } - - /** - * Sets the agreement content type. - * - * @param bool $value The agreement content type. Set to true for HTML. Set to false for plain text. - * @return $this - */ - public function setHtml($value) - { - return $this->_set(Agreement::HTML, $value); - } -} diff --git a/app/code/Magento/CheckoutAgreements/etc/di.xml b/app/code/Magento/CheckoutAgreements/etc/di.xml index 057668faba7..b72ba8165bc 100644 --- a/app/code/Magento/CheckoutAgreements/etc/di.xml +++ b/app/code/Magento/CheckoutAgreements/etc/di.xml @@ -6,7 +6,8 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> - <preference for="Magento\CheckoutAgreements\Service\V1\Agreement\ReadServiceInterface" type="Magento\CheckoutAgreements\Service\V1\Agreement\ReadService" /> + <preference for="Magento\CheckoutAgreements\Api\CheckoutAgreementsRepositoryInterface" type="Magento\CheckoutAgreements\Model\CheckoutAgreementsRepository" /> + <preference for="Magento\CheckoutAgreements\Api\Data\AgreementInterface" type="Magento\CheckoutAgreements\Model\Agreement" /> <type name="Magento\Framework\Module\Updater\SetupFactory"> <arguments> <argument name="resourceTypes" xsi:type="array"> diff --git a/app/code/Magento/CheckoutAgreements/etc/webapi.xml b/app/code/Magento/CheckoutAgreements/etc/webapi.xml index 1c6fa3cd557..5b66e1ff52d 100644 --- a/app/code/Magento/CheckoutAgreements/etc/webapi.xml +++ b/app/code/Magento/CheckoutAgreements/etc/webapi.xml @@ -8,7 +8,7 @@ <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../app/code/Magento/Webapi/etc/webapi.xsd"> <route url="/V1/carts/licence" method="GET"> - <service class="Magento\CheckoutAgreements\Service\V1\Agreement\ReadServiceInterface" method="getList"/> + <service class="Magento\CheckoutAgreements\Api\CheckoutAgreementsRepositoryInterface" method="getList"/> <resources> <resource ref="Magento_Sales::sales" /> </resources> diff --git a/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php new file mode 100644 index 00000000000..e314560a63c --- /dev/null +++ b/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php @@ -0,0 +1,85 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\CheckoutAgreements\Api; + +use Magento\TestFramework\TestCase\WebapiAbstract; +use Magento\Webapi\Model\Rest\Config as RestConfig; + +class CheckoutAgreementsRepositoryTest extends WebapiAbstract +{ + /** + * @var array + */ + private $listServiceInfo; + + protected function setUp() + { + $this->listServiceInfo = [ + 'soap' => [ + 'service' => 'checkoutAgreementsRepositoryInterfaceV1', + 'serviceVersion' => 'V1', + 'operation' => 'checkoutAgreementsRepositoryInterfaceV1GetList', + ], + 'rest' => [ + 'resourcePath' => '/V1/carts/licence/', + 'httpMethod' => RestConfig::HTTP_METHOD_GET, + ], + ]; + } + + /** + * Retrieve agreement by given name + * + * @param string $name + * @return \Magento\CheckoutAgreements\Model\Agreement + * @throws \InvalidArgumentException + */ + protected function getAgreementByName($name) + { + $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + /** @var $agreement \Magento\CheckoutAgreements\Model\Agreement */ + $agreement = $objectManager->create('Magento\CheckoutAgreements\Model\Agreement'); + $agreement->load($name, 'name'); + if (!$agreement->getId()) { + throw new \InvalidArgumentException('There is no checkout agreement with provided ID.'); + } + return $agreement; + } + + /** + * @magentoApiDataFixture Magento/CheckoutAgreements/_files/agreement_active_with_html_content.php + * @magentoApiDataFixture Magento/CheckoutAgreements/_files/agreement_inactive_with_text_content.php + */ + public function testGetListReturnsEmptyListIfCheckoutAgreementsAreDisabledOnFrontend() + { + // Checkout agreements are disabled by default + $agreements = $this->_webApiCall($this->listServiceInfo, []); + $this->assertEmpty($agreements); + } + + /** + * @magentoApiDataFixture Magento/CheckoutAgreements/_files/agreement_active_with_html_content.php + * @magentoApiDataFixture Magento/CheckoutAgreements/_files/agreement_inactive_with_text_content.php + */ + public function testGetListReturnsTheListOfActiveCheckoutAgreements() + { + // checkout/options/enable_agreements must be set to 1 in system configuration + // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed + $this->markTestIncomplete('This test relies on system configuration state.'); + $agreementModel = $this->getAgreementByName('Checkout Agreement (active)'); + + $agreements = $this->_webApiCall($this->listServiceInfo, []); + $this->assertCount(1, $agreements); + $agreementData = $agreements[0]; + $this->assertEquals($agreementModel->getId(), $agreementData['id']); + $this->assertEquals($agreementModel->getName(), $agreementData['name']); + $this->assertEquals($agreementModel->getContent(), $agreementData['content']); + $this->assertEquals($agreementModel->getContentHeight(), $agreementData['content_height']); + $this->assertEquals($agreementModel->getCheckboxText(), $agreementData['checkbox_text']); + $this->assertEquals($agreementModel->getIsActive(), $agreementData['is_active']); + $this->assertEquals($agreementModel->getIsHtml(), $agreementData['is_html']); + } +} diff --git a/dev/tests/unit/testsuite/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceTest.php b/dev/tests/unit/testsuite/Magento/CheckoutAgreements/Model/CheckoutAgreementsRepositoryTest.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceTest.php rename to dev/tests/unit/testsuite/Magento/CheckoutAgreements/Model/CheckoutAgreementsRepositoryTest.php index 14d2432ef89..df196c88c53 100644 --- a/dev/tests/unit/testsuite/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/CheckoutAgreements/Model/CheckoutAgreementsRepositoryTest.php @@ -3,15 +3,15 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\CheckoutAgreements\Service\V1\Agreement; +namespace Magento\CheckoutAgreements\Model; use Magento\Store\Model\ScopeInterface; use Magento\TestFramework\Helper\ObjectManager; -class ReadServiceTest extends \PHPUnit_Framework_TestCase +class CheckoutAgreementsRepositoryTest extends \PHPUnit_Framework_TestCase { /** - * @var ReadService + * @var CheckoutAgreementsRepository */ private $service; @@ -52,7 +52,7 @@ class ReadServiceTest extends \PHPUnit_Framework_TestCase false ); $this->agreementBuilderMock = $this->getMock( - 'Magento\CheckoutAgreements\Service\V1\Data\AgreementBuilder', + 'Magento\CheckoutAgreements\Api\Data\AgreementDataBuilder', [], [], '', @@ -60,7 +60,7 @@ class ReadServiceTest extends \PHPUnit_Framework_TestCase ); $this->storeManagerMock = $this->getMock('Magento\Store\Model\StoreManagerInterface'); $this->scopeConfigMock = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); - $this->service = new ReadService( + $this->service = new CheckoutAgreementsRepository( $this->factoryMock, $this->agreementBuilderMock, $this->storeManagerMock, @@ -91,8 +91,8 @@ class ReadServiceTest extends \PHPUnit_Framework_TestCase 'content' => 'Agreement content: <b>HTML</b>', 'content_height' => '100px', 'checkbox_text' => 'Checkout Agreement Checkbox Text', - 'active' => true, - 'html' => true, + 'is_active' => true, + 'is_html' => true, ]; $storeId = 1; @@ -151,9 +151,9 @@ class ReadServiceTest extends \PHPUnit_Framework_TestCase $agreementMock->expects($this->any())->method('getCheckboxText') ->will($this->returnValue($agreementData['checkbox_text'])); $agreementMock->expects($this->any())->method('getIsActive') - ->will($this->returnValue($agreementData['active'])); + ->will($this->returnValue($agreementData['is_active'])); $agreementMock->expects($this->any())->method('getIsHtml') - ->will($this->returnValue($agreementData['html'])); + ->will($this->returnValue($agreementData['is_html'])); return $agreementMock; } } -- GitLab From 47ef1c2d69ea2c02e0ab49d4f3cb73fd25e31992 Mon Sep 17 00:00:00 2001 From: Iryna Lagno <ilagno@ebay.com> Date: Wed, 14 Jan 2015 16:35:16 +0200 Subject: [PATCH 033/114] MAGETWO-32504: Implement Cart Items interfaces --- app/code/Magento/Quote/etc/webapi.xml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/app/code/Magento/Quote/etc/webapi.xml b/app/code/Magento/Quote/etc/webapi.xml index ca75c18f11d..0a0723e7641 100644 --- a/app/code/Magento/Quote/etc/webapi.xml +++ b/app/code/Magento/Quote/etc/webapi.xml @@ -23,6 +23,28 @@ <service class="Magento\Quote\Api\ShippingMethodManagementInterface" method="getList"/> <resources> <resource ref="Magento_Sales::sales" /> + <route url="/V1/carts/:cartId/items" method="GET"> + <service class="Magento\Quote\Api\CartItemRepositoryInterface" method="getList"/> + <resources> + <resource ref="Magento_Catalog::products" /> + </resources> + </route> + <route url="/V1/carts/items" method="POST"> + <service class="Magento\Quote\Api\CartItemRepositoryInterface" method="save"/> + <resources> + <resource ref="Magento_Catalog::products" /> + </resources> + </route> + <route url="/V1/carts/items/:itemId" method="PUT"> + <service class="Magento\Quote\Api\CartItemRepositoryInterface" method="save"/> + <resources> + <resource ref="Magento_Catalog::products" /> + </resources> + </route> + <route url="/V1/carts/:cartId/items/:itemId" method="DELETE"> + <service class="Magento\Quote\Api\CartItemRepositoryInterface" method="deleteById"/> + <resources> + <resource ref="Magento_Catalog::products" /> </resources> </route> </routes> -- GitLab From e09331306f0c668858e32d5d368d0abe096740b0 Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Wed, 14 Jan 2015 17:44:53 +0200 Subject: [PATCH 034/114] MAGETWO-31578: Implement tool for adding annotations to existing code - removed annotation --- .../Test/Php/Exemplar/CodeMessTest/phpmd/input/naming.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/naming.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/naming.php index 22280954a78..d2b6e1de984 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/naming.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/naming.php @@ -1,8 +1,5 @@ <?php -/** - * @SuppressWarnings(PHPMD.ConstantNamingConventions) - */ class Magento_Test_Php_Exemplar_CodeMessTest_phpmd_input_naming { const nonUppercaseName = false; @@ -31,7 +28,6 @@ class Magento_Test_Php_Exemplar_CodeMessTest_phpmd_input_naming /** * Too short method name - * @SuppressWarnings(PHPMD.ShortMethodName) */ protected function _x() { @@ -40,7 +36,6 @@ class Magento_Test_Php_Exemplar_CodeMessTest_phpmd_input_naming /** * Getter that returns boolean value should be named 'is...()' or 'has...()' * @return bool - * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getBoolValue() { -- GitLab From 1facbfb5b4cd557e1193e88c86385914c205296d Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Wed, 14 Jan 2015 17:49:28 +0200 Subject: [PATCH 035/114] MAGETWO-32498: Implement Checkout Agreement interfaces --- .../CheckoutAgreementsRepositoryInterface.php | 4 +- .../Api/Data/AgreementInterface.php | 6 +- .../CheckoutAgreements/Model/Agreement.php | 2 +- .../Model/CheckoutAgreementsRepository.php | 40 +-------- .../Service/V1/Agreement/ReadServiceTest.php | 85 ------------------- .../Legacy/_files/obsolete_namespaces.php | 3 +- .../CheckoutAgreementsRepositoryTest.php | 85 +++---------------- 7 files changed, 23 insertions(+), 202 deletions(-) delete mode 100644 dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceTest.php diff --git a/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryInterface.php b/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryInterface.php index 0e596daa5e9..3d528c2a396 100644 --- a/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryInterface.php +++ b/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryInterface.php @@ -1,6 +1,7 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\CheckoutAgreements\Api; @@ -10,7 +11,6 @@ interface CheckoutAgreementsRepositoryInterface * Lists active checkout agreements. * * @return \Magento\CheckoutAgreements\Api\Data\AgreementInterface[] - * @see \Magento\CheckoutAgreements\Service\V1\Agreement\ReadServiceInterface::getList */ public function getList(); } diff --git a/app/code/Magento/CheckoutAgreements/Api/Data/AgreementInterface.php b/app/code/Magento/CheckoutAgreements/Api/Data/AgreementInterface.php index 3b603d0a39a..efe25d4e7bf 100644 --- a/app/code/Magento/CheckoutAgreements/Api/Data/AgreementInterface.php +++ b/app/code/Magento/CheckoutAgreements/Api/Data/AgreementInterface.php @@ -1,12 +1,10 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\CheckoutAgreements\Api\Data; -/** - * @see \Magento\CheckoutAgreements\Service\V1\Data\Agreement - */ interface AgreementInterface { /** diff --git a/app/code/Magento/CheckoutAgreements/Model/Agreement.php b/app/code/Magento/CheckoutAgreements/Model/Agreement.php index b7084b0cac6..df49829e376 100644 --- a/app/code/Magento/CheckoutAgreements/Model/Agreement.php +++ b/app/code/Magento/CheckoutAgreements/Model/Agreement.php @@ -68,7 +68,7 @@ class Agreement extends AbstractExtensibleModel implements AgreementInterface /** * @inheritdoc */ - public function getId() + public function getAgreementId() { return $this->getData('agreement_id'); } diff --git a/app/code/Magento/CheckoutAgreements/Model/CheckoutAgreementsRepository.php b/app/code/Magento/CheckoutAgreements/Model/CheckoutAgreementsRepository.php index a5f249bccb6..5fa8eb54f3b 100644 --- a/app/code/Magento/CheckoutAgreements/Model/CheckoutAgreementsRepository.php +++ b/app/code/Magento/CheckoutAgreements/Model/CheckoutAgreementsRepository.php @@ -10,12 +10,10 @@ use Magento\CheckoutAgreements\Model\Resource\Agreement\Collection as AgreementC use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Store\Model\StoreManagerInterface; use Magento\Store\Model\ScopeInterface; -use Magento\CheckoutAgreements\Api\Data\AgreementDataBuilder; -use Magento\CheckoutAgreements\Model\Agreement as AgreementDataObject; use Magento\CheckoutAgreements\Api\CheckoutAgreementsRepositoryInterface; /** - * Checkout agreement service. + * Checkout agreement repository. */ class CheckoutAgreementsRepository implements CheckoutAgreementsRepositoryInterface { @@ -26,13 +24,6 @@ class CheckoutAgreementsRepository implements CheckoutAgreementsRepositoryInterf */ private $collectionFactory; - /** - * Agreement builder. - * - * @var AgreementDataBuilder - */ - private $agreementBuilder; - /** * Store manager. * @@ -48,21 +39,18 @@ class CheckoutAgreementsRepository implements CheckoutAgreementsRepositoryInterf private $scopeConfig; /** - * Constructs a checkout agreement service object. + * Constructs a checkout agreement data object. * * @param AgreementCollectionFactory $collectionFactory Collection factory. - * @param AgreementDataBuilder $agreementBuilder Agreement builder. * @param \Magento\Store\Model\StoreManagerInterface $storeManager Store manager. * @param ScopeConfigInterface $scopeConfig Scope config. */ public function __construct( AgreementCollectionFactory $collectionFactory, - AgreementDataBuilder $agreementBuilder, StoreManagerInterface $storeManager, ScopeConfigInterface $scopeConfig ) { $this->collectionFactory = $collectionFactory; - $this->agreementBuilder = $agreementBuilder; $this->storeManager = $storeManager; $this->scopeConfig = $scopeConfig; } @@ -70,7 +58,7 @@ class CheckoutAgreementsRepository implements CheckoutAgreementsRepositoryInterf /** * {@inheritdoc} * - * @return \Magento\CheckoutAgreements\Api\Data\AgreementInterface[] Array of checkout agreement service objects. + * @return \Magento\CheckoutAgreements\Api\Data\AgreementInterface[] Array of checkout agreement data objects. */ public function getList() { @@ -85,29 +73,9 @@ class CheckoutAgreementsRepository implements CheckoutAgreementsRepositoryInterf $agreementDataObjects = []; foreach ($agreementCollection as $agreement) { - $agreementDataObjects[] = $this->createAgreementDataObject($agreement); + $agreementDataObjects[] = $agreement; } return $agreementDataObjects; } - - /** - * Creates an agreement data object based on a specified agreement model. - * - * @param Agreement $agreement The agreement model. - * @return AgreementDataObject Agreement data object. - */ - protected function createAgreementDataObject(Agreement $agreement) - { - $this->agreementBuilder->populateWithArray([ - 'id' => $agreement->getId(), - 'name' => $agreement->getName(), - 'content' => $agreement->getContent(), - 'content_height' => $agreement->getContentHeight(), - 'checkbox_text' => $agreement->getCheckboxText(), - 'is_active' => (bool)$agreement->getIsActive(), - 'is_html' => (bool)$agreement->getIsHtml(), - ]); - return $this->agreementBuilder->create(); - } } diff --git a/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceTest.php b/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceTest.php deleted file mode 100644 index 2e7bbc45370..00000000000 --- a/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceTest.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\CheckoutAgreements\Service\V1\Agreement; - -use Magento\TestFramework\TestCase\WebapiAbstract; -use Magento\Webapi\Model\Rest\Config as RestConfig; - -class ReadServiceTest extends WebapiAbstract -{ - /** - * @var array - */ - private $listServiceInfo; - - protected function setUp() - { - $this->listServiceInfo = [ - 'soap' => [ - 'service' => 'checkoutAgreementsAgreementReadServiceV1', - 'serviceVersion' => 'V1', - 'operation' => 'checkoutAgreementsAgreementReadServiceV1GetList', - ], - 'rest' => [ - 'resourcePath' => '/V1/carts/licence/', - 'httpMethod' => RestConfig::HTTP_METHOD_GET, - ], - ]; - } - - /** - * Retrieve agreement by given name - * - * @param string $name - * @return \Magento\CheckoutAgreements\Model\Agreement - * @throws \InvalidArgumentException - */ - protected function getAgreementByName($name) - { - $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var $agreement \Magento\CheckoutAgreements\Model\Agreement */ - $agreement = $objectManager->create('Magento\CheckoutAgreements\Model\Agreement'); - $agreement->load($name, 'name'); - if (!$agreement->getId()) { - throw new \InvalidArgumentException('There is no checkout agreement with provided ID.'); - } - return $agreement; - } - - /** - * @magentoApiDataFixture Magento/CheckoutAgreements/_files/agreement_active_with_html_content.php - * @magentoApiDataFixture Magento/CheckoutAgreements/_files/agreement_inactive_with_text_content.php - */ - public function testGetListReturnsEmptyListIfCheckoutAgreementsAreDisabledOnFrontend() - { - // Checkout agreements are disabled by default - $agreements = $this->_webApiCall($this->listServiceInfo, []); - $this->assertEmpty($agreements); - } - - /** - * @magentoApiDataFixture Magento/CheckoutAgreements/_files/agreement_active_with_html_content.php - * @magentoApiDataFixture Magento/CheckoutAgreements/_files/agreement_inactive_with_text_content.php - */ - public function testGetListReturnsTheListOfActiveCheckoutAgreements() - { - // checkout/options/enable_agreements must be set to 1 in system configuration - // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed - $this->markTestIncomplete('This test relies on system configuration state.'); - $agreementModel = $this->getAgreementByName('Checkout Agreement (active)'); - - $agreements = $this->_webApiCall($this->listServiceInfo, []); - $this->assertCount(1, $agreements); - $agreementData = $agreements[0]; - $this->assertEquals($agreementModel->getId(), $agreementData['id']); - $this->assertEquals($agreementModel->getName(), $agreementData['name']); - $this->assertEquals($agreementModel->getContent(), $agreementData['content']); - $this->assertEquals($agreementModel->getContentHeight(), $agreementData['content_height']); - $this->assertEquals($agreementModel->getCheckboxText(), $agreementData['checkbox_text']); - $this->assertEquals($agreementModel->getIsActive(), $agreementData['active']); - $this->assertEquals($agreementModel->getIsHtml(), $agreementData['html']); - } -} diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php index a266869939c..c92a5c1f738 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php @@ -70,5 +70,6 @@ return [ ['Magento\RecurringPayment'], ['Magento\PayPalRecurringPayment'], ['Magento\ConfigurableProduct\Service'], - ['Magento\Catalog\Service'] + ['Magento\Catalog\Service'], + ['Magento\CheckoutAgreements\Service'] ]; diff --git a/dev/tests/unit/testsuite/Magento/CheckoutAgreements/Model/CheckoutAgreementsRepositoryTest.php b/dev/tests/unit/testsuite/Magento/CheckoutAgreements/Model/CheckoutAgreementsRepositoryTest.php index df196c88c53..24541f489f6 100644 --- a/dev/tests/unit/testsuite/Magento/CheckoutAgreements/Model/CheckoutAgreementsRepositoryTest.php +++ b/dev/tests/unit/testsuite/Magento/CheckoutAgreements/Model/CheckoutAgreementsRepositoryTest.php @@ -13,18 +13,13 @@ class CheckoutAgreementsRepositoryTest extends \PHPUnit_Framework_TestCase /** * @var CheckoutAgreementsRepository */ - private $service; + private $model; /** * @var \PHPUnit_Framework_MockObject_MockObject */ private $factoryMock; - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - private $agreementBuilderMock; - /** * @var \PHPUnit_Framework_MockObject_MockObject */ @@ -51,18 +46,10 @@ class CheckoutAgreementsRepositoryTest extends \PHPUnit_Framework_TestCase '', false ); - $this->agreementBuilderMock = $this->getMock( - 'Magento\CheckoutAgreements\Api\Data\AgreementDataBuilder', - [], - [], - '', - false - ); $this->storeManagerMock = $this->getMock('Magento\Store\Model\StoreManagerInterface'); $this->scopeConfigMock = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); - $this->service = new CheckoutAgreementsRepository( + $this->model = new CheckoutAgreementsRepository( $this->factoryMock, - $this->agreementBuilderMock, $this->storeManagerMock, $this->scopeConfigMock ); @@ -75,7 +62,7 @@ class CheckoutAgreementsRepositoryTest extends \PHPUnit_Framework_TestCase ->with('checkout/options/enable_agreements', ScopeInterface::SCOPE_STORE, null) ->will($this->returnValue(false)); $this->factoryMock->expects($this->never())->method('create'); - $this->assertEmpty($this->service->getList()); + $this->assertEmpty($this->model->getList()); } public function testGetListReturnsTheListOfActiveCheckoutAgreements() @@ -85,15 +72,13 @@ class CheckoutAgreementsRepositoryTest extends \PHPUnit_Framework_TestCase ->with('checkout/options/enable_agreements', ScopeInterface::SCOPE_STORE, null) ->will($this->returnValue(true)); - $agreementData = [ - 'id' => 1, - 'name' => 'Checkout Agreement', - 'content' => 'Agreement content: <b>HTML</b>', - 'content_height' => '100px', - 'checkbox_text' => 'Checkout Agreement Checkbox Text', - 'is_active' => true, - 'is_html' => true, - ]; + $agreementDataObject = $this->getMock( + 'Magento\CheckoutAgreements\Model\Agreement', + [], + [], + '', + false + ); $storeId = 1; $storeMock = $this->getMock('Magento\Store\Model\Store', [], [], '', false); @@ -102,58 +87,12 @@ class CheckoutAgreementsRepositoryTest extends \PHPUnit_Framework_TestCase $collectionMock = $this->objectManager->getCollectionMock( 'Magento\CheckoutAgreements\Model\Resource\Agreement\Collection', - [$this->getAgreementMock($agreementData)] + [$agreementDataObject] ); $this->factoryMock->expects($this->once())->method('create')->will($this->returnValue($collectionMock)); $collectionMock->expects($this->once())->method('addStoreFilter')->with($storeId); $collectionMock->expects($this->once())->method('addFieldToFilter')->with('is_active', 1); - $agreementDataObject = $this->getMock( - 'Magento\CheckoutAgreements\Service\V1\Data\Agreement', - [], - [], - '', - false - ); - $this->agreementBuilderMock->expects($this->once())->method('populateWithArray')->with($agreementData); - $this->agreementBuilderMock->expects($this->once())->method('create') - ->will($this->returnValue($agreementDataObject)); - - $this->assertEquals([$agreementDataObject], $this->service->getList()); - } - - /** - * Retrieve agreement mock based on given data - * - * @param array $agreementData - * @return \PHPUnit_Framework_MockObject_MockObject - */ - protected function getAgreementMock(array $agreementData) - { - $agreementMock = $this->getMock( - 'Magento\CheckoutAgreements\Model\Agreement', - [ - 'getId', 'getName', 'getContent', 'getContentHeight', 'getCheckboxText', 'getIsActive', 'getIsHtml', - '__wakeup', '__sleep', - ], - [], - '', - false - ); - $agreementMock->expects($this->any())->method('getId') - ->will($this->returnValue($agreementData['id'])); - $agreementMock->expects($this->any())->method('getName') - ->will($this->returnValue($agreementData['name'])); - $agreementMock->expects($this->any())->method('getContent') - ->will($this->returnValue($agreementData['content'])); - $agreementMock->expects($this->any())->method('getContentHeight') - ->will($this->returnValue($agreementData['content_height'])); - $agreementMock->expects($this->any())->method('getCheckboxText') - ->will($this->returnValue($agreementData['checkbox_text'])); - $agreementMock->expects($this->any())->method('getIsActive') - ->will($this->returnValue($agreementData['is_active'])); - $agreementMock->expects($this->any())->method('getIsHtml') - ->will($this->returnValue($agreementData['is_html'])); - return $agreementMock; + $this->assertEquals([$agreementDataObject], $this->model->getList()); } } -- GitLab From 76cd19e6f2955612512750650443a7013f31837f Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Wed, 14 Jan 2015 18:26:47 +0200 Subject: [PATCH 036/114] MAGETWO-31578: Implement tool for adding annotations to existing code - Fixed test to use phpmd installed with composer --- .../CodingStandard/Tool/CodeMessDetector.php | 10 +++++----- .../static/testsuite/Magento/Test/Php/LiveCodeTest.php | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeMessDetector.php b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeMessDetector.php index f52b7d64d21..753de6b8b37 100644 --- a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeMessDetector.php +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeMessDetector.php @@ -45,7 +45,7 @@ class CodeMessDetector implements ToolInterface */ public function canRun() { - return class_exists('PHP_PMD_TextUI_Command'); + return class_exists('PHPMD\TextUI\Command'); } /** @@ -54,7 +54,7 @@ class CodeMessDetector implements ToolInterface public function run(array $whiteList) { if (empty($whiteList)) { - return \PHP_PMD_TextUI_Command::EXIT_SUCCESS; + return \PHPMD\TextUI\Command::EXIT_SUCCESS; } $commandLineArguments = [ @@ -66,10 +66,10 @@ class CodeMessDetector implements ToolInterface $this->reportFile, ]; - $options = new \PHP_PMD_TextUI_CommandLineOptions($commandLineArguments); + $options = new \PHPMD\TextUI\CommandLineOptions($commandLineArguments); - $command = new \PHP_PMD_TextUI_Command(); + $command = new \PHPMD\TextUI\Command(); - return $command->run($options, new \PHP_PMD_RuleSetFactory()); + return $command->run($options, new \PHPMD\RuleSetFactory()); } } diff --git a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php index e59ff9a6874..22273585ab2 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php @@ -12,7 +12,7 @@ use Magento\TestFramework\CodingStandard\Tool\CodeMessDetector; use Magento\TestFramework\CodingStandard\Tool\CodeSniffer; use Magento\TestFramework\CodingStandard\Tool\CodeSniffer\Wrapper; use Magento\TestFramework\CodingStandard\Tool\CopyPasteDetector; -use PHP_PMD_TextUI_Command; +use PHPMD\TextUI\Command; use PHPUnit_Framework_TestCase; use Magento\Framework\Test\Utility\Files; @@ -170,7 +170,7 @@ class LiveCodeTest extends PHPUnit_Framework_TestCase } $this->assertEquals( - PHP_PMD_TextUI_Command::EXIT_SUCCESS, + Command::EXIT_SUCCESS, $codeMessDetector->run(self::getWhitelist(['php'])), "PHP Code Mess has found error(s): See detailed report in {$reportFile}" ); -- GitLab From eefaa9799141eec74e72b190f196c4e4f0301c14 Mon Sep 17 00:00:00 2001 From: Iryna Lagno <ilagno@ebay.com> Date: Wed, 14 Jan 2015 18:41:49 +0200 Subject: [PATCH 037/114] MAGETWO-32504: Implement Cart Items interfaces --- app/code/Magento/Quote/etc/webapi.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Quote/etc/webapi.xml b/app/code/Magento/Quote/etc/webapi.xml index 0a0723e7641..1543161b494 100644 --- a/app/code/Magento/Quote/etc/webapi.xml +++ b/app/code/Magento/Quote/etc/webapi.xml @@ -23,6 +23,8 @@ <service class="Magento\Quote\Api\ShippingMethodManagementInterface" method="getList"/> <resources> <resource ref="Magento_Sales::sales" /> + </resources> + </route> <route url="/V1/carts/:cartId/items" method="GET"> <service class="Magento\Quote\Api\CartItemRepositoryInterface" method="getList"/> <resources> -- GitLab From 4cc6f3d1df9d6faf24806844d120165134872ccb Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Wed, 14 Jan 2015 19:04:17 +0200 Subject: [PATCH 038/114] MAGETWO-32498: Implement Checkout Agreement interfaces --- .../Magento/CheckoutAgreements/Api/Data/AgreementInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/CheckoutAgreements/Api/Data/AgreementInterface.php b/app/code/Magento/CheckoutAgreements/Api/Data/AgreementInterface.php index efe25d4e7bf..71088e34dcb 100644 --- a/app/code/Magento/CheckoutAgreements/Api/Data/AgreementInterface.php +++ b/app/code/Magento/CheckoutAgreements/Api/Data/AgreementInterface.php @@ -12,7 +12,7 @@ interface AgreementInterface * * @return int Agreement ID. */ - public function getId(); + public function getAgreementId(); /** * Returns the agreement name. -- GitLab From 8e6eceac4ac8399fa544c368f1a528cde776b5f8 Mon Sep 17 00:00:00 2001 From: Serhiy Shkolyarenko <sshkolyarenko@ebay.com> Date: Thu, 15 Jan 2015 09:52:13 +0200 Subject: [PATCH 039/114] MAGETWO-32501: Implement Cart Service interfaces Moved interfaces --- app/code/Magento/Checkout/etc/webapi.xml | 12 --- .../Api/Data/QuoteInterface.php} | 9 +-- .../Api/Data/QuoteSearchResultsInterface.php} | 6 +- .../Api/QuoteManagementInterface.php} | 6 +- .../Api/QuoteRepositoryInterface.php} | 8 +- .../Magento/Quote/Model/QuoteRepository.php | 78 ++++++++++++++++++- .../Quote/Model/QuoteSearchResults.php | 24 ++++++ app/code/Magento/Quote/etc/webapi.xml | 12 +++ 8 files changed, 123 insertions(+), 32 deletions(-) rename app/code/Magento/{Checkout/Api/Data/CartInterface.php => Quote/Api/Data/QuoteInterface.php} (92%) rename app/code/Magento/{Checkout/Api/Data/CartSearchResultsInterface.php => Quote/Api/Data/QuoteSearchResultsInterface.php} (50%) rename app/code/Magento/{Checkout/Api/CartManagementInterface.php => Quote/Api/QuoteManagementInterface.php} (95%) rename app/code/Magento/{Checkout/Api/CartRepositoryInterface.php => Quote/Api/QuoteRepositoryInterface.php} (79%) create mode 100644 app/code/Magento/Quote/Model/QuoteSearchResults.php diff --git a/app/code/Magento/Checkout/etc/webapi.xml b/app/code/Magento/Checkout/etc/webapi.xml index 102fcc793df..4d47f2f24bd 100644 --- a/app/code/Magento/Checkout/etc/webapi.xml +++ b/app/code/Magento/Checkout/etc/webapi.xml @@ -19,24 +19,12 @@ <resource ref="Magento_Sales::create" /> </resources> </route> - <route url="/V1/carts/:cartId" method="GET"> - <service class="Magento\Checkout\Service\V1\Cart\ReadServiceInterface" method="getCart"/> - <resources> - <resource ref="Magento_Catalog::products" /> - </resources> - </route> <route url="/V1/customer/:customerId/cart" method="GET"> <service class="Magento\Checkout\Service\V1\Cart\ReadServiceInterface" method="getCartForCustomer"/> <resources> <resource ref="Magento_Catalog::products" /> </resources> </route> - <route url="/V1/carts" method="PUT"> - <service class="Magento\Checkout\Service\V1\Cart\ReadServiceInterface" method="getCartList"/> - <resources> - <resource ref="Magento_Catalog::products" /> - </resources> - </route> <route url="/V1/carts/:cartId/shipping-address" method="GET"> <service class="Magento\Checkout\Service\V1\Address\Shipping\ReadServiceInterface" method="getAddress"/> <resources> diff --git a/app/code/Magento/Checkout/Api/Data/CartInterface.php b/app/code/Magento/Quote/Api/Data/QuoteInterface.php similarity index 92% rename from app/code/Magento/Checkout/Api/Data/CartInterface.php rename to app/code/Magento/Quote/Api/Data/QuoteInterface.php index 459acd3beb9..1eda3aac4ed 100644 --- a/app/code/Magento/Checkout/Api/Data/CartInterface.php +++ b/app/code/Magento/Quote/Api/Data/QuoteInterface.php @@ -3,12 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api\Data; +namespace Magento\Quote\Api\Data; -/** - * @see \Magento\Checkout\Service\V1\Data\Cart - */ -interface CartInterface extends \Magento\Framework\Api\ExtensibleDataInterface +interface QuoteInterface extends \Magento\Framework\Api\ExtensibleDataInterface { /** * Returns the cart/quote ID. @@ -57,7 +54,7 @@ interface CartInterface extends \Magento\Framework\Api\ExtensibleDataInterface /** * Lists items in the cart. * - * @return \Magento\Checkout\Api\Data\CartItemInterface[]|null Array of items. Otherwise, null. + * @return \Magento\Quote\Api\Data\CartItemInterface[]|null Array of items. Otherwise, null. */ public function getItems(); diff --git a/app/code/Magento/Checkout/Api/Data/CartSearchResultsInterface.php b/app/code/Magento/Quote/Api/Data/QuoteSearchResultsInterface.php similarity index 50% rename from app/code/Magento/Checkout/Api/Data/CartSearchResultsInterface.php rename to app/code/Magento/Quote/Api/Data/QuoteSearchResultsInterface.php index ada2abf281c..9e0c404d843 100644 --- a/app/code/Magento/Checkout/Api/Data/CartSearchResultsInterface.php +++ b/app/code/Magento/Quote/Api/Data/QuoteSearchResultsInterface.php @@ -3,14 +3,14 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api\Data; +namespace Magento\Quote\Api\Data; -interface CartSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface +interface QuoteSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface { /** * Get carts list. * - * @return \Magento\Checkout\Api\Data\CartInterface[] + * @return \Magento\Quote\Api\Data\QuoteInterface[] */ public function getItems(); } diff --git a/app/code/Magento/Checkout/Api/CartManagementInterface.php b/app/code/Magento/Quote/Api/QuoteManagementInterface.php similarity index 95% rename from app/code/Magento/Checkout/Api/CartManagementInterface.php rename to app/code/Magento/Quote/Api/QuoteManagementInterface.php index 210f9b2fdc2..009045747e4 100644 --- a/app/code/Magento/Checkout/Api/CartManagementInterface.php +++ b/app/code/Magento/Quote/Api/QuoteManagementInterface.php @@ -3,9 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api; +namespace Magento\Quote\Api; -interface CartManagementInterface +interface QuoteManagementInterface { /** * Enables an administrative or guest user to create an empty cart and quote for an anonymous customer. @@ -21,7 +21,7 @@ interface CartManagementInterface * Returns information for the cart for a specified customer. * * @param int $customerId The customer ID. - * @return \Magento\Checkout\Api\Data\CartInterface Cart object. + * @return \Magento\Quote\Api\Data\QuoteInterface Cart object. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified customer does not exist. * @see \Magento\Checkout\Service\V1\Cart\ReadServiceInterface::getCartForCustomer */ diff --git a/app/code/Magento/Checkout/Api/CartRepositoryInterface.php b/app/code/Magento/Quote/Api/QuoteRepositoryInterface.php similarity index 79% rename from app/code/Magento/Checkout/Api/CartRepositoryInterface.php rename to app/code/Magento/Quote/Api/QuoteRepositoryInterface.php index 1b666a02d8d..23170cd8465 100644 --- a/app/code/Magento/Checkout/Api/CartRepositoryInterface.php +++ b/app/code/Magento/Quote/Api/QuoteRepositoryInterface.php @@ -3,15 +3,15 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api; +namespace Magento\Quote\Api; -interface CartRepositoryInterface +interface QuoteRepositoryInterface { /** * Enables an administrative user to return information for a specified cart. * * @param int $cartId - * @return \Magento\Checkout\Api\Data\CartInterface + * @return \Magento\Quote\Api\Data\QuoteInterface * @throws \Magento\Framework\Exception\NoSuchEntityException * @see \Magento\Checkout\Service\V1\Cart\ReadServiceInterface::getCart */ @@ -21,7 +21,7 @@ interface CartRepositoryInterface * Enables administrative users to list carts that match specified search criteria. * * @param \Magento\Framework\Api\SearchCriteria $searchCriteria - * @return \Magento\Checkout\Api\Data\CartSearchResultsInterface + * @return \Magento\Quote\Api\Data\QuoteSearchResultsInterface * @see \Magento\Checkout\Service\V1\Cart\ReadServiceInterface::getCartList */ public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); diff --git a/app/code/Magento/Quote/Model/QuoteRepository.php b/app/code/Magento/Quote/Model/QuoteRepository.php index b0c8927015f..2a56c93ed09 100644 --- a/app/code/Magento/Quote/Model/QuoteRepository.php +++ b/app/code/Magento/Quote/Model/QuoteRepository.php @@ -5,12 +5,15 @@ */ namespace Magento\Quote\Model; -use \Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\Quote\Model\Quote; -use Magento\Quote\Model\QuoteFactory; use Magento\Store\Model\StoreManagerInterface; +use Magento\Framework\Api\SearchCriteria; +use Magento\Framework\Api\Search\FilterGroup; +use Magento\Quote\Model\Resource\Quote\Collection as QuoteCollection; +use Magento\Framework\Exception\InputException; -class QuoteRepository +class QuoteRepository implements \Magento\Quote\Api\QuoteRepositoryInterface { /** * @var Quote[] @@ -32,16 +35,32 @@ class QuoteRepository */ protected $storeManager; + /** + * @var \Magento\Quote\Model\Resource\Quote\Collection + */ + protected $quoteCollection; + + /** + * @var \Magento\Quote\Api\Data\QuoteSearchResultsDataBuilder + */ + protected $searchResultsBuilder; + /** * @param QuoteFactory $quoteFactory * @param StoreManagerInterface $storeManager + * @param \Magento\Quote\Model\Resource\Quote\Collection $quoteCollection + * @param \Magento\Quote\Api\Data\QuoteSearchResultsDataBuilder $searchResultsBuilder */ public function __construct( QuoteFactory $quoteFactory, - StoreManagerInterface $storeManager + StoreManagerInterface $storeManager, + \Magento\Quote\Model\Resource\Quote\Collection $quoteCollection, + \Magento\Quote\Api\Data\QuoteSearchResultsDataBuilder $searchResultsBuilder ) { $this->quoteFactory = $quoteFactory; $this->storeManager = $storeManager; + $this->searchResultsBuilder = $searchResultsBuilder; + $this->quoteCollection = $quoteCollection; } /** @@ -176,4 +195,55 @@ class QuoteRepository } return $quote; } + + /** + * {@inheritdoc} + */ + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria) + { + $this->searchResultsBuilder->setSearchCriteria($searchCriteria); + + foreach ($searchCriteria->getFilterGroups() as $group) { + $this->addFilterGroupToCollection($group, $this->quoteCollection); + } + + $this->searchResultsBuilder->setTotalCount($this->quoteCollection->getSize()); + $sortOrders = $searchCriteria->getSortOrders(); + if ($sortOrders) { + foreach ($sortOrders as $sortOrder) { + $this->quoteCollection->addOrder( + $sortOrder->getField(), + $sortOrder->getDirection() == SearchCriteria::SORT_ASC ? 'ASC' : 'DESC' + ); + } + } + $this->quoteCollection->setCurPage($searchCriteria->getCurrentPage()); + $this->quoteCollection->setPageSize($searchCriteria->getPageSize()); + + $this->searchResultsBuilder->setItems($this->quoteCollection->getItems()); + + return $this->searchResultsBuilder->create(); + } + + /** + * Adds a specified filter group to the specified quote collection. + * + * @param FilterGroup $filterGroup The filter group. + * @param QuoteCollection $collection The quote collection. + * @return void + * @throws InputException The specified filter group or quote collection does not exist. + */ + protected function addFilterGroupToCollection(FilterGroup $filterGroup, QuoteCollection $collection) + { + $fields = []; + $conditions = []; + foreach ($filterGroup->getFilters() as $filter) { + $fields[] = $filter->getField(); + $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq'; + $conditions[] = [$condition => $filter->getValue()]; + } + if ($fields) { + $collection->addFieldToFilter($fields, $conditions); + } + } } diff --git a/app/code/Magento/Quote/Model/QuoteSearchResults.php b/app/code/Magento/Quote/Model/QuoteSearchResults.php new file mode 100644 index 00000000000..d84949810d3 --- /dev/null +++ b/app/code/Magento/Quote/Model/QuoteSearchResults.php @@ -0,0 +1,24 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Quote\Model; + +/** + * @codeCoverageIgnore + */ +class QuoteSearchResults + extends \Magento\Framework\Api\SearchResults + implements \Magento\Quote\Api\Data\QuoteSearchResultsInterface +{ + /** + * Get items + * + * @return \Magento\Quote\Api\Data\QuoteInterface[] + */ + public function getItems() + { + return parent::getItems(); + } +} diff --git a/app/code/Magento/Quote/etc/webapi.xml b/app/code/Magento/Quote/etc/webapi.xml index 1543161b494..ff5e1b6d135 100644 --- a/app/code/Magento/Quote/etc/webapi.xml +++ b/app/code/Magento/Quote/etc/webapi.xml @@ -7,6 +7,18 @@ --> <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../app/code/Magento/Webapi/etc/webapi.xsd"> + <route url="/V1/carts/:cartId" method="GET"> + <service class="Magento\Quote\Api\QuoteRepositoryInterface" method="get"/> + <resources> + <resource ref="Magento_Catalog::products" /> + </resources> + </route> + <route url="/V1/carts" method="PUT"> + <service class="Magento\Quote\Api\QuoteRepositoryInterface" method="getList"/> + <resources> + <resource ref="Magento_Catalog::products" /> + </resources> + </route> <route url="/V1/carts/:cartId/selected-shipping-method" method="PUT"> <service class="Magento\Quote\Api\ShippingMethodManagementInterface" method="set"/> <resources> -- GitLab From a1c5c33d885a186a5e7064064c0555324bd7dca1 Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Thu, 15 Jan 2015 10:17:54 +0200 Subject: [PATCH 040/114] MAGETWO-31578: Implement tool for adding annotations to existing code - added new defects annotations after merge --- app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php | 1 + .../Magento/Catalog/Block/Product/ProductList/Toolbar.php | 1 + app/code/Magento/Catalog/Block/Product/View.php | 1 + .../Model/Resource/Product/Indexer/Price/DefaultPrice.php | 1 + app/code/Magento/Catalog/Pricing/Render/PriceBox.php | 1 + .../Model/Resource/Indexer/Stock/DefaultStock.php | 1 + app/code/Magento/CatalogRule/Model/Resource/Rule.php | 3 +++ .../Magento/CatalogSearch/Model/Layer/Filter/Price.php | 1 + app/code/Magento/Dhl/Model/Carrier.php | 1 + app/code/Magento/Downloadable/Model/Product/Type.php | 1 + .../Eav/Model/Entity/Attribute/Backend/AbstractBackend.php | 4 ++++ app/code/Magento/Payment/Model/Method/AbstractMethod.php | 1 + app/code/Magento/Sales/Model/Order/Payment/Transaction.php | 1 + app/code/Magento/Sales/Model/Order/Shipment/Track.php | 1 + app/code/Magento/Sales/Model/Quote/Payment.php | 1 + .../Magento/Shipping/Model/Carrier/AbstractCarrier.php | 7 +++++++ app/code/Magento/Store/Model/Storage/Db.php | 1 + app/code/Magento/Ui/Component/Form.php | 1 + app/code/Magento/Ui/Component/Layout/AbstractStructure.php | 1 + app/code/Magento/Ui/Component/Listing.php | 1 + .../Magento/Tax/Model/Calculation/RateRepositoryTest.php | 3 +++ lib/internal/Magento/Framework/DB/Tree.php | 3 +++ lib/internal/Magento/Framework/Event/Observer/Cron.php | 1 + lib/internal/Magento/Framework/Filesystem/Driver/Http.php | 2 ++ lib/internal/Magento/Framework/HTTP/Client/Socket.php | 2 ++ .../Framework/Interception/PluginList/PluginList.php | 3 +++ lib/internal/Magento/Framework/Translate/Inline.php | 1 + 27 files changed, 46 insertions(+) diff --git a/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php b/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php index 411ac7cf445..b69238d5e19 100644 --- a/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php +++ b/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php @@ -79,6 +79,7 @@ class Calculator implements BundleCalculatorInterface * @param null|string $exclude * @param null|array $context * @return \Magento\Framework\Pricing\Amount\AmountInterface + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getAmount($amount, SaleableInterface $saleableItem, $exclude = null, $context = []) { diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php index ebac80d1bbb..4b286dda352 100644 --- a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php +++ b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php @@ -12,6 +12,7 @@ use Magento\Catalog\Model\Product\ProductList\Toolbar as ToolbarModel; * * @author Magento Core Team <core@magentocommerce.com> * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Toolbar extends \Magento\Framework\View\Element\Template { diff --git a/app/code/Magento/Catalog/Block/Product/View.php b/app/code/Magento/Catalog/Block/Product/View.php index ee82d0c10c5..459dfa92322 100644 --- a/app/code/Magento/Catalog/Block/Product/View.php +++ b/app/code/Magento/Catalog/Block/Product/View.php @@ -9,6 +9,7 @@ use Magento\Catalog\Model\Product; /** * Product View block + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class View extends AbstractProduct implements \Magento\Framework\View\Block\IdentityInterface { diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price/DefaultPrice.php b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price/DefaultPrice.php index c5763f1ac0a..d90b71eb418 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price/DefaultPrice.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price/DefaultPrice.php @@ -643,6 +643,7 @@ class DefaultPrice extends \Magento\Catalog\Model\Resource\Product\Indexer\Abstr * * @param string $table * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getIdxTable($table = null) { diff --git a/app/code/Magento/Catalog/Pricing/Render/PriceBox.php b/app/code/Magento/Catalog/Pricing/Render/PriceBox.php index a99acfa5cb5..4b2cbf9a802 100644 --- a/app/code/Magento/Catalog/Pricing/Render/PriceBox.php +++ b/app/code/Magento/Catalog/Pricing/Render/PriceBox.php @@ -38,6 +38,7 @@ class PriceBox extends PriceBoxRender * @param Data $coreDataHelper * @param Random $mathRandom * @param array $data + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct( Context $context, diff --git a/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/DefaultStock.php b/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/DefaultStock.php index a212b6c13dd..9201ec2a4f1 100644 --- a/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/DefaultStock.php +++ b/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/DefaultStock.php @@ -280,6 +280,7 @@ class DefaultStock extends \Magento\Catalog\Model\Resource\Product\Indexer\Abstr * * @param string $table * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getIdxTable($table = null) { diff --git a/app/code/Magento/CatalogRule/Model/Resource/Rule.php b/app/code/Magento/CatalogRule/Model/Resource/Rule.php index c190214d713..3a4cbe36ca4 100644 --- a/app/code/Magento/CatalogRule/Model/Resource/Rule.php +++ b/app/code/Magento/CatalogRule/Model/Resource/Rule.php @@ -14,6 +14,9 @@ use Magento\Catalog\Model\Product; use Magento\Framework\Model\AbstractModel; use Magento\Framework\Pricing\PriceCurrencyInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Rule extends \Magento\Rule\Model\Resource\AbstractResource { /** diff --git a/app/code/Magento/CatalogSearch/Model/Layer/Filter/Price.php b/app/code/Magento/CatalogSearch/Model/Layer/Filter/Price.php index 4081154e8e6..67fbe038458 100644 --- a/app/code/Magento/CatalogSearch/Model/Layer/Filter/Price.php +++ b/app/code/Magento/CatalogSearch/Model/Layer/Filter/Price.php @@ -54,6 +54,7 @@ class Price extends AbstractFilter * @param \Magento\Catalog\Model\Layer\Filter\Dynamic\AlgorithmFactory $algorithmFactory * @param array $data * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct( \Magento\Catalog\Model\Layer\Filter\ItemFactory $filterItemFactory, diff --git a/app/code/Magento/Dhl/Model/Carrier.php b/app/code/Magento/Dhl/Model/Carrier.php index aaf416d8e92..1558e774f3a 100644 --- a/app/code/Magento/Dhl/Model/Carrier.php +++ b/app/code/Magento/Dhl/Model/Carrier.php @@ -1306,6 +1306,7 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin * * @param \Magento\Framework\Object|null $params * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getContainerTypes(\Magento\Framework\Object $params = null) { diff --git a/app/code/Magento/Downloadable/Model/Product/Type.php b/app/code/Magento/Downloadable/Model/Product/Type.php index 28621b660e5..614674ba26c 100644 --- a/app/code/Magento/Downloadable/Model/Product/Type.php +++ b/app/code/Magento/Downloadable/Model/Product/Type.php @@ -495,6 +495,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\Virtual * @param \Magento\Catalog\Model\Product $product * @param \Magento\Framework\Object $buyRequest * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function processBuyRequest($product, $buyRequest) { 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 d3a56cdde9f..d8ce60e66a4 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/AbstractBackend.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/AbstractBackend.php @@ -245,6 +245,7 @@ abstract class AbstractBackend implements \Magento\Eav\Model\Entity\Attribute\Ba * * @param \Magento\Framework\Object $object * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterLoad($object) { @@ -272,6 +273,7 @@ abstract class AbstractBackend implements \Magento\Eav\Model\Entity\Attribute\Ba * * @param \Magento\Framework\Object $object * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterSave($object) { @@ -283,6 +285,7 @@ abstract class AbstractBackend implements \Magento\Eav\Model\Entity\Attribute\Ba * * @param \Magento\Framework\Object $object * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeDelete($object) { @@ -294,6 +297,7 @@ abstract class AbstractBackend implements \Magento\Eav\Model\Entity\Attribute\Ba * * @param \Magento\Framework\Object $object * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterDelete($object) { diff --git a/app/code/Magento/Payment/Model/Method/AbstractMethod.php b/app/code/Magento/Payment/Model/Method/AbstractMethod.php index eeb33441e6c..e6f7477b4dd 100644 --- a/app/code/Magento/Payment/Model/Method/AbstractMethod.php +++ b/app/code/Magento/Payment/Model/Method/AbstractMethod.php @@ -425,6 +425,7 @@ abstract class AbstractMethod extends \Magento\Framework\Object implements Metho * * @param string $currencyCode * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function canUseForCurrency($currencyCode) { diff --git a/app/code/Magento/Sales/Model/Order/Payment/Transaction.php b/app/code/Magento/Sales/Model/Order/Payment/Transaction.php index 0499e74c01b..9b8065dc1c5 100644 --- a/app/code/Magento/Sales/Model/Order/Payment/Transaction.php +++ b/app/code/Magento/Sales/Model/Order/Payment/Transaction.php @@ -307,6 +307,7 @@ class Transaction extends AbstractExtensibleModel implements TransactionInterfac * @return Transaction[] * @SuppressWarnings(PHPMD.CyclomaticComplexity) * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getChildTransactions($types = null, $txnId = null, $recursive = false) { diff --git a/app/code/Magento/Sales/Model/Order/Shipment/Track.php b/app/code/Magento/Sales/Model/Order/Shipment/Track.php index b0411cc1c13..521e520a4e7 100644 --- a/app/code/Magento/Sales/Model/Order/Shipment/Track.php +++ b/app/code/Magento/Sales/Model/Order/Shipment/Track.php @@ -22,6 +22,7 @@ use Magento\Sales\Model\AbstractModel; * @method \Magento\Sales\Model\Order\Shipment\Track setUpdatedAt(string $value) * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Track extends AbstractModel implements ShipmentTrackInterface { diff --git a/app/code/Magento/Sales/Model/Quote/Payment.php b/app/code/Magento/Sales/Model/Quote/Payment.php index b72731e717c..a0eaa8cb840 100644 --- a/app/code/Magento/Sales/Model/Quote/Payment.php +++ b/app/code/Magento/Sales/Model/Quote/Payment.php @@ -41,6 +41,7 @@ use Magento\Framework\Api\AttributeDataBuilder; * @method \Magento\Sales\Model\Quote\Payment setCcSsIssue(string $value) * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Payment extends \Magento\Payment\Model\Info { diff --git a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php index e6c651a302e..f5ec3999aae 100644 --- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php +++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php @@ -165,6 +165,7 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst * * @param Request $request * @return \Magento\Framework\Object + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function requestToShipment($request) { @@ -177,6 +178,7 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst * * @param Request $request * @return \Magento\Framework\Object + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function returnOfShipment($request) { @@ -188,6 +190,7 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst * * @param \Magento\Framework\Object|null $params * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getContainerTypes(\Magento\Framework\Object $params = null) { @@ -264,6 +267,7 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst * * @param \Magento\Framework\Object|null $params * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getDeliveryConfirmationTypes(\Magento\Framework\Object $params = null) { @@ -320,6 +324,7 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst * * @param \Magento\Sales\Model\Quote\Address\RateRequest $request * @return $this|bool|Error + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function proccessAdditionalValidation(\Magento\Sales\Model\Quote\Address\RateRequest $request) { @@ -562,6 +567,7 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst * * @param string|null $countryId * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function isZipCodeRequired($countryId = null) { @@ -618,6 +624,7 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst * * @param \Magento\Framework\Object $params * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getContentTypes(\Magento\Framework\Object $params) { diff --git a/app/code/Magento/Store/Model/Storage/Db.php b/app/code/Magento/Store/Model/Storage/Db.php index feaeb575483..43d7ecaf7ea 100644 --- a/app/code/Magento/Store/Model/Storage/Db.php +++ b/app/code/Magento/Store/Model/Storage/Db.php @@ -440,6 +440,7 @@ class Db implements \Magento\Store\Model\StoreManagerInterface * @param bool $withDefault * @param bool $codeKey * @return Group[] + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getGroups($withDefault = false, $codeKey = false) { diff --git a/app/code/Magento/Ui/Component/Form.php b/app/code/Magento/Ui/Component/Form.php index 956bc06a045..2f23ac5d24a 100644 --- a/app/code/Magento/Ui/Component/Form.php +++ b/app/code/Magento/Ui/Component/Form.php @@ -18,6 +18,7 @@ use Magento\Ui\DataProvider\Manager; /** * Class Form + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Form extends AbstractView { diff --git a/app/code/Magento/Ui/Component/Layout/AbstractStructure.php b/app/code/Magento/Ui/Component/Layout/AbstractStructure.php index be4d9ba4f35..9d71dc7a943 100644 --- a/app/code/Magento/Ui/Component/Layout/AbstractStructure.php +++ b/app/code/Magento/Ui/Component/Layout/AbstractStructure.php @@ -19,6 +19,7 @@ use Magento\Ui\DataProvider\Metadata; /** * Class AbstractStructure + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AbstractStructure extends AbstractView { diff --git a/app/code/Magento/Ui/Component/Listing.php b/app/code/Magento/Ui/Component/Listing.php index 774d15ef1c5..3e51a2debd9 100644 --- a/app/code/Magento/Ui/Component/Listing.php +++ b/app/code/Magento/Ui/Component/Listing.php @@ -17,6 +17,7 @@ use Magento\Ui\DataProvider\Manager; /** * Class Listing + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Listing extends AbstractView { diff --git a/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RateRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RateRepositoryTest.php index e35fbb77d47..d8e5d5b3252 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RateRepositoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RateRepositoryTest.php @@ -11,6 +11,9 @@ use Magento\Tax\Api\Data\TaxRateInterface; use Magento\Tax\Model\TaxRuleFixtureFactory; use Magento\TestFramework\Helper\Bootstrap; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class RateRepositoryTest extends \PHPUnit_Framework_TestCase { /** diff --git a/lib/internal/Magento/Framework/DB/Tree.php b/lib/internal/Magento/Framework/DB/Tree.php index c87b9bf2a29..64cabacc123 100644 --- a/lib/internal/Magento/Framework/DB/Tree.php +++ b/lib/internal/Magento/Framework/DB/Tree.php @@ -15,6 +15,9 @@ use Magento\Framework\DB\Tree\TreeException; * Magento Library */ require_once 'Tree/TreeException.php'; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Tree { /** diff --git a/lib/internal/Magento/Framework/Event/Observer/Cron.php b/lib/internal/Magento/Framework/Event/Observer/Cron.php index 755b758d939..5b04ea85088 100644 --- a/lib/internal/Magento/Framework/Event/Observer/Cron.php +++ b/lib/internal/Magento/Framework/Event/Observer/Cron.php @@ -19,6 +19,7 @@ class Cron extends \Magento\Framework\Event\Observer * * @param \Magento\Framework\Event $event * @return boolean + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function isValidFor(\Magento\Framework\Event $event) { diff --git a/lib/internal/Magento/Framework/Filesystem/Driver/Http.php b/lib/internal/Magento/Framework/Filesystem/Driver/Http.php index a02d624ba25..a2f110beea8 100644 --- a/lib/internal/Magento/Framework/Filesystem/Driver/Http.php +++ b/lib/internal/Magento/Framework/Filesystem/Driver/Http.php @@ -123,6 +123,7 @@ class Http extends File * @param string $mode * @return resource file * @throws FilesystemException + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function fileOpen($path, $mode) { @@ -202,6 +203,7 @@ class Http extends File * @param string $path * @param string|null $scheme * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getAbsolutePath($basePath, $path, $scheme = null) { diff --git a/lib/internal/Magento/Framework/HTTP/Client/Socket.php b/lib/internal/Magento/Framework/HTTP/Client/Socket.php index ed837b4cdbb..ba96471a987 100644 --- a/lib/internal/Magento/Framework/HTTP/Client/Socket.php +++ b/lib/internal/Magento/Framework/HTTP/Client/Socket.php @@ -523,6 +523,7 @@ class Socket implements \Magento\Framework\HTTP\ClientInterface * * @param array $arr * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setOptions($arr) { @@ -535,6 +536,7 @@ class Socket implements \Magento\Framework\HTTP\ClientInterface * @param string $name * @param string $value * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setOption($name, $value) { diff --git a/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php b/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php index 083b8c3cf77..08ad29e8174 100644 --- a/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php +++ b/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php @@ -18,6 +18,9 @@ use Magento\Framework\ObjectManager\DefinitionInterface as ClassDefinitions; use Magento\Framework\ObjectManagerInterface; use Zend\Soap\Exception\InvalidArgumentException; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class PluginList extends Scoped implements InterceptionPluginList { /** diff --git a/lib/internal/Magento/Framework/Translate/Inline.php b/lib/internal/Magento/Framework/Translate/Inline.php index c3cbbc129a8..28c6e25275f 100644 --- a/lib/internal/Magento/Framework/Translate/Inline.php +++ b/lib/internal/Magento/Framework/Translate/Inline.php @@ -168,6 +168,7 @@ class Inline implements \Magento\Framework\Translate\InlineInterface * * @param mixed|string|null $tagName * @return null + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getAdditionalHtmlAttribute($tagName = null) { -- GitLab From 02dc902b42571e853065bc9591a4b4112c784491 Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Thu, 15 Jan 2015 11:19:33 +0200 Subject: [PATCH 041/114] MAGETWO-32498: Implement Checkout Agreement interfaces --- .../Api/CheckoutAgreementsRepositoryTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php index e314560a63c..392219a98f1 100644 --- a/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php @@ -19,9 +19,9 @@ class CheckoutAgreementsRepositoryTest extends WebapiAbstract { $this->listServiceInfo = [ 'soap' => [ - 'service' => 'checkoutAgreementsRepositoryInterfaceV1', + 'service' => 'checkoutAgreementsCheckoutAgreementsRepositoryV1', 'serviceVersion' => 'V1', - 'operation' => 'checkoutAgreementsRepositoryInterfaceV1GetList', + 'operation' => 'checkoutAgreementsCheckoutAgreementsRepositoryV1getList', ], 'rest' => [ 'resourcePath' => '/V1/carts/licence/', @@ -74,7 +74,7 @@ class CheckoutAgreementsRepositoryTest extends WebapiAbstract $agreements = $this->_webApiCall($this->listServiceInfo, []); $this->assertCount(1, $agreements); $agreementData = $agreements[0]; - $this->assertEquals($agreementModel->getId(), $agreementData['id']); + $this->assertEquals($agreementModel->getId(), $agreementData['agreement_id']); $this->assertEquals($agreementModel->getName(), $agreementData['name']); $this->assertEquals($agreementModel->getContent(), $agreementData['content']); $this->assertEquals($agreementModel->getContentHeight(), $agreementData['content_height']); -- GitLab From f8e060ab8d06086526232424fd71b9dd1a320d2f Mon Sep 17 00:00:00 2001 From: Serhiy Shkolyarenko <sshkolyarenko@ebay.com> Date: Thu, 15 Jan 2015 12:50:47 +0200 Subject: [PATCH 042/114] MAGETWO-32009: Catalog category model and tables cleaning renamed interfaces back added test --- ...erface.php => CartManagementInterface.php} | 4 +- ...erface.php => CartRepositoryInterface.php} | 8 +- .../{QuoteInterface.php => CartInterface.php} | 2 +- ...ace.php => CartSearchResultsInterface.php} | 4 +- .../Magento/Quote/Model/QuoteRepository.php | 8 +- .../Quote/Model/QuoteSearchResults.php | 4 +- app/code/Magento/Quote/etc/di.xml | 2 + app/code/Magento/Quote/etc/webapi.xml | 4 +- .../Quote/Api/CartRepositoryInterfaceTest.php | 252 ++++++++++++++++++ 9 files changed, 270 insertions(+), 18 deletions(-) rename app/code/Magento/Quote/Api/{QuoteManagementInterface.php => CartManagementInterface.php} (96%) rename app/code/Magento/Quote/Api/{QuoteRepositoryInterface.php => CartRepositoryInterface.php} (67%) rename app/code/Magento/Quote/Api/Data/{QuoteInterface.php => CartInterface.php} (97%) rename app/code/Magento/Quote/Api/Data/{QuoteSearchResultsInterface.php => CartSearchResultsInterface.php} (60%) create mode 100644 dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php diff --git a/app/code/Magento/Quote/Api/QuoteManagementInterface.php b/app/code/Magento/Quote/Api/CartManagementInterface.php similarity index 96% rename from app/code/Magento/Quote/Api/QuoteManagementInterface.php rename to app/code/Magento/Quote/Api/CartManagementInterface.php index 009045747e4..62a8d8827d0 100644 --- a/app/code/Magento/Quote/Api/QuoteManagementInterface.php +++ b/app/code/Magento/Quote/Api/CartManagementInterface.php @@ -5,7 +5,7 @@ */ namespace Magento\Quote\Api; -interface QuoteManagementInterface +interface CartManagementInterface { /** * Enables an administrative or guest user to create an empty cart and quote for an anonymous customer. @@ -21,7 +21,7 @@ interface QuoteManagementInterface * Returns information for the cart for a specified customer. * * @param int $customerId The customer ID. - * @return \Magento\Quote\Api\Data\QuoteInterface Cart object. + * @return \Magento\Quote\Api\Data\CartInterface Cart object. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified customer does not exist. * @see \Magento\Checkout\Service\V1\Cart\ReadServiceInterface::getCartForCustomer */ diff --git a/app/code/Magento/Quote/Api/QuoteRepositoryInterface.php b/app/code/Magento/Quote/Api/CartRepositoryInterface.php similarity index 67% rename from app/code/Magento/Quote/Api/QuoteRepositoryInterface.php rename to app/code/Magento/Quote/Api/CartRepositoryInterface.php index 23170cd8465..63db4ccd4c0 100644 --- a/app/code/Magento/Quote/Api/QuoteRepositoryInterface.php +++ b/app/code/Magento/Quote/Api/CartRepositoryInterface.php @@ -5,15 +5,14 @@ */ namespace Magento\Quote\Api; -interface QuoteRepositoryInterface +interface CartRepositoryInterface { /** * Enables an administrative user to return information for a specified cart. * * @param int $cartId - * @return \Magento\Quote\Api\Data\QuoteInterface + * @return \Magento\Quote\Api\Data\CartInterface * @throws \Magento\Framework\Exception\NoSuchEntityException - * @see \Magento\Checkout\Service\V1\Cart\ReadServiceInterface::getCart */ public function get($cartId); @@ -21,8 +20,7 @@ interface QuoteRepositoryInterface * Enables administrative users to list carts that match specified search criteria. * * @param \Magento\Framework\Api\SearchCriteria $searchCriteria - * @return \Magento\Quote\Api\Data\QuoteSearchResultsInterface - * @see \Magento\Checkout\Service\V1\Cart\ReadServiceInterface::getCartList + * @return \Magento\Quote\Api\Data\CartSearchResultsInterface */ public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); } diff --git a/app/code/Magento/Quote/Api/Data/QuoteInterface.php b/app/code/Magento/Quote/Api/Data/CartInterface.php similarity index 97% rename from app/code/Magento/Quote/Api/Data/QuoteInterface.php rename to app/code/Magento/Quote/Api/Data/CartInterface.php index 1eda3aac4ed..c509aa358f9 100644 --- a/app/code/Magento/Quote/Api/Data/QuoteInterface.php +++ b/app/code/Magento/Quote/Api/Data/CartInterface.php @@ -5,7 +5,7 @@ */ namespace Magento\Quote\Api\Data; -interface QuoteInterface extends \Magento\Framework\Api\ExtensibleDataInterface +interface CartInterface extends \Magento\Framework\Api\ExtensibleDataInterface { /** * Returns the cart/quote ID. diff --git a/app/code/Magento/Quote/Api/Data/QuoteSearchResultsInterface.php b/app/code/Magento/Quote/Api/Data/CartSearchResultsInterface.php similarity index 60% rename from app/code/Magento/Quote/Api/Data/QuoteSearchResultsInterface.php rename to app/code/Magento/Quote/Api/Data/CartSearchResultsInterface.php index 9e0c404d843..7ffaa3fafb7 100644 --- a/app/code/Magento/Quote/Api/Data/QuoteSearchResultsInterface.php +++ b/app/code/Magento/Quote/Api/Data/CartSearchResultsInterface.php @@ -5,12 +5,12 @@ */ namespace Magento\Quote\Api\Data; -interface QuoteSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface +interface CartSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface { /** * Get carts list. * - * @return \Magento\Quote\Api\Data\QuoteInterface[] + * @return \Magento\Quote\Api\Data\CartInterface[] */ public function getItems(); } diff --git a/app/code/Magento/Quote/Model/QuoteRepository.php b/app/code/Magento/Quote/Model/QuoteRepository.php index 2a56c93ed09..17c845eeecb 100644 --- a/app/code/Magento/Quote/Model/QuoteRepository.php +++ b/app/code/Magento/Quote/Model/QuoteRepository.php @@ -13,7 +13,7 @@ use Magento\Framework\Api\Search\FilterGroup; use Magento\Quote\Model\Resource\Quote\Collection as QuoteCollection; use Magento\Framework\Exception\InputException; -class QuoteRepository implements \Magento\Quote\Api\QuoteRepositoryInterface +class QuoteRepository implements \Magento\Quote\Api\CartRepositoryInterface { /** * @var Quote[] @@ -41,7 +41,7 @@ class QuoteRepository implements \Magento\Quote\Api\QuoteRepositoryInterface protected $quoteCollection; /** - * @var \Magento\Quote\Api\Data\QuoteSearchResultsDataBuilder + * @var \Magento\Quote\Api\Data\CartSearchResultsDataBuilder */ protected $searchResultsBuilder; @@ -49,13 +49,13 @@ class QuoteRepository implements \Magento\Quote\Api\QuoteRepositoryInterface * @param QuoteFactory $quoteFactory * @param StoreManagerInterface $storeManager * @param \Magento\Quote\Model\Resource\Quote\Collection $quoteCollection - * @param \Magento\Quote\Api\Data\QuoteSearchResultsDataBuilder $searchResultsBuilder + * @param \Magento\Quote\Api\Data\CartSearchResultsDataBuilder $searchResultsBuilder */ public function __construct( QuoteFactory $quoteFactory, StoreManagerInterface $storeManager, \Magento\Quote\Model\Resource\Quote\Collection $quoteCollection, - \Magento\Quote\Api\Data\QuoteSearchResultsDataBuilder $searchResultsBuilder + \Magento\Quote\Api\Data\CartSearchResultsDataBuilder $searchResultsBuilder ) { $this->quoteFactory = $quoteFactory; $this->storeManager = $storeManager; diff --git a/app/code/Magento/Quote/Model/QuoteSearchResults.php b/app/code/Magento/Quote/Model/QuoteSearchResults.php index d84949810d3..0e091f17510 100644 --- a/app/code/Magento/Quote/Model/QuoteSearchResults.php +++ b/app/code/Magento/Quote/Model/QuoteSearchResults.php @@ -10,12 +10,12 @@ namespace Magento\Quote\Model; */ class QuoteSearchResults extends \Magento\Framework\Api\SearchResults - implements \Magento\Quote\Api\Data\QuoteSearchResultsInterface + implements \Magento\Quote\Api\Data\CartSearchResultsInterface { /** * Get items * - * @return \Magento\Quote\Api\Data\QuoteInterface[] + * @return \Magento\Quote\Api\Data\CartInterface[] */ public function getItems() { diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index 4ca0e5cafd6..b83a6fc94db 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -17,4 +17,6 @@ </type> <preference for="Magento\Quote\Api\Data\CartItemInterface" type="Magento\Quote\Model\Quote\Item" /> <preference for="Magento\Quote\Api\CartItemRepositoryInterface" type="Magento\Quote\Model\Quote\Item\Repository" /> + <preference for="Magento\Quote\Api\CartRepositoryInterface" type="Magento\Quote\Model\QuoteRepository" /> + <preference for="Magento\Quote\Api\Data\CartSearchResultsInterface" type="Magento\Quote\Model\QuoteSearchResults" /> </config> diff --git a/app/code/Magento/Quote/etc/webapi.xml b/app/code/Magento/Quote/etc/webapi.xml index ff5e1b6d135..d3f72aa0211 100644 --- a/app/code/Magento/Quote/etc/webapi.xml +++ b/app/code/Magento/Quote/etc/webapi.xml @@ -8,13 +8,13 @@ <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../app/code/Magento/Webapi/etc/webapi.xsd"> <route url="/V1/carts/:cartId" method="GET"> - <service class="Magento\Quote\Api\QuoteRepositoryInterface" method="get"/> + <service class="Magento\Quote\Api\CartRepositoryInterface" method="get"/> <resources> <resource ref="Magento_Catalog::products" /> </resources> </route> <route url="/V1/carts" method="PUT"> - <service class="Magento\Quote\Api\QuoteRepositoryInterface" method="getList"/> + <service class="Magento\Quote\Api\CartRepositoryInterface" method="getList"/> <resources> <resource ref="Magento_Catalog::products" /> </resources> diff --git a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php new file mode 100644 index 00000000000..4babdcf4171 --- /dev/null +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php @@ -0,0 +1,252 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Quote\Api; + +use Magento\Framework\Api\FilterBuilder; +use Magento\Framework\Api\SearchCriteria; +use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Framework\Api\SortOrderBuilder; +use Magento\Framework\Api\SortOrder; +use Magento\TestFramework\ObjectManager; +use Magento\TestFramework\TestCase\WebapiAbstract; +use Magento\Webapi\Model\Rest\Config as RestConfig; + +class CartRepositoryInterfaceTest extends WebapiAbstract +{ + /** + * @var ObjectManager + */ + private $objectManager; + + /** + * @var SearchCriteriaBuilder + */ + private $searchBuilder; + + /** + * @var SortOrderBuilder + */ + private $sortOrderBuilder; + + /** + * @var FilterBuilder + */ + private $filterBuilder; + + protected function setUp() + { + $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + $this->filterBuilder = $this->objectManager->create( + 'Magento\Framework\Api\FilterBuilder' + ); + $this->sortOrderBuilder = $this->objectManager->create( + 'Magento\Framework\Api\SortOrderBuilder' + ); + $this->searchBuilder = $this->objectManager->create( + 'Magento\Framework\Api\SearchCriteriaBuilder' + ); + } + + protected function tearDown() + { + try { + $cart = $this->getCart('test01'); + $cart->delete(); + } catch (\InvalidArgumentException $e) { + // Do nothing if cart fixture was not used + } + parent::tearDown(); + } + + /** + * Retrieve quote by given reserved order ID + * + * @param string $reservedOrderId + * @return \Magento\Quote\Model\Quote + * @throws \InvalidArgumentException + */ + protected function getCart($reservedOrderId) + { + /** @var $cart \Magento\Quote\Model\Quote */ + $cart = $this->objectManager->get('Magento\Quote\Model\Quote'); + $cart->load($reservedOrderId, 'reserved_order_id'); + if (!$cart->getId()) { + throw new \InvalidArgumentException('There is no quote with provided reserved order ID.'); + } + return $cart; + } + + /** + * @magentoApiDataFixture Magento/Sales/_files/quote.php + */ + public function testGetCart() + { + $cart = $this->getCart('test01'); + $cartId = $cart->getId(); + + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => '/V1/carts/' . $cartId, + 'httpMethod' => RestConfig::HTTP_METHOD_GET, + ], + 'soap' => [ + 'service' => 'quoteQuoteRepositoryV1', + 'serviceVersion' => 'V1', + 'operation' => 'quoteQuoteRepositoryV1GetCart', + ], + ]; + + $requestData = ['cartId' => $cartId]; + $cartData = $this->_webApiCall($serviceInfo, $requestData); + $this->assertEquals($cart->getId(), $cartData['id']); + $this->assertEquals($cart->getCreatedAt(), $cartData['created_at']); + $this->assertEquals($cart->getUpdatedAt(), $cartData['updated_at']); + //this check will be uncommented when all cart related services are ready +// $this->assertEquals($cart->getStoreId(), $cartData['store_id']); + $this->assertEquals($cart->getIsActive(), $cartData['is_active']); + $this->assertEquals($cart->getIsVirtual(), $cartData['is_virtual']); + $this->assertEquals($cart->getOrigOrderId(), $cartData['orig_order_id']); + $this->assertEquals($cart->getItemsCount(), $cartData['items_count']); + $this->assertEquals($cart->getItemsQty(), $cartData['items_qty']); + //following checks will be uncommented when all cart related services are ready +// $this->assertContains('customer', $cartData); +// $this->assertEquals(1, $cartData['customer']['is_guest']); +// $this->assertContains('totals', $cartData); +// $this->assertEquals($cart->getSubtotal(), $cartData['totals']['subtotal']); +// $this->assertEquals($cart->getGrandTotal(), $cartData['totals']['grand_total']); +// $this->assertContains('currency', $cartData); +// $this->assertEquals($cart->getGlobalCurrencyCode(), $cartData['currency']['global_currency_code']); +// $this->assertEquals($cart->getBaseCurrencyCode(), $cartData['currency']['base_currency_code']); +// $this->assertEquals($cart->getQuoteCurrencyCode(), $cartData['currency']['quote_currency_code']); +// $this->assertEquals($cart->getStoreCurrencyCode(), $cartData['currency']['store_currency_code']); +// $this->assertEquals($cart->getBaseToGlobalRate(), $cartData['currency']['base_to_global_rate']); +// $this->assertEquals($cart->getBaseToQuoteRate(), $cartData['currency']['base_to_quote_rate']); +// $this->assertEquals($cart->getStoreToBaseRate(), $cartData['currency']['store_to_base_rate']); +// $this->assertEquals($cart->getStoreToQuoteRate(), $cartData['currency']['store_to_quote_rate']); + } + + /** + * @expectedException \Exception + * @expectedExceptionMessage No such entity with + */ + public function testGetCartThrowsExceptionIfThereIsNoCartWithProvidedId() + { + $cartId = 9999; + + $serviceInfo = [ + 'soap' => [ + 'service' => 'quoteQuoteRepositoryV1', + 'serviceVersion' => 'V1', + 'operation' => 'quoteQuoteRepositoryV1GetCart', + ], + 'rest' => [ + 'resourcePath' => '/V1/carts/' . $cartId, + 'httpMethod' => RestConfig::HTTP_METHOD_GET, + ], + ]; + + $requestData = ['cartId' => $cartId]; + $this->_webApiCall($serviceInfo, $requestData); + } + + /** + * @magentoApiDataFixture Magento/Sales/_files/quote.php + */ + public function testGetCartList() + { + $cart = $this->getCart('test01'); + + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => '/V1/carts', + 'httpMethod' => RestConfig::HTTP_METHOD_PUT, + ], + 'soap' => [ + 'service' => 'quoteQuoteRepositoryV1', + 'serviceVersion' => 'V1', + 'operation' => 'quoteQuoteRepositoryV1GetCartList', + ], + ]; + + // The following two filters are used as alternatives. The target cart does not match the first one. + $grandTotalFilter = $this->filterBuilder->setField('grand_total') + ->setConditionType('gteq') + ->setValue(15) + ->create(); + $subtotalFilter = $this->filterBuilder->setField('subtotal') + ->setConditionType('eq') + ->setValue($cart->getSubtotal()) + ->create(); + + $yesterdayDate = (new \DateTime())->sub(new \DateInterval('P1D'))->format('Y-m-d'); + $tomorrowDate = (new \DateTime())->add(new \DateInterval('P1D'))->format('Y-m-d'); + $minCreatedAtFilter = $this->filterBuilder->setField('created_at') + ->setConditionType('gteq') + ->setValue($yesterdayDate) + ->create(); + $maxCreatedAtFilter = $this->filterBuilder->setField('created_at') + ->setConditionType('lteq') + ->setValue($tomorrowDate) + ->create(); + + $this->searchBuilder->addFilter([$grandTotalFilter, $subtotalFilter]); + $this->searchBuilder->addFilter([$minCreatedAtFilter]); + $this->searchBuilder->addFilter([$maxCreatedAtFilter]); + /** @var SortOrder $sortOrder */ + $sortOrder = $this->sortOrderBuilder->setField('subtotal')->setDirection(SearchCriteria::SORT_ASC)->create(); + $this->searchBuilder->setSortOrders([$sortOrder]); + $searchCriteria = $this->searchBuilder->create()->__toArray(); + + $requestData = ['searchCriteria' => $searchCriteria]; + $searchResult = $this->_webApiCall($serviceInfo, $requestData); + $this->assertArrayHasKey('total_count', $searchResult); + $this->assertEquals(1, $searchResult['total_count']); + $this->assertArrayHasKey('items', $searchResult); + $this->assertCount(1, $searchResult['items']); + + $cartData = $searchResult['items'][0]; + $this->assertEquals($cart->getId(), $cartData['id']); + $this->assertEquals($cart->getCreatedAt(), $cartData['created_at']); + $this->assertEquals($cart->getUpdatedAt(), $cartData['updated_at']); + $this->assertEquals($cart->getIsActive(), $cartData['is_active']); + //following checks will be uncommented when all cart related services are ready +// $this->assertEquals($cart->getStoreId(), $cartData['store_id']); + +// $this->assertContains('totals', $cartData); +// $this->assertEquals($cart->getBaseSubtotal(), $cartData['totals']['base_subtotal']); +// $this->assertEquals($cart->getBaseGrandTotal(), $cartData['totals']['base_grand_total']); +// $this->assertContains('customer', $cartData); +// $this->assertEquals(1, $cartData['customer']['is_guest']); + } + + /** + * @expectedException \Exception + */ + public function testGetCartListThrowsExceptionIfProvidedSearchFieldIsInvalid() + { + $serviceInfo = [ + 'soap' => [ + 'service' => 'quoteQuoteRepositoryV1', + 'serviceVersion' => 'V1', + 'operation' => 'quoteQuoteRepositoryV1GetCartList', + ], + 'rest' => [ + 'resourcePath' => '/V1/carts', + 'httpMethod' => RestConfig::HTTP_METHOD_PUT, + ], + ]; + + $invalidFilter = $this->filterBuilder->setField('invalid_field') + ->setConditionType('eq') + ->setValue(0) + ->create(); + + $this->searchBuilder->addFilter([$invalidFilter]); + $searchCriteria = $this->searchBuilder->create()->__toArray(); + $requestData = ['searchCriteria' => $searchCriteria]; + $this->_webApiCall($serviceInfo, $requestData); + } +} -- GitLab From 2e264d181037924dbe7ebd306f581b827c83d8b9 Mon Sep 17 00:00:00 2001 From: Iryna Lagno <ilagno@ebay.com> Date: Thu, 15 Jan 2015 12:59:08 +0200 Subject: [PATCH 043/114] MAGETWO-32504: Implement Cart Items interfaces: -fix after CR --- app/code/Magento/Quote/Api/CartItemRepositoryInterface.php | 2 +- app/code/Magento/Quote/Model/Quote/Item/Repository.php | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Quote/Api/CartItemRepositoryInterface.php b/app/code/Magento/Quote/Api/CartItemRepositoryInterface.php index c1b81ece07d..708f29fef34 100644 --- a/app/code/Magento/Quote/Api/CartItemRepositoryInterface.php +++ b/app/code/Magento/Quote/Api/CartItemRepositoryInterface.php @@ -20,7 +20,7 @@ interface CartItemRepositoryInterface * Adds the specified item to the specified cart. * * @param \Magento\Quote\Api\Data\CartItemInterface $cartItem The item. - * @return \Magento\Quote\Api\Data\CartItemInterface Item ID. + * @return \Magento\Quote\Api\Data\CartItemInterface Item. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. * @throws \Magento\Framework\Exception\CouldNotSaveException The specified item could not be saved to the cart. * @throws \Magento\Framework\Exception\InputException The specified item or cart is not valid. diff --git a/app/code/Magento/Quote/Model/Quote/Item/Repository.php b/app/code/Magento/Quote/Model/Quote/Item/Repository.php index 3bb2ef01ec7..50c79c12f85 100644 --- a/app/code/Magento/Quote/Model/Quote/Item/Repository.php +++ b/app/code/Magento/Quote/Model/Quote/Item/Repository.php @@ -42,7 +42,6 @@ class Repository implements \Magento\Quote\Api\CartItemRepositoryInterface \Magento\Quote\Model\QuoteRepository $quoteRepository, \Magento\Catalog\Api\ProductRepositoryInterface $productRepository, \Magento\Quote\Api\Data\CartItemDataBuilder $itemDataBuilder - ) { $this->quoteRepository = $quoteRepository; $this->productRepository = $productRepository; @@ -95,14 +94,12 @@ class Repository implements \Magento\Quote\Api\CartItemRepositoryInterface } $this->quoteRepository->save($quote->collectTotals()); } catch (\Exception $e) { - if ($e instanceof NoSuchEntityException) - { + if ($e instanceof NoSuchEntityException) { throw $e; } throw new CouldNotSaveException('Could not save quote'); } return $quote->getItemByProduct($product); - } /** -- GitLab From b7469fd99ef2adef5f61cc28e806477b25c7dc77 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Thu, 15 Jan 2015 16:30:58 +0200 Subject: [PATCH 044/114] MAGETWO-32525: Implement Payment methods related interfaces --- .../Checkout/Model/Cart/PaymentMethod.php | 26 ------------ app/code/Magento/Checkout/etc/di.xml | 3 -- app/code/Magento/Checkout/etc/webapi.xml | 18 -------- .../Payment/Model/Method/AbstractMethod.php | 33 +++++++++++---- app/code/Magento/Payment/Model/Method/Cc.php | 28 ++++++++++--- .../Magento/Payment/Model/Method/Free.php | 28 ++++++++++--- .../Api/Data/PaymentInterface.php | 5 +-- .../Api/Data/PaymentMethodInterface.php | 4 +- .../Api/PaymentMethodManagementInterface.php | 13 +++--- .../Model/PaymentMethodManagement.php | 27 +++--------- .../Magento/Quote/Model/Quote/Payment.php | 2 +- app/code/Magento/Quote/etc/di.xml | 2 + app/code/Magento/Quote/etc/webapi.xml | 18 ++++++++ .../Api/PaymentMethodManagementTest.php | 4 +- .../Model/PaymentMethodManagementTest.php | 42 +++++-------------- 15 files changed, 119 insertions(+), 134 deletions(-) delete mode 100644 app/code/Magento/Checkout/Model/Cart/PaymentMethod.php rename app/code/Magento/{Checkout => Quote}/Api/Data/PaymentInterface.php (91%) rename app/code/Magento/{Checkout => Quote}/Api/Data/PaymentMethodInterface.php (72%) rename app/code/Magento/{Checkout => Quote}/Api/PaymentMethodManagementInterface.php (63%) rename app/code/Magento/{Checkout => Quote}/Model/PaymentMethodManagement.php (76%) rename dev/tests/api-functional/testsuite/Magento/{Checkout => Quote}/Api/PaymentMethodManagementTest.php (99%) rename dev/tests/unit/testsuite/Magento/{Checkout => Quote}/Model/PaymentMethodManagementTest.php (91%) diff --git a/app/code/Magento/Checkout/Model/Cart/PaymentMethod.php b/app/code/Magento/Checkout/Model/Cart/PaymentMethod.php deleted file mode 100644 index 90c0af3ca82..00000000000 --- a/app/code/Magento/Checkout/Model/Cart/PaymentMethod.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Model\Cart; - -class PaymentMethod extends \Magento\Framework\Model\AbstractExtensibleModel implements - \Magento\Checkout\Api\Data\PaymentMethodInterface -{ - /** - * {@inheritdoc} - */ - public function getCode() - { - return $this->getData('code'); - } - - /** - * {@inheritdoc} - */ - public function getTitle() - { - return $this->getData('title'); - } -} diff --git a/app/code/Magento/Checkout/etc/di.xml b/app/code/Magento/Checkout/etc/di.xml index d3feb090aaf..6dd7e80ef39 100644 --- a/app/code/Magento/Checkout/etc/di.xml +++ b/app/code/Magento/Checkout/etc/di.xml @@ -34,7 +34,4 @@ <preference for="Magento\Checkout\Service\V1\Coupon\WriteServiceInterface" type="Magento\Checkout\Service\V1\Coupon\WriteService" /> <preference for="Magento\Checkout\Service\V1\PaymentMethod\ReadServiceInterface" type="\Magento\Checkout\Service\V1\PaymentMethod\ReadService" /> <preference for="Magento\Checkout\Service\V1\PaymentMethod\WriteServiceInterface" type="\Magento\Checkout\Service\V1\PaymentMethod\WriteService" /> - <preference for="Magento\Checkout\Api\PaymentMethodManagementInterface" type="\Magento\Checkout\Model\PaymentMethodManagement" /> - <preference for="Magento\Checkout\Api\Data\PaymentInterface" type="\Magento\Quote\Model\Quote\Payment" /> - <preference for="Magento\Checkout\Api\Data\PaymentMethodInterface" type="\Magento\Checkout\Model\Cart\PaymentMethod" /> </config> diff --git a/app/code/Magento/Checkout/etc/webapi.xml b/app/code/Magento/Checkout/etc/webapi.xml index 4d47f2f24bd..3549b196bda 100644 --- a/app/code/Magento/Checkout/etc/webapi.xml +++ b/app/code/Magento/Checkout/etc/webapi.xml @@ -67,24 +67,6 @@ <resource ref="Magento_SalesRule::quote" /> </resources> </route> - <route url="/V1/carts/:cartId/selected-payment-methods" method="GET"> - <service class="Magento\Checkout\Api\PaymentMethodManagementInterface" method="get"/> - <resources> - <resource ref="Magento_Sales::sales" /> - </resources> - </route> - <route url="/V1/carts/:cartId/selected-payment-methods" method="PUT"> - <service class="Magento\Checkout\Api\PaymentMethodManagementInterface" method="set"/> - <resources> - <resource ref="Magento_Sales::sales" /> - </resources> - </route> - <route url="/V1/carts/:cartId/payment-methods" method="GET"> - <service class="Magento\Checkout\Api\PaymentMethodManagementInterface" method="getList"/> - <resources> - <resource ref="Magento_Sales::sales" /> - </resources> - </route> <route url="/V1/carts/:cartId/totals" method="GET"> <service class="Magento\Checkout\Service\V1\Cart\TotalsServiceInterface" method="getTotals"/> <resources> diff --git a/app/code/Magento/Payment/Model/Method/AbstractMethod.php b/app/code/Magento/Payment/Model/Method/AbstractMethod.php index 6774295014a..b56e45ab8de 100644 --- a/app/code/Magento/Payment/Model/Method/AbstractMethod.php +++ b/app/code/Magento/Payment/Model/Method/AbstractMethod.php @@ -14,7 +14,8 @@ use Magento\Sales\Model\Order\Payment; * Payment method abstract model * @method AbstractMethod setStore() */ -abstract class AbstractMethod extends \Magento\Framework\Object implements MethodInterface, PaymentMethodChecksInterface +abstract class AbstractMethod extends \Magento\Framework\Model\AbstractExtensibleModel implements MethodInterface, + PaymentMethodChecksInterface, \Magento\Quote\Api\Data\PaymentMethodInterface { const ACTION_ORDER = 'order'; @@ -210,24 +211,40 @@ abstract class AbstractMethod extends \Magento\Framework\Object implements Metho protected $logger; /** - * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Psr\Log\LoggerInterface $logger + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService + * @param \Magento\Framework\Api\AttributeDataBuilder $customAttributeBuilder + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Psr\Log\LoggerInterface $logger, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, + \Magento\Framework\Api\MetadataServiceInterface $metadataService, + \Magento\Framework\Api\AttributeDataBuilder $customAttributeBuilder, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = [] ) { - parent::__construct($data); - $this->logger = $logger; - $this->_eventManager = $eventManager; + parent::__construct( + $context, + $registry, + $metadataService, + $customAttributeBuilder, + $resource, + $resourceCollection, + $data + ); $this->_paymentData = $paymentData; $this->_scopeConfig = $scopeConfig; + $this->_eventManager = $context->getEventDispatcher(); + $this->logger = $context->getLogger(); } /** diff --git a/app/code/Magento/Payment/Model/Method/Cc.php b/app/code/Magento/Payment/Model/Method/Cc.php index 031f6155cbf..4afbf98a8af 100644 --- a/app/code/Magento/Payment/Model/Method/Cc.php +++ b/app/code/Magento/Payment/Model/Method/Cc.php @@ -40,26 +40,44 @@ class Cc extends \Magento\Payment\Model\Method\AbstractMethod protected $_centinelService; /** - * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Psr\Log\LoggerInterface $logger + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService + * @param \Magento\Framework\Api\AttributeDataBuilder $customAttributeBuilder * @param \Magento\Framework\Module\ModuleListInterface $moduleList * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate * @param \Magento\Centinel\Model\Service $centinelService + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Psr\Log\LoggerInterface $logger, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, + \Magento\Framework\Api\MetadataServiceInterface $metadataService, + \Magento\Framework\Api\AttributeDataBuilder $customAttributeBuilder, \Magento\Framework\Module\ModuleListInterface $moduleList, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Centinel\Model\Service $centinelService, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = [] ) { - parent::__construct($eventManager, $paymentData, $scopeConfig, $logger, $data); + parent::__construct( + $paymentData, + $scopeConfig, + $context, + $registry, + $metadataService, + $customAttributeBuilder, + $resource, + $resourceCollection, + $data + ); $this->_moduleList = $moduleList; $this->_localeDate = $localeDate; $this->_centinelService = $centinelService; diff --git a/app/code/Magento/Payment/Model/Method/Free.php b/app/code/Magento/Payment/Model/Method/Free.php index c229101b5a5..aa45bf5ee0f 100644 --- a/app/code/Magento/Payment/Model/Method/Free.php +++ b/app/code/Magento/Payment/Model/Method/Free.php @@ -41,22 +41,40 @@ class Free extends \Magento\Payment\Model\Method\AbstractMethod protected $priceCurrency; /** - * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Psr\Log\LoggerInterface $logger + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService + * @param \Magento\Framework\Api\AttributeDataBuilder $customAttributeBuilder * @param PriceCurrencyInterface $priceCurrency + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Psr\Log\LoggerInterface $logger, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, + \Magento\Framework\Api\MetadataServiceInterface $metadataService, + \Magento\Framework\Api\AttributeDataBuilder $customAttributeBuilder, PriceCurrencyInterface $priceCurrency, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = [] ) { - parent::__construct($eventManager, $paymentData, $scopeConfig, $logger, $data); + parent::__construct( + $paymentData, + $scopeConfig, + $context, + $registry, + $metadataService, + $customAttributeBuilder, + $resource, + $resourceCollection, + $data + ); $this->priceCurrency = $priceCurrency; } diff --git a/app/code/Magento/Checkout/Api/Data/PaymentInterface.php b/app/code/Magento/Quote/Api/Data/PaymentInterface.php similarity index 91% rename from app/code/Magento/Checkout/Api/Data/PaymentInterface.php rename to app/code/Magento/Quote/Api/Data/PaymentInterface.php index aac43e2de04..c6b00bc9cd5 100644 --- a/app/code/Magento/Checkout/Api/Data/PaymentInterface.php +++ b/app/code/Magento/Quote/Api/Data/PaymentInterface.php @@ -3,11 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api\Data; +namespace Magento\Quote\Api\Data; -/** - * @see \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod - */ interface PaymentInterface extends \Magento\Framework\Api\ExtensibleDataInterface { /** diff --git a/app/code/Magento/Checkout/Api/Data/PaymentMethodInterface.php b/app/code/Magento/Quote/Api/Data/PaymentMethodInterface.php similarity index 72% rename from app/code/Magento/Checkout/Api/Data/PaymentMethodInterface.php rename to app/code/Magento/Quote/Api/Data/PaymentMethodInterface.php index 49e295eca1b..3be900400f3 100644 --- a/app/code/Magento/Checkout/Api/Data/PaymentMethodInterface.php +++ b/app/code/Magento/Quote/Api/Data/PaymentMethodInterface.php @@ -3,9 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api\Data; +namespace Magento\Quote\Api\Data; -interface PaymentMethodInterface +interface PaymentMethodInterface extends \Magento\Framework\Api\ExtensibleDataInterface { /** * Get payment method code diff --git a/app/code/Magento/Checkout/Api/PaymentMethodManagementInterface.php b/app/code/Magento/Quote/Api/PaymentMethodManagementInterface.php similarity index 63% rename from app/code/Magento/Checkout/Api/PaymentMethodManagementInterface.php rename to app/code/Magento/Quote/Api/PaymentMethodManagementInterface.php index 67e3838128c..3f6db9a7e12 100644 --- a/app/code/Magento/Checkout/Api/PaymentMethodManagementInterface.php +++ b/app/code/Magento/Quote/Api/PaymentMethodManagementInterface.php @@ -3,29 +3,27 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api; +namespace Magento\Quote\Api; interface PaymentMethodManagementInterface { /** * Adds a specified payment method to a specified shopping cart. * - * @param \Magento\Checkout\Api\Data\PaymentInterface $method The payment method. * @param int $cartId The cart ID. + * @param \Magento\Quote\Api\Data\PaymentInterface $method The payment method. * @return int Payment method ID. * @throws \Magento\Framework\Exception\State\InvalidTransitionException The billing or shipping address is not set, or the specified payment method is not available. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @see \Magento\Checkout\Service\V1\PaymentMethod\WriteServiceInterface::set */ - public function set(\Magento\Checkout\Api\Data\PaymentInterface $method, $cartId); + public function set($cartId, \Magento\Quote\Api\Data\PaymentInterface $method); /** * Returns the payment method for a specified shopping cart. * * @param int $cartId The cart ID. - * @return \Magento\Checkout\Api\Data\PaymentInterface Payment method object. + * @return \Magento\Quote\Api\Data\PaymentInterface Payment method object. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @see \Magento\Checkout\Service\V1\PaymentMethod\ReadServiceInterface::getPayment */ public function get($cartId); @@ -33,9 +31,8 @@ interface PaymentMethodManagementInterface * Lists available payment methods for a specified shopping cart. * * @param int $cartId The cart ID. - * @return \Magento\Checkout\Api\Data\PaymentMethodInterface[] Array of payment methods. + * @return \Magento\Quote\Api\Data\PaymentMethodInterface[] Array of payment methods. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @see \Magento\Checkout\Service\V1\PaymentMethod\ReadServiceInterface::getList */ public function getList($cartId); } diff --git a/app/code/Magento/Checkout/Model/PaymentMethodManagement.php b/app/code/Magento/Quote/Model/PaymentMethodManagement.php similarity index 76% rename from app/code/Magento/Checkout/Model/PaymentMethodManagement.php rename to app/code/Magento/Quote/Model/PaymentMethodManagement.php index 01b848b8f9c..37a61c905ff 100644 --- a/app/code/Magento/Checkout/Model/PaymentMethodManagement.php +++ b/app/code/Magento/Quote/Model/PaymentMethodManagement.php @@ -3,22 +3,17 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Model; +namespace Magento\Quote\Model; use Magento\Framework\Exception\State\InvalidTransitionException; -class PaymentMethodManagement implements \Magento\Checkout\Api\PaymentMethodManagementInterface +class PaymentMethodManagement implements \Magento\Quote\Api\PaymentMethodManagementInterface { /** * @var \Magento\Quote\Model\QuoteRepository */ protected $quoteRepository; - /** - * @var \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod\Builder - */ - protected $paymentMethodBuilder; - /** * @var \Magento\Payment\Model\Checks\ZeroTotal */ @@ -30,19 +25,16 @@ class PaymentMethodManagement implements \Magento\Checkout\Api\PaymentMethodMana protected $methodList; /** - * @param \Magento\Quote\Model\QuoteRepository $quoteRepository + * @param QuoteRepository $quoteRepository * @param \Magento\Payment\Model\Checks\ZeroTotal $zeroTotalValidator * @param \Magento\Payment\Model\MethodList $methodList - * @param \Magento\Checkout\Api\Data\PaymentMethodDataBuilder $paymentMethodBuilder */ public function __construct( \Magento\Quote\Model\QuoteRepository $quoteRepository, \Magento\Payment\Model\Checks\ZeroTotal $zeroTotalValidator, - \Magento\Payment\Model\MethodList $methodList, - \Magento\Checkout\Api\Data\PaymentMethodDataBuilder $paymentMethodBuilder + \Magento\Payment\Model\MethodList $methodList ) { $this->quoteRepository = $quoteRepository; - $this->paymentMethodBuilder = $paymentMethodBuilder; $this->zeroTotalValidator = $zeroTotalValidator; $this->methodList = $methodList; } @@ -50,7 +42,7 @@ class PaymentMethodManagement implements \Magento\Checkout\Api\PaymentMethodMana /** * {@inheritdoc} */ - public function set(\Magento\Checkout\Api\Data\PaymentInterface $method, $cartId) + public function set($cartId, \Magento\Quote\Api\Data\PaymentInterface $method) { /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->quoteRepository->getActive($cartId); @@ -108,15 +100,8 @@ class PaymentMethodManagement implements \Magento\Checkout\Api\PaymentMethodMana */ public function getList($cartId) { - $output = []; /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->quoteRepository->getActive($cartId); - foreach ($this->methodList->getAvailableMethods($quote) as $method) { - $output[] = $this->paymentMethodBuilder - ->setTitle($method->getTitle()) - ->setCode($method->getCode()) - ->create(); - } - return $output; + return $this->methodList->getAvailableMethods($quote); } } diff --git a/app/code/Magento/Quote/Model/Quote/Payment.php b/app/code/Magento/Quote/Model/Quote/Payment.php index 0c7fad0a96d..82d8eb8ae30 100644 --- a/app/code/Magento/Quote/Model/Quote/Payment.php +++ b/app/code/Magento/Quote/Model/Quote/Payment.php @@ -39,7 +39,7 @@ use Magento\Framework\Api\AttributeDataBuilder; * * @author Magento Core Team <core@magentocommerce.com> */ -class Payment extends \Magento\Payment\Model\Info implements \Magento\Checkout\Api\Data\PaymentInterface +class Payment extends \Magento\Payment\Model\Info implements \Magento\Quote\Api\Data\PaymentInterface { /** * @var string diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index b83a6fc94db..8886193fcaf 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -19,4 +19,6 @@ <preference for="Magento\Quote\Api\CartItemRepositoryInterface" type="Magento\Quote\Model\Quote\Item\Repository" /> <preference for="Magento\Quote\Api\CartRepositoryInterface" type="Magento\Quote\Model\QuoteRepository" /> <preference for="Magento\Quote\Api\Data\CartSearchResultsInterface" type="Magento\Quote\Model\QuoteSearchResults" /> + <preference for="Magento\Quote\Api\PaymentMethodManagementInterface" type="\Magento\Quote\Model\PaymentMethodManagement" /> + <preference for="Magento\Quote\Api\Data\PaymentInterface" type="\Magento\Quote\Model\Quote\Payment" /> </config> diff --git a/app/code/Magento/Quote/etc/webapi.xml b/app/code/Magento/Quote/etc/webapi.xml index d3f72aa0211..32323a60f7b 100644 --- a/app/code/Magento/Quote/etc/webapi.xml +++ b/app/code/Magento/Quote/etc/webapi.xml @@ -61,4 +61,22 @@ <resource ref="Magento_Catalog::products" /> </resources> </route> + <route url="/V1/carts/:cartId/selected-payment-methods" method="GET"> + <service class="Magento\Quote\Api\PaymentMethodManagementInterface" method="get"/> + <resources> + <resource ref="Magento_Sales::sales" /> + </resources> + </route> + <route url="/V1/carts/:cartId/selected-payment-methods" method="PUT"> + <service class="Magento\Quote\Api\PaymentMethodManagementInterface" method="set"/> + <resources> + <resource ref="Magento_Sales::sales" /> + </resources> + </route> + <route url="/V1/carts/:cartId/payment-methods" method="GET"> + <service class="Magento\Quote\Api\PaymentMethodManagementInterface" method="getList"/> + <resources> + <resource ref="Magento_Sales::sales" /> + </resources> + </route> </routes> diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Api/PaymentMethodManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/PaymentMethodManagementTest.php similarity index 99% rename from dev/tests/api-functional/testsuite/Magento/Checkout/Api/PaymentMethodManagementTest.php rename to dev/tests/api-functional/testsuite/Magento/Quote/Api/PaymentMethodManagementTest.php index c63868ae042..d1f11c14fec 100644 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Api/PaymentMethodManagementTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/PaymentMethodManagementTest.php @@ -3,14 +3,14 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api; +namespace Magento\Quote\Api; use Magento\Webapi\Model\Rest\Config as RestConfig; class PaymentMethodManagementTest extends \Magento\TestFramework\TestCase\WebapiAbstract { const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'checkoutPaymentMethodManagementV1'; + const SERVICE_NAME = 'quotePaymentMethodManagementV1'; const RESOURCE_PATH = '/V1/carts/'; /** diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/PaymentMethodManagementTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/PaymentMethodManagementTest.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/Checkout/Model/PaymentMethodManagementTest.php rename to dev/tests/unit/testsuite/Magento/Quote/Model/PaymentMethodManagementTest.php index c90913562a6..4b6f2803f69 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/PaymentMethodManagementTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/PaymentMethodManagementTest.php @@ -3,12 +3,12 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Model; +namespace Magento\Quote\Model; class PaymentMethodManagementTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Checkout\Model\PaymentMethodManagement + * @var \Magento\Quote\Model\PaymentMethodManagement */ protected $model; @@ -42,10 +42,10 @@ class PaymentMethodManagementTest extends \PHPUnit_Framework_TestCase $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); $this->methodListMock = $this->getMock('\Magento\Payment\Model\MethodList', [], [], '', false); $this->zeroTotalMock = $this->getMock('\Magento\Payment\Model\Checks\ZeroTotal', [], [], '', false); - $this->paymentMethodBuilder = $this->getMock('\Magento\Checkout\Api\Data\PaymentMethodDataBuilder', [], [], '', false); + $this->paymentMethodBuilder = $this->getMock('\Magento\Quote\Api\Data\PaymentMethodDataBuilder', [], [], '', false); $this->model = $this->objectManager->getObject( - '\Magento\Checkout\Model\PaymentMethodManagement', + '\Magento\Quote\Model\PaymentMethodManagement', [ 'quoteRepository' => $this->quoteRepositoryMock, 'methodList' => $this->methodListMock, @@ -91,38 +91,18 @@ class PaymentMethodManagementTest extends \PHPUnit_Framework_TestCase public function testGetList() { $cartId = 10; - $title = 'title'; - $code = 'code'; - $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); $this->quoteRepositoryMock->expects($this->once()) ->method('getActive') ->with($cartId) ->will($this->returnValue($quoteMock)); - $paymentMethod = $this->getMock('\Magento\Payment\Model\MethodInterface'); - $paymentMethod->expects($this->once())->method('getTitle')->willReturn($title); - $paymentMethod->expects($this->once())->method('getCode')->willReturn($code); - + $paymentMethod = $this->getMock('\Magento\Quote\Api\Data\PaymentMethodInterface'); $this->methodListMock->expects($this->once()) ->method('getAvailableMethods') ->with($quoteMock) ->will($this->returnValue([$paymentMethod])); - - $paymentMethodMock = $this->getMock('\Magento\Checkout\Api\Data\PaymentMethodInterface'); - $this->paymentMethodBuilder->expects($this->once()) - ->method('setTitle') - ->with($title) - ->willReturnSelf(); - $this->paymentMethodBuilder->expects($this->once()) - ->method('setCode') - ->with($code) - ->willReturnSelf(); - $this->paymentMethodBuilder->expects($this->once()) - ->method('create') - ->willReturn($paymentMethodMock); - - $this->assertEquals([$paymentMethodMock], $this->model->getList($cartId)); + $this->assertEquals([$paymentMethod], $this->model->getList($cartId)); } public function testSetVirtualProduct() @@ -193,7 +173,7 @@ class PaymentMethodManagementTest extends \PHPUnit_Framework_TestCase $quoteMock->expects($this->once())->method('save')->willReturnSelf(); $paymentMock->expects($this->once())->method('getId')->willReturn($paymentId); - $this->assertEquals($paymentId, $this->model->set($methodMock, $cartId)); + $this->assertEquals($paymentId, $this->model->set($cartId, $methodMock)); } /** @@ -236,7 +216,7 @@ class PaymentMethodManagementTest extends \PHPUnit_Framework_TestCase $quoteMock->expects($this->once())->method('isVirtual')->willReturn(true); $quoteMock->expects($this->once())->method('getBillingAddress')->willReturn($billingAddressMock); - $this->model->set($methodMock, $cartId); + $this->model->set($cartId, $methodMock); } /** @@ -304,7 +284,7 @@ class PaymentMethodManagementTest extends \PHPUnit_Framework_TestCase ->method('isApplicable') ->with($methodInstance, $quoteMock) ->willReturn(false); - $this->model->set($methodMock, $cartId); + $this->model->set($cartId, $methodMock); } public function testSetSimpleProduct() @@ -375,7 +355,7 @@ class PaymentMethodManagementTest extends \PHPUnit_Framework_TestCase $quoteMock->expects($this->once())->method('save')->willReturnSelf(); $paymentMock->expects($this->once())->method('getId')->willReturn($paymentId); - $this->assertEquals($paymentId, $this->model->set($methodMock, $cartId)); + $this->assertEquals($paymentId, $this->model->set($cartId, $methodMock)); } /** @@ -418,6 +398,6 @@ class PaymentMethodManagementTest extends \PHPUnit_Framework_TestCase $quoteMock->expects($this->once())->method('isVirtual')->willReturn(false); $quoteMock->expects($this->once())->method('getShippingAddress')->willReturn($shippingAddressMock); - $this->model->set($methodMock, $cartId); + $this->model->set($cartId, $methodMock); } } -- GitLab From f00899e8c85eb26045e2301ac6f22256e3a1c737 Mon Sep 17 00:00:00 2001 From: Olexii Korshenko <okorshenko@ebay.com> Date: Thu, 15 Jan 2015 16:32:02 +0200 Subject: [PATCH 045/114] MAGETWO-32518: Implement Billing Address related interfaces - replaced Service classes with new API interfaces --- .../V1/Address/Billing/ReadService.php | 58 ------ .../Address/Billing/ReadServiceInterface.php | 21 -- .../V1/Address/Billing/WriteService.php | 114 ----------- .../Address/Billing/WriteServiceInterface.php | 25 --- .../Checkout/Service/V1/Address/Converter.php | 111 ----------- app/code/Magento/Checkout/etc/di.xml | 2 - app/code/Magento/Checkout/etc/webapi.xml | 24 --- .../Api/BillingAddressManagementInterface.php | 10 +- .../Api/Data/AddressInterface.php | 64 +++++- .../Quote/Model/BillingAddressManagement.php | 80 ++++++++ .../Magento/Quote/Model/Quote/Address.php | 130 +++++++++++- .../Model/QuoteAddressValidator.php} | 10 +- app/code/Magento/Quote/etc/di.xml | 2 + app/code/Magento/Quote/etc/webapi.xml | 24 +++ .../V1/Address/Billing/ReadServiceTest.php | 86 -------- .../Api/BillingAddressManagementTest.php} | 78 ++++++-- .../V1/Address/Billing/ReadServiceTest.php | 49 ----- .../V1/Address/Billing/WriteServiceTest.php | 187 ------------------ .../Service/V1/Address/ConverterTest.php | 150 -------------- .../Model/BillingAddressManagementTest.php | 121 ++++++++++++ .../Cart/ShippingMethodConverterTest.php | 2 +- .../Model/QuoteAddressValidatorTest.php} | 70 ++----- 22 files changed, 500 insertions(+), 918 deletions(-) delete mode 100644 app/code/Magento/Checkout/Service/V1/Address/Billing/ReadService.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Address/Billing/ReadServiceInterface.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Address/Billing/WriteService.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Address/Billing/WriteServiceInterface.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Address/Converter.php rename app/code/Magento/{Checkout => Quote}/Api/BillingAddressManagementInterface.php (61%) rename app/code/Magento/{Checkout => Quote}/Api/Data/AddressInterface.php (64%) create mode 100644 app/code/Magento/Quote/Model/BillingAddressManagement.php rename app/code/Magento/{Checkout/Service/V1/Address/Validator.php => Quote/Model/QuoteAddressValidator.php} (89%) delete mode 100644 dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Address/Billing/ReadServiceTest.php rename dev/tests/api-functional/testsuite/Magento/{Checkout/Service/V1/Address/Billing/WriteServiceTest.php => Quote/Api/BillingAddressManagementTest.php} (50%) delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Billing/ReadServiceTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Billing/WriteServiceTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ConverterTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Quote/Model/BillingAddressManagementTest.php rename dev/tests/unit/testsuite/Magento/{Checkout/Service/V1/Address/ValidatorTest.php => Quote/Model/QuoteAddressValidatorTest.php} (72%) diff --git a/app/code/Magento/Checkout/Service/V1/Address/Billing/ReadService.php b/app/code/Magento/Checkout/Service/V1/Address/Billing/ReadService.php deleted file mode 100644 index 8b6a70d4174..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Address/Billing/ReadService.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Address\Billing; - -use Magento\Checkout\Service\V1\Address\Converter as AddressConverter; - -/** Quote billing address read service object. */ -class ReadService implements ReadServiceInterface -{ - /** - * Quote repository. - * - * @var \Magento\Quote\Model\QuoteRepository - */ - protected $quoteRepository; - - /** - * Address converter. - * - * @var AddressConverter - */ - protected $addressConverter; - - /** - * Constructs a quote billing address object. - * - * @param \Magento\Quote\Model\QuoteRepository $quoteRepository Quote repository. - * @param AddressConverter $addressConverter Address converter. - */ - public function __construct( - \Magento\Quote\Model\QuoteRepository $quoteRepository, - AddressConverter $addressConverter - ) { - $this->quoteRepository = $quoteRepository; - $this->addressConverter = $addressConverter; - } - - /** - * {@inheritDoc} - * - * @param int $cartId The cart ID. - * @return \Magento\Checkout\Service\V1\Data\Cart\Address Quote billing address object. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - */ - public function getAddress($cartId) - { - /** - * Address. - * - * @var \Magento\Quote\Model\Quote\Address $address - */ - $address = $this->quoteRepository->getActive($cartId)->getBillingAddress(); - return $this->addressConverter->convertModelToDataObject($address); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Address/Billing/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Address/Billing/ReadServiceInterface.php deleted file mode 100644 index f9a680ffd6f..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Address/Billing/ReadServiceInterface.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Address\Billing; - -/** Quote billing address read service interface. */ -interface ReadServiceInterface -{ - /** - * Returns the billing address for a specified quote. - * - * @param int $cartId The cart ID. - * @return \Magento\Checkout\Service\V1\Data\Cart\Address Quote billing address object. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @deprecated - * @see \Magento\Checkout\Api\BillingAddressManagementInterface::get - */ - public function getAddress($cartId); -} diff --git a/app/code/Magento/Checkout/Service/V1/Address/Billing/WriteService.php b/app/code/Magento/Checkout/Service/V1/Address/Billing/WriteService.php deleted file mode 100644 index 52ae8d39eba..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Address/Billing/WriteService.php +++ /dev/null @@ -1,114 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Address\Billing; - -use Magento\Checkout\Service\V1\Address\Converter; -use Magento\Checkout\Service\V1\Address\Validator; -use Magento\Quote\Model\Quote\AddressFactory; -use Magento\Quote\Model\QuoteRepository; -use Magento\Framework\Exception\InputException; -use Psr\Log\LoggerInterface as Logger; - -/** Quote billing address write service object. */ -class WriteService implements WriteServiceInterface -{ - /** - * Validator. - * - * @var Validator - */ - protected $addressValidator; - - /** - * Logger. - * - * @var Logger - */ - protected $logger; - - /** - * Address factory. - * - * @var AddressFactory - */ - protected $quoteAddressFactory; - - /** - * Converter. - * - * @var Converter - */ - protected $addressConverter; - - /** - * Quote repository. - * - * @var QuoteRepository - */ - protected $quoteRepository; - - /** - * Constructs a quote billing address service object. - * - * @param QuoteRepository $quoteRepository Quote repository. - * @param Converter $addressConverter Address converter. - * @param Validator $addressValidator Address validator. - * @param AddressFactory $quoteAddressFactory Quote address factory. - * @param Logger $logger Logger. - */ - public function __construct( - QuoteRepository $quoteRepository, - Converter $addressConverter, - Validator $addressValidator, - AddressFactory $quoteAddressFactory, - Logger $logger - ) { - $this->addressValidator = $addressValidator; - $this->logger = $logger; - $this->quoteRepository = $quoteRepository; - $this->quoteAddressFactory = $quoteAddressFactory; - $this->addressConverter = $addressConverter; - } - - /** - * {@inheritDoc} - * - * @param int $cartId The cart ID. - * @param \Magento\Checkout\Service\V1\Data\Cart\Address $addressData Billing address data. - * @return int Address ID. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @throws \Magento\Framework\Exception\InputException The specified cart ID or address data is not valid. - */ - public function setAddress($cartId, $addressData) - { - /** - * Quote. - * - * @var \Magento\Quote\Model\Quote $quote - */ - $quote = $this->quoteRepository->getActive($cartId); - /** - * Address. - * - * @var \Magento\Quote\Model\Quote\Address $address - */ - $address = $this->quoteAddressFactory->create(); - $this->addressValidator->validate($addressData); - if ($addressData->getId()) { - $address->load($addressData->getId()); - } - $address = $this->addressConverter->convertDataObjectToModel($addressData, $address); - $quote->setBillingAddress($address); - $quote->setDataChanges(true); - try { - $this->quoteRepository->save($quote); - } catch (\Exception $e) { - $this->logger->critical($e); - throw new InputException('Unable to save address. Please, check input data.'); - } - return $quote->getBillingAddress()->getId(); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Address/Billing/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Address/Billing/WriteServiceInterface.php deleted file mode 100644 index bf1b27af20c..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Address/Billing/WriteServiceInterface.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Address\Billing; - -/** - * Quote billing address write service interface. - */ -interface WriteServiceInterface -{ - /** - * Assigns a specified billing address to a specified cart. - * - * @param int $cartId The cart ID. - * @param \Magento\Checkout\Service\V1\Data\Cart\Address $addressData Billing address data. - * @return int Address ID. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @throws \Magento\Framework\Exception\InputException The specified cart ID or address data is not valid. - * @deprecated - * @see \Magento\Checkout\Api\BillingAddressManagementInterface::assign - */ - public function setAddress($cartId, $addressData); -} diff --git a/app/code/Magento/Checkout/Service/V1/Address/Converter.php b/app/code/Magento/Checkout/Service/V1/Address/Converter.php deleted file mode 100644 index 344c2e9bba3..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Address/Converter.php +++ /dev/null @@ -1,111 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Address; - -use Magento\Checkout\Service\V1\Data\Cart\Address; -use Magento\Checkout\Service\V1\Data\Cart\AddressBuilder; -use Magento\Checkout\Service\V1\Data\Cart\Address\Region; -use Magento\Customer\Api\CustomerMetadataInterface; -use Magento\Framework\Api\AttributeValue; -use Magento\Framework\Api\SimpleDataObjectConverter; - -/** Quote shipping address converter service. */ -class Converter -{ - /** - * Address builder. - * - * @var AddressBuilder - */ - protected $addressBuilder; - - /** - * Customer metadata service interface. - * - * @var CustomerMetadataInterface - */ - protected $customerMetadata; - - /** - * Constructs a quote shipping address converter service object. - * - * @param AddressBuilder $addressBuilder Address builder. - * @param CustomerMetadataInterface $customerMetadata Metadata service. - */ - public function __construct(AddressBuilder $addressBuilder, CustomerMetadataInterface $customerMetadata) - { - $this->addressBuilder = $addressBuilder; - $this->customerMetadata = $customerMetadata; - } - - /** - * Converts a quote address model to an address data object. - * - * @param \Magento\Quote\Model\Quote\Address $address The quote address model. - * @return \Magento\Checkout\Service\V1\Data\Cart\Address Address data object. - */ - public function convertModelToDataObject(\Magento\Quote\Model\Quote\Address $address) - { - $data = [ - Address::KEY_COUNTRY_ID => $address->getCountryId(), - Address::KEY_ID => $address->getId(), - Address::KEY_CUSTOMER_ID => $address->getCustomerId(), - Address::KEY_REGION => [ - Region::REGION => $address->getRegion(), - Region::REGION_ID => $address->getRegionId(), - Region::REGION_CODE => $address->getRegionCode() - ], - Address::KEY_STREET => $address->getStreet(), - Address::KEY_COMPANY => $address->getCompany(), - Address::KEY_TELEPHONE => $address->getTelephone(), - Address::KEY_FAX => $address->getFax(), - Address::KEY_POSTCODE => $address->getPostcode(), - Address::KEY_CITY => $address->getCity(), - Address::KEY_FIRSTNAME => $address->getFirstname(), - Address::KEY_LASTNAME => $address->getLastname(), - Address::KEY_MIDDLENAME => $address->getMiddlename(), - Address::KEY_PREFIX => $address->getPrefix(), - Address::KEY_SUFFIX => $address->getSuffix(), - Address::KEY_EMAIL => $address->getEmail(), - Address::KEY_VAT_ID => $address->getVatId() - ]; - - foreach ($this->customerMetadata->getCustomAttributesMetadata() as $attributeMetadata) { - $attributeCode = $attributeMetadata->getAttributeCode(); - $method = 'get' . SimpleDataObjectConverter::snakeCaseToUpperCamelCase($attributeCode); - $data[Address::CUSTOM_ATTRIBUTES_KEY][] = - [AttributeValue::ATTRIBUTE_CODE => $attributeCode, AttributeValue::VALUE => $address->$method()]; - } - - return $this->addressBuilder->populateWithArray($data)->create(); - } - - /** - * Converts an address data object to a quote address model. - * - * @param \Magento\Checkout\Service\V1\Data\Cart\Address $dataObject The address data object. - * @param \Magento\Quote\Model\Quote\Address $address The address. - * @return \Magento\Quote\Model\Quote\Address Quote address model. - */ - public function convertDataObjectToModel($dataObject, $address) - { - $address->setData($dataObject->__toArray()); - - //set custom attributes - $customAttributes = $dataObject->getCustomAttributes(); - /** @var \Magento\Framework\Api\AttributeValue $attributeData */ - foreach ($customAttributes as $attributeData) { - $address->setData($attributeData->getAttributeCode(), $attributeData->getValue()); - } - - //set fields with custom logic - $address->setStreet($dataObject->getStreet()); - $address->setRegionId($dataObject->getRegion()->getRegionId()); - $address->setRegion($dataObject->getRegion()->getRegion()); - - return $address; - } -} diff --git a/app/code/Magento/Checkout/etc/di.xml b/app/code/Magento/Checkout/etc/di.xml index 6dd7e80ef39..f18a1cfde4f 100644 --- a/app/code/Magento/Checkout/etc/di.xml +++ b/app/code/Magento/Checkout/etc/di.xml @@ -25,8 +25,6 @@ </type> <preference for="\Magento\Checkout\Service\V1\Address\Shipping\ReadServiceInterface" type="Magento\Checkout\Service\V1\Address\Shipping\ReadService" /> <preference for="\Magento\Checkout\Service\V1\Address\Shipping\WriteServiceInterface" type="Magento\Checkout\Service\V1\Address\Shipping\WriteService" /> - <preference for="\Magento\Checkout\Service\V1\Address\Billing\ReadServiceInterface" type="Magento\Checkout\Service\V1\Address\Billing\ReadService" /> - <preference for="\Magento\Checkout\Service\V1\Address\Billing\WriteServiceInterface" type="Magento\Checkout\Service\V1\Address\Billing\WriteService" /> <preference for="Magento\Checkout\Service\V1\Cart\ReadServiceInterface" type="Magento\Checkout\Service\V1\Cart\ReadService" /> <preference for="Magento\Checkout\Service\V1\Cart\TotalsServiceInterface" type="Magento\Checkout\Service\V1\Cart\TotalsService" /> <preference for="\Magento\Checkout\Service\V1\Cart\WriteServiceInterface" type="Magento\Checkout\Service\V1\Cart\WriteService" /> diff --git a/app/code/Magento/Checkout/etc/webapi.xml b/app/code/Magento/Checkout/etc/webapi.xml index 3549b196bda..0f655ac77ac 100644 --- a/app/code/Magento/Checkout/etc/webapi.xml +++ b/app/code/Magento/Checkout/etc/webapi.xml @@ -25,30 +25,6 @@ <resource ref="Magento_Catalog::products" /> </resources> </route> - <route url="/V1/carts/:cartId/shipping-address" method="GET"> - <service class="Magento\Checkout\Service\V1\Address\Shipping\ReadServiceInterface" method="getAddress"/> - <resources> - <resource ref="Magento_Sales::sales" /> - </resources> - </route> - <route url="/V1/carts/:cartId/shipping-address" method="POST"> - <service class="Magento\Checkout\Service\V1\Address\Shipping\WriteServiceInterface" method="setAddress"/> - <resources> - <resource ref="Magento_Sales::sales" /> - </resources> - </route> - <route url="/V1/carts/:cartId/billing-address" method="GET"> - <service class="Magento\Checkout\Service\V1\Address\Billing\ReadServiceInterface" method="getAddress"/> - <resources> - <resource ref="Magento_Sales::sales" /> - </resources> - </route> - <route url="/V1/carts/:cartId/billing-address" method="POST"> - <service class="Magento\Checkout\Service\V1\Address\Billing\WriteServiceInterface" method="setAddress"/> - <resources> - <resource ref="Magento_Sales::sales" /> - </resources> - </route> <route url="/V1/carts/:cartId/coupons" method="GET"> <service class="Magento\Checkout\Service\V1\Coupon\ReadServiceInterface" method="get"/> <resources> diff --git a/app/code/Magento/Checkout/Api/BillingAddressManagementInterface.php b/app/code/Magento/Quote/Api/BillingAddressManagementInterface.php similarity index 61% rename from app/code/Magento/Checkout/Api/BillingAddressManagementInterface.php rename to app/code/Magento/Quote/Api/BillingAddressManagementInterface.php index bb48d950b57..ebadf462e06 100644 --- a/app/code/Magento/Checkout/Api/BillingAddressManagementInterface.php +++ b/app/code/Magento/Quote/Api/BillingAddressManagementInterface.php @@ -3,7 +3,7 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api; +namespace Magento\Quote\Api; interface BillingAddressManagementInterface { @@ -11,21 +11,19 @@ interface BillingAddressManagementInterface * Assigns a specified billing address to a specified cart. * * @param int $cartId The cart ID. - * @param \Magento\Checkout\Api\Data\AddressInterface $address Billing address data. + * @param \Magento\Quote\Api\Data\AddressInterface $address Billing address data. * @return int Address ID. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. * @throws \Magento\Framework\Exception\InputException The specified cart ID or address data is not valid. - * @see \Magento\Checkout\Service\V1\Address\Billing\WriteServiceInterface::setAddress */ - public function assign($cartId, \Magento\Checkout\Api\Data\AddressInterface $address); + public function assign($cartId, \Magento\Quote\Api\Data\AddressInterface $address); /** * Returns the billing address for a specified quote. * * @param int $cartId The cart ID. - * @return \Magento\Checkout\Api\Data\AddressInterface Quote billing address object. + * @return \Magento\Quote\Api\Data\AddressInterface Quote billing address object. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @see \Magento\Checkout\Service\V1\Address\Billing\ReadServiceInterface::getAddress */ public function get($cartId); } diff --git a/app/code/Magento/Checkout/Api/Data/AddressInterface.php b/app/code/Magento/Quote/Api/Data/AddressInterface.php similarity index 64% rename from app/code/Magento/Checkout/Api/Data/AddressInterface.php rename to app/code/Magento/Quote/Api/Data/AddressInterface.php index 0a0dbbfe8c1..33e74e753f8 100644 --- a/app/code/Magento/Checkout/Api/Data/AddressInterface.php +++ b/app/code/Magento/Quote/Api/Data/AddressInterface.php @@ -3,13 +3,56 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api\Data; +namespace Magento\Quote\Api\Data; /** * @see \Magento\Checkout\Service\V1\Data\Cart\Address */ interface AddressInterface extends \Magento\Framework\Api\ExtensibleDataInterface { + /**#@+ + * Constants defined for keys of array, makes typos less likely + */ + const KEY_EMAIL = 'email'; + + const KEY_COUNTRY_ID = 'country_id'; + + const KEY_ID = 'id'; + + const REGION_ID = 'region_id'; + + const REGION_CODE = 'region_code'; + + const REGION = 'region'; + + const KEY_CUSTOMER_ID = 'customer_id'; + + const KEY_STREET = 'street'; + + const KEY_COMPANY = 'company'; + + const KEY_TELEPHONE = 'telephone'; + + const KEY_FAX = 'fax'; + + const KEY_POSTCODE = 'postcode'; + + const KEY_CITY = 'city'; + + const KEY_FIRSTNAME = 'firstname'; + + const KEY_LASTNAME = 'lastname'; + + const KEY_MIDDLENAME = 'middlename'; + + const KEY_PREFIX = 'prefix'; + + const KEY_SUFFIX = 'suffix'; + + const KEY_VAT_ID = 'vat_id'; + + /**#@-*/ + /** * Get id * @@ -18,13 +61,26 @@ interface AddressInterface extends \Magento\Framework\Api\ExtensibleDataInterfac public function getId(); /** - * Get region + * Get region name * - * @TODO RegionInterface must be in Directory module - * @return \Magento\Customer\Api\Data\RegionInterface|null + * @return string */ public function getRegion(); + /** + * Get region id + * + * @return string + */ + public function getRegionId(); + + /** + * Get region code + * + * @return string + */ + public function getRegionCode(); + /** * Get country id * diff --git a/app/code/Magento/Quote/Model/BillingAddressManagement.php b/app/code/Magento/Quote/Model/BillingAddressManagement.php new file mode 100644 index 00000000000..5e5140fc9e7 --- /dev/null +++ b/app/code/Magento/Quote/Model/BillingAddressManagement.php @@ -0,0 +1,80 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Quote\Model; + +use Magento\Quote\Model\QuoteRepository; +use Magento\Framework\Exception\InputException; +use Psr\Log\LoggerInterface as Logger; +use Magento\Quote\Api\BillingAddressManagementInterface; + +/** Quote billing address write service object. */ +class BillingAddressManagement implements BillingAddressManagementInterface +{ + /** + * Validator. + * + * @var QuoteAddressValidator + */ + protected $addressValidator; + + /** + * Logger. + * + * @var Logger + */ + protected $logger; + + /** + * Quote repository. + * + * @var QuoteRepository + */ + protected $quoteRepository; + + /** + * Constructs a quote billing address service object. + * + * @param QuoteRepository $quoteRepository Quote repository. + * @param QuoteAddressValidator $addressValidator Address validator. + * @param Logger $logger Logger. + */ + public function __construct( + QuoteRepository $quoteRepository, + QuoteAddressValidator $addressValidator, + Logger $logger + ) { + $this->addressValidator = $addressValidator; + $this->logger = $logger; + $this->quoteRepository = $quoteRepository; + } + + /** + * {@inheritDoc} + */ + public function assign($cartId, \Magento\Quote\Api\Data\AddressInterface $address) + { + $quote = $this->quoteRepository->getActive($cartId); + $this->addressValidator->validate($address); + $quote->setBillingAddress($address); + $quote->setDataChanges(true); + try { + $this->quoteRepository->save($quote); + } catch (\Exception $e) { + $this->logger->critical($e); + throw new InputException('Unable to save address. Please, check input data.'); + } + return $quote->getBillingAddress()->getId(); + } + + /** + * {@inheritDoc} + */ + public function get($cartId) + { + $cart = $this->quoteRepository->getActive($cartId); + return $cart->getBillingAddress(); + } +} diff --git a/app/code/Magento/Quote/Model/Quote/Address.php b/app/code/Magento/Quote/Model/Quote/Address.php index 53c5aff52ea..1a908ecdc77 100644 --- a/app/code/Magento/Quote/Model/Quote/Address.php +++ b/app/code/Magento/Quote/Model/Quote/Address.php @@ -19,7 +19,6 @@ use Magento\Framework\Api\AttributeDataBuilder; * @method Address setCreatedAt(string $value) * @method string getUpdatedAt() * @method Address setUpdatedAt(string $value) - * @method int getCustomerId() * @method Address setCustomerId(int $value) * @method int getSaveInAddressBook() * @method Address setSaveInAddressBook(int $value) @@ -29,14 +28,12 @@ use Magento\Framework\Api\AttributeDataBuilder; * @method Address setCustomerAddressData(\Magento\Customer\Api\Data\AddressInterface $value) * @method string getAddressType() * @method Address setAddressType(string $value) - * @method string getEmail() * @method Address setEmail(string $value) * @method Address setPrefix(string $value) * @method Address setFirstname(string $value) * @method Address setMiddlename(string $value) * @method Address setLastname(string $value) * @method Address setSuffix(string $value) - * @method string getCompany() * @method Address setCompany(string $value) * @method Address setCity(string $value) * @method Address setRegion(string $value) @@ -44,7 +41,6 @@ use Magento\Framework\Api\AttributeDataBuilder; * @method Address setPostcode(string $value) * @method Address setCountryId(string $value) * @method Address setTelephone(string $value) - * @method string getFax() * @method Address setFax(string $value) * @method int getSameAsBilling() * @method Address setSameAsBilling(int $value) @@ -113,7 +109,8 @@ use Magento\Framework\Api\AttributeDataBuilder; * @method int[] getAppliedRuleIds() * @method Address setBaseShippingInclTax(float $value) */ -class Address extends \Magento\Customer\Model\Address\AbstractAddress +class Address extends \Magento\Customer\Model\Address\AbstractAddress implements + \Magento\Quote\Api\Data\AddressInterface { const RATES_FETCH = 1; @@ -1420,4 +1417,127 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress { return $this->validator; } + + /** + * {@inheritdoc} + * @codeCoverageIgnoreStart + */ + public function getCountryId() + { + return $this->getData(self::KEY_COUNTRY_ID); + } + + /** + * {@inheritdoc} + */ + public function getStreet() + { + $street = $this->getData(self::KEY_STREET); + return explode("\n", $street); + } + + /** + * {@inheritdoc} + */ + public function getCompany() + { + return $this->getData(self::KEY_COMPANY); + } + + /** + * {@inheritdoc} + */ + public function getTelephone() + { + return $this->getData(self::KEY_TELEPHONE); + } + + /** + * {@inheritdoc} + */ + public function getFax() + { + return $this->getData(self::KEY_FAX); + } + + /** + * {@inheritdoc} + */ + public function getPostcode() + { + return $this->getData(self::KEY_POSTCODE); + } + + /** + * {@inheritdoc} + */ + public function getCity() + { + return $this->getData(self::KEY_CITY); + } + + /** + * {@inheritdoc} + */ + public function getFirstname() + { + return $this->getData(self::KEY_FIRSTNAME); + } + + /** + * {@inheritdoc} + */ + public function getLastname() + { + return $this->getData(self::KEY_LASTNAME); + } + + /** + * {@inheritdoc} + */ + public function getMiddlename() + { + return $this->getData(self::KEY_MIDDLENAME); + } + + /** + * {@inheritdoc} + */ + public function getPrefix() + { + return $this->getData(self::KEY_PREFIX); + } + + /** + * {@inheritdoc} + */ + public function getSuffix() + { + return $this->getData(self::KEY_SUFFIX); + } + + /** + * {@inheritdoc} + */ + public function getVatId() + { + return $this->getData(self::KEY_VAT_ID); + } + + /** + * {@inheritdoc} + */ + public function getCustomerId() + { + return $this->getData(self::KEY_CUSTOMER_ID); + } + + /** + * {@inheritdoc} + */ + public function getEmail() + { + return $this->getData(self::KEY_EMAIL); + } + //@codeCoverageIgnoreEnd } diff --git a/app/code/Magento/Checkout/Service/V1/Address/Validator.php b/app/code/Magento/Quote/Model/QuoteAddressValidator.php similarity index 89% rename from app/code/Magento/Checkout/Service/V1/Address/Validator.php rename to app/code/Magento/Quote/Model/QuoteAddressValidator.php index 1ca1d0677f2..b195066721a 100644 --- a/app/code/Magento/Checkout/Service/V1/Address/Validator.php +++ b/app/code/Magento/Quote/Model/QuoteAddressValidator.php @@ -3,10 +3,10 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\Address; +namespace Magento\Quote\Model; -/** Quote shipping address validator service. */ -class Validator +/** Quote shipping/billing address validator service. */ +class QuoteAddressValidator { /** * Address factory. @@ -39,12 +39,12 @@ class Validator /** * Validates the fields in a specified address data object. * - * @param \Magento\Checkout\Service\V1\Data\Cart\Address $addressData The address data object. + * @param \Magento\Quote\Api\Data\AddressInterface $addressData The address data object. * @return bool * @throws \Magento\Framework\Exception\InputException The specified address belongs to another customer. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified customer ID or address ID is not valid. */ - public function validate($addressData) + public function validate(\Magento\Quote\Api\Data\AddressInterface $addressData) { //validate customer id if ($addressData->getCustomerId()) { diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index 8886193fcaf..b197afcad42 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -8,6 +8,8 @@ <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Quote\Api\ShippingMethodManagementInterface" type="Magento\Quote\Model\ShippingMethodManagement" /> <preference for="Magento\Quote\Api\Data\ShippingMethodInterface" type="Magento\Quote\Model\Cart\ShippingMethod" /> + <preference for="Magento\Quote\Api\BillingAddressManagementInterface" type="Magento\Quote\Model\BillingAddressManagement" /> + <preference for="Magento\Quote\Api\Data\AddressInterface" type="Magento\Quote\Model\Quote\Address" /> <type name="Magento\Framework\Module\Updater\SetupFactory"> <arguments> <argument name="resourceTypes" xsi:type="array"> diff --git a/app/code/Magento/Quote/etc/webapi.xml b/app/code/Magento/Quote/etc/webapi.xml index 32323a60f7b..ad77b5dbf18 100644 --- a/app/code/Magento/Quote/etc/webapi.xml +++ b/app/code/Magento/Quote/etc/webapi.xml @@ -79,4 +79,28 @@ <resource ref="Magento_Sales::sales" /> </resources> </route> + <route url="/V1/carts/:cartId/billing-address" method="GET"> + <service class="Magento\Quote\Api\BillingAddressManagementInterface" method="get"/> + <resources> + <resource ref="Magento_Sales::sales" /> + </resources> + </route> + <route url="/V1/carts/:cartId/billing-address" method="POST"> + <service class="Magento\Quote\Api\BillingAddressManagementInterface" method="assign"/> + <resources> + <resource ref="Magento_Sales::sales" /> + </resources> + </route> + <!--<route url="/V1/carts/:cartId/shipping-address" method="GET">--> + <!--<service class="Magento\Checkout\Service\V1\Address\Shipping\ReadServiceInterface" method="getAddress"/>--> + <!--<resources>--> + <!--<resource ref="Magento_Sales::sales" />--> + <!--</resources>--> + <!--</route>--> + <!--<route url="/V1/carts/:cartId/shipping-address" method="POST">--> + <!--<service class="Magento\Checkout\Service\V1\Address\Shipping\WriteServiceInterface" method="setAddress"/>--> + <!--<resources>--> + <!--<resource ref="Magento_Sales::sales" />--> + <!--</resources>--> + <!--</route>--> </routes> diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Address/Billing/ReadServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Address/Billing/ReadServiceTest.php deleted file mode 100644 index d5510f855ed..00000000000 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Address/Billing/ReadServiceTest.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Address\Billing; - -use Magento\Checkout\Service\V1\Data\Cart\Address; -use Magento\Checkout\Service\V1\Data\Cart\Address\Region; -use Magento\TestFramework\TestCase\WebapiAbstract; -use Magento\Webapi\Model\Rest\Config as RestConfig; - -class ReadServiceTest extends WebapiAbstract -{ - const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'checkoutAddressBillingReadServiceV1'; - const RESOURCE_PATH = '/V1/carts/'; - - /** - * @var \Magento\TestFramework\ObjectManager - */ - protected $objectManager; - - protected function setUp() - { - $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - } - - /** - * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php - */ - public function testGetAddress() - { - $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); - $quote->load('test_order_1', 'reserved_order_id'); - - /** @var \Magento\Quote\Model\Quote\Address $address */ - $address = $quote->getBillingAddress(); - - $data = [ - Address::KEY_COUNTRY_ID => $address->getCountryId(), - Address::KEY_ID => (int)$address->getId(), - Address::KEY_CUSTOMER_ID => $address->getCustomerId(), - Address::KEY_REGION => [ - Region::REGION => $address->getRegion(), - Region::REGION_ID => $address->getRegionId(), - Region::REGION_CODE => $address->getRegionCode(), - ], - Address::KEY_STREET => $address->getStreet(), - Address::KEY_COMPANY => $address->getCompany(), - Address::KEY_TELEPHONE => $address->getTelephone(), - Address::KEY_POSTCODE => $address->getPostcode(), - Address::KEY_CITY => $address->getCity(), - Address::KEY_FIRSTNAME => $address->getFirstname(), - Address::KEY_LASTNAME => $address->getLastname(), - Address::KEY_EMAIL => $address->getEmail(), - Address::CUSTOM_ATTRIBUTES_KEY => [['attribute_code' => 'disable_auto_group_change', 'value' => null]], - ]; - - $cartId = $quote->getId(); - - $serviceInfo = [ - 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH . $cartId . '/billing-address', - 'httpMethod' => RestConfig::HTTP_METHOD_GET, - ], - 'soap' => [ - 'service' => self::SERVICE_NAME, - 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'GetAddress', - ], - ]; - - if (TESTS_WEB_API_ADAPTER == self::ADAPTER_SOAP) { - unset($data[Address::KEY_PREFIX]); - unset($data[Address::KEY_SUFFIX]); - unset($data[Address::KEY_MIDDLENAME]); - unset($data[Address::KEY_FAX]); - unset($data[Address::KEY_VAT_ID]); - } - - $requestData = ["cartId" => $cartId]; - $this->assertEquals($data, $this->_webApiCall($serviceInfo, $requestData)); - } -} diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Address/Billing/WriteServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/BillingAddressManagementTest.php similarity index 50% rename from dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Address/Billing/WriteServiceTest.php rename to dev/tests/api-functional/testsuite/Magento/Quote/Api/BillingAddressManagementTest.php index 4644c779b9b..ec4e8a0d508 100644 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Address/Billing/WriteServiceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/BillingAddressManagementTest.php @@ -4,15 +4,16 @@ * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\Address\Billing; +namespace Magento\Quote\Api; +use Magento\Quote\Api\Data\AddressInterface; use Magento\TestFramework\TestCase\WebapiAbstract; use Magento\Webapi\Model\Rest\Config as RestConfig; -class WriteServiceTest extends WebapiAbstract +class BillingAddressManagementTest extends WebapiAbstract { const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'checkoutAddressBillingWriteServiceV1'; + const SERVICE_NAME = 'quoteBillingAddressManagementV1'; const RESOURCE_PATH = '/V1/carts/'; /** @@ -20,15 +21,55 @@ class WriteServiceTest extends WebapiAbstract */ protected $objectManager; - /** - * @var \Magento\Checkout\Service\V1\Data\Cart\AddressBuilder - */ - protected $builder; - protected function setUp() { $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->builder = $this->objectManager->create('Magento\Checkout\Service\V1\Data\Cart\AddressBuilder'); + } + + /** + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php + */ + public function testGetAddress() + { + $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); + $quote->load('test_order_1', 'reserved_order_id'); + + /** @var \Magento\Quote\Model\Quote\Address $address */ + $address = $quote->getBillingAddress(); + + $data = [ + AddressInterface::KEY_COUNTRY_ID => $address->getCountryId(), + AddressInterface::KEY_ID => (int)$address->getId(), + AddressInterface::KEY_CUSTOMER_ID => $address->getCustomerId(), + AddressInterface::REGION => $address->getRegion(), + AddressInterface::REGION_ID => $address->getRegionId(), + AddressInterface::REGION_CODE => $address->getRegionCode(), + AddressInterface::KEY_STREET => $address->getStreet(), + AddressInterface::KEY_COMPANY => $address->getCompany(), + AddressInterface::KEY_TELEPHONE => $address->getTelephone(), + AddressInterface::KEY_POSTCODE => $address->getPostcode(), + AddressInterface::KEY_CITY => $address->getCity(), + AddressInterface::KEY_FIRSTNAME => $address->getFirstname(), + AddressInterface::KEY_LASTNAME => $address->getLastname(), + AddressInterface::KEY_EMAIL => $address->getEmail() + ]; + + $cartId = $quote->getId(); + + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => self::RESOURCE_PATH . $cartId . '/billing-address', + 'httpMethod' => RestConfig::HTTP_METHOD_GET, + ], + 'soap' => [ + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME . 'Get', + ], + ]; + + $requestData = ["cartId" => $cartId]; + $this->assertEquals($data, $this->_webApiCall($serviceInfo, $requestData)); } /** @@ -48,7 +89,7 @@ class WriteServiceTest extends WebapiAbstract 'soap' => [ 'service' => self::SERVICE_NAME, 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'SetAddress', + 'operation' => self::SERVICE_NAME . 'Assign', ], ]; @@ -59,11 +100,9 @@ class WriteServiceTest extends WebapiAbstract 'company' => 'eBay Inc', 'street' => ['Typical Street', 'Tiny House 18'], 'city' => 'Big City', - 'region' => [ - 'region_id' => 12, - 'region' => 'California', - 'region_code' => 'CA', - ], + 'region_id' => 12, + 'region' => 'California', + 'region_code' => 'CA', 'postcode' => '0985432', 'country_id' => 'US', 'telephone' => '88776655', @@ -71,7 +110,7 @@ class WriteServiceTest extends WebapiAbstract ]; $requestData = [ "cartId" => $quote->getId(), - 'addressData' => $addressData, + 'address' => $addressData, ]; $addressId = $this->_webApiCall($serviceInfo, $requestData); @@ -79,16 +118,15 @@ class WriteServiceTest extends WebapiAbstract //reset $quote to reload data $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); $quote->load('test_order_1', 'reserved_order_id'); - $savedData = $quote->getBillingAddress()->getData(); + $address = $quote->getBillingAddress(); + $address->getRegionCode(); + $savedData = $address->getData(); $this->assertEquals($addressId, $savedData['address_id']); //custom checks for street, region and address_type foreach ($addressData['street'] as $streetLine) { $this->assertContains($streetLine, $quote->getBillingAddress()->getStreet()); } unset($addressData['street']); - $this->assertEquals($addressData['region']['region_id'], $savedData['region_id']); - $this->assertEquals($addressData['region']['region'], $savedData['region']); - unset($addressData['region']); $this->assertEquals('billing', $savedData['address_type']); //check the rest of fields foreach ($addressData as $key => $value) { diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Billing/ReadServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Billing/ReadServiceTest.php deleted file mode 100644 index bfe221961b5..00000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Billing/ReadServiceTest.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php -/** - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Address\Billing; - -class ReadServiceTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var ReadService - */ - protected $service; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteRepositoryMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $converterMock; - - protected function setUp() - { - $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); - $this->converterMock = $this->getMock('\Magento\Checkout\Service\V1\Address\Converter', [], [], '', false); - - $this->service = new ReadService($this->quoteRepositoryMock, $this->converterMock); - } - - public function testGetAddress() - { - $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); - $this->quoteRepositoryMock->expects($this->once())->method('getActive') - ->with('cartId')->will($this->returnValue($quoteMock)); - - $addressMock = $this->getMock('\Magento\Quote\Model\Quote\Address', [], [], '', false); - $quoteMock->expects($this->any())->method('getBillingAddress')->will($this->returnValue($addressMock)); - - $this->converterMock->expects($this->once())->method('convertModelToDataObject') - ->with($addressMock)->will($this->returnValue('BillingAddress')); - - $this->assertEquals('BillingAddress', $this->service->getAddress('cartId')); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Billing/WriteServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Billing/WriteServiceTest.php deleted file mode 100644 index 3b853623ce4..00000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Billing/WriteServiceTest.php +++ /dev/null @@ -1,187 +0,0 @@ -<?php -/** - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Address\Billing; - -class WriteServiceTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var WriteService - */ - protected $service; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteRepositoryMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $addressFactoryMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteAddressMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $validatorMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $converterMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $loggerMock; - - protected function setUp() - { - $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); - $this->addressFactoryMock = $this->getMock( - '\Magento\Quote\Model\Quote\AddressFactory', ['create', '__wakeup'], [], '', false - ); - - $this->quoteAddressMock = $this->getMock( - '\Magento\Quote\Model\Quote\Address', - ['getCustomerId', 'load', 'getData', 'setData', 'setStreet', 'setRegionId', 'setRegion', '__wakeup'], - [], - '', - false - ); - $this->addressFactoryMock->expects($this->any()) - ->method('create') - ->will($this->returnValue($this->quoteAddressMock)); - - $this->validatorMock = $this->getMock( - '\Magento\Checkout\Service\V1\Address\Validator', [], [], '', false - ); - - $this->converterMock = $this->getMock( - '\Magento\Checkout\Service\V1\Address\Converter', [], [], '', false - ); - - $this->loggerMock = $this->getMock('\Psr\Log\LoggerInterface', [], [], '', false); - - $this->service = new \Magento\Checkout\Service\V1\Address\Billing\WriteService( - $this->quoteRepositoryMock, - $this->converterMock, - $this->validatorMock, - $this->addressFactoryMock, - $this->loggerMock - ); - } - - /** - * @expectedException \Magento\Framework\Exception\NoSuchEntityException - * @expectedExceptionMessage error123 - */ - public function testSetAddressValidationFailed() - { - $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with('cartId') - ->will($this->returnValue($quoteMock)); - - $this->validatorMock->expects($this->once())->method('validate') - ->will($this->throwException(new \Magento\Framework\Exception\NoSuchEntityException('error123'))); - - $this->service->setAddress('cartId', null); - } - - public function testSetAddress() - { - $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with('cartId') - ->will($this->returnValue($quoteMock)); - - $builder = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\Address\RegionBuilder', ['create'], [], '', false - ); - - $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - /** @var \Magento\Checkout\Service\V1\Data\Cart\AddressBuilder $addressDataBuilder */ - $addressDataBuilder = $objectManager->getObject( - 'Magento\Checkout\Service\V1\Data\Cart\AddressBuilder', - ['regionBuilder' => $builder] - ); - /** @var \Magento\Checkout\Service\V1\Data\Cart\Address $addressData */ - $addressData = $addressDataBuilder->setId(454)->create(); - - $this->validatorMock->expects($this->once())->method('validate') - ->with($addressData) - ->will($this->returnValue(true)); - - $this->converterMock->expects($this->once())->method('convertDataObjectToModel') - ->with($addressData, $this->quoteAddressMock) - ->will($this->returnValue($this->quoteAddressMock)); - - $quoteMock->expects($this->once())->method('setBillingAddress')->with($this->quoteAddressMock); - $quoteMock->expects($this->once())->method('setDataChanges')->with(true); - $this->quoteRepositoryMock->expects($this->once())->method('save')->with($quoteMock); - $addressId = 1; - $billingAddressMock = $this->getMock('\Magento\Quote\Model\Quote\Address', [], [], '', false); - $billingAddressMock->expects($this->once())->method('getId')->will($this->returnValue($addressId)); - $quoteMock->expects($this->once())->method('getBillingAddress') - ->will($this->returnValue($billingAddressMock)); - - $this->assertEquals($addressId, $this->service->setAddress('cartId', $addressData)); - } - - /** - * @expectedException \Magento\Framework\Exception\InputException - * @expectedExceptionMessage Unable to save address. Please, check input data. - */ - public function testSetAddressWithInabilityToSaveQuote() - { - $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with('cartId') - ->will($this->returnValue($quoteMock)); - - $builder = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\Address\RegionBuilder', ['create'], [], '', false - ); - - $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - - /** @var \Magento\Checkout\Service\V1\Data\Cart\AddressBuilder $addressDataBuilder */ - $addressDataBuilder = $objectManager->getObject( - 'Magento\Checkout\Service\V1\Data\Cart\AddressBuilder', - ['regionBuilder' => $builder] - ); - /** @var \Magento\Checkout\Service\V1\Data\Cart\Address $addressData */ - $addressData = $addressDataBuilder->setId(454)->create(); - - $this->validatorMock->expects($this->once())->method('validate') - ->with($addressData) - ->will($this->returnValue(true)); - - $this->converterMock->expects($this->once())->method('convertDataObjectToModel') - ->with($addressData, $this->quoteAddressMock) - ->will($this->returnValue($this->quoteAddressMock)); - - $quoteMock->expects($this->once())->method('setBillingAddress')->with($this->quoteAddressMock); - $quoteMock->expects($this->once())->method('setDataChanges')->with(true); - $this->quoteRepositoryMock->expects($this->once()) - ->method('save') - ->with($quoteMock) - ->willThrowException( - new \Exception('Some DB Error') - ); - $this->service->setAddress('cartId', $addressData); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ConverterTest.php deleted file mode 100644 index e1cd60d8d33..00000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ConverterTest.php +++ /dev/null @@ -1,150 +0,0 @@ -<?php -/** - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Address; - -use Magento\Checkout\Service\V1\Data\Cart\Address; -use Magento\Checkout\Service\V1\Data\Cart\Address\Region; -use Magento\Framework\Api\AttributeValue; - -class ConverterTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var Converter - */ - protected $model; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $addressBuilderMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $metadataServiceMock; - - protected function setUp() - { - $this->addressBuilderMock = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\AddressBuilder', [], [], '', false - ); - $this->metadataServiceMock = $this - ->getMockBuilder('Magento\Customer\Api\CustomerMetadataInterface') - ->setMethods(['getCustomAttributesMetadata']) - ->getMockForAbstractClass(); - $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->model = $objectManager->getObject( - 'Magento\Checkout\Service\V1\Address\Converter', - ['addressBuilder' => $this->addressBuilderMock, 'customerMetadata' => $this->metadataServiceMock] - ); - } - - public function testConvertModelToDataObject() - { - $addressMockMethods = [ - 'getCountryId', 'getId', 'getCustomerId', 'getRegion', 'getRegionId', 'getRegionCode', - 'getStreet', 'getCompany', 'getTelephone', 'getFax', 'getPostcode', 'getFirstname', 'getMiddlename', - 'getLastname', 'getPrefix', 'getSuffix', 'getEmail', 'getVatId', 'getCustomField', 'getCity', '__wakeup', - ]; - $addressMock = $this->getMock('\Magento\Quote\Model\Quote\Address', $addressMockMethods, [], '', false); - - $addressMock->expects($this->atLeastOnce())->method('getCountryId')->will($this->returnValue(1)); - $addressMock->expects($this->atLeastOnce())->method('getId')->will($this->returnValue(2)); - $addressMock->expects($this->atLeastOnce())->method('getCustomerId')->will($this->returnValue(3)); - $addressMock->expects($this->atLeastOnce())->method('getRegion')->will($this->returnValue('Alabama')); - $addressMock->expects($this->atLeastOnce())->method('getRegionId')->will($this->returnValue(4)); - $addressMock->expects($this->atLeastOnce())->method('getRegionCode')->will($this->returnValue('aa')); - $addressMock->expects($this->atLeastOnce())->method('getStreet')->will($this->returnValue('street')); - $addressMock->expects($this->atLeastOnce())->method('getCompany')->will($this->returnValue('company')); - $addressMock->expects($this->atLeastOnce())->method('getTelephone')->will($this->returnValue('123-123')); - $addressMock->expects($this->atLeastOnce())->method('getFax')->will($this->returnValue('234-234')); - $addressMock->expects($this->atLeastOnce())->method('getPostcode')->will($this->returnValue('80010')); - $addressMock->expects($this->atLeastOnce())->method('getCity')->will($this->returnValue('Town')); - $addressMock->expects($this->atLeastOnce())->method('getFirstname')->will($this->returnValue('Vasya')); - $addressMock->expects($this->atLeastOnce())->method('getMiddlename')->will($this->returnValue('Vasya')); - $addressMock->expects($this->atLeastOnce())->method('getLastname')->will($this->returnValue('Pupkin')); - $addressMock->expects($this->atLeastOnce())->method('getPrefix')->will($this->returnValue('prefix')); - $addressMock->expects($this->atLeastOnce())->method('getSuffix')->will($this->returnValue('suffix')); - $addressMock->expects($this->atLeastOnce())->method('getEmail')->will($this->returnValue('aaa@aaa.com')); - $addressMock->expects($this->atLeastOnce())->method('getVatId')->will($this->returnValue(5)); - $addressMock->expects($this->atLeastOnce())->method('getCustomField')->will($this->returnValue('custom_value')); - - $testData = [ - Address::KEY_COUNTRY_ID => 1, - Address::KEY_ID => 2, - Address::KEY_CUSTOMER_ID => 3, - Address::KEY_REGION => [ - Region::REGION => 'Alabama', - Region::REGION_ID => 4, - Region::REGION_CODE => 'aa', - ], - Address::KEY_STREET => 'street', - Address::KEY_COMPANY => 'company', - Address::KEY_TELEPHONE => '123-123', - Address::KEY_FAX => '234-234', - Address::KEY_POSTCODE => '80010', - Address::KEY_CITY => 'Town', - Address::KEY_FIRSTNAME => 'Vasya', - Address::KEY_LASTNAME => 'Pupkin', - Address::KEY_MIDDLENAME => 'Vasya', - Address::KEY_PREFIX => 'prefix', - Address::KEY_SUFFIX => 'suffix', - Address::KEY_EMAIL => 'aaa@aaa.com', - Address::KEY_VAT_ID => 5, - Address::CUSTOM_ATTRIBUTES_KEY => [['attribute_code' => 'custom_field', 'value' => 'custom_value']], - ]; - - $this->metadataServiceMock - ->expects($this->any()) - ->method('getCustomAttributesMetadata') - ->will($this->returnValue([new \Magento\Framework\Object(['attribute_code' => 'custom_field'])])); - - $this->addressBuilderMock->expects($this->once())->method('populateWithArray')->with($testData)->will( - $this->returnValue($this->addressBuilderMock) - ); - $this->addressBuilderMock->expects($this->once())->method('create')->will( - $this->returnValue('Expected value') - ); - - $this->assertEquals('Expected value', $this->model->convertModelToDataObject($addressMock)); - } - - public function testConvertDataObjectToModel() - { - $dataObjectMock = $this->getMock('Magento\Checkout\Service\V1\Data\Cart\Address', [], [], '', false); - $methods = ['setData', 'setStreet', 'setRegionId', 'setRegion', '__wakeUp']; - $addressMock = $this->getMock('Magento\Quote\Model\Quote\Address', $methods, [], '', false); - $attributeValueMock = $this->getMock('\Magento\Framework\Api\AttributeValue', [], [], '', false); - $attributeValueMock->expects($this->once())->method('getAttributeCode')->will($this->returnValue('value_code')); - $attributeValueMock->expects($this->once())->method('getValue')->will($this->returnValue('value')); - - $addressData = [ - 'some_code' => 'some_value', - ]; - $regionMock = $this->getMock('Magento\Checkout\Service\V1\Data\Cart\Address\Region', [], [], '', false); - - $dataObjectMock->expects($this->once())->method('__toArray')->will($this->returnValue($addressData)); - $valueMap = [ - [$addressData, null], - ['attribute_value', 'value'], - ]; - $addressMock->expects($this->any())->method('setData')->will($this->returnValueMap($valueMap)); - $dataObjectMock - ->expects($this->once()) - ->method('getCustomAttributes') - ->will($this->returnValue([$attributeValueMock])); - $dataObjectMock->expects($this->once())->method('getStreet')->will($this->returnValue('street')); - $addressMock->expects($this->once())->method('setStreet')->with('street'); - $dataObjectMock->expects($this->any())->method('getRegion')->will($this->returnValue($regionMock)); - $regionMock->expects($this->once())->method('getRegionId')->will($this->returnValue('regionId')); - $regionMock->expects($this->once())->method('getRegion')->will($this->returnValue('region')); - $addressMock->expects($this->once())->method('setRegionId')->with('regionId'); - $addressMock->expects($this->once())->method('setRegion')->with('region'); - $this->model->convertDataObjectToModel($dataObjectMock, $addressMock); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/BillingAddressManagementTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/BillingAddressManagementTest.php new file mode 100644 index 00000000000..309cd33a4a3 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/BillingAddressManagementTest.php @@ -0,0 +1,121 @@ +<?php +/** + * + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Quote\Model; + +class BillingAddressManagementTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var BillingAddressManagement + */ + protected $model; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $quoteRepositoryMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $validatorMock; + + protected function setUp() + { + $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); + $this->validatorMock = $this->getMock('\Magento\Quote\Model\QuoteAddressValidator', [], [], '', false); + $logger = $this->getMock('\Psr\Log\LoggerInterface'); + $this->model = new BillingAddressManagement($this->quoteRepositoryMock, $this->validatorMock, $logger); + } + + public function testGetAddress() + { + $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); + $this->quoteRepositoryMock->expects($this->once())->method('getActive') + ->with('cartId')->will($this->returnValue($quoteMock)); + + $addressMock = $this->getMock('\Magento\Quote\Model\Quote\Address', [], [], '', false); + $quoteMock->expects($this->any())->method('getBillingAddress')->will($this->returnValue($addressMock)); + + $this->assertEquals($addressMock, $this->model->get('cartId')); + } + + + /** + * @expectedException \Magento\Framework\Exception\NoSuchEntityException + * @expectedExceptionMessage error123 + */ + public function testSetAddressValidationFailed() + { + $address = $this->getMock('\Magento\Quote\Api\Data\AddressInterface'); + $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive') + ->with('cartId') + ->will($this->returnValue($quoteMock)); + + $this->validatorMock->expects($this->once())->method('validate') + ->will($this->throwException(new \Magento\Framework\Exception\NoSuchEntityException('error123'))); + + $this->model->assign('cartId', $address); + } + + public function testSetAddress() + { + $address = $this->getMock('Magento\Quote\Model\Quote\Address', [], [], '', false, false); + + $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive') + ->with('cartId') + ->will($this->returnValue($quoteMock)); + + $this->validatorMock->expects($this->once())->method('validate') + ->with($address) + ->will($this->returnValue(true)); + + $quoteMock->expects($this->once())->method('setBillingAddress')->with($address); + $quoteMock->expects($this->once())->method('setDataChanges')->with(true); + $this->quoteRepositoryMock->expects($this->once())->method('save')->with($quoteMock); + $addressId = 1; + $billingAddressMock = $this->getMock('\Magento\Quote\Model\Quote\Address', [], [], '', false); + $billingAddressMock->expects($this->once())->method('getId')->will($this->returnValue($addressId)); + $quoteMock->expects($this->once())->method('getBillingAddress') + ->will($this->returnValue($billingAddressMock)); + + $this->assertEquals($addressId, $this->model->assign('cartId', $address)); + } + + /** + * @expectedException \Magento\Framework\Exception\InputException + * @expectedExceptionMessage Unable to save address. Please, check input data. + */ + public function testSetAddressWithInabilityToSaveQuote() + { + $address = $this->getMock('Magento\Quote\Model\Quote\Address', [], [], '', false, false); + + $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive') + ->with('cartId') + ->will($this->returnValue($quoteMock)); + + $this->validatorMock->expects($this->once())->method('validate') + ->with($address) + ->will($this->returnValue(true)); + + $quoteMock->expects($this->once())->method('setBillingAddress')->with($address); + $quoteMock->expects($this->once())->method('setDataChanges')->with(true); + $this->quoteRepositoryMock->expects($this->once()) + ->method('save') + ->with($quoteMock) + ->willThrowException( + new \Exception('Some DB Error') + ); + $this->model->assign('cartId', $address); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/Cart/ShippingMethodConverterTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/Cart/ShippingMethodConverterTest.php index 2932b655210..7d889546f32 100644 --- a/dev/tests/unit/testsuite/Magento/Quote/Model/Cart/ShippingMethodConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/Cart/ShippingMethodConverterTest.php @@ -57,7 +57,7 @@ class ShippingMethodConverterTest extends \PHPUnit_Framework_TestCase $this->storeManagerMock = $this->getMock('\Magento\Store\Model\StoreManagerInterface'); $this->currencyMock = $this->getMock('\Magento\Directory\Model\Currency', [], [], '', false); $this->shippingMethodMock = - $this->getMock('\Magento\Quote\Model\Cart\ShippingMethod', [], [], '', false); + $this->getMock('\Magento\Quote\Api\Data\ShippingMethodInterface'); $this->rateModelMock = $this->getMock('\Magento\Quote\Model\Quote\Address\Rate', [ 'getPrice', diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ValidatorTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteAddressValidatorTest.php similarity index 72% rename from dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ValidatorTest.php rename to dev/tests/unit/testsuite/Magento/Quote/Model/QuoteAddressValidatorTest.php index 2485f8a6e17..e8149b45d49 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ValidatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteAddressValidatorTest.php @@ -5,14 +5,14 @@ * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\Address; +namespace Magento\Quote\Model; use Magento\Checkout\Service\V1\Data\Cart\Address; -class ValidatorTest extends \PHPUnit_Framework_TestCase +class QuoteAddressValidatorTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Checkout\Service\V1\Address\Validator + * @var QuoteAddressValidator */ protected $model; @@ -36,11 +36,6 @@ class ValidatorTest extends \PHPUnit_Framework_TestCase */ protected $quoteAddressMock; - /** - * @var \Magento\Checkout\Service\V1\Data\Cart\AddressBuilder - */ - protected $addressDataBuilder; - /** * @var \PHPUnit_Framework_MockObject_MockObject */ @@ -64,22 +59,7 @@ class ValidatorTest extends \PHPUnit_Framework_TestCase '\Magento\Customer\Model\CustomerFactory', ['create', '__wakeup'], [], '', false); $this->customerMock = $this->getMock('\Magento\Customer\Model\Customer', [], [], '', false); - $builder = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\Address\RegionBuilder', ['create'], [], '', false - ); - - $this->addressDataBuilder = $this->objectManager->getObject( - 'Magento\Checkout\Service\V1\Data\Cart\AddressBuilder', - ['regionBuilder' => $builder] - ); - - $this->model = $this->objectManager->getObject( - 'Magento\Checkout\Service\V1\Address\Validator', - [ - 'quoteAddressFactory' => $this->addressFactoryMock, - 'customerFactory' => $this->customerFactoryMock, - ] - ); + $this->model = new QuoteAddressValidator($this->addressFactoryMock, $this->customerFactoryMock); } /** @@ -97,11 +77,9 @@ class ValidatorTest extends \PHPUnit_Framework_TestCase $this->customerMock->expects($this->once())->method('load')->with($customerId); $this->customerMock->expects($this->once())->method('getId')->will($this->returnValue(null)); - $addressData = $this->addressDataBuilder - ->setCustomerId($customerId) - ->setCompany('eBay Inc') - ->create(); - $this->model->validate($addressData); + $address = $this->getMock('\Magento\Quote\Api\Data\AddressInterface'); + $address->expects($this->atLeastOnce())->method('getCustomerId')->willReturn($customerId); + $this->model->validate($address); } /** @@ -116,11 +94,9 @@ class ValidatorTest extends \PHPUnit_Framework_TestCase $this->addressFactoryMock->expects($this->once())->method('create') ->will($this->returnValue($this->quoteAddressMock)); - $addressData = $this->addressDataBuilder - ->setId(101) - ->setCompany('eBay Inc') - ->create(); - $this->model->validate($addressData); + $address = $this->getMock('\Magento\Quote\Api\Data\AddressInterface'); + $address->expects($this->atLeastOnce())->method('getId')->willReturn(101); + $this->model->validate($address); } /** @@ -131,8 +107,8 @@ class ValidatorTest extends \PHPUnit_Framework_TestCase $this->customerFactoryMock->expects($this->never())->method('create'); $this->addressFactoryMock->expects($this->never())->method('create'); - $addressData = $this->addressDataBuilder->setCompany('eBay Inc')->create(); - $this->assertTrue($this->model->validate($addressData)); + $address = $this->getMock('\Magento\Quote\Api\Data\AddressInterface'); + $this->assertTrue($this->model->validate($address)); } /** @@ -144,12 +120,9 @@ class ValidatorTest extends \PHPUnit_Framework_TestCase $addressCustomer = 100; $addressId = 100; - /** Address data object */ - $addressData = $this->addressDataBuilder - ->setId($addressId) - ->setCompany('eBay Inc') - ->setCustomerId($addressCustomer) - ->create(); + $address = $this->getMock('\Magento\Quote\Api\Data\AddressInterface'); + $address->expects($this->atLeastOnce())->method('getId')->willReturn($addressId); + $address->expects($this->atLeastOnce())->method('getCustomerId')->willReturn($addressCustomer); /** Customer mock */ $this->customerFactoryMock->expects($this->once()) @@ -169,7 +142,7 @@ class ValidatorTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue(10)); /** Validate */ - $this->model->validate($addressData); + $this->model->validate($address); } public function testValidateWithValidAddress() @@ -177,12 +150,9 @@ class ValidatorTest extends \PHPUnit_Framework_TestCase $addressCustomer = 100; $addressId = 100; - /** Address data object */ - $addressData = $this->addressDataBuilder - ->setId($addressId) - ->setCompany('eBay Inc') - ->setCustomerId($addressCustomer) - ->create(); + $address = $this->getMock('\Magento\Quote\Api\Data\AddressInterface'); + $address->expects($this->atLeastOnce())->method('getId')->willReturn($addressId); + $address->expects($this->atLeastOnce())->method('getCustomerId')->willReturn($addressCustomer); /** Customer mock */ $this->customerFactoryMock->expects($this->once()) @@ -202,6 +172,6 @@ class ValidatorTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($addressCustomer)); /** Validate */ - $this->model->validate($addressData); + $this->model->validate($address); } } -- GitLab From 9359e2b031dd5b7970f39e45d6f1f1bf9c94bab7 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Thu, 15 Jan 2015 17:09:15 +0200 Subject: [PATCH 046/114] MAGETWO-32525: Implement Payment methods related interfaces --- app/code/Magento/Quote/Model/Quote/Payment.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Quote/Model/Quote/Payment.php b/app/code/Magento/Quote/Model/Quote/Payment.php index 82d8eb8ae30..a6b5657263d 100644 --- a/app/code/Magento/Quote/Model/Quote/Payment.php +++ b/app/code/Magento/Quote/Model/Quote/Payment.php @@ -233,6 +233,8 @@ class Payment extends \Magento\Payment\Model\Info implements \Magento\Quote\Api\ } /** + * @codeCoverageIgnoreStart + * * {@inheritdoc} */ public function getPoNumber() @@ -304,4 +306,5 @@ class Payment extends \Magento\Payment\Model\Info implements \Magento\Quote\Api\ } return null; } + //@codeCoverageIgnoreEnd } -- GitLab From 8ae5d2887eaef9ace8a82d055c8d27bb683c7a32 Mon Sep 17 00:00:00 2001 From: Iryna Lagno <ilagno@ebay.com> Date: Thu, 15 Jan 2015 17:36:45 +0200 Subject: [PATCH 047/114] MAGETWO-32534: Implement Checkout Coupon related interfaces --- .../Service/V1/Coupon/ReadService.php | 59 ---------------- .../V1/Coupon/ReadServiceInterface.php | 23 ------- app/code/Magento/Checkout/etc/di.xml | 2 - app/code/Magento/Checkout/etc/webapi.xml | 18 ----- .../Quote/Api/CartManagementInterface.php | 33 --------- .../Api/CouponManagementInterface.php} | 26 ++++--- .../Model/CouponManagement.php} | 52 ++++++-------- app/code/Magento/Quote/etc/di.xml | 1 + app/code/Magento/Quote/etc/webapi.xml | 18 +++++ .../Service/V1/Coupon/ReadServiceTest.php | 56 --------------- .../Api/CouponManagementTest.php} | 60 +++++++++++----- .../Service/V1/Coupon/ReadServiceTest.php | 68 ------------------ .../Model/CouponManagementTest.php} | 69 +++++++++---------- 13 files changed, 129 insertions(+), 356 deletions(-) delete mode 100644 app/code/Magento/Checkout/Service/V1/Coupon/ReadService.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Coupon/ReadServiceInterface.php rename app/code/Magento/{Checkout/Service/V1/Coupon/WriteServiceInterface.php => Quote/Api/CouponManagementInterface.php} (59%) rename app/code/Magento/{Checkout/Service/V1/Coupon/WriteService.php => Quote/Model/CouponManagement.php} (61%) delete mode 100644 dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Coupon/ReadServiceTest.php rename dev/tests/api-functional/testsuite/Magento/{Checkout/Service/V1/Coupon/WriteServiceTest.php => Quote/Api/CouponManagementTest.php} (74%) delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Coupon/ReadServiceTest.php rename dev/tests/unit/testsuite/Magento/{Checkout/Service/V1/Coupon/WriteServiceTest.php => Quote/Model/CouponManagementTest.php} (84%) diff --git a/app/code/Magento/Checkout/Service/V1/Coupon/ReadService.php b/app/code/Magento/Checkout/Service/V1/Coupon/ReadService.php deleted file mode 100644 index ecb614bbf56..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Coupon/ReadService.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Coupon; - -use Magento\Checkout\Service\V1\Data\Cart\Coupon as Coupon; -use Magento\Checkout\Service\V1\Data\Cart\CouponBuilder as CouponBuilder; - -/** - * Coupon read service object. - */ -class ReadService implements ReadServiceInterface -{ - /** - * Quote repository. - * - * @var \Magento\Quote\Model\QuoteRepository - */ - protected $quoteRepository; - - /** - * Coupon builder. - * - * @var CouponBuilder - */ - protected $couponBuilder; - - /** - * Constructs a coupon read service object. - * - * @param \Magento\Quote\Model\QuoteRepository $quoteRepository Quote repository. - * @param CouponBuilder $couponBuilder Coupon builder. - */ - public function __construct( - \Magento\Quote\Model\QuoteRepository $quoteRepository, - CouponBuilder $couponBuilder - ) { - $this->quoteRepository = $quoteRepository; - $this->couponBuilder = $couponBuilder; - } - - /** - * {@inheritDoc} - * - * @param int $cartId The cart ID. - * @return \Magento\Checkout\Service\V1\Data\Cart\Coupon Coupon object. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - */ - public function get($cartId) - { - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->quoteRepository->getActive($cartId); - $data = [Coupon::COUPON_CODE => $quote->getCouponCode()]; - $output = $this->couponBuilder->populateWithArray($data)->create(); - return $output; - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Coupon/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Coupon/ReadServiceInterface.php deleted file mode 100644 index d457c011425..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Coupon/ReadServiceInterface.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Coupon; - -/** - * Coupon read service interface. - * @deprecated - */ -interface ReadServiceInterface -{ - /** - * Returns information for a coupon in a specified cart. - * - * @param int $cartId The cart ID. - * @return \Magento\Checkout\Service\V1\Data\Cart\Coupon Coupon object. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @see \Magento\Checkout\Api\CartManagementInterface::getCouponCode - */ - public function get($cartId); -} diff --git a/app/code/Magento/Checkout/etc/di.xml b/app/code/Magento/Checkout/etc/di.xml index f18a1cfde4f..a3a1f5bdd14 100644 --- a/app/code/Magento/Checkout/etc/di.xml +++ b/app/code/Magento/Checkout/etc/di.xml @@ -28,8 +28,6 @@ <preference for="Magento\Checkout\Service\V1\Cart\ReadServiceInterface" type="Magento\Checkout\Service\V1\Cart\ReadService" /> <preference for="Magento\Checkout\Service\V1\Cart\TotalsServiceInterface" type="Magento\Checkout\Service\V1\Cart\TotalsService" /> <preference for="\Magento\Checkout\Service\V1\Cart\WriteServiceInterface" type="Magento\Checkout\Service\V1\Cart\WriteService" /> - <preference for="Magento\Checkout\Service\V1\Coupon\ReadServiceInterface" type="Magento\Checkout\Service\V1\Coupon\ReadService" /> - <preference for="Magento\Checkout\Service\V1\Coupon\WriteServiceInterface" type="Magento\Checkout\Service\V1\Coupon\WriteService" /> <preference for="Magento\Checkout\Service\V1\PaymentMethod\ReadServiceInterface" type="\Magento\Checkout\Service\V1\PaymentMethod\ReadService" /> <preference for="Magento\Checkout\Service\V1\PaymentMethod\WriteServiceInterface" type="\Magento\Checkout\Service\V1\PaymentMethod\WriteService" /> </config> diff --git a/app/code/Magento/Checkout/etc/webapi.xml b/app/code/Magento/Checkout/etc/webapi.xml index 0f655ac77ac..974ad013df0 100644 --- a/app/code/Magento/Checkout/etc/webapi.xml +++ b/app/code/Magento/Checkout/etc/webapi.xml @@ -25,24 +25,6 @@ <resource ref="Magento_Catalog::products" /> </resources> </route> - <route url="/V1/carts/:cartId/coupons" method="GET"> - <service class="Magento\Checkout\Service\V1\Coupon\ReadServiceInterface" method="get"/> - <resources> - <resource ref="Magento_SalesRule::quote" /> - </resources> - </route> - <route url="/V1/carts/:cartId/coupons" method="PUT"> - <service class="Magento\Checkout\Service\V1\Coupon\WriteServiceInterface" method="set"/> - <resources> - <resource ref="Magento_SalesRule::quote" /> - </resources> - </route> - <route url="/V1/carts/:cartId/coupons" method="DELETE"> - <service class="Magento\Checkout\Service\V1\Coupon\WriteServiceInterface" method="delete"/> - <resources> - <resource ref="Magento_SalesRule::quote" /> - </resources> - </route> <route url="/V1/carts/:cartId/totals" method="GET"> <service class="Magento\Checkout\Service\V1\Cart\TotalsServiceInterface" method="getTotals"/> <resources> diff --git a/app/code/Magento/Quote/Api/CartManagementInterface.php b/app/code/Magento/Quote/Api/CartManagementInterface.php index 62a8d8827d0..d0b005895b6 100644 --- a/app/code/Magento/Quote/Api/CartManagementInterface.php +++ b/app/code/Magento/Quote/Api/CartManagementInterface.php @@ -38,39 +38,6 @@ interface CartManagementInterface */ public function assignCustomer($cartId, $customerId, $storeId); - /** - * Returns information for a coupon in a specified cart. - * - * @param int $cartId The cart ID. - * @return string The coupon code data. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @see \Magento\Checkout\Service\V1\Coupon\ReadServiceInterface::get - */ - public function getCouponCode($cartId); - - /** - * Adds a coupon by code to a specified cart. - * - * @param int $cartId The cart ID. - * @param string $couponCode The coupon code data. - * @return bool - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @throws \Magento\Framework\Exception\CouldNotSaveException The specified coupon could not be added. - * @see \Magento\Checkout\Service\V1\Coupon\WriteServiceInterface::set - */ - public function setCoupon($cartId, $couponCode); - - /** - * Deletes a coupon from a specified cart. - * - * @param int $cartId The cart ID. - * @return bool - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @throws \Magento\Framework\Exception\CouldNotDeleteException The specified coupon could not be deleted. - * @see \Magento\Checkout\Service\V1\Coupon\WriteServiceInterface::delete - */ - public function removeCoupon($cartId); - /** * Places an order for a specified cart. * diff --git a/app/code/Magento/Checkout/Service/V1/Coupon/WriteServiceInterface.php b/app/code/Magento/Quote/Api/CouponManagementInterface.php similarity index 59% rename from app/code/Magento/Checkout/Service/V1/Coupon/WriteServiceInterface.php rename to app/code/Magento/Quote/Api/CouponManagementInterface.php index b738dfc942c..280d248d49d 100644 --- a/app/code/Magento/Checkout/Service/V1/Coupon/WriteServiceInterface.php +++ b/app/code/Magento/Quote/Api/CouponManagementInterface.php @@ -1,27 +1,36 @@ <?php /** + * * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\Coupon; + +namespace Magento\Quote\Api; /** - * Coupon write service interface. - * @deprecated + * Coupon management service interface. */ -interface WriteServiceInterface +interface CouponManagementInterface { + /** + * Returns information for a coupon in a specified cart. + * + * @param int $cartId The cart ID. + * @return string The coupon code data. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + */ + public function get($cartId); + /** * Adds a coupon by code to a specified cart. * * @param int $cartId The cart ID. - * @param \Magento\Checkout\Service\V1\Data\Cart\Coupon $couponCodeData The coupon code data. + * @param string $couponCode The coupon code data. * @return bool * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. * @throws \Magento\Framework\Exception\CouldNotSaveException The specified coupon could not be added. - * @see \Magento\Checkout\Api\CartManagementInterface::setCoupon */ - public function set($cartId, \Magento\Checkout\Service\V1\Data\Cart\Coupon $couponCodeData); + public function set($cartId, $couponCode); /** * Deletes a coupon from a specified cart. @@ -30,7 +39,6 @@ interface WriteServiceInterface * @return bool * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. * @throws \Magento\Framework\Exception\CouldNotDeleteException The specified coupon could not be deleted. - * @see \Magento\Checkout\Api\CartManagementInterface::removeCoupon */ - public function delete($cartId); + public function remove($cartId); } diff --git a/app/code/Magento/Checkout/Service/V1/Coupon/WriteService.php b/app/code/Magento/Quote/Model/CouponManagement.php similarity index 61% rename from app/code/Magento/Checkout/Service/V1/Coupon/WriteService.php rename to app/code/Magento/Quote/Model/CouponManagement.php index 7ce08e5e3f6..b2bfd68a299 100644 --- a/app/code/Magento/Checkout/Service/V1/Coupon/WriteService.php +++ b/app/code/Magento/Quote/Model/CouponManagement.php @@ -1,19 +1,21 @@ <?php /** + * * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\Coupon; -use Magento\Checkout\Service\V1\Data\Cart\CouponBuilder as CouponBuilder; +namespace Magento\Quote\Model; + +use \Magento\Quote\Api\CouponManagementInterface; use Magento\Framework\Exception\CouldNotDeleteException; use Magento\Framework\Exception\CouldNotSaveException; use Magento\Framework\Exception\NoSuchEntityException; /** - * Coupon write service object. + * Coupon management object. */ -class WriteService implements WriteServiceInterface +class CouponManagement implements CouponManagementInterface { /** * Quote repository. @@ -23,36 +25,30 @@ class WriteService implements WriteServiceInterface protected $quoteRepository; /** - * Coupon builder. - * - * @var CouponBuilder - */ - protected $couponBuilder; - - /** - * Constructs a coupon write service object. + * Constructs a coupon read service object. * * @param \Magento\Quote\Model\QuoteRepository $quoteRepository Quote repository. - * @param CouponBuilder $couponBuilder Coupon builder. */ public function __construct( - \Magento\Quote\Model\QuoteRepository $quoteRepository, - CouponBuilder $couponBuilder + \Magento\Quote\Model\QuoteRepository $quoteRepository ) { $this->quoteRepository = $quoteRepository; - $this->couponBuilder = $couponBuilder; } /** * {@inheritdoc} - * - * @param int $cartId The cart ID. - * @param \Magento\Checkout\Service\V1\Data\Cart\Coupon $couponCodeData The coupon code data. - * @return bool - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @throws \Magento\Framework\Exception\CouldNotSaveException The specified coupon could not be added. */ - public function set($cartId, \Magento\Checkout\Service\V1\Data\Cart\Coupon $couponCodeData) + public function get($cartId) + { + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->quoteRepository->getActive($cartId); + return $quote->getCouponCode(); + } + + /** + * {@inheritdoc} + */ + public function set($cartId, $couponCode) { /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->quoteRepository->getActive($cartId); @@ -60,7 +56,6 @@ class WriteService implements WriteServiceInterface throw new NoSuchEntityException("Cart $cartId doesn't contain products"); } $quote->getShippingAddress()->setCollectShippingRates(true); - $couponCode = trim($couponCodeData->getCouponCode()); try { $quote->setCouponCode($couponCode); @@ -76,13 +71,8 @@ class WriteService implements WriteServiceInterface /** * {@inheritdoc} - * - * @param int $cartId The cart ID. - * @return bool - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @throws \Magento\Framework\Exception\CouldNotDeleteException The specified coupon could not be deleted. */ - public function delete($cartId) + public function remove($cartId) { /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->quoteRepository->getActive($cartId); @@ -101,4 +91,4 @@ class WriteService implements WriteServiceInterface } return true; } -} +} \ No newline at end of file diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index b197afcad42..1f5765d1bf5 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -23,4 +23,5 @@ <preference for="Magento\Quote\Api\Data\CartSearchResultsInterface" type="Magento\Quote\Model\QuoteSearchResults" /> <preference for="Magento\Quote\Api\PaymentMethodManagementInterface" type="\Magento\Quote\Model\PaymentMethodManagement" /> <preference for="Magento\Quote\Api\Data\PaymentInterface" type="\Magento\Quote\Model\Quote\Payment" /> + <preference for="Magento\Quote\Api\CouponManagementInterface" type="Magento\Quote\Model\CouponManagement" /> </config> diff --git a/app/code/Magento/Quote/etc/webapi.xml b/app/code/Magento/Quote/etc/webapi.xml index ad77b5dbf18..c96274e1155 100644 --- a/app/code/Magento/Quote/etc/webapi.xml +++ b/app/code/Magento/Quote/etc/webapi.xml @@ -103,4 +103,22 @@ <!--<resource ref="Magento_Sales::sales" />--> <!--</resources>--> <!--</route>--> + <route url="/V1/carts/:cartId/coupons" method="GET"> + <service class="Magento\Quote\Api\CouponManagementInterface" method="get"/> + <resources> + <resource ref="Magento_SalesRule::quote" /> + </resources> + </route> + <route url="/V1/carts/:cartId/coupons/:couponCode" method="PUT"> + <service class="Magento\Quote\Api\CouponManagementInterface" method="set"/> + <resources> + <resource ref="Magento_SalesRule::quote" /> + </resources> + </route> + <route url="/V1/carts/:cartId/coupons" method="DELETE"> + <service class="Magento\Quote\Api\CouponManagementInterface" method="remove"/> + <resources> + <resource ref="Magento_SalesRule::quote" /> + </resources> + </route> </routes> diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Coupon/ReadServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Coupon/ReadServiceTest.php deleted file mode 100644 index 4b8e7a4e32d..00000000000 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Coupon/ReadServiceTest.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Coupon; - -use Magento\Checkout\Service\V1\Data\Cart\Coupon as Coupon; -use Magento\TestFramework\TestCase\WebapiAbstract; -use Magento\Webapi\Model\Rest\Config as RestConfig; - -class ReadServiceTest extends WebapiAbstract -{ - const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'checkoutCouponReadServiceV1'; - const RESOURCE_PATH = '/V1/carts/'; - - /** - * @var \Magento\TestFramework\ObjectManager - */ - protected $objectManager; - - protected function setUp() - { - $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - } - - /** - * @magentoApiDataFixture Magento/Checkout/_files/quote_with_coupon_saved.php - */ - public function testGet() - { - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); - $quote->load('test_order_1', 'reserved_order_id'); - $cartId = $quote->getId(); - $data = [ - Coupon::COUPON_CODE => $quote->getCouponCode(), - ]; - $serviceInfo = [ - 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH . $cartId . '/coupons', - 'httpMethod' => RestConfig::HTTP_METHOD_GET, - ], - 'soap' => [ - 'service' => self::SERVICE_NAME, - 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'Get', - ], - ]; - - $requestData = ["cartId" => $cartId]; - $this->assertEquals($data, $this->_webApiCall($serviceInfo, $requestData)); - } -} diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Coupon/WriteServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CouponManagementTest.php similarity index 74% rename from dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Coupon/WriteServiceTest.php rename to dev/tests/api-functional/testsuite/Magento/Quote/Api/CouponManagementTest.php index 0599c1d885f..d9e2f002dbb 100644 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Coupon/WriteServiceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CouponManagementTest.php @@ -1,19 +1,19 @@ <?php /** + * * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\Coupon; +namespace Magento\Quote\Api; -use Magento\Checkout\Service\V1\Data\Cart\Coupon; use Magento\TestFramework\TestCase\WebapiAbstract; use Magento\Webapi\Model\Rest\Config as RestConfig; -class WriteServiceTest extends WebapiAbstract +class CouponManagementTest extends WebapiAbstract { const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'checkoutCouponWriteServiceV1'; + const SERVICE_NAME = 'quoteCouponManagementV1'; const RESOURCE_PATH = '/V1/carts/'; /** @@ -26,6 +26,32 @@ class WriteServiceTest extends WebapiAbstract $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); } + /** + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_coupon_saved.php + */ + public function testGet() + { + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); + $quote->load('test_order_1', 'reserved_order_id'); + $cartId = $quote->getId(); + $couponCode = $quote->getCouponCode(); + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => self::RESOURCE_PATH . $cartId . '/coupons/' , + 'httpMethod' => RestConfig::HTTP_METHOD_GET, + ], + 'soap' => [ + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME . 'Get', + ], + ]; + + $requestData = ["cartId" => $cartId]; + $this->assertEquals($couponCode, $this->_webApiCall($serviceInfo, $requestData)); + } + /** * @magentoApiDataFixture Magento/Checkout/_files/quote_with_coupon_saved.php */ @@ -43,7 +69,7 @@ class WriteServiceTest extends WebapiAbstract 'soap' => [ 'service' => self::SERVICE_NAME, 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'Delete', + 'operation' => self::SERVICE_NAME . 'Remove', ], ]; $requestData = ["cartId" => $cartId]; @@ -64,9 +90,11 @@ class WriteServiceTest extends WebapiAbstract $quote->load('test_order_1', 'reserved_order_id'); $cartId = $quote->getId(); + $couponCode = 'invalid_coupon_code'; + $serviceInfo = [ 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH . $cartId . '/coupons', + 'resourcePath' => self::RESOURCE_PATH . $cartId . '/coupons/' . $couponCode, 'httpMethod' => RestConfig::HTTP_METHOD_PUT, ], 'soap' => [ @@ -76,11 +104,9 @@ class WriteServiceTest extends WebapiAbstract ], ]; - $data = [Coupon::COUPON_CODE => 'invalid_coupon_code']; - $requestData = [ "cartId" => $cartId, - "couponCodeData" => $data, + "couponCode" => $couponCode, ]; $this->_webApiCall($serviceInfo, $requestData); @@ -96,10 +122,12 @@ class WriteServiceTest extends WebapiAbstract $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); $quote->load('test01', 'reserved_order_id'); $cartId = $quote->getId(); - + $salesRule = $this->objectManager->create('Magento\SalesRule\Model\Rule'); + $salesRule->load('Test Coupon', 'name'); + $couponCode = $salesRule->getCouponCode(); $serviceInfo = [ 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH . $cartId . '/coupons', + 'resourcePath' => self::RESOURCE_PATH . $cartId . '/coupons/' . $couponCode, 'httpMethod' => RestConfig::HTTP_METHOD_PUT, ], 'soap' => [ @@ -109,15 +137,9 @@ class WriteServiceTest extends WebapiAbstract ], ]; - $salesRule = $this->objectManager->create('Magento\SalesRule\Model\Rule'); - $salesRule->load('Test Coupon', 'name'); - - $couponCode = $salesRule->getCouponCode(); - $data = [Coupon::COUPON_CODE => $couponCode]; - $requestData = [ "cartId" => $cartId, - "couponCodeData" => $data, + "couponCode" => $couponCode, ]; $this->assertTrue($this->_webApiCall($serviceInfo, $requestData)); @@ -127,4 +149,4 @@ class WriteServiceTest extends WebapiAbstract $this->assertEquals($quoteWithCoupon->getCouponCode(), $couponCode); } -} +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Coupon/ReadServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Coupon/ReadServiceTest.php deleted file mode 100644 index 5742b27ae55..00000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Coupon/ReadServiceTest.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php -/** - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Coupon; - -use Magento\Checkout\Service\V1\Data\Cart\Coupon as Coupon; - -class ReadServiceTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var ReadService - */ - protected $service; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteRepositoryMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $couponBuilderMock; - - protected function setUp() - { - $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); - $this->couponBuilderMock = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\CouponBuilder', [], [], '', false - ); - $this->service = $objectManager->getObject( - 'Magento\Checkout\Service\V1\Coupon\ReadService', - [ - 'quoteRepository' => $this->quoteRepositoryMock, - 'couponBuilder' => $this->couponBuilderMock, - ] - ); - } - - public function testGetCoupon() - { - $cartId = 11; - $couponCode = 'test_coupon_code'; - - $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', ['getCouponCode', '__wakeup'], [], '', false); - $quoteMock->expects($this->any())->method('getCouponCode')->will($this->returnValue($couponCode)); - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($quoteMock)); - - $data = [Coupon::COUPON_CODE => $couponCode]; - - $this->couponBuilderMock->expects($this->once()) - ->method('populateWithArray') - ->with($data) - ->will($this->returnSelf()); - $this->couponBuilderMock->expects($this->once())->method('create')->will($this->returnValue('couponCode')); - - $this->assertEquals('couponCode', $this->service->get($cartId)); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Coupon/WriteServiceTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/CouponManagementTest.php similarity index 84% rename from dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Coupon/WriteServiceTest.php rename to dev/tests/unit/testsuite/Magento/Quote/Model/CouponManagementTest.php index 7c4d64ee12c..df423bbb564 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Coupon/WriteServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/CouponManagementTest.php @@ -5,14 +5,14 @@ * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\Coupon; +namespace Magento\Quote\Model; -class WriteServiceTest extends \PHPUnit_Framework_TestCase +class CouponManagementTest extends \PHPUnit_Framework_TestCase { /** - * @var WriteService + * @var CouponManagement */ - protected $service; + protected $couponManagement; /** * @var \PHPUnit_Framework_MockObject_MockObject @@ -24,21 +24,11 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase */ protected $quoteMock; - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $couponBuilderMock; - /** * @var \PHPUnit_Framework_MockObject_MockObject */ protected $storeMock; - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $couponCodeDataMock; - /** * @var \PHPUnit_Framework_MockObject_MockObject */ @@ -46,10 +36,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); - $this->couponBuilderMock = - $this->getMock('\Magento\Checkout\Service\V1\Data\Cart\CouponBuilder', [], [], '', false); $this->storeMock = $this->getMock('\Magento\Store\Model\Store', [], [], '', false); $this->quoteMock = $this->getMock( '\Magento\Quote\Model\Quote', @@ -66,7 +53,6 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase '', false ); - $this->couponCodeDataMock = $this->getMock('\Magento\Checkout\Service\V1\Data\Cart\Coupon', [], [], '', false); $this->quoteAddressMock = $this->getMock( '\Magento\Quote\Model\Quote\Address', [ @@ -76,15 +62,28 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase [], '', false); - $this->service = $objectManager->getObject( - 'Magento\Checkout\Service\V1\Coupon\WriteService', - [ - 'quoteRepository' => $this->quoteRepositoryMock, - 'couponBuilder' => $this->couponBuilderMock, - ] + $this->couponManagement = new CouponManagement( + $this->quoteRepositoryMock ); } + public function testGetCoupon() + { + $cartId = 11; + $couponCode = 'test_coupon_code'; + + $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', ['getCouponCode', '__wakeup'], [], '', false); + $quoteMock->expects($this->any())->method('getCouponCode')->will($this->returnValue($couponCode)); + + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive') + ->with($cartId) + ->will($this->returnValue($quoteMock)); + + + $this->assertEquals($couponCode, $this->couponManagement->get($cartId)); + } + /** * @expectedException \Magento\Framework\Exception\NoSuchEntityException * @expectedExceptionMessage Cart 33 doesn't contain products @@ -97,7 +96,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(0)); - $this->service->set($cartId, $this->couponCodeDataMock); + $this->couponManagement->set($cartId, 'coupon_code'); } /** @@ -115,8 +114,6 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase $this->quoteMock->expects($this->once()) ->method('getShippingAddress')->will($this->returnValue($this->quoteAddressMock)); $this->quoteAddressMock->expects($this->once())->method('setCollectShippingRates')->with(true); - $this->couponCodeDataMock->expects($this->once()) - ->method('getCouponCode')->will($this->returnValue($couponCode)); $this->quoteMock->expects($this->once())->method('setCouponCode')->with($couponCode); $exceptionMessage = 'Could not apply coupon code'; $exception = new \Magento\Framework\Exception\CouldNotDeleteException($exceptionMessage); @@ -126,7 +123,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase ->with($this->quoteMock) ->willThrowException($exception); - $this->service->set($cartId, $this->couponCodeDataMock); + $this->couponManagement->set($cartId, $couponCode); } /** @@ -144,14 +141,12 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase $this->quoteMock->expects($this->once()) ->method('getShippingAddress')->will($this->returnValue($this->quoteAddressMock)); $this->quoteAddressMock->expects($this->once())->method('setCollectShippingRates')->with(true); - $this->couponCodeDataMock->expects($this->once()) - ->method('getCouponCode')->will($this->returnValue($couponCode)); $this->quoteMock->expects($this->once())->method('setCouponCode')->with($couponCode); $this->quoteMock->expects($this->once())->method('collectTotals')->will($this->returnValue($this->quoteMock)); $this->quoteRepositoryMock->expects($this->once())->method('save')->with($this->quoteMock); $this->quoteMock->expects($this->once())->method('getCouponCode')->will($this->returnValue('invalidCoupon')); - $this->service->set($cartId, $this->couponCodeDataMock); + $this->couponManagement->set($cartId, $couponCode); } public function testSet() @@ -165,14 +160,12 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase $this->quoteMock->expects($this->once()) ->method('getShippingAddress')->will($this->returnValue($this->quoteAddressMock)); $this->quoteAddressMock->expects($this->once())->method('setCollectShippingRates')->with(true); - $this->couponCodeDataMock->expects($this->once()) - ->method('getCouponCode')->will($this->returnValue($couponCode)); $this->quoteMock->expects($this->once())->method('setCouponCode')->with($couponCode); $this->quoteMock->expects($this->once())->method('collectTotals')->will($this->returnValue($this->quoteMock)); $this->quoteRepositoryMock->expects($this->once())->method('save')->with($this->quoteMock); $this->quoteMock->expects($this->once())->method('getCouponCode')->will($this->returnValue($couponCode)); - $this->assertTrue($this->service->set($cartId, $this->couponCodeDataMock)); + $this->assertTrue($this->couponManagement->set($cartId, $couponCode)); } /** @@ -188,7 +181,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(0)); $this->quoteMock->expects($this->never())->method('getShippingAddress'); - $this->service->delete($cartId); + $this->couponManagement->remove($cartId); } /** @@ -215,7 +208,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase ->with($this->quoteMock) ->willThrowException($exception); - $this->service->delete($cartId); + $this->couponManagement->remove($cartId); } /** @@ -238,7 +231,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase $this->quoteRepositoryMock->expects($this->once())->method('save')->with($this->quoteMock); $this->quoteMock->expects($this->once())->method('getCouponCode')->will($this->returnValue('123_ABC')); - $this->service->delete($cartId); + $this->couponManagement->remove($cartId); } public function testDelete() @@ -257,6 +250,6 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase $this->quoteRepositoryMock->expects($this->once())->method('save')->with($this->quoteMock); $this->quoteMock->expects($this->once())->method('getCouponCode')->will($this->returnValue('')); - $this->assertTrue($this->service->delete($cartId)); + $this->assertTrue($this->couponManagement->remove($cartId)); } } -- GitLab From a653c53817c0c28332ae345c31b67b0637855e06 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Thu, 15 Jan 2015 18:48:49 +0200 Subject: [PATCH 048/114] MAGETWO-32525: Implement Payment methods related interfaces --- .../Service/V1/Data/Cart/PaymentMethod.php | 133 -------- .../V1/Data/Cart/PaymentMethod/Builder.php | 46 --- .../V1/Data/Cart/PaymentMethod/Converter.php | 47 --- .../V1/Data/PaymentMethod/Converter.php | 46 --- .../Service/V1/PaymentMethod/ReadService.php | 102 ------ .../V1/PaymentMethod/ReadServiceInterface.php | 34 -- .../Service/V1/PaymentMethod/WriteService.php | 96 ------ .../PaymentMethod/WriteServiceInterface.php | 25 -- app/code/Magento/Checkout/etc/di.xml | 2 - .../V1/PaymentMethod/ReadServiceTest.php | 90 ------ .../V1/PaymentMethod/WriteServiceTest.php | 212 ------------ .../V1/Cart/PaymentMethod/BuilderTest.php | 84 ----- .../V1/Cart/PaymentMethod/ConverterTest.php | 91 ------ .../V1/Data/PaymentMethod/ConverterTest.php | 67 ---- .../V1/PaymentMethod/ReadServiceTest.php | 138 -------- .../V1/PaymentMethod/WriteServiceTest.php | 305 ------------------ .../Magento/Payment/Model/Method/FreeTest.php | 16 +- 17 files changed, 12 insertions(+), 1522 deletions(-) delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/Cart/PaymentMethod.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/Cart/PaymentMethod/Builder.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/Cart/PaymentMethod/Converter.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/PaymentMethod/Converter.php delete mode 100644 app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadService.php delete mode 100644 app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceInterface.php delete mode 100644 app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteService.php delete mode 100644 app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceInterface.php delete mode 100644 dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceTest.php delete mode 100644 dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/PaymentMethod/BuilderTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/PaymentMethod/ConverterTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/PaymentMethod/ConverterTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceTest.php diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/PaymentMethod.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/PaymentMethod.php deleted file mode 100644 index cc5fa54eafb..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/PaymentMethod.php +++ /dev/null @@ -1,133 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Data\Cart; - -/** - * @codeCoverageIgnore - */ -class PaymentMethod extends \Magento\Framework\Api\AbstractExtensibleObject -{ - /** - * Payment method - */ - const METHOD = 'method'; - - /** - * Purchase order number - */ - const PO_NUMBER = 'po_number'; - - /** - * Credit card owner - */ - const CC_OWNER = 'cc_owner'; - - /** - * Credit card number - */ - const CC_NUMBER = 'cc_number'; - - /** - * Credit card type - */ - const CC_TYPE = 'cc_type'; - - /** - * Credit card expiration year - */ - const CC_EXP_YEAR = 'cc_exp_year'; - - /** - * Credit card expiration month - */ - const CC_EXP_MONTH = 'cc_exp_month'; - - /** - * Additional payment details - */ - const PAYMENT_DETAILS = 'payment_details'; - - /** - * Get purchase order number - * - * @return string|null - */ - public function getPoNumber() - { - return $this->_get(self::PO_NUMBER); - } - - /** - * Get payment method code - * - * @return string - */ - public function getMethod() - { - return $this->_get(self::METHOD); - } - - /** - * Get credit card owner - * - * @return string|null - */ - public function getCcOwner() - { - return $this->_get(self::CC_OWNER); - } - - /** - * Get credit card number - * - * @return string|null - */ - public function getCcNumber() - { - return $this->_get(self::CC_NUMBER); - } - - /** - * Get credit card type - * - * @return string|null - */ - public function getCcType() - { - return $this->_get(self::CC_TYPE); - } - - /** - * Get credit card expiration year - * - * @return string|null - */ - public function getCcExpYear() - { - return $this->_get(self::CC_EXP_YEAR); - } - - /** - * Get credit card expiration month - * - * @return string|null - */ - public function getCcExpMonth() - { - return $this->_get(self::CC_EXP_MONTH); - } - - /** - * Get payment additional details - * - * @return string|null - */ - public function getPaymentDetails() - { - return $this->_get(self::PAYMENT_DETAILS); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/PaymentMethod/Builder.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/PaymentMethod/Builder.php deleted file mode 100644 index 4c412e7a10d..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/PaymentMethod/Builder.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Data\Cart\PaymentMethod; - -use Magento\Checkout\Service\V1\Data\Cart\PaymentMethod as QuotePaymentMethod; -use Magento\Framework\Exception\LocalizedException; -use Magento\Quote\Model\Quote; - -class Builder -{ - /** - * @param QuotePaymentMethod $object - * @param Quote $quote - * @return \Magento\Quote\Model\Quote\Payment - * @throws \Magento\Framework\Exception\LocalizedException - */ - public function build(QuotePaymentMethod $object, Quote $quote) - { - $payment = $quote->getPayment(); - try { - $data = $object->__toArray(); - $additionalDataValue = $object->getPaymentDetails(); - unset($data[QuotePaymentMethod::PAYMENT_DETAILS]); - if (!empty($additionalDataValue)) { - $additionalData = @unserialize($additionalDataValue); - if (is_array($additionalData) && !empty($additionalData)) { - $data = array_merge($data, $additionalData); - } - } - $data['checks'] = [ - \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_CHECKOUT, - \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_FOR_COUNTRY, - \Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_FOR_CURRENCY, - \Magento\Payment\Model\Method\AbstractMethod::CHECK_ORDER_TOTAL_MIN_MAX, - ]; - $payment->importData($data); - } catch (\Exception $e) { - throw new LocalizedException('The requested Payment Method is not available.'); - } - return $payment; - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/PaymentMethod/Converter.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/PaymentMethod/Converter.php deleted file mode 100644 index 083f54d3990..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/PaymentMethod/Converter.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Data\Cart\PaymentMethod; - -use Magento\Checkout\Service\V1\Data\Cart\PaymentMethod as QuotePaymentMethod; - -class Converter -{ - /** - * @var \Magento\Checkout\Service\V1\Data\Cart\PaymentMethodBuilder - */ - protected $builder; - - /** - * @param \Magento\Checkout\Service\V1\Data\Cart\PaymentMethodBuilder $builder - */ - public function __construct(\Magento\Checkout\Service\V1\Data\Cart\PaymentMethodBuilder $builder) - { - $this->builder = $builder; - } - - /** - * Convert quote payment object to payment data object - * - * @param \Magento\Quote\Model\Quote\Payment $object - * @return QuotePaymentMethod - */ - public function toDataObject(\Magento\Quote\Model\Quote\Payment $object) - { - $data = [ - QuotePaymentMethod::METHOD => $object->getMethod(), - QuotePaymentMethod::PO_NUMBER => $object->getPoNumber(), - QuotePaymentMethod::CC_OWNER => $object->getCcOwner(), - QuotePaymentMethod::CC_NUMBER => $object->getCcNumber(), - QuotePaymentMethod::CC_TYPE => $object->getCcType(), - QuotePaymentMethod::CC_EXP_YEAR => $object->getCcExpYear(), - QuotePaymentMethod::CC_EXP_MONTH => $object->getCcExpMonth(), - QuotePaymentMethod::PAYMENT_DETAILS => $object->getAdditionalData(), - ]; - - return $this->builder->populateWithArray($data)->create(); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/PaymentMethod/Converter.php b/app/code/Magento/Checkout/Service/V1/Data/PaymentMethod/Converter.php deleted file mode 100644 index 970763c2878..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/PaymentMethod/Converter.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Data\PaymentMethod; - -use Magento\Checkout\Service\V1\Data\PaymentMethod as QuotePaymentMethod; - -/** - * Payment method converter. - */ -class Converter -{ - /** - * Payment method builder. - * - * @var \Magento\Checkout\Service\V1\Data\Cart\PaymentMethodBuilder - */ - protected $builder; - - /** - * Constructs a payment method converter object. - * - * @param \Magento\Checkout\Service\V1\Data\PaymentMethodBuilder $builder Payment method builder. - */ - public function __construct(\Magento\Checkout\Service\V1\Data\PaymentMethodBuilder $builder) - { - $this->builder = $builder; - } - - /** - * Converts quote payment object to payment data object. - * - * @param \Magento\Payment\Model\MethodInterface $object The quote payment object. - * @return \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod Payment data object. - */ - public function toDataObject(\Magento\Payment\Model\MethodInterface $object) - { - $data = [ - QuotePaymentMethod::CODE => $object->getCode(), - QuotePaymentMethod::TITLE => $object->getTitle(), - ]; - return $this->builder->populateWithArray($data)->create(); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadService.php b/app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadService.php deleted file mode 100644 index cb804fb1af4..00000000000 --- a/app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadService.php +++ /dev/null @@ -1,102 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\PaymentMethod; - -use \Magento\Quote\Model\QuoteRepository; -use \Magento\Store\Model\StoreManagerInterface; -use Magento\Checkout\Service\V1\Data\Cart\PaymentMethod\Converter as QuoteMethodConverter; -use Magento\Checkout\Service\V1\Data\PaymentMethod\Converter as PaymentMethodConverter; -use \Magento\Payment\Model\MethodList; - -/** - * Payment method read service object. - */ -class ReadService implements ReadServiceInterface -{ - /** - * Quote repository. - * - * @var QuoteRepository - */ - protected $quoteRepository; - - /** - * Quote method converter. - * - * @var QuoteMethodConverter - */ - protected $quoteMethodConverter; - - /** - * Payment method converter. - * - * @var PaymentMethodConverter - */ - protected $paymentMethodConverter; - - /** - * Method list. - * - * @var MethodList - */ - protected $methodList; - - /** - * Constructs a payment method read service object. - * - * @param QuoteRepository $quoteRepository Quote repository. - * @param QuoteMethodConverter $quoteMethodConverter Quote method converter. - * @param PaymentMethodConverter $paymentMethodConverter Payment method converter. - * @param MethodList $methodList Method list. - */ - public function __construct( - QuoteRepository $quoteRepository, - QuoteMethodConverter $quoteMethodConverter, - PaymentMethodConverter $paymentMethodConverter, - MethodList $methodList - ) { - $this->quoteRepository = $quoteRepository; - $this->quoteMethodConverter = $quoteMethodConverter; - $this->paymentMethodConverter = $paymentMethodConverter; - $this->methodList = $methodList; - } - - /** - * {@inheritDoc} - * - * @param int $cartId The cart ID. - * @return \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod Payment method object. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - */ - public function getPayment($cartId) - { - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->quoteRepository->getActive($cartId); - $payment = $quote->getPayment(); - if (!$payment->getId()) { - return null; - } - return $this->quoteMethodConverter->toDataObject($payment); - } - - /** - * {@inheritDoc} - * - * @param int $cartId The cart ID. - * @return \Magento\Checkout\Service\V1\Data\PaymentMethod[] Array of payment methods. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - */ - public function getList($cartId) - { - $output = []; - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->quoteRepository->getActive($cartId); - foreach ($this->methodList->getAvailableMethods($quote) as $method) { - $output[] = $this->paymentMethodConverter->toDataObject($method); - } - return $output; - } -} diff --git a/app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceInterface.php deleted file mode 100644 index 1741b2db438..00000000000 --- a/app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceInterface.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\PaymentMethod; - -/** - * Payment method read service interface. - */ -interface ReadServiceInterface -{ - /** - * Returns the payment method for a specified shopping cart. - * - * @param int $cartId The cart ID. - * @return \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod Payment method object. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @deprecated - * @see \Magento\Checkout\Api\PaymentMethodManagementInterface::get - */ - public function getPayment($cartId); - - /** - * Lists available payment methods for a specified shopping cart. - * - * @param int $cartId The cart ID. - * @return \Magento\Checkout\Service\V1\Data\PaymentMethod[] Array of payment methods. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @deprecated - * @see \Magento\Checkout\Api\PaymentMethodManagementInterface::getList - */ - public function getList($cartId); -} diff --git a/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteService.php b/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteService.php deleted file mode 100644 index eff5131710a..00000000000 --- a/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteService.php +++ /dev/null @@ -1,96 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\PaymentMethod; - -use Magento\Checkout\Service\V1\Data\Cart\PaymentMethod\Builder; -use Magento\Framework\Exception\State\InvalidTransitionException; -use Magento\Payment\Model\Checks\ZeroTotal; -use Magento\Quote\Model\QuoteRepository; - -/** - * Payment method write service object. - */ -class WriteService implements WriteServiceInterface -{ - /** - * Quote repository. - * - * @var QuoteRepository - */ - protected $quoteRepository; - - /** - * Payment method builder. - * - * @var Builder - */ - protected $paymentMethodBuilder; - - /** - * Zero total validator. - * - * @var ZeroTotal - */ - protected $zeroTotalValidator; - - /** - * Constructs a payment method write service object. - * - * @param QuoteRepository $quoteRepository Quote repository. - * @param Builder $paymentMethodBuilder Payment method builder. - * @param ZeroTotal $zeroTotalValidator Zero total validator. - */ - public function __construct( - QuoteRepository $quoteRepository, - Builder $paymentMethodBuilder, - ZeroTotal $zeroTotalValidator - ) { - $this->quoteRepository = $quoteRepository; - $this->paymentMethodBuilder = $paymentMethodBuilder; - $this->zeroTotalValidator = $zeroTotalValidator; - } - - /** - * {@inheritDoc} - * - * @param \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod $method The payment method. - * @param int $cartId The cart ID. - * @return int Payment method ID. - * @throws \Magento\Framework\Exception\State\InvalidTransitionException The billing or shipping address is not set, or the specified payment method is not available. - */ - public function set(\Magento\Checkout\Service\V1\Data\Cart\PaymentMethod $method, $cartId) - { - $quote = $this->quoteRepository->getActive($cartId); - - $payment = $this->paymentMethodBuilder->build($method, $quote); - if ($quote->isVirtual()) { - // check if billing address is set - if (is_null($quote->getBillingAddress()->getCountryId())) { - throw new InvalidTransitionException('Billing address is not set'); - } - $quote->getBillingAddress()->setPaymentMethod($payment->getMethod()); - } else { - // check if shipping address is set - if (is_null($quote->getShippingAddress()->getCountryId())) { - throw new InvalidTransitionException('Shipping address is not set'); - } - $quote->getShippingAddress()->setPaymentMethod($payment->getMethod()); - } - if (!$quote->isVirtual() && $quote->getShippingAddress()) { - $quote->getShippingAddress()->setCollectShippingRates(true); - } - - if (!$this->zeroTotalValidator->isApplicable($payment->getMethodInstance(), $quote)) { - throw new InvalidTransitionException('The requested Payment Method is not available.'); - } - - $quote->setTotalsCollectedFlag(false) - ->collectTotals() - ->save(); - - return $quote->getPayment()->getId(); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceInterface.php deleted file mode 100644 index 1ec064d86c3..00000000000 --- a/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceInterface.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\PaymentMethod; - -/** - * Payment method write service interface. - */ -interface WriteServiceInterface -{ - /** - * Adds a specified payment method to a specified shopping cart. - * - * @param \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod $method The payment method. - * @param int $cartId The cart ID. - * @return int Payment method ID. - * @throws \Magento\Framework\Exception\State\InvalidTransitionException The billing or shipping address is not set, or the specified payment method is not available. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @deprecated - * @see \Magento\Checkout\Api\PaymentMethodManagementInterface::set - */ - public function set(\Magento\Checkout\Service\V1\Data\Cart\PaymentMethod $method, $cartId); -} diff --git a/app/code/Magento/Checkout/etc/di.xml b/app/code/Magento/Checkout/etc/di.xml index a3a1f5bdd14..fe77c23dd98 100644 --- a/app/code/Magento/Checkout/etc/di.xml +++ b/app/code/Magento/Checkout/etc/di.xml @@ -28,6 +28,4 @@ <preference for="Magento\Checkout\Service\V1\Cart\ReadServiceInterface" type="Magento\Checkout\Service\V1\Cart\ReadService" /> <preference for="Magento\Checkout\Service\V1\Cart\TotalsServiceInterface" type="Magento\Checkout\Service\V1\Cart\TotalsService" /> <preference for="\Magento\Checkout\Service\V1\Cart\WriteServiceInterface" type="Magento\Checkout\Service\V1\Cart\WriteService" /> - <preference for="Magento\Checkout\Service\V1\PaymentMethod\ReadServiceInterface" type="\Magento\Checkout\Service\V1\PaymentMethod\ReadService" /> - <preference for="Magento\Checkout\Service\V1\PaymentMethod\WriteServiceInterface" type="\Magento\Checkout\Service\V1\PaymentMethod\WriteService" /> </config> diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceTest.php deleted file mode 100644 index 9a1a0126b96..00000000000 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceTest.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\PaymentMethod; - -use Magento\Checkout\Service\V1\Data\PaymentMethod; -use Magento\TestFramework\TestCase\WebapiAbstract; -use Magento\Webapi\Model\Rest\Config as RestConfig; - -class ReadServiceTest extends WebapiAbstract -{ - const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'checkoutPaymentMethodReadServiceV1'; - const RESOURCE_PATH = '/V1/carts/'; - - /** - * @var \Magento\TestFramework\ObjectManager - */ - protected $objectManager; - - protected function setUp() - { - $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - } - - /** - * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php - */ - public function testGetList() - { - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); - $quote->load('test_order_1', 'reserved_order_id'); - $cartId = $quote->getId(); - - $serviceInfo = [ - 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH . $cartId . '/payment-methods', - 'httpMethod' => RestConfig::HTTP_METHOD_GET, - ], - 'soap' => [ - 'service' => self::SERVICE_NAME, - 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'getList', - ], - ]; - - $requestData = ["cartId" => $cartId]; - $requestResponse = $this->_webApiCall($serviceInfo, $requestData); - - $expectedResponse = [ - PaymentMethod::CODE => 'checkmo', - PaymentMethod::TITLE => 'Check / Money order', - ]; - - $this->assertGreaterThan(0, count($requestResponse)); - $this->assertContains($expectedResponse, $requestResponse); - } - - /** - * @magentoApiDataFixture Magento/Checkout/_files/quote_with_payment_saved.php - */ - public function testGetPayment() - { - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); - $quote->load('test_order_1_with_payment', 'reserved_order_id'); - $cartId = $quote->getId(); - - $serviceInfo = [ - 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH . $cartId . '/selected-payment-methods', - 'httpMethod' => RestConfig::HTTP_METHOD_GET, - ], - 'soap' => [ - 'service' => self::SERVICE_NAME, - 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'getPayment', - ], - ]; - - $requestData = ["cartId" => $cartId]; - $requestResponse = $this->_webApiCall($serviceInfo, $requestData); - - $this->assertArrayHasKey('method', $requestResponse); - $this->assertEquals('checkmo', $requestResponse['method']); - } -} diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceTest.php deleted file mode 100644 index a4b9a3f4855..00000000000 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceTest.php +++ /dev/null @@ -1,212 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\PaymentMethod; - -use Magento\TestFramework\TestCase\WebapiAbstract; -use Magento\Webapi\Model\Rest\Config as RestConfig; - -class WriteServiceTest extends WebapiAbstract -{ - const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'checkoutPaymentMethodWriteServiceV1'; - const RESOURCE_PATH = '/V1/carts/'; - - /** - * @var \Magento\TestFramework\ObjectManager - */ - protected $objectManager; - - protected function setUp() - { - $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - } - - /** - * @magentoApiDataFixture Magento/Checkout/_files/quote_with_payment_saved.php - */ - public function testReSetPayment() - { - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); - $quote->load('test_order_1_with_payment', 'reserved_order_id'); - $cartId = $quote->getId(); - - $serviceInfo = [ - 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH . $cartId . '/selected-payment-methods', - 'httpMethod' => RestConfig::HTTP_METHOD_PUT, - ], - 'soap' => [ - 'service' => self::SERVICE_NAME, - 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'set', - ], - ]; - - $requestData = [ - "cartId" => $cartId, - "method" => [ - 'method' => 'checkmo', - 'po_number' => null, - 'cc_owner' => 'John', - 'cc_type' => null, - 'cc_exp_year' => null, - 'cc_exp_month' => null, - ], - ]; - - $this->_webApiCall($serviceInfo, $requestData); - } - - /** - * @magentoApiDataFixture Magento/Checkout/_files/quote_with_virtual_product_and_address.php - */ - public function testSetPaymentWithVirtualProduct() - { - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); - $quote->load('test_order_with_virtual_product', 'reserved_order_id'); - $cartId = $quote->getId(); - - $serviceInfo = [ - 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH . $cartId . '/selected-payment-methods', - 'httpMethod' => RestConfig::HTTP_METHOD_PUT, - ], - 'soap' => [ - 'service' => self::SERVICE_NAME, - 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'set', - ], - ]; - - $requestData = [ - "cartId" => $cartId, - "method" => [ - 'method' => 'checkmo', - 'po_number' => '200', - 'cc_owner' => 'tester', - 'cc_type' => 'test', - 'cc_exp_year' => '2014', - 'cc_exp_month' => '1', - ], - ]; - $this->assertNotNull($this->_webApiCall($serviceInfo, $requestData)); - } - - /** - * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php - */ - public function testSetPaymentWithSimpleProduct() - { - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); - $quote->load('test_order_1', 'reserved_order_id'); - $cartId = $quote->getId(); - - $serviceInfo = [ - 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH . $cartId . '/selected-payment-methods', - 'httpMethod' => RestConfig::HTTP_METHOD_PUT, - ], - 'soap' => [ - 'service' => self::SERVICE_NAME, - 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'set', - ], - ]; - - $requestData = [ - "cartId" => $cartId, - "method" => [ - 'method' => 'checkmo', - 'po_number' => '200', - 'cc_owner' => 'tester', - 'cc_type' => 'test', - 'cc_exp_year' => '2014', - 'cc_exp_month' => '1', - ], - ]; - - $this->assertNotNull($this->_webApiCall($serviceInfo, $requestData)); - } - - /** - * @magentoApiDataFixture Magento/Checkout/_files/quote_with_virtual_product_saved.php - * @expectedException \Exception - * @expectedExceptionMessage Billing address is not set - */ - public function testSetPaymentWithVirtualProductWithoutAddress() - { - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); - $quote->load('test_order_with_virtual_product_without_address', 'reserved_order_id'); - $cartId = $quote->getId(); - - $serviceInfo = [ - 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH . $cartId . '/selected-payment-methods', - 'httpMethod' => RestConfig::HTTP_METHOD_PUT, - ], - 'soap' => [ - 'service' => self::SERVICE_NAME, - 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'set', - ], - ]; - - $requestData = [ - "cartId" => $cartId, - "method" => [ - 'method' => 'checkmo', - 'po_number' => '200', - 'cc_owner' => 'tester', - 'cc_type' => 'test', - 'cc_exp_year' => '2014', - 'cc_exp_month' => '1', - ], - ]; - $this->_webApiCall($serviceInfo, $requestData); - } - - /** - * @magentoApiDataFixture Magento/Checkout/_files/quote_with_simple_product_saved.php - * @expectedException \Exception - * @expectedExceptionMessage Shipping address is not set - */ - public function testSetPaymentWithSimpleProductWithoutAddress() - { - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); - $quote->load('test_order_with_simple_product_without_address', 'reserved_order_id'); - $cartId = $quote->getId(); - - $serviceInfo = [ - 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH . $cartId . '/selected-payment-methods', - 'httpMethod' => RestConfig::HTTP_METHOD_PUT, - ], - 'soap' => [ - 'service' => self::SERVICE_NAME, - 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'set', - ], - ]; - - $requestData = [ - "cartId" => $cartId, - "method" => [ - 'method' => 'checkmo', - 'po_number' => '200', - 'cc_owner' => 'tester', - 'cc_type' => 'test', - 'cc_exp_year' => '2014', - 'cc_exp_month' => '1', - ], - ]; - $this->_webApiCall($serviceInfo, $requestData); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/PaymentMethod/BuilderTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/PaymentMethod/BuilderTest.php deleted file mode 100644 index f0fba140b1c..00000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/PaymentMethod/BuilderTest.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Cart\PaymentMethod; - -class BuilderTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod\Builder - */ - protected $builder; - - /** - * @var \Magento\TestFramework\Helper\ObjectManager - */ - protected $objectManager; - - protected function setUp() - { - $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->builder = $this->objectManager->getObject( - 'Magento\Checkout\Service\V1\Data\Cart\PaymentMethod\Builder' - ); - } - - public function testBuildPaymentObject() - { - $paymentData = [ - 'method' => 'checkmo', - 'payment_details' => 'paymentDetailsTest', - ]; - - $paymentMethodMock = $this->getMock('\Magento\Checkout\Service\V1\Data\Cart\PaymentMethod', [], [], '', false); - $paymentMethodMock->expects($this->once())->method('__toArray')->will($this->returnValue($paymentData)); - $paymentMethodMock->expects($this->once()) - ->method('getPaymentDetails') - ->will($this->returnValue(serialize(['paymentDetailsTest']))); - - $paymentMock = $this->getMock('\Magento\Quote\Model\Quote\Payment', [], [], '', false); - $paymentMock->expects($this->once()) - ->method('importData') - ->with($this->contains('checkmo')) - ->will($this->returnSelf()); - - $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); - $quoteMock->expects($this->once())->method('getPayment')->will($this->returnValue($paymentMock)); - - $this->assertEquals($paymentMock, $this->builder->build($paymentMethodMock, $quoteMock)); - } - - /** - * @expectedException \Exception - * @expectedExceptionMessage The requested Payment Method is not available. - */ - public function testBuildPaymentObjectThrowsExceptionIfPaymentMethodNotAvailable() - { - $paymentData = [ - 'method' => 'notAvailableMethod', - 'payment_details' => 'paymentDetailsTest', - ]; - - $paymentMethodMock = $this->getMock('\Magento\Checkout\Service\V1\Data\Cart\PaymentMethod', [], [], '', false); - $paymentMethodMock->expects($this->once())->method('__toArray')->will($this->returnValue($paymentData)); - $paymentMethodMock->expects($this->once()) - ->method('getPaymentDetails') - ->will($this->returnValue(['paymentDetailsTest'])); - - $paymentMock = $this->getMock('\Magento\Quote\Model\Quote\Payment', [], [], '', false); - $paymentMock->expects($this->once()) - ->method('importData') - ->with($this->contains('notAvailableMethod')) - ->will($this->throwException( - new \Magento\Framework\Exception\LocalizedException('The requested Payment Method is not available.')) - ); - - $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); - $quoteMock->expects($this->once())->method('getPayment')->will($this->returnValue($paymentMock)); - - $this->assertEquals($paymentMock, $this->builder->build($paymentMethodMock, $quoteMock)); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/PaymentMethod/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/PaymentMethod/ConverterTest.php deleted file mode 100644 index d1260cc7f48..00000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/PaymentMethod/ConverterTest.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Cart\PaymentMethod; - -use Magento\Checkout\Service\V1\Data\Cart\PaymentMethod; - -class ConverterTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod\Converter - */ - protected $converter; - - /** - * @var \Magento\TestFramework\Helper\ObjectManager - */ - protected $objectManager; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $paymentMethodBuilderMock; - - protected function setUp() - { - $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->paymentMethodBuilderMock = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\PaymentMethodBuilder', - ['populateWithArray', 'create'], - [], - '', - false - ); - - $this->converter = $this->objectManager->getObject( - 'Magento\Checkout\Service\V1\Data\Cart\PaymentMethod\Converter', - [ - 'builder' => $this->paymentMethodBuilderMock, - ] - ); - } - - public function testConvertQuotePaymentObjectToPaymentDataObject() - { - $paymentMock = $this->getMock('\Magento\Quote\Model\Quote\Payment', - [ - 'getMethod', 'getPoNumber', 'getCcOwner', 'getCcNumber', - 'getCcType', 'getCcExpYear', 'getCcExpMonth', 'getAdditionalData', '__wakeup' - ], - [], - '', - false - ); - $paymentMock->expects($this->once())->method('getMethod')->will($this->returnValue('checkmo')); - $paymentMock->expects($this->once())->method('getPoNumber')->will($this->returnValue(100)); - $paymentMock->expects($this->once())->method('getCcOwner')->will($this->returnValue('tester')); - $paymentMock->expects($this->once())->method('getCcNumber')->will($this->returnValue(100200300)); - $paymentMock->expects($this->once())->method('getCcType')->will($this->returnValue('visa')); - $paymentMock->expects($this->once())->method('getCcExpYear')->will($this->returnValue(2014)); - $paymentMock->expects($this->once())->method('getCcExpMonth')->will($this->returnValue(10)); - $paymentMock->expects($this->once())->method('getAdditionalData')->will($this->returnValue('test')); - - $data = [ - PaymentMethod::METHOD => 'checkmo', - PaymentMethod::PO_NUMBER => 100, - PaymentMethod::CC_OWNER => 'tester', - PaymentMethod::CC_NUMBER => 100200300, - PaymentMethod::CC_TYPE => 'visa', - PaymentMethod::CC_EXP_YEAR => 2014, - PaymentMethod::CC_EXP_MONTH => 10, - PaymentMethod::PAYMENT_DETAILS => 'test', - ]; - - $this->paymentMethodBuilderMock->expects($this->once()) - ->method('populateWithArray') - ->with($data) - ->will($this->returnSelf()); - - $paymentMethodMock = $this->getMock('\Magento\Checkout\Service\V1\Data\PaymentMethod', [], [], '', false); - - $this->paymentMethodBuilderMock->expects($this->once()) - ->method('create') - ->will($this->returnValue($paymentMethodMock)); - - $this->assertEquals($paymentMethodMock, $this->converter->toDataObject($paymentMock)); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/PaymentMethod/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/PaymentMethod/ConverterTest.php deleted file mode 100644 index e20603f39db..00000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/PaymentMethod/ConverterTest.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Data\PaymentMethod; - -use Magento\Checkout\Service\V1\Data\PaymentMethod; - -class ConverterTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var Converter - */ - protected $converter; - - /** - * @var \Magento\TestFramework\Helper\ObjectManager - */ - protected $objectManager; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $paymentMethodBuilderMock; - - protected function setUp() - { - $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->paymentMethodBuilderMock = $this->getMock( - '\Magento\Checkout\Service\V1\Data\PaymentMethodBuilder', ['populateWithArray', 'create'], [], '', false - ); - - $this->converter = $this->objectManager->getObject( - 'Magento\Checkout\Service\V1\Data\PaymentMethod\Converter', - [ - 'builder' => $this->paymentMethodBuilderMock, - ] - ); - } - - public function testConvertQuotePaymentObjectToPaymentDataObject() - { - $methodMock = $this->getMock('\Magento\Payment\Model\Method\AbstractMethod', [], [], '', false); - $methodMock->expects($this->once())->method('getCode')->will($this->returnValue('paymentCode')); - $methodMock->expects($this->once())->method('getTitle')->will($this->returnValue('paymentTitle')); - - $data = [ - PaymentMethod::TITLE => 'paymentTitle', - PaymentMethod::CODE => 'paymentCode', - ]; - - $this->paymentMethodBuilderMock->expects($this->once()) - ->method('populateWithArray') - ->with($data) - ->will($this->returnSelf()); - - $paymentMethodMock = $this->getMock('\Magento\Checkout\Service\V1\Data\PaymentMethod', [], [], '', false); - - $this->paymentMethodBuilderMock->expects($this->once()) - ->method('create') - ->will($this->returnValue($paymentMethodMock)); - - $this->assertEquals($paymentMethodMock, $this->converter->toDataObject($methodMock)); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceTest.php deleted file mode 100644 index 005e01f9737..00000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceTest.php +++ /dev/null @@ -1,138 +0,0 @@ -<?php -/** - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\PaymentMethod; - -class ReadServiceTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var ReadService - */ - protected $service; - - /** - * @var \Magento\TestFramework\Helper\ObjectManager - */ - protected $objectManager; - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteRepositoryMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $paymentMethodConverterMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteMethodConverterMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $methodListMock; - - protected function setUp() - { - $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); - $this->quoteMethodConverterMock = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\PaymentMethod\Converter', [], [], '', false - ); - $this->paymentMethodConverterMock = $this->getMock( - '\Magento\Checkout\Service\V1\Data\PaymentMethod\Converter', [], [], '', false - ); - $this->methodListMock = $this->getMock('\Magento\Payment\Model\MethodList', [], [], '', false); - - $this->service = $this->objectManager->getObject( - 'Magento\Checkout\Service\V1\PaymentMethod\ReadService', - [ - 'quoteRepository' => $this->quoteRepositoryMock, - 'quoteMethodConverter' => $this->quoteMethodConverterMock, - 'paymentMethodConverter' => $this->paymentMethodConverterMock, - 'methodList' => $this->methodListMock, - ] - ); - } - - public function testGetPaymentIfPaymentMethodNotSet() - { - $cartId = 11; - $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); - $paymentMock = $this->getMock('\Magento\Quote\Model\Quote\Payment', [], [], '', false); - $quoteMock->expects($this->once())->method('getPayment')->will($this->returnValue($paymentMock)); - $paymentMock->expects($this->once())->method('getId')->will($this->returnValue(null)); - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($quoteMock)); - - $this->assertNull($this->service->getPayment($cartId)); - } - - public function testGetPaymentSuccess() - { - $cartId = 11; - - $paymentMock = $this->getMock('\Magento\Quote\Model\Quote\Payment', [], [], '', false); - $paymentMock->expects($this->once())->method('getId')->will($this->returnValue(1)); - - $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); - $quoteMock->expects($this->once())->method('getPayment')->will($this->returnValue($paymentMock)); - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($quoteMock)); - - $paymentMethodMock = $this->getMock('\Magento\Checkout\Service\V1\Data\Cart\PaymentMethod', [], [], '', false); - - $this->quoteMethodConverterMock->expects($this->once()) - ->method('toDataObject') - ->with($paymentMock) - ->will($this->returnValue($paymentMethodMock)); - - $this->assertEquals($paymentMethodMock, $this->service->getPayment($cartId)); - } - - public function testGetList() - { - $cartId = 10; - $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($quoteMock)); - - $methodList = [ - $this->getMock('\Magento\Payment\Model\MethodInterface'), - $this->getMock('\Magento\Payment\Model\MethodInterface'), - ]; - - $this->methodListMock->expects($this->once()) - ->method('getAvailableMethods') - ->with($quoteMock) - ->will($this->returnValue($methodList)); - - $paymentMethodMock = $this->getMock('\Magento\Checkout\Service\V1\Data\PaymentMethod', [], [], '', false); - - $this->paymentMethodConverterMock->expects($this->atLeastOnce()) - ->method('toDataObject') - ->will($this->returnValue($paymentMethodMock)); - - $expectedResult = [ - $this->getMock('\Magento\Checkout\Service\V1\Data\PaymentMethod', [], [], '', false), - $this->getMock('\Magento\Checkout\Service\V1\Data\PaymentMethod', [], [], '', false), - ]; - - $this->assertEquals($expectedResult, $this->service->getList($cartId)); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceTest.php deleted file mode 100644 index 37ef4ab56a8..00000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceTest.php +++ /dev/null @@ -1,305 +0,0 @@ -<?php -/** - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\PaymentMethod; - -class WriteServiceTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var WriteService - */ - protected $service; - - /** - * @var \Magento\TestFramework\Helper\ObjectManager - */ - protected $objectManager; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteRepositoryMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $paymentMethodBuilderMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $methodListMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $validatorMock; - - protected function setUp() - { - $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); - $this->paymentMethodBuilderMock = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\PaymentMethod\Builder', [], [], '', false - ); - $this->methodListMock = $this->getMock('\Magento\Payment\Model\MethodList', [], [], '', false); - $this->validatorMock = $this->getMock('\Magento\Payment\Model\Checks\ZeroTotal', [], [], '', false); - - $this->service = $this->objectManager->getObject( - 'Magento\Checkout\Service\V1\PaymentMethod\WriteService', - [ - 'quoteRepository' => $this->quoteRepositoryMock, - 'paymentMethodBuilder' => $this->paymentMethodBuilderMock, - 'methodList' => $this->methodListMock, - 'zeroTotalValidator' => $this->validatorMock, - ] - ); - } - - /** - * @expectedException \Exception - * @expectedExceptionMessage Billing address is not set - */ - public function testSetVirtualQuotePaymentThrowsExceptionIfBillingAdressNotSet() - { - $cartId = 11; - - $paymentsCollectionMock = $this->getMock( - '\Magento\Eav\Model\Entity\Collection\AbstractCollection', [], [], '', false - ); - - $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); - $quoteMock->expects($this->any()) - ->method('getPaymentsCollection') - ->will($this->returnValue($paymentsCollectionMock)); - $quoteMock->expects($this->any())->method('isVirtual')->will($this->returnValue(true)); - - $billingAddressMock = $this->getMock('\Magento\Quote\Model\Quote\Address', [], [], '', false); - $quoteMock->expects($this->any())->method('getBillingAddress')->will($this->returnValue($billingAddressMock)); - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($quoteMock)); - - $paymentMethodMock = $this->getMock('\Magento\Checkout\Service\V1\Data\Cart\PaymentMethod', [], [], '', false); - - $this->service->set($paymentMethodMock, $cartId); - } - - public function testSetVirtualQuotePaymentSuccess() - { - $cartId = 11; - $paymentId = 13; - $paymentsCollectionMock = $this->getMock( - '\Magento\Eav\Model\Entity\Collection\AbstractCollection', [], [], '', false - ); - - $quoteMock = $this->getMock( - '\Magento\Quote\Model\Quote', - [ - 'setTotalsCollectedFlag', '__wakeup', 'getPaymentsCollection', 'getPayment', - 'getItemsCollection', 'isVirtual', 'getBillingAddress', 'collectTotals', 'save' - ], [], '', false - ); - $quoteMock->expects($this->any()) - ->method('getPaymentsCollection') - ->will($this->returnValue($paymentsCollectionMock)); - $quoteMock->expects($this->any())->method('isVirtual')->will($this->returnValue(true)); - - $billingAddressMock = - $this->getMock('\Magento\Quote\Model\Quote\Address', ['getCountryId', '__wakeup'], [], '', false); - $billingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(1)); - $quoteMock->expects($this->any())->method('getBillingAddress')->will($this->returnValue($billingAddressMock)); - - $quoteMock->expects($this->once())->method('setTotalsCollectedFlag')->will($this->returnSelf()); - $quoteMock->expects($this->once())->method('collectTotals')->will($this->returnSelf()); - - $paymentMock = $this->getMock('Magento\Quote\Model\Quote\Payment', [], [], '', false); - $paymentMock->expects($this->once())->method('getId')->will($this->returnValue($paymentId)); - - $methodMock = $this->getMockForAbstractClass( - '\Magento\Payment\Model\Method\AbstractMethod', [], '', false, false - ); - - $paymentMock->expects($this->once())->method('getMethodInstance')->will($this->returnValue($methodMock)); - - $quoteMock->expects($this->once())->method('getPayment')->will($this->returnValue($paymentMock)); - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($quoteMock)); - - $paymentMethodMock = $this->getMock('\Magento\Checkout\Service\V1\Data\Cart\PaymentMethod', [], [], '', false); - $this->validatorMock->expects($this->once())->method('isApplicable') - ->with($methodMock, $quoteMock)->will($this->returnValue(true)); - - $this->paymentMethodBuilderMock->expects($this->once()) - ->method('build') - ->with($paymentMethodMock, $quoteMock) - ->will($this->returnValue($paymentMock)); - - $this->assertEquals($paymentId, $this->service->set($paymentMethodMock, $cartId)); - } - - /** - * @expectedException \Magento\Framework\Exception\State\InvalidTransitionException - * @expectedExceptionMessage The requested Payment Method is not available. - */ - public function testSetVirtualQuotePaymentFail() - { - $cartId = 11; - - $paymentsCollectionMock = $this->getMock( - '\Magento\Eav\Model\Entity\Collection\AbstractCollection', [], [], '', false - ); - - $quoteMock = $this->getMock( - '\Magento\Quote\Model\Quote', - [ - 'setTotalsCollectedFlag', '__wakeup', 'getPaymentsCollection', 'getPayment', - 'getItemsCollection', 'isVirtual', 'getBillingAddress', 'collectTotals' - ], [], '', false - ); - $quoteMock->expects($this->any()) - ->method('getPaymentsCollection') - ->will($this->returnValue($paymentsCollectionMock)); - $quoteMock->expects($this->any())->method('isVirtual')->will($this->returnValue(true)); - - $billingAddressMock = - $this->getMock('\Magento\Quote\Model\Quote\Address', ['getCountryId', '__wakeup'], [], '', false); - $billingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(1)); - $quoteMock->expects($this->any())->method('getBillingAddress')->will($this->returnValue($billingAddressMock)); - - $quoteMock->expects($this->never())->method('setTotalsCollectedFlag'); - $quoteMock->expects($this->never())->method('collectTotals'); - - $paymentMock = $this->getMock('Magento\Quote\Model\Quote\Payment', [], [], '', false); - $paymentMock->expects($this->never())->method('getId'); - - $methodMock = $this->getMockForAbstractClass( - '\Magento\Payment\Model\Method\AbstractMethod', [], '', false, false - ); - - $paymentMock->expects($this->once())->method('getMethodInstance')->will($this->returnValue($methodMock)); - - $quoteMock->expects($this->never())->method('getPayment'); - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($quoteMock)); - - $paymentMethodMock = $this->getMock('\Magento\Checkout\Service\V1\Data\Cart\PaymentMethod', [], [], '', false); - $this->validatorMock->expects($this->once())->method('isApplicable') - ->with($methodMock, $quoteMock)->will($this->returnValue(false)); - - $this->paymentMethodBuilderMock->expects($this->once()) - ->method('build') - ->with($paymentMethodMock, $quoteMock) - ->will($this->returnValue($paymentMock)); - - $this->service->set($paymentMethodMock, $cartId); - } - - /** - * @expectedException \Exception - * @expectedExceptionMessage Shipping address is not set - */ - public function testSetNotVirtualQuotePaymentThrowsExceptionIfShippingAddressNotSet() - { - $cartId = 11; - $quoteMock = $this->getMock( - '\Magento\Quote\Model\Quote', - ['__wakeup', 'getPaymentsCollection', 'isVirtual', 'getShippingAddress'], [], '', false - ); - - $paymentsCollectionMock = $this->getMock( - '\Magento\Eav\Model\Entity\Collection\AbstractCollection', [], [], '', false - ); - - $quoteMock->expects($this->any()) - ->method('getPaymentsCollection') - ->will($this->returnValue($paymentsCollectionMock)); - $quoteMock->expects($this->any())->method('isVirtual')->will($this->returnValue(false)); - $quoteMock->expects($this->any()) - ->method('getShippingAddress') - ->will($this->returnValue($this->getMock('\Magento\Quote\Model\Quote\Address', [], [], '', false))); - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($quoteMock)); - - $paymentMethodMock = $this->getMock('\Magento\Checkout\Service\V1\Data\Cart\PaymentMethod', [], [], '', false); - $paymentMock = $this->getMock('Magento\Quote\Model\Quote\Payment', [], [], '', false); - - $this->paymentMethodBuilderMock->expects($this->once()) - ->method('build') - ->with($paymentMethodMock, $quoteMock) - ->will($this->returnValue($paymentMock)); - - $this->service->set($paymentMethodMock, $cartId); - } - - public function testSetNotVirtualQuotePaymentSuccess() - { - $cartId = 11; - $paymentId = 13; - - $paymentsCollectionMock = $this->getMock( - '\Magento\Eav\Model\Entity\Collection\AbstractCollection', [], [], '', false - ); - - $quoteMock = $this->getMock( - '\Magento\Quote\Model\Quote', - [ - 'setTotalsCollectedFlag', '__wakeup', 'getPaymentsCollection', 'getPayment', - 'getItemsCollection', 'isVirtual', 'getShippingAddress', 'collectTotals', 'save' - ], [], '', false - ); - $quoteMock->expects($this->any()) - ->method('getPaymentsCollection') - ->will($this->returnValue($paymentsCollectionMock)); - $quoteMock->expects($this->any())->method('isVirtual')->will($this->returnValue(false)); - - $shippingAddressMock = - $this->getMock('\Magento\Quote\Model\Quote\Address', ['getCountryId', '__wakeup'], [], '', false); - $shippingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(1)); - $quoteMock->expects($this->any())->method('getShippingAddress')->will($this->returnValue($shippingAddressMock)); - - $quoteMock->expects($this->once())->method('setTotalsCollectedFlag')->will($this->returnSelf()); - $quoteMock->expects($this->once())->method('collectTotals')->will($this->returnSelf()); - - $paymentMock = $this->getMock('Magento\Quote\Model\Quote\Payment', [], [], '', false); - $paymentMock->expects($this->once())->method('getId')->will($this->returnValue($paymentId)); - - $methodMock = $this->getMockForAbstractClass( - '\Magento\Payment\Model\Method\AbstractMethod', [], '', false, false - ); - $paymentMock->expects($this->once())->method('getMethodInstance')->will($this->returnValue($methodMock)); - $this->validatorMock->expects($this->once())->method('isApplicable') - ->with($methodMock, $quoteMock)->will($this->returnValue(true)); - - $quoteMock->expects($this->once())->method('getPayment')->will($this->returnValue($paymentMock)); - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($quoteMock)); - - $paymentMethodMock = $this->getMock('\Magento\Checkout\Service\V1\Data\Cart\PaymentMethod', [], [], '', false); - - $this->paymentMethodBuilderMock->expects($this->once()) - ->method('build') - ->with($paymentMethodMock, $quoteMock) - ->will($this->returnValue($paymentMock)); - - $this->assertEquals($paymentId, $this->service->set($paymentMethodMock, $cartId)); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Payment/Model/Method/FreeTest.php b/dev/tests/unit/testsuite/Magento/Payment/Model/Method/FreeTest.php index f3d5527baad..c0a9273f730 100644 --- a/dev/tests/unit/testsuite/Magento/Payment/Model/Method/FreeTest.php +++ b/dev/tests/unit/testsuite/Magento/Payment/Model/Method/FreeTest.php @@ -18,17 +18,25 @@ class FreeTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', [], [], '', false); $paymentData = $this->getMock('Magento\Payment\Helper\Data', [], [], '', false); $this->scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface', [], [], '', false); - $logger = $this->getMock('Psr\Log\LoggerInterface'); $this->currencyPrice = $this->getMockBuilder('Magento\Framework\Pricing\PriceCurrencyInterface')->getMock(); + $context = $this->getMock('\Magento\Framework\Model\Context', ['getEventDispatcher'], [], '', false); + $eventManagerMock = $this->getMock('\Magento\Framework\Event\ManagerInterface'); + $context->expects($this->any())->method('getEventDispatcher')->willReturn($eventManagerMock); + + $registry = $this->getMock('\Magento\Framework\Registry', [], [], '', false); + $metadataService = $this->getMock('\Magento\Framework\Api\MetadataServiceInterface'); + $customAttributeBuilder = $this->getMock('\Magento\Framework\Api\AttributeDataBuilder', [], [], '', false); + $this->methodFree = new \Magento\Payment\Model\Method\Free( - $eventManager, $paymentData, $this->scopeConfig, - $logger, + $context, + $registry, + $metadataService, + $customAttributeBuilder, $this->currencyPrice ); } -- GitLab From 83523215f2567a9df674296f1f3e264221306af4 Mon Sep 17 00:00:00 2001 From: Olexii Korshenko <okorshenko@ebay.com> Date: Thu, 15 Jan 2015 18:58:19 +0200 Subject: [PATCH 049/114] MAGETWO-32519: Implement Shipping Address related interfaces - replaced Service classes with new API interfaces --- .../V1/Address/Shipping/ReadService.php | 71 ---------- .../Address/Shipping/ReadServiceInterface.php | 21 --- .../V1/Address/Shipping/WriteService.php | 111 --------------- .../Shipping/WriteServiceInterface.php | 23 --- .../Service/V1/Data/Cart/Address/Region.php | 62 -------- .../ShippingAddressManagementInterface.php | 10 +- .../Quote/Model/ShippingAddressManagement.php | 105 ++++++++++++++ app/code/Magento/Quote/etc/di.xml | 1 + app/code/Magento/Quote/etc/webapi.xml | 24 ++-- .../V1/Address/Shipping/ReadServiceTest.php | 112 --------------- .../Api/ShippingAddressManagementTest.php} | 117 +++++++++++---- .../V1/Address/Shipping/ReadServiceTest.php | 68 --------- .../Model/ShippingAddressManagementTest.php} | 133 ++++++------------ 13 files changed, 257 insertions(+), 601 deletions(-) delete mode 100644 app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadService.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceInterface.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteService.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceInterface.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/Cart/Address/Region.php rename app/code/Magento/{Checkout => Quote}/Api/ShippingAddressManagementInterface.php (61%) create mode 100644 app/code/Magento/Quote/Model/ShippingAddressManagement.php delete mode 100644 dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceTest.php rename dev/tests/api-functional/testsuite/Magento/{Checkout/Service/V1/Address/Shipping/WriteServiceTest.php => Quote/Api/ShippingAddressManagementTest.php} (52%) delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceTest.php rename dev/tests/unit/testsuite/Magento/{Checkout/Service/V1/Address/Shipping/WriteServiceTest.php => Quote/Model/ShippingAddressManagementTest.php} (54%) diff --git a/app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadService.php b/app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadService.php deleted file mode 100644 index 600ca9796f1..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadService.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Address\Shipping; - -use Magento\Checkout\Service\V1\Address\Converter as AddressConverter; -use Magento\Framework\Exception\NoSuchEntityException; - -/** Quote billing address read service object. */ -class ReadService implements ReadServiceInterface -{ - /** - * Quote repository. - * - * @var \Magento\Quote\Model\QuoteRepository - */ - protected $quoteRepository; - - /** - * Address converter. - * - * @var AddressConverter - */ - protected $addressConverter; - - /** - * Constructs a quote billing address read service object. - * - * @param \Magento\Quote\Model\QuoteRepository $quoteRepository Quote repository. - * @param AddressConverter $addressConverter Address converter. - */ - public function __construct( - \Magento\Quote\Model\QuoteRepository $quoteRepository, - AddressConverter $addressConverter - ) { - $this->quoteRepository = $quoteRepository; - $this->addressConverter = $addressConverter; - } - - /** - * {@inheritDoc} - * - * @param int $cartId The cart ID. - * @return \Magento\Checkout\Service\V1\Data\Cart\Address Shipping address object. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - */ - public function getAddress($cartId) - { - /** - * Quote. - * - * @var \Magento\Quote\Model\Quote $quote - */ - $quote = $this->quoteRepository->getActive($cartId); - if ($quote->isVirtual()) { - throw new NoSuchEntityException( - 'Cart contains virtual product(s) only. Shipping address is not applicable' - ); - } - - /** - * Address. - * - * @var \Magento\Quote\Model\Quote\Address $address - */ - $address = $quote->getShippingAddress(); - return $this->addressConverter->convertModelToDataObject($address); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceInterface.php deleted file mode 100644 index 603115d3051..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceInterface.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Address\Shipping; - -/** Quote billing address read service interface. */ -interface ReadServiceInterface -{ - /** - * Returns the shipping address for a specified quote. - * - * @param int $cartId The cart ID. - * @return \Magento\Checkout\Service\V1\Data\Cart\Address Shipping address object. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @deprecated - * @see \Magento\Checkout\Api\ShippingAddressManagementInterface::get - */ - public function getAddress($cartId); -} diff --git a/app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteService.php b/app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteService.php deleted file mode 100644 index 5382b78b472..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteService.php +++ /dev/null @@ -1,111 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Address\Shipping; - -use Magento\Framework\Exception\InputException; -use Magento\Framework\Exception\NoSuchEntityException; -use Psr\Log\LoggerInterface as Logger; - -/** Quote shipping address write service object. */ -class WriteService implements WriteServiceInterface -{ - /** - * Quote repository. - * - * @var \Magento\Quote\Model\QuoteRepository - */ - protected $quoteRepository; - - /** - * Quote address factory. - * - * @var \Magento\Quote\Model\Quote\AddressFactory - */ - protected $quoteAddressFactory; - - /** - * Address converter. - * - * @var \Magento\Checkout\Service\V1\Address\Converter - */ - protected $addressConverter; - - /** - * Address validator. - * - * @var \Magento\Checkout\Service\V1\Address\Validator - */ - protected $addressValidator; - - /** - * Logger. - * - * @var Logger - */ - protected $logger; - - /** - * Constructs a quote shipping address write service object. - * - * @param \Magento\Quote\Model\QuoteRepository $quoteRepository Quote repository. - * @param \Magento\Checkout\Service\V1\Address\Converter $addressConverter Address converter. - * @param \Magento\Checkout\Service\V1\Address\Validator $addressValidator Address validator. - * @param \Magento\Quote\Model\Quote\AddressFactory $quoteAddressFactory Quote address factory. - * @param Logger $logger Logger. - */ - public function __construct( - \Magento\Quote\Model\QuoteRepository $quoteRepository, - \Magento\Checkout\Service\V1\Address\Converter $addressConverter, - \Magento\Checkout\Service\V1\Address\Validator $addressValidator, - \Magento\Quote\Model\Quote\AddressFactory $quoteAddressFactory, - Logger $logger - ) { - $this->quoteRepository = $quoteRepository; - $this->quoteAddressFactory = $quoteAddressFactory; - $this->addressConverter = $addressConverter; - $this->addressValidator = $addressValidator; - $this->logger = $logger; - } - - /** - * {@inheritDoc} - * - * @param int $cartId The cart ID. - * @param \Magento\Checkout\Service\V1\Data\Cart\Address $addressData The shipping address data. - * @return int Address ID. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @throws \Magento\Framework\Exception\InputException The specified cart ID or address data is not valid. - */ - public function setAddress($cartId, $addressData) - { - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->quoteRepository->getActive($cartId); - if ($quote->isVirtual()) { - throw new NoSuchEntityException( - 'Cart contains virtual product(s) only. Shipping address is not applicable' - ); - } - /** @var \Magento\Quote\Model\Quote\Address $address */ - $address = $this->quoteAddressFactory->create(); - $this->addressValidator->validate($addressData); - if ($addressData->getId()) { - $address->load($addressData->getId()); - } - $address = $this->addressConverter->convertDataObjectToModel($addressData, $address); - $address->setSameAsBilling(0); - $address->setCollectShippingRates(true); - - $quote->setShippingAddress($address); - $quote->setDataChanges(true); - try { - $this->quoteRepository->save($quote); - } catch (\Exception $e) { - $this->logger->critical($e); - throw new InputException('Unable to save address. Please, check input data.'); - } - return $quote->getShippingAddress()->getId(); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceInterface.php deleted file mode 100644 index d06022b3ef6..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceInterface.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Address\Shipping; - -/** Quote shipping address write service interface. */ -interface WriteServiceInterface -{ - /** - * Assigns a specified shipping address to a specified cart. - * - * @param int $cartId The cart ID. - * @param \Magento\Checkout\Service\V1\Data\Cart\Address $addressData The shipping address data. - * @return int Address ID. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @throws \Magento\Framework\Exception\InputException The specified cart ID or address data is not valid. - * @deprecated - * @see \Magento\Checkout\Api\ShippingAddressManagementInterface::assign - */ - public function setAddress($cartId, $addressData); -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Address/Region.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Address/Region.php deleted file mode 100644 index e461b12aa9a..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Address/Region.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Data\Cart\Address; - -/** - * @codeCoverageIgnore - */ -class Region extends \Magento\Framework\Api\AbstractExtensibleObject -{ - /**#@+ - * Array keys - */ - /** - * Region code. - */ - const REGION_CODE = 'region_code'; - - /** - * Region name. - */ - const REGION = 'region'; - - /** - * Region ID. - */ - const REGION_ID = 'region_id'; - - /**#@-*/ - - /** - * Returns the region code. - * - * @return string Region code. - */ - public function getRegionCode() - { - return $this->_get(self::REGION_CODE); - } - - /** - * Returns the region name. - * - * @return string Region. - */ - public function getRegion() - { - return $this->_get(self::REGION); - } - - /** - * Returns the region ID. - * - * @return int Region ID. - */ - public function getRegionId() - { - return $this->_get(self::REGION_ID); - } -} diff --git a/app/code/Magento/Checkout/Api/ShippingAddressManagementInterface.php b/app/code/Magento/Quote/Api/ShippingAddressManagementInterface.php similarity index 61% rename from app/code/Magento/Checkout/Api/ShippingAddressManagementInterface.php rename to app/code/Magento/Quote/Api/ShippingAddressManagementInterface.php index 5676a01a387..c6fda8942d5 100644 --- a/app/code/Magento/Checkout/Api/ShippingAddressManagementInterface.php +++ b/app/code/Magento/Quote/Api/ShippingAddressManagementInterface.php @@ -3,7 +3,7 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api; +namespace Magento\Quote\Api; interface ShippingAddressManagementInterface { @@ -11,21 +11,19 @@ interface ShippingAddressManagementInterface * Assigns a specified shipping address to a specified cart. * * @param int $cartId The cart ID. - * @param \Magento\Checkout\Api\Data\AddressInterface $address The shipping address data. + * @param \Magento\Quote\Api\Data\AddressInterface $address The shipping address data. * @return int Address ID. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. * @throws \Magento\Framework\Exception\InputException The specified cart ID or address data is not valid. - * @see \Magento\Checkout\Service\V1\Address\Shipping\WriteServiceInterface::setAddress */ - public function assign($cartId, \Magento\Checkout\Api\Data\AddressInterface $address); + public function assign($cartId, \Magento\Quote\Api\Data\AddressInterface $address); /** * Returns the shipping address for a specified quote. * * @param int $cartId The cart ID. - * @return \Magento\Checkout\Api\Data\AddressInterface Shipping address object. + * @return \Magento\Quote\Api\Data\AddressInterface Shipping address object. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @see \Magento\Checkout\Service\V1\Address\Shipping\ReadServiceInterface::getAddress */ public function get($cartId); } diff --git a/app/code/Magento/Quote/Model/ShippingAddressManagement.php b/app/code/Magento/Quote/Model/ShippingAddressManagement.php new file mode 100644 index 00000000000..13b92793ab3 --- /dev/null +++ b/app/code/Magento/Quote/Model/ShippingAddressManagement.php @@ -0,0 +1,105 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Quote\Model; + +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\NoSuchEntityException; +use Psr\Log\LoggerInterface as Logger; +use Magento\Quote\Api\ShippingAddressManagementInterface; + +/** Quote shipping address write service object. */ +class ShippingAddressManagement implements ShippingAddressManagementInterface +{ + /** + * Quote repository. + * + * @var \Magento\Quote\Model\QuoteRepository + */ + protected $quoteRepository; + + /** + * Logger. + * + * @var Logger + */ + protected $logger; + + /** + * Validator. + * + * @var QuoteAddressValidator + */ + protected $addressValidator; + + /** + * Constructs a quote shipping address write service object. + * + * @param QuoteRepository $quoteRepository + * @param QuoteAddressValidator $addressValidator + * @param Logger $logger + */ + public function __construct( + \Magento\Quote\Model\QuoteRepository $quoteRepository, + QuoteAddressValidator $addressValidator, + Logger $logger + ) { + $this->quoteRepository = $quoteRepository; + $this->addressValidator = $addressValidator; + $this->logger = $logger; + } + + /** + * {@inheritDoc} + */ + public function assign($cartId, \Magento\Quote\Api\Data\AddressInterface $address) + { + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->quoteRepository->getActive($cartId); + if ($quote->isVirtual()) { + throw new NoSuchEntityException( + 'Cart contains virtual product(s) only. Shipping address is not applicable' + ); + } + $this->addressValidator->validate($address); + $address->setSameAsBilling(0); + $address->setCollectShippingRates(true); + + $quote->setShippingAddress($address); + $quote->setDataChanges(true); + try { + $this->quoteRepository->save($quote); + } catch (\Exception $e) { + $this->logger->critical($e); + throw new InputException('Unable to save address. Please, check input data.'); + } + return $quote->getShippingAddress()->getId(); + } + + /** + * {@inheritDoc} + */ + public function get($cartId) + { + /** + * Quote. + * + * @var \Magento\Quote\Model\Quote $quote + */ + $quote = $this->quoteRepository->getActive($cartId); + if ($quote->isVirtual()) { + throw new NoSuchEntityException( + 'Cart contains virtual product(s) only. Shipping address is not applicable' + ); + } + + /** + * Address. + * + * @var \Magento\Quote\Model\Quote\Address $address + */ + return $quote->getShippingAddress(); + } +} diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index 1f5765d1bf5..2d60b893dab 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -9,6 +9,7 @@ <preference for="Magento\Quote\Api\ShippingMethodManagementInterface" type="Magento\Quote\Model\ShippingMethodManagement" /> <preference for="Magento\Quote\Api\Data\ShippingMethodInterface" type="Magento\Quote\Model\Cart\ShippingMethod" /> <preference for="Magento\Quote\Api\BillingAddressManagementInterface" type="Magento\Quote\Model\BillingAddressManagement" /> + <preference for="Magento\Quote\Api\ShippingAddressManagementInterface" type="Magento\Quote\Model\ShippingAddressManagement" /> <preference for="Magento\Quote\Api\Data\AddressInterface" type="Magento\Quote\Model\Quote\Address" /> <type name="Magento\Framework\Module\Updater\SetupFactory"> <arguments> diff --git a/app/code/Magento/Quote/etc/webapi.xml b/app/code/Magento/Quote/etc/webapi.xml index c96274e1155..dc871225e50 100644 --- a/app/code/Magento/Quote/etc/webapi.xml +++ b/app/code/Magento/Quote/etc/webapi.xml @@ -91,18 +91,6 @@ <resource ref="Magento_Sales::sales" /> </resources> </route> - <!--<route url="/V1/carts/:cartId/shipping-address" method="GET">--> - <!--<service class="Magento\Checkout\Service\V1\Address\Shipping\ReadServiceInterface" method="getAddress"/>--> - <!--<resources>--> - <!--<resource ref="Magento_Sales::sales" />--> - <!--</resources>--> - <!--</route>--> - <!--<route url="/V1/carts/:cartId/shipping-address" method="POST">--> - <!--<service class="Magento\Checkout\Service\V1\Address\Shipping\WriteServiceInterface" method="setAddress"/>--> - <!--<resources>--> - <!--<resource ref="Magento_Sales::sales" />--> - <!--</resources>--> - <!--</route>--> <route url="/V1/carts/:cartId/coupons" method="GET"> <service class="Magento\Quote\Api\CouponManagementInterface" method="get"/> <resources> @@ -121,4 +109,16 @@ <resource ref="Magento_SalesRule::quote" /> </resources> </route> + <route url="/V1/carts/:cartId/shipping-address" method="GET"> + <service class="Magento\Quote\Api\ShippingAddressManagementInterface" method="get"/> + <resources> + <resource ref="Magento_Sales::sales" /> + </resources> + </route> + <route url="/V1/carts/:cartId/shipping-address" method="POST"> + <service class="Magento\Quote\Api\ShippingAddressManagementInterface" method="assign"/> + <resources> + <resource ref="Magento_Sales::sales" /> + </resources> + </route> </routes> diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceTest.php deleted file mode 100644 index 316e61db3d8..00000000000 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceTest.php +++ /dev/null @@ -1,112 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Address\Shipping; - -use Magento\Checkout\Service\V1\Data\Cart\Address; -use Magento\Checkout\Service\V1\Data\Cart\Address\Region; -use Magento\TestFramework\TestCase\WebapiAbstract; -use Magento\Webapi\Model\Rest\Config as RestConfig; - -class ReadServiceTest extends WebapiAbstract -{ - const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'checkoutAddressShippingReadServiceV1'; - const RESOURCE_PATH = '/V1/carts/'; - - /** - * @var \Magento\TestFramework\ObjectManager - */ - protected $objectManager; - - protected function setUp() - { - $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - } - - /** - * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php - */ - public function testGetAddress() - { - $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); - $quote->load('test_order_1', 'reserved_order_id'); - - /** @var \Magento\Quote\Model\Quote\Address $address */ - $address = $quote->getShippingAddress(); - - $data = [ - Address::KEY_COUNTRY_ID => $address->getCountryId(), - Address::KEY_ID => (int)$address->getId(), - Address::KEY_CUSTOMER_ID => $address->getCustomerId(), - Address::KEY_REGION => [ - Region::REGION => $address->getRegion(), - Region::REGION_ID => $address->getRegionId(), - Region::REGION_CODE => $address->getRegionCode(), - ], - Address::KEY_STREET => $address->getStreet(), - Address::KEY_COMPANY => $address->getCompany(), - Address::KEY_TELEPHONE => $address->getTelephone(), - Address::KEY_POSTCODE => $address->getPostcode(), - Address::KEY_CITY => $address->getCity(), - Address::KEY_FIRSTNAME => $address->getFirstname(), - Address::KEY_LASTNAME => $address->getLastname(), - Address::KEY_EMAIL => $address->getEmail(), - Address::CUSTOM_ATTRIBUTES_KEY => [['attribute_code' => 'disable_auto_group_change', 'value' => null]], - ]; - - $cartId = $quote->getId(); - - $serviceInfo = $this->getServiceInfo(); - $serviceInfo['rest']['resourcePath'] = str_replace('{cart_id}', $cartId, $serviceInfo['rest']['resourcePath']); - - if (TESTS_WEB_API_ADAPTER == self::ADAPTER_SOAP) { - unset($data[Address::KEY_PREFIX]); - unset($data[Address::KEY_SUFFIX]); - unset($data[Address::KEY_MIDDLENAME]); - unset($data[Address::KEY_FAX]); - unset($data[Address::KEY_VAT_ID]); - } - - $requestData = ["cartId" => $cartId]; - $this->assertEquals($data, $this->_webApiCall($serviceInfo, $requestData)); - } - - /** - * @magentoApiDataFixture Magento/Checkout/_files/quote_with_virtual_product_and_address.php - * - * @expectedException \Exception - * @expectedExceptionMessage Cart contains virtual product(s) only. Shipping address is not applicable - */ - public function testGetAddressOfQuoteWithVirtualProduct() - { - $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); - $cartId = $quote->load('test_order_with_virtual_product', 'reserved_order_id')->getId(); - - $serviceInfo = $this->getServiceInfo(); - $serviceInfo['rest']['resourcePath'] = str_replace('{cart_id}', $cartId, $serviceInfo['rest']['resourcePath']); - - $this->_webApiCall($serviceInfo, ["cartId" => $cartId]); - } - - /** - * @return array - */ - protected function getServiceInfo() - { - return $serviceInfo = [ - 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH . '{cart_id}/shipping-address', - 'httpMethod' => RestConfig::HTTP_METHOD_GET, - ], - 'soap' => [ - 'service' => self::SERVICE_NAME, - 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'GetAddress', - ], - ]; - } -} diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/ShippingAddressManagementTest.php similarity index 52% rename from dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceTest.php rename to dev/tests/api-functional/testsuite/Magento/Quote/Api/ShippingAddressManagementTest.php index a318918c707..b96c72a7fdf 100644 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/ShippingAddressManagementTest.php @@ -6,13 +6,14 @@ namespace Magento\Checkout\Service\V1\Address\Shipping; +use Magento\Quote\Api\Data\AddressInterface; use Magento\TestFramework\TestCase\WebapiAbstract; use Magento\Webapi\Model\Rest\Config as RestConfig; -class WriteServiceTest extends WebapiAbstract +class ShippingAddressManagementTest extends WebapiAbstract { const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'checkoutAddressShippingWriteServiceV1'; + const SERVICE_NAME = 'quoteShippingAddressManagementV1'; const RESOURCE_PATH = '/V1/carts/'; /** @@ -20,15 +21,81 @@ class WriteServiceTest extends WebapiAbstract */ protected $objectManager; + protected function setUp() + { + $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + } + /** - * @var \Magento\Checkout\Service\V1\Data\Cart\AddressBuilder + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php */ - protected $builder; + public function testGetAddress() + { + $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); + $quote->load('test_order_1', 'reserved_order_id'); - protected function setUp() + /** @var \Magento\Quote\Model\Quote\Address $address */ + $address = $quote->getShippingAddress(); + + $data = [ + AddressInterface::KEY_COUNTRY_ID => $address->getCountryId(), + AddressInterface::KEY_ID => (int)$address->getId(), + AddressInterface::KEY_CUSTOMER_ID => $address->getCustomerId(), + AddressInterface::REGION => $address->getRegion(), + AddressInterface::REGION_ID => $address->getRegionId(), + AddressInterface::REGION_CODE => $address->getRegionCode(), + AddressInterface::KEY_STREET => $address->getStreet(), + AddressInterface::KEY_COMPANY => $address->getCompany(), + AddressInterface::KEY_TELEPHONE => $address->getTelephone(), + AddressInterface::KEY_POSTCODE => $address->getPostcode(), + AddressInterface::KEY_CITY => $address->getCity(), + AddressInterface::KEY_FIRSTNAME => $address->getFirstname(), + AddressInterface::KEY_LASTNAME => $address->getLastname(), + AddressInterface::KEY_EMAIL => $address->getEmail() + ]; + + $cartId = $quote->getId(); + + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => self::RESOURCE_PATH . $quote->getId() . '/shipping-address', + 'httpMethod' => RestConfig::HTTP_METHOD_GET, + ], + 'soap' => [ + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME . 'Get', + ], + ]; + + $requestData = ["cartId" => $cartId]; + $this->assertEquals($data, $this->_webApiCall($serviceInfo, $requestData)); + } + + /** + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_virtual_product_and_address.php + * + * @expectedException \Exception + * @expectedExceptionMessage Cart contains virtual product(s) only. Shipping address is not applicable + */ + public function testGetAddressOfQuoteWithVirtualProduct() { - $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->builder = $this->objectManager->create('Magento\Checkout\Service\V1\Data\Cart\AddressBuilder'); + $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); + $cartId = $quote->load('test_order_with_virtual_product', 'reserved_order_id')->getId(); + + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => self::RESOURCE_PATH . $quote->getId() . '/shipping-address', + 'httpMethod' => RestConfig::HTTP_METHOD_GET, + ], + 'soap' => [ + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME . 'Get', + ], + ]; + + $this->_webApiCall($serviceInfo, ["cartId" => $cartId]); } /** @@ -48,7 +115,7 @@ class WriteServiceTest extends WebapiAbstract 'soap' => [ 'service' => self::SERVICE_NAME, 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'SetAddress', + 'operation' => self::SERVICE_NAME . 'Assign', ], ]; @@ -59,11 +126,9 @@ class WriteServiceTest extends WebapiAbstract 'company' => 'eBay Inc', 'street' => ['Typical Street', 'Tiny House 18'], 'city' => 'Big City', - 'region' => [ - 'region_id' => 12, - 'region' => 'California', - 'region_code' => 'CA', - ], + 'region_id' => 12, + 'region' => 'California', + 'region_code' => 'CA', 'postcode' => '0985432', 'country_id' => 'US', 'telephone' => '88776655', @@ -71,7 +136,7 @@ class WriteServiceTest extends WebapiAbstract ]; $requestData = [ "cartId" => $quote->getId(), - 'addressData' => $addressData, + 'address' => $addressData, ]; $addressId = $this->_webApiCall($serviceInfo, $requestData); @@ -79,19 +144,19 @@ class WriteServiceTest extends WebapiAbstract //reset $quote to reload data $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); $quote->load('test_order_1', 'reserved_order_id'); - $savedData = $quote->getShippingAddress()->getData(); - $this->assertEquals($addressId, $savedData['address_id']); + $address = $quote->getShippingAddress(); + $address->getRegionCode(); + $savedData = $address->getData(); + $this->assertEquals($addressId, $savedData['address_id'], 'Invalid address ID'); $this->assertEquals(0, $savedData['same_as_billing']); //custom checks for street, region and address_type $this->assertEquals($addressData['street'], $quote->getShippingAddress()->getStreet()); unset($addressData['street']); - $this->assertEquals($addressData['region']['region_id'], $savedData['region_id']); - $this->assertEquals($addressData['region']['region'], $savedData['region']); - unset($addressData['region']); + $this->assertEquals('shipping', $savedData['address_type']); //check the rest of fields foreach ($addressData as $key => $value) { - $this->assertEquals($value, $savedData[$key]); + $this->assertEquals($value, $savedData[$key], 'Invalid value for ' . $key); } } @@ -117,7 +182,7 @@ class WriteServiceTest extends WebapiAbstract 'soap' => [ 'service' => self::SERVICE_NAME, 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'SetAddress', + 'operation' => self::SERVICE_NAME . 'Assign', ], ]; @@ -128,11 +193,9 @@ class WriteServiceTest extends WebapiAbstract 'company' => 'eBay Inc', 'street' => ['Typical Street', 'Tiny House 18'], 'city' => 'Big City', - 'region' => [ - 'region_id' => 12, - 'region' => 'California', - 'region_code' => 'CA', - ], + 'region_id' => 12, + 'region' => 'California', + 'region_code' => 'CA', 'postcode' => '0985432', 'country_id' => 'US', 'telephone' => '88776655', @@ -140,7 +203,7 @@ class WriteServiceTest extends WebapiAbstract ]; $requestData = [ "cartId" => $quote->getId(), - 'addressData' => $addressData, + 'address' => $addressData, ]; $this->_webApiCall($serviceInfo, $requestData); diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceTest.php deleted file mode 100644 index 54700a7b9c3..00000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceTest.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php -/** - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Address\Shipping; - -class ReadServiceTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var ReadService - */ - protected $service; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteRepositoryMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $converterMock; - - protected function setUp() - { - $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); - $this->converterMock = $this->getMock('\Magento\Checkout\Service\V1\Address\Converter', [], [], '', false); - - $this->service = new ReadService($this->quoteRepositoryMock, $this->converterMock); - } - - public function testGetAddress() - { - $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); - $this->quoteRepositoryMock->expects($this->once())->method('getActive')->with('cartId')->will( - $this->returnValue($quoteMock) - ); - - $addressMock = $this->getMock('\Magento\Quote\Model\Quote\Address', [], [], '', false); - $quoteMock->expects($this->any())->method('getShippingAddress')->will($this->returnValue($addressMock)); - $quoteMock->expects($this->any())->method('isVirtual')->will($this->returnValue(false)); - - $this->converterMock->expects($this->once())->method('convertModelToDataObject') - ->with($addressMock)->will($this->returnValue('ShippingAddress')); - - $this->assertEquals('ShippingAddress', $this->service->getAddress('cartId')); - } - - /** - * @expectedException \Exception - * @expectedExceptionMessage Cart contains virtual product(s) only. Shipping address is not applicable - */ - public function testGetAddressOfQuoteWithVirtualProducts() - { - $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); - $this->quoteRepositoryMock->expects($this->once())->method('getActive')->with('cartId')->will( - $this->returnValue($quoteMock) - ); - - $quoteMock->expects($this->any())->method('isVirtual')->will($this->returnValue(true)); - $quoteMock->expects($this->never())->method('getShippingAddress'); - - $this->service->getAddress('cartId'); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/ShippingAddressManagementTest.php similarity index 54% rename from dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceTest.php rename to dev/tests/unit/testsuite/Magento/Quote/Model/ShippingAddressManagementTest.php index ec444630c5c..d563fafd7bf 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/ShippingAddressManagementTest.php @@ -5,12 +5,12 @@ * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\Address\Shipping; +namespace Magento\Quote\Model; -class WriteServiceTest extends \PHPUnit_Framework_TestCase +class ShippingAddressManagementTest extends \PHPUnit_Framework_TestCase { /** - * @var WriteService + * @var ShippingAddressManagement */ protected $service; @@ -19,11 +19,6 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase */ protected $quoteRepositoryMock; - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $addressFactoryMock; - /** * @var \PHPUnit_Framework_MockObject_MockObject */ @@ -34,11 +29,6 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase */ protected $validatorMock; - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $converterMock; - /** * @var \Magento\TestFramework\Helper\ObjectManager */ @@ -47,38 +37,21 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); - $this->addressFactoryMock = $this->getMock( - '\Magento\Quote\Model\Quote\AddressFactory', ['create', '__wakeup'], [], '', false - ); - $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $this->quoteAddressMock = $this->getMock( '\Magento\Quote\Model\Quote\Address', - ['getCustomerId', 'load', 'getData', 'setData', 'setStreet', 'setRegionId', 'setRegion', '__wakeup'], + ['setSameAsBilling', 'setCollectShippingRates', '__wakeup'], [], '', false ); - $this->addressFactoryMock->expects($this->any()) - ->method('create') - ->will($this->returnValue($this->quoteAddressMock)); - $this->validatorMock = $this->getMock( - '\Magento\Checkout\Service\V1\Address\Validator', [], [], '', false + 'Magento\Quote\Model\QuoteAddressValidator', [], [], '', false ); - - $this->converterMock = $this->getMock( - '\Magento\Checkout\Service\V1\Address\Converter', [], [], '', false - ); - - $this->service = $this->objectManager->getObject( - 'Magento\Checkout\Service\V1\Address\Shipping\WriteService', - [ - 'quoteRepository' => $this->quoteRepositoryMock, - 'quoteAddressFactory' => $this->addressFactoryMock, - 'addressValidator' => $this->validatorMock, - 'addressConverter' => $this->converterMock, - ] + $this->service = new ShippingAddressManagement( + $this->quoteRepositoryMock, + $this->validatorMock, + $this->getMock('\Psr\Log\LoggerInterface') ); } @@ -97,7 +70,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase $this->validatorMock->expects($this->once())->method('validate') ->will($this->throwException(new \Magento\Framework\Exception\NoSuchEntityException('error345'))); - $this->service->setAddress('cart654', null); + $this->service->assign('cart654', $this->quoteAddressMock); } public function testSetAddress() @@ -109,27 +82,11 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($quoteMock)); $quoteMock->expects($this->once())->method('isVirtual')->will($this->returnValue(false)); - $builder = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\Address\RegionBuilder', ['create'], [], '', false - ); - - /** @var \Magento\Checkout\Service\V1\Data\Cart\AddressBuilder $addressDataBuilder */ - $addressDataBuilder = $this->objectManager->getObject( - 'Magento\Checkout\Service\V1\Data\Cart\AddressBuilder', - ['regionBuilder' => $builder] - ); - - /** @var \Magento\Checkout\Service\V1\Data\Cart\Address $addressData */ - $addressData = $addressDataBuilder->setId(356)->create(); $this->validatorMock->expects($this->once())->method('validate') - ->with($addressData) + ->with($this->quoteAddressMock) ->will($this->returnValue(true)); - $this->converterMock->expects($this->once())->method('convertDataObjectToModel') - ->with($addressData, $this->quoteAddressMock) - ->will($this->returnValue($this->quoteAddressMock)); - $quoteMock->expects($this->once())->method('setShippingAddress')->with($this->quoteAddressMock); $quoteMock->expects($this->once())->method('setDataChanges')->with(true); $this->quoteRepositoryMock->expects($this->once())->method('save')->with($quoteMock); @@ -140,7 +97,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase $quoteMock->expects($this->once())->method('getShippingAddress') ->will($this->returnValue($shippingAddressMock)); - $this->assertEquals($addressId, $this->service->setAddress('cart867', $addressData)); + $this->assertEquals($addressId, $this->service->assign('cart867', $this->quoteAddressMock)); } /** @@ -156,25 +113,12 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($quoteMock)); $quoteMock->expects($this->once())->method('isVirtual')->will($this->returnValue(true)); - $builder = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\Address\RegionBuilder', ['create'], [], '', false - ); - - /** @var \Magento\Checkout\Service\V1\Data\Cart\AddressBuilder $addressDataBuilder */ - $addressDataBuilder = $this->objectManager->getObject( - 'Magento\Checkout\Service\V1\Data\Cart\AddressBuilder', - ['regionBuilder' => $builder] - ); - - /** @var \Magento\Checkout\Service\V1\Data\Cart\Address $addressData */ - $addressData = $addressDataBuilder->setId(356)->create(); - $this->validatorMock->expects($this->never())->method('validate'); $quoteMock->expects($this->never())->method('setShippingAddress'); $quoteMock->expects($this->never())->method('save'); - $this->service->setAddress('cart867', $addressData); + $this->service->assign('cart867', $this->quoteAddressMock); } /** @@ -190,27 +134,10 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($quoteMock)); $quoteMock->expects($this->once())->method('isVirtual')->will($this->returnValue(false)); - $builder = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\Address\RegionBuilder', ['create'], [], '', false - ); - - /** @var \Magento\Checkout\Service\V1\Data\Cart\AddressBuilder $addressDataBuilder */ - $addressDataBuilder = $this->objectManager->getObject( - 'Magento\Checkout\Service\V1\Data\Cart\AddressBuilder', - ['regionBuilder' => $builder] - ); - - /** @var \Magento\Checkout\Service\V1\Data\Cart\Address $addressData */ - $addressData = $addressDataBuilder->setId(356)->create(); - $this->validatorMock->expects($this->once())->method('validate') - ->with($addressData) + ->with($this->quoteAddressMock) ->will($this->returnValue(true)); - $this->converterMock->expects($this->once())->method('convertDataObjectToModel') - ->with($addressData, $this->quoteAddressMock) - ->will($this->returnValue($this->quoteAddressMock)); - $quoteMock->expects($this->once())->method('setShippingAddress')->with($this->quoteAddressMock); $quoteMock->expects($this->once())->method('setDataChanges')->with(true); $this->quoteRepositoryMock->expects($this->once()) @@ -219,6 +146,36 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase ->willThrowException( new \Exception('Some DB Error') ); - $this->service->setAddress('cart867', $addressData); + $this->service->assign('cart867', $this->quoteAddressMock); + } + + public function testGetAddress() + { + $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); + $this->quoteRepositoryMock->expects($this->once())->method('getActive')->with('cartId')->will( + $this->returnValue($quoteMock) + ); + + $addressMock = $this->getMock('\Magento\Quote\Model\Quote\Address', [], [], '', false); + $quoteMock->expects($this->any())->method('getShippingAddress')->will($this->returnValue($addressMock)); + $quoteMock->expects($this->any())->method('isVirtual')->will($this->returnValue(false)); + $this->assertEquals($addressMock, $this->service->get('cartId')); + } + + /** + * @expectedException \Exception + * @expectedExceptionMessage Cart contains virtual product(s) only. Shipping address is not applicable + */ + public function testGetAddressOfQuoteWithVirtualProducts() + { + $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); + $this->quoteRepositoryMock->expects($this->once())->method('getActive')->with('cartId')->will( + $this->returnValue($quoteMock) + ); + + $quoteMock->expects($this->any())->method('isVirtual')->will($this->returnValue(true)); + $quoteMock->expects($this->never())->method('getShippingAddress'); + + $this->service->get('cartId'); } } -- GitLab From ee7e60257c5342ba9f155905b2c42f83f4ecb4ee Mon Sep 17 00:00:00 2001 From: Olexii Korshenko <okorshenko@ebay.com> Date: Thu, 15 Jan 2015 19:05:55 +0200 Subject: [PATCH 050/114] MAGETWO-32519: Implement Shipping Address related interfaces - replaced Service classes with new API interfaces --- app/code/Magento/Quote/Api/Data/CartInterface.php | 4 ++-- .../Magento/Quote/Api/ShippingAddressManagementTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Quote/Api/Data/CartInterface.php b/app/code/Magento/Quote/Api/Data/CartInterface.php index c509aa358f9..30a07676bd6 100644 --- a/app/code/Magento/Quote/Api/Data/CartInterface.php +++ b/app/code/Magento/Quote/Api/Data/CartInterface.php @@ -89,14 +89,14 @@ interface CartInterface extends \Magento\Framework\Api\ExtensibleDataInterface /** * Returns the cart shipping address. * - * @return \Magento\Checkout\Api\Data\AddressInterface|null Cart shipping address. Otherwise, null. + * @return \Magento\Quote\Api\Data\AddressInterface|null Cart shipping address. Otherwise, null. */ public function getShippingAddress(); /** * Returns the cart billing address. * - * @return \Magento\Checkout\Api\Data\AddressInterface|null Cart billing address. Otherwise, null. + * @return \Magento\Quote\Api\Data\AddressInterface|null Cart billing address. Otherwise, null. */ public function getBillingAddress(); diff --git a/dev/tests/api-functional/testsuite/Magento/Quote/Api/ShippingAddressManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/ShippingAddressManagementTest.php index b96c72a7fdf..64a93d6d1a3 100644 --- a/dev/tests/api-functional/testsuite/Magento/Quote/Api/ShippingAddressManagementTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/ShippingAddressManagementTest.php @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\Address\Shipping; +namespace Magento\Quote\Api; use Magento\Quote\Api\Data\AddressInterface; use Magento\TestFramework\TestCase\WebapiAbstract; -- GitLab From 114c76ccbfa14c864db4a3576873b17046687af1 Mon Sep 17 00:00:00 2001 From: Serhiy Shkolyarenko <sshkolyarenko@ebay.com> Date: Fri, 16 Jan 2015 12:45:35 +0200 Subject: [PATCH 051/114] MAGETWO-32009: Catalog category model and tables cleaning createCustomerCart(), assignCustomer(), API test --- app/code/Magento/Checkout/etc/webapi.xml | 12 -- .../Magento/Quote/Model/QuoteManagement.php | 122 +++++++++++++++++- app/code/Magento/Quote/etc/di.xml | 1 + app/code/Magento/Quote/etc/webapi.xml | 12 ++ .../Api/CartManagementInterfaceTest.php} | 51 ++------ .../Quote/Api/CartRepositoryInterfaceTest.php | 16 +-- 6 files changed, 153 insertions(+), 61 deletions(-) rename dev/tests/api-functional/testsuite/Magento/{Checkout/Service/V1/Cart/WriteServiceTest.php => Quote/Api/CartManagementInterfaceTest.php} (86%) diff --git a/app/code/Magento/Checkout/etc/webapi.xml b/app/code/Magento/Checkout/etc/webapi.xml index 974ad013df0..89ada81f011 100644 --- a/app/code/Magento/Checkout/etc/webapi.xml +++ b/app/code/Magento/Checkout/etc/webapi.xml @@ -7,18 +7,6 @@ --> <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../app/code/Magento/Webapi/etc/webapi.xsd"> - <route url="/V1/carts/" method="POST"> - <service class="Magento\Checkout\Service\V1\Cart\WriteServiceInterface" method="create"/> - <resources> - <resource ref="Magento_Sales::create" /> - </resources> - </route> - <route url="/V1/carts/:cartId" method="PUT"> - <service class="Magento\Checkout\Service\V1\Cart\WriteServiceInterface" method="assignCustomer"/> - <resources> - <resource ref="Magento_Sales::create" /> - </resources> - </route> <route url="/V1/customer/:customerId/cart" method="GET"> <service class="Magento\Checkout\Service\V1\Cart\ReadServiceInterface" method="getCartForCustomer"/> <resources> diff --git a/app/code/Magento/Quote/Model/QuoteManagement.php b/app/code/Magento/Quote/Model/QuoteManagement.php index c5e22768437..a43ce7e28d5 100644 --- a/app/code/Magento/Quote/Model/QuoteManagement.php +++ b/app/code/Magento/Quote/Model/QuoteManagement.php @@ -14,11 +14,14 @@ use Magento\Quote\Model\Quote\Address\ToOrder as ToOrderConverter; use Magento\Quote\Model\Quote\Address\ToOrderAddress as ToOrderAddressConverter; use Magento\Quote\Model\Quote\Item\ToOrderItem as ToOrderItemConverter; use Magento\Quote\Model\Quote\Payment\ToOrderPayment as ToOrderPaymentConverter; +use Magento\Authorization\Model\UserContextInterface; +use Magento\Framework\Exception\CouldNotSaveException; +use Magento\Framework\Exception\StateException; /** * Class QuoteManagement */ -class QuoteManagement +class QuoteManagement implements \Magento\Quote\Api\CartManagementInterface { /** * @var EventManager @@ -65,6 +68,26 @@ class QuoteManagement */ protected $quotePaymentToOrderPayment; + /** + * @var UserContextInterface + */ + protected $userContext; + + /** + * @var QuoteRepository + */ + protected $quoteRepository; + + /** + * @var \Magento\Customer\Api\CustomerRepositoryInterface + */ + protected $customerRepository; + + /** + * @var \Magento\Customer\Model\CustomerFactory + */ + protected $customerModelFactory; + /** * @param EventManager $eventManager * @param QuoteValidator $quoteValidator @@ -85,7 +108,11 @@ class QuoteManagement ToOrderConverter $quoteAddressToOrder, ToOrderAddressConverter $quoteAddressToOrderAddress, ToOrderItemConverter $quoteItemToOrderItem, - ToOrderPaymentConverter $quotePaymentToOrderPayment + ToOrderPaymentConverter $quotePaymentToOrderPayment, + UserContextInterface $userContext, + QuoteRepository $quoteRepository, + \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository, + \Magento\Customer\Model\CustomerFactory $customerModelFactory ) { $this->eventManager = $eventManager; $this->quoteValidator = $quoteValidator; @@ -96,8 +123,99 @@ class QuoteManagement $this->quoteAddressToOrderAddress = $quoteAddressToOrderAddress; $this->quoteItemToOrderItem = $quoteItemToOrderItem; $this->quotePaymentToOrderPayment = $quotePaymentToOrderPayment; + $this->userContext = $userContext; + $this->quoteRepository = $quoteRepository; + $this->customerRepository = $customerRepository; + $this->customerModelFactory = $customerModelFactory; + } + + /** + * {@inheritdoc} + */ + public function createEmptyCart($storeId) + { + $quote = $this->userContext->getUserType() == UserContextInterface::USER_TYPE_CUSTOMER + ? $this->createCustomerCart($storeId) + : $this->createAnonymousCart($storeId); + + try { + $this->quoteRepository->save($quote); + } catch (\Exception $e) { + throw new CouldNotSaveException('Cannot create quote'); + } + return $quote->getId(); } + /** + * {@inheritdoc} + */ + public function assignCustomer($cartId, $customerId, $storeId) + { + $quote = $this->quoteRepository->getActive($cartId); + $customer = $this->customerRepository->getById($customerId); + $customerModel = $this->customerModelFactory->create(); + + if (!in_array($storeId, $customerModel->load($customerId)->getSharedStoreIds())) { + throw new StateException('Cannot assign customer to the given cart. The cart belongs to different store.'); + } + if ($quote->getCustomerId()) { + throw new StateException('Cannot assign customer to the given cart. The cart is not anonymous.'); + } + try { + $this->quoteRepository->getForCustomer($customerId); + throw new StateException('Cannot assign customer to the given cart. Customer already has active cart.'); + } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { + } + + $quote->setCustomer($customer); + $quote->setCustomerIsGuest(0); + $this->quoteRepository->save($quote); + return true; + + } + + /** + * Creates an anonymous cart. + * + * @return \Magento\Quote\Model\Quote Cart object. + */ + protected function createAnonymousCart($storeId) + { + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->quoteRepository->create(); + $quote->setStoreId($storeId); + return $quote; + } + + /** + * Creates a cart for the currently logged-in customer. + * + * @param $storeId + * @return \Magento\Quote\Model\Quote Cart object. + * @throws CouldNotSaveException The cart could not be created. + */ + protected function createCustomerCart($storeId) + { + $customer = $this->customerRepository->getById($this->userContext->getUserId()); + + try { + $this->quoteRepository->getActiveForCustomer($this->userContext->getUserId()); + } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { + throw new CouldNotSaveException('Cannot create quote'); + } + + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->quoteRepository->create(); + $quote->setStoreId($storeId); + $quote->setCustomer($customer); + $quote->setCustomerIsGuest(0); + return $quote; + } + + public function order($cartId) + { + //stub for interface + } /** * @param Quote $quote * @return void diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index 2d60b893dab..bae7b5579b9 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -25,4 +25,5 @@ <preference for="Magento\Quote\Api\PaymentMethodManagementInterface" type="\Magento\Quote\Model\PaymentMethodManagement" /> <preference for="Magento\Quote\Api\Data\PaymentInterface" type="\Magento\Quote\Model\Quote\Payment" /> <preference for="Magento\Quote\Api\CouponManagementInterface" type="Magento\Quote\Model\CouponManagement" /> + <preference for="Magento\Quote\Api\CartManagementInterface" type="Magento\Quote\Model\QuoteManagement" /> </config> diff --git a/app/code/Magento/Quote/etc/webapi.xml b/app/code/Magento/Quote/etc/webapi.xml index dc871225e50..e7941965cb6 100644 --- a/app/code/Magento/Quote/etc/webapi.xml +++ b/app/code/Magento/Quote/etc/webapi.xml @@ -19,6 +19,18 @@ <resource ref="Magento_Catalog::products" /> </resources> </route> + <route url="/V1/carts/" method="POST"> + <service class="Magento\Quote\Api\CartManagementInterface" method="createEmptyCart"/> + <resources> + <resource ref="Magento_Sales::create" /> + </resources> + </route> + <route url="/V1/carts/:cartId" method="PUT"> + <service class="Magento\Quote\Api\CartManagementInterface" method="assignCustomer"/> + <resources> + <resource ref="Magento_Sales::create" /> + </resources> + </route> <route url="/V1/carts/:cartId/selected-shipping-method" method="PUT"> <service class="Magento\Quote\Api\ShippingMethodManagementInterface" method="set"/> <resources> diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Cart/WriteServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php similarity index 86% rename from dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Cart/WriteServiceTest.php rename to dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php index 70f3ba753b9..0a56c2101c4 100644 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Cart/WriteServiceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php @@ -4,15 +4,15 @@ * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\Cart; +namespace Magento\Quote\Api; use Magento\TestFramework\TestCase\WebapiAbstract; use Magento\Webapi\Model\Rest\Config as RestConfig; -class WriteServiceTest extends WebapiAbstract +class CartManagementInterfaceTest extends WebapiAbstract { const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'checkoutCartWriteServiceV1'; + const SERVICE_NAME = 'quoteCartManagementV1'; const RESOURCE_PATH = '/V1/carts/'; protected $createdQuotes = []; @@ -37,11 +37,12 @@ class WriteServiceTest extends WebapiAbstract 'soap' => [ 'service' => self::SERVICE_NAME, 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'Create', + 'operation' => self::SERVICE_NAME . 'CreateEmptyCart', ], ]; - $quoteId = $this->_webApiCall($serviceInfo); + $requestData = ['storeId' => 1]; + $quoteId = $this->_webApiCall($serviceInfo, $requestData); $this->assertGreaterThan(0, $quoteId); $this->createdQuotes[] = $quoteId; } @@ -86,6 +87,7 @@ class WriteServiceTest extends WebapiAbstract $requestData = [ 'cartId' => $cartId, 'customerId' => $customerId, + 'storeId' => 1, ]; // Cart must be anonymous (see fixture) $this->assertEmpty($quote->getCustomerId()); @@ -123,6 +125,7 @@ class WriteServiceTest extends WebapiAbstract $requestData = [ 'cartId' => $cartId, 'customerId' => $customerId, + 'storeId' => 1, ]; $this->_webApiCall($serviceInfo, $requestData); @@ -150,6 +153,7 @@ class WriteServiceTest extends WebapiAbstract $requestData = [ 'cartId' => $cartId, 'customerId' => $customerId, + 'storeId' => 1, ]; $this->_webApiCall($serviceInfo, $requestData); @@ -184,6 +188,7 @@ class WriteServiceTest extends WebapiAbstract $requestData = [ 'cartId' => $cartId, 'customerId' => $customerId, + 'storeId' => 1, ]; $this->_webApiCall($serviceInfo, $requestData); } @@ -220,6 +225,7 @@ class WriteServiceTest extends WebapiAbstract $requestData = [ 'cartId' => $cartId, 'customerId' => $customerId, + 'storeId' => 1, ]; $this->_webApiCall($serviceInfo, $requestData); } @@ -260,41 +266,8 @@ class WriteServiceTest extends WebapiAbstract $requestData = [ 'cartId' => $cartId, 'customerId' => $customerId, + 'storeId' => 1, ]; $this->_webApiCall($serviceInfo, $requestData); } - - /** - * @magentoApiDataFixture Magento/Checkout/_files/quote_with_check_payment.php - */ - public function testOrderPlacesOrder() - { - /** @var $quote \Magento\Quote\Model\Quote */ - $quote = $this->objectManager->create('Magento\Quote\Model\Quote')->load('test_order_1', 'reserved_order_id'); - - $cartId = $quote->getId(); - - $serviceInfo = [ - 'soap' => [ - 'service' => 'checkoutCartWriteServiceV1', - 'operation' => 'checkoutCartWriteServiceV1Order', - 'serviceVersion' => 'V1', - ], - 'rest' => [ - 'resourcePath' => '/V1/carts/' . $cartId . '/order', - 'httpMethod' => RestConfig::HTTP_METHOD_PUT, - ], - ]; - - $requestData = [ - 'cartId' => $cartId, - ]; - $this->_webApiCall($serviceInfo, $requestData); - /** @var \Magento\Sales\Model\Order $order */ - $order = $this->objectManager->create('Magento\Sales\Model\Order')->load(1); - $items = $order->getAllItems(); - $this->assertCount(1, $items); - $this->assertEquals('Simple Product', $items[0]->getName()); - $quote->delete(); - } } diff --git a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php index 4babdcf4171..c30599ebdb5 100644 --- a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php @@ -93,9 +93,9 @@ class CartRepositoryInterfaceTest extends WebapiAbstract 'httpMethod' => RestConfig::HTTP_METHOD_GET, ], 'soap' => [ - 'service' => 'quoteQuoteRepositoryV1', + 'service' => 'quoteCartRepositoryV1', 'serviceVersion' => 'V1', - 'operation' => 'quoteQuoteRepositoryV1GetCart', + 'operation' => 'quoteCartRepositoryV1GetCart', ], ]; @@ -138,9 +138,9 @@ class CartRepositoryInterfaceTest extends WebapiAbstract $serviceInfo = [ 'soap' => [ - 'service' => 'quoteQuoteRepositoryV1', + 'service' => 'quoteCartRepositoryV1', 'serviceVersion' => 'V1', - 'operation' => 'quoteQuoteRepositoryV1GetCart', + 'operation' => 'quoteCartRepositoryV1GetCart', ], 'rest' => [ 'resourcePath' => '/V1/carts/' . $cartId, @@ -165,9 +165,9 @@ class CartRepositoryInterfaceTest extends WebapiAbstract 'httpMethod' => RestConfig::HTTP_METHOD_PUT, ], 'soap' => [ - 'service' => 'quoteQuoteRepositoryV1', + 'service' => 'quoteCartRepositoryV1', 'serviceVersion' => 'V1', - 'operation' => 'quoteQuoteRepositoryV1GetCartList', + 'operation' => 'quoteCartRepositoryV1GetCartList', ], ]; @@ -229,9 +229,9 @@ class CartRepositoryInterfaceTest extends WebapiAbstract { $serviceInfo = [ 'soap' => [ - 'service' => 'quoteQuoteRepositoryV1', + 'service' => 'quoteCartRepositoryV1', 'serviceVersion' => 'V1', - 'operation' => 'quoteQuoteRepositoryV1GetCartList', + 'operation' => 'quoteCartRepositoryV1GetCartList', ], 'rest' => [ 'resourcePath' => '/V1/carts', -- GitLab From bf0643845307a05247ba176b93577e4536599a17 Mon Sep 17 00:00:00 2001 From: Serhiy Shkolyarenko <sshkolyarenko@ebay.com> Date: Fri, 16 Jan 2015 12:47:43 +0200 Subject: [PATCH 052/114] MAGETWO-32009: Catalog category model and tables cleaning added stub for interface --- app/code/Magento/Quote/Model/QuoteManagement.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/code/Magento/Quote/Model/QuoteManagement.php b/app/code/Magento/Quote/Model/QuoteManagement.php index a43ce7e28d5..97221a40142 100644 --- a/app/code/Magento/Quote/Model/QuoteManagement.php +++ b/app/code/Magento/Quote/Model/QuoteManagement.php @@ -216,6 +216,11 @@ class QuoteManagement implements \Magento\Quote\Api\CartManagementInterface { //stub for interface } + + public function getCartForCustomer($customerId) + { + //stub for interface + } /** * @param Quote $quote * @return void -- GitLab From 79cf87eba2d591bbeeb334e6abd2c69c05872dbb Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Fri, 16 Jan 2015 13:11:14 +0200 Subject: [PATCH 053/114] MAGETWO-31575: Remove black/white lists from file system and builds configuration - added copyright --- .../TestFramework/CodingStandard/Tool/BlacklistInterface.php | 4 ++-- .../TestFramework/CodingStandard/Tool/ExtensionInterface.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/BlacklistInterface.php b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/BlacklistInterface.php index ee20c1e1196..a87c8afb812 100644 --- a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/BlacklistInterface.php +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/BlacklistInterface.php @@ -1,7 +1,7 @@ <?php /** - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ // @codingStandardsIgnoreFile diff --git a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/ExtensionInterface.php b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/ExtensionInterface.php index 08b405ab3d7..8d8f8e966f2 100644 --- a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/ExtensionInterface.php +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/ExtensionInterface.php @@ -1,7 +1,7 @@ <?php /** - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\TestFramework\CodingStandard\Tool; -- GitLab From 166f15f75b42c3aca22f9a17e7ba0f63c7458273 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Fri, 16 Jan 2015 13:35:30 +0200 Subject: [PATCH 054/114] MAGETWO-32541: Implement Put order related interfaces --- app/code/Magento/Checkout/etc/webapi.xml | 6 ---- .../Quote/Api/CartManagementInterface.php | 2 +- .../Magento/Quote/Model/QuoteManagement.php | 9 ++++-- app/code/Magento/Quote/etc/webapi.xml | 6 ++++ .../Quote/Api/CartManagementInterfaceTest.php | 31 +++++++++++++++++++ 5 files changed, 45 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Checkout/etc/webapi.xml b/app/code/Magento/Checkout/etc/webapi.xml index 89ada81f011..5a0088406ad 100644 --- a/app/code/Magento/Checkout/etc/webapi.xml +++ b/app/code/Magento/Checkout/etc/webapi.xml @@ -19,10 +19,4 @@ <resource ref="Magento_Sales::sales" /> </resources> </route> - <route url="/V1/carts/:cartId/order" method="PUT"> - <service class="Magento\Checkout\Service\V1\Cart\WriteServiceInterface" method="order"/> - <resources> - <resource ref="Magento_Sales::sales" /> - </resources> - </route> </routes> diff --git a/app/code/Magento/Quote/Api/CartManagementInterface.php b/app/code/Magento/Quote/Api/CartManagementInterface.php index d0b005895b6..88815cc291d 100644 --- a/app/code/Magento/Quote/Api/CartManagementInterface.php +++ b/app/code/Magento/Quote/Api/CartManagementInterface.php @@ -45,5 +45,5 @@ interface CartManagementInterface * @return int Order ID. * @see \Magento\Checkout\Service\V1\Cart\WriteServiceInterface::order */ - public function order($cartId); + public function placeOrder($cartId); } diff --git a/app/code/Magento/Quote/Model/QuoteManagement.php b/app/code/Magento/Quote/Model/QuoteManagement.php index 97221a40142..d8f81f31141 100644 --- a/app/code/Magento/Quote/Model/QuoteManagement.php +++ b/app/code/Magento/Quote/Model/QuoteManagement.php @@ -212,9 +212,14 @@ class QuoteManagement implements \Magento\Quote\Api\CartManagementInterface return $quote; } - public function order($cartId) + /** + * {@inheritdoc} + */ + public function placeOrder($cartId) { - //stub for interface + $quote = $this->quoteRepository->getActive($cartId); + $order = $this->submit($quote); + return $order->getId(); } public function getCartForCustomer($customerId) diff --git a/app/code/Magento/Quote/etc/webapi.xml b/app/code/Magento/Quote/etc/webapi.xml index e7941965cb6..370bcfd3e94 100644 --- a/app/code/Magento/Quote/etc/webapi.xml +++ b/app/code/Magento/Quote/etc/webapi.xml @@ -133,4 +133,10 @@ <resource ref="Magento_Sales::sales" /> </resources> </route> + <route url="/V1/carts/:cartId/order" method="PUT"> + <service class="Magento\Quote\Api\CartManagementInterface" method="placeOrder"/> + <resources> + <resource ref="Magento_Sales::sales" /> + </resources> + </route> </routes> diff --git a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php index 0a56c2101c4..fde6cf36e6e 100644 --- a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php @@ -270,4 +270,35 @@ class CartManagementInterfaceTest extends WebapiAbstract ]; $this->_webApiCall($serviceInfo, $requestData); } + + /** + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_check_payment.php + */ + public function testPlaceOrder() + { + /** @var $quote \Magento\Quote\Model\Quote */ + $quote = $this->objectManager->create('Magento\Quote\Model\Quote')->load('test_order_1', 'reserved_order_id'); + $cartId = $quote->getId(); + + $serviceInfo = [ + 'soap' => [ + 'service' => 'quoteQuoteManagementV1', + 'operation' => 'quoteQuoteManagementV1PlaceOrder', + 'serviceVersion' => 'V1', + ], + 'rest' => [ + 'resourcePath' => '/V1/carts/' . $cartId . '/order', + 'httpMethod' => RestConfig::HTTP_METHOD_PUT, + ], + ]; + + $orderId = $this->_webApiCall($serviceInfo, ['cartId' => $cartId]); + + /** @var \Magento\Sales\Model\Order $order */ + $order = $this->objectManager->create('Magento\Sales\Model\Order')->load($orderId); + $items = $order->getAllItems(); + $this->assertCount(1, $items); + $this->assertEquals('Simple Product', $items[0]->getName()); + $quote->delete(); + } } -- GitLab From 0a9952534bab1523343161ec8f19fc4dbce9a0f3 Mon Sep 17 00:00:00 2001 From: Olexii Korshenko <okorshenko@ebay.com> Date: Fri, 16 Jan 2015 14:59:38 +0200 Subject: [PATCH 055/114] MAGETWO-32519: Implement Shipping Address related interfaces - fixed SOAP tests and CompilerTest logic --- .../Magento/Checkout/Service/V1/Data/Cart.php | 4 +- .../Checkout/Service/V1/Data/Cart/Address.php | 223 --------------- .../Service/V1/Data/Cart/AddressBuilder.php | 261 ------------------ .../Checkout/Service/V1/Data/CartBuilder.php | 4 +- .../Quote/Api/Data/AddressInterface.php | 3 - .../Test/Integrity/Di/CompilerTest.php | 9 +- .../Quote/Model/QuoteAddressValidatorTest.php | 2 - 7 files changed, 12 insertions(+), 494 deletions(-) delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/Cart/Address.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/Cart/AddressBuilder.php diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart.php b/app/code/Magento/Checkout/Service/V1/Data/Cart.php index d40daaec534..179011ab82b 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart.php @@ -237,7 +237,7 @@ class Cart extends \Magento\Framework\Api\AbstractExtensibleObject /** * Returns the cart shipping address. * - * @return \Magento\Checkout\Service\V1\Data\Cart\Address|null Cart shipping address. Otherwise, null. + * @return \Magento\Quote\Api\Data\AddressInterface|null Cart shipping address. Otherwise, null. */ public function getShippingAddress() { @@ -247,7 +247,7 @@ class Cart extends \Magento\Framework\Api\AbstractExtensibleObject /** * Returns the cart billing address. * - * @return \Magento\Checkout\Service\V1\Data\Cart\Address|null Cart billing address. Otherwise, null. + * @return \Magento\Quote\Api\Data\AddressInterface|null Cart billing address. Otherwise, null. */ public function getBillingAddress() { diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Address.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Address.php deleted file mode 100644 index a65d1cbc5d5..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Address.php +++ /dev/null @@ -1,223 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Data\Cart; - -/** - * Quote billing/shipping address data - * - * @codeCoverageIgnore - */ -class Address extends \Magento\Framework\Api\AbstractExtensibleObject -{ - /**#@+ - * Constants defined for keys of array, makes typos less likely - */ - const KEY_EMAIL = 'email'; - - const KEY_COUNTRY_ID = 'country_id'; - - const KEY_ID = 'id'; - - const KEY_CUSTOMER_ID = 'customer_id'; - - const KEY_REGION = 'region'; - - const KEY_STREET = 'street'; - - const KEY_COMPANY = 'company'; - - const KEY_TELEPHONE = 'telephone'; - - const KEY_FAX = 'fax'; - - const KEY_POSTCODE = 'postcode'; - - const KEY_CITY = 'city'; - - const KEY_FIRSTNAME = 'firstname'; - - const KEY_LASTNAME = 'lastname'; - - const KEY_MIDDLENAME = 'middlename'; - - const KEY_PREFIX = 'prefix'; - - const KEY_SUFFIX = 'suffix'; - - const KEY_VAT_ID = 'vat_id'; - - /**#@-*/ - - /** - * Get id - * - * @return int|null - */ - public function getId() - { - return $this->_get(self::KEY_ID); - } - - /** - * Get region - * - * @return \Magento\Checkout\Service\V1\Data\Cart\Address\Region|null - */ - public function getRegion() - { - return $this->_get(self::KEY_REGION); - } - - /** - * Get country id - * - * @return string - */ - public function getCountryId() - { - return $this->_get(self::KEY_COUNTRY_ID); - } - - /** - * Get street - * - * @return string[] - */ - public function getStreet() - { - return $this->_get(self::KEY_STREET); - } - - /** - * Get company - * - * @return string|null - */ - public function getCompany() - { - return $this->_get(self::KEY_COMPANY); - } - - /** - * Get telephone number - * - * @return string - */ - public function getTelephone() - { - return $this->_get(self::KEY_TELEPHONE); - } - - /** - * Get fax number - * - * @return string|null - */ - public function getFax() - { - return $this->_get(self::KEY_FAX); - } - - /** - * Get postcode - * - * @return string - */ - public function getPostcode() - { - return $this->_get(self::KEY_POSTCODE); - } - - /** - * Get city name - * - * @return string - */ - public function getCity() - { - return $this->_get(self::KEY_CITY); - } - - /** - * Get first name - * - * @return string - */ - public function getFirstname() - { - return $this->_get(self::KEY_FIRSTNAME); - } - - /** - * Get last name - * - * @return string - */ - public function getLastname() - { - return $this->_get(self::KEY_LASTNAME); - } - - /** - * Get middle name - * - * @return string|null - */ - public function getMiddlename() - { - return $this->_get(self::KEY_MIDDLENAME); - } - - /** - * Get prefix - * - * @return string|null - */ - public function getPrefix() - { - return $this->_get(self::KEY_PREFIX); - } - - /** - * Get suffix - * - * @return string|null - */ - public function getSuffix() - { - return $this->_get(self::KEY_SUFFIX); - } - - /** - * Get Vat id - * - * @return string|null - */ - public function getVatId() - { - return $this->_get(self::KEY_VAT_ID); - } - - /** - * Get customer id - * - * @return string|null - */ - public function getCustomerId() - { - return $this->_get(self::KEY_CUSTOMER_ID); - } - - /** - * Get billing/shipping email - * - * @return string - */ - public function getEmail() - { - return $this->_get(self::KEY_EMAIL); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/AddressBuilder.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/AddressBuilder.php deleted file mode 100644 index 02a37e8f28e..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/AddressBuilder.php +++ /dev/null @@ -1,261 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Data\Cart; - -use Magento\Checkout\Service\V1\Data\Cart\Address\Region; -use Magento\Checkout\Service\V1\Data\Cart\Address\RegionBuilder; -use Magento\Customer\Api\CustomerMetadataInterface; -use Magento\Framework\Api\ExtensibleObjectBuilder; -use Magento\Framework\Api\AttributeDataBuilder; - -/** - * Quote address data object builder - * - * @codeCoverageIgnore - */ -class AddressBuilder extends ExtensibleObjectBuilder -{ - /** - * Region builder - * - * @var \Magento\Checkout\Service\V1\Data\Cart\Address\RegionBuilder - */ - protected $_regionBuilder; - - /** - * @param \Magento\Framework\Api\ObjectFactory $objectFactory - * @param AttributeDataBuilder $valueBuilder - * @param CustomerMetadataInterface $metadataService - * @param RegionBuilder $regionBuilder - */ - public function __construct( - \Magento\Framework\Api\ObjectFactory $objectFactory, - AttributeDataBuilder $valueBuilder, - CustomerMetadataInterface $metadataService, - RegionBuilder $regionBuilder - ) { - parent::__construct($objectFactory, $valueBuilder, $metadataService); - $this->_regionBuilder = $regionBuilder; - $this->data[Address::KEY_REGION] = $regionBuilder->create(); - } - - /** - * Convenience method to return region builder - * - * @return RegionBuilder - */ - public function getRegionBuilder() - { - return $this->_regionBuilder; - } - - /** - * Set id - * - * @param int $id - * @return $this - */ - public function setId($id) - { - return $this->_set(Address::KEY_ID, $id); - } - - /** - * {@inheritdoc} - */ - protected function _setDataValues(array $data) - { - if (array_key_exists(Address::KEY_REGION, $data)) { - if (!is_array($data[Address::KEY_REGION])) { - // Region data has been submitted as individual keys of Address object. Let's extract it. - $regionData = []; - foreach ([Region::REGION, Region::REGION_CODE, Region::REGION_ID] as $attrCode) { - if (isset($data[$attrCode])) { - $regionData[$attrCode] = $data[$attrCode]; - } - } - } else { - $regionData = $data[Address::KEY_REGION]; - } - $data[Address::KEY_REGION] = $this->_regionBuilder->populateWithArray($regionData)->create(); - } - return parent::_setDataValues($data); - } - - /** - * Set region - * - * @param \Magento\Checkout\Service\V1\Data\Cart\Address\Region $region - * @return $this - */ - public function setRegion(\Magento\Checkout\Service\V1\Data\Cart\Address\Region $region) - { - return $this->_set(Address::KEY_REGION, $region); - } - - /** - * Set country id - * - * @param int $countryId - * @return $this - */ - public function setCountryId($countryId) - { - return $this->_set(Address::KEY_COUNTRY_ID, $countryId); - } - - /** - * Set street - * - * @param string[] $street - * @return $this - */ - public function setStreet($street) - { - return $this->_set(Address::KEY_STREET, $street); - } - - /** - * Set company - * - * @param string $company - * @return $this - */ - public function setCompany($company) - { - return $this->_set(Address::KEY_COMPANY, $company); - } - - /** - * Set telephone number - * - * @param string $telephone - * @return $this - */ - public function setTelephone($telephone) - { - return $this->_set(Address::KEY_TELEPHONE, $telephone); - } - - /** - * Set fax number - * - * @param string $fax - * @return $this - */ - public function setFax($fax) - { - return $this->_set(Address::KEY_FAX, $fax); - } - - /** - * Set postcode - * - * @param string $postcode - * @return $this - */ - public function setPostcode($postcode) - { - return $this->_set(Address::KEY_POSTCODE, $postcode); - } - - /** - * Set city name - * - * @param string $city - * @return $this - */ - public function setCity($city) - { - return $this->_set(Address::KEY_CITY, $city); - } - - /** - * Set first name - * - * @param string $firstname - * @return $this - */ - public function setFirstname($firstname) - { - return $this->_set(Address::KEY_FIRSTNAME, $firstname); - } - - /** - * Set last name - * - * @param string $lastname - * @return $this - */ - public function setLastname($lastname) - { - return $this->_set(Address::KEY_LASTNAME, $lastname); - } - - /** - * Set middle name - * - * @param string $middlename - * @return $this - */ - public function setMiddlename($middlename) - { - return $this->_set(Address::KEY_MIDDLENAME, $middlename); - } - - /** - * Set prefix - * - * @param string $prefix - * @return $this - */ - public function setPrefix($prefix) - { - return $this->_set(Address::KEY_PREFIX, $prefix); - } - - /** - * Set suffix - * - * @param string $suffix - * @return $this - */ - public function setSuffix($suffix) - { - return $this->_set(Address::KEY_SUFFIX, $suffix); - } - - /** - * Set Vat id - * - * @param string $vatId - * @return $this - */ - public function setVatId($vatId) - { - return $this->_set(Address::KEY_VAT_ID, $vatId); - } - - /** - * Set customer id - * - * @param string $customerId - * @return $this - */ - public function setCustomerId($customerId) - { - return $this->_set(Address::KEY_CUSTOMER_ID, $customerId); - } - - /** - * @param $value string - * @return $this - */ - public function setEmail($value) - { - return $this->_set(Address::KEY_EMAIL, $value); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/CartBuilder.php b/app/code/Magento/Checkout/Service/V1/Data/CartBuilder.php index 625649909ac..a0e363bf500 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/CartBuilder.php +++ b/app/code/Magento/Checkout/Service/V1/Data/CartBuilder.php @@ -149,7 +149,7 @@ class CartBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder /** * Set shipping address data object * - * @param \Magento\Checkout\Service\V1\Data\Cart\Address $value + * @param \Magento\Quote\Api\Data\AddressInterface $value * @return $this */ public function setShippingAddress($value) @@ -160,7 +160,7 @@ class CartBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder /** * Set billing address data object * - * @param \Magento\Checkout\Service\V1\Data\Cart\Address $value + * @param \Magento\Quote\Api\Data\AddressInterface $value * @return $this */ public function setBillingAddress($value) diff --git a/app/code/Magento/Quote/Api/Data/AddressInterface.php b/app/code/Magento/Quote/Api/Data/AddressInterface.php index 33e74e753f8..d5f23c64c59 100644 --- a/app/code/Magento/Quote/Api/Data/AddressInterface.php +++ b/app/code/Magento/Quote/Api/Data/AddressInterface.php @@ -5,9 +5,6 @@ */ namespace Magento\Quote\Api\Data; -/** - * @see \Magento\Checkout\Service\V1\Data\Cart\Address - */ interface AddressInterface extends \Magento\Framework\Api\ExtensibleDataInterface { /**#@+ diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php index 1ff0b7bea34..6fa34a515f2 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php @@ -256,8 +256,15 @@ class CompilerTest extends \PHPUnit_Framework_TestCase } $class = new \ReflectionClass($className); $parent = $class->getParentClass(); + $file = false; + if ($parent) { + $basePath = \Magento\Framework\Test\Utility\Files::init()->getPathToSource(); + $file = str_replace('\\', DIRECTORY_SEPARATOR, $parent->getFileName()); + $basePath = str_replace('\\', DIRECTORY_SEPARATOR, $basePath); + $file = str_replace($basePath . DIRECTORY_SEPARATOR, '', $file); + } /** Prevent analysis of non Magento classes */ - if ($parent && in_array($parent->getFileName(), $allowedFiles)) { + if ($parent && in_array($file, $allowedFiles)) { $output = array_merge( $this->_buildInheritanceHierarchyTree($parent->getName(), $allowedFiles), [$className], diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteAddressValidatorTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteAddressValidatorTest.php index e8149b45d49..be1e53df989 100644 --- a/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteAddressValidatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteAddressValidatorTest.php @@ -7,8 +7,6 @@ namespace Magento\Quote\Model; -use Magento\Checkout\Service\V1\Data\Cart\Address; - class QuoteAddressValidatorTest extends \PHPUnit_Framework_TestCase { /** -- GitLab From e6a683df164f0169b0bcb4b726dd1aa59395e984 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Fri, 16 Jan 2015 15:47:38 +0200 Subject: [PATCH 056/114] MAGETWO-32525: Implement Payment methods related interfaces -fixes after CR --- .../Magento/Payment/Model/Method/AbstractMethod.php | 8 ++++---- app/code/Magento/Payment/Model/Method/Cc.php | 12 ++++++------ app/code/Magento/Payment/Model/Method/Free.php | 12 ++++++------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/code/Magento/Payment/Model/Method/AbstractMethod.php b/app/code/Magento/Payment/Model/Method/AbstractMethod.php index b56e45ab8de..dec00e9a83d 100644 --- a/app/code/Magento/Payment/Model/Method/AbstractMethod.php +++ b/app/code/Magento/Payment/Model/Method/AbstractMethod.php @@ -211,23 +211,23 @@ abstract class AbstractMethod extends \Magento\Framework\Model\AbstractExtensibl protected $logger; /** - * @param \Magento\Payment\Helper\Data $paymentData - * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService * @param \Magento\Framework\Api\AttributeDataBuilder $customAttributeBuilder + * @param \Magento\Payment\Helper\Data $paymentData + * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Payment\Helper\Data $paymentData, - \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Api\MetadataServiceInterface $metadataService, \Magento\Framework\Api\AttributeDataBuilder $customAttributeBuilder, + \Magento\Payment\Helper\Data $paymentData, + \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = [] diff --git a/app/code/Magento/Payment/Model/Method/Cc.php b/app/code/Magento/Payment/Model/Method/Cc.php index 4afbf98a8af..cc4de6cbacc 100644 --- a/app/code/Magento/Payment/Model/Method/Cc.php +++ b/app/code/Magento/Payment/Model/Method/Cc.php @@ -40,12 +40,12 @@ class Cc extends \Magento\Payment\Model\Method\AbstractMethod protected $_centinelService; /** - * @param \Magento\Payment\Helper\Data $paymentData - * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService * @param \Magento\Framework\Api\AttributeDataBuilder $customAttributeBuilder + * @param \Magento\Payment\Helper\Data $paymentData + * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\Module\ModuleListInterface $moduleList * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate * @param \Magento\Centinel\Model\Service $centinelService @@ -54,12 +54,12 @@ class Cc extends \Magento\Payment\Model\Method\AbstractMethod * @param array $data */ public function __construct( - \Magento\Payment\Helper\Data $paymentData, - \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Api\MetadataServiceInterface $metadataService, \Magento\Framework\Api\AttributeDataBuilder $customAttributeBuilder, + \Magento\Payment\Helper\Data $paymentData, + \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\Module\ModuleListInterface $moduleList, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Centinel\Model\Service $centinelService, @@ -68,12 +68,12 @@ class Cc extends \Magento\Payment\Model\Method\AbstractMethod array $data = [] ) { parent::__construct( - $paymentData, - $scopeConfig, $context, $registry, $metadataService, $customAttributeBuilder, + $paymentData, + $scopeConfig, $resource, $resourceCollection, $data diff --git a/app/code/Magento/Payment/Model/Method/Free.php b/app/code/Magento/Payment/Model/Method/Free.php index aa45bf5ee0f..07776869cac 100644 --- a/app/code/Magento/Payment/Model/Method/Free.php +++ b/app/code/Magento/Payment/Model/Method/Free.php @@ -41,36 +41,36 @@ class Free extends \Magento\Payment\Model\Method\AbstractMethod protected $priceCurrency; /** - * @param \Magento\Payment\Helper\Data $paymentData - * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService * @param \Magento\Framework\Api\AttributeDataBuilder $customAttributeBuilder + * @param \Magento\Payment\Helper\Data $paymentData + * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param PriceCurrencyInterface $priceCurrency * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Payment\Helper\Data $paymentData, - \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Api\MetadataServiceInterface $metadataService, \Magento\Framework\Api\AttributeDataBuilder $customAttributeBuilder, + \Magento\Payment\Helper\Data $paymentData, + \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, PriceCurrencyInterface $priceCurrency, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = [] ) { parent::__construct( - $paymentData, - $scopeConfig, $context, $registry, $metadataService, $customAttributeBuilder, + $paymentData, + $scopeConfig, $resource, $resourceCollection, $data -- GitLab From 509293f42fa3f16144f53c6b523915f0f82565a3 Mon Sep 17 00:00:00 2001 From: Olexii Korshenko <okorshenko@ebay.com> Date: Fri, 16 Jan 2015 16:01:07 +0200 Subject: [PATCH 057/114] MAGETWO-32519: Implement Shipping Address related interfaces - removed obsolete code --- app/code/Magento/Checkout/etc/di.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/code/Magento/Checkout/etc/di.xml b/app/code/Magento/Checkout/etc/di.xml index fe77c23dd98..3fad5f50fd6 100644 --- a/app/code/Magento/Checkout/etc/di.xml +++ b/app/code/Magento/Checkout/etc/di.xml @@ -23,8 +23,6 @@ <argument name="storage" xsi:type="object">Magento\Checkout\Model\Session\Storage</argument> </arguments> </type> - <preference for="\Magento\Checkout\Service\V1\Address\Shipping\ReadServiceInterface" type="Magento\Checkout\Service\V1\Address\Shipping\ReadService" /> - <preference for="\Magento\Checkout\Service\V1\Address\Shipping\WriteServiceInterface" type="Magento\Checkout\Service\V1\Address\Shipping\WriteService" /> <preference for="Magento\Checkout\Service\V1\Cart\ReadServiceInterface" type="Magento\Checkout\Service\V1\Cart\ReadService" /> <preference for="Magento\Checkout\Service\V1\Cart\TotalsServiceInterface" type="Magento\Checkout\Service\V1\Cart\TotalsService" /> <preference for="\Magento\Checkout\Service\V1\Cart\WriteServiceInterface" type="Magento\Checkout\Service\V1\Cart\WriteService" /> -- GitLab From 26379f3350de9a7fc5ef7316b8d1897a3e044825 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Fri, 16 Jan 2015 16:09:59 +0200 Subject: [PATCH 058/114] MAGETWO-32525: Implement Payment methods related interfaces --- .../unit/testsuite/Magento/Payment/Model/Method/FreeTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tests/unit/testsuite/Magento/Payment/Model/Method/FreeTest.php b/dev/tests/unit/testsuite/Magento/Payment/Model/Method/FreeTest.php index c0a9273f730..327b4721cad 100644 --- a/dev/tests/unit/testsuite/Magento/Payment/Model/Method/FreeTest.php +++ b/dev/tests/unit/testsuite/Magento/Payment/Model/Method/FreeTest.php @@ -31,12 +31,12 @@ class FreeTest extends \PHPUnit_Framework_TestCase $customAttributeBuilder = $this->getMock('\Magento\Framework\Api\AttributeDataBuilder', [], [], '', false); $this->methodFree = new \Magento\Payment\Model\Method\Free( - $paymentData, - $this->scopeConfig, $context, $registry, $metadataService, $customAttributeBuilder, + $paymentData, + $this->scopeConfig, $this->currencyPrice ); } -- GitLab From a973312825b4561ebfe88e9d0d5bb812fbf1dd9e Mon Sep 17 00:00:00 2001 From: Serhiy Shkolyarenko <sshkolyarenko@ebay.com> Date: Fri, 16 Jan 2015 16:23:19 +0200 Subject: [PATCH 059/114] MAGETWO-32501: Implement Cart Service interfaces added preference to interface --- app/code/Magento/Quote/etc/di.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index bae7b5579b9..50b8bc97ba3 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -26,4 +26,5 @@ <preference for="Magento\Quote\Api\Data\PaymentInterface" type="\Magento\Quote\Model\Quote\Payment" /> <preference for="Magento\Quote\Api\CouponManagementInterface" type="Magento\Quote\Model\CouponManagement" /> <preference for="Magento\Quote\Api\CartManagementInterface" type="Magento\Quote\Model\QuoteManagement" /> + <preference for="Magento\Authorization\Model\UserContextInterface" type="Magento\Authorization\Model\CompositeUserContext"/> </config> -- GitLab From 9fcf450e5ee8f82bdaa993d4e41c932c9c0a9568 Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Fri, 16 Jan 2015 16:36:00 +0200 Subject: [PATCH 060/114] MAGETWO-32531: Implement CheckoutTotals related interfaces --- .../Service/V1/Cart/TotalsService.php | 90 ---------------- .../V1/Cart/TotalsServiceInterface.php | 23 ---- .../Magento/Checkout/Service/V1/Data/Cart.php | 2 +- .../Service/V1/Data/Cart/TotalsMapper.php | 53 ---------- .../Checkout/Service/V1/Data/CartBuilder.php | 2 +- app/code/Magento/Checkout/etc/webapi.xml | 6 -- .../Api/CartTotalRepositoryInterface.php | 5 +- .../Magento/Quote/Api/Data/CartInterface.php | 2 +- .../Api/Data/TotalsInterface.php | 7 +- .../Api/Data/TotalsItemInterface.php | 5 +- .../Quote/Model/Cart/CartTotalRepository.php | 66 ++++++++++++ .../V1/Data => Quote/Model}/Cart/Totals.php | 56 +++++----- .../Data => Quote/Model}/Cart/Totals/Item.php | 9 +- app/code/Magento/Quote/etc/di.xml | 3 + app/code/Magento/Quote/etc/webapi.xml | 6 ++ .../Api/CartTotalRepositoryTest.php} | 12 +-- .../Service/V1/Cart/TotalsServiceTest.php | 86 --------------- .../Service/V1/Data/Cart/TotalsMapperTest.php | 100 ------------------ .../Model/Cart/CartTotalRepositoryTest.php | 68 ++++++++++++ 19 files changed, 190 insertions(+), 411 deletions(-) delete mode 100644 app/code/Magento/Checkout/Service/V1/Cart/TotalsService.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Cart/TotalsServiceInterface.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/Cart/TotalsMapper.php rename app/code/Magento/{Checkout => Quote}/Api/CartTotalRepositoryInterface.php (67%) rename app/code/Magento/{Checkout => Quote}/Api/Data/TotalsInterface.php (95%) rename app/code/Magento/{Checkout => Quote}/Api/Data/TotalsItemInterface.php (96%) create mode 100644 app/code/Magento/Quote/Model/Cart/CartTotalRepository.php rename app/code/Magento/{Checkout/Service/V1/Data => Quote/Model}/Cart/Totals.php (75%) rename app/code/Magento/{Checkout/Service/V1/Data => Quote/Model}/Cart/Totals/Item.php (96%) rename dev/tests/api-functional/testsuite/Magento/{Checkout/Service/V1/Cart/TotalsServiceTest.php => Quote/Api/CartTotalRepositoryTest.php} (94%) delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/TotalsServiceTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/TotalsMapperTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Quote/Model/Cart/CartTotalRepositoryTest.php diff --git a/app/code/Magento/Checkout/Service/V1/Cart/TotalsService.php b/app/code/Magento/Checkout/Service/V1/Cart/TotalsService.php deleted file mode 100644 index 3baa1a8ebc6..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Cart/TotalsService.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Cart; - -use Magento\Checkout\Service\V1\Data\Cart\Totals; -use Magento\Checkout\Service\V1\Data\Cart; -use Magento\Quote\Model\Quote; -use Magento\Quote\Model\QuoteRepository; - -/** - * Cart totals service object. - */ -class TotalsService implements TotalsServiceInterface -{ - /** - * Cart totals builder. - * - * @var Cart\TotalsBuilder - */ - private $totalsBuilder; - - /** - * Cart totals mapper. - * - * @var Cart\TotalsMapper - */ - private $totalsMapper; - - /** - * Quote repository. - * - * @var QuoteRepository - */ - private $quoteRepository; - - /** - * Item totals mapper. - * - * @var Totals\ItemMapper; - */ - private $itemTotalsMapper; - - /** - * Constructs a cart totals service object. - * - * @param Cart\TotalsBuilder $totalsBuilder Cart totals builder. - * @param Cart\TotalsMapper $totalsMapper Cart totals mapper. - * @param QuoteRepository $quoteRepository Quote repository. - * @param Totals\ItemMapper $itemTotalsMapper Item totals mapper. - */ - public function __construct( - Cart\TotalsBuilder $totalsBuilder, - Cart\TotalsMapper $totalsMapper, - QuoteRepository $quoteRepository, - Totals\ItemMapper $itemTotalsMapper - ) { - $this->totalsBuilder = $totalsBuilder; - $this->totalsMapper = $totalsMapper; - $this->quoteRepository = $quoteRepository; - $this->itemTotalsMapper = $itemTotalsMapper; - } - - /** - * {@inheritDoc} - * - * @param int $cartId The cart ID. - * @return Totals Quote totals data. - */ - public function getTotals($cartId) - { - /** - * Quote. - * - * @var \Magento\Quote\Model\Quote $quote - */ - $quote = $this->quoteRepository->getActive($cartId); - - $this->totalsBuilder->populateWithArray($this->totalsMapper->map($quote)); - $items = []; - foreach ($quote->getAllItems() as $item) { - $items[] = $this->itemTotalsMapper->extractDto($item); - } - $this->totalsBuilder->setItems($items); - - return $this->totalsBuilder->create(); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Cart/TotalsServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Cart/TotalsServiceInterface.php deleted file mode 100644 index 2b5aecbd68d..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Cart/TotalsServiceInterface.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Cart; - -/** - * Totals service interface. - * @deprecated - */ -interface TotalsServiceInterface -{ - /** - * Returns quote totals data for a specified cart. - * - * @param int $cartId The cart ID. - * @return \Magento\Checkout\Service\V1\Data\Cart\Totals Quote totals data. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @see \Magento\Checkout\Api\CartTotalRepositoryInterface::get - */ - public function getTotals($cartId); -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart.php b/app/code/Magento/Checkout/Service/V1/Data/Cart.php index 179011ab82b..a55872f64b6 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart.php @@ -257,7 +257,7 @@ class Cart extends \Magento\Framework\Api\AbstractExtensibleObject /** * Returns information about cart totals. * - * @return \Magento\Checkout\Service\V1\Data\Cart\Totals|null Information about cart totals. Otherwise, null. + * @return \Magento\Quote\Api\Data\TotalsInterface|null Information about cart totals. Otherwise, null. */ public function getTotals() { diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/TotalsMapper.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/TotalsMapper.php deleted file mode 100644 index d731d54609b..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/TotalsMapper.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Data\Cart; - -use Magento\Quote\Model\Quote; - -/** - * Totals data mapper - */ -class TotalsMapper -{ - /** - * Fetch quote totals data - * - * @param Quote $quote - * @return array - */ - public function map(Quote $quote) - { - $totals = [ - Totals::BASE_GRAND_TOTAL => $quote->getBaseGrandTotal(), - Totals::GRAND_TOTAL => $quote->getGrandTotal(), - Totals::BASE_SUBTOTAL => $quote->getBaseSubtotal(), - Totals::SUBTOTAL => $quote->getSubtotal(), - Totals::BASE_SUBTOTAL_WITH_DISCOUNT => $quote->getBaseSubtotalWithDiscount(), - Totals::SUBTOTAL_WITH_DISCOUNT => $quote->getSubtotalWithDiscount(), - - Totals::BASE_CURRENCY_CODE => $quote->getBaseCurrencyCode(), - Totals::QUOTE_CURRENCY_CODE => $quote->getQuoteCurrencyCode(), - ]; - - $shippingAddress = $quote->getShippingAddress(); - - $totals[Totals::DISCOUNT_AMOUNT] = $shippingAddress->getDiscountAmount(); - $totals[Totals::BASE_DISCOUNT_AMOUNT] = $shippingAddress->getBaseDiscountAmount(); - $totals[Totals::SHIPPING_AMOUNT] = $shippingAddress->getShippingAmount(); - $totals[Totals::BASE_SHIPPING_AMOUNT] = $shippingAddress->getBaseShippingAmount(); - $totals[Totals::SHIPPING_DISCOUNT_AMOUNT] = $shippingAddress->getShippingDiscountAmount(); - $totals[Totals::BASE_SHIPPING_DISCOUNT_AMOUNT] = $shippingAddress->getBaseShippingDiscountAmount(); - $totals[Totals::TAX_AMOUNT] = $shippingAddress->getTaxAmount(); - $totals[Totals::BASE_TAX_AMOUNT] = $shippingAddress->getBaseTaxAmount(); - $totals[Totals::SHIPPING_TAX_AMOUNT] = $shippingAddress->getShippingTaxAmount(); - $totals[Totals::BASE_SHIPPING_TAX_AMOUNT] = $shippingAddress->getBaseShippingTaxAmount(); - $totals[Totals::SUBTOTAL_INCL_TAX] = $shippingAddress->getSubtotalInclTax(); - $totals[Totals::BASE_SUBTOTAL_INCL_TAX] = $shippingAddress->getBaseSubtotalTotalInclTax(); - $totals[Totals::SHIPPING_INCL_TAX] = $shippingAddress->getShippingInclTax(); - $totals[Totals::BASE_SHIPPING_INCL_TAX] = $shippingAddress->getBaseShippingInclTax(); - return $totals; - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/CartBuilder.php b/app/code/Magento/Checkout/Service/V1/Data/CartBuilder.php index a0e363bf500..06c0039f9ba 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/CartBuilder.php +++ b/app/code/Magento/Checkout/Service/V1/Data/CartBuilder.php @@ -169,7 +169,7 @@ class CartBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder } /** - * @param \Magento\Checkout\Service\V1\Data\Cart\Totals $value + * @param \Magento\Quote\Api\Data\TotalsInterface $value * @return $this */ public function setTotals($value) diff --git a/app/code/Magento/Checkout/etc/webapi.xml b/app/code/Magento/Checkout/etc/webapi.xml index 5a0088406ad..ad2766276e8 100644 --- a/app/code/Magento/Checkout/etc/webapi.xml +++ b/app/code/Magento/Checkout/etc/webapi.xml @@ -13,10 +13,4 @@ <resource ref="Magento_Catalog::products" /> </resources> </route> - <route url="/V1/carts/:cartId/totals" method="GET"> - <service class="Magento\Checkout\Service\V1\Cart\TotalsServiceInterface" method="getTotals"/> - <resources> - <resource ref="Magento_Sales::sales" /> - </resources> - </route> </routes> diff --git a/app/code/Magento/Checkout/Api/CartTotalRepositoryInterface.php b/app/code/Magento/Quote/Api/CartTotalRepositoryInterface.php similarity index 67% rename from app/code/Magento/Checkout/Api/CartTotalRepositoryInterface.php rename to app/code/Magento/Quote/Api/CartTotalRepositoryInterface.php index 213e6649c94..305c06e8ffe 100644 --- a/app/code/Magento/Checkout/Api/CartTotalRepositoryInterface.php +++ b/app/code/Magento/Quote/Api/CartTotalRepositoryInterface.php @@ -3,7 +3,7 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api; +namespace Magento\Quote\Api; interface CartTotalRepositoryInterface { @@ -11,9 +11,8 @@ interface CartTotalRepositoryInterface * Returns quote totals data for a specified cart. * * @param int $cartId The cart ID. - * @return \Magento\Checkout\Api\Data\TotalsItemInterface Quote totals data. + * @return \Magento\Quote\Api\Data\TotalsInterface Quote totals data. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @see \Magento\Checkout\Service\V1\Cart\TotalsServiceInterface::getTotals */ public function get($cartId); } diff --git a/app/code/Magento/Quote/Api/Data/CartInterface.php b/app/code/Magento/Quote/Api/Data/CartInterface.php index 30a07676bd6..5914418c081 100644 --- a/app/code/Magento/Quote/Api/Data/CartInterface.php +++ b/app/code/Magento/Quote/Api/Data/CartInterface.php @@ -103,7 +103,7 @@ interface CartInterface extends \Magento\Framework\Api\ExtensibleDataInterface /** * Returns information about cart totals. * - * @return \Magento\Checkout\Api\Data\TotalsInterface|null Information about cart totals. Otherwise, null. + * @return \Magento\Quote\Api\Data\TotalsInterface|null Information about cart totals. Otherwise, null. */ public function getTotals(); diff --git a/app/code/Magento/Checkout/Api/Data/TotalsInterface.php b/app/code/Magento/Quote/Api/Data/TotalsInterface.php similarity index 95% rename from app/code/Magento/Checkout/Api/Data/TotalsInterface.php rename to app/code/Magento/Quote/Api/Data/TotalsInterface.php index 0b7df0663c3..a07bd69c683 100644 --- a/app/code/Magento/Checkout/Api/Data/TotalsInterface.php +++ b/app/code/Magento/Quote/Api/Data/TotalsInterface.php @@ -3,11 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api\Data; +namespace Magento\Quote\Api\Data; -/** - * @see \Magento\Checkout\Service\V1\Data\Cart\Totals - */ interface TotalsInterface extends \Magento\Framework\Api\ExtensibleDataInterface { /** @@ -167,7 +164,7 @@ interface TotalsInterface extends \Magento\Framework\Api\ExtensibleDataInterface /** * Get totals by items * - * @return \Magento\Checkout\Api\Data\TotalsItemInterface[]|null + * @return \Magento\Quote\Api\Data\TotalsItemInterface[]|null */ public function getItems(); } diff --git a/app/code/Magento/Checkout/Api/Data/TotalsItemInterface.php b/app/code/Magento/Quote/Api/Data/TotalsItemInterface.php similarity index 96% rename from app/code/Magento/Checkout/Api/Data/TotalsItemInterface.php rename to app/code/Magento/Quote/Api/Data/TotalsItemInterface.php index a9134b35728..c600c7bc2cb 100644 --- a/app/code/Magento/Checkout/Api/Data/TotalsItemInterface.php +++ b/app/code/Magento/Quote/Api/Data/TotalsItemInterface.php @@ -3,11 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api\Data; +namespace Magento\Quote\Api\Data; -/** - * @see \Magento\Checkout\Service\V1\Data\Cart\Totals\Item - */ interface TotalsItemInterface extends \Magento\Framework\Api\ExtensibleDataInterface { /** diff --git a/app/code/Magento/Quote/Model/Cart/CartTotalRepository.php b/app/code/Magento/Quote/Model/Cart/CartTotalRepository.php new file mode 100644 index 00000000000..e0eda7e9b1c --- /dev/null +++ b/app/code/Magento/Quote/Model/Cart/CartTotalRepository.php @@ -0,0 +1,66 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Quote\Model\Cart; + +use Magento\Quote\Api; +use Magento\Quote\Model\QuoteRepository; +use Magento\Quote\Api\CartTotalRepositoryInterface; + +/** + * Cart totals data object. + */ +class CartTotalRepository implements CartTotalRepositoryInterface +{ + /** + * Cart totals builder. + * + * @var Api\Data\TotalsDataBuilder + */ + private $totalsBuilder; + + /** + * Quote repository. + * + * @var QuoteRepository + */ + private $quoteRepository; + + /** + * Constructs a cart totals data object. + * + * @param Api\Data\TotalsDataBuilder $totalsBuilder Cart totals builder. + * @param QuoteRepository $quoteRepository Quote repository. + */ + public function __construct( + Api\Data\TotalsDataBuilder $totalsBuilder, + QuoteRepository $quoteRepository + ) { + $this->totalsBuilder = $totalsBuilder; + $this->quoteRepository = $quoteRepository; + } + + /** + * {@inheritDoc} + * + * @param int $cartId The cart ID. + * @return Totals Quote totals data. + */ + public function get($cartId) + { + /** + * Quote. + * + * @var \Magento\Quote\Model\Quote $quote + */ + $quote = $this->quoteRepository->getActive($cartId); + $shippingAddress = $quote->getShippingAddress(); + $totals = array_merge($shippingAddress->getData(), $quote->getData()); + $this->totalsBuilder->populateWithArray($totals); + $this->totalsBuilder->setItems($quote->getAllItems()); + + return $this->totalsBuilder->create(); + } +} diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals.php b/app/code/Magento/Quote/Model/Cart/Totals.php similarity index 75% rename from app/code/Magento/Checkout/Service/V1/Data/Cart/Totals.php rename to app/code/Magento/Quote/Model/Cart/Totals.php index 140c43fddc0..7a19f3089e1 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals.php +++ b/app/code/Magento/Quote/Model/Cart/Totals.php @@ -3,16 +3,16 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\Data\Cart; +namespace Magento\Quote\Model\Cart; +use Magento\Quote\Api\Data\TotalsInterface; +use Magento\Framework\Model\AbstractExtensibleModel; /** * Cart Totals * * @codeCoverageIgnore - * @deprecated - * @see \Magento\Checkout\Api\Data\TotalsInterface */ -class Totals extends \Magento\Framework\Api\AbstractExtensibleObject +class Totals extends AbstractExtensibleModel implements TotalsInterface { /* TOTALS */ const GRAND_TOTAL = 'grand_total'; @@ -56,7 +56,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getGrandTotal() { - return $this->_get(self::GRAND_TOTAL); + return $this->getData(self::GRAND_TOTAL); } /** @@ -66,7 +66,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getBaseGrandTotal() { - return $this->_get(self::BASE_GRAND_TOTAL); + return $this->getData(self::BASE_GRAND_TOTAL); } /** @@ -76,7 +76,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getSubtotal() { - return $this->_get(self::SUBTOTAL); + return $this->getData(self::SUBTOTAL); } /** @@ -86,7 +86,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getBaseSubtotal() { - return $this->_get(self::BASE_SUBTOTAL); + return $this->getData(self::BASE_SUBTOTAL); } /** @@ -96,7 +96,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getDiscountAmount() { - return $this->_get(self::DISCOUNT_AMOUNT); + return $this->getData(self::DISCOUNT_AMOUNT); } /** @@ -106,7 +106,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getBaseDiscountAmount() { - return $this->_get(self::BASE_DISCOUNT_AMOUNT); + return $this->getData(self::BASE_DISCOUNT_AMOUNT); } /** @@ -116,7 +116,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getSubtotalWithDiscount() { - return $this->_get(self::SUBTOTAL_WITH_DISCOUNT); + return $this->getData(self::SUBTOTAL_WITH_DISCOUNT); } /** @@ -126,7 +126,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getBaseSubtotalWithDiscount() { - return $this->_get(self::BASE_SUBTOTAL_WITH_DISCOUNT); + return $this->getData(self::BASE_SUBTOTAL_WITH_DISCOUNT); } /** @@ -136,7 +136,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getShippingAmount() { - return $this->_get(self::SHIPPING_AMOUNT); + return $this->getData(self::SHIPPING_AMOUNT); } /** @@ -146,7 +146,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getBaseShippingAmount() { - return $this->_get(self::BASE_SHIPPING_AMOUNT); + return $this->getData(self::BASE_SHIPPING_AMOUNT); } /** @@ -156,7 +156,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getShippingDiscountAmount() { - return $this->_get(self::SHIPPING_DISCOUNT_AMOUNT); + return $this->getData(self::SHIPPING_DISCOUNT_AMOUNT); } /** @@ -166,7 +166,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getBaseShippingDiscountAmount() { - return $this->_get(self::BASE_SHIPPING_DISCOUNT_AMOUNT); + return $this->getData(self::BASE_SHIPPING_DISCOUNT_AMOUNT); } /** @@ -176,7 +176,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getTaxAmount() { - return $this->_get(self::TAX_AMOUNT); + return $this->getData(self::TAX_AMOUNT); } /** @@ -186,7 +186,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getBaseTaxAmount() { - return $this->_get(self::BASE_TAX_AMOUNT); + return $this->getData(self::BASE_TAX_AMOUNT); } /** @@ -196,7 +196,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getShippingTaxAmount() { - return $this->_get(self::SHIPPING_TAX_AMOUNT); + return $this->getData(self::SHIPPING_TAX_AMOUNT); } /** @@ -206,7 +206,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getBaseShippingTaxAmount() { - return $this->_get(self::BASE_SHIPPING_TAX_AMOUNT); + return $this->getData(self::BASE_SHIPPING_TAX_AMOUNT); } /** @@ -216,7 +216,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getSubtotalInclTax() { - return $this->_get(self::SUBTOTAL_INCL_TAX); + return $this->getData(self::SUBTOTAL_INCL_TAX); } /** @@ -226,7 +226,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getBaseSubtotalInclTax() { - return $this->_get(self::BASE_SUBTOTAL_INCL_TAX); + return $this->getData(self::BASE_SUBTOTAL_INCL_TAX); } /** @@ -236,7 +236,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getShippingInclTax() { - return $this->_get(self::SHIPPING_INCL_TAX); + return $this->getData(self::SHIPPING_INCL_TAX); } /** @@ -246,7 +246,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getBaseShippingInclTax() { - return $this->_get(self::BASE_SHIPPING_INCL_TAX); + return $this->getData(self::BASE_SHIPPING_INCL_TAX); } /** @@ -256,7 +256,7 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getBaseCurrencyCode() { - return $this->_get(self::BASE_CURRENCY_CODE); + return $this->getData(self::BASE_CURRENCY_CODE); } /** @@ -266,16 +266,16 @@ class Totals extends \Magento\Framework\Api\AbstractExtensibleObject */ public function getQuoteCurrencyCode() { - return $this->_get(self::QUOTE_CURRENCY_CODE); + return $this->getData(self::QUOTE_CURRENCY_CODE); } /** * Get totals by items * - * @return \Magento\Checkout\Service\V1\Data\Cart\Totals\Item[]|null + * @return \Magento\Quote\Api\Data\TotalsItemInterface[]|null */ public function getItems() { - return $this->_get(self::ITEMS); + return $this->getData(self::ITEMS); } } diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals/Item.php b/app/code/Magento/Quote/Model/Cart/Totals/Item.php similarity index 96% rename from app/code/Magento/Checkout/Service/V1/Data/Cart/Totals/Item.php rename to app/code/Magento/Quote/Model/Cart/Totals/Item.php index ee56278c31c..0ebed2fbadd 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals/Item.php +++ b/app/code/Magento/Quote/Model/Cart/Totals/Item.php @@ -3,16 +3,17 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\Data\Cart\Totals; +namespace Magento\Quote\Model\Cart\Totals; + +use Magento\Quote\Api\Data\TotalsItemInterface; +use Magento\Framework\Api\AbstractExtensibleObject; /** * Cart item totals. * * @codeCoverageIgnore - * @deprecated - * @see \Magento\Checkout\Api\Data\TotalsItemInterface */ -class Item extends \Magento\Framework\Api\AbstractExtensibleObject +class Item extends AbstractExtensibleObject implements TotalsItemInterface { /** * Price. diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index 50b8bc97ba3..c8042fa9539 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -27,4 +27,7 @@ <preference for="Magento\Quote\Api\CouponManagementInterface" type="Magento\Quote\Model\CouponManagement" /> <preference for="Magento\Quote\Api\CartManagementInterface" type="Magento\Quote\Model\QuoteManagement" /> <preference for="Magento\Authorization\Model\UserContextInterface" type="Magento\Authorization\Model\CompositeUserContext"/> + <preference for="Magento\Quote\Api\CartTotalRepositoryInterface" type="\Magento\Quote\Model\Cart\CartTotalRepository" /> + <preference for="Magento\Quote\Api\Data\TotalsInterface" type="\Magento\Quote\Model\Cart\Totals" /> + <preference for="Magento\Quote\Api\Data\TotalsItemInterface" type="\Magento\Quote\Model\Quote\Cart\Totals\Item" /> </config> diff --git a/app/code/Magento/Quote/etc/webapi.xml b/app/code/Magento/Quote/etc/webapi.xml index 370bcfd3e94..fc24a03bb89 100644 --- a/app/code/Magento/Quote/etc/webapi.xml +++ b/app/code/Magento/Quote/etc/webapi.xml @@ -139,4 +139,10 @@ <resource ref="Magento_Sales::sales" /> </resources> </route> + <route url="/V1/carts/:cartId/totals" method="GET"> + <service class="Magento\Quote\Api\CartTotalRepositoryInterface" method="get"/> + <resources> + <resource ref="Magento_Sales::sales" /> + </resources> + </route> </routes> diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Cart/TotalsServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartTotalRepositoryTest.php similarity index 94% rename from dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Cart/TotalsServiceTest.php rename to dev/tests/api-functional/testsuite/Magento/Quote/Api/CartTotalRepositoryTest.php index 309f92958af..d5a98ef36eb 100644 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Cart/TotalsServiceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartTotalRepositoryTest.php @@ -4,17 +4,17 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Service\V1\Cart; +namespace Magento\Quote\Api; -use Magento\Checkout\Service\V1\Data\Cart\Totals; -use Magento\Checkout\Service\V1\Data\Cart\Totals\Item as ItemTotals; +use Magento\Quote\Model\Cart\Totals; +use Magento\Quote\Model\Cart\Totals\Item as ItemTotals; use Magento\Framework\Api\FilterBuilder; use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\TestFramework\ObjectManager; use Magento\TestFramework\TestCase\WebapiAbstract; use Magento\Webapi\Model\Rest\Config as RestConfig; -class TotalsServiceTest extends WebapiAbstract +class CartTotalRepositoryTest extends WebapiAbstract { /** * @var ObjectManager @@ -109,9 +109,9 @@ class TotalsServiceTest extends WebapiAbstract { return [ 'soap' => [ - 'service' => 'checkoutCartTotalsServiceV1', + 'service' => 'quoteCartTotalRepositoryV1', 'serviceVersion' => 'V1', - 'operation' => 'checkoutCartTotalsServiceV1GetTotals', + 'operation' => 'quoteCartTotalRepositoryV1get', ], 'rest' => [ 'resourcePath' => '/V1/carts/' . $cartId . '/totals', diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/TotalsServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/TotalsServiceTest.php deleted file mode 100644 index 64f5cffc6ce..00000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/TotalsServiceTest.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php -/** - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Cart; - -class TotalsServiceTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - private $quoteRepositoryMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - private $quoteMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - private $itemTotalsMapperMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - private $totalsMapperMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - private $totalsBuilderMock; - - /** - * @var TotalsService - */ - private $service; - - public function setUp() - { - $this->quoteMock = $this->getMock( - 'Magento\Quote\Model\Quote', [], [], '', false - ); - $this->totalsBuilderMock = $this->getMock( - 'Magento\Checkout\Service\V1\Data\Cart\TotalsBuilder', - ['populateWithArray', 'setItems', 'create'], - [], - '', - false - ); - $this->totalsMapperMock = $this->getMock( - 'Magento\Checkout\Service\V1\Data\Cart\TotalsMapper', [], [], '', false - ); - $this->quoteRepositoryMock = $this->getMock( - 'Magento\Quote\Model\QuoteRepository', [], [], '', false - ); - $this->itemTotalsMapperMock = $this->getMock( - 'Magento\Checkout\Service\V1\Data\Cart\Totals\ItemMapper', ['extractDto'], [], '', false - ); - - $this->service = new TotalsService( - $this->totalsBuilderMock, - $this->totalsMapperMock, - $this->quoteRepositoryMock, - $this->itemTotalsMapperMock - ); - } - - public function testGetTotals() - { - $cartId = 12; - $this->quoteRepositoryMock->expects($this->once())->method('getActive')->with($cartId) - ->will($this->returnValue($this->quoteMock)); - - $this->totalsMapperMock->expects($this->once()) - ->method('map') - ->with($this->quoteMock) - ->will($this->returnValue(['test'])); - - $item = $this->getMock('Magento\Quote\Model\Quote\Item', [], [], '', false); - $this->quoteMock->expects($this->once())->method('getAllItems')->will($this->returnValue([$item])); - $this->service->getTotals($cartId); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/TotalsMapperTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/TotalsMapperTest.php deleted file mode 100644 index 0519c7928d2..00000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/TotalsMapperTest.php +++ /dev/null @@ -1,100 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Data\Cart; - -class TotalsMapperTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Checkout\Service\V1\Data\Cart\TotalsMapper - */ - protected $mapper; - - protected function setUp() - { - $this->mapper = new \Magento\Checkout\Service\V1\Data\Cart\TotalsMapper(); - } - - public function testMap() - { - $methods = ['getBaseGrandTotal', 'getGrandTotal', 'getBaseSubtotal', 'getSubtotal','getBaseCurrencyCode', - 'getBaseSubtotalWithDiscount', 'getSubtotalWithDiscount', 'getShippingAddress', '__wakeUp', - 'getQuoteCurrencyCode', ]; - $quoteMock = $this->getMock('Magento\Quote\Model\Quote', $methods, [], '', false); - $methods = [ - 'getDiscountAmount', 'getBaseDiscountAmount', 'getShippingAmount', 'getBaseShippingAmount', - 'getShippingDiscountAmount', 'getBaseShippingDiscountAmount', 'getTaxAmount', 'getBaseTaxAmount', - 'getShippingTaxAmount', 'getBaseShippingTaxAmount', 'getSubtotalInclTax', 'getBaseSubtotalTotalInclTax', - 'getShippingInclTax', 'getBaseShippingInclTax', 'getId', '__wakeUp', - ]; - - $shippingAddressMock = $this->getMock('\Magento\Quote\Model\Quote\Address', $methods, [], '', false); - - $quoteMock->expects($this->any())->method('getShippingAddress') - ->will($this->returnValue($shippingAddressMock)); - - $expected = [ - Totals::BASE_GRAND_TOTAL => 100, - Totals::GRAND_TOTAL => 150, - Totals::BASE_SUBTOTAL => 150, - Totals::SUBTOTAL => 150, - Totals::BASE_SUBTOTAL_WITH_DISCOUNT => 120, - Totals::SUBTOTAL_WITH_DISCOUNT => 120, - Totals::BASE_CURRENCY_CODE => 'EUR', - Totals::QUOTE_CURRENCY_CODE => 'BR', - Totals::DISCOUNT_AMOUNT => 110, - Totals::BASE_DISCOUNT_AMOUNT => 110, - Totals::SHIPPING_AMOUNT => 20, - Totals::BASE_SHIPPING_AMOUNT => 20, - Totals::SHIPPING_DISCOUNT_AMOUNT => 5, - Totals::BASE_SHIPPING_DISCOUNT_AMOUNT => 5, - Totals::TAX_AMOUNT => 3, - Totals::BASE_TAX_AMOUNT => 3, - Totals::SHIPPING_TAX_AMOUNT => 1, - Totals::BASE_SHIPPING_TAX_AMOUNT => 1, - Totals::SUBTOTAL_INCL_TAX => 153, - Totals::BASE_SUBTOTAL_INCL_TAX => 153, - Totals::SHIPPING_INCL_TAX => 21, - Totals::BASE_SHIPPING_INCL_TAX => 21, - ]; - $expectedQuoteMethods = [ - 'getBaseGrandTotal' => 100, - 'getGrandTotal' => 150, - 'getBaseSubtotal' => 150, - 'getSubtotal' => 150, - 'getBaseSubtotalWithDiscount' => 120, - 'getSubtotalWithDiscount' => 120, - ]; - - $addressMethods = [ - 'getDiscountAmount' => 110, - 'getBaseDiscountAmount' => 110, - 'getShippingAmount' => 20, - 'getBaseShippingAmount' => 20, - 'getShippingDiscountAmount' => 5, - 'getBaseShippingDiscountAmount' => 5, - 'getTaxAmount' => 3, - 'getBaseTaxAmount' => 3, - 'getShippingTaxAmount' => 1, - 'getBaseShippingTaxAmount' => 1, - 'getSubtotalInclTax' => 153, - 'getBaseSubtotalTotalInclTax' => 153, - 'getShippingInclTax' => 21, - 'getBaseShippingInclTax' => 21, - ]; - - $quoteMock->expects($this->atLeastOnce())->method('getBaseCurrencyCode')->will($this->returnValue('EUR')); - $quoteMock->expects($this->atLeastOnce())->method('getQuoteCurrencyCode')->will($this->returnValue('BR')); - - foreach ($expectedQuoteMethods as $method => $value) { - $quoteMock->expects($this->once())->method($method)->will($this->returnValue($value)); - } - foreach ($addressMethods as $method => $value) { - $shippingAddressMock->expects($this->once())->method($method)->will($this->returnValue($value)); - } - - $this->assertEquals($expected, $this->mapper->map($quoteMock)); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/Cart/CartTotalRepositoryTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/Cart/CartTotalRepositoryTest.php new file mode 100644 index 00000000000..a7fb88418d9 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/Cart/CartTotalRepositoryTest.php @@ -0,0 +1,68 @@ +<?php +/** + * + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Quote\Model\Cart; + +class CartTotalRepositoryTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Quote\Model\Cart\CartTotalRepository + */ + protected $model; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $quoteRepositoryMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $quoteMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $totalsBuilderMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $addressMock; + + public function setUp() + { + $this->totalsBuilderMock = $this->getMock( + 'Magento\Quote\Api\Data\TotalsDataBuilder', + ['populateWithArray', 'setItems', 'create'], + [], + '', + false + ); + $this->quoteMock = $this->getMock('Magento\Quote\Model\Quote', [], [], '', false); + $this->quoteRepositoryMock = $this->getMock('Magento\Quote\Model\QuoteRepository', [], [], '', false); + $this->addressMock = $this->getMock('Magento\Quote\Model\Quote\Address', [], [], '', false); + + $this->model = new CartTotalRepository( + $this->totalsBuilderMock, + $this->quoteRepositoryMock + ); + } + + public function testGetTotals() + { + $cartId = 12; + $this->quoteRepositoryMock->expects($this->once())->method('getActive')->with($cartId) + ->will($this->returnValue($this->quoteMock)); + $this->quoteMock->expects($this->once())->method('getShippingAddress')->willReturn($this->addressMock); + $this->addressMock->expects($this->once())->method('getData')->willReturn(['addressData']); + $this->quoteMock->expects($this->once())->method('getData')->willReturn(['quoteData']); + + $item = $this->getMock('Magento\Quote\Model\Quote\Item', [], [], '', false); + $this->quoteMock->expects($this->once())->method('getAllItems')->will($this->returnValue([$item])); + $this->model->get($cartId); + } +} -- GitLab From 56b17f0f3c8d0e8246b01dfa951d69c0a0cce525 Mon Sep 17 00:00:00 2001 From: Olexii Korshenko <okorshenko@ebay.com> Date: Fri, 16 Jan 2015 18:23:13 +0200 Subject: [PATCH 061/114] MAGETWO-32775: Prepare pull request for Checkout related modules MSC - fixed static test --- .../Payment/Model/Method/AbstractMethod.php | 4 ++-- .../Magento/Quote/Model/CouponManagement.php | 2 +- .../Magento/Quote/Model/QuoteManagement.php | 11 +++++++++++ .../Magento/Quote/Model/QuoteSearchResults.php | 5 ++--- .../Quote/Model/ShippingMethodManagement.php | 1 - .../Service/V1/Entity/ExtensibleRequest.php | 3 +-- .../Model/Data/CustomAttributeDataObject.php | 4 ++-- .../Data/CustomAttributeNestedDataObject.php | 4 ++-- .../Magento/TestModuleMSC/Model/Data/Item.php | 3 +-- .../CatalogInventory/Api/StockItemTest.php | 6 +++--- .../Magento/Tax/Api/TaxClassRepositoryTest.php | 18 ++++++++++++------ 11 files changed, 37 insertions(+), 24 deletions(-) diff --git a/app/code/Magento/Payment/Model/Method/AbstractMethod.php b/app/code/Magento/Payment/Model/Method/AbstractMethod.php index dec00e9a83d..b488c9f4555 100644 --- a/app/code/Magento/Payment/Model/Method/AbstractMethod.php +++ b/app/code/Magento/Payment/Model/Method/AbstractMethod.php @@ -14,8 +14,8 @@ use Magento\Sales\Model\Order\Payment; * Payment method abstract model * @method AbstractMethod setStore() */ -abstract class AbstractMethod extends \Magento\Framework\Model\AbstractExtensibleModel implements MethodInterface, - PaymentMethodChecksInterface, \Magento\Quote\Api\Data\PaymentMethodInterface +abstract class AbstractMethod extends \Magento\Framework\Model\AbstractExtensibleModel implements + MethodInterface, PaymentMethodChecksInterface, \Magento\Quote\Api\Data\PaymentMethodInterface { const ACTION_ORDER = 'order'; diff --git a/app/code/Magento/Quote/Model/CouponManagement.php b/app/code/Magento/Quote/Model/CouponManagement.php index b2bfd68a299..dc9fb49b6ea 100644 --- a/app/code/Magento/Quote/Model/CouponManagement.php +++ b/app/code/Magento/Quote/Model/CouponManagement.php @@ -91,4 +91,4 @@ class CouponManagement implements CouponManagementInterface } return true; } -} \ No newline at end of file +} diff --git a/app/code/Magento/Quote/Model/QuoteManagement.php b/app/code/Magento/Quote/Model/QuoteManagement.php index d8f81f31141..cd5cbaf7fab 100644 --- a/app/code/Magento/Quote/Model/QuoteManagement.php +++ b/app/code/Magento/Quote/Model/QuoteManagement.php @@ -98,6 +98,10 @@ class QuoteManagement implements \Magento\Quote\Api\CartManagementInterface * @param ToOrderAddressConverter $quoteAddressToOrderAddress * @param ToOrderItemConverter $quoteItemToOrderItem * @param ToOrderPaymentConverter $quotePaymentToOrderPayment + * @param UserContextInterface $userContext + * @param QuoteRepository $quoteRepository + * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository + * @param \Magento\Customer\Model\CustomerFactory $customerModelFactory */ public function __construct( EventManager $eventManager, @@ -177,6 +181,7 @@ class QuoteManagement implements \Magento\Quote\Api\CartManagementInterface /** * Creates an anonymous cart. * + * @param int $storeId * @return \Magento\Quote\Model\Quote Cart object. */ protected function createAnonymousCart($storeId) @@ -222,11 +227,17 @@ class QuoteManagement implements \Magento\Quote\Api\CartManagementInterface return $order->getId(); } + /** + * {@inheritdoc} + */ public function getCartForCustomer($customerId) { //stub for interface } + /** + * Delete quote item + * * @param Quote $quote * @return void */ diff --git a/app/code/Magento/Quote/Model/QuoteSearchResults.php b/app/code/Magento/Quote/Model/QuoteSearchResults.php index 0e091f17510..b8ada5b81f3 100644 --- a/app/code/Magento/Quote/Model/QuoteSearchResults.php +++ b/app/code/Magento/Quote/Model/QuoteSearchResults.php @@ -8,9 +8,8 @@ namespace Magento\Quote\Model; /** * @codeCoverageIgnore */ -class QuoteSearchResults - extends \Magento\Framework\Api\SearchResults - implements \Magento\Quote\Api\Data\CartSearchResultsInterface +class QuoteSearchResults extends \Magento\Framework\Api\SearchResults implements + \Magento\Quote\Api\Data\CartSearchResultsInterface { /** * Get items diff --git a/app/code/Magento/Quote/Model/ShippingMethodManagement.php b/app/code/Magento/Quote/Model/ShippingMethodManagement.php index d93eb6c86e8..fc69dd0a2ff 100644 --- a/app/code/Magento/Quote/Model/ShippingMethodManagement.php +++ b/app/code/Magento/Quote/Model/ShippingMethodManagement.php @@ -13,7 +13,6 @@ use Magento\Framework\Exception\CouldNotSaveException; use Magento\Quote\Api\ShippingMethodManagementInterface; use Magento\Quote\Api\Data\ShippingMethodInterface; - /** * Shipping method read service. */ diff --git a/dev/tests/api-functional/_files/Magento/TestModule4/Service/V1/Entity/ExtensibleRequest.php b/dev/tests/api-functional/_files/Magento/TestModule4/Service/V1/Entity/ExtensibleRequest.php index 806953fc16f..25bbcf16458 100644 --- a/dev/tests/api-functional/_files/Magento/TestModule4/Service/V1/Entity/ExtensibleRequest.php +++ b/dev/tests/api-functional/_files/Magento/TestModule4/Service/V1/Entity/ExtensibleRequest.php @@ -5,8 +5,7 @@ */ namespace Magento\TestModule4\Service\V1\Entity; -class ExtensibleRequest extends \Magento\Framework\Model\AbstractExtensibleModel - implements ExtensibleRequestInterface +class ExtensibleRequest extends \Magento\Framework\Model\AbstractExtensibleModel implements ExtensibleRequestInterface { public function getName() { diff --git a/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/CustomAttributeDataObject.php b/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/CustomAttributeDataObject.php index 0e1444899ec..6024d1c2085 100644 --- a/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/CustomAttributeDataObject.php +++ b/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/CustomAttributeDataObject.php @@ -6,9 +6,9 @@ namespace Magento\TestModuleMSC\Model\Data; use Magento\TestModuleMSC\Api\Data\CustomAttributeDataObjectInterface; +use Magento\Framework\Api\AbstractExtensibleObject; -class CustomAttributeDataObject extends \Magento\Framework\Api\AbstractExtensibleObject - implements CustomAttributeDataObjectInterface +class CustomAttributeDataObject extends AbstractExtensibleObject implements CustomAttributeDataObjectInterface { /** * @return string diff --git a/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/CustomAttributeNestedDataObject.php b/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/CustomAttributeNestedDataObject.php index a8b51c8c3c0..4e9e2afcf9c 100644 --- a/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/CustomAttributeNestedDataObject.php +++ b/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/CustomAttributeNestedDataObject.php @@ -7,8 +7,8 @@ namespace Magento\TestModuleMSC\Model\Data; use Magento\TestModuleMSC\Api\Data\CustomAttributeNestedDataObjectInterface; -class CustomAttributeNestedDataObject extends \Magento\Framework\Model\AbstractExtensibleModel - implements CustomAttributeNestedDataObjectInterface +class CustomAttributeNestedDataObject extends \Magento\Framework\Model\AbstractExtensibleModel implements + CustomAttributeNestedDataObjectInterface { /** * @return string diff --git a/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/Item.php b/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/Item.php index 8866c08cd20..c3854c46419 100644 --- a/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/Item.php +++ b/dev/tests/api-functional/_files/Magento/TestModuleMSC/Model/Data/Item.php @@ -7,8 +7,7 @@ namespace Magento\TestModuleMSC\Model\Data; use Magento\TestModuleMSC\Api\Data\ItemInterface; -class Item extends \Magento\Framework\Model\AbstractExtensibleModel - implements ItemInterface +class Item extends \Magento\Framework\Model\AbstractExtensibleModel implements ItemInterface { /** * @return int diff --git a/dev/tests/api-functional/testsuite/Magento/CatalogInventory/Api/StockItemTest.php b/dev/tests/api-functional/testsuite/Magento/CatalogInventory/Api/StockItemTest.php index b0b7eceb47f..595a0a2bd41 100644 --- a/dev/tests/api-functional/testsuite/Magento/CatalogInventory/Api/StockItemTest.php +++ b/dev/tests/api-functional/testsuite/Magento/CatalogInventory/Api/StockItemTest.php @@ -147,7 +147,7 @@ class StockItemTest extends WebapiAbstract 'use_config_max_sale_qty' => 1, 'is_in_stock' => 1, 'low_stock_date' => '', - 'notify_stock_qty' => NULL, + 'notify_stock_qty' => null, 'use_config_notify_stock_qty' => 1, 'manage_stock' => 0, 'use_config_manage_stock' => 1, @@ -174,8 +174,8 @@ class StockItemTest extends WebapiAbstract 'max_sale_qty' => '0.0000', 'use_config_max_sale_qty' => '1', 'is_in_stock' => '1', - 'low_stock_date' => NULL, - 'notify_stock_qty' => NULL, + 'low_stock_date' => null, + 'notify_stock_qty' => null, 'use_config_notify_stock_qty' => '1', 'manage_stock' => '0', 'use_config_manage_stock' => '1', diff --git a/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxClassRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxClassRepositoryTest.php index 3cd13949a3b..2713dd95641 100644 --- a/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxClassRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxClassRepositoryTest.php @@ -291,10 +291,14 @@ class TaxClassRepositoryTest extends WebapiAbstract $requestData = ['searchCriteria' => $searchData]; $searchResults = $this->_webApiCall($serviceInfo, $requestData); $this->assertEquals(2, $searchResults['total_count']); - $this->assertEquals($productTaxClass[Data\TaxClassInterface::KEY_NAME], - $searchResults['items'][0][Data\TaxClassInterface::KEY_NAME]); - $this->assertEquals($customerTaxClass[Data\TaxClassInterface::KEY_NAME], - $searchResults['items'][1][Data\TaxClassInterface::KEY_NAME]); + $this->assertEquals( + $productTaxClass[Data\TaxClassInterface::KEY_NAME], + $searchResults['items'][0][Data\TaxClassInterface::KEY_NAME] + ); + $this->assertEquals( + $customerTaxClass[Data\TaxClassInterface::KEY_NAME], + $searchResults['items'][1][Data\TaxClassInterface::KEY_NAME] + ); /** class_name == 'Retail Customer' && ( class_type == 'CUSTOMER' || class_type == 'PRODUCT') */ $this->searchCriteriaBuilder->addFilter([$filter2]); @@ -304,7 +308,9 @@ class TaxClassRepositoryTest extends WebapiAbstract $requestData = ['searchCriteria' => $searchData]; $searchResults = $this->_webApiCall($serviceInfo, $requestData); $this->assertEquals(1, $searchResults['total_count']); - $this->assertEquals($customerTaxClass[Data\TaxClassInterface::KEY_NAME], - $searchResults['items'][0][Data\TaxClassInterface::KEY_NAME]); + $this->assertEquals( + $customerTaxClass[Data\TaxClassInterface::KEY_NAME], + $searchResults['items'][0][Data\TaxClassInterface::KEY_NAME] + ); } } -- GitLab From 918085c594d78f069f0ed7007af169887c125767 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Fri, 16 Jan 2015 19:37:00 +0200 Subject: [PATCH 062/114] MAGETWO-32781: Quote still has is_active=1 after place order using "/V1/carts/:cartId/order" service --- app/code/Magento/Quote/Model/QuoteManagement.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Quote/Model/QuoteManagement.php b/app/code/Magento/Quote/Model/QuoteManagement.php index cd5cbaf7fab..358dbd47452 100644 --- a/app/code/Magento/Quote/Model/QuoteManagement.php +++ b/app/code/Magento/Quote/Model/QuoteManagement.php @@ -224,6 +224,7 @@ class QuoteManagement implements \Magento\Quote\Api\CartManagementInterface { $quote = $this->quoteRepository->getActive($cartId); $order = $this->submit($quote); + $this->quoteRepository->save($quote); return $order->getId(); } -- GitLab From 0cc5c09a2bca2b6c0ff483166f179f4c8069ab65 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Mon, 19 Jan 2015 13:38:51 +0200 Subject: [PATCH 063/114] MAGETWO-32781: Quote still has is_active=1 after place order using "/V1/carts/:cartId/order" service --- app/code/Magento/Checkout/Controller/Onepage/SaveOrder.php | 1 - app/code/Magento/Quote/Model/QuoteManagement.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/Checkout/Controller/Onepage/SaveOrder.php b/app/code/Magento/Checkout/Controller/Onepage/SaveOrder.php index bb7f4007301..3607f73fdac 100644 --- a/app/code/Magento/Checkout/Controller/Onepage/SaveOrder.php +++ b/app/code/Magento/Checkout/Controller/Onepage/SaveOrder.php @@ -104,7 +104,6 @@ class SaveOrder extends \Magento\Checkout\Controller\Onepage $result['error'] = true; $result['error_messages'] = __('Something went wrong processing your order. Please try again later.'); } - $this->quoteRepository->save($this->getOnepage()->getQuote()); /** * when there is redirect to third party, we don't want to save order yet. * we will save the order in return action. diff --git a/app/code/Magento/Quote/Model/QuoteManagement.php b/app/code/Magento/Quote/Model/QuoteManagement.php index e4cc2a7cd03..e0bc4103270 100644 --- a/app/code/Magento/Quote/Model/QuoteManagement.php +++ b/app/code/Magento/Quote/Model/QuoteManagement.php @@ -224,7 +224,6 @@ class QuoteManagement implements \Magento\Quote\Api\CartManagementInterface { $quote = $this->quoteRepository->getActive($cartId); $order = $this->submit($quote); - $this->quoteRepository->save($quote); return $order->getId(); } @@ -356,6 +355,7 @@ class QuoteManagement implements \Magento\Quote\Api\CartManagementInterface 'quote' => $quote ] ); + $this->quoteRepository->save($quote); } catch (\Exception $e) { $this->eventManager->dispatch( 'sales_model_service_quote_submit_failure', -- GitLab From d353f8b742f98ffcd4ab91bcb6c9629657ada944 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Mon, 19 Jan 2015 13:55:34 +0200 Subject: [PATCH 064/114] MAGETWO-32781: Quote still has is_active=1 after place order using "/V1/carts/:cartId/order" service --- .../Magento/Quote/Model/QuoteManagementTest.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php index bcb93755ebf..305380a8a75 100644 --- a/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php @@ -53,6 +53,11 @@ class QuoteManagementTest extends \PHPUnit_Framework_TestCase */ protected $orderManagement; + /** + * @var \Magento\Quote\Model\QuoteRepository|\PHPUnit_Framework_MockObject_MockObject + */ + protected $quoteRepositoryMock; + /** * @var CustomerManagement */ @@ -99,6 +104,7 @@ class QuoteManagementTest extends \PHPUnit_Framework_TestCase $this->quoteItemToOrderItem = $this->getMock('Magento\Quote\Model\Quote\Item\ToOrderItem', [], [], '', false); $this->orderManagement = $this->getMock('Magento\Sales\Api\OrderManagementInterface', [], [], '', false); $this->customerManagement = $this->getMock('Magento\Quote\Model\CustomerManagement', [], [], '', false); + $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); $this->model = $objectManager->getObject( 'Magento\Quote\Model\QuoteManagement', @@ -111,7 +117,8 @@ class QuoteManagementTest extends \PHPUnit_Framework_TestCase 'quoteAddressToOrder' => $this->quoteAddressToOrder, 'quoteAddressToOrderAddress' => $this->quoteAddressToOrderAddress, 'quoteItemToOrderItem' => $this->quoteItemToOrderItem, - 'quotePaymentToOrderPayment' => $this->quotePaymentToOrderPayment + 'quotePaymentToOrderPayment' => $this->quotePaymentToOrderPayment, + 'quoteRepository' => $this->quoteRepositoryMock ] ); } @@ -208,6 +215,8 @@ class QuoteManagementTest extends \PHPUnit_Framework_TestCase ->method('dispatch') ->with('sales_model_service_quote_submit_success', ['order' => $order, 'quote' => $quote]); + $this->quoteRepositoryMock->expects($this->once())->method('save')->with($quote); + $this->assertEquals($order, $this->model->submit($quote, $orderData)); } -- GitLab From be97612da5a39c4f7c4d3e77e54c00b36aa3a78f Mon Sep 17 00:00:00 2001 From: Olexii Korshenko <okorshenko@ebay.com> Date: Mon, 19 Jan 2015 14:59:17 +0200 Subject: [PATCH 065/114] MAGETWO-32775: Prepare pull request for Checkout related modules MSC - fixed static test --- app/code/Magento/Payment/Model/Method/AbstractMethod.php | 5 ++++- app/code/Magento/Quote/Model/Cart/Totals.php | 1 + app/code/Magento/Quote/Model/QuoteManagement.php | 2 +- .../Magento/Quote/Model/PaymentMethodManagementTest.php | 8 +++++++- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Payment/Model/Method/AbstractMethod.php b/app/code/Magento/Payment/Model/Method/AbstractMethod.php index b488c9f4555..7abb461e90d 100644 --- a/app/code/Magento/Payment/Model/Method/AbstractMethod.php +++ b/app/code/Magento/Payment/Model/Method/AbstractMethod.php @@ -9,13 +9,16 @@ use Magento\Payment\Model\Checks\PaymentMethodChecksInterface; use Magento\Payment\Model\MethodInterface; use Magento\Sales\Model\Order\Invoice; use Magento\Sales\Model\Order\Payment; +use Magento\Quote\Api\Data\PaymentMethodInterface; /** * Payment method abstract model * @method AbstractMethod setStore() */ abstract class AbstractMethod extends \Magento\Framework\Model\AbstractExtensibleModel implements - MethodInterface, PaymentMethodChecksInterface, \Magento\Quote\Api\Data\PaymentMethodInterface + MethodInterface, + PaymentMethodChecksInterface, + PaymentMethodInterface { const ACTION_ORDER = 'order'; diff --git a/app/code/Magento/Quote/Model/Cart/Totals.php b/app/code/Magento/Quote/Model/Cart/Totals.php index 7a19f3089e1..db3783fe0a9 100644 --- a/app/code/Magento/Quote/Model/Cart/Totals.php +++ b/app/code/Magento/Quote/Model/Cart/Totals.php @@ -7,6 +7,7 @@ namespace Magento\Quote\Model\Cart; use Magento\Quote\Api\Data\TotalsInterface; use Magento\Framework\Model\AbstractExtensibleModel; + /** * Cart Totals * diff --git a/app/code/Magento/Quote/Model/QuoteManagement.php b/app/code/Magento/Quote/Model/QuoteManagement.php index e0bc4103270..823374dd678 100644 --- a/app/code/Magento/Quote/Model/QuoteManagement.php +++ b/app/code/Magento/Quote/Model/QuoteManagement.php @@ -195,7 +195,7 @@ class QuoteManagement implements \Magento\Quote\Api\CartManagementInterface /** * Creates a cart for the currently logged-in customer. * - * @param $storeId + * @param int $storeId * @return \Magento\Quote\Model\Quote Cart object. * @throws CouldNotSaveException The cart could not be created. */ diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/PaymentMethodManagementTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/PaymentMethodManagementTest.php index 4b6f2803f69..3d6402af114 100644 --- a/dev/tests/unit/testsuite/Magento/Quote/Model/PaymentMethodManagementTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/PaymentMethodManagementTest.php @@ -42,7 +42,13 @@ class PaymentMethodManagementTest extends \PHPUnit_Framework_TestCase $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); $this->methodListMock = $this->getMock('\Magento\Payment\Model\MethodList', [], [], '', false); $this->zeroTotalMock = $this->getMock('\Magento\Payment\Model\Checks\ZeroTotal', [], [], '', false); - $this->paymentMethodBuilder = $this->getMock('\Magento\Quote\Api\Data\PaymentMethodDataBuilder', [], [], '', false); + $this->paymentMethodBuilder = $this->getMock( + '\Magento\Quote\Api\Data\PaymentMethodDataBuilder', + [], + [], + '', + false + ); $this->model = $this->objectManager->getObject( '\Magento\Quote\Model\PaymentMethodManagement', -- GitLab From 8fba16538b795eff471bd6006576554acf825a75 Mon Sep 17 00:00:00 2001 From: Olexii Korshenko <okorshenko@ebay.com> Date: Mon, 19 Jan 2015 15:17:32 +0200 Subject: [PATCH 066/114] MAGETWO-32775: Prepare pull request for Checkout related modules MSC --- .../Magento/Checkout/Service/V1/Cart/ReadServiceTest.php | 1 + .../Magento/Checkout/Service/V1/Cart/WriteServiceTest.php | 1 + .../Magento/Checkout/Service/V1/Data/Cart/CustomerMapperTest.php | 1 + .../Magento/Checkout/Service/V1/Data/CartMapperTest.php | 1 + 4 files changed, 4 insertions(+) diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php index b500f637297..7693baca491 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php @@ -45,6 +45,7 @@ class ReadServiceTest extends \PHPUnit_Framework_TestCase protected function setUp() { + $this->markTestSkipped('Checkout API'); $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); $methods = [ diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/WriteServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/WriteServiceTest.php index 7434e70ad59..799807fdee9 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/WriteServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/WriteServiceTest.php @@ -66,6 +66,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase public function setUp() { + $this->markTestSkipped('Checkout API'); $this->objectManager = new ObjectManager($this); $this->storeManagerMock = $this->getMock('\Magento\Store\Model\StoreManagerInterface'); $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/CustomerMapperTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/CustomerMapperTest.php index 599757e903d..36b10cd8e70 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/CustomerMapperTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/CustomerMapperTest.php @@ -14,6 +14,7 @@ class CustomerMapperTest extends \PHPUnit_Framework_TestCase protected function setUp() { + $this->markTestSkipped('Checkout API'); $this->mapper = new \Magento\Checkout\Service\V1\Data\Cart\CustomerMapper(); } diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/CartMapperTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/CartMapperTest.php index 19c4d479363..e2580dc12bf 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/CartMapperTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/CartMapperTest.php @@ -49,6 +49,7 @@ class CartMapperTest extends \PHPUnit_Framework_TestCase protected function setUp() { + $this->markTestSkipped('Checkout API'); $this->totalsBuilder = $this->getMock( '\Magento\Checkout\Service\V1\Data\Cart\TotalsBuilder', ['populateWithArray', 'setItems', 'create'], -- GitLab From bad95d3af3be2e381e35f3da1b414984443d90f4 Mon Sep 17 00:00:00 2001 From: Olexii Korshenko <okorshenko@ebay.com> Date: Mon, 19 Jan 2015 15:35:12 +0200 Subject: [PATCH 067/114] MAGETWO-32775: Prepare pull request for Checkout related modules MSC - fixed integration tests --- .../Magento/Framework/Api/Code/Generator/DataBuilderTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Framework/Api/Code/Generator/DataBuilderTest.php b/dev/tests/integration/testsuite/Magento/Framework/Api/Code/Generator/DataBuilderTest.php index ff6d1b7ffdc..3f164c9d531 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Api/Code/Generator/DataBuilderTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Api/Code/Generator/DataBuilderTest.php @@ -42,7 +42,7 @@ class DataBuilderTest extends \PHPUnit_Framework_TestCase public function getBuildersToTest() { return [ - ['Magento\Checkout\Service\V1\Data\Cart\TotalsBuilder'], + ['Magento\Catalog\Api\Data\ProductDataBuilder'], ]; } -- GitLab From 05fad8611e80687ef1b014f518a4b0f1cd566f58 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Mon, 19 Jan 2015 16:41:27 +0200 Subject: [PATCH 068/114] MAGETWO-32501: Implement Cart Service interfaces --- app/code/Magento/Checkout/etc/webapi.xml | 16 ----- .../Quote/Api/CartManagementInterface.php | 4 -- .../Magento/Quote/Model/QuoteManagement.php | 2 +- app/code/Magento/Quote/etc/webapi.xml | 6 ++ .../Quote/Api/CartManagementInterfaceTest.php | 67 +++++++++++++++++++ .../Quote/Model/QuoteManagementTest.php | 11 +++ 6 files changed, 85 insertions(+), 21 deletions(-) delete mode 100644 app/code/Magento/Checkout/etc/webapi.xml diff --git a/app/code/Magento/Checkout/etc/webapi.xml b/app/code/Magento/Checkout/etc/webapi.xml deleted file mode 100644 index ad2766276e8..00000000000 --- a/app/code/Magento/Checkout/etc/webapi.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../app/code/Magento/Webapi/etc/webapi.xsd"> - <route url="/V1/customer/:customerId/cart" method="GET"> - <service class="Magento\Checkout\Service\V1\Cart\ReadServiceInterface" method="getCartForCustomer"/> - <resources> - <resource ref="Magento_Catalog::products" /> - </resources> - </route> -</routes> diff --git a/app/code/Magento/Quote/Api/CartManagementInterface.php b/app/code/Magento/Quote/Api/CartManagementInterface.php index 88815cc291d..4bf49813ac4 100644 --- a/app/code/Magento/Quote/Api/CartManagementInterface.php +++ b/app/code/Magento/Quote/Api/CartManagementInterface.php @@ -13,7 +13,6 @@ interface CartManagementInterface * @param int $storeId * @throws \Magento\Framework\Exception\CouldNotSaveException The empty cart and quote could not be created. * @return int Cart ID. - * @see \Magento\Checkout\Service\V1\Cart\WriteServiceInterface::create */ public function createEmptyCart($storeId); @@ -23,7 +22,6 @@ interface CartManagementInterface * @param int $customerId The customer ID. * @return \Magento\Quote\Api\Data\CartInterface Cart object. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified customer does not exist. - * @see \Magento\Checkout\Service\V1\Cart\ReadServiceInterface::getCartForCustomer */ public function getCartForCustomer($customerId); @@ -34,7 +32,6 @@ interface CartManagementInterface * @param int $customerId The customer ID. * @param int $storeId * @return boolean - * @see \Magento\Checkout\Service\V1\Cart\WriteServiceInterface::assignCustomer */ public function assignCustomer($cartId, $customerId, $storeId); @@ -43,7 +40,6 @@ interface CartManagementInterface * * @param int $cartId The cart ID. * @return int Order ID. - * @see \Magento\Checkout\Service\V1\Cart\WriteServiceInterface::order */ public function placeOrder($cartId); } diff --git a/app/code/Magento/Quote/Model/QuoteManagement.php b/app/code/Magento/Quote/Model/QuoteManagement.php index 823374dd678..b2bea0ff3ae 100644 --- a/app/code/Magento/Quote/Model/QuoteManagement.php +++ b/app/code/Magento/Quote/Model/QuoteManagement.php @@ -232,7 +232,7 @@ class QuoteManagement implements \Magento\Quote\Api\CartManagementInterface */ public function getCartForCustomer($customerId) { - //stub for interface + return $this->quoteRepository->getActiveForCustomer($customerId); } /** diff --git a/app/code/Magento/Quote/etc/webapi.xml b/app/code/Magento/Quote/etc/webapi.xml index fc24a03bb89..2a4e83c5597 100644 --- a/app/code/Magento/Quote/etc/webapi.xml +++ b/app/code/Magento/Quote/etc/webapi.xml @@ -145,4 +145,10 @@ <resource ref="Magento_Sales::sales" /> </resources> </route> + <route url="/V1/customer/:customerId/cart" method="GET"> + <service class="Magento\Quote\Api\CartManagementInterface" method="getCartForCustomer"/> + <resources> + <resource ref="Magento_Catalog::products" /> + </resources> + </route> </routes> diff --git a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php index fde6cf36e6e..501ecf79f6a 100644 --- a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php @@ -301,4 +301,71 @@ class CartManagementInterfaceTest extends WebapiAbstract $this->assertEquals('Simple Product', $items[0]->getName()); $quote->delete(); } + + /** + * @magentoApiDataFixture Magento/Sales/_files/quote_with_customer.php + */ + public function testGetCartForCustomer() + { + $cart = $this->getCart('test01'); + $customerId = $cart->getCustomer()->getId(); + + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => '/V1/customer/' . $customerId . '/cart', + 'httpMethod' => RestConfig::HTTP_METHOD_GET, + ], + 'soap' => [ + 'service' => 'quoteCartManagementV1', + 'serviceVersion' => 'V1', + 'operation' => 'quoteCartManagementV1GetCartForCustomer', + ], + ]; + + $requestData = ['customerId' => $customerId]; + $cartData = $this->_webApiCall($serviceInfo, $requestData); + + $this->assertEquals($cart->getId(), $cartData['id']); + $this->assertEquals($cart->getCreatedAt(), $cartData['created_at']); + $this->assertEquals($cart->getUpdatedAt(), $cartData['updated_at']); + $this->assertEquals($cart->getStoreId(), $cartData['store_id']); + $this->assertEquals($cart->getIsActive(), $cartData['is_active']); + $this->assertEquals($cart->getIsVirtual(), $cartData['is_virtual']); + $this->assertEquals($cart->getOrigOrderId(), $cartData['orig_order_id']); + $this->assertEquals($cart->getItemsCount(), $cartData['items_count']); + $this->assertEquals($cart->getItemsQty(), $cartData['items_qty']); + + $this->assertContains('customer', $cartData); + $this->assertEquals(0, $cartData['customer']['is_guest']); + $this->assertContains('totals', $cartData); + $this->assertEquals($cart->getSubtotal(), $cartData['totals']['subtotal']); + $this->assertEquals($cart->getGrandTotal(), $cartData['totals']['grand_total']); + $this->assertContains('currency', $cartData); + $this->assertEquals($cart->getGlobalCurrencyCode(), $cartData['currency']['global_currency_code']); + $this->assertEquals($cart->getBaseCurrencyCode(), $cartData['currency']['base_currency_code']); + $this->assertEquals($cart->getQuoteCurrencyCode(), $cartData['currency']['quote_currency_code']); + $this->assertEquals($cart->getStoreCurrencyCode(), $cartData['currency']['store_currency_code']); + $this->assertEquals($cart->getBaseToGlobalRate(), $cartData['currency']['base_to_global_rate']); + $this->assertEquals($cart->getBaseToQuoteRate(), $cartData['currency']['base_to_quote_rate']); + $this->assertEquals($cart->getStoreToBaseRate(), $cartData['currency']['store_to_base_rate']); + $this->assertEquals($cart->getStoreToQuoteRate(), $cartData['currency']['store_to_quote_rate']); + } + + /** + * Retrieve quote by given reserved order ID + * + * @param string $reservedOrderId + * @return \Magento\Quote\Model\Quote + * @throws \InvalidArgumentException + */ + protected function getCart($reservedOrderId) + { + /** @var $cart \Magento\Quote\Model\Quote */ + $cart = $this->objectManager->get('Magento\Quote\Model\Quote'); + $cart->load($reservedOrderId, 'reserved_order_id'); + if (!$cart->getId()) { + throw new \InvalidArgumentException('There is no quote with provided reserved order ID.'); + } + return $cart; + } } diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php index 305380a8a75..197141a2f9f 100644 --- a/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php @@ -340,4 +340,15 @@ class QuoteManagementTest extends \PHPUnit_Framework_TestCase return $order; } + + public function testGetCartForCustomer() + { + $customerId = 100; + $cartMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActiveForCustomer') + ->with($customerId) + ->willReturn($cartMock); + $this->assertEquals($cartMock, $this->model->getCartForCustomer($customerId)); + } } -- GitLab From 27c4c290772f3be8a6b781b001ff6840f2cd0beb Mon Sep 17 00:00:00 2001 From: Serhiy Shkolyarenko <sshkolyarenko@ebay.com> Date: Mon, 19 Jan 2015 18:10:47 +0200 Subject: [PATCH 069/114] MAGETWO-32501: Implement Cart Service interfaces refactored customer specific methods fixed totals --- .../Checkout/Api/Data/CustomerInterface.php | 118 ------------- .../Magento/Quote/Api/Data/CartInterface.php | 30 +++- app/code/Magento/Quote/Model/Quote.php | 162 ++++++++++++++++-- .../Magento/Quote/Model/QuoteRepository.php | 2 +- .../Quote/Api/CartManagementInterfaceTest.php | 24 +-- .../Quote/Api/CartRepositoryInterfaceTest.php | 12 +- 6 files changed, 190 insertions(+), 158 deletions(-) delete mode 100644 app/code/Magento/Checkout/Api/Data/CustomerInterface.php diff --git a/app/code/Magento/Checkout/Api/Data/CustomerInterface.php b/app/code/Magento/Checkout/Api/Data/CustomerInterface.php deleted file mode 100644 index 32c3eec48d3..00000000000 --- a/app/code/Magento/Checkout/Api/Data/CustomerInterface.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Api\Data; - -/** - * @see \Magento\Checkout\Service\V1\Data\Cart\Customer - * TODO: We can use \Magento\Customer\Api\Data\CustomerInterface for checkout flow. Need additional comments. - */ -interface CustomerInterface extends \Magento\Framework\Api\ExtensibleDataInterface -{ - /** - * Get customer id - * - * @return int|null - */ - public function getId(); - - /** - * Get customer tax class id - * - * @return int|null - */ - public function getTaxClassId(); - - /** - * Get customer group id - * - * @return int|null - */ - public function getGroupId(); - - /** - * Get customer email - * - * @return string|null - */ - public function getEmail(); - - /** - * Get customer name prefix - * - * @return string|null - */ - public function getPrefix(); - - /** - * Get customer first name - * - * @return string|null - */ - public function getFirstName(); - - /** - * Get customer middle name - * - * @return string|null - */ - public function getMiddleName(); - - /** - * Get customer last name - * - * @return string|null - */ - public function getLastName(); - - /** - * Get customer name suffix - * - * @return string|null - */ - public function getSuffix(); - - /** - * Get customer date of birth - * - * @return string|null - */ - public function getDob(); - - /** - * Get note - * - * @return string|null - */ - public function getNote(); - - /** - * Get notification status - * - * @return string|null - */ - public function getNoteNotify(); - - /** - * Is customer a guest? - * - * @return bool - */ - public function getIsGuest(); - - /** - * Get taxvat value - * - * @return string|null - */ - public function getTaxVat(); - - /** - * Get gender - * - * @return string|null - */ - public function getGender(); -} diff --git a/app/code/Magento/Quote/Api/Data/CartInterface.php b/app/code/Magento/Quote/Api/Data/CartInterface.php index 5914418c081..32d3b6ea7c3 100644 --- a/app/code/Magento/Quote/Api/Data/CartInterface.php +++ b/app/code/Magento/Quote/Api/Data/CartInterface.php @@ -75,7 +75,7 @@ interface CartInterface extends \Magento\Framework\Api\ExtensibleDataInterface /** * Returns information about the customer who is assigned to the cart. * - * @return \Magento\Checkout\Api\Data\CustomerInterface Information about the customer who is assigned to the cart. + * @return \Magento\Customer\Api\Data\CustomerInterface Information about the customer who is assigned to the cart. */ public function getCustomer(); @@ -105,7 +105,7 @@ interface CartInterface extends \Magento\Framework\Api\ExtensibleDataInterface * * @return \Magento\Quote\Api\Data\TotalsInterface|null Information about cart totals. Otherwise, null. */ - public function getTotals(); + public function getTotalsObject(); /** * Returns the reserved order ID for the cart. @@ -127,4 +127,30 @@ interface CartInterface extends \Magento\Framework\Api\ExtensibleDataInterface * @return \Magento\Checkout\Api\Data\CurrencyInterface|null Quote currency information. Otherwise, null. */ public function getCurrency(); + + /** + * True for guest customers, false for logged in customers + * + * @return bool|null + */ + public function getCustomerIsGuest(); + + /** + * Customer notice text + * + * @return string|null + */ + public function getCustomerNote(); + + /** + * @return bool|null + */ + public function getCustomerNoteNotify(); + + /** + * Get customer tax class ID. + * + * @return string|null + */ + public function getCustomerTaxClassId(); } diff --git a/app/code/Magento/Quote/Model/Quote.php b/app/code/Magento/Quote/Model/Quote.php index 57cc6983b62..07f737b346f 100644 --- a/app/code/Magento/Quote/Model/Quote.php +++ b/app/code/Magento/Quote/Model/Quote.php @@ -7,7 +7,7 @@ namespace Magento\Quote\Model; use Magento\Customer\Api\Data\CustomerInterface; use Magento\Customer\Api\Data\GroupInterface; -use Magento\Framework\Model\AbstractModel; +use Magento\Framework\Model\AbstractExtensibleModel; use Magento\Quote\Model\Quote\Address; use Magento\Sales\Model\Resource; use Magento\Sales\Model\Status; @@ -23,22 +23,15 @@ use Magento\Sales\Model\Status; * sales_quote_delete_after * * @method Quote setStoreId(int $value) - * @method string getCreatedAt() * @method Quote setCreatedAt(string $value) - * @method string getUpdatedAt() * @method Quote setUpdatedAt(string $value) - * @method string getConvertedAt() * @method Quote setConvertedAt(string $value) - * @method int getIsActive() * @method Quote setIsActive(int $value) * @method Quote setIsVirtual(int $value) * @method int getIsMultiShipping() * @method Quote setIsMultiShipping(int $value) - * @method int getItemsCount() * @method Quote setItemsCount(int $value) - * @method float getItemsQty() * @method Quote setItemsQty(float $value) - * @method int getOrigOrderId() * @method Quote setOrigOrderId(int $value) * @method float getStoreToBaseRate() * @method Quote setStoreToBaseRate(float $value) @@ -73,17 +66,13 @@ use Magento\Sales\Model\Status; * @method Quote setCustomerSuffix(string $value) * @method string getCustomerDob() * @method Quote setCustomerDob(string $value) - * @method string getCustomerNote() * @method Quote setCustomerNote(string $value) - * @method int getCustomerNoteNotify() * @method Quote setCustomerNoteNotify(int $value) - * @method int getCustomerIsGuest() * @method Quote setCustomerIsGuest(int $value) * @method string getRemoteIp() * @method Quote setRemoteIp(string $value) * @method string getAppliedRuleIds() * @method Quote setAppliedRuleIds(string $value) - * @method string getReservedOrderId() * @method Quote setReservedOrderId(string $value) * @method string getPasswordHash() * @method Quote setPasswordHash(string $value) @@ -120,7 +109,7 @@ use Magento\Sales\Model\Status; * @method Quote setSharedStoreIds(array $values) * @method Quote setWebsite($value) */ -class Quote extends \Magento\Framework\Model\AbstractModel +class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\CartInterface { /** * Checkout login method key @@ -328,10 +317,15 @@ class Quote extends \Magento\Framework\Model\AbstractModel */ protected $customerRepository; + /** + * @var \Magento\Quote\Api\Data\TotalsDataBuilder + */ + protected $totalsBuilder; + /** * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry - * @param \Magento\Quote\Model\QuoteValidator $quoteValidator + * @param QuoteValidator $quoteValidator * @param \Magento\Catalog\Helper\Product $catalogProduct * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Store\Model\StoreManagerInterface $storeManager @@ -357,6 +351,9 @@ class Quote extends \Magento\Framework\Model\AbstractModel * @param \Magento\Customer\Api\Data\CustomerDataBuilder $customerBuilder * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository * @param \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter + * @param \Magento\Quote\Api\Data\TotalsDataBuilder $totalsBuilder + * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService + * @param \Magento\Framework\Api\AttributeDataBuilder $attributeDataBuilder * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data @@ -390,6 +387,9 @@ class Quote extends \Magento\Framework\Model\AbstractModel \Magento\Customer\Api\Data\CustomerDataBuilder $customerBuilder, \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository, \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter, + \Magento\Quote\Api\Data\TotalsDataBuilder $totalsBuilder, + \Magento\Framework\Api\MetadataServiceInterface $metadataService, + \Magento\Framework\Api\AttributeDataBuilder $attributeDataBuilder, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = [] @@ -420,7 +420,16 @@ class Quote extends \Magento\Framework\Model\AbstractModel $this->customerBuilder = $customerBuilder; $this->customerRepository = $customerRepository; $this->extensibleDataObjectConverter = $extensibleDataObjectConverter; - parent::__construct($context, $registry, $resource, $resourceCollection, $data); + $this->totalsBuilder = $totalsBuilder; + parent::__construct( + $context, + $registry, + $metadataService, + $attributeDataBuilder, + $resource, + $resourceCollection, + $data + ); } /** @@ -433,6 +442,111 @@ class Quote extends \Magento\Framework\Model\AbstractModel $this->_init('Magento\Quote\Model\Resource\Quote'); } + /** + * {@inheritdoc} + */ + public function getCurrency() + { + return $this->_getData('currency'); + } + + /** + * {@inheritdoc} + */ + public function getItems() + { + return $this->_getData('items'); + } + + /** + * {@inheritdoc} + */ + public function getCreatedAt() + { + return $this->_getData('created_at'); + } + + /** + * {@inheritdoc} + */ + public function getUpdatedAt() + { + return $this->_getData('updated_at'); + } + + /** + * {@inheritdoc} + */ + public function getConvertedAt() + { + return $this->_getData('converted_at'); + } + + /** + * {@inheritdoc} + */ + public function getIsActive() + { + return $this->_getData('is_active'); + } + + /** + * {@inheritdoc} + */ + public function getItemsCount() + { + return $this->_getData('items_count'); + } + + /** + * {@inheritdoc} + */ + public function getItemsQty() + { + return $this->_getData('items_qty'); + } + + /** + * {@inheritdoc} + */ + public function getOrigOrderId() + { + return $this->_getData('orig_order_id'); + + } + + /** + * {@inheritdoc} + */ + public function getReservedOrderId() + { + return $this->_getData('reserved_order_id'); + } + + /** + * {@inheritdoc} + */ + public function getCustomerIsGuest() + { + return $this->_getData('customer_is_guest'); + } + + /** + * {@inheritdoc} + */ + public function getCustomerNote() + { + return $this->_getData('customer_note'); + } + + /** + * {@inheritdoc} + */ + public function getCustomerNoteNotify() + { + return $this->_getData('customer_note_notify'); + } + /** * Get quote store identifier * @@ -786,9 +900,7 @@ class Quote extends \Magento\Framework\Model\AbstractModel } /** - * Get customer tax class ID. - * - * @return string + * {@inheritdoc} */ public function getCustomerTaxClassId() { @@ -1735,6 +1847,20 @@ class Quote extends \Magento\Framework\Model\AbstractModel return $this; } + /** + * {@inheritdoc} + */ + public function getTotalsObject() + { + // TODO: refactor to getTotals() + $shippingAddress = $this->getShippingAddress(); + $totals = array_merge($shippingAddress->getData(), $this->getData()); + $this->totalsBuilder->populateWithArray($totals); + $this->totalsBuilder->setItems($this->getAllItems()); + + return $this->totalsBuilder->create(); + } + /** * Get all quote totals (sorted by priority) * Method process quote states isVirtual and isMultiShipping diff --git a/app/code/Magento/Quote/Model/QuoteRepository.php b/app/code/Magento/Quote/Model/QuoteRepository.php index 17c845eeecb..82c02292af6 100644 --- a/app/code/Magento/Quote/Model/QuoteRepository.php +++ b/app/code/Magento/Quote/Model/QuoteRepository.php @@ -80,7 +80,7 @@ class QuoteRepository implements \Magento\Quote\Api\CartRepositoryInterface * @param int $cartId * @param int[] $sharedStoreIds * @throws NoSuchEntityException - * @return Quote + * @return \Magento\Quote\Api\Data\CartInterface */ public function get($cartId, array $sharedStoreIds = []) { diff --git a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php index 501ecf79f6a..ee8a4777052 100644 --- a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php @@ -78,9 +78,9 @@ class CartManagementInterfaceTest extends WebapiAbstract 'httpMethod' => RestConfig::HTTP_METHOD_PUT, ], 'soap' => [ - 'service' => 'checkoutCartWriteServiceV1', + 'service' => self::SERVICE_NAME, 'serviceVersion' => 'V1', - 'operation' => 'checkoutCartWriteServiceV1AssignCustomer', + 'operation' => self::SERVICE_NAME . 'AssignCustomer', ], ]; @@ -114,8 +114,8 @@ class CartManagementInterfaceTest extends WebapiAbstract $serviceInfo = [ 'soap' => [ 'serviceVersion' => 'V1', - 'service' => 'checkoutCartWriteServiceV1', - 'operation' => 'checkoutCartWriteServiceV1AssignCustomer', + 'service' => self::SERVICE_NAME, + 'operation' => self::SERVICE_NAME . 'AssignCustomer', ], 'rest' => [ 'resourcePath' => '/V1/carts/' . $cartId, @@ -141,9 +141,9 @@ class CartManagementInterfaceTest extends WebapiAbstract $customerId = 1; $serviceInfo = [ 'soap' => [ - 'service' => 'checkoutCartWriteServiceV1', + 'service' => self::SERVICE_NAME, 'serviceVersion' => 'V1', - 'operation' => 'checkoutCartWriteServiceV1AssignCustomer', + 'operation' => self::SERVICE_NAME . 'AssignCustomer', ], 'rest' => [ 'resourcePath' => '/V1/carts/' . $cartId, @@ -179,9 +179,9 @@ class CartManagementInterfaceTest extends WebapiAbstract 'resourcePath' => '/V1/carts/' . $cartId, ], 'soap' => [ - 'service' => 'checkoutCartWriteServiceV1', + 'service' => self::SERVICE_NAME, 'serviceVersion' => 'V1', - 'operation' => 'checkoutCartWriteServiceV1AssignCustomer', + 'operation' => self::SERVICE_NAME . 'AssignCustomer', ], ]; @@ -212,9 +212,9 @@ class CartManagementInterfaceTest extends WebapiAbstract $serviceInfo = [ 'soap' => [ - 'service' => 'checkoutCartWriteServiceV1', + 'service' => self::SERVICE_NAME, 'serviceVersion' => 'V1', - 'operation' => 'checkoutCartWriteServiceV1AssignCustomer', + 'operation' => self::SERVICE_NAME . 'AssignCustomer', ], 'rest' => [ 'httpMethod' => RestConfig::HTTP_METHOD_PUT, @@ -253,8 +253,8 @@ class CartManagementInterfaceTest extends WebapiAbstract $serviceInfo = [ 'soap' => [ - 'service' => 'checkoutCartWriteServiceV1', - 'operation' => 'checkoutCartWriteServiceV1AssignCustomer', + 'service' => self::SERVICE_NAME, + 'operation' => self::SERVICE_NAME . 'AssignCustomer', 'serviceVersion' => 'V1', ], 'rest' => [ diff --git a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php index c30599ebdb5..e82402f02a8 100644 --- a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php @@ -104,19 +104,17 @@ class CartRepositoryInterfaceTest extends WebapiAbstract $this->assertEquals($cart->getId(), $cartData['id']); $this->assertEquals($cart->getCreatedAt(), $cartData['created_at']); $this->assertEquals($cart->getUpdatedAt(), $cartData['updated_at']); - //this check will be uncommented when all cart related services are ready -// $this->assertEquals($cart->getStoreId(), $cartData['store_id']); $this->assertEquals($cart->getIsActive(), $cartData['is_active']); $this->assertEquals($cart->getIsVirtual(), $cartData['is_virtual']); $this->assertEquals($cart->getOrigOrderId(), $cartData['orig_order_id']); $this->assertEquals($cart->getItemsCount(), $cartData['items_count']); $this->assertEquals($cart->getItemsQty(), $cartData['items_qty']); //following checks will be uncommented when all cart related services are ready -// $this->assertContains('customer', $cartData); -// $this->assertEquals(1, $cartData['customer']['is_guest']); -// $this->assertContains('totals', $cartData); -// $this->assertEquals($cart->getSubtotal(), $cartData['totals']['subtotal']); -// $this->assertEquals($cart->getGrandTotal(), $cartData['totals']['grand_total']); + $this->assertContains('customer', $cartData); + $this->assertEquals(true, $cartData['customer_is_guest']); + $this->assertContains('totals_object', $cartData); + $this->assertEquals($cart->getSubtotal(), $cartData['totals_object']['subtotal']); + $this->assertEquals($cart->getGrandTotal(), $cartData['totals_object']['grand_total']); // $this->assertContains('currency', $cartData); // $this->assertEquals($cart->getGlobalCurrencyCode(), $cartData['currency']['global_currency_code']); // $this->assertEquals($cart->getBaseCurrencyCode(), $cartData['currency']['base_currency_code']); -- GitLab From d81f831efc1debf8d1eb614f3ed44d1811aea4a9 Mon Sep 17 00:00:00 2001 From: Serhiy Shkolyarenko <sshkolyarenko@ebay.com> Date: Mon, 19 Jan 2015 20:30:05 +0200 Subject: [PATCH 070/114] MAGETWO-32501: Implement Cart Service interfaces removed deprecated tests --- .../Service/V1/Cart/ReadServiceTest.php | 296 ------------ .../Quote/Api/CartManagementInterfaceTest.php | 4 +- .../Quote/Api/CartRepositoryInterfaceTest.php | 24 +- .../Service/V1/Cart/ReadServiceTest.php | 192 -------- .../Service/V1/Cart/WriteServiceTest.php | 425 ------------------ 5 files changed, 13 insertions(+), 928 deletions(-) delete mode 100644 dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/WriteServiceTest.php diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php deleted file mode 100644 index c5f621411d6..00000000000 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php +++ /dev/null @@ -1,296 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Cart; - -use Magento\Checkout\Service\V1\Data\Cart; -use Magento\Framework\Api\FilterBuilder; -use Magento\Framework\Api\SearchCriteria; -use Magento\Framework\Api\SearchCriteriaBuilder; -use Magento\TestFramework\ObjectManager; -use Magento\TestFramework\TestCase\WebapiAbstract; -use Magento\Webapi\Model\Rest\Config as RestConfig; - -class ReadServiceTest extends WebapiAbstract -{ - /** - * @var ObjectManager - */ - private $objectManager; - - /** - * @var SearchCriteriaBuilder - */ - private $searchBuilder; - - /** - * @var SortOrderBuilder - */ - private $sortOrderBuilder; - - /** - * @var FilterBuilder - */ - private $filterBuilder; - - protected function setUp() - { - $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->filterBuilder = $this->objectManager->create( - 'Magento\Framework\Api\FilterBuilder' - ); - $this->sortOrderBuilder = $this->objectManager->create( - 'Magento\Framework\Api\SortOrderBuilder' - ); - $this->searchBuilder = $this->objectManager->create( - 'Magento\Framework\Api\SearchCriteriaBuilder' - ); - } - - protected function tearDown() - { - try { - $cart = $this->getCart('test01'); - $cart->delete(); - } catch (\InvalidArgumentException $e) { - // Do nothing if cart fixture was not used - } - parent::tearDown(); - } - - /** - * Retrieve quote by given reserved order ID - * - * @param string $reservedOrderId - * @return \Magento\Quote\Model\Quote - * @throws \InvalidArgumentException - */ - protected function getCart($reservedOrderId) - { - /** @var $cart \Magento\Quote\Model\Quote */ - $cart = $this->objectManager->get('Magento\Quote\Model\Quote'); - $cart->load($reservedOrderId, 'reserved_order_id'); - if (!$cart->getId()) { - throw new \InvalidArgumentException('There is no quote with provided reserved order ID.'); - } - return $cart; - } - - /** - * @magentoApiDataFixture Magento/Sales/_files/quote.php - */ - public function testGetCart() - { - $cart = $this->getCart('test01'); - $cartId = $cart->getId(); - - $serviceInfo = [ - 'rest' => [ - 'resourcePath' => '/V1/carts/' . $cartId, - 'httpMethod' => RestConfig::HTTP_METHOD_GET, - ], - 'soap' => [ - 'service' => 'checkoutCartReadServiceV1', - 'serviceVersion' => 'V1', - 'operation' => 'checkoutCartReadServiceV1GetCart', - ], - ]; - - $requestData = ['cartId' => $cartId]; - $cartData = $this->_webApiCall($serviceInfo, $requestData); - $this->assertEquals($cart->getId(), $cartData['id']); - $this->assertEquals($cart->getCreatedAt(), $cartData['created_at']); - $this->assertEquals($cart->getUpdatedAt(), $cartData['updated_at']); - $this->assertEquals($cart->getStoreId(), $cartData['store_id']); - $this->assertEquals($cart->getIsActive(), $cartData['is_active']); - $this->assertEquals($cart->getIsVirtual(), $cartData['is_virtual']); - $this->assertEquals($cart->getOrigOrderId(), $cartData['orig_order_id']); - $this->assertEquals($cart->getItemsCount(), $cartData['items_count']); - $this->assertEquals($cart->getItemsQty(), $cartData['items_qty']); - - $this->assertContains('customer', $cartData); - $this->assertEquals(1, $cartData['customer']['is_guest']); - $this->assertContains('totals', $cartData); - $this->assertEquals($cart->getSubtotal(), $cartData['totals']['subtotal']); - $this->assertEquals($cart->getGrandTotal(), $cartData['totals']['grand_total']); - $this->assertContains('currency', $cartData); - $this->assertEquals($cart->getGlobalCurrencyCode(), $cartData['currency']['global_currency_code']); - $this->assertEquals($cart->getBaseCurrencyCode(), $cartData['currency']['base_currency_code']); - $this->assertEquals($cart->getQuoteCurrencyCode(), $cartData['currency']['quote_currency_code']); - $this->assertEquals($cart->getStoreCurrencyCode(), $cartData['currency']['store_currency_code']); - $this->assertEquals($cart->getBaseToGlobalRate(), $cartData['currency']['base_to_global_rate']); - $this->assertEquals($cart->getBaseToQuoteRate(), $cartData['currency']['base_to_quote_rate']); - $this->assertEquals($cart->getStoreToBaseRate(), $cartData['currency']['store_to_base_rate']); - $this->assertEquals($cart->getStoreToQuoteRate(), $cartData['currency']['store_to_quote_rate']); - } - - /** - * @expectedException \Exception - * @expectedExceptionMessage No such entity with - */ - public function testGetCartThrowsExceptionIfThereIsNoCartWithProvidedId() - { - $cartId = 9999; - - $serviceInfo = [ - 'soap' => [ - 'service' => 'checkoutCartReadServiceV1', - 'serviceVersion' => 'V1', - 'operation' => 'checkoutCartReadServiceV1GetCart', - ], - 'rest' => [ - 'resourcePath' => '/V1/carts/' . $cartId, - 'httpMethod' => RestConfig::HTTP_METHOD_GET, - ], - ]; - - $requestData = ['cartId' => $cartId]; - $this->_webApiCall($serviceInfo, $requestData); - } - - /** - * @magentoApiDataFixture Magento/Sales/_files/quote_with_customer.php - */ - public function testGetCartForCustomer() - { - $cart = $this->getCart('test01'); - $customerId = $cart->getCustomer()->getId(); - - $serviceInfo = [ - 'rest' => [ - 'resourcePath' => '/V1/customer/' . $customerId . '/cart', - 'httpMethod' => RestConfig::HTTP_METHOD_GET, - ], - 'soap' => [ - 'service' => 'checkoutCartReadServiceV1', - 'serviceVersion' => 'V1', - 'operation' => 'checkoutCartReadServiceV1GetCartForCustomer', - ], - ]; - - $requestData = ['customerId' => $customerId]; - $cartData = $this->_webApiCall($serviceInfo, $requestData); - $this->assertEquals($cart->getId(), $cartData['id']); - $this->assertEquals($cart->getCreatedAt(), $cartData['created_at']); - $this->assertEquals($cart->getUpdatedAt(), $cartData['updated_at']); - $this->assertEquals($cart->getStoreId(), $cartData['store_id']); - $this->assertEquals($cart->getIsActive(), $cartData['is_active']); - $this->assertEquals($cart->getIsVirtual(), $cartData['is_virtual']); - $this->assertEquals($cart->getOrigOrderId(), $cartData['orig_order_id']); - $this->assertEquals($cart->getItemsCount(), $cartData['items_count']); - $this->assertEquals($cart->getItemsQty(), $cartData['items_qty']); - - $this->assertContains('customer', $cartData); - $this->assertEquals(0, $cartData['customer']['is_guest']); - $this->assertContains('totals', $cartData); - $this->assertEquals($cart->getSubtotal(), $cartData['totals']['subtotal']); - $this->assertEquals($cart->getGrandTotal(), $cartData['totals']['grand_total']); - $this->assertContains('currency', $cartData); - $this->assertEquals($cart->getGlobalCurrencyCode(), $cartData['currency']['global_currency_code']); - $this->assertEquals($cart->getBaseCurrencyCode(), $cartData['currency']['base_currency_code']); - $this->assertEquals($cart->getQuoteCurrencyCode(), $cartData['currency']['quote_currency_code']); - $this->assertEquals($cart->getStoreCurrencyCode(), $cartData['currency']['store_currency_code']); - $this->assertEquals($cart->getBaseToGlobalRate(), $cartData['currency']['base_to_global_rate']); - $this->assertEquals($cart->getBaseToQuoteRate(), $cartData['currency']['base_to_quote_rate']); - $this->assertEquals($cart->getStoreToBaseRate(), $cartData['currency']['store_to_base_rate']); - $this->assertEquals($cart->getStoreToQuoteRate(), $cartData['currency']['store_to_quote_rate']); - } - - /** - * @magentoApiDataFixture Magento/Sales/_files/quote.php - */ - public function testGetCartList() - { - $cart = $this->getCart('test01'); - - // The following two filters are used as alternatives. The target cart does not match the first one. - $grandTotalFilter = $this->filterBuilder->setField('grand_total') - ->setConditionType('gteq') - ->setValue(15) - ->create(); - $subtotalFilter = $this->filterBuilder->setField('subtotal') - ->setConditionType('eq') - ->setValue($cart->getSubtotal()) - ->create(); - - $yesterdayDate = (new \DateTime())->sub(new \DateInterval('P1D'))->format('Y-m-d'); - $tomorrowDate = (new \DateTime())->add(new \DateInterval('P1D'))->format('Y-m-d'); - $minCreatedAtFilter = $this->filterBuilder->setField(Cart::CREATED_AT) - ->setConditionType('gteq') - ->setValue($yesterdayDate) - ->create(); - $maxCreatedAtFilter = $this->filterBuilder->setField(Cart::CREATED_AT) - ->setConditionType('lteq') - ->setValue($tomorrowDate) - ->create(); - - $this->searchBuilder->addFilter([$grandTotalFilter, $subtotalFilter]); - $this->searchBuilder->addFilter([$minCreatedAtFilter]); - $this->searchBuilder->addFilter([$maxCreatedAtFilter]); - /** @var SortOrder $sortOrder */ - $sortOrder = $this->sortOrderBuilder->setField('subtotal')->setDirection(SearchCriteria::SORT_ASC)->create(); - $this->searchBuilder->setSortOrders([$sortOrder]); - $searchCriteria = $this->searchBuilder->create()->__toArray(); - - $requestData = ['searchCriteria' => $searchCriteria]; - $serviceInfo = [ - 'rest' => [ - 'resourcePath' => '/V1/carts' . '?' . http_build_query($requestData), - 'httpMethod' => RestConfig::HTTP_METHOD_GET, - ], - 'soap' => [ - 'service' => 'checkoutCartReadServiceV1', - 'serviceVersion' => 'V1', - 'operation' => 'checkoutCartReadServiceV1GetCartList', - ], - ]; - $searchResult = $this->_webApiCall($serviceInfo, $requestData); - $this->assertArrayHasKey('total_count', $searchResult); - $this->assertEquals(1, $searchResult['total_count']); - $this->assertArrayHasKey('items', $searchResult); - $this->assertCount(1, $searchResult['items']); - - $cartData = $searchResult['items'][0]; - $this->assertEquals($cart->getId(), $cartData['id']); - $this->assertEquals($cart->getCreatedAt(), $cartData['created_at']); - $this->assertEquals($cart->getUpdatedAt(), $cartData['updated_at']); - $this->assertEquals($cart->getIsActive(), $cartData['is_active']); - $this->assertEquals($cart->getStoreId(), $cartData['store_id']); - - $this->assertContains('totals', $cartData); - $this->assertEquals($cart->getBaseSubtotal(), $cartData['totals']['base_subtotal']); - $this->assertEquals($cart->getBaseGrandTotal(), $cartData['totals']['base_grand_total']); - $this->assertContains('customer', $cartData); - $this->assertEquals(1, $cartData['customer']['is_guest']); - } - - /** - * @expectedException \Exception - * @expectedExceptionMessage Field 'invalid_field' cannot be used for search. - */ - public function testGetCartListThrowsExceptionIfProvidedSearchFieldIsInvalid() - { - $invalidFilter = $this->filterBuilder->setField('invalid_field') - ->setConditionType('eq') - ->setValue(0) - ->create(); - - $this->searchBuilder->addFilter([$invalidFilter]); - $searchCriteria = $this->searchBuilder->create()->__toArray(); - $requestData = ['searchCriteria' => $searchCriteria]; - $serviceInfo = [ - 'soap' => [ - 'service' => 'checkoutCartReadServiceV1', - 'serviceVersion' => 'V1', - 'operation' => 'checkoutCartReadServiceV1GetCartList', - ], - 'rest' => [ - 'resourcePath' => '/V1/carts' . '?' . http_build_query($requestData), - 'httpMethod' => RestConfig::HTTP_METHOD_GET, - ], - ]; - $this->_webApiCall($serviceInfo, $requestData); - } -} diff --git a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php index ee8a4777052..9d13c67cf34 100644 --- a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php @@ -282,8 +282,8 @@ class CartManagementInterfaceTest extends WebapiAbstract $serviceInfo = [ 'soap' => [ - 'service' => 'quoteQuoteManagementV1', - 'operation' => 'quoteQuoteManagementV1PlaceOrder', + 'service' => 'quoteCartManagementV1', + 'operation' => 'quoteCartManagementV1PlaceOrder', 'serviceVersion' => 'V1', ], 'rest' => [ diff --git a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php index e82402f02a8..2e65020f8f1 100644 --- a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php @@ -95,7 +95,7 @@ class CartRepositoryInterfaceTest extends WebapiAbstract 'soap' => [ 'service' => 'quoteCartRepositoryV1', 'serviceVersion' => 'V1', - 'operation' => 'quoteCartRepositoryV1GetCart', + 'operation' => 'quoteCartRepositoryV1Get', ], ]; @@ -138,7 +138,7 @@ class CartRepositoryInterfaceTest extends WebapiAbstract 'soap' => [ 'service' => 'quoteCartRepositoryV1', 'serviceVersion' => 'V1', - 'operation' => 'quoteCartRepositoryV1GetCart', + 'operation' => 'quoteCartRepositoryV1Get', ], 'rest' => [ 'resourcePath' => '/V1/carts/' . $cartId, @@ -153,7 +153,7 @@ class CartRepositoryInterfaceTest extends WebapiAbstract /** * @magentoApiDataFixture Magento/Sales/_files/quote.php */ - public function testGetCartList() + public function testGetList() { $cart = $this->getCart('test01'); @@ -165,7 +165,7 @@ class CartRepositoryInterfaceTest extends WebapiAbstract 'soap' => [ 'service' => 'quoteCartRepositoryV1', 'serviceVersion' => 'V1', - 'operation' => 'quoteCartRepositoryV1GetCartList', + 'operation' => 'quoteCartRepositoryV1GetList', ], ]; @@ -210,26 +210,24 @@ class CartRepositoryInterfaceTest extends WebapiAbstract $this->assertEquals($cart->getCreatedAt(), $cartData['created_at']); $this->assertEquals($cart->getUpdatedAt(), $cartData['updated_at']); $this->assertEquals($cart->getIsActive(), $cartData['is_active']); - //following checks will be uncommented when all cart related services are ready -// $this->assertEquals($cart->getStoreId(), $cartData['store_id']); -// $this->assertContains('totals', $cartData); -// $this->assertEquals($cart->getBaseSubtotal(), $cartData['totals']['base_subtotal']); -// $this->assertEquals($cart->getBaseGrandTotal(), $cartData['totals']['base_grand_total']); -// $this->assertContains('customer', $cartData); -// $this->assertEquals(1, $cartData['customer']['is_guest']); + $this->assertContains('totals_object', $cartData); + $this->assertEquals($cart->getBaseSubtotal(), $cartData['totals_object']['base_subtotal']); + $this->assertEquals($cart->getBaseGrandTotal(), $cartData['totals_object']['base_grand_total']); + $this->assertContains('customer_is_guest', $cartData); + $this->assertEquals(1, $cartData['customer_is_guest']); } /** * @expectedException \Exception */ - public function testGetCartListThrowsExceptionIfProvidedSearchFieldIsInvalid() + public function testGetListThrowsExceptionIfProvidedSearchFieldIsInvalid() { $serviceInfo = [ 'soap' => [ 'service' => 'quoteCartRepositoryV1', 'serviceVersion' => 'V1', - 'operation' => 'quoteCartRepositoryV1GetCartList', + 'operation' => 'quoteCartRepositoryV1GetList', ], 'rest' => [ 'resourcePath' => '/V1/carts', diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php deleted file mode 100644 index 7693baca491..00000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php +++ /dev/null @@ -1,192 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Cart; - -use Magento\Framework\Api\SearchCriteria; - -/** - * @SuppressWarnings(PHPMD.TooManyFields) - */ -class ReadServiceTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var ReadService - */ - protected $service; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteRepositoryMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteCollectionMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $searchResultsBuilderMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $cartMapperMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteMock; - - protected function setUp() - { - $this->markTestSkipped('Checkout API'); - $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); - $methods = [ - 'getId', 'getStoreId', 'getCreatedAt', 'getUpdatedAt', 'getConvertedAt', - 'getIsActive', 'getIsVirtual', 'getItemsCount', 'getItemsQty', 'getCheckoutMethod', 'getReservedOrderId', - 'getOrigOrderId', 'getBaseGrandTotal', 'getBaseSubtotal', 'getSubtotal', 'getBaseSubtotalWithDiscount', - 'getSubtotalWithDiscount', 'getCustomerId', 'getCustomerEmail', 'getCustomerGroupId', - 'getCustomerTaxClassId', 'getCustomerPrefix', 'getCustomerFirstname', 'getCustomerMiddlename', - 'getCustomerLastname', 'getCustomerSuffix', 'getCustomerDob', 'getCustomerNote', 'getCustomerNoteNotify', - 'getCustomerIsGuest', 'getCustomerGender', 'getCustomerTaxvat', '__wakeup', 'load', 'getGrandTotal', - 'getGlobalCurrencyCode', 'getBaseCurrencyCode', 'getStoreCurrencyCode', 'getQuoteCurrencyCode', - 'getStoreToBaseRate', 'getStoreToQuoteRate', 'getBaseToGlobalRate', 'getBaseToQuoteRate', 'setStoreId', - 'getShippingAddress', 'getAllItems', - ]; - $this->quoteMock = $this->getMock('\Magento\Quote\Model\Quote', $methods, [], '', false); - $this->quoteCollectionMock = $objectManager->getCollectionMock( - 'Magento\Quote\Model\Resource\Quote\Collection', [$this->quoteMock]); - $this->searchResultsBuilderMock = - $this->getMock('\Magento\Checkout\Service\V1\Data\CartSearchResultsBuilder', [], [], '', false); - $this->cartMapperMock = $this->getMock('\Magento\Checkout\Service\V1\Data\CartMapper', ['map'], [], '', false); - - $this->service = new ReadService( - $this->quoteRepositoryMock, - $this->quoteCollectionMock, - $this->searchResultsBuilderMock, - $this->cartMapperMock - ); - } - - public function testGetCart() - { - $cartId = 12; - $this->quoteRepositoryMock->expects($this->once())->method('getActive')->with($cartId) - ->will($this->returnValue($this->quoteMock)); - - $this->cartMapperMock->expects($this->once())->method('map')->with($this->quoteMock); - - $this->service->getCart($cartId); - } - - public function testGetCartForCustomer() - { - $customerId = 12; - $this->quoteRepositoryMock->expects($this->once())->method('getActiveForCustomer')->with($customerId) - ->will($this->returnValue($this->quoteMock)); - - $this->cartMapperMock->expects($this->once())->method('map')->with($this->quoteMock); - - $this->service->getCartForCustomer($customerId); - } - - /** - * @param int $direction - * @param string $expected - * @dataProvider getCartListSuccessDataProvider - */ - public function testGetCartListSuccess($direction, $expected) - { - $searchResult = $this->getMock('\Magento\Checkout\Service\V1\Data\CartSearchResults', [], [], '', false); - $searchCriteriaMock = $this->getMock('\Magento\Framework\Api\SearchCriteria', [], [], '', false); - - $cartMock = $this->getMock('Magento\Payment\Model\Cart', [], [], '', false); - $this->searchResultsBuilderMock - ->expects($this->once()) - ->method('setSearchCriteria') - ->will($this->returnValue($searchCriteriaMock)); - $filterGroupMock = $this->getMock('\Magento\Framework\Api\Search\FilterGroup', [], [], '', false); - $searchCriteriaMock - ->expects($this->any()) - ->method('getFilterGroups') - ->will($this->returnValue([$filterGroupMock])); - - $filterMock = $this->getMock('\Magento\Framework\Api\Filter', [], [], '', false); - $filterGroupMock->expects($this->any())->method('getFilters')->will($this->returnValue([$filterMock])); - $filterMock->expects($this->once())->method('getField')->will($this->returnValue('store_id')); - $filterMock->expects($this->any())->method('getConditionType')->will($this->returnValue('eq')); - $filterMock->expects($this->once())->method('getValue')->will($this->returnValue('filter_value')); - $this->quoteCollectionMock - ->expects($this->once()) - ->method('addFieldToFilter') - ->with(['store_id'], [0 => ['eq' => 'filter_value']]); - - $this->quoteCollectionMock->expects($this->once())->method('getSize')->will($this->returnValue(10)); - $this->searchResultsBuilderMock->expects($this->once())->method('setTotalCount')->with(10); - $sortOrderMock = $this->getMockBuilder('Magento\Framework\Api\SortOrder') - ->setMethods(['getField', 'getDirection']) - ->disableOriginalConstructor() - ->getMock(); - $sortOrderMock->expects($this->once())->method('getField')->will($this->returnValue('id')); - $sortOrderMock->expects($this->once())->method('getDirection')->will($this->returnValue($direction)); - $searchCriteriaMock - ->expects($this->once()) - ->method('getSortOrders') - ->will($this->returnValue([$sortOrderMock])); - $this->quoteCollectionMock->expects($this->once())->method('addOrder')->with('entity_id', $expected); - $searchCriteriaMock->expects($this->once())->method('getCurrentPage')->will($this->returnValue(1)); - $searchCriteriaMock->expects($this->once())->method('getPageSize')->will($this->returnValue(10)); - - $this->cartMapperMock->expects($this->once())->method('map')->with($this->quoteMock) - ->will($this->returnValue($cartMock)); - - $this->searchResultsBuilderMock->expects($this->once())->method('setItems')->with([$cartMock]); - $this->searchResultsBuilderMock - ->expects($this->once()) - ->method('create') - ->will($this->returnValue($searchResult)); - $this->assertEquals($searchResult, $this->service->getCartList($searchCriteriaMock)); - } - - /** - * @expectedException \Magento\Framework\Exception\InputException - * @expectedExceptionMessage Field 'any_value' cannot be used for search. - */ - public function testGetCartListWithNotExistingField() - { - $searchCriteriaMock = $this->getMock('\Magento\Framework\Api\SearchCriteria', [], [], '', false); - $this->searchResultsBuilderMock - ->expects($this->once()) - ->method('setSearchCriteria') - ->will($this->returnValue($searchCriteriaMock)); - - $filterGroupMock = $this->getMock('\Magento\Framework\Api\Search\FilterGroup', [], [], '', false); - $searchCriteriaMock - ->expects($this->any()) - ->method('getFilterGroups') - ->will($this->returnValue([$filterGroupMock])); - $filterMock = $this->getMock('\Magento\Framework\Api\Filter', [], [], '', false); - $filterGroupMock->expects($this->any())->method('getFilters')->will($this->returnValue([$filterMock])); - $filterMock->expects($this->once())->method('getField')->will($this->returnValue('any_value')); - $filterMock->expects($this->never())->method('getConditionType'); - $this->service->getCartList($searchCriteriaMock); - } - - /** - * @return array - */ - public function getCartListSuccessDataProvider() - { - return [ - 'asc' => [SearchCriteria::SORT_ASC, 'ASC'], - 'desc' => [SearchCriteria::SORT_DESC, 'DESC'] - ]; - } -} diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/WriteServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/WriteServiceTest.php deleted file mode 100644 index 799807fdee9..00000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/WriteServiceTest.php +++ /dev/null @@ -1,425 +0,0 @@ -<?php -/** - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Cart; - -use Magento\Framework\Exception\CouldNotSaveException; -use Magento\TestFramework\Helper\ObjectManager; - -/** - * Class WriteServiceTest - */ -class WriteServiceTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Checkout\Service\V1\Cart\WriteService - */ - protected $service; - - /** - * @var \Magento\TestFramework\Helper\ObjectManager - */ - protected $objectManager; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $storeManagerMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $storeMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteRepositoryMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $userContextMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteServiceFactory; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $customerRepositoryMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $customerFactoryMock; - - public function setUp() - { - $this->markTestSkipped('Checkout API'); - $this->objectManager = new ObjectManager($this); - $this->storeManagerMock = $this->getMock('\Magento\Store\Model\StoreManagerInterface'); - $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); - $this->userContextMock = $this->getMock('\Magento\Authorization\Model\UserContextInterface'); - - $this->storeMock = $this->getMock('\Magento\Store\Model\Store', [], [], '', false); - $this->quoteMock = - $this->getMock('\Magento\Quote\Model\Quote', - [ - 'setStoreId', - 'getId', - 'getStoreId', - 'getCustomerId', - 'setCustomer', - 'setCustomerIsGuest', - '__wakeup', - ], - [], '', false); - - $this->customerRepositoryMock = $this->getMock( - '\Magento\Customer\Api\CustomerRepositoryInterface', [], [], '', false - ); - - $this->customerFactoryMock = $this->getMock( - 'Magento\Customer\Model\CustomerFactory', - ['create'], - [], - '', - false - ); - - $this->quoteServiceFactory = $this->getMock( - 'Magento\Quote\Model\QuoteManagement', - [], - [], - '', - false - ); - $this->service = $this->objectManager->getObject( - 'Magento\Checkout\Service\V1\Cart\WriteService', - [ - 'storeManager' => $this->storeManagerMock, - 'customerRepository' => $this->customerRepositoryMock, - 'quoteRepository' => $this->quoteRepositoryMock, - 'userContext' => $this->userContextMock, - 'quoteServiceFactory' => $this->quoteServiceFactory, - 'customerModelFactory' => $this->customerFactoryMock - ] - ); - } - - public function testCreateAnonymousCart() - { - $storeId = 345; - - $this->userContextMock->expects($this->once())->method('getUserType') - ->willReturn(\Magento\Authorization\Model\UserContextInterface::USER_TYPE_ADMIN); - $this->storeManagerMock->expects($this->once()) - ->method('getStore') - ->will($this->returnValue($this->storeMock)); - $this->storeMock->expects($this->once()) - ->method('getId') - ->will($this->returnValue($storeId)); - - $this->quoteRepositoryMock->expects($this->once())->method('create')->willReturn($this->quoteMock); - $this->quoteMock->expects($this->once())->method('setStoreId')->with($storeId); - $this->quoteRepositoryMock->expects($this->once())->method('save')->with($this->quoteMock); - $this->quoteMock->expects($this->once())->method('getId')->willReturn(100); - $this->assertEquals(100, $this->service->create()); - } - - /** - * @expectedException \Magento\Framework\Exception\CouldNotSaveException - * @expectedExceptionMessage Cannot create quote - */ - public function testCreateCustomerCartWhenCustomerHasActiveCart() - { - $storeId = 345; - $userId = 50; - - $customerMock = $this->getMockForAbstractClass( - 'Magento\Customer\Api\Data\CustomerInterface', - [], - '', - false - ); - $this->customerRepositoryMock->expects($this->once()) - ->method('getById') - ->with($userId) - ->will($this->returnValue($customerMock)); - - $this->userContextMock->expects($this->once())->method('getUserType') - ->willReturn(\Magento\Authorization\Model\UserContextInterface::USER_TYPE_CUSTOMER); - $this->userContextMock->expects($this->any())->method('getUserId')->willReturn($userId); - $this->storeManagerMock->expects($this->once()) - ->method('getStore') - ->will($this->returnValue($this->storeMock)); - $this->storeMock->expects($this->once())->method('getId')->will($this->returnValue($storeId)); - - $customerQuoteMock = $this->getMock('\Magento\Quote\Model\Quote', - [ - 'getIsActive', - 'getId', - '__wakeup' - ], - [], - '', - false - ); - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActiveForCustomer') - ->with($userId) - ->willReturn($customerQuoteMock); - $this->quoteRepositoryMock->expects($this->never())->method('save')->with($this->quoteMock); - - $this->service->create(); - } - - public function testCreateCustomerCart() - { - $storeId = 345; - $userId = 50; - - $customerMock = $this->getMockForAbstractClass( - 'Magento\Customer\Api\Data\CustomerInterface', - [], - '', - false - ); - $this->customerRepositoryMock->expects($this->once()) - ->method('getById')->with($userId)->will($this->returnValue($customerMock)); - $this->userContextMock->expects($this->once())->method('getUserType') - ->willReturn(\Magento\Authorization\Model\UserContextInterface::USER_TYPE_CUSTOMER); - $this->userContextMock->expects($this->any())->method('getUserId')->willReturn($userId); - $this->storeManagerMock->expects($this->once()) - ->method('getStore') - ->will($this->returnValue($this->storeMock)); - $this->storeMock->expects($this->once())->method('getId')->will($this->returnValue($storeId)); - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActiveForCustomer') - ->with($userId) - ->willThrowException(new \Magento\Framework\Exception\NoSuchEntityException()); - $this->quoteRepositoryMock->expects($this->once())->method('create')->willReturn($this->quoteMock); - - $this->quoteMock->expects($this->once())->method('setStoreId')->with($storeId); - $this->quoteMock->expects($this->once())->method('setCustomer')->with($customerMock); - $this->quoteMock->expects($this->once())->method('setCustomerIsGuest')->with(0); - $this->quoteRepositoryMock->expects($this->once())->method('save')->with($this->quoteMock); - $this->quoteMock->expects($this->once())->method('getId')->willReturn(100); - $this->assertEquals(100, $this->service->create()); - } - - /** - * @expectedException \Magento\Framework\Exception\CouldNotSaveException - * @expectedExceptionMessage Cannot create quote - */ - public function testCreateWithException() - { - $storeId = 345; - - $this->storeManagerMock->expects($this->once()) - ->method('getStore') - ->will($this->returnValue($this->storeMock)); - $this->storeMock->expects($this->once()) - ->method('getId') - ->will($this->returnValue($storeId)); - - $this->quoteRepositoryMock->expects($this->once()) - ->method('create') - ->will($this->returnValue($this->quoteMock)); - $this->quoteMock->expects($this->once()) - ->method('setStoreId') - ->with($storeId); - $this->quoteRepositoryMock->expects($this->once()) - ->method('save') - ->will($this->throwException(new CouldNotSaveException('Cannot create quote'))); - - $this->service->create(); - } - - /** - * @expectedException \Magento\Framework\Exception\StateException - * @expectedExceptionMessage Cannot assign customer to the given cart. The cart belongs to different store. - */ - public function testAssignCustomerStateExceptionWithStoreId() - { - $cartId = 956; - $customerId = 125; - $storeId = 12; - - $this->storeManagerMock->expects($this->once())->method('getStore')->will($this->returnValue($this->storeMock)); - $this->storeMock->expects($this->once())->method('getId')->will($this->returnValue($storeId)); - $this->quoteRepositoryMock->expects($this->once())->method('getActive')->with($cartId) - ->will($this->returnValue($this->quoteMock)); - $customerMock = $this->getMockForAbstractClass( - 'Magento\Customer\Api\Data\CustomerInterface', - [], - '', - false - ); - $this->customerRepositoryMock->expects($this->once()) - ->method('getById')->with($customerId)->will($this->returnValue($customerMock)); - $customerModelMock = $this->getMockBuilder('Magento\Customer\Model\Customer') - ->disableOriginalConstructor() - ->setMethods(['load', 'getSharedStoreIds']) - ->getMock(); - $this->customerFactoryMock->expects($this->once())->method('create')->willReturn($customerModelMock); - $customerModelMock->expects($this->once()) - ->method('load') - ->with($customerId) - ->willReturnSelf(); - $customerModelMock->expects($this->once())->method('getSharedStoreIds')->will( - $this->returnValue([11]) - ); - - $this->service->assignCustomer($cartId, $customerId); - } - - /** - * @expectedException \Magento\Framework\Exception\StateException - * @expectedExceptionMessage Cannot assign customer to the given cart. The cart is not anonymous. - */ - public function testAssignCustomerStateExceptionWithCustomerId() - { - $cartId = 956; - $customerId = 125; - $storeId = 12; - - $this->quoteRepositoryMock->expects($this->once())->method('getActive')->with($cartId) - ->will($this->returnValue($this->quoteMock)); - $this->storeManagerMock->expects($this->once())->method('getStore')->will($this->returnValue($this->storeMock)); - $this->storeMock->expects($this->once())->method('getId')->will($this->returnValue($storeId)); - $customerMock = $this->getMockForAbstractClass( - 'Magento\Customer\Api\Data\CustomerInterface', - [], - '', - false - ); - $this->customerRepositoryMock->expects($this->once()) - ->method('getById')->with($customerId)->will($this->returnValue($customerMock)); - - $customerModelMock = $this->getMockBuilder('Magento\Customer\Model\Customer') - ->disableOriginalConstructor() - ->setMethods(['load', 'getSharedStoreIds']) - ->getMock(); - $this->customerFactoryMock->expects($this->once())->method('create')->willReturn($customerModelMock); - $customerModelMock->expects($this->once()) - ->method('load') - ->with($customerId) - ->willReturnSelf(); - $customerModelMock->expects($this->once())->method('getSharedStoreIds')->will( - $this->returnValue([$storeId]) - ); - $this->quoteMock->expects($this->once())->method('getCustomerId')->will($this->returnValue($customerId)); - $this->quoteMock->expects($this->never())->method('setCustomer'); - - $this->service->assignCustomer($cartId, $customerId); - } - - /** - * @expectedException \Magento\Framework\Exception\StateException - * @expectedExceptionMessage Cannot assign customer to the given cart. Customer already has active cart. - */ - public function testAssignCustomerStateExceptionWithAlreadyAssignedCustomer() - { - $cartId = 956; - $customerId = 125; - $storeId = 12; - - $this->storeManagerMock->expects($this->once())->method('getStore')->will($this->returnValue($this->storeMock)); - $this->storeMock->expects($this->once())->method('getId')->will($this->returnValue($storeId)); - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); - - $customerModelMock = $this->getMockBuilder('Magento\Customer\Model\Customer') - ->disableOriginalConstructor() - ->setMethods(['load', 'getSharedStoreIds']) - ->getMock(); - $this->customerFactoryMock->expects($this->once())->method('create')->willReturn($customerModelMock); - $customerModelMock->expects($this->once())->method('getSharedStoreIds')->will($this->returnValue([$storeId])); - $customerModelMock->expects($this->once()) - ->method('load') - ->with($customerId) - ->willReturnSelf(); - $this->quoteMock->expects($this->once())->method('getCustomerId')->will($this->returnValue(null)); - - $customerQuoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); - $this->quoteRepositoryMock->expects($this->once()) - ->method('getForCustomer') - ->with($customerId) - ->will($this->returnValue($customerQuoteMock)); - - $this->quoteMock->expects($this->never())->method('setCustomer'); - - $this->service->assignCustomer($cartId, $customerId); - } - - public function testAssignCustomer() - { - $cartId = 956; - $customerId = 125; - $storeId = 12; - - $this->storeManagerMock->expects($this->once())->method('getStore')->will($this->returnValue($this->storeMock)); - $this->storeMock->expects($this->once())->method('getId')->will($this->returnValue($storeId)); - $this->quoteRepositoryMock->expects($this->once())->method('getActive')->with($cartId) - ->will($this->returnValue($this->quoteMock)); - $customerMock = $this->getMockForAbstractClass( - 'Magento\Customer\Api\Data\CustomerInterface', - [], - '', - false, - true, - true - ); - $this->customerRepositoryMock->expects($this->once()) - ->method('getById')->with($customerId)->will($this->returnValue($customerMock)); - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getForCustomer') - ->with($customerId) - ->willThrowException(new \Magento\Framework\Exception\NoSuchEntityException()); - - $customerModelMock = $this->getMockBuilder('Magento\Customer\Model\Customer') - ->disableOriginalConstructor() - ->setMethods(['load', 'getSharedStoreIds']) - ->getMock(); - $this->customerFactoryMock->expects($this->once())->method('create')->willReturn($customerModelMock); - $customerModelMock->expects($this->once())->method('getSharedStoreIds')->will($this->returnValue([$storeId])); - $customerModelMock->expects($this->once()) - ->method('load') - ->with($customerId) - ->willReturnSelf(); - $this->quoteMock->expects($this->once())->method('getCustomerId')->will($this->returnValue(false)); - $this->quoteMock->expects($this->once()) - ->method('setCustomer')->with($customerMock)->will($this->returnValue($this->quoteMock)); - $this->quoteMock->expects($this->once()) - ->method('setCustomerIsGuest')->with(0)->will($this->returnValue($this->quoteMock)); - $this->quoteRepositoryMock->expects($this->once())->method('save')->with($this->quoteMock); - - $this->assertTrue($this->service->assignCustomer($cartId, $customerId)); - } - - public function testOrder() - { - $cartId = 123; - $this->quoteRepositoryMock->expects($this->once())->method('getActive')->with($cartId) - ->will($this->returnValue($this->quoteMock)); - $orderMock = $this->getMock('Magento\Sales\Model\Order', [], [], '', false); - $orderMock->expects($this->any())->method('getId')->will($this->returnValue(5)); - $this->quoteServiceFactory->expects($this->once())->method('submit')->with($this->quoteMock) - ->will($this->returnValue($orderMock)); - $this->assertEquals(5, $this->service->order($cartId)); - } -} -- GitLab From 74429f2e46f51f927fda9a086fd7ced60620e855 Mon Sep 17 00:00:00 2001 From: Iryna Lagno <ilagno@ebay.com> Date: Tue, 20 Jan 2015 11:35:47 +0200 Subject: [PATCH 071/114] MAGETWO-32783: Implement Gift message related interfaces --- ...erface.php => CartRepositoryInterface.php} | 13 +- .../GiftMessage/Api/Data/MessageInterface.php | 33 +- ...erface.php => ItemRepositoryInterface.php} | 13 +- .../GiftMessage/Model/CartRepository.php | 116 ++++++ .../GiftMessage/Model/GiftMessageManager.php | 37 ++ .../GiftMessage/Model/ItemRepository.php | 128 ++++++ .../Magento/GiftMessage/Model/Message.php | 68 ++- .../GiftMessage/Service/V1/Data/Message.php | 89 ---- .../GiftMessage/Service/V1/ReadService.php | 108 ----- .../Service/V1/ReadServiceInterface.php | 34 -- .../GiftMessage/Service/V1/WriteService.php | 163 -------- .../Service/V1/WriteServiceInterface.php | 45 -- app/code/Magento/GiftMessage/etc/di.xml | 5 +- app/code/Magento/GiftMessage/etc/webapi.xml | 8 +- .../CartRepositoryTest.php} | 48 ++- .../ItemRepositoryTest.php} | 50 ++- .../Legacy/_files/obsolete_namespaces.php | 3 +- .../GiftMessage/Model/CartRepositoryTest.php | 181 ++++++++ .../Model/GiftMessageManagerTest.php | 77 ++++ .../GiftMessage/Model/ItemRepositoryTest.php | 220 ++++++++++ .../Service/V1/ReadServiceTest.php | 186 --------- .../Service/V1/WriteServiceTest.php | 388 ------------------ 22 files changed, 892 insertions(+), 1121 deletions(-) rename app/code/Magento/GiftMessage/Api/{GiftMessageRepositoryInterface.php => CartRepositoryInterface.php} (60%) rename app/code/Magento/GiftMessage/Api/{GiftMessageItemRepositoryInterface.php => ItemRepositoryInterface.php} (65%) create mode 100644 app/code/Magento/GiftMessage/Model/CartRepository.php create mode 100644 app/code/Magento/GiftMessage/Model/ItemRepository.php delete mode 100644 app/code/Magento/GiftMessage/Service/V1/Data/Message.php delete mode 100644 app/code/Magento/GiftMessage/Service/V1/ReadService.php delete mode 100644 app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php delete mode 100644 app/code/Magento/GiftMessage/Service/V1/WriteService.php delete mode 100644 app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php rename dev/tests/api-functional/testsuite/Magento/GiftMessage/{Service/V1/ReadServiceTest.php => Api/CartRepositoryTest.php} (63%) rename dev/tests/api-functional/testsuite/Magento/GiftMessage/{Service/V1/WriteServiceTest.php => Api/ItemRepositoryTest.php} (69%) create mode 100644 dev/tests/unit/testsuite/Magento/GiftMessage/Model/CartRepositoryTest.php create mode 100644 dev/tests/unit/testsuite/Magento/GiftMessage/Model/ItemRepositoryTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/GiftMessage/Service/V1/ReadServiceTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/GiftMessage/Service/V1/WriteServiceTest.php diff --git a/app/code/Magento/GiftMessage/Api/GiftMessageRepositoryInterface.php b/app/code/Magento/GiftMessage/Api/CartRepositoryInterface.php similarity index 60% rename from app/code/Magento/GiftMessage/Api/GiftMessageRepositoryInterface.php rename to app/code/Magento/GiftMessage/Api/CartRepositoryInterface.php index 02bd9d870f7..62a7916c14c 100644 --- a/app/code/Magento/GiftMessage/Api/GiftMessageRepositoryInterface.php +++ b/app/code/Magento/GiftMessage/Api/CartRepositoryInterface.php @@ -1,17 +1,17 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\GiftMessage\Api; -interface GiftMessageRepositoryInterface +interface CartRepositoryInterface { /** * Returns the gift message for a specified order. * * @param int $cartId The shopping cart ID. - * @return \Magento\GiftMessage\Service\V1\Data\Message Gift message. - * @see \Magento\GiftMessage\Service\V1\ReadServiceInterface::get + * @return \Magento\GiftMessage\Api\Data\MessageInterface Gift message. */ public function get($cartId); @@ -19,14 +19,13 @@ interface GiftMessageRepositoryInterface * Sets the gift message for an entire order. * * @param int $cartId The cart ID. - * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage The gift message. + * @param \Magento\GiftMessage\Api\Data\MessageInterface $giftMessage The gift message. * @return bool * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. * @throws \Magento\Framework\Exception\InputException You cannot add gift messages to empty carts. * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to * virtual products. * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. - * @see \Magento\GiftMessage\Service\V1\WriteServiceInterface::setForQuote */ - public function save($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage); + public function save($cartId, \Magento\GiftMessage\Api\Data\MessageInterface $giftMessage); } diff --git a/app/code/Magento/GiftMessage/Api/Data/MessageInterface.php b/app/code/Magento/GiftMessage/Api/Data/MessageInterface.php index 22bfdd4b643..876e4c7514a 100644 --- a/app/code/Magento/GiftMessage/Api/Data/MessageInterface.php +++ b/app/code/Magento/GiftMessage/Api/Data/MessageInterface.php @@ -1,39 +1,12 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\GiftMessage\Api\Data; -/** - * @see \Magento\GiftMessage\Service\V1\Data\Message - */ -interface MessageInterface +interface MessageInterface extends \Magento\Framework\Api\ExtensibleDataInterface { - /** - * Gift message ID. - */ - const GIFT_MESSAGE_ID = 'gift_message_id'; - - /** - * Sender name. - */ - const SENDER = 'sender'; - - /** - * Recipient name. - */ - const RECIPIENT = 'recipient'; - - /** - * Message text. - */ - const MESSAGE = 'message'; - - /** - * Customer ID. - */ - const CUSTOMER_ID = 'customer_id'; - /** * Returns the gift message ID. * diff --git a/app/code/Magento/GiftMessage/Api/GiftMessageItemRepositoryInterface.php b/app/code/Magento/GiftMessage/Api/ItemRepositoryInterface.php similarity index 65% rename from app/code/Magento/GiftMessage/Api/GiftMessageItemRepositoryInterface.php rename to app/code/Magento/GiftMessage/Api/ItemRepositoryInterface.php index 42df68610fe..f0141740b3e 100644 --- a/app/code/Magento/GiftMessage/Api/GiftMessageItemRepositoryInterface.php +++ b/app/code/Magento/GiftMessage/Api/ItemRepositoryInterface.php @@ -1,19 +1,19 @@ <?php /** - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. */ namespace Magento\GiftMessage\Api; -interface GiftMessageItemRepositoryInterface +interface ItemRepositoryInterface { /** * Returns the gift message for a specified item in a specified shopping cart. * * @param int $cartId The shopping cart ID. * @param int $itemId The item ID. - * @return \Magento\GiftMessage\Service\V1\Data\Message Gift message. + * @return \Magento\GiftMessage\Api\Data\MessageInterface Gift message. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item does not exist in the cart. - * @see \Magento\GiftMessage\Service\V1\ReadServiceInterface::getItemMessage */ public function get($cartId, $itemId); @@ -21,7 +21,7 @@ interface GiftMessageItemRepositoryInterface * Sets the gift message for a specified item in a specified shopping cart. * * @param int $cartId The cart ID. - * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage The gift message. + * @param \Magento\GiftMessage\Api\Data\MessageInterface $giftMessage The gift message. * @param int $itemId The item ID. * @return bool * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. @@ -29,7 +29,6 @@ interface GiftMessageItemRepositoryInterface * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to * virtual products. * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. - * @see \Magento\GiftMessage\Service\V1\WriteServiceInterface::setForItem */ - public function save($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage, $itemId); + public function save($cartId, \Magento\GiftMessage\Api\Data\MessageInterface $giftMessage, $itemId); } diff --git a/app/code/Magento/GiftMessage/Model/CartRepository.php b/app/code/Magento/GiftMessage/Model/CartRepository.php new file mode 100644 index 00000000000..528ccf78320 --- /dev/null +++ b/app/code/Magento/GiftMessage/Model/CartRepository.php @@ -0,0 +1,116 @@ +<?php +/** + * + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\GiftMessage\Model; + +use Magento\Framework\Exception\CouldNotSaveException; +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\State\InvalidTransitionException; + +/** + * Shopping cart gift message repository object. + */ +class CartRepository implements \Magento\GiftMessage\Api\CartRepositoryInterface +{ + /** + * Quote repository. + * + * @var \Magento\Quote\Model\QuoteRepository + */ + protected $quoteRepository; + + /** + * Store manager interface. + * + * @var \Magento\Store\Model\StoreManagerInterface + */ + protected $storeManager; + + /** + * Gift message manager. + * + * @var \Magento\GiftMessage\Model\GiftMessageManager + */ + protected $giftMessageManager; + + /** + * Message helper. + * + * @var \Magento\GiftMessage\Helper\Message + */ + protected $helper; + + /** + * Message factory. + * + * @var \Magento\GiftMessage\Model\MessageFactory + */ + protected $messageFactory; + + /** + * @param \Magento\Quote\Model\QuoteRepository $quoteRepository + * @param \Magento\Store\Model\StoreManagerInterface $storeManager + * @param GiftMessageManager $giftMessageManager + * @param \Magento\GiftMessage\Helper\Message $helper + * @param MessageFactory $messageFactory + */ + public function __construct( + \Magento\Quote\Model\QuoteRepository $quoteRepository, + \Magento\Store\Model\StoreManagerInterface $storeManager, + \Magento\GiftMessage\Model\GiftMessageManager $giftMessageManager, + \Magento\GiftMessage\Helper\Message $helper, + \Magento\GiftMessage\Model\MessageFactory $messageFactory + ) { + $this->quoteRepository = $quoteRepository; + $this->giftMessageManager = $giftMessageManager; + $this->storeManager = $storeManager; + $this->helper = $helper; + $this->messageFactory = $messageFactory; + } + + /** + * {@inheritDoc} + */ + public function get($cartId) + { + /** @var \Magento\Quote\Model\Quote $quote */ + $quote = $this->quoteRepository->getActive($cartId); + + $messageId = $quote->getGiftMessageId(); + if (!$messageId) { + return null; + } + + return $this->messageFactory->create()->load($messageId); + } + + /** + * {@inheritDoc} + */ + public function save($cartId, \Magento\GiftMessage\Api\Data\MessageInterface $giftMessage) + { + /** + * Quote. + * + * @var \Magento\Quote\Model\Quote $quote + */ + $quote = $this->quoteRepository->getActive($cartId); + + if (0 == $quote->getItemsCount()) { + throw new InputException('Gift Messages is not applicable for empty cart'); + } + + if ($quote->isVirtual()) { + throw new InvalidTransitionException('Gift Messages is not applicable for virtual products'); + } + if (!$this->helper->getIsMessagesAvailable('quote', $quote, $this->storeManager->getStore())) { + throw new CouldNotSaveException('Gift Message is not available'); + } + $this->giftMessageManager->setMessage($quote, 'quote', $giftMessage); + return true; + } +} diff --git a/app/code/Magento/GiftMessage/Model/GiftMessageManager.php b/app/code/Magento/GiftMessage/Model/GiftMessageManager.php index 79fb3fafac8..e573e01da80 100644 --- a/app/code/Magento/GiftMessage/Model/GiftMessageManager.php +++ b/app/code/Magento/GiftMessage/Model/GiftMessageManager.php @@ -5,6 +5,9 @@ */ namespace Magento\GiftMessage\Model; +use Magento\Framework\Exception\State\InvalidTransitionException; +use Magento\Framework\Exception\CouldNotSaveException; + class GiftMessageManager { /** @@ -84,4 +87,38 @@ class GiftMessageManager } return $this; } + + /** + * Sets the gift message to item or quote. + * + * @param \Magento\Quote\Model\Quote $quote The quote. + * @param string $type The type. + * @param \Magento\GiftMessage\Api\Data\MessageInterface $giftMessage The gift message. + * @param null|int $entityId The entity ID. + * @return void + * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message is not available. + * @throws \Magento\Framework\Exception\State\InvalidTransitionException The billing or shipping address is not set. + */ + public function setMessage(\Magento\Quote\Model\Quote $quote, $type, $giftMessage, $entityId = null) + { + if (is_null($quote->getBillingAddress()->getCountryId())) { + throw new InvalidTransitionException('Billing address is not set'); + } + + // check if shipping address is set + if (is_null($quote->getShippingAddress()->getCountryId())) { + throw new InvalidTransitionException('Shipping address is not set'); + } + $message[$type][$entityId] = [ + 'from' => $giftMessage->getSender(), + 'to' => $giftMessage->getRecipient(), + 'message' => $giftMessage->getMessage(), + ]; + + try { + $this->add($message, $quote); + } catch (\Exception $e) { + throw new CouldNotSaveException('Could not add gift message to shopping cart'); + } + } } diff --git a/app/code/Magento/GiftMessage/Model/ItemRepository.php b/app/code/Magento/GiftMessage/Model/ItemRepository.php new file mode 100644 index 00000000000..90db371ca8f --- /dev/null +++ b/app/code/Magento/GiftMessage/Model/ItemRepository.php @@ -0,0 +1,128 @@ +<?php +/** + * + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\GiftMessage\Model; + +use Magento\Framework\Exception\CouldNotSaveException; +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\State\InvalidTransitionException; +use Magento\Framework\Exception\NoSuchEntityException; + +/** + * Shopping cart gift message item repository object. + */ +class ItemRepository implements \Magento\GiftMessage\Api\ItemRepositoryInterface +{ + /** + * Quote repository. + * + * @var \Magento\Quote\Model\QuoteRepository + */ + protected $quoteRepository; + + /** + * Store manager interface. + * + * @var \Magento\Store\Model\StoreManagerInterface + */ + protected $storeManager; + + /** + * Gift message manager. + * + * @var \Magento\GiftMessage\Model\GiftMessageManager + */ + protected $giftMessageManager; + + /** + * Message helper. + * + * @var \Magento\GiftMessage\Helper\Message + */ + protected $helper; + + /** + * Message factory. + * + * @var \Magento\GiftMessage\Model\MessageFactory + */ + protected $messageFactory; + + /** + * @param \Magento\Quote\Model\QuoteRepository $quoteRepository + * @param \Magento\Store\Model\StoreManagerInterface $storeManager + * @param GiftMessageManager $giftMessageManager + * @param \Magento\GiftMessage\Helper\Message $helper + * @param MessageFactory $messageFactory + */ + public function __construct( + \Magento\Quote\Model\QuoteRepository $quoteRepository, + \Magento\Store\Model\StoreManagerInterface $storeManager, + \Magento\GiftMessage\Model\GiftMessageManager $giftMessageManager, + \Magento\GiftMessage\Helper\Message $helper, + \Magento\GiftMessage\Model\MessageFactory $messageFactory + ) { + $this->quoteRepository = $quoteRepository; + $this->giftMessageManager = $giftMessageManager; + $this->storeManager = $storeManager; + $this->helper = $helper; + $this->messageFactory = $messageFactory; + } + + /** + * {@inheritDoc} + */ + public function get($cartId, $itemId) + { + /** + * Quote. + * + * @var \Magento\Quote\Model\Quote $quote + */ + $quote = $this->quoteRepository->getActive($cartId); + if (!$item = $quote->getItemById($itemId)) { + throw new NoSuchEntityException('There is no item with provided id in the cart'); + }; + $messageId = $item->getGiftMessageId(); + if (!$messageId) { + return null; + } + + /** + * Model. + * + * @var \Magento\GiftMessage\Model\Message $model + */ + return $this->messageFactory->create()->load($messageId); + } + + /** + * {@inheritDoc} + */ + public function save($cartId, \Magento\GiftMessage\Api\Data\MessageInterface $giftMessage, $itemId) + { + /** + * Quote. + * + * @var \Magento\Quote\Model\Quote $quote + */ + $quote = $this->quoteRepository->getActive($cartId); + + if (!$item = $quote->getItemById($itemId)) { + throw new NoSuchEntityException("There is no product with provided itemId: $itemId in the cart"); + }; + + if ($item->getIsVirtual()) { + throw new InvalidTransitionException('Gift Messages is not applicable for virtual products'); + } + if (!$this->helper->getIsMessagesAvailable('items', $quote, $this->storeManager->getStore())) { + throw new CouldNotSaveException('Gift Message is not available'); + } + $this->giftMessageManager->setMessage($quote, 'quote_item', $giftMessage, $itemId); + return true; + } +} diff --git a/app/code/Magento/GiftMessage/Model/Message.php b/app/code/Magento/GiftMessage/Model/Message.php index 0ecfeae37c1..b65033c3fe3 100644 --- a/app/code/Magento/GiftMessage/Model/Message.php +++ b/app/code/Magento/GiftMessage/Model/Message.php @@ -5,23 +5,21 @@ */ namespace Magento\GiftMessage\Model; +use Magento\Framework\Api\AttributeDataBuilder; /** * Gift Message model * * @method \Magento\GiftMessage\Model\Resource\Message _getResource() * @method \Magento\GiftMessage\Model\Resource\Message getResource() - * @method int getCustomerId() * @method \Magento\GiftMessage\Model\Message setCustomerId(int $value) - * @method string getSender() * @method \Magento\GiftMessage\Model\Message setSender(string $value) - * @method string getRecipient() * @method \Magento\GiftMessage\Model\Message setRecipient(string $value) - * @method string getMessage() * @method \Magento\GiftMessage\Model\Message setMessage(string $value) * * @author Magento Core Team <core@magentocommerce.com> */ -class Message extends \Magento\Framework\Model\AbstractModel +class Message extends \Magento\Framework\Model\AbstractExtensibleModel implements + \Magento\GiftMessage\Api\Data\MessageInterface { /** * @var \Magento\GiftMessage\Model\TypeFactory @@ -31,21 +29,33 @@ class Message extends \Magento\Framework\Model\AbstractModel /** * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry - * @param \Magento\GiftMessage\Model\Resource\Message $resource + * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService + * @param AttributeDataBuilder $customAttributeBuilder + * @param Resource\Message $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection - * @param \Magento\GiftMessage\Model\TypeFactory $typeFactory + * @param TypeFactory $typeFactory * @param array $data */ public function __construct( \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, + \Magento\Framework\Api\MetadataServiceInterface $metadataService, + AttributeDataBuilder $customAttributeBuilder, \Magento\GiftMessage\Model\Resource\Message $resource, \Magento\Framework\Data\Collection\Db $resourceCollection, \Magento\GiftMessage\Model\TypeFactory $typeFactory, array $data = [] ) { $this->_typeFactory = $typeFactory; - parent::__construct($context, $registry, $resource, $resourceCollection, $data); + parent::__construct( + $context, + $registry, + $metadataService, + $customAttributeBuilder, + $resource, + $resourceCollection, + $data + ); } /** @@ -76,4 +86,46 @@ class Message extends \Magento\Framework\Model\AbstractModel { return trim($this->getMessage()) == ''; } + + /** + * @codeCoverageIgnoreStart + * {@inheritdoc} + */ + public function getGiftMessageId() + { + return $this->getData('gift_message_id'); + } + + /** + * {@inheritdoc} + */ + public function getCustomerId() + { + return $this->getData('customer_id'); + } + + /** + * {@inheritdoc} + */ + public function getSender() + { + return $this->getData('sender'); + } + + /** + * {@inheritdoc} + */ + public function getRecipient() + { + return $this->getData('recipient'); + } + + /** + * {@inheritdoc} + */ + public function getMessage() + { + return $this->getData('message'); + } + ////@codeCoverageIgnoreEnd } diff --git a/app/code/Magento/GiftMessage/Service/V1/Data/Message.php b/app/code/Magento/GiftMessage/Service/V1/Data/Message.php deleted file mode 100644 index 768b74a47e0..00000000000 --- a/app/code/Magento/GiftMessage/Service/V1/Data/Message.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\GiftMessage\Service\V1\Data; - -/** - * Gift message data object. - * - * @codeCoverageIgnore - */ -class Message extends \Magento\Framework\Api\AbstractExtensibleObject -{ - /** - * Gift message ID. - */ - const GIFT_MESSAGE_ID = 'gift_message_id'; - - /** - * Sender name. - */ - const SENDER = 'sender'; - - /** - * Recipient name. - */ - const RECIPIENT = 'recipient'; - - /** - * Message text. - */ - const MESSAGE = 'message'; - - /** - * Customer ID. - */ - const CUSTOMER_ID = 'customer_id'; - - /** - * Returns the gift message ID. - * - * @return int|null Gift message ID. Otherwise, null. - */ - public function getGiftMessageId() - { - return $this->_get(self::GIFT_MESSAGE_ID); - } - - /** - * Returns the customer ID. - * - * @return int|null Customer ID. Otherwise, null. - */ - public function getCustomerId() - { - return $this->_get(self::CUSTOMER_ID); - } - - /** - * Returns the sender name. - * - * @return string Sender name. - */ - public function getSender() - { - return $this->_get(self::SENDER); - } - - /** - * Returns the recipient name. - * - * @return string Recipient name. - */ - public function getRecipient() - { - return $this->_get(self::RECIPIENT); - } - - /** - * Returns the message text. - * - * @return string Message text. - */ - public function getMessage() - { - return $this->_get(self::MESSAGE); - } -} diff --git a/app/code/Magento/GiftMessage/Service/V1/ReadService.php b/app/code/Magento/GiftMessage/Service/V1/ReadService.php deleted file mode 100644 index e1e0dda0ace..00000000000 --- a/app/code/Magento/GiftMessage/Service/V1/ReadService.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\GiftMessage\Service\V1; - -use Magento\Framework\Exception\NoSuchEntityException; - -/** - * Shopping cart gift message service object. - */ -class ReadService implements ReadServiceInterface -{ - /** - * Quote repository. - * - * @var \Magento\Quote\Model\QuoteRepository - */ - protected $quoteRepository; - - /** - * Message factory. - * - * @var \Magento\GiftMessage\Model\MessageFactory - */ - protected $messageFactory; - - /** - * Message mapper. - * - * @var \Magento\GiftMessage\Service\V1\Data\MessageMapper - */ - protected $messageMapper; - - /** - * Constructs a shopping cart gift message service object. - * - * @param \Magento\Quote\Model\QuoteRepository $quoteRepository Quote repository. - * @param \Magento\GiftMessage\Model\MessageFactory $messageFactory Message factory. - * @param \Magento\GiftMessage\Service\V1\Data\MessageMapper $messageMapper Message mapper. - */ - public function __construct( - \Magento\Quote\Model\QuoteRepository $quoteRepository, - \Magento\GiftMessage\Model\MessageFactory $messageFactory, - \Magento\GiftMessage\Service\V1\Data\MessageMapper $messageMapper - ) { - $this->quoteRepository = $quoteRepository; - $this->messageFactory = $messageFactory; - $this->messageMapper = $messageMapper; - } - - /** - * {@inheritDoc} - * - * @param int $cartId The shopping cart ID. - * @return \Magento\GiftMessage\Service\V1\Data\Message Gift message. - */ - public function get($cartId) - { - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->quoteRepository->getActive($cartId); - - $messageId = $quote->getGiftMessageId(); - if (!$messageId) { - return null; - } - - /** @var \Magento\GiftMessage\Model\Message $model */ - $model = $this->messageFactory->create()->load($messageId); - - return $this->messageMapper->extractDto($model); - } - - /** - * {@inheritDoc} - * - * @param int $cartId The shopping cart ID. - * @param int $itemId The item ID. - * @return \Magento\GiftMessage\Service\V1\Data\Message Gift message. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item does not exist in the cart. - */ - public function getItemMessage($cartId, $itemId) - { - /** - * Quote. - * - * @var \Magento\Quote\Model\Quote $quote - */ - $quote = $this->quoteRepository->getActive($cartId); - if (!$item = $quote->getItemById($itemId)) { - throw new NoSuchEntityException('There is no item with provided id in the cart'); - }; - $messageId = $item->getGiftMessageId(); - if (!$messageId) { - return null; - } - - /** - * Model. - * - * @var \Magento\GiftMessage\Model\Message $model - */ - $model = $this->messageFactory->create()->load($messageId); - - return $this->messageMapper->extractDto($model); - } -} diff --git a/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php b/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php deleted file mode 100644 index daa9c04bc3c..00000000000 --- a/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\GiftMessage\Service\V1; - -/** - * Quote shipping method read service interface. - */ -interface ReadServiceInterface -{ - /** - * Returns the gift message for a specified order. - * - * @param int $cartId The shopping cart ID. - * @return \Magento\GiftMessage\Service\V1\Data\Message Gift message. - * @deprecated - * @see \Magento\GiftMessage\Api\GiftMessageRepositoryInterface::get - */ - public function get($cartId); - - /** - * Returns the gift message for a specified item in a specified shopping cart. - * - * @param int $cartId The shopping cart ID. - * @param int $itemId The item ID. - * @return \Magento\GiftMessage\Service\V1\Data\Message Gift message. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item does not exist in the cart. - * @deprecated - * @see \Magento\GiftMessage\Api\GiftMessageItemRepositoryInterface::get - */ - public function getItemMessage($cartId, $itemId); -} diff --git a/app/code/Magento/GiftMessage/Service/V1/WriteService.php b/app/code/Magento/GiftMessage/Service/V1/WriteService.php deleted file mode 100644 index 0163c329a40..00000000000 --- a/app/code/Magento/GiftMessage/Service/V1/WriteService.php +++ /dev/null @@ -1,163 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\GiftMessage\Service\V1; - -use Magento\Framework\Exception\CouldNotSaveException; -use Magento\Framework\Exception\InputException; -use Magento\Framework\Exception\NoSuchEntityException; -use Magento\Framework\Exception\State\InvalidTransitionException; - -/** - * Gift message write service data object. - */ -class WriteService implements WriteServiceInterface -{ - /** - * Quote repository. - * - * @var \Magento\Quote\Model\QuoteRepository - */ - protected $quoteRepository; - - /** - * Store manager interface. - * - * @var \Magento\Store\Model\StoreManagerInterface - */ - protected $storeManager; - - /** - * Gift message manager. - * - * @var \Magento\GiftMessage\Model\GiftMessageManager - */ - protected $giftMessageManager; - - /** - * Message helper. - * - * @var \Magento\GiftMessage\Helper\Message - */ - protected $helper; - - /** - * Constructs a gift message write service data object. - * - * @param \Magento\Quote\Model\QuoteRepository $quoteRepository Quote repository. - * @param \Magento\Store\Model\StoreManagerInterface $storeManager Store manager. - * @param \Magento\GiftMessage\Model\GiftMessageManager $giftMessageManager Gift message manager. - * @param \Magento\GiftMessage\Helper\Message $helper Message helper. - */ - public function __construct( - \Magento\Quote\Model\QuoteRepository $quoteRepository, - \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\GiftMessage\Model\GiftMessageManager $giftMessageManager, - \Magento\GiftMessage\Helper\Message $helper - ) { - $this->quoteRepository = $quoteRepository; - $this->giftMessageManager = $giftMessageManager; - $this->storeManager = $storeManager; - $this->helper = $helper; - } - - /** - * {@inheritDoc} - * - * @param int $cartId The shopping cart ID. - * @param Data\Message $giftMessage The gift message. - * @return bool - * @throws \Magento\Framework\Exception\InputException You cannot add gift messages to empty carts. - * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to virtual - * products. - */ - public function setForQuote($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage) - { - /** - * Quote. - * - * @var \Magento\Quote\Model\Quote $quote - */ - $quote = $this->quoteRepository->getActive($cartId); - - if (0 == $quote->getItemsCount()) { - throw new InputException('Gift Messages is not applicable for empty cart'); - } - - if ($quote->isVirtual()) { - throw new InvalidTransitionException('Gift Messages is not applicable for virtual products'); - } - - $this->setMessage($quote, 'quote', $giftMessage); - return true; - } - - /** - * {@inheritDoc} - * - * @param int $cartId The shopping cart ID. - * @param Data\Message $giftMessage The gift message. - * @param int $itemId The item ID. - * @return bool - * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to - * virtual products. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item does not exist in the cart. - */ - public function setForItem($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage, $itemId) - { - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->quoteRepository->getActive($cartId); - - if (!$item = $quote->getItemById($itemId)) { - throw new NoSuchEntityException("There is no product with provided itemId: $itemId in the cart"); - }; - - if ($item->getIsVirtual()) { - throw new InvalidTransitionException('Gift Messages is not applicable for virtual products'); - } - - $this->setMessage($quote, 'quote_item', $giftMessage, $itemId); - return true; - } - - /** - * Sets the gift message to item or quote. - * - * @param \Magento\Quote\Model\Quote $quote The quote. - * @param string $type The type. - * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage The gift message. - * @param null|int $entityId The entity ID. - * @return void - * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message is not available. - * @throws \Magento\Framework\Exception\State\InvalidTransitionException The billing or shipping address is not set. - */ - protected function setMessage(\Magento\Quote\Model\Quote $quote, $type, $giftMessage, $entityId = null) - { - if (is_null($quote->getBillingAddress()->getCountryId())) { - throw new InvalidTransitionException('Billing address is not set'); - } - - // check if shipping address is set - if (is_null($quote->getShippingAddress()->getCountryId())) { - throw new InvalidTransitionException('Shipping address is not set'); - } - - $configType = $type == 'quote' ? '' : 'items'; - if (!$this->helper->getIsMessagesAvailable($configType, $quote, $this->storeManager->getStore())) { - throw new CouldNotSaveException('Gift Message is not available'); - } - $message[$type][$entityId] = [ - 'from' => $giftMessage->getSender(), - 'to' => $giftMessage->getRecipient(), - 'message' => $giftMessage->getMessage(), - ]; - - try { - $this->giftMessageManager->add($message, $quote); - } catch (\Exception $e) { - throw new CouldNotSaveException('Could not add gift message to shopping cart'); - } - } -} diff --git a/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php b/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php deleted file mode 100644 index 4278f9b7acd..00000000000 --- a/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\GiftMessage\Service\V1; - -/** - * Quote shipping method read service. - */ -interface WriteServiceInterface -{ - /** - * Sets the gift message for an entire order. - * - * @param int $cartId The cart ID. - * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage The gift message. - * @return bool - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @throws \Magento\Framework\Exception\InputException You cannot add gift messages to empty carts. - * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to - * virtual products. - * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. - * @deprecated - * @see \Magento\GiftMessage\Api\GiftMessageRepositoryInterface::save - */ - public function setForQuote($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage); - - /** - * Sets the gift message for a specified item. - * - * @param int $cartId The cart ID. - * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage The gift message. - * @param int $itemId The item ID. - * @return bool - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @throws \Magento\Framework\Exception\InputException You cannot add gift messages to empty carts. - * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to - * virtual products. - * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved. - * @deprecated - * @see \Magento\GiftMessage\Api\GiftMessageItemRepositoryInterface::save - */ - public function setForItem($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage, $itemId); -} diff --git a/app/code/Magento/GiftMessage/etc/di.xml b/app/code/Magento/GiftMessage/etc/di.xml index a01e8d4bed6..f49fdfcd4b5 100644 --- a/app/code/Magento/GiftMessage/etc/di.xml +++ b/app/code/Magento/GiftMessage/etc/di.xml @@ -20,6 +20,7 @@ </argument> </arguments> </type> - <preference for="Magento\GiftMessage\Service\V1\ReadServiceInterface" type="Magento\GiftMessage\Service\V1\ReadService"/> - <preference for="Magento\GiftMessage\Service\V1\WriteServiceInterface" type="Magento\GiftMessage\Service\V1\WriteService"/> + <preference for="Magento\GiftMessage\Api\CartRepositoryInterface" type="Magento\GiftMessage\Model\CartRepository"/> + <preference for="Magento\GiftMessage\Api\ItemRepositoryInterface" type="Magento\GiftMessage\Model\ItemRepository"/> + <preference for="Magento\GiftMessage\Api\Data\MessageInterface" type="Magento\GiftMessage\Model\Message"/> </config> diff --git a/app/code/Magento/GiftMessage/etc/webapi.xml b/app/code/Magento/GiftMessage/etc/webapi.xml index e5875d5d09d..d63e200bb90 100644 --- a/app/code/Magento/GiftMessage/etc/webapi.xml +++ b/app/code/Magento/GiftMessage/etc/webapi.xml @@ -8,25 +8,25 @@ <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../app/code/Magento/Webapi/etc/webapi.xsd"> <route url="/V1/carts/:cartId/gift-message" method="GET"> - <service class="Magento\GiftMessage\Service\V1\ReadServiceInterface" method="get"/> + <service class="Magento\GiftMessage\Api\CartRepositoryInterface" method="get"/> <resources> <resource ref="Magento_Sales::create" /> </resources> </route> <route url="/V1/carts/:cartId/gift-message/:itemId" method="GET"> - <service class="Magento\GiftMessage\Service\V1\ReadServiceInterface" method="getItemMessage"/> + <service class="Magento\GiftMessage\Api\ItemRepositoryInterface" method="get"/> <resources> <resource ref="Magento_Sales::create" /> </resources> </route> <route url="/V1/carts/:cartId/gift-message" method="PUT"> - <service class="Magento\GiftMessage\Service\V1\WriteServiceInterface" method="setForQuote"/> + <service class="Magento\GiftMessage\Api\CartRepositoryInterface" method="save"/> <resources> <resource ref="Magento_Sales::create" /> </resources> </route> <route url="/V1/carts/:cartId/gift-message/:itemId" method="PUT"> - <service class="Magento\GiftMessage\Service\V1\WriteServiceInterface" method="setForItem"/> + <service class="Magento\GiftMessage\Api\ItemRepositoryInterface" method="save"/> <resources> <resource ref="Magento_Sales::create" /> </resources> diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Service/V1/ReadServiceTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php similarity index 63% rename from dev/tests/api-functional/testsuite/Magento/GiftMessage/Service/V1/ReadServiceTest.php rename to dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php index 0f2b0fc0bac..613720255d3 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Service/V1/ReadServiceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php @@ -4,15 +4,15 @@ * See COPYING.txt for license details. */ -namespace Magento\GiftMessage\Service\V1; +namespace Magento\GiftMessage\Api; use Magento\TestFramework\TestCase\WebapiAbstract; use Magento\Webapi\Model\Rest\Config as RestConfig; -class ReadServiceTest extends WebapiAbstract +class CartRepositoryTest extends WebapiAbstract { const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'giftMessageReadServiceV1'; + const SERVICE_NAME = 'giftMessageCartRepositoryV1'; const RESOURCE_PATH = '/V1/carts/'; /** @@ -64,39 +64,43 @@ class ReadServiceTest extends WebapiAbstract /** * @magentoApiDataFixture Magento/GiftMessage/_files/quote_with_item_message.php */ - public function testGetItemMessage() + public function testSave() { + // sales/gift_options/allow_order must be set to 1 in system configuration + // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed +// $this->markTestIncomplete('This test relies on system configuration state.'); /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); $quote->load('test_order_item_with_message', 'reserved_order_id'); - $product = $this->objectManager->create('Magento\Catalog\Model\Product'); - $product->load($product->getIdBySku('simple_with_message')); - $itemId = $quote->getItemByProduct($product)->getId(); - /** @var \Magento\Catalog\Model\Product $product */ + $cartId = $quote->getId(); $serviceInfo = [ 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH . $cartId . '/gift-message/' . $itemId, - 'httpMethod' => RestConfig::HTTP_METHOD_GET, + 'resourcePath' => self::RESOURCE_PATH . $cartId . '/gift-message', + 'httpMethod' => RestConfig::HTTP_METHOD_PUT, ], 'soap' => [ 'service' => self::SERVICE_NAME, 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'getItemMessage', + 'operation' => self::SERVICE_NAME . 'Save', ], ]; - $expectedMessage = [ - 'recipient' => 'Jane Roe', - 'sender' => 'John Doe', - 'message' => 'Gift Message Text', + $requestData = [ + 'cartId' => $cartId, + 'giftMessage' => [ + 'recipient' => 'John Doe', + 'sender' => 'Jane Roe', + 'message' => 'Gift Message Text New', + ], ]; - - $requestData = ["cartId" => $cartId, "itemId" => $itemId]; - $resultMessage = $this->_webApiCall($serviceInfo, $requestData); - $this->assertCount(5, $resultMessage); - unset($resultMessage['gift_message_id']); - unset($resultMessage['customer_id']); - $this->assertEquals($expectedMessage, $resultMessage); + $this->assertTrue($this->_webApiCall($serviceInfo, $requestData)); + $quote->load('test_order_item_with_message', 'reserved_order_id'); + $quote->getGiftMessageId(); + /** @var \Magento\GiftMessage\Model\Message $message */ + $message = $this->objectManager->create('Magento\GiftMessage\Model\Message')->load($quote->getGiftMessageId()); + $this->assertEquals('John Doe', $message->getRecipient()); + $this->assertEquals('Jane Roe', $message->getSender()); + $this->assertEquals('Gift Message Text New', $message->getMessage()); } } diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Service/V1/WriteServiceTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php similarity index 69% rename from dev/tests/api-functional/testsuite/Magento/GiftMessage/Service/V1/WriteServiceTest.php rename to dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php index a5161f2e2b8..cc8d3025a25 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Service/V1/WriteServiceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php @@ -4,15 +4,15 @@ * See COPYING.txt for license details. */ -namespace Magento\GiftMessage\Service\V1; +namespace Magento\GiftMessage\Api; use Magento\TestFramework\TestCase\WebapiAbstract; use Magento\Webapi\Model\Rest\Config as RestConfig; -class WriteServiceTest extends WebapiAbstract +class ItemRepositoryTest extends WebapiAbstract { const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'giftMessageWriteServiceV1'; + const SERVICE_NAME = 'giftMessageItemRepositoryV1'; const RESOURCE_PATH = '/V1/carts/'; /** @@ -28,50 +28,46 @@ class WriteServiceTest extends WebapiAbstract /** * @magentoApiDataFixture Magento/GiftMessage/_files/quote_with_item_message.php */ - public function testSetForQuote() + public function testGet() { - // sales/gift_options/allow_order must be set to 1 in system configuration - // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed - $this->markTestIncomplete('This test relies on system configuration state.'); /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); $quote->load('test_order_item_with_message', 'reserved_order_id'); - + $product = $this->objectManager->create('Magento\Catalog\Model\Product'); + $product->load($product->getIdBySku('simple_with_message')); + $itemId = $quote->getItemByProduct($product)->getId(); + /** @var \Magento\Catalog\Model\Product $product */ $cartId = $quote->getId(); $serviceInfo = [ 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH . $cartId . '/gift-message', - 'httpMethod' => RestConfig::HTTP_METHOD_PUT, + 'resourcePath' => self::RESOURCE_PATH . $cartId . '/gift-message/' . $itemId, + 'httpMethod' => RestConfig::HTTP_METHOD_GET, ], 'soap' => [ 'service' => self::SERVICE_NAME, 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'SetForQuote', + 'operation' => self::SERVICE_NAME . 'getItemMessage', ], ]; - $requestData = [ - 'cartId' => $cartId, - 'giftMessage' => [ - 'recipient' => 'John Doe', - 'sender' => 'Jane Roe', - 'message' => 'Gift Message Text New', - ], + $expectedMessage = [ + 'recipient' => 'Jane Roe', + 'sender' => 'John Doe', + 'message' => 'Gift Message Text', ]; - $this->assertTrue($this->_webApiCall($serviceInfo, $requestData)); - $quote->load('test_order_item_with_message', 'reserved_order_id'); - $quote->getGiftMessageId(); - /** @var \Magento\GiftMessage\Model\Message $message */ - $message = $this->objectManager->create('Magento\GiftMessage\Model\Message')->load($quote->getGiftMessageId()); - $this->assertEquals('John Doe', $message->getRecipient()); - $this->assertEquals('Jane Roe', $message->getSender()); - $this->assertEquals('Gift Message Text New', $message->getMessage()); + + $requestData = ["cartId" => $cartId, "itemId" => $itemId]; + $resultMessage = $this->_webApiCall($serviceInfo, $requestData); + $this->assertCount(5, $resultMessage); + unset($resultMessage['gift_message_id']); + unset($resultMessage['customer_id']); + $this->assertEquals($expectedMessage, $resultMessage); } /** * @magentoApiDataFixture Magento/GiftMessage/_files/quote_with_item_message.php */ - public function testSetForItem() + public function testSave() { // sales/gift_options/allow_items must be set to 1 in system configuration // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php index a266869939c..d6a78ef632f 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php @@ -70,5 +70,6 @@ return [ ['Magento\RecurringPayment'], ['Magento\PayPalRecurringPayment'], ['Magento\ConfigurableProduct\Service'], - ['Magento\Catalog\Service'] + ['Magento\Catalog\Service'], + ['Magento\GiftMessage\Service'] ]; diff --git a/dev/tests/unit/testsuite/Magento/GiftMessage/Model/CartRepositoryTest.php b/dev/tests/unit/testsuite/Magento/GiftMessage/Model/CartRepositoryTest.php new file mode 100644 index 00000000000..9fd0ea04554 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/GiftMessage/Model/CartRepositoryTest.php @@ -0,0 +1,181 @@ +<?php +/** + * + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\GiftMessage\Model; + +class CartRepositoryTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var CartRepository + */ + protected $cartRepository; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $quoteRepositoryMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $messageFactoryMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $quoteMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $messageMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $quoteItemMock; + + /** + * @var string + */ + protected $cartId = 13; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $storeManagerMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $giftMessageManagerMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $helperMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $storeMock; + + protected function setUp() + { + $this->quoteRepositoryMock = $this->getMock('Magento\Quote\Model\QuoteRepository', [], [], '', false); + $this->messageFactoryMock = $this->getMock( + 'Magento\GiftMessage\Model\MessageFactory', + [ + 'create', + '__wakeup' + ], + [], + '', + false); + $this->messageMock = $this->getMock('Magento\GiftMessage\Model\Message', [], [], '', false); + $this->quoteItemMock = $this->getMock( + '\Magento\Quote\Model\Quote\Item', + [ + 'getGiftMessageId', + '__wakeup' + ], + [], + '', + false); + $this->quoteMock = $this->getMock( + '\Magento\Quote\Model\Quote', + [ + 'getGiftMessageId', + 'getItemById', + 'getItemsCount', + 'isVirtual', + '__wakeup', + ], + [], + '', + false); + $this->storeManagerMock = $this->getMock('Magento\Store\Model\StoreManagerInterface'); + $this->giftMessageManagerMock = + $this->getMock('Magento\GiftMessage\Model\GiftMessageManager', [], [], '', false); + $this->helperMock = $this->getMock('Magento\GiftMessage\Helper\Message', [], [], '', false); + $this->storeMock = $this->getMock('Magento\Store\Model\Store', [], [], '', false); + $this->cartRepository = new CartRepository( + $this->quoteRepositoryMock, + $this->storeManagerMock, + $this->giftMessageManagerMock, + $this->helperMock, + $this->messageFactoryMock + ); + + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive') + ->with($this->cartId) + ->will($this->returnValue($this->quoteMock)); + } + + public function testGetWithOutMessageId() + { + $messageId = 0; + + $this->quoteMock->expects($this->once())->method('getGiftMessageId')->will($this->returnValue($messageId)); + + $this->assertNull($this->cartRepository->get($this->cartId)); + } + + public function testGet() + { + $messageId = 156; + + $this->quoteMock->expects($this->once())->method('getGiftMessageId')->will($this->returnValue($messageId)); + $this->messageFactoryMock->expects($this->once()) + ->method('create') + ->will($this->returnValue($this->messageMock)); + $this->messageMock->expects($this->once())->method('load')->will($this->returnValue($this->messageMock)); + + $this->assertEquals($this->messageMock, $this->cartRepository->get($this->cartId)); + } + + /** + * @expectedException \Magento\Framework\Exception\InputException + * @expectedExceptionMessage Gift Messages is not applicable for empty cart + */ + public function testSaveWithInputException() + { + $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(0)); + + $this->cartRepository->save($this->cartId, $this->messageMock); + } + + /** + * @expectedException \Magento\Framework\Exception\State\InvalidTransitionException + * @expectedExceptionMessage Gift Messages is not applicable for virtual products + */ + public function testSaveWithInvalidTransitionException() + { + $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(1)); + $this->quoteMock->expects($this->once())->method('isVirtual')->will($this->returnValue(true)); + + $this->cartRepository->save($this->cartId, $this->messageMock); + } + + public function testSave() + { + $this->quoteMock->expects($this->once())->method('isVirtual')->will($this->returnValue(false)); + $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(1)); + $this->storeManagerMock->expects($this->once())->method('getStore')->will($this->returnValue($this->storeMock)); + $this->helperMock->expects($this->once()) + ->method('getIsMessagesAvailable') + ->with('quote', $this->quoteMock, $this->storeMock) + ->will($this->returnValue(true)); + $this->giftMessageManagerMock->expects($this->once()) + ->method('setMessage') + ->with($this->quoteMock, 'quote', $this->messageMock) + ->will($this->returnValue($this->giftMessageManagerMock)); + + $this->assertTrue($this->cartRepository->save($this->cartId, $this->messageMock)); + } +} diff --git a/dev/tests/unit/testsuite/Magento/GiftMessage/Model/GiftMessageManagerTest.php b/dev/tests/unit/testsuite/Magento/GiftMessage/Model/GiftMessageManagerTest.php index 2b616a6b743..6eec0285e00 100644 --- a/dev/tests/unit/testsuite/Magento/GiftMessage/Model/GiftMessageManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/GiftMessage/Model/GiftMessageManagerTest.php @@ -44,6 +44,16 @@ class GiftMessageManagerTest extends \PHPUnit_Framework_TestCase */ protected $giftMessageMock; + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $billingAddressMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $shippingAddressMock; + protected function setUp() { $this->messageFactoryMock = @@ -56,6 +66,8 @@ class GiftMessageManagerTest extends \PHPUnit_Framework_TestCase 'save', 'getItemById', 'getAddressById', + 'getBillingAddress', + 'getShippingAddress', '__wakeup'], [], '', @@ -100,6 +112,9 @@ class GiftMessageManagerTest extends \PHPUnit_Framework_TestCase 'setSender', 'setRecipient', 'setMessage', + 'getSender', + 'getRecipient', + 'getMessage', 'getId', 'delete', 'save', @@ -109,6 +124,10 @@ class GiftMessageManagerTest extends \PHPUnit_Framework_TestCase '', false); + $this->billingAddressMock = + $this->getMock('\Magento\Sales\Model\Quote\Address', ['getCountryId', '__wakeup'], [], '', false); + $this->shippingAddressMock = + $this->getMock('\Magento\Sales\Model\Quote\Address', ['getCountryId', '__wakeup'], [], '', false); $this->model = new GiftMessageManager($this->messageFactoryMock); } @@ -287,4 +306,62 @@ class GiftMessageManagerTest extends \PHPUnit_Framework_TestCase $this->model->add($giftMessages, $this->quoteMock); } + + /** + * @expectedException \Magento\Framework\Exception\State\InvalidTransitionException + * @expectedExceptionMessage Billing address is not set + */ + public function testSetMessageEmptyBillingAddressException() + { + $this->quoteMock->expects($this->once()) + ->method('getBillingAddress') + ->will($this->returnValue($this->billingAddressMock)); + $this->billingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(null)); + + $this->model->setMessage($this->quoteMock, 'item', $this->giftMessageMock); + } + + /** + * @expectedException \Magento\Framework\Exception\State\InvalidTransitionException + * @expectedExceptionMessage Shipping address is not set + */ + public function testSetMessageEmptyShippingAddressException() + { + $this->quoteMock->expects($this->once()) + ->method('getBillingAddress') + ->will($this->returnValue($this->billingAddressMock)); + $this->billingAddressMock->expects($this->any())->method('getCountryId')->will($this->returnValue(12)); + $this->quoteMock->expects($this->once()) + ->method('getShippingAddress') + ->will($this->returnValue($this->shippingAddressMock)); + $this->shippingAddressMock->expects($this->any())->method('getCountryId')->will($this->returnValue(null)); + + $this->model->setMessage($this->quoteMock, 'item', $this->giftMessageMock); + } + + /** + * @expectedException \Magento\Framework\Exception\CouldNotSaveException + * @expectedExceptionMessage Could not add gift message to shopping cart + */ + public function testSetMessageCouldNotAddGiftMessageException() + { + $this->quoteMock->expects($this->once()) + ->method('getBillingAddress') + ->will($this->returnValue($this->billingAddressMock)); + $this->billingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(12)); + $this->quoteMock->expects($this->once()) + ->method('getShippingAddress') + ->will($this->returnValue($this->shippingAddressMock)); + $this->shippingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(13)); + $this->giftMessageMock->expects($this->once())->method('getSender')->will($this->returnValue('sender')); + $this->giftMessageMock->expects($this->once())->method('getRecipient')->will($this->returnValue('recipient')); + $this->giftMessageMock->expects($this->once())->method('getMessage')->will($this->returnValue('Message')); + + $this->messageFactoryMock->expects($this->once()) + ->method('create') + ->willThrowException(new \Exception()); + + $this->model->setMessage($this->quoteMock, 'item', $this->giftMessageMock); + } + } diff --git a/dev/tests/unit/testsuite/Magento/GiftMessage/Model/ItemRepositoryTest.php b/dev/tests/unit/testsuite/Magento/GiftMessage/Model/ItemRepositoryTest.php new file mode 100644 index 00000000000..9bf0ac91e24 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/GiftMessage/Model/ItemRepositoryTest.php @@ -0,0 +1,220 @@ +<?php +/** + * + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\GiftMessage\Model; + + +class ItemRepositoryTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var ItemRepository + */ + protected $itemRepository; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $quoteRepositoryMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $messageFactoryMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $quoteMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $messageMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $quoteItemMock; + + /** + * @var string + */ + protected $cartId = 13; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $storeManagerMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $giftMessageManagerMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $helperMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $storeMock; + + protected function setUp() + { + $this->quoteRepositoryMock = $this->getMock('Magento\Quote\Model\QuoteRepository', [], [], '', false); + $this->messageFactoryMock = $this->getMock( + 'Magento\GiftMessage\Model\MessageFactory', + [ + 'create', + '__wakeup' + ], + [], + '', + false); + $this->messageMock = $this->getMock('Magento\GiftMessage\Model\Message', [], [], '', false); + $this->quoteItemMock = $this->getMock( + '\Magento\Qote\Model\Quote\Item', + [ + 'getGiftMessageId', + '__wakeup' + ], + [], + '', + false); + $this->quoteMock = $this->getMock( + '\Magento\Quote\Model\Quote', + [ + 'getGiftMessageId', + 'getItemById', + '__wakeup', + ], + [], + '', + false); + $this->storeManagerMock = $this->getMock('Magento\Store\Model\StoreManagerInterface'); + $this->giftMessageManagerMock = + $this->getMock('Magento\GiftMessage\Model\GiftMessageManager', [], [], '', false); + $this->helperMock = $this->getMock('Magento\GiftMessage\Helper\Message', [], [], '', false); + $this->storeMock = $this->getMock('Magento\Store\Model\Store', [], [], '', false); + $this->itemRepository = new ItemRepository( + $this->quoteRepositoryMock, + $this->storeManagerMock, + $this->giftMessageManagerMock, + $this->helperMock, + $this->messageFactoryMock + ); + + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive') + ->with($this->cartId) + ->will($this->returnValue($this->quoteMock)); + } + + /** + * @expectedException \Magento\Framework\Exception\NoSuchEntityException + * @expectedExceptionMessage There is no item with provided id in the cart + */ + public function testGetWithNoSuchEntityException() + { + $itemId = 2; + + $this->quoteMock->expects($this->once())->method('getItemById')->with($itemId)->will($this->returnValue(null)); + + $this->itemRepository->get($this->cartId, $itemId); + } + + public function testGetWithoutMessageId() + { + $messageId = 0; + $itemId = 2; + + $this->quoteMock->expects($this->once()) + ->method('getItemById') + ->with($itemId) + ->will($this->returnValue($this->quoteItemMock)); + $this->quoteItemMock->expects($this->once())->method('getGiftMessageId')->will($this->returnValue($messageId)); + + $this->assertNull($this->itemRepository->get($this->cartId, $itemId)); + } + + public function testGet() + { + $messageId = 123; + $itemId = 2; + + $this->quoteMock->expects($this->once()) + ->method('getItemById') + ->with($itemId) + ->will($this->returnValue($this->quoteItemMock)); + $this->quoteItemMock->expects($this->once())->method('getGiftMessageId')->will($this->returnValue($messageId)); + $this->messageFactoryMock->expects($this->once()) + ->method('create') + ->will($this->returnValue($this->messageMock)); + $this->messageMock->expects($this->once()) + ->method('load') + ->with($messageId) + ->will($this->returnValue($this->messageMock)); + + $this->assertEquals($this->messageMock, $this->itemRepository->get($this->cartId, $itemId)); + } + + /** + * @expectedException \Magento\Framework\Exception\NoSuchEntityException + * @expectedExceptionMessage There is no product with provided itemId: 1 in the cart + */ + public function testSaveWithNoSuchEntityException() + { + $itemId = 1; + + $this->quoteMock->expects($this->once())->method('getItemById')->with($itemId)->will($this->returnValue(null)); + + $this->itemRepository->save($this->cartId, $this->messageMock, $itemId); + } + + /** + * @expectedException \Magento\Framework\Exception\State\InvalidTransitionException + * @expectedExceptionMessage Gift Messages is not applicable for virtual products + */ + public function testSaveWithInvalidTransitionException() + { + $itemId = 1; + + $quoteItem = $this->getMock('\Magento\Sales\Model\Quote\Item', ['getIsVirtual', '__wakeup'], [], '', false); + $this->quoteMock->expects($this->once()) + ->method('getItemById') + ->with($itemId) + ->will($this->returnValue($quoteItem)); + $quoteItem->expects($this->once())->method('getIsVirtual')->will($this->returnValue(1)); + + $this->itemRepository->save($this->cartId, $this->messageMock, $itemId); + } + + public function testSave() + { + $itemId = 1; + + $quoteItem = $this->getMock('\Magento\Sales\Model\Quote\Item', ['getIsVirtual', '__wakeup'], [], '', false); + $this->quoteMock->expects($this->once()) + ->method('getItemById') + ->with($itemId) + ->will($this->returnValue($quoteItem)); + $quoteItem->expects($this->once())->method('getIsVirtual')->will($this->returnValue(0)); + $this->storeManagerMock->expects($this->once())->method('getStore')->will($this->returnValue($this->storeMock)); + $this->helperMock->expects($this->once()) + ->method('getIsMessagesAvailable') + ->with('items', $this->quoteMock, $this->storeMock) + ->will($this->returnValue(true)); + $this->giftMessageManagerMock->expects($this->once()) + ->method('setMessage') + ->with($this->quoteMock, 'quote_item', $this->messageMock, $itemId) + ->will($this->returnValue($this->giftMessageManagerMock)); + + $this->assertTrue($this->itemRepository->save($this->cartId, $this->messageMock, $itemId)); + } +} diff --git a/dev/tests/unit/testsuite/Magento/GiftMessage/Service/V1/ReadServiceTest.php b/dev/tests/unit/testsuite/Magento/GiftMessage/Service/V1/ReadServiceTest.php deleted file mode 100644 index ac28515811b..00000000000 --- a/dev/tests/unit/testsuite/Magento/GiftMessage/Service/V1/ReadServiceTest.php +++ /dev/null @@ -1,186 +0,0 @@ -<?php -/** - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\GiftMessage\Service\V1; - -class ReadServiceTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var ReadService - */ - protected $service; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteRepositoryMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $messageFactoryMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $messageMapperMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $messageMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteItemMock; - - /** - * @var string - */ - protected $cardId; - - protected function setUp() - { - $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->cardId = 13; - $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); - $this->messageFactoryMock = $this->getMock( - '\Magento\GiftMessage\Model\MessageFactory', - [ - 'create', - '__wakeup' - ], - [], - '', - false); - $this->messageMapperMock = $this->getMock( - '\Magento\GiftMessage\Service\V1\Data\MessageMapper', - [ - 'extractDto', - '__wakeup' - ], - [], - '', - false); - $this->messageMock = $this->getMock('\Magento\GiftMessage\Model\Message', [], [], '', false); - $this->quoteItemMock = $this->getMock( - '\Magento\Quote\Model\Quote\Item', - [ - 'getGiftMessageId', - '__wakeup' - ], - [], - '', - false); - $this->quoteMock = $this->getMock( - '\Magento\Quote\Model\Quote', - [ - 'getGiftMessageId', - 'getItemById', - '__wakeup', - ], - [], - '', - false); - - $this->service = $objectManager->getObject( - 'Magento\GiftMessage\Service\V1\ReadService', - [ - 'quoteRepository' => $this->quoteRepositoryMock, - 'messageFactory' => $this->messageFactoryMock, - 'messageMapper' => $this->messageMapperMock, - ] - ); - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($this->cardId) - ->will($this->returnValue($this->quoteMock)); - } - - public function testGetWithOutMessageId() - { - $messageId = 0; - - $this->quoteMock->expects($this->once())->method('getGiftMessageId')->will($this->returnValue($messageId)); - - $this->assertNull($this->service->get($this->cardId)); - } - - public function testGet() - { - $messageId = 156; - - $this->quoteMock->expects($this->once())->method('getGiftMessageId')->will($this->returnValue($messageId)); - $this->messageFactoryMock->expects($this->once()) - ->method('create') - ->will($this->returnValue($this->messageMock)); - $this->messageMock->expects($this->once())->method('load')->will($this->returnValue($this->messageMock)); - $this->messageMapperMock->expects($this->once()) - ->method('extractDto')->with($this->messageMock)->will($this->returnValue(['Expected value'])); - - $this->assertEquals(['Expected value'], $this->service->get($this->cardId)); - } - - /** - * @expectedException \Magento\Framework\Exception\NoSuchEntityException - * @expectedExceptionMessage There is no item with provided id in the cart - */ - public function testGetItemMessageWithNoSuchEntityException() - { - $itemId = 2; - - $this->quoteMock->expects($this->once())->method('getItemById')->with($itemId)->will($this->returnValue(null)); - - $this->service->getItemMessage($this->cardId, $itemId); - } - - public function testGetItemMessageWithoutMessageId() - { - $messageId = 0; - $itemId = 2; - - $this->quoteMock->expects($this->once()) - ->method('getItemById') - ->with($itemId) - ->will($this->returnValue($this->quoteItemMock)); - $this->quoteItemMock->expects($this->once())->method('getGiftMessageId')->will($this->returnValue($messageId)); - - $this->assertNull($this->service->getItemMessage($this->cardId, $itemId)); - } - - public function testGetItemMessage() - { - $messageId = 123; - $itemId = 2; - - $this->quoteMock->expects($this->once()) - ->method('getItemById') - ->with($itemId) - ->will($this->returnValue($this->quoteItemMock)); - $this->quoteItemMock->expects($this->once())->method('getGiftMessageId')->will($this->returnValue($messageId)); - $this->messageFactoryMock->expects($this->once()) - ->method('create') - ->will($this->returnValue($this->messageMock)); - $this->messageMock->expects($this->once()) - ->method('load') - ->with($messageId) - ->will($this->returnValue($this->messageMock)); - $this->messageMapperMock->expects($this->once()) - ->method('extractDto') - ->with($this->messageMock) - ->will($this->returnValue(['Expected value'])); - - $this->assertEquals(['Expected value'], $this->service->getItemMessage($this->cardId, $itemId)); - } -} diff --git a/dev/tests/unit/testsuite/Magento/GiftMessage/Service/V1/WriteServiceTest.php b/dev/tests/unit/testsuite/Magento/GiftMessage/Service/V1/WriteServiceTest.php deleted file mode 100644 index 08a34847fdd..00000000000 --- a/dev/tests/unit/testsuite/Magento/GiftMessage/Service/V1/WriteServiceTest.php +++ /dev/null @@ -1,388 +0,0 @@ -<?php -/** - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\GiftMessage\Service\V1; - -class WriteServiceTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var WriteService - */ - protected $service; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteRepositoryMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $storeManagerMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $giftMessageManagerMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $helperMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $giftMessageMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $quoteMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $billingAddressMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $shippingAddressMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $storeMock; - - protected function setUp() - { - $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - - $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); - $this->storeManagerMock = $this->getMock('\Magento\Store\Model\StoreManagerInterface'); - $this->giftMessageManagerMock = - $this->getMock('\Magento\GiftMessage\Model\GiftMessageManager', [], [], '', false); - $this->helperMock = $this->getMock('\Magento\GiftMessage\Helper\Message', [], [], '', false); - $this->giftMessageMock = $this->getMock('\Magento\GiftMessage\Service\V1\Data\Message', [], [], '', false); - $this->quoteMock = $this->getMock( - '\Magento\Quote\Model\Quote', - [ - 'getItemsCount', - 'isVirtual', - 'getBillingAddress', - 'getShippingAddress', - 'getItemById', - '__wakeup' - ], - [], - '', - false - ); - $this->billingAddressMock = - $this->getMock('\Magento\Quote\Model\Quote\Address', ['getCountryId', '__wakeup'], [], '', false); - $this->shippingAddressMock = - $this->getMock('\Magento\Quote\Model\Quote\Address', ['getCountryId', '__wakeup'], [], '', false); - $this->storeMock = $this->getMock('\Magento\Store\Model\Store', [], [], '', false); - - $this->service = $objectManager->getObject( - 'Magento\GiftMessage\Service\V1\WriteService', - [ - 'quoteRepository' => $this->quoteRepositoryMock, - 'storeManager' => $this->storeManagerMock, - 'giftMessageManager' => $this->giftMessageManagerMock, - 'helper' => $this->helperMock - ] - ); - } - - /** - * @expectedException \Magento\Framework\Exception\InputException - * @expectedExceptionMessage Gift Messages is not applicable for empty cart - */ - public function testSetForQuoteWithInputException() - { - $cartId = 665; - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($this->quoteMock)); - $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(0)); - - $this->service->setForQuote($cartId, $this->giftMessageMock); - } - - /** - * @expectedException \Magento\Framework\Exception\State\InvalidTransitionException - * @expectedExceptionMessage Gift Messages is not applicable for virtual products - */ - public function testSetForQuoteWithInvalidTransitionException() - { - $cartId = 665; - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($this->quoteMock)); - $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(1)); - $this->quoteMock->expects($this->once())->method('isVirtual')->will($this->returnValue(true)); - - $this->service->setForQuote($cartId, $this->giftMessageMock); - } - - public function testSetForQuote() - { - $cartId = 665; - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($this->quoteMock)); - $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(1)); - $this->quoteMock->expects($this->once())->method('isVirtual')->will($this->returnValue(false)); - $this->quoteMock->expects($this->once()) - ->method('getBillingAddress') - ->will($this->returnValue($this->billingAddressMock)); - $this->billingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(12)); - $this->quoteMock->expects($this->once()) - ->method('getShippingAddress') - ->will($this->returnValue($this->shippingAddressMock)); - $this->shippingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(13)); - $this->storeManagerMock->expects($this->once())->method('getStore')->will($this->returnValue($this->storeMock)); - $this->helperMock->expects($this->once()) - ->method('getIsMessagesAvailable') - ->with('', $this->quoteMock, $this->storeMock) - ->will($this->returnValue(true)); - $this->giftMessageMock->expects($this->once())->method('getSender')->will($this->returnValue('sender')); - $this->giftMessageMock->expects($this->once())->method('getRecipient')->will($this->returnValue('recipient')); - $this->giftMessageMock->expects($this->once())->method('getMessage')->will($this->returnValue('Message')); - $message['quote'][null] = - [ - 'from' => 'sender', - 'to' => 'recipient', - 'message' => 'Message', - ]; - $this->giftMessageManagerMock->expects($this->once()) - ->method('add') - ->with($message, $this->quoteMock) - ->will($this->returnValue($this->giftMessageManagerMock)); - - $this->assertTrue($this->service->setForQuote($cartId, $this->giftMessageMock)); - } - - /** - * @expectedException \Magento\Framework\Exception\NoSuchEntityException - * @expectedExceptionMessage There is no product with provided itemId: 1 in the cart - */ - public function testSetForItemWithNoSuchEntityException() - { - $cartId = 665; - $itemId = 1; - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($this->quoteMock)); - $this->quoteMock->expects($this->once())->method('getItemById')->with($itemId)->will($this->returnValue(null)); - - $this->service->setForItem($cartId, $this->giftMessageMock, $itemId); - } - - /** - * @expectedException \Magento\Framework\Exception\State\InvalidTransitionException - * @expectedExceptionMessage Gift Messages is not applicable for virtual products - */ - public function testSetForItemWithInvalidTransitionException() - { - $cartId = 665; - $itemId = 1; - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($this->quoteMock)); - $quoteItem = $this->getMock('\Magento\Quote\Model\Quote\Item', ['getIsVirtual', '__wakeup'], [], '', false); - $this->quoteMock->expects($this->once()) - ->method('getItemById') - ->with($itemId) - ->will($this->returnValue($quoteItem)); - $quoteItem->expects($this->once())->method('getIsVirtual')->will($this->returnValue(1)); - - $this->service->setForItem($cartId, $this->giftMessageMock, $itemId); - } - - public function testSetForItem() - { - $cartId = 665; - $itemId = 1; - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($this->quoteMock)); - $quoteItem = $this->getMock('\Magento\Quote\Model\Quote\Item', ['getIsVirtual', '__wakeup'], [], '', false); - $this->quoteMock->expects($this->once()) - ->method('getItemById') - ->with($itemId) - ->will($this->returnValue($quoteItem)); - $quoteItem->expects($this->once())->method('getIsVirtual')->will($this->returnValue(0)); - $this->quoteMock->expects($this->once()) - ->method('getBillingAddress') - ->will($this->returnValue($this->billingAddressMock)); - $this->billingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(12)); - $this->quoteMock->expects($this->once()) - ->method('getShippingAddress') - ->will($this->returnValue($this->shippingAddressMock)); - $this->shippingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(13)); - $this->storeManagerMock->expects($this->once())->method('getStore')->will($this->returnValue($this->storeMock)); - $this->helperMock->expects($this->once()) - ->method('getIsMessagesAvailable') - ->with('items', $this->quoteMock, $this->storeMock) - ->will($this->returnValue(true)); - $this->giftMessageMock->expects($this->once())->method('getSender')->will($this->returnValue('sender')); - $this->giftMessageMock->expects($this->once())->method('getRecipient')->will($this->returnValue('recipient')); - $this->giftMessageMock->expects($this->once())->method('getMessage')->will($this->returnValue('Message')); - $message['quote_item'][1] = - [ - 'from' => 'sender', - 'to' => 'recipient', - 'message' => 'Message', - ]; - $this->giftMessageManagerMock->expects($this->once()) - ->method('add') - ->with($message, $this->quoteMock) - ->will($this->returnValue($this->giftMessageManagerMock)); - - $this->assertTrue($this->service->setForItem($cartId, $this->giftMessageMock, $itemId)); - } - - /** - * @expectedException \Magento\Framework\Exception\State\InvalidTransitionException - * @expectedExceptionMessage Billing address is not set - */ - public function testSetMessageEmptyBillingAddressException() - { - $cartId = 665; - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($this->quoteMock)); - $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(1)); - $this->quoteMock->expects($this->once())->method('isVirtual')->will($this->returnValue(false)); - $this->quoteMock->expects($this->once()) - ->method('getBillingAddress') - ->will($this->returnValue($this->billingAddressMock)); - $this->billingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(null)); - - $this->service->setForQuote($cartId, $this->giftMessageMock); - } - - /** - * @expectedException \Magento\Framework\Exception\State\InvalidTransitionException - * @expectedExceptionMessage Shipping address is not set - */ - public function testSetMessageEmptyShippingAddressException() - { - $cartId = 665; - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($this->quoteMock)); - $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(1)); - $this->quoteMock->expects($this->once())->method('isVirtual')->will($this->returnValue(false)); - $this->quoteMock->expects($this->once()) - ->method('getBillingAddress') - ->will($this->returnValue($this->billingAddressMock)); - $this->billingAddressMock->expects($this->any())->method('getCountryId')->will($this->returnValue(12)); - $this->quoteMock->expects($this->once()) - ->method('getShippingAddress') - ->will($this->returnValue($this->shippingAddressMock)); - $this->shippingAddressMock->expects($this->any())->method('getCountryId')->will($this->returnValue(null)); - - $this->service->setForQuote($cartId, $this->giftMessageMock); - } - - /** - * @expectedException \Magento\Framework\Exception\CouldNotSaveException - * @expectedExceptionMessage Gift Message is not available - */ - public function testSetMessageGiftMessageIsNotAvailableException() - { - $cartId = 665; - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($this->quoteMock)); - $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(1)); - $this->quoteMock->expects($this->once())->method('isVirtual')->will($this->returnValue(false)); - $this->quoteMock->expects($this->once()) - ->method('getBillingAddress') - ->will($this->returnValue($this->billingAddressMock)); - $this->billingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(12)); - $this->quoteMock->expects($this->once()) - ->method('getShippingAddress') - ->will($this->returnValue($this->shippingAddressMock)); - $this->shippingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(13)); - $this->storeManagerMock->expects($this->once())->method('getStore')->will($this->returnValue($this->storeMock)); - $this->helperMock->expects($this->once()) - ->method('getIsMessagesAvailable') - ->with('', $this->quoteMock, $this->storeMock) - ->will($this->returnValue(false)); - - $this->service->setForQuote($cartId, $this->giftMessageMock); - } - - /** - * @expectedException \Magento\Framework\Exception\CouldNotSaveException - * @expectedExceptionMessage Could not add gift message to shopping cart - */ - public function testSetMessageCouldNotAddGiftMessageException() - { - $cartId = 665; - - $this->quoteRepositoryMock->expects($this->once()) - ->method('getActive') - ->with($cartId) - ->will($this->returnValue($this->quoteMock)); - $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(1)); - $this->quoteMock->expects($this->once())->method('isVirtual')->will($this->returnValue(false)); - $this->quoteMock->expects($this->once()) - ->method('getBillingAddress') - ->will($this->returnValue($this->billingAddressMock)); - $this->billingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(12)); - $this->quoteMock->expects($this->once()) - ->method('getShippingAddress') - ->will($this->returnValue($this->shippingAddressMock)); - $this->shippingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue(13)); - $this->storeManagerMock->expects($this->once())->method('getStore')->will($this->returnValue($this->storeMock)); - $this->helperMock->expects($this->once()) - ->method('getIsMessagesAvailable') - ->with('', $this->quoteMock, $this->storeMock) - ->will($this->returnValue(true)); - $this->giftMessageMock->expects($this->once())->method('getSender')->will($this->returnValue('sender')); - $this->giftMessageMock->expects($this->once())->method('getRecipient')->will($this->returnValue('recipient')); - $this->giftMessageMock->expects($this->once())->method('getMessage')->will($this->returnValue('Message')); - $message['quote'][null] = - [ - 'from' => 'sender', - 'to' => 'recipient', - 'message' => 'Message', - ]; - $exception = - new \Magento\Framework\Exception\CouldNotSaveException('Could not add gift message to shopping cart'); - $this->giftMessageManagerMock->expects($this->once()) - ->method('add') - ->with($message, $this->quoteMock) - ->will($this->throwException($exception)); - - $this->service->setForQuote($cartId, $this->giftMessageMock); - } -} -- GitLab From 17af48a54b649b5a339ecfe85de3b59bf59588f0 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Tue, 20 Jan 2015 12:11:37 +0200 Subject: [PATCH 072/114] MAGETWO-32501: Implement Cart Service interfaces --- app/code/Magento/Directory/Model/Currency.php | 81 ++++++++++++++++++- .../Magento/Quote/Api/Data/CartInterface.php | 2 +- .../Api/Data/CurrencyInterface.php | 2 +- app/code/Magento/Quote/Model/Quote.php | 23 +++++- app/code/Magento/Quote/etc/di.xml | 1 + .../Quote/Api/CartManagementInterfaceTest.php | 9 +-- .../Quote/Api/CartRepositoryInterfaceTest.php | 18 ++--- 7 files changed, 117 insertions(+), 19 deletions(-) rename app/code/Magento/{Checkout => Quote}/Api/Data/CurrencyInterface.php (97%) diff --git a/app/code/Magento/Directory/Model/Currency.php b/app/code/Magento/Directory/Model/Currency.php index c20e8f7e80a..06b21df852b 100644 --- a/app/code/Magento/Directory/Model/Currency.php +++ b/app/code/Magento/Directory/Model/Currency.php @@ -14,7 +14,8 @@ namespace Magento\Directory\Model; use Magento\Directory\Exception; use Magento\Directory\Model\Currency\Filter; -class Currency extends \Magento\Framework\Model\AbstractModel +class Currency extends \Magento\Framework\Model\AbstractExtensibleModel implements + \Magento\Quote\Api\Data\CurrencyInterface { /** * CONFIG path constants @@ -65,6 +66,8 @@ class Currency extends \Magento\Framework\Model\AbstractModel /** * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService + * @param \Magento\Framework\Api\AttributeDataBuilder $customAttributeBuilder * @param \Magento\Framework\Locale\FormatInterface $localeFormat * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Directory\Helper\Data $directoryHelper @@ -77,6 +80,8 @@ class Currency extends \Magento\Framework\Model\AbstractModel public function __construct( \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, + \Magento\Framework\Api\MetadataServiceInterface $metadataService, + \Magento\Framework\Api\AttributeDataBuilder $customAttributeBuilder, \Magento\Framework\Locale\FormatInterface $localeFormat, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Directory\Helper\Data $directoryHelper, @@ -86,7 +91,15 @@ class Currency extends \Magento\Framework\Model\AbstractModel \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = [] ) { - parent::__construct($context, $registry, $resource, $resourceCollection, $data); + parent::__construct( + $context, + $registry, + $metadataService, + $customAttributeBuilder, + $resource, + $resourceCollection, + $data + ); $this->_localeFormat = $localeFormat; $this->_storeManager = $storeManager; $this->_directoryHelper = $directoryHelper; @@ -379,4 +392,68 @@ class Currency extends \Magento\Framework\Model\AbstractModel $this->_getResource()->saveRates($rates); return $this; } + + /** + * {@inheritdoc} + */ + public function getGlobalCurrencyCode() + { + return $this->getData('global_currency_code'); + } + + /** + * {@inheritdoc} + */ + public function getBaseCurrencyCode() + { + return $this->getData('base_currency_code'); + } + + /** + * {@inheritdoc} + */ + public function getStoreCurrencyCode() + { + return $this->getData('store_currency_code'); + } + + /** + * {@inheritdoc} + */ + public function getQuoteCurrencyCode() + { + return $this->getData('quote_currency_code'); + } + + /** + * {@inheritdoc} + */ + public function getStoreToBaseRate() + { + return $this->getData('store_to_base_rate'); + } + + /** + * {@inheritdoc} + */ + public function getStoreToQuoteRate() + { + return $this->getData('store_to_quote_rate'); + } + + /** + * {@inheritdoc} + */ + public function getBaseToGlobalRate() + { + return $this->getData('base_to_global_rate'); + } + + /** + * {@inheritdoc} + */ + public function getBaseToQuoteRate() + { + return $this->getData('base_to_quote_rate'); + } } diff --git a/app/code/Magento/Quote/Api/Data/CartInterface.php b/app/code/Magento/Quote/Api/Data/CartInterface.php index 32d3b6ea7c3..2bf91a70df7 100644 --- a/app/code/Magento/Quote/Api/Data/CartInterface.php +++ b/app/code/Magento/Quote/Api/Data/CartInterface.php @@ -124,7 +124,7 @@ interface CartInterface extends \Magento\Framework\Api\ExtensibleDataInterface /** * Returns information about quote currency, such as code, exchange rate, and so on. * - * @return \Magento\Checkout\Api\Data\CurrencyInterface|null Quote currency information. Otherwise, null. + * @return \Magento\Quote\Api\Data\CurrencyInterface|null Quote currency information. Otherwise, null. */ public function getCurrency(); diff --git a/app/code/Magento/Checkout/Api/Data/CurrencyInterface.php b/app/code/Magento/Quote/Api/Data/CurrencyInterface.php similarity index 97% rename from app/code/Magento/Checkout/Api/Data/CurrencyInterface.php rename to app/code/Magento/Quote/Api/Data/CurrencyInterface.php index 90db76ae2ee..8db3fbeccce 100644 --- a/app/code/Magento/Checkout/Api/Data/CurrencyInterface.php +++ b/app/code/Magento/Quote/Api/Data/CurrencyInterface.php @@ -3,7 +3,7 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Checkout\Api\Data; +namespace Magento\Quote\Api\Data; /** * @see \Magento\Checkout\Service\V1\Data\Cart\Currency diff --git a/app/code/Magento/Quote/Model/Quote.php b/app/code/Magento/Quote/Model/Quote.php index 07f737b346f..e0b7052228f 100644 --- a/app/code/Magento/Quote/Model/Quote.php +++ b/app/code/Magento/Quote/Model/Quote.php @@ -322,6 +322,11 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C */ protected $totalsBuilder; + /** + * @var \Magento\Quote\Api\Data\CurrencyDataBuilder + */ + protected $currencyBuilder; + /** * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry @@ -354,6 +359,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C * @param \Magento\Quote\Api\Data\TotalsDataBuilder $totalsBuilder * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService * @param \Magento\Framework\Api\AttributeDataBuilder $attributeDataBuilder + * @param \Magento\Quote\Api\Data\CurrencyDataBuilder $currencyBuilder * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data @@ -390,6 +396,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C \Magento\Quote\Api\Data\TotalsDataBuilder $totalsBuilder, \Magento\Framework\Api\MetadataServiceInterface $metadataService, \Magento\Framework\Api\AttributeDataBuilder $attributeDataBuilder, + \Magento\Quote\Api\Data\CurrencyDataBuilder $currencyBuilder, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = [] @@ -421,6 +428,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C $this->customerRepository = $customerRepository; $this->extensibleDataObjectConverter = $extensibleDataObjectConverter; $this->totalsBuilder = $totalsBuilder; + $this->currencyBuilder = $currencyBuilder; parent::__construct( $context, $registry, @@ -447,7 +455,20 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C */ public function getCurrency() { - return $this->_getData('currency'); + $currency = $this->getData('currency'); + if (!$currency) { + $this->currencyBuilder + ->setGlobalCurrencyCode($this->getGlobalCurrencyCode()) + ->setBaseCurrencyCode($this->getBaseCurrencyCode()) + ->setStoreCurrencyCode($this->getStoreCurrencyCode()) + ->setQuoteCurrencyCode($this->getQuoteCurrencyCode()) + ->setStoreToBaseRate($this->getStoreToBaseRate()) + ->setStoreToQuoteRate($this->getStoreToQuoteRate()) + ->setBaseToGlobalRate($this->getBaseToGlobalRate()) + ->setBaseToQuoteRate($this->getBaseToQuoteRate()); + $currency = $this->currencyBuilder->create(); + } + return $currency; } /** diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index c8042fa9539..ad1ce5ba7f4 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -30,4 +30,5 @@ <preference for="Magento\Quote\Api\CartTotalRepositoryInterface" type="\Magento\Quote\Model\Cart\CartTotalRepository" /> <preference for="Magento\Quote\Api\Data\TotalsInterface" type="\Magento\Quote\Model\Cart\Totals" /> <preference for="Magento\Quote\Api\Data\TotalsItemInterface" type="\Magento\Quote\Model\Quote\Cart\Totals\Item" /> + <preference for="Magento\Quote\Api\Data\CurrencyInterface" type="\Magento\Directory\Model\Currency" /> </config> diff --git a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php index 9d13c67cf34..0515d3c219b 100644 --- a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php @@ -328,7 +328,6 @@ class CartManagementInterfaceTest extends WebapiAbstract $this->assertEquals($cart->getId(), $cartData['id']); $this->assertEquals($cart->getCreatedAt(), $cartData['created_at']); $this->assertEquals($cart->getUpdatedAt(), $cartData['updated_at']); - $this->assertEquals($cart->getStoreId(), $cartData['store_id']); $this->assertEquals($cart->getIsActive(), $cartData['is_active']); $this->assertEquals($cart->getIsVirtual(), $cartData['is_virtual']); $this->assertEquals($cart->getOrigOrderId(), $cartData['orig_order_id']); @@ -336,10 +335,10 @@ class CartManagementInterfaceTest extends WebapiAbstract $this->assertEquals($cart->getItemsQty(), $cartData['items_qty']); $this->assertContains('customer', $cartData); - $this->assertEquals(0, $cartData['customer']['is_guest']); - $this->assertContains('totals', $cartData); - $this->assertEquals($cart->getSubtotal(), $cartData['totals']['subtotal']); - $this->assertEquals($cart->getGrandTotal(), $cartData['totals']['grand_total']); + $this->assertEquals(false, $cartData['customer_is_guest']); + $this->assertContains('totals_object', $cartData); + $this->assertEquals($cart->getSubtotal(), $cartData['totals_object']['subtotal']); + $this->assertEquals($cart->getGrandTotal(), $cartData['totals_object']['grand_total']); $this->assertContains('currency', $cartData); $this->assertEquals($cart->getGlobalCurrencyCode(), $cartData['currency']['global_currency_code']); $this->assertEquals($cart->getBaseCurrencyCode(), $cartData['currency']['base_currency_code']); diff --git a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php index 2e65020f8f1..76ce3569cd3 100644 --- a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php @@ -115,15 +115,15 @@ class CartRepositoryInterfaceTest extends WebapiAbstract $this->assertContains('totals_object', $cartData); $this->assertEquals($cart->getSubtotal(), $cartData['totals_object']['subtotal']); $this->assertEquals($cart->getGrandTotal(), $cartData['totals_object']['grand_total']); -// $this->assertContains('currency', $cartData); -// $this->assertEquals($cart->getGlobalCurrencyCode(), $cartData['currency']['global_currency_code']); -// $this->assertEquals($cart->getBaseCurrencyCode(), $cartData['currency']['base_currency_code']); -// $this->assertEquals($cart->getQuoteCurrencyCode(), $cartData['currency']['quote_currency_code']); -// $this->assertEquals($cart->getStoreCurrencyCode(), $cartData['currency']['store_currency_code']); -// $this->assertEquals($cart->getBaseToGlobalRate(), $cartData['currency']['base_to_global_rate']); -// $this->assertEquals($cart->getBaseToQuoteRate(), $cartData['currency']['base_to_quote_rate']); -// $this->assertEquals($cart->getStoreToBaseRate(), $cartData['currency']['store_to_base_rate']); -// $this->assertEquals($cart->getStoreToQuoteRate(), $cartData['currency']['store_to_quote_rate']); + $this->assertContains('currency', $cartData); + $this->assertEquals($cart->getGlobalCurrencyCode(), $cartData['currency']['global_currency_code']); + $this->assertEquals($cart->getBaseCurrencyCode(), $cartData['currency']['base_currency_code']); + $this->assertEquals($cart->getQuoteCurrencyCode(), $cartData['currency']['quote_currency_code']); + $this->assertEquals($cart->getStoreCurrencyCode(), $cartData['currency']['store_currency_code']); + $this->assertEquals($cart->getBaseToGlobalRate(), $cartData['currency']['base_to_global_rate']); + $this->assertEquals($cart->getBaseToQuoteRate(), $cartData['currency']['base_to_quote_rate']); + $this->assertEquals($cart->getStoreToBaseRate(), $cartData['currency']['store_to_base_rate']); + $this->assertEquals($cart->getStoreToQuoteRate(), $cartData['currency']['store_to_quote_rate']); } /** -- GitLab From c90ddfccfd01163f45a92e11c997311bee10ac7e Mon Sep 17 00:00:00 2001 From: Serhiy Shkolyarenko <sshkolyarenko@ebay.com> Date: Tue, 20 Jan 2015 12:14:33 +0200 Subject: [PATCH 073/114] MAGETWO-32501: Implement Cart Service interfaces added unit test to quoteRepository --- .../Quote/Model/QuoteRepositoryTest.php | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteRepositoryTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteRepositoryTest.php index 0f1d190d363..c554a6a4661 100644 --- a/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteRepositoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteRepositoryTest.php @@ -8,6 +8,7 @@ namespace Magento\Quote\Model; use Magento\Quote\Model\QuoteRepository; +use Magento\Framework\Api\SearchCriteria; class QuoteRepositoryTest extends \PHPUnit_Framework_TestCase { @@ -36,6 +37,16 @@ class QuoteRepositoryTest extends \PHPUnit_Framework_TestCase */ protected $quoteMock; + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $searchResultsBuilderMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $quoteCollectionMock; + protected function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); @@ -51,11 +62,23 @@ class QuoteRepositoryTest extends \PHPUnit_Framework_TestCase false ); $this->storeMock = $this->getMock('\Magento\Store\Model\Store', [], [], '', false); + $this->searchResultsBuilderMock = $this->getMock( + '\Magento\Quote\Api\Data\CartSearchResultsDataBuilder', + [], + [], + '', + false + ); + + $this->quoteCollectionMock = $this->getMock('Magento\Quote\Model\Resource\Quote\Collection', [], [], '', false); + $this->model = $objectManager->getObject( 'Magento\Quote\Model\QuoteRepository', [ 'quoteFactory' => $this->quoteFactoryMock, 'storeManager' => $this->storeManagerMock, + 'searchResultsBuilder' => $this->searchResultsBuilderMock, + 'quoteCollection' => $this->quoteCollectionMock, ] ); } @@ -280,4 +303,77 @@ class QuoteRepositoryTest extends \PHPUnit_Framework_TestCase $this->model->delete($this->quoteMock); } + + /** + * @param int $direction + * @param string $expectedDirection + * @dataProvider getListSuccessDataProvider + */ + public function testGetListSuccess($direction, $expectedDirection) + { + $searchResult = $this->getMock('\Magento\Quote\Api\Data\CartSearchResultsInterface', [], [], '', false); + $searchCriteriaMock = $this->getMock('\Magento\Framework\Api\SearchCriteria', [], [], '', false); + $cartMock = $this->getMock('Magento\Payment\Model\Cart', [], [], '', false); + $filterMock = $this->getMock('\Magento\Framework\Api\Filter', [], [], '', false); + $pageSize = 10; + + $this->searchResultsBuilderMock + ->expects($this->once()) + ->method('setSearchCriteria'); + + $filterGroupMock = $this->getMock('\Magento\Framework\Api\Search\FilterGroup', [], [], '', false); + $searchCriteriaMock + ->expects($this->any()) + ->method('getFilterGroups') + ->will($this->returnValue([$filterGroupMock])); + + //addFilterGroupToCollection() checks + $filterGroupMock->expects($this->any())->method('getFilters')->will($this->returnValue([$filterMock])); + $filterMock->expects($this->once())->method('getField')->will($this->returnValue('store_id')); + $filterMock->expects($this->any())->method('getConditionType')->will($this->returnValue('eq')); + $filterMock->expects($this->once())->method('getValue')->will($this->returnValue('filter_value')); + + //back in getList() + $this->quoteCollectionMock->expects($this->once())->method('getSize')->willReturn($pageSize); + $this->searchResultsBuilderMock->expects($this->once())->method('setTotalCount')->with($pageSize); + $sortOrderMock = $this->getMockBuilder('Magento\Framework\Api\SortOrder') + ->setMethods(['getField', 'getDirection']) + ->disableOriginalConstructor() + ->getMock(); + + //foreach cycle + $searchCriteriaMock + ->expects($this->once()) + ->method('getSortOrders') + ->will($this->returnValue([$sortOrderMock])); + $sortOrderMock->expects($this->once())->method('getField')->will($this->returnValue('id')); + $sortOrderMock->expects($this->once())->method('getDirection')->will($this->returnValue($direction)); + $this->quoteCollectionMock->expects($this->once())->method('addOrder')->with('id', $expectedDirection); + + + $searchCriteriaMock->expects($this->once())->method('getCurrentPage')->will($this->returnValue(1)); + $searchCriteriaMock->expects($this->once())->method('getPageSize')->will($this->returnValue(10)); + $this->quoteCollectionMock->expects($this->once())->method('setCurPage')->with(1); + $this->quoteCollectionMock->expects($this->once())->method('setPageSize')->with(10); + + + $this->quoteCollectionMock->expects($this->once())->method('getItems')->willReturn([$cartMock]); + $this->searchResultsBuilderMock->expects($this->once())->method('setItems')->with([$cartMock]); + $this->searchResultsBuilderMock + ->expects($this->once()) + ->method('create') + ->will($this->returnValue($searchResult)); + $this->assertEquals($searchResult, $this->model->getList($searchCriteriaMock)); + } + + /** + * @return array + */ + public function getListSuccessDataProvider() + { + return [ + 'asc' => [SearchCriteria::SORT_ASC, 'ASC'], + 'desc' => [SearchCriteria::SORT_DESC, 'DESC'] + ]; + } } -- GitLab From 5f1a1b7d0f9fa9c2f5e447d09fdab369149d6b6f Mon Sep 17 00:00:00 2001 From: Serhiy Shkolyarenko <sshkolyarenko@ebay.com> Date: Tue, 20 Jan 2015 12:34:14 +0200 Subject: [PATCH 074/114] MAGETWO-32501: Implement Cart Service interfaces updated plugins --- ...itePlugin.php => CartManagementPlugin.php} | 6 +++--- ...eadPlugin.php => CartRepositoryPlugin.php} | 14 ++++++------- .../Magento/Checkout/etc/webapi_rest/di.xml | 8 ++++---- .../Magento/Checkout/etc/webapi_soap/di.xml | 4 ++-- .../Model/Cart/Access/ReadPluginTest.php | 20 +++++++++---------- .../Model/Cart/Access/WritePluginTest.php | 4 ++-- 6 files changed, 28 insertions(+), 28 deletions(-) rename app/code/Magento/Checkout/Model/Cart/Access/{WritePlugin.php => CartManagementPlugin.php} (87%) rename app/code/Magento/Checkout/Model/Cart/Access/{ReadPlugin.php => CartRepositoryPlugin.php} (80%) diff --git a/app/code/Magento/Checkout/Model/Cart/Access/WritePlugin.php b/app/code/Magento/Checkout/Model/Cart/Access/CartManagementPlugin.php similarity index 87% rename from app/code/Magento/Checkout/Model/Cart/Access/WritePlugin.php rename to app/code/Magento/Checkout/Model/Cart/Access/CartManagementPlugin.php index ee735b2e2ae..8f082e623c3 100644 --- a/app/code/Magento/Checkout/Model/Cart/Access/WritePlugin.php +++ b/app/code/Magento/Checkout/Model/Cart/Access/CartManagementPlugin.php @@ -9,7 +9,7 @@ namespace Magento\Checkout\Model\Cart\Access; use Magento\Framework\Exception\AuthorizationException; use Magento\Authorization\Model\UserContextInterface; -class WritePlugin +class CartManagementPlugin { /** * @var UserContextInterface @@ -35,7 +35,7 @@ class WritePlugin /** * Check whether access is allowed for create cart resource * - * @param \Magento\Checkout\Service\V1\Cart\WriteServiceInterface $subject + * @param \Magento\Quote\Api\CartManagementInterface $subject * @param int $cartId * @param int $customerId * @@ -44,7 +44,7 @@ class WritePlugin * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeAssignCustomer( - \Magento\Checkout\Service\V1\Cart\WriteServiceInterface $subject, + \Magento\Quote\Api\CartManagementInterface $subject, $cartId, $customerId ) { diff --git a/app/code/Magento/Checkout/Model/Cart/Access/ReadPlugin.php b/app/code/Magento/Checkout/Model/Cart/Access/CartRepositoryPlugin.php similarity index 80% rename from app/code/Magento/Checkout/Model/Cart/Access/ReadPlugin.php rename to app/code/Magento/Checkout/Model/Cart/Access/CartRepositoryPlugin.php index 3424273af6b..9bf66748d66 100644 --- a/app/code/Magento/Checkout/Model/Cart/Access/ReadPlugin.php +++ b/app/code/Magento/Checkout/Model/Cart/Access/CartRepositoryPlugin.php @@ -10,7 +10,7 @@ use Magento\Framework\Api\SearchCriteria; use Magento\Framework\Exception\AuthorizationException; use Magento\Authorization\Model\UserContextInterface; -class ReadPlugin +class CartRepositoryPlugin { /** * @var UserContextInterface @@ -36,15 +36,15 @@ class ReadPlugin /** * Check whether access is allowed for cart resource * - * @param \Magento\Checkout\Service\V1\Cart\ReadServiceInterface $subject + * @param \Magento\Quote\Api\CartRepositoryInterface $subject * @param int $cartId * * @return void * @throws AuthorizationException if access denied * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function beforeGetCart( - \Magento\Checkout\Service\V1\Cart\ReadServiceInterface $subject, + public function beforeGet( + \Magento\Quote\Api\CartRepositoryInterface $subject, $cartId ) { if (!in_array($this->userContext->getUserType(), $this->allowedUserTypes)) { @@ -55,15 +55,15 @@ class ReadPlugin /** * Check whether access is allowed for cart list resource * - * @param \Magento\Checkout\Service\V1\Cart\ReadServiceInterface $subject + * @param \Magento\Quote\Api\CartRepositoryInterface $subject * @param SearchCriteria $searchCriteria * * @return void * @throws AuthorizationException if access denied * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function beforeGetCartList( - \Magento\Checkout\Service\V1\Cart\ReadServiceInterface $subject, + public function beforeGetList( + \Magento\Quote\Api\CartRepositoryInterface $subject, SearchCriteria $searchCriteria ) { if (!in_array($this->userContext->getUserType(), $this->allowedUserTypes)) { diff --git a/app/code/Magento/Checkout/etc/webapi_rest/di.xml b/app/code/Magento/Checkout/etc/webapi_rest/di.xml index 637fd9850d7..6507ad23adf 100644 --- a/app/code/Magento/Checkout/etc/webapi_rest/di.xml +++ b/app/code/Magento/Checkout/etc/webapi_rest/di.xml @@ -6,10 +6,10 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> - <type name="Magento\Checkout\Service\V1\Cart\ReadServiceInterface"> - <plugin name="admin_access" type="\Magento\Checkout\Model\Cart\Access\ReadPlugin" /> + <type name="Magento\Quote\Api\CartRepositoryInterface"> + <plugin name="admin_access" type="\Magento\Checkout\Model\Cart\Access\CartRepositoryPlugin" /> </type> - <type name="Magento\Checkout\Service\V1\Cart\WriteServiceInterface"> - <plugin name="admin_access" type="\Magento\Checkout\Model\Cart\Access\WritePlugin" /> + <type name="Magento\Quote\Api\CartManagementInterface"> + <plugin name="admin_access" type="\Magento\Checkout\Model\Cart\Access\CartManagementPlugin" /> </type> </config> diff --git a/app/code/Magento/Checkout/etc/webapi_soap/di.xml b/app/code/Magento/Checkout/etc/webapi_soap/di.xml index 637fd9850d7..f7d229f59a5 100644 --- a/app/code/Magento/Checkout/etc/webapi_soap/di.xml +++ b/app/code/Magento/Checkout/etc/webapi_soap/di.xml @@ -7,9 +7,9 @@ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Checkout\Service\V1\Cart\ReadServiceInterface"> - <plugin name="admin_access" type="\Magento\Checkout\Model\Cart\Access\ReadPlugin" /> + <plugin name="admin_access" type="\Magento\Checkout\Model\Cart\Access\CartRepositoryPlugin" /> </type> <type name="Magento\Checkout\Service\V1\Cart\WriteServiceInterface"> - <plugin name="admin_access" type="\Magento\Checkout\Model\Cart\Access\WritePlugin" /> + <plugin name="admin_access" type="\Magento\Checkout\Model\Cart\Access\CartManagementPlugin" /> </type> </config> diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/ReadPluginTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/ReadPluginTest.php index 30f9984145a..acd616af0ed 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/ReadPluginTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/ReadPluginTest.php @@ -9,7 +9,7 @@ namespace Magento\Checkout\Model\Cart\Access; class ReadPluginTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Checkout\Model\Cart\Access\ReadPlugin + * @var \Magento\Checkout\Model\Cart\Access\CartRepositoryPlugin */ protected $model; @@ -26,18 +26,18 @@ class ReadPluginTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->userContextMock = $this->getMock('Magento\Authorization\Model\UserContextInterface'); - $this->subjectMock = $this->getMock('\Magento\Checkout\Service\V1\Cart\ReadServiceInterface'); - $this->model = new ReadPlugin($this->userContextMock); + $this->subjectMock = $this->getMock('\Magento\Quote\Api\CartRepositoryInterface'); + $this->model = new CartRepositoryPlugin($this->userContextMock); } /** * @param int $userType * @dataProvider successTypeDataProvider */ - public function testBeforeGetCartSuccess($userType) + public function testBeforeGetSuccess($userType) { $this->userContextMock->expects($this->once())->method('getUserType')->will($this->returnValue($userType)); - $this->model->beforeGetCart($this->subjectMock, 1); + $this->model->beforeGet($this->subjectMock, 1); } /** @@ -48,7 +48,7 @@ class ReadPluginTest extends \PHPUnit_Framework_TestCase { $this->userContextMock->expects($this->once())->method('getUserType') ->will($this->returnValue(\Magento\Authorization\Model\UserContextInterface::USER_TYPE_CUSTOMER)); - $this->model->beforeGetCart($this->subjectMock, 1); + $this->model->beforeGet($this->subjectMock, 1); } public function successTypeDataProvider() @@ -63,10 +63,10 @@ class ReadPluginTest extends \PHPUnit_Framework_TestCase * @param int $userType * @dataProvider successTypeDataProvider */ - public function testBeforeGetCartListSuccess($userType) + public function testBeforeGetCartSuccess($userType) { $this->userContextMock->expects($this->once())->method('getUserType')->will($this->returnValue($userType)); - $this->model->beforeGetCartList( + $this->model->beforeGetList( $this->subjectMock, $this->getMock('\Magento\Framework\Api\SearchCriteria', [], [], '', false) ); @@ -76,11 +76,11 @@ class ReadPluginTest extends \PHPUnit_Framework_TestCase * @expectedException \Magento\Framework\Exception\AuthorizationException * @expectedExceptionMessage Access denied */ - public function testBeforeGetCartListDenied() + public function testBeforeGetListDenied() { $this->userContextMock->expects($this->once())->method('getUserType') ->will($this->returnValue(\Magento\Authorization\Model\UserContextInterface::USER_TYPE_CUSTOMER)); - $this->model->beforeGetCartList( + $this->model->beforeGetList( $this->subjectMock, $this->getMock('\Magento\Framework\Api\SearchCriteria', [], [], '', false) ); diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/WritePluginTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/WritePluginTest.php index 903cd6e15d4..8b634651b11 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/WritePluginTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/WritePluginTest.php @@ -9,7 +9,7 @@ namespace Magento\Checkout\Model\Cart\Access; class WritePluginTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Checkout\Model\Cart\Access\WritePlugin + * @var \Magento\Checkout\Model\Cart\Access\CartManagementPlugin */ protected $model; @@ -27,7 +27,7 @@ class WritePluginTest extends \PHPUnit_Framework_TestCase { $this->userContextMock = $this->getMock('Magento\Authorization\Model\UserContextInterface'); $this->subjectMock = $this->getMock('\Magento\Checkout\Service\V1\Cart\WriteServiceInterface'); - $this->model = new WritePlugin($this->userContextMock); + $this->model = new CartManagementPlugin($this->userContextMock); } /** -- GitLab From 52b609b31b68249e7835ea67cc7d407d561d1262 Mon Sep 17 00:00:00 2001 From: Iryna Lagno <ilagno@ebay.com> Date: Tue, 20 Jan 2015 12:19:28 +0200 Subject: [PATCH 075/114] MAGETWO-32775: Prepare pull request for Checkout related modules MSC: -add obsolete namespace --- .../Checkout/Service/V1/Cart/ReadService.php | 191 ----------- .../Service/V1/Cart/ReadServiceInterface.php | 46 --- .../Checkout/Service/V1/Cart/WriteService.php | 188 ----------- .../Service/V1/Cart/WriteServiceInterface.php | 42 --- .../Magento/Checkout/Service/V1/Data/Cart.php | 296 ------------------ .../Checkout/Service/V1/Data/Cart/Coupon.php | 31 -- .../Service/V1/Data/Cart/CouponBuilder.php | 23 -- .../Service/V1/Data/Cart/Currency.php | 110 ------- .../Service/V1/Data/Cart/Customer.php | 200 ------------ .../Service/V1/Data/Cart/CustomerBuilder.php | 179 ----------- .../Service/V1/Data/Cart/CustomerMapper.php | 41 --- .../Checkout/Service/V1/Data/Cart/Item.php | 106 ------- .../Checkout/Service/V1/Data/CartBuilder.php | 210 ------------- .../Checkout/Service/V1/Data/CartMapper.php | 114 ------- .../Service/V1/Data/CartSearchResults.php | 22 -- .../V1/Data/CartSearchResultsBuilder.php | 54 ---- .../Service/V1/Data/PaymentMethod.php | 37 --- .../Legacy/_files/obsolete_namespaces.php | 3 +- .../V1/Data/Cart/CustomerMapperTest.php | 67 ---- .../Service/V1/Data/CartMapperTest.php | 171 ---------- 20 files changed, 2 insertions(+), 2129 deletions(-) delete mode 100644 app/code/Magento/Checkout/Service/V1/Cart/ReadService.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Cart/ReadServiceInterface.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Cart/WriteService.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Cart/WriteServiceInterface.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/Cart.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/Cart/Coupon.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/Cart/CouponBuilder.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/Cart/Currency.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/Cart/CustomerBuilder.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/Cart/CustomerMapper.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/Cart/Item.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/CartBuilder.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/CartMapper.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/CartSearchResults.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/CartSearchResultsBuilder.php delete mode 100644 app/code/Magento/Checkout/Service/V1/Data/PaymentMethod.php delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/CustomerMapperTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/CartMapperTest.php diff --git a/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php b/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php deleted file mode 100644 index 2b22baf6e95..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php +++ /dev/null @@ -1,191 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Cart; - -use Magento\Checkout\Service\V1\Data; -use Magento\Framework\Api\Search\FilterGroup; -use Magento\Framework\Api\SearchCriteria; -use Magento\Framework\Exception\InputException; -use Magento\Quote\Model\Quote; -use Magento\Quote\Model\QuoteRepository; -use Magento\Quote\Model\Resource\Quote\Collection as QuoteCollection; - -/** - * Cart read service object. - */ -class ReadService implements ReadServiceInterface -{ - /** - * Quote repository. - * - * @var QuoteRepository - */ - private $quoteRepository; - - /** - * Quote collection. - * - * @var QuoteCollection - */ - private $quoteCollection; - - /** - * Search results builder. - * - * @var Data\CartSearchResultsBuilder - */ - private $searchResultsBuilder; - - /** - * Cart mapper. - * - * @var Data\CartMapper - */ - private $cartMapper; - - /** - * Array of valid search fields. - * - * @var array - */ - private $validSearchFields = [ - 'id', 'store_id', 'created_at', 'updated_at', 'converted_at', 'is_active', 'is_virtual', - 'items_count', 'items_qty', 'checkout_method', 'reserved_order_id', 'orig_order_id', 'base_grand_total', - 'grand_total', 'base_subtotal', 'subtotal', 'base_subtotal_with_discount', 'subtotal_with_discount', - 'customer_is_guest', 'customer_id', 'customer_group_id', 'customer_id', 'customer_tax_class_id', - 'customer_email', 'global_currency_code', 'base_currency_code', 'store_currency_code', 'quote_currency_code', - 'store_to_base_rate', 'store_to_quote_rate', 'base_to_global_rate', 'base_to_quote_rate', - ]; - - /** - * Cart data object - quote field map. - * - * @var array - */ - private $searchFieldMap = [ - 'id' => 'entity_id', - ]; - - /** - * Constructs a cart read service object. - * - * @param QuoteRepository $quoteRepository Quote repository. - * @param QuoteCollection $quoteCollection Quote collection. - * @param Data\CartSearchResultsBuilder $searchResultsBuilder Search results builder. - * @param Data\CartMapper $cartMapper Cart mapper. - */ - public function __construct( - QuoteRepository $quoteRepository, - QuoteCollection $quoteCollection, - Data\CartSearchResultsBuilder $searchResultsBuilder, - Data\CartMapper $cartMapper - ) { - $this->quoteRepository = $quoteRepository; - $this->quoteCollection = $quoteCollection; - $this->searchResultsBuilder = $searchResultsBuilder; - $this->cartMapper = $cartMapper; - } - - /** - * {@inheritDoc} - * - * @param int $cartId The cart ID. - * @return \Magento\Checkout\Service\V1\Data\Cart Cart object. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - */ - public function getCart($cartId) - { - $quote = $this->quoteRepository->getActive($cartId); - return $this->cartMapper->map($quote); - } - - /** - * {@inheritDoc} - * - * @param int $customerId The customer ID. - * @return \Magento\Checkout\Service\V1\Data\Cart Cart object. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified customer does not exist. - */ - public function getCartForCustomer($customerId) - { - $quote = $this->quoteRepository->getActiveForCustomer($customerId); - return $this->cartMapper->map($quote); - } - - /** - * {@inheritDoc} - * - * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. - * @return \Magento\Checkout\Service\V1\Data\CartSearchResults Cart search results object. - */ - public function getCartList(SearchCriteria $searchCriteria) - { - $this->searchResultsBuilder->setSearchCriteria($searchCriteria); - - foreach ($searchCriteria->getFilterGroups() as $group) { - $this->addFilterGroupToCollection($group, $this->quoteCollection); - } - - $this->searchResultsBuilder->setTotalCount($this->quoteCollection->getSize()); - $sortOrders = $searchCriteria->getSortOrders(); - if ($sortOrders) { - foreach ($sortOrders as $sortOrder) { - $this->quoteCollection->addOrder( - $this->getQuoteSearchField($sortOrder->getField()), - $sortOrder->getDirection() == SearchCriteria::SORT_ASC ? 'ASC' : 'DESC' - ); - } - } - $this->quoteCollection->setCurPage($searchCriteria->getCurrentPage()); - $this->quoteCollection->setPageSize($searchCriteria->getPageSize()); - - $cartList = []; - /** @var Quote $quote */ - foreach ($this->quoteCollection as $quote) { - $cartList[] = $this->cartMapper->map($quote); - } - $this->searchResultsBuilder->setItems($cartList); - - return $this->searchResultsBuilder->create(); - } - - /** - * Adds a specified filter group to the specified quote collection. - * - * @param FilterGroup $filterGroup The filter group. - * @param QuoteCollection $collection The quote collection. - * @return void - * @throws InputException The specified filter group or quote collection does not exist. - */ - protected function addFilterGroupToCollection(FilterGroup $filterGroup, QuoteCollection $collection) - { - $fields = []; - $conditions = []; - foreach ($filterGroup->getFilters() as $filter) { - $fields[] = $this->getQuoteSearchField($filter->getField()); - $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq'; - $conditions[] = [$condition => $filter->getValue()]; - } - if ($fields) { - $collection->addFieldToFilter($fields, $conditions); - } - } - - /** - * Returns a mapped search field. - * - * @param string $field The field. - * @return string Mapped search field. - * @throws InputException The specified field cannot be used for search. - */ - protected function getQuoteSearchField($field) - { - if (!in_array($field, $this->validSearchFields)) { - throw new InputException("Field '{$field}' cannot be used for search."); - } - return isset($this->searchFieldMap[$field]) ? $this->searchFieldMap[$field] : $field; - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Cart/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Cart/ReadServiceInterface.php deleted file mode 100644 index 1c2b780cfff..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Cart/ReadServiceInterface.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Cart; - -use Magento\Framework\Api\SearchCriteria; - -/** - * Cart read service interface. - */ -interface ReadServiceInterface -{ - /** - * Enables an administrative user to return information for a specified cart. - * - * @param int $cartId The cart ID. - * @return \Magento\Checkout\Service\V1\Data\Cart Cart object. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. - * @deprecated - * @see \Magento\Checkout\Api\CartRepositoryInterface::get - */ - public function getCart($cartId); - - /** - * Returns information for the cart for a specified customer. - * - * @param int $customerId The customer ID. - * @return \Magento\Checkout\Service\V1\Data\Cart Cart object. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified customer does not exist. - * @deprecated - * @see \Magento\Checkout\Api\CartManagementInterface::getCartForCustomer - */ - public function getCartForCustomer($customerId); - - /** - * Enables administrative users to list carts that match specified search criteria. - * - * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. - * @return \Magento\Checkout\Service\V1\Data\CartSearchResults Cart search results object. - * @deprecated - * @see \Magento\Checkout\Api\CartRepositoryInterface::getList - */ - public function getCartList(SearchCriteria $searchCriteria); -} diff --git a/app/code/Magento/Checkout/Service/V1/Cart/WriteService.php b/app/code/Magento/Checkout/Service/V1/Cart/WriteService.php deleted file mode 100644 index df4943d8890..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Cart/WriteService.php +++ /dev/null @@ -1,188 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Cart; - -use Magento\Authorization\Model\UserContextInterface; -use Magento\Framework\Exception\CouldNotSaveException; -use Magento\Framework\Exception\StateException; - -/** - * Cart write service object. - */ -class WriteService implements WriteServiceInterface -{ - /** - * Quote repository. - * - * @var \Magento\Quote\Model\QuoteRepository - */ - protected $quoteRepository; - - /** - * Store manager interface. - * - * @var \Magento\Store\Model\StoreManagerInterface - */ - protected $storeManager; - - /** - * Customer registry. - * - * @var \Magento\Customer\Api\CustomerRepositoryInterface - */ - protected $customerRepository; - - /** - * User context interface. - * - * @var UserContextInterface - */ - protected $userContext; - - /** - * Quote factory. - * - * @var \Magento\Quote\Model\QuoteManagement - */ - protected $quoteServiceFactory; - - /** - * @var \Magento\Customer\Model\CustomerFactory - */ - protected $customerModelFactory; - - /** - * Constructs a cart write service object. - * - * @param \Magento\Quote\Model\QuoteRepository $quoteRepository Quote repository. - * @param \Magento\Store\Model\StoreManagerInterface $storeManager Store manager. - * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository Customer registry. - * @param UserContextInterface $userContext User context. - * @param \Magento\Quote\Model\QuoteManagement $quoteServiceFactory Quote service factory. - * @param \Magento\Customer\Model\CustomerFactory $customerModelFactory - */ - public function __construct( - \Magento\Quote\Model\QuoteRepository $quoteRepository, - \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository, - UserContextInterface $userContext, - \Magento\Quote\Model\QuoteManagement $quoteServiceFactory, - \Magento\Customer\Model\CustomerFactory $customerModelFactory - ) { - $this->quoteRepository = $quoteRepository; - $this->storeManager = $storeManager; - $this->customerRepository = $customerRepository; - $this->userContext = $userContext; - $this->quoteServiceFactory = $quoteServiceFactory; - $this->customerModelFactory = $customerModelFactory; - } - - /** - * {@inheritDoc} - * - * @throws \Magento\Framework\Exception\CouldNotSaveException The empty cart and quote could not be created. - * @return int Cart ID. - */ - public function create() - { - $quote = $this->userContext->getUserType() == UserContextInterface::USER_TYPE_CUSTOMER - ? $this->createCustomerCart() - : $this->createAnonymousCart(); - - try { - $this->quoteRepository->save($quote); - } catch (\Exception $e) { - throw new CouldNotSaveException('Cannot create quote'); - } - return $quote->getId(); - } - - /** - * Creates an anonymous cart. - * - * @return \Magento\Quote\Model\Quote Cart object. - */ - protected function createAnonymousCart() - { - $storeId = $this->storeManager->getStore()->getId(); - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->quoteRepository->create(); - $quote->setStoreId($storeId); - return $quote; - } - - /** - * Creates a cart for the currently logged-in customer. - * - * @return \Magento\Quote\Model\Quote Cart object. - * @throws CouldNotSaveException The cart could not be created. - */ - protected function createCustomerCart() - { - $storeId = $this->storeManager->getStore()->getId(); - $customer = $this->customerRepository->getById($this->userContext->getUserId()); - - try { - $this->quoteRepository->getActiveForCustomer($this->userContext->getUserId()); - } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { - throw new CouldNotSaveException('Cannot create quote'); - } - - /** @var \Magento\Quote\Model\Quote $quote */ - $quote = $this->quoteRepository->create(); - $quote->setStoreId($storeId); - $quote->setCustomer($customer); - $quote->setCustomerIsGuest(0); - return $quote; - } - - /** - * {@inheritDoc} - * - * @param int $cartId The cart ID. - * @param int $customerId The customer ID. - * @return boolean - * @throws \Magento\Framework\Exception\StateException The customer cannot be assigned to the specified cart: The cart belongs to a different store or is not anonymous, or the customer already has an active cart. - */ - public function assignCustomer($cartId, $customerId) - { - $storeId = $this->storeManager->getStore()->getId(); - $quote = $this->quoteRepository->getActive($cartId); - $customer = $this->customerRepository->getById($customerId); - $customerModel = $this->customerModelFactory->create(); - - if (!in_array($storeId, $customerModel->load($customerId)->getSharedStoreIds())) { - throw new StateException('Cannot assign customer to the given cart. The cart belongs to different store.'); - } - if ($quote->getCustomerId()) { - throw new StateException('Cannot assign customer to the given cart. The cart is not anonymous.'); - } - try { - $this->quoteRepository->getForCustomer($customerId); - throw new StateException('Cannot assign customer to the given cart. Customer already has active cart.'); - } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { - } - - $quote->setCustomer($customer); - $quote->setCustomerIsGuest(0); - $this->quoteRepository->save($quote); - return true; - } - - /** - * {@inheritDoc} - * - * @param int $cartId The cart ID. - * @return int Order ID. - */ - public function order($cartId) - { - $quote = $this->quoteRepository->getActive($cartId); - $order = $this->quoteServiceFactory->submit($quote); - return $order->getId(); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Cart/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Cart/WriteServiceInterface.php deleted file mode 100644 index 72d3810070b..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Cart/WriteServiceInterface.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Cart; - -/** - * Cart write service interface. - */ -interface WriteServiceInterface -{ - /** - * Enables an administrative or guest user to create an empty cart and quote for an anonymous customer. - * - * @throws \Magento\Framework\Exception\CouldNotSaveException The empty cart and quote could not be created. - * @return int Cart ID. - * @deprecated - * @see \Magento\Checkout\Api\CartManagementInterface::createEmptyCart - */ - public function create(); - - /** - * Assigns a specified customer to a specified shopping cart. - * - * @param int $cartId The cart ID. - * @param int $customerId The customer ID. - * @return boolean - * @deprecated - * @see \Magento\Checkout\Api\CartManagementInterface::assignCustomer - */ - public function assignCustomer($cartId, $customerId); - - /** - * Places an order for a specified cart. - * - * @param int $cartId The cart ID. - * @return int Order ID. - * @see \Magento\Checkout\Api\CartManagementInterface::order - */ - public function order($cartId); -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart.php b/app/code/Magento/Checkout/Service/V1/Data/Cart.php deleted file mode 100644 index a55872f64b6..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart.php +++ /dev/null @@ -1,296 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Data; - -/** - * Cart data object. - * - * @codeCoverageIgnore - */ -class Cart extends \Magento\Framework\Api\AbstractExtensibleObject -{ - /** - * Cart ID. - */ - const ID = 'id'; - - /** - * ID of the store where the cart was created. - */ - const STORE_ID = 'store_id'; - - /** - * Cart creation date and time. - */ - const CREATED_AT = 'created_at'; - - /** - * Cart last update date and time. - */ - const UPDATED_AT = 'updated_at'; - - /** - * Cart conversion date and time. - */ - const CONVERTED_AT = 'converted_at'; - - /** - * Flag that shows whether the cart is still active. - */ - const IS_ACTIVE = 'is_active'; - - /** - * Flag that shows whether the cart is virtual. A virtual cart contains virtual items. - */ - const IS_VIRTUAL = 'is_virtual'; - - /** - * List of cart items. - */ - const ITEMS = 'items'; - - /** - * Number of different items or products in the cart. - */ - const ITEMS_COUNT = 'items_count'; - - /** - * Total quantity of all cart items. - */ - const ITEMS_QUANTITY = 'items_qty'; - - /** - * Information about the customer who is assigned to the cart. - */ - const CUSTOMER = 'customer'; - - /** - * Payment method that is used to process the cart. - */ - const CHECKOUT_METHOD = 'checkout_method'; - - /** - * Cart shipping address. - */ - const SHIPPING_ADDRESS = 'shipping_address'; - - /** - * Cart billing address. - */ - const BILLING_ADDRESS = 'shipping_address'; - - /** - * Information about cart totals. - */ - const TOTALS = 'totals'; - - /** - * The order ID that is reserved for the cart. - */ - const RESERVED_ORDER_ID = 'reserved_order_id'; - - /** - * Original order ID. - */ - const ORIG_ORDER_ID = 'orig_order_id'; - - /** - * Information about the quote currency, such as code, exchange rates, and so on. - */ - const CURRENCY = 'currency'; - - /** - * Returns the cart/quote ID. - * - * @return int Cart/quote ID. - */ - public function getId() - { - return $this->_get(self::ID); - } - - /** - * Returns the store ID for the store where the cart was created. - * - * @return int|null Store ID. Otherwise, null. - */ - public function getStoreId() - { - return $this->_get(self::STORE_ID); - } - - /** - * Returns the cart creation date and time. - * - * @return string|null Cart creation date and time. Otherwise, null. - */ - public function getCreatedAt() - { - return $this->_get(self::CREATED_AT); - } - - /** - * Returns the cart last update date and time. - * - * @return string|null Cart last update date and time. Otherwise, null. - */ - public function getUpdatedAt() - { - return $this->_get(self::UPDATED_AT); - } - - /** - * Returns the cart conversion date and time. - * - * @return string|null Cart conversion date and time. Otherwise, null. - */ - public function getConvertedAt() - { - return $this->_get(self::CONVERTED_AT); - } - - /** - * Determines whether the cart is still active. - * - * @return bool|null Active status flag value. Otherwise, null. - */ - public function getIsActive() - { - $value = $this->_get(self::IS_ACTIVE); - if (!is_null($value)) { - $value = (bool)$value; - } - - return $value; - } - - /** - * Determines whether the cart is a virtual cart. - * - * A virtual cart contains virtual items. - * - * @return bool|null Virtual flag value. Otherwise, null. - */ - public function getIsVirtual() - { - $value = $this->_get(self::IS_VIRTUAL); - if (!is_null($value)) { - $value = (bool)$value; - } - - return $value; - } - - /** - * Lists items in the cart. - * - * @return \Magento\Checkout\Service\V1\Data\Cart\Item[]|null Array of items. Otherwise, null. - */ - public function getItems() - { - return $this->_get(self::ITEMS); - } - - /** - * Returns the number of different items or products in the cart. - * - * @return int|null Number of different items or products in the cart. Otherwise, null. - */ - public function getItemsCount() - { - return $this->_get(self::ITEMS_COUNT); - } - - /** - * Returns the total quantity of all cart items. - * - * @return float|null Total quantity of all cart items. Otherwise, null. - */ - public function getItemsQty() - { - return $this->_get(self::ITEMS_QUANTITY); - } - - /** - * Returns information about the customer who is assigned to the cart. - * - * @return \Magento\Checkout\Service\V1\Data\Cart\Customer Information about the customer who is assigned to the cart. - */ - public function getCustomer() - { - return $this->_get(self::CUSTOMER); - } - - /** - * Returns the payment method that is used to process the cart. - * - * @return string|null Payment method. Otherwise, null. - */ - public function getCheckoutMethod() - { - return $this->_get(self::CHECKOUT_METHOD); - } - - /** - * Returns the cart shipping address. - * - * @return \Magento\Quote\Api\Data\AddressInterface|null Cart shipping address. Otherwise, null. - */ - public function getShippingAddress() - { - return $this->_get(self::SHIPPING_ADDRESS); - } - - /** - * Returns the cart billing address. - * - * @return \Magento\Quote\Api\Data\AddressInterface|null Cart billing address. Otherwise, null. - */ - public function getBillingAddress() - { - return $this->_get(self::BILLING_ADDRESS); - } - - /** - * Returns information about cart totals. - * - * @return \Magento\Quote\Api\Data\TotalsInterface|null Information about cart totals. Otherwise, null. - */ - public function getTotals() - { - return $this->_get(self::TOTALS); - } - - /** - * Returns the reserved order ID for the cart. - * - * @return string|null Reserved order ID. Otherwise, null. - */ - public function getReservedOrderId() - { - return $this->_get(self::RESERVED_ORDER_ID); - } - - /** - * Returns the original order ID for the cart. - * - * @return string|null Original order ID. Otherwise, null. - */ - public function getOrigOrderId() - { - return $this->_get(self::ORIG_ORDER_ID); - } - - /** - * Returns information about quote currency, such as code, exchange rate, and so on. - * - * @return \Magento\Checkout\Service\V1\Data\Cart\Currency|null Quote currency information. Otherwise, null. - */ - public function getCurrency() - { - return $this->_get(self::CURRENCY); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Coupon.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Coupon.php deleted file mode 100644 index 14633d390bb..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Coupon.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Data\Cart; - -/** - * Coupon data for quote. - * - * @codeCoverageIgnore - * @deprecated - * @todo remove this dto - */ -class Coupon extends \Magento\Framework\Api\AbstractExtensibleObject -{ - /** - * Coupon code. - */ - const COUPON_CODE = 'coupon_code'; - - /** - * Returns the coupon code. - * - * @return string Coupon code. - */ - public function getCouponCode() - { - return $this->_get(self::COUPON_CODE); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/CouponBuilder.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/CouponBuilder.php deleted file mode 100644 index 455d6f1f601..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/CouponBuilder.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Data\Cart; - -/** - * @codeCoverageIgnore - */ -class CouponBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder -{ - /** - * @param string $value - * @return $this - */ - public function setCouponCode($value) - { - $this->_set(Coupon::COUPON_CODE, $value); - return $this; - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Currency.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Currency.php deleted file mode 100644 index 4216bcfb595..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Currency.php +++ /dev/null @@ -1,110 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Data\Cart; - -/** - * Currency data for quote - * - * @codeCoverageIgnore - */ -class Currency extends \Magento\Framework\Api\AbstractExtensibleObject -{ - const GLOBAL_CURRENCY_CODE = 'global_currency_code'; - - const BASE_CURRENCY_CODE = 'base_currency_code'; - - const STORE_CURRENCY_CODE = 'store_currency_code'; - - const QUOTE_CURRENCY_CODE = 'quote_currency_code'; - - const STORE_TO_BASE_RATE = 'store_to_base_rate'; - - const STORE_TO_QUOTE_RATE = 'store_to_quote_rate'; - - const BASE_TO_GLOBAL_RATE = 'base_to_global_rate'; - - const BASE_TO_QUOTE_RATE = 'base_to_quote_rate'; - - /** - * Get global currency code - * - * @return string|null - */ - public function getGlobalCurrencyCode() - { - return $this->_get(self::GLOBAL_CURRENCY_CODE); - } - - /** - * Get base currency code - * - * @return string|null - */ - public function getBaseCurrencyCode() - { - return $this->_get(self::BASE_CURRENCY_CODE); - } - - /** - * Get store currency code - * - * @return string|null - */ - public function getStoreCurrencyCode() - { - return $this->_get(self::STORE_CURRENCY_CODE); - } - - /** - * Get quote currency code - * - * @return string|null - */ - public function getQuoteCurrencyCode() - { - return $this->_get(self::QUOTE_CURRENCY_CODE); - } - - /** - * Get store currency to base currency rate - * - * @return float|null - */ - public function getStoreToBaseRate() - { - return $this->_get(self::STORE_TO_BASE_RATE); - } - - /** - * Get store currency to quote currency rate - * - * @return float|null - */ - public function getStoreToQuoteRate() - { - return $this->_get(self::STORE_TO_QUOTE_RATE); - } - - /** - * Get base currency to global currency rate - * - * @return float|null - */ - public function getBaseToGlobalRate() - { - return $this->_get(self::BASE_TO_GLOBAL_RATE); - } - - /** - * Get base currency to quote currency rate - * - * @return float|null - */ - public function getBaseToQuoteRate() - { - return $this->_get(self::BASE_TO_QUOTE_RATE); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php deleted file mode 100644 index 30275de8afa..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php +++ /dev/null @@ -1,200 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Data\Cart; - -/** - * Customer data for quote. - * - * @codeCoverageIgnore - */ -class Customer extends \Magento\Framework\Api\AbstractExtensibleObject -{ - /** - * Customer ID. - */ - const ID = 'id'; - - /** - * Customer tax class ID. - */ - const TAX_CLASS_ID = 'tax_class_id'; - - const GROUP_ID = 'group_id'; - - const EMAIL = 'email'; - - const PREFIX = 'prefix'; - - const FIRST_NAME = 'first_name'; - - const MIDDLE_NAME = 'middle_name'; - - const LAST_NAME = 'last_name'; - - const SUFFIX = 'suffix'; - - const DOB = 'dob'; - - const NOTE = 'note'; - - const NOTE_NOTIFY = 'note_notify'; - - const IS_GUEST = 'is_guest'; - - const TAXVAT = 'taxvat'; - - const GENDER = 'gender'; - - /** - * Get customer id - * - * @return int|null - */ - public function getId() - { - return $this->_get(self::ID); - } - - /** - * Get customer tax class id - * - * @return int|null - */ - public function getTaxClassId() - { - return $this->_get(self::TAX_CLASS_ID); - } - - /** - * Get customer group id - * - * @return int|null - */ - public function getGroupId() - { - return $this->_get(self::GROUP_ID); - } - - /** - * Get customer email - * - * @return string|null - */ - public function getEmail() - { - return $this->_get(self::EMAIL); - } - - /** - * Get customer name prefix - * - * @return string|null - */ - public function getPrefix() - { - return $this->_get(self::PREFIX); - } - - /** - * Get customer first name - * - * @return string|null - */ - public function getFirstName() - { - return $this->_get(self::FIRST_NAME); - } - - /** - * Get customer middle name - * - * @return string|null - */ - public function getMiddleName() - { - return $this->_get(self::MIDDLE_NAME); - } - - /** - * Get customer last name - * - * @return string|null - */ - public function getLastName() - { - return $this->_get(self::LAST_NAME); - } - - /** - * Get customer name suffix - * - * @return string|null - */ - public function getSuffix() - { - return $this->_get(self::SUFFIX); - } - - /** - * Get customer date of birth - * - * @return string|null - */ - public function getDob() - { - return $this->_get(self::DOB); - } - - /** - * Get note - * - * @return string|null - */ - public function getNote() - { - return $this->_get(self::NOTE); - } - - /** - * Get notification status - * - * @return string|null - */ - public function getNoteNotify() - { - return $this->_get(self::NOTE_NOTIFY); - } - - /** - * Is customer a guest? - * - * @return bool - */ - public function getIsGuest() - { - return (bool)$this->_get(self::IS_GUEST); - } - - /** - * Get taxvat value - * - * @return string|null - */ - public function getTaxVat() - { - return $this->_get(self::TAXVAT); - } - - /** - * Get gender - * - * @return string|null - */ - public function getGender() - { - return $this->_get(self::GENDER); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/CustomerBuilder.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/CustomerBuilder.php deleted file mode 100644 index 4d4d2fbc263..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/CustomerBuilder.php +++ /dev/null @@ -1,179 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Data\Cart; - -/** - * Customer data builder for quote - * - * @codeCoverageIgnore - */ -class CustomerBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder -{ - /** - * Set customer id - * - * @param int|null $value - * @return $this - */ - public function setId($value) - { - return $this->_set(Customer::ID, $value); - } - - /** - * Set customer tax class id - * - * @param int|null $value - * @return $this - */ - public function setTaxClassId($value) - { - return $this->_set(Customer::TAX_CLASS_ID, $value); - } - - /** - * Set customer group id - * - * @param int|null $value - * @return $this - */ - public function setGroupId($value) - { - return $this->_set(Customer::GROUP_ID, $value); - } - - /** - * Set customer email - * - * @param string|null $value - * @return $this - */ - public function setEmail($value) - { - return $this->_set(Customer::EMAIL, $value); - } - - /** - * Set customer name prefix - * - * @param string|null $value - * @return $this - */ - public function setPrefix($value) - { - return $this->_set(Customer::PREFIX, $value); - } - - /** - * Set customer first name - * - * @param string|null $value - * @return $this - */ - public function setFirstName($value) - { - return $this->_set(Customer::FIRST_NAME, $value); - } - - /** - * Set customer middle name - * - * @param string|null $value - * @return $this - */ - public function setMiddleName($value) - { - return $this->_set(Customer::MIDDLE_NAME, $value); - } - - /** - * Set customer last name - * - * @param string|null $value - * @return $this - */ - public function setLastName($value) - { - return $this->_set(Customer::LAST_NAME, $value); - } - - /** - * Set customer name suffix - * - * @param string|null $value - * @return $this - */ - public function setSuffix($value) - { - return $this->_set(Customer::SUFFIX, $value); - } - - /** - * Set customer date of birth - * - * @param string|null $value - * @return $this - */ - public function setDob($value) - { - return $this->_set(Customer::DOB, $value); - } - - /** - * Set note - * - * @param string|null $value - * @return $this - */ - public function setNote($value) - { - return $this->_set(Customer::NOTE, $value); - } - - /** - * Set notification status - * - * @param string|null $value - * @return $this - */ - public function setNoteNotify($value) - { - return $this->_set(Customer::NOTE_NOTIFY, $value); - } - - /** - * Is customer a guest? - * - * @param bool $value - * @return $this - */ - public function setIsGuest($value) - { - return (bool)$this->_set(Customer::IS_GUEST, $value); - } - - /** - * Get taxvat value - * - * @param string $value - * @return $this - */ - public function setTaxVat($value) - { - return $this->_set(Customer::TAXVAT, $value); - } - - /** - * Get gender - * - * @param string $value - * @return $this - */ - public function setGender($value) - { - return $this->_set(Customer::GENDER, $value); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/CustomerMapper.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/CustomerMapper.php deleted file mode 100644 index 9a40d51b2d5..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/CustomerMapper.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Data\Cart; - -use Magento\Quote\Model\Quote; - -/** - * Cart mapper - */ -class CustomerMapper -{ - /** - * Fetch quote customer data - * - * @param Quote $quote - * @return array - */ - public function map(Quote $quote) - { - return [ - Customer::ID => $quote->getCustomerId(), - Customer::EMAIL => $quote->getCustomerEmail(), - Customer::GROUP_ID => $quote->getCustomerGroupId(), - Customer::TAX_CLASS_ID => $quote->getCustomerTaxClassId(), - Customer::PREFIX => $quote->getCustomerPrefix(), - Customer::FIRST_NAME => $quote->getCustomerFirstname(), - Customer::MIDDLE_NAME => $quote->getCustomerMiddlename(), - Customer::LAST_NAME => $quote->getCustomerLastname(), - Customer::SUFFIX => $quote->getCustomerSuffix(), - Customer::DOB => $quote->getCustomerDob(), - Customer::NOTE => $quote->getCustomerNote(), - Customer::NOTE_NOTIFY => $quote->getCustomerNoteNotify(), - Customer::IS_GUEST => $quote->getCustomerIsGuest(), - Customer::GENDER => $quote->getCustomerGender(), - Customer::TAXVAT => $quote->getCustomerTaxvat() - ]; - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Item.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Item.php deleted file mode 100644 index 7feba6cdb0f..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Item.php +++ /dev/null @@ -1,106 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Data\Cart; - -/** - * Shopping cart item data object. - * - * @codeCoverageIgnore - * @see \Magento\Checkout\Api\Data\CartItemInterface - */ -class Item extends \Magento\Framework\Api\AbstractExtensibleObject -{ - /** - * Item ID. - */ - const ITEM_ID = 'item_id'; - - /** - * Product SKU. - */ - const SKU = 'sku'; - - /** - * Product quantity. - */ - const QTY = 'qty'; - - /** - * Product name. - */ - const NAME = 'name'; - - /** - * Product price. - */ - const PRICE = 'price'; - - /** - * Product type. - */ - const PRODUCT_TYPE = 'product_type'; - - /** - * Returns the item ID. - * - * @return int|null Item ID. Otherwise, null. - */ - public function getItemId() - { - return $this->_get(self::ITEM_ID); - } - - /** - * Returns the product SKU. - * - * @return string|null Product SKU. Otherwise, null. - */ - public function getSku() - { - return $this->_get(self::SKU); - } - - /** - * Returns the product quantity. - * - * @return int Product quantity. - */ - public function getQty() - { - return $this->_get(self::QTY); - } - - /** - * Returns the product name. - * - * @return string|null Product name. Otherwise, null. - */ - public function getName() - { - return $this->_get(self::NAME); - } - - /** - * Returns the product price. - * - * @return float|null Product price. Otherwise, null. - */ - public function getPrice() - { - return $this->_get(self::PRICE); - } - - /** - * Returns the product type. - * - * @return string|null Product type. Otherwise, null. - */ - public function getProductType() - { - return $this->_get(self::PRODUCT_TYPE); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/CartBuilder.php b/app/code/Magento/Checkout/Service/V1/Data/CartBuilder.php deleted file mode 100644 index 06c0039f9ba..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/CartBuilder.php +++ /dev/null @@ -1,210 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Data; - -use Magento\Checkout\Service\V1\Data\Cart\Currency; - -/** - * Cart data object builder - * - * @codeCoverageIgnore - */ -class CartBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder -{ - /** - * Cart/quote id - * - * @param int $value - * @return $this - */ - public function setId($value) - { - return $this->_set(Cart::ID, $value); - } - - /** - * Store id - * - * @param int $value - * @return $this - */ - public function setStoreId($value) - { - return $this->_set(Cart::STORE_ID, $value); - } - - /** - * set creation date and time - * - * @param string $value - * @return $this - */ - public function setCreatedAt($value) - { - return $this->_set(Cart::CREATED_AT, $value); - } - - /** - * Set last update date and time - * - * @param string $value - * @return $this - */ - public function setUpdatedAt($value) - { - return $this->_set(Cart::UPDATED_AT, $value); - } - - /** - * Set convertion date and time - * - * @param string $value - * @return $this - */ - public function setConvertedAt($value) - { - return $this->_set(Cart::CONVERTED_AT, $value); - } - - /** - * Set active status - * - * @param bool|null $value - * @return $this - */ - public function setIsActive($value) - { - return $this->_set(Cart::IS_ACTIVE, $value); - } - - /** - * Set virtual flag(if cart contains virtual products) - * - * @param bool|null $value - * @return $this - */ - public function setIsVirtual($value) - { - return $this->_set(Cart::IS_VIRTUAL, $value); - } - - /** - * Set cart items - * - * @param \Magento\Checkout\Service\V1\Data\Cart\Item[] $value - * @return $this - */ - public function setItems($value) - { - return $this->_set(Cart::ITEMS, $value); - } - - /** - * Set items count(amount of different products) - * - * @param int $value - * @return $this - */ - public function setItemsCount($value) - { - return $this->_set(Cart::ITEMS_COUNT, $value); - } - - /** - * Set items quantity(total amount of all products) - * - * @param float $value - * @return $this - */ - public function setItemsQty($value) - { - return $this->_set(Cart::ITEMS_QUANTITY, $value); - } - - /** - * Set customer data object - * - * @param \Magento\Checkout\Service\V1\Data\Cart\Customer $value - * @return $this - */ - public function setCustomer($value) - { - return $this->_set(Cart::CUSTOMER, $value); - } - - /** - * Set checkout method - * - * @param string $value - * @return $this - */ - public function setCheckoutMethod($value) - { - return $this->_set(Cart::CHECKOUT_METHOD, $value); - } - - /** - * Set shipping address data object - * - * @param \Magento\Quote\Api\Data\AddressInterface $value - * @return $this - */ - public function setShippingAddress($value) - { - return $this->_set(Cart::SHIPPING_ADDRESS, $value); - } - - /** - * Set billing address data object - * - * @param \Magento\Quote\Api\Data\AddressInterface $value - * @return $this - */ - public function setBillingAddress($value) - { - return $this->_set(Cart::BILLING_ADDRESS, $value); - } - - /** - * @param \Magento\Quote\Api\Data\TotalsInterface $value - * @return $this - */ - public function setTotals($value) - { - return $this->_set(Cart::TOTALS, $value); - } - - /** - * Set reserved order id - * - * @param string $value - * @return $this - */ - public function setReservedOrderId($value) - { - return $this->_set(Cart::RESERVED_ORDER_ID, $value); - } - - /** - * Set original order id - * - * @param string $value - * @return $this - */ - public function setOrigOrderId($value) - { - return $this->_set(Cart::ORIG_ORDER_ID, $value); - } - - /** - * @param \Magento\Checkout\Service\V1\Data\Cart\Currency|null $value - * @return $this - */ - public function setCurrency($value) - { - return $this->_set(Cart::CURRENCY, $value); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/CartMapper.php b/app/code/Magento/Checkout/Service/V1/Data/CartMapper.php deleted file mode 100644 index 89de1557bab..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/CartMapper.php +++ /dev/null @@ -1,114 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Data; - -use Magento\Checkout\Service\V1\Data\Cart; -use Magento\Quote\Model\Quote; - -/** - * Cart mapper - */ -class CartMapper -{ - /** - * @var Cart\TotalsBuilder - */ - private $totalsBuilder; - - /** - * @var CartBuilder - */ - private $cartBuilder; - - /** - * @var Cart\CustomerBuilder - */ - private $customerBuilder; - - /** - * @var Cart\CustomerMapper - */ - private $customerMapper; - - /** - * @var Cart\TotalsMapper - */ - private $totalsMapper; - - /** - * @var Cart\CurrencyMapper; - */ - private $currencyMapper; - - /** - * @var Cart\Totals\ItemMapper - */ - private $itemTotalsMapper; - - /** - * @param Cart\TotalsBuilder $totalsBuilder - * @param CartBuilder $cartBuilder - * @param Cart\CustomerBuilder $customerBuilder - * @param Cart\CustomerMapper $customerMapper - * @param Cart\TotalsMapper $totalsMapper - * @param Cart\CurrencyMapper $currencyMapper - * @param Cart\Totals\ItemMapper $itemTotalsMapper - */ - public function __construct( - Cart\TotalsBuilder $totalsBuilder, - CartBuilder $cartBuilder, - Cart\CustomerBuilder $customerBuilder, - Cart\CustomerMapper $customerMapper, - Cart\TotalsMapper $totalsMapper, - Cart\CurrencyMapper $currencyMapper, - Cart\Totals\ItemMapper $itemTotalsMapper - ) { - $this->totalsBuilder = $totalsBuilder; - $this->cartBuilder = $cartBuilder; - $this->customerBuilder = $customerBuilder; - $this->customerMapper = $customerMapper; - $this->totalsMapper = $totalsMapper; - $this->currencyMapper = $currencyMapper; - $this->itemTotalsMapper = $itemTotalsMapper; - } - - /** - * Fetch base quote data and map it to DTO fields - * - * @param Quote $quote - * @return array - */ - public function map(Quote $quote) - { - $this->cartBuilder->populateWithArray([ - Cart::ID => $quote->getId(), - Cart::STORE_ID => $quote->getStoreId(), - Cart::CREATED_AT => $quote->getCreatedAt(), - Cart::UPDATED_AT => $quote->getUpdatedAt(), - Cart::CONVERTED_AT => $quote->getConvertedAt(), - Cart::IS_ACTIVE => $quote->getIsActive(), - Cart::IS_VIRTUAL => $quote->getIsVirtual(), - Cart::ITEMS_COUNT => $quote->getItemsCount(), - Cart::ITEMS_QUANTITY => $quote->getItemsQty(), - Cart::CHECKOUT_METHOD => $quote->getCheckoutMethod(), - Cart::RESERVED_ORDER_ID => $quote->getReservedOrderId(), - Cart::ORIG_ORDER_ID => $quote->getOrigOrderId(), - ]); - - $this->customerBuilder->populateWithArray($this->customerMapper->map($quote)); - $this->totalsBuilder->populateWithArray($this->totalsMapper->map($quote)); - $items = []; - foreach ($quote->getAllItems() as $item) { - $items[] = $this->itemTotalsMapper->extractDto($item); - } - $this->totalsBuilder->setItems($items); - - $this->cartBuilder->setCustomer($this->customerBuilder->create()); - $this->cartBuilder->setTotals($this->totalsBuilder->create()); - $this->cartBuilder->setCurrency($this->currencyMapper->extractDto($quote)); - return $this->cartBuilder->create(); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/CartSearchResults.php b/app/code/Magento/Checkout/Service/V1/Data/CartSearchResults.php deleted file mode 100644 index 1ffb276415c..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/CartSearchResults.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Data; - -/** - * @codeCoverageIgnore - */ -class CartSearchResults extends \Magento\Framework\Api\SearchResults -{ - /** - * Get items - * - * @return \Magento\Checkout\Service\V1\Data\Cart[] - */ - public function getItems() - { - return parent::getItems(); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/CartSearchResultsBuilder.php b/app/code/Magento/Checkout/Service/V1/Data/CartSearchResultsBuilder.php deleted file mode 100644 index f3f46270d2a..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/CartSearchResultsBuilder.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Data; - -use Magento\Framework\Api\AbstractSearchResultsBuilder; -use Magento\Framework\Api\AttributeDataBuilder; -use Magento\Framework\Api\MetadataServiceInterface; -use Magento\Framework\Api\ObjectFactory; -use Magento\Framework\Api\SearchCriteriaBuilder; - -/** - * @codeCoverageIgnore - */ -class CartSearchResultsBuilder extends AbstractSearchResultsBuilder -{ - /** - * Constructor - * - * @param ObjectFactory $objectFactory - * @param AttributeDataBuilder $valueBuilder - * @param MetadataServiceInterface $metadataService - * @param SearchCriteriaBuilder $searchCriteriaBuilder - * @param CartBuilder $itemObjectBuilder - */ - public function __construct( - ObjectFactory $objectFactory, - AttributeDataBuilder $valueBuilder, - MetadataServiceInterface $metadataService, - SearchCriteriaBuilder $searchCriteriaBuilder, - CartBuilder $itemObjectBuilder - ) { - parent::__construct( - $objectFactory, - $valueBuilder, - $metadataService, - $searchCriteriaBuilder, - $itemObjectBuilder - ); - } - - /** - * Set cart list - * - * @param \Magento\Checkout\Service\V1\Data\Cart[] $items - * @return $this - */ - public function setItems($items) - { - return parent::setItems($items); - } -} diff --git a/app/code/Magento/Checkout/Service/V1/Data/PaymentMethod.php b/app/code/Magento/Checkout/Service/V1/Data/PaymentMethod.php deleted file mode 100644 index db5c1fb6667..00000000000 --- a/app/code/Magento/Checkout/Service/V1/Data/PaymentMethod.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Checkout\Service\V1\Data; - -/** - * @codeCoverageIgnore - */ -class PaymentMethod extends \Magento\Framework\Api\AbstractExtensibleObject -{ - const CODE = 'code'; - - const TITLE = 'title'; - - /** - * Get payment method code - * - * @return string - */ - public function getCode() - { - return $this->_get(self::CODE); - } - - /** - * Get payment method title - * - * @return string - */ - public function getTitle() - { - return $this->_get(self::TITLE); - } -} diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php index c92a5c1f738..02c46b7381b 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php @@ -71,5 +71,6 @@ return [ ['Magento\PayPalRecurringPayment'], ['Magento\ConfigurableProduct\Service'], ['Magento\Catalog\Service'], - ['Magento\CheckoutAgreements\Service'] + ['Magento\CheckoutAgreements\Service'], + ['Magento\Checkout\Service'] ]; diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/CustomerMapperTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/CustomerMapperTest.php deleted file mode 100644 index 36b10cd8e70..00000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/CustomerMapperTest.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Data\Cart; - -class CustomerMapperTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Checkout\Service\V1\Data\Cart\CustomerMapper - */ - protected $mapper; - - protected function setUp() - { - $this->markTestSkipped('Checkout API'); - $this->mapper = new \Magento\Checkout\Service\V1\Data\Cart\CustomerMapper(); - } - - public function testMap() - { - $methods = ['getCustomerId', 'getCustomerEmail', 'getCustomerGroupId', 'getCustomerTaxClassId', - 'getCustomerPrefix', 'getCustomerFirstname', 'getCustomerMiddlename', 'getCustomerLastname', - 'getCustomerSuffix', 'getCustomerDob', 'getCustomerNote', 'getCustomerNoteNotify', - 'getCustomerIsGuest', 'getCustomerGender', 'getCustomerTaxvat', '__wakeUp', ]; - $quoteMock = $this->getMock('Magento\Quote\Model\Quote', $methods, [], '', false); - $expected = [ - Customer::ID => 10, - Customer::EMAIL => 'customer@example.com', - Customer::GROUP_ID => '4', - Customer::TAX_CLASS_ID => 10, - Customer::PREFIX => 'prefix_', - Customer::FIRST_NAME => 'First Name', - Customer::MIDDLE_NAME => 'Middle Name', - Customer::LAST_NAME => 'Last Name', - Customer::SUFFIX => 'suffix', - Customer::DOB => '1/1/1989', - Customer::NOTE => 'customer_note', - Customer::NOTE_NOTIFY => 'note_notify', - Customer::IS_GUEST => false, - Customer::GENDER => 'male', - Customer::TAXVAT => 'taxvat', - ]; - $expectedMethods = [ - 'getCustomerId' => 10, - 'getCustomerEmail' => 'customer@example.com', - 'getCustomerGroupId' => 4, - 'getCustomerTaxClassId' => 10, - 'getCustomerPrefix' => 'prefix_', - 'getCustomerFirstname' => 'First Name', - 'getCustomerMiddlename' => 'Middle Name', - 'getCustomerLastname' => 'Last Name', - 'getCustomerSuffix' => 'suffix', - 'getCustomerDob' => '1/1/1989', - 'getCustomerNote' => 'customer_note', - 'getCustomerNoteNotify' => 'note_notify', - 'getCustomerIsGuest' => false, - 'getCustomerGender' => 'male', - 'getCustomerTaxvat' => 'taxvat', - ]; - foreach ($expectedMethods as $method => $value) { - $quoteMock->expects($this->once())->method($method)->will($this->returnValue($value)); - } - $this->assertEquals($expected, $this->mapper->map($quoteMock)); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/CartMapperTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/CartMapperTest.php deleted file mode 100644 index e2580dc12bf..00000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/CartMapperTest.php +++ /dev/null @@ -1,171 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Checkout\Service\V1\Data; - -class CartMapperTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Checkout\Service\V1\Data\CartMapper - */ - protected $mapper; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - private $totalsBuilder; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - private $cartBuilder; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - private $customerBuilder; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - private $customerMapper; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - private $totalsMapper; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - private $currencyMapper; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - private $itemTotalsMapper; - - protected function setUp() - { - $this->markTestSkipped('Checkout API'); - $this->totalsBuilder = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\TotalsBuilder', - ['populateWithArray', 'setItems', 'create'], - [], - '', - false - ); - $this->cartBuilder = $this->getMock( - '\Magento\Checkout\Service\V1\Data\CartBuilder', - [], - [], - '', - false - ); - $this->customerBuilder = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\CustomerBuilder', - [], - [], - '', - false - ); - $this->customerMapper = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\CustomerMapper', - [], - [], - '', - false - ); - $this->totalsMapper = $this->getMock('\Magento\Checkout\Service\V1\Data\Cart\TotalsMapper', [], [], '', false); - $this->currencyMapper = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\CurrencyMapper', - ['extractDto'], - [], - '', - false - ); - $this->itemTotalsMapper = $this->getMock( - '\Magento\Checkout\Service\V1\Data\Cart\Totals\ItemMapper', - ['extractDto'], - [], - '', - false - ); - - $this->mapper = new \Magento\Checkout\Service\V1\Data\CartMapper( - $this->totalsBuilder, - $this->cartBuilder, - $this->customerBuilder, - $this->customerMapper, - $this->totalsMapper, - $this->currencyMapper, - $this->itemTotalsMapper - ); - } - - public function testMap() - { - $methods = ['getId', 'getStoreId', 'getCreatedAt','getUpdatedAt', 'getConvertedAt', 'getIsActive', - 'getIsVirtual', 'getItemsCount', 'getItemsQty', 'getCheckoutMethod', 'getReservedOrderId', 'getOrigOrderId', - 'getAllItems', '__wakeUp', ]; - $quoteMock = $this->getMock('Magento\Quote\Model\Quote', $methods, [], '', false); - $itemMock = $this->getMock('Magento\Quote\Model\Quote\Item', [], [], '', false); - $quoteMock->expects($this->once())->method('getAllItems')->will($this->returnValue([$itemMock])); - $expected = [ - Cart::ID => 12, - Cart::STORE_ID => 1, - Cart::CREATED_AT => '2014-04-02 12:28:50', - Cart::UPDATED_AT => '2014-04-02 12:28:50', - Cart::CONVERTED_AT => '2014-04-02 12:28:50', - Cart::IS_ACTIVE => true, - Cart::IS_VIRTUAL => false, - Cart::ITEMS_COUNT => 10, - Cart::ITEMS_QUANTITY => 15, - Cart::CHECKOUT_METHOD => 'check mo', - Cart::RESERVED_ORDER_ID => 'order_id', - Cart::ORIG_ORDER_ID => 'orig_order_id', - ]; - $expectedMethods = [ - 'getId' => 12, - 'getStoreId' => 1, - 'getCreatedAt' => '2014-04-02 12:28:50', - 'getUpdatedAt' => '2014-04-02 12:28:50', - 'getConvertedAt' => '2014-04-02 12:28:50', - 'getIsActive' => true, - 'getIsVirtual' => false, - 'getItemsCount' => 10, - 'getItemsQty' => 15, - 'getCheckoutMethod' => 'check mo', - 'getReservedOrderId' => 'order_id', - 'getOrigOrderId' => 'orig_order_id', - ]; - foreach ($expectedMethods as $method => $value) { - $quoteMock->expects($this->once())->method($method)->will($this->returnValue($value)); - } - $this->customerMapper->expects($this->once())->method('map')->with($quoteMock) - ->will($this->returnValue(['testCustomer'])); - $this->customerBuilder->expects($this->once())->method('populateWithArray')->with(['testCustomer']); - $this->customerBuilder->expects($this->once())->method('create')->will($this->returnValue('customer')); - - $this->totalsMapper->expects($this->once())->method('map')->with($quoteMock) - ->will($this->returnValue(['testTotals'])); - $this->totalsBuilder->expects($this->once())->method('populateWithArray')->with(['testTotals']); - $this->totalsBuilder->expects($this->once())->method('create')->will($this->returnValue('totals')); - - $this->itemTotalsMapper->expects($this->once())->method('extractDto')->with($itemMock) - ->will($this->returnValue('mappedItem')); - - $this->totalsBuilder->expects($this->once())->method('setItems')->with(['mappedItem']); - - $this->currencyMapper->expects($this->once())->method('extractDto')->with($quoteMock) - ->will($this->returnValue('currency')); - - $this->cartBuilder->expects($this->once())->method('populateWithArray')->with($expected); - $this->cartBuilder->expects($this->once())->method('setCustomer')->with('customer'); - $this->cartBuilder->expects($this->once())->method('setTotals')->with('totals'); - $this->cartBuilder->expects($this->once())->method('setCurrency')->with('currency'); - $this->mapper->map($quoteMock); - } -} -- GitLab From fcea883d0d2875a1040cd86b7220367c1df21ac1 Mon Sep 17 00:00:00 2001 From: Iryna Lagno <ilagno@ebay.com> Date: Tue, 20 Jan 2015 13:25:15 +0200 Subject: [PATCH 076/114] MAGETWO-32775: Prepare pull request for Checkout related modules MSC: -fix constructors --- app/code/Magento/Quote/Model/Quote.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Quote/Model/Quote.php b/app/code/Magento/Quote/Model/Quote.php index e0b7052228f..3b0ebbbb8d4 100644 --- a/app/code/Magento/Quote/Model/Quote.php +++ b/app/code/Magento/Quote/Model/Quote.php @@ -330,6 +330,8 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C /** * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService + * @param \Magento\Framework\Api\AttributeDataBuilder $attributeDataBuilder * @param QuoteValidator $quoteValidator * @param \Magento\Catalog\Helper\Product $catalogProduct * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig @@ -357,8 +359,6 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository * @param \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter * @param \Magento\Quote\Api\Data\TotalsDataBuilder $totalsBuilder - * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService - * @param \Magento\Framework\Api\AttributeDataBuilder $attributeDataBuilder * @param \Magento\Quote\Api\Data\CurrencyDataBuilder $currencyBuilder * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection @@ -367,6 +367,8 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C public function __construct( \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, + \Magento\Framework\Api\MetadataServiceInterface $metadataService, + \Magento\Framework\Api\AttributeDataBuilder $attributeDataBuilder, \Magento\Quote\Model\QuoteValidator $quoteValidator, \Magento\Catalog\Helper\Product $catalogProduct, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, @@ -394,8 +396,6 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository, \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter, \Magento\Quote\Api\Data\TotalsDataBuilder $totalsBuilder, - \Magento\Framework\Api\MetadataServiceInterface $metadataService, - \Magento\Framework\Api\AttributeDataBuilder $attributeDataBuilder, \Magento\Quote\Api\Data\CurrencyDataBuilder $currencyBuilder, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, -- GitLab From 3bbf031e856a45b459b71c5903fbb0e5dbab219f Mon Sep 17 00:00:00 2001 From: Olexii Korshenko <okorshenko@ebay.com> Date: Tue, 20 Jan 2015 13:53:48 +0200 Subject: [PATCH 077/114] MAGETWO-32501: Implement Cart Service interfaces --- app/code/Magento/Quote/Api/Data/CartInterface.php | 7 ------- app/code/Magento/Quote/Model/Quote.php | 14 -------------- 2 files changed, 21 deletions(-) diff --git a/app/code/Magento/Quote/Api/Data/CartInterface.php b/app/code/Magento/Quote/Api/Data/CartInterface.php index 2bf91a70df7..77bbb74f98f 100644 --- a/app/code/Magento/Quote/Api/Data/CartInterface.php +++ b/app/code/Magento/Quote/Api/Data/CartInterface.php @@ -100,13 +100,6 @@ interface CartInterface extends \Magento\Framework\Api\ExtensibleDataInterface */ public function getBillingAddress(); - /** - * Returns information about cart totals. - * - * @return \Magento\Quote\Api\Data\TotalsInterface|null Information about cart totals. Otherwise, null. - */ - public function getTotalsObject(); - /** * Returns the reserved order ID for the cart. * diff --git a/app/code/Magento/Quote/Model/Quote.php b/app/code/Magento/Quote/Model/Quote.php index 3b0ebbbb8d4..8bad9dbe907 100644 --- a/app/code/Magento/Quote/Model/Quote.php +++ b/app/code/Magento/Quote/Model/Quote.php @@ -1868,20 +1868,6 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C return $this; } - /** - * {@inheritdoc} - */ - public function getTotalsObject() - { - // TODO: refactor to getTotals() - $shippingAddress = $this->getShippingAddress(); - $totals = array_merge($shippingAddress->getData(), $this->getData()); - $this->totalsBuilder->populateWithArray($totals); - $this->totalsBuilder->setItems($this->getAllItems()); - - return $this->totalsBuilder->create(); - } - /** * Get all quote totals (sorted by priority) * Method process quote states isVirtual and isMultiShipping -- GitLab From bc8cd5f5cd2d221006cdcfaebc05ee7dc993119f Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Tue, 20 Jan 2015 14:01:17 +0200 Subject: [PATCH 078/114] MAGETWO-32831: Can not checkout with multiple addresses --- .../Model/Checkout/Type/Multishipping.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php index 50d34281039..5acdbda17e9 100644 --- a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php +++ b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php @@ -597,17 +597,17 @@ class Multishipping extends \Magento\Framework\Object $quote->reserveOrderId(); $quote->collectTotals(); - $order = $this->quoteAddressToOrder->convert($address); + $order = $this->quoteAddressToOrder->convert($address, []); $order->setQuote($quote); - $order->setBillingAddress($this->quoteAddressToOrderAddress->convert($quote->getBillingAddress())); + $order->setBillingAddress($this->quoteAddressToOrderAddress->convert($quote->getBillingAddress(), [])); if ($address->getAddressType() == 'billing') { $order->setIsVirtual(1); } else { - $order->setShippingAddress($this->quoteAddressToOrderAddress->addressToOrderAddress($address)); + $order->setShippingAddress($this->quoteAddressToOrderAddress->convert($address, [])); } - $order->setPayment($this->quotePaymentToOrderPayment->paymentToOrderPayment($quote->getPayment())); + $order->setPayment($this->quotePaymentToOrderPayment->convert($quote->getPayment(), [])); if ($this->priceCurrency->round($address->getGrandTotal()) == 0) { $order->getPayment()->setMethod('free'); } @@ -622,7 +622,7 @@ class Multishipping extends \Magento\Framework\Object )->setProductOptions( $_quoteItem->getProduct()->getTypeInstance()->getOrderOptions($_quoteItem->getProduct()) ); - $orderItem = $this->quoteItemToOrderItem->itemToOrderItem($item); + $orderItem = $this->quoteItemToOrderItem->convert($_quoteItem, []); if ($item->getParentItem()) { $orderItem->setParentItem($order->getItemByQuoteItemId($item->getParentItem()->getId())); } -- GitLab From b947e3f18f1fa467ecf22d15a4acc5a8e68f92b7 Mon Sep 17 00:00:00 2001 From: Iryna Lagno <ilagno@ebay.com> Date: Tue, 20 Jan 2015 14:43:41 +0200 Subject: [PATCH 079/114] MAGETWO-32775: Prepare pull request for Checkout related modules MSC: -fix constructors --- app/code/Magento/Checkout/etc/di.xml | 3 --- app/code/Magento/Checkout/etc/webapi_soap/di.xml | 4 ++-- app/code/Magento/Quote/Model/Quote.php | 7 ++++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Checkout/etc/di.xml b/app/code/Magento/Checkout/etc/di.xml index 3fad5f50fd6..f7d28cc7c96 100644 --- a/app/code/Magento/Checkout/etc/di.xml +++ b/app/code/Magento/Checkout/etc/di.xml @@ -23,7 +23,4 @@ <argument name="storage" xsi:type="object">Magento\Checkout\Model\Session\Storage</argument> </arguments> </type> - <preference for="Magento\Checkout\Service\V1\Cart\ReadServiceInterface" type="Magento\Checkout\Service\V1\Cart\ReadService" /> - <preference for="Magento\Checkout\Service\V1\Cart\TotalsServiceInterface" type="Magento\Checkout\Service\V1\Cart\TotalsService" /> - <preference for="\Magento\Checkout\Service\V1\Cart\WriteServiceInterface" type="Magento\Checkout\Service\V1\Cart\WriteService" /> </config> diff --git a/app/code/Magento/Checkout/etc/webapi_soap/di.xml b/app/code/Magento/Checkout/etc/webapi_soap/di.xml index f7d229f59a5..6507ad23adf 100644 --- a/app/code/Magento/Checkout/etc/webapi_soap/di.xml +++ b/app/code/Magento/Checkout/etc/webapi_soap/di.xml @@ -6,10 +6,10 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> - <type name="Magento\Checkout\Service\V1\Cart\ReadServiceInterface"> + <type name="Magento\Quote\Api\CartRepositoryInterface"> <plugin name="admin_access" type="\Magento\Checkout\Model\Cart\Access\CartRepositoryPlugin" /> </type> - <type name="Magento\Checkout\Service\V1\Cart\WriteServiceInterface"> + <type name="Magento\Quote\Api\CartManagementInterface"> <plugin name="admin_access" type="\Magento\Checkout\Model\Cart\Access\CartManagementPlugin" /> </type> </config> diff --git a/app/code/Magento/Quote/Model/Quote.php b/app/code/Magento/Quote/Model/Quote.php index 8bad9dbe907..424c42e4f92 100644 --- a/app/code/Magento/Quote/Model/Quote.php +++ b/app/code/Magento/Quote/Model/Quote.php @@ -11,6 +11,7 @@ use Magento\Framework\Model\AbstractExtensibleModel; use Magento\Quote\Model\Quote\Address; use Magento\Sales\Model\Resource; use Magento\Sales\Model\Status; +use Magento\Framework\Api\AttributeDataBuilder; /** * Quote model @@ -331,7 +332,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService - * @param \Magento\Framework\Api\AttributeDataBuilder $attributeDataBuilder + * @param AttributeDataBuilder $customAttributeBuilder * @param QuoteValidator $quoteValidator * @param \Magento\Catalog\Helper\Product $catalogProduct * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig @@ -368,7 +369,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Api\MetadataServiceInterface $metadataService, - \Magento\Framework\Api\AttributeDataBuilder $attributeDataBuilder, + AttributeDataBuilder $customAttributeBuilder, \Magento\Quote\Model\QuoteValidator $quoteValidator, \Magento\Catalog\Helper\Product $catalogProduct, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, @@ -433,7 +434,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C $context, $registry, $metadataService, - $attributeDataBuilder, + $customAttributeBuilder, $resource, $resourceCollection, $data -- GitLab From a1bbcdb789aea1111b495b2651fefcf7e1532e1a Mon Sep 17 00:00:00 2001 From: Serhiy Shkolyarenko <sshkolyarenko@ebay.com> Date: Tue, 20 Jan 2015 15:27:41 +0200 Subject: [PATCH 080/114] MAGETWO-32501: Implement Cart Service interfaces unit test fix --- app/code/Magento/Quote/Api/Data/CartInterface.php | 2 ++ .../unit/testsuite/Magento/Quote/Model/QuoteRepositoryTest.php | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Quote/Api/Data/CartInterface.php b/app/code/Magento/Quote/Api/Data/CartInterface.php index 77bbb74f98f..50df790dee2 100644 --- a/app/code/Magento/Quote/Api/Data/CartInterface.php +++ b/app/code/Magento/Quote/Api/Data/CartInterface.php @@ -136,6 +136,8 @@ interface CartInterface extends \Magento\Framework\Api\ExtensibleDataInterface public function getCustomerNote(); /** + * Send customer notification flag + * * @return bool|null */ public function getCustomerNoteNotify(); diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteRepositoryTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteRepositoryTest.php index c554a6a4661..451d2281e49 100644 --- a/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteRepositoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteRepositoryTest.php @@ -7,7 +7,6 @@ namespace Magento\Quote\Model; -use Magento\Quote\Model\QuoteRepository; use Magento\Framework\Api\SearchCriteria; class QuoteRepositoryTest extends \PHPUnit_Framework_TestCase @@ -64,7 +63,7 @@ class QuoteRepositoryTest extends \PHPUnit_Framework_TestCase $this->storeMock = $this->getMock('\Magento\Store\Model\Store', [], [], '', false); $this->searchResultsBuilderMock = $this->getMock( '\Magento\Quote\Api\Data\CartSearchResultsDataBuilder', - [], + ['setSearchCriteria', 'setTotalCount', 'setItems', 'create'], [], '', false -- GitLab From 6999807ca7149df3267d9f89909e39fede787456 Mon Sep 17 00:00:00 2001 From: Olexii Korshenko <okorshenko@ebay.com> Date: Tue, 20 Jan 2015 15:41:25 +0200 Subject: [PATCH 081/114] MAGETWO-32775: Prepare pull request for Checkout related modules MSC - fixed integrity tests --- .../Checkout/Model/Cart/Access/CartManagementPlugin.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/Model/Cart/Access/CartManagementPlugin.php b/app/code/Magento/Checkout/Model/Cart/Access/CartManagementPlugin.php index 8f082e623c3..784c082d9c6 100644 --- a/app/code/Magento/Checkout/Model/Cart/Access/CartManagementPlugin.php +++ b/app/code/Magento/Checkout/Model/Cart/Access/CartManagementPlugin.php @@ -38,6 +38,7 @@ class CartManagementPlugin * @param \Magento\Quote\Api\CartManagementInterface $subject * @param int $cartId * @param int $customerId + * @param int $storeId * * @return void * @throws AuthorizationException if access denied @@ -46,7 +47,8 @@ class CartManagementPlugin public function beforeAssignCustomer( \Magento\Quote\Api\CartManagementInterface $subject, $cartId, - $customerId + $customerId, + $storeId ) { if (!in_array($this->userContext->getUserType(), $this->allowedUserTypes)) { throw new AuthorizationException('Access denied'); -- GitLab From d9bf94c6a686647b96a7842d5dccc1ea56624a50 Mon Sep 17 00:00:00 2001 From: Olexii Korshenko <okorshenko@ebay.com> Date: Tue, 20 Jan 2015 15:51:00 +0200 Subject: [PATCH 082/114] MAGETWO-32501: Implement Cart Service interfaces - fixed unit tests --- .../{WritePluginTest.php => CartManagementPluginTest.php} | 8 ++++---- .../{ReadPluginTest.php => CartRepositoryPluginTest.php} | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) rename dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/{WritePluginTest.php => CartManagementPluginTest.php} (90%) rename dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/{ReadPluginTest.php => CartRepositoryPluginTest.php} (97%) diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/WritePluginTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/CartManagementPluginTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/WritePluginTest.php rename to dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/CartManagementPluginTest.php index 8b634651b11..502b121073c 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/WritePluginTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/CartManagementPluginTest.php @@ -6,7 +6,7 @@ namespace Magento\Checkout\Model\Cart\Access; -class WritePluginTest extends \PHPUnit_Framework_TestCase +class CartManagementPluginTest extends \PHPUnit_Framework_TestCase { /** * @var \Magento\Checkout\Model\Cart\Access\CartManagementPlugin @@ -26,7 +26,7 @@ class WritePluginTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->userContextMock = $this->getMock('Magento\Authorization\Model\UserContextInterface'); - $this->subjectMock = $this->getMock('\Magento\Checkout\Service\V1\Cart\WriteServiceInterface'); + $this->subjectMock = $this->getMock('\Magento\Quote\Api\CartManagementInterface'); $this->model = new CartManagementPlugin($this->userContextMock); } @@ -37,7 +37,7 @@ class WritePluginTest extends \PHPUnit_Framework_TestCase public function testBeforeCreateSuccess($userType) { $this->userContextMock->expects($this->once())->method('getUserType')->will($this->returnValue($userType)); - $this->model->beforeAssignCustomer($this->subjectMock, 1, 1); + $this->model->beforeAssignCustomer($this->subjectMock, 1, 1, 1); } public function successTypeDataProvider() @@ -56,6 +56,6 @@ class WritePluginTest extends \PHPUnit_Framework_TestCase { $this->userContextMock->expects($this->once())->method('getUserType') ->will($this->returnValue(\Magento\Authorization\Model\UserContextInterface::USER_TYPE_CUSTOMER)); - $this->model->beforeAssignCustomer($this->subjectMock, 1, 1); + $this->model->beforeAssignCustomer($this->subjectMock, 1, 1, 1); } } diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/ReadPluginTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/CartRepositoryPluginTest.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/ReadPluginTest.php rename to dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/CartRepositoryPluginTest.php index acd616af0ed..4db91831092 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/ReadPluginTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/CartRepositoryPluginTest.php @@ -6,7 +6,7 @@ namespace Magento\Checkout\Model\Cart\Access; -class ReadPluginTest extends \PHPUnit_Framework_TestCase +class CartRepositoryPluginTest extends \PHPUnit_Framework_TestCase { /** * @var \Magento\Checkout\Model\Cart\Access\CartRepositoryPlugin -- GitLab From 8c9f0ac39d3893f5cd5439d3c1a981739e1b1d66 Mon Sep 17 00:00:00 2001 From: Iryna Lagno <ilagno@ebay.com> Date: Tue, 20 Jan 2015 15:58:48 +0200 Subject: [PATCH 083/114] MAGETWO-32783: Implement Gift message related interfaces --- .../testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php | 2 +- .../testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php index 613720255d3..7a7a5320818 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php @@ -68,7 +68,7 @@ class CartRepositoryTest extends WebapiAbstract { // sales/gift_options/allow_order must be set to 1 in system configuration // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed -// $this->markTestIncomplete('This test relies on system configuration state.'); + $this->markTestIncomplete('This test relies on system configuration state.'); /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); $quote->load('test_order_item_with_message', 'reserved_order_id'); diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php index cc8d3025a25..6d70158ccfa 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php @@ -46,7 +46,7 @@ class ItemRepositoryTest extends WebapiAbstract 'soap' => [ 'service' => self::SERVICE_NAME, 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'getItemMessage', + 'operation' => self::SERVICE_NAME . 'Get', ], ]; @@ -87,7 +87,7 @@ class ItemRepositoryTest extends WebapiAbstract 'soap' => [ 'service' => self::SERVICE_NAME, 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'SetForItem', + 'operation' => self::SERVICE_NAME . 'Save', ], ]; -- GitLab From 88264b7e403437ce3bc65efda9bcb4026bde9611 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Tue, 20 Jan 2015 16:04:24 +0200 Subject: [PATCH 084/114] MAGETWO-32775: Prepare pull request for Checkout related modules MSC --- app/code/Magento/Directory/Model/Currency.php | 73 +----------------- .../Magento/Quote/Model/Cart/Currency.php | 77 +++++++++++++++++++ app/code/Magento/Quote/etc/di.xml | 2 +- 3 files changed, 79 insertions(+), 73 deletions(-) create mode 100644 app/code/Magento/Quote/Model/Cart/Currency.php diff --git a/app/code/Magento/Directory/Model/Currency.php b/app/code/Magento/Directory/Model/Currency.php index 06b21df852b..7b16d887295 100644 --- a/app/code/Magento/Directory/Model/Currency.php +++ b/app/code/Magento/Directory/Model/Currency.php @@ -14,8 +14,7 @@ namespace Magento\Directory\Model; use Magento\Directory\Exception; use Magento\Directory\Model\Currency\Filter; -class Currency extends \Magento\Framework\Model\AbstractExtensibleModel implements - \Magento\Quote\Api\Data\CurrencyInterface +class Currency extends \Magento\Framework\Model\AbstractModel { /** * CONFIG path constants @@ -66,8 +65,6 @@ class Currency extends \Magento\Framework\Model\AbstractExtensibleModel implemen /** * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry - * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService - * @param \Magento\Framework\Api\AttributeDataBuilder $customAttributeBuilder * @param \Magento\Framework\Locale\FormatInterface $localeFormat * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Directory\Helper\Data $directoryHelper @@ -80,8 +77,6 @@ class Currency extends \Magento\Framework\Model\AbstractExtensibleModel implemen public function __construct( \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, - \Magento\Framework\Api\MetadataServiceInterface $metadataService, - \Magento\Framework\Api\AttributeDataBuilder $customAttributeBuilder, \Magento\Framework\Locale\FormatInterface $localeFormat, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Directory\Helper\Data $directoryHelper, @@ -94,8 +89,6 @@ class Currency extends \Magento\Framework\Model\AbstractExtensibleModel implemen parent::__construct( $context, $registry, - $metadataService, - $customAttributeBuilder, $resource, $resourceCollection, $data @@ -392,68 +385,4 @@ class Currency extends \Magento\Framework\Model\AbstractExtensibleModel implemen $this->_getResource()->saveRates($rates); return $this; } - - /** - * {@inheritdoc} - */ - public function getGlobalCurrencyCode() - { - return $this->getData('global_currency_code'); - } - - /** - * {@inheritdoc} - */ - public function getBaseCurrencyCode() - { - return $this->getData('base_currency_code'); - } - - /** - * {@inheritdoc} - */ - public function getStoreCurrencyCode() - { - return $this->getData('store_currency_code'); - } - - /** - * {@inheritdoc} - */ - public function getQuoteCurrencyCode() - { - return $this->getData('quote_currency_code'); - } - - /** - * {@inheritdoc} - */ - public function getStoreToBaseRate() - { - return $this->getData('store_to_base_rate'); - } - - /** - * {@inheritdoc} - */ - public function getStoreToQuoteRate() - { - return $this->getData('store_to_quote_rate'); - } - - /** - * {@inheritdoc} - */ - public function getBaseToGlobalRate() - { - return $this->getData('base_to_global_rate'); - } - - /** - * {@inheritdoc} - */ - public function getBaseToQuoteRate() - { - return $this->getData('base_to_quote_rate'); - } } diff --git a/app/code/Magento/Quote/Model/Cart/Currency.php b/app/code/Magento/Quote/Model/Cart/Currency.php new file mode 100644 index 00000000000..343d02d0463 --- /dev/null +++ b/app/code/Magento/Quote/Model/Cart/Currency.php @@ -0,0 +1,77 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Quote\Model\Cart; + +/** + * @codeCoverageIgnore + */ +class Currency extends \Magento\Framework\Model\AbstractExtensibleModel implements + \Magento\Quote\Api\Data\CurrencyInterface +{ + /** + * {@inheritdoc} + */ + public function getGlobalCurrencyCode() + { + return $this->getData('global_currency_code'); + } + + /** + * {@inheritdoc} + */ + public function getBaseCurrencyCode() + { + return $this->getData('base_currency_code'); + } + + /** + * {@inheritdoc} + */ + public function getStoreCurrencyCode() + { + return $this->getData('store_currency_code'); + } + + /** + * {@inheritdoc} + */ + public function getQuoteCurrencyCode() + { + return $this->getData('quote_currency_code'); + } + + /** + * {@inheritdoc} + */ + public function getStoreToBaseRate() + { + return $this->getData('store_to_base_rate'); + } + + /** + * {@inheritdoc} + */ + public function getStoreToQuoteRate() + { + return $this->getData('store_to_quote_rate'); + } + + /** + * {@inheritdoc} + */ + public function getBaseToGlobalRate() + { + return $this->getData('base_to_global_rate'); + } + + /** + * {@inheritdoc} + */ + public function getBaseToQuoteRate() + { + return $this->getData('base_to_quote_rate'); + } +} diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index ad1ce5ba7f4..3fcb7a63e94 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -30,5 +30,5 @@ <preference for="Magento\Quote\Api\CartTotalRepositoryInterface" type="\Magento\Quote\Model\Cart\CartTotalRepository" /> <preference for="Magento\Quote\Api\Data\TotalsInterface" type="\Magento\Quote\Model\Cart\Totals" /> <preference for="Magento\Quote\Api\Data\TotalsItemInterface" type="\Magento\Quote\Model\Quote\Cart\Totals\Item" /> - <preference for="Magento\Quote\Api\Data\CurrencyInterface" type="\Magento\Directory\Model\Currency" /> + <preference for="Magento\Quote\Api\Data\CurrencyInterface" type="\Magento\Quote\Model\Cart\Currency" /> </config> -- GitLab From 14478a6bd22f906ae49af163384614f1f234e277 Mon Sep 17 00:00:00 2001 From: Iryna Lagno <ilagno@ebay.com> Date: Tue, 20 Jan 2015 15:58:48 +0200 Subject: [PATCH 085/114] MAGETWO-32783: Implement Gift message related interfaces --- .../testsuite/Magento/Test/Php/_files/whitelist/common.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt index 58699d3f8c5..189894e9d16 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt @@ -63,7 +63,6 @@ app/code/Magento/Directory/Model/Resource/Region app/code/Magento/Eav/Model/Cache/Type.php app/code/Magento/GiftMessage/Model/Plugin app/code/Magento/GiftMessage/Model/Type/Plugin -app/code/Magento/GiftMessage/Service app/code/Magento/GoogleShopping/Block/SiteVerification.php app/code/Magento/GoogleShopping/Model/AttributeFactory.php app/code/Magento/GroupedImportExport -- GitLab From fa6e3d3bc1c813302e15bce2876169f2e2026681 Mon Sep 17 00:00:00 2001 From: Serhiy Shkolyarenko <sshkolyarenko@ebay.com> Date: Tue, 20 Jan 2015 16:09:59 +0200 Subject: [PATCH 086/114] MAGETWO-32501: Implement Cart Service interfaces moved plugins and their tests to quote module --- .../Model/Cart/Access/CartManagementPlugin.php | 2 +- .../Model/Cart/Access/CartRepositoryPlugin.php | 2 +- app/code/Magento/{Checkout => Quote}/etc/webapi_rest/di.xml | 4 ++-- app/code/Magento/{Checkout => Quote}/etc/webapi_soap/di.xml | 4 ++-- .../Model/Cart/Access/CartManagementPluginTest.php | 4 ++-- .../Model/Cart/Access/CartRepositoryPluginTest.php | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) rename app/code/Magento/{Checkout => Quote}/Model/Cart/Access/CartManagementPlugin.php (96%) rename app/code/Magento/{Checkout => Quote}/Model/Cart/Access/CartRepositoryPlugin.php (97%) rename app/code/Magento/{Checkout => Quote}/etc/webapi_rest/di.xml (68%) rename app/code/Magento/{Checkout => Quote}/etc/webapi_soap/di.xml (68%) rename dev/tests/unit/testsuite/Magento/{Checkout => Quote}/Model/Cart/Access/CartManagementPluginTest.php (94%) rename dev/tests/unit/testsuite/Magento/{Checkout => Quote}/Model/Cart/Access/CartRepositoryPluginTest.php (96%) diff --git a/app/code/Magento/Checkout/Model/Cart/Access/CartManagementPlugin.php b/app/code/Magento/Quote/Model/Cart/Access/CartManagementPlugin.php similarity index 96% rename from app/code/Magento/Checkout/Model/Cart/Access/CartManagementPlugin.php rename to app/code/Magento/Quote/Model/Cart/Access/CartManagementPlugin.php index 784c082d9c6..f46eee82917 100644 --- a/app/code/Magento/Checkout/Model/Cart/Access/CartManagementPlugin.php +++ b/app/code/Magento/Quote/Model/Cart/Access/CartManagementPlugin.php @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ -namespace Magento\Checkout\Model\Cart\Access; +namespace Magento\Quote\Model\Cart\Access; use Magento\Framework\Exception\AuthorizationException; use Magento\Authorization\Model\UserContextInterface; diff --git a/app/code/Magento/Checkout/Model/Cart/Access/CartRepositoryPlugin.php b/app/code/Magento/Quote/Model/Cart/Access/CartRepositoryPlugin.php similarity index 97% rename from app/code/Magento/Checkout/Model/Cart/Access/CartRepositoryPlugin.php rename to app/code/Magento/Quote/Model/Cart/Access/CartRepositoryPlugin.php index 9bf66748d66..562332c96dc 100644 --- a/app/code/Magento/Checkout/Model/Cart/Access/CartRepositoryPlugin.php +++ b/app/code/Magento/Quote/Model/Cart/Access/CartRepositoryPlugin.php @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ -namespace Magento\Checkout\Model\Cart\Access; +namespace Magento\Quote\Model\Cart\Access; use Magento\Framework\Api\SearchCriteria; use Magento\Framework\Exception\AuthorizationException; diff --git a/app/code/Magento/Checkout/etc/webapi_rest/di.xml b/app/code/Magento/Quote/etc/webapi_rest/di.xml similarity index 68% rename from app/code/Magento/Checkout/etc/webapi_rest/di.xml rename to app/code/Magento/Quote/etc/webapi_rest/di.xml index 6507ad23adf..67774a74040 100644 --- a/app/code/Magento/Checkout/etc/webapi_rest/di.xml +++ b/app/code/Magento/Quote/etc/webapi_rest/di.xml @@ -7,9 +7,9 @@ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Quote\Api\CartRepositoryInterface"> - <plugin name="admin_access" type="\Magento\Checkout\Model\Cart\Access\CartRepositoryPlugin" /> + <plugin name="admin_access" type="\Magento\Quote\Model\Cart\Access\CartRepositoryPlugin" /> </type> <type name="Magento\Quote\Api\CartManagementInterface"> - <plugin name="admin_access" type="\Magento\Checkout\Model\Cart\Access\CartManagementPlugin" /> + <plugin name="admin_access" type="\Magento\Quote\Model\Cart\Access\CartManagementPlugin" /> </type> </config> diff --git a/app/code/Magento/Checkout/etc/webapi_soap/di.xml b/app/code/Magento/Quote/etc/webapi_soap/di.xml similarity index 68% rename from app/code/Magento/Checkout/etc/webapi_soap/di.xml rename to app/code/Magento/Quote/etc/webapi_soap/di.xml index 6507ad23adf..67774a74040 100644 --- a/app/code/Magento/Checkout/etc/webapi_soap/di.xml +++ b/app/code/Magento/Quote/etc/webapi_soap/di.xml @@ -7,9 +7,9 @@ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Quote\Api\CartRepositoryInterface"> - <plugin name="admin_access" type="\Magento\Checkout\Model\Cart\Access\CartRepositoryPlugin" /> + <plugin name="admin_access" type="\Magento\Quote\Model\Cart\Access\CartRepositoryPlugin" /> </type> <type name="Magento\Quote\Api\CartManagementInterface"> - <plugin name="admin_access" type="\Magento\Checkout\Model\Cart\Access\CartManagementPlugin" /> + <plugin name="admin_access" type="\Magento\Quote\Model\Cart\Access\CartManagementPlugin" /> </type> </config> diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/CartManagementPluginTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/Cart/Access/CartManagementPluginTest.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/CartManagementPluginTest.php rename to dev/tests/unit/testsuite/Magento/Quote/Model/Cart/Access/CartManagementPluginTest.php index 502b121073c..bad7fdd3829 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/CartManagementPluginTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/Cart/Access/CartManagementPluginTest.php @@ -4,12 +4,12 @@ * See COPYING.txt for license details. */ -namespace Magento\Checkout\Model\Cart\Access; +namespace Magento\Quote\Model\Cart\Access; class CartManagementPluginTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Checkout\Model\Cart\Access\CartManagementPlugin + * @var \Magento\Quote\Model\Cart\Access\CartManagementPlugin */ protected $model; diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/CartRepositoryPluginTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/Cart/Access/CartRepositoryPluginTest.php similarity index 96% rename from dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/CartRepositoryPluginTest.php rename to dev/tests/unit/testsuite/Magento/Quote/Model/Cart/Access/CartRepositoryPluginTest.php index 4db91831092..1e171673ef5 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/CartRepositoryPluginTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/Cart/Access/CartRepositoryPluginTest.php @@ -4,12 +4,12 @@ * See COPYING.txt for license details. */ -namespace Magento\Checkout\Model\Cart\Access; +namespace Magento\Quote\Model\Cart\Access; class CartRepositoryPluginTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Checkout\Model\Cart\Access\CartRepositoryPlugin + * @var \Magento\Quote\Model\Cart\Access\CartRepositoryPlugin */ protected $model; -- GitLab From 23553038a111ce76efbe5ed596e2232cd7481a12 Mon Sep 17 00:00:00 2001 From: Serhiy Shkolyarenko <sshkolyarenko@ebay.com> Date: Tue, 20 Jan 2015 16:26:34 +0200 Subject: [PATCH 087/114] MAGETWO-32501: Implement Cart Service interfaces removed unused class --- .../Quote/Api/Data/CurrencyInterface.php | 3 --- app/code/Magento/Quote/Model/Quote.php | 3 +++ .../Quote/Model/QuoteSearchResults.php | 23 ------------------- app/code/Magento/Quote/etc/di.xml | 2 +- 4 files changed, 4 insertions(+), 27 deletions(-) delete mode 100644 app/code/Magento/Quote/Model/QuoteSearchResults.php diff --git a/app/code/Magento/Quote/Api/Data/CurrencyInterface.php b/app/code/Magento/Quote/Api/Data/CurrencyInterface.php index 8db3fbeccce..4577709e3e9 100644 --- a/app/code/Magento/Quote/Api/Data/CurrencyInterface.php +++ b/app/code/Magento/Quote/Api/Data/CurrencyInterface.php @@ -5,9 +5,6 @@ */ namespace Magento\Quote\Api\Data; -/** - * @see \Magento\Checkout\Service\V1\Data\Cart\Currency - */ interface CurrencyInterface extends \Magento\Framework\Api\ExtensibleDataInterface { /** diff --git a/app/code/Magento/Quote/Model/Quote.php b/app/code/Magento/Quote/Model/Quote.php index 424c42e4f92..75714136ecf 100644 --- a/app/code/Magento/Quote/Model/Quote.php +++ b/app/code/Magento/Quote/Model/Quote.php @@ -473,6 +473,8 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C } /** + * @codeCoverageIgnoreStart + * * {@inheritdoc} */ public function getItems() @@ -568,6 +570,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C { return $this->_getData('customer_note_notify'); } + //@codeCoverageIgnoreEnd /** * Get quote store identifier diff --git a/app/code/Magento/Quote/Model/QuoteSearchResults.php b/app/code/Magento/Quote/Model/QuoteSearchResults.php deleted file mode 100644 index b8ada5b81f3..00000000000 --- a/app/code/Magento/Quote/Model/QuoteSearchResults.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Quote\Model; - -/** - * @codeCoverageIgnore - */ -class QuoteSearchResults extends \Magento\Framework\Api\SearchResults implements - \Magento\Quote\Api\Data\CartSearchResultsInterface -{ - /** - * Get items - * - * @return \Magento\Quote\Api\Data\CartInterface[] - */ - public function getItems() - { - return parent::getItems(); - } -} diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index 3fcb7a63e94..f96f4cfd026 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -21,7 +21,7 @@ <preference for="Magento\Quote\Api\Data\CartItemInterface" type="Magento\Quote\Model\Quote\Item" /> <preference for="Magento\Quote\Api\CartItemRepositoryInterface" type="Magento\Quote\Model\Quote\Item\Repository" /> <preference for="Magento\Quote\Api\CartRepositoryInterface" type="Magento\Quote\Model\QuoteRepository" /> - <preference for="Magento\Quote\Api\Data\CartSearchResultsInterface" type="Magento\Quote\Model\QuoteSearchResults" /> + <preference for="Magento\Quote\Api\Data\CartSearchResultsInterface" type="Magento\Framework\Api\SearchResults" /> <preference for="Magento\Quote\Api\PaymentMethodManagementInterface" type="\Magento\Quote\Model\PaymentMethodManagement" /> <preference for="Magento\Quote\Api\Data\PaymentInterface" type="\Magento\Quote\Model\Quote\Payment" /> <preference for="Magento\Quote\Api\CouponManagementInterface" type="Magento\Quote\Model\CouponManagement" /> -- GitLab From 22db2a3b92692c4b14fe9aa5a86ca044de205f4d Mon Sep 17 00:00:00 2001 From: Alex Akimov <aakimov@ebay.com> Date: Tue, 20 Jan 2015 16:51:40 +0200 Subject: [PATCH 088/114] MAGETWO-32501: Implement Cart Service interfaces - Fixed REST API test; --- .../Magento/Quote/Api/CartRepositoryInterfaceTest.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php index 76ce3569cd3..3b0a2c2e351 100644 --- a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php @@ -112,9 +112,6 @@ class CartRepositoryInterfaceTest extends WebapiAbstract //following checks will be uncommented when all cart related services are ready $this->assertContains('customer', $cartData); $this->assertEquals(true, $cartData['customer_is_guest']); - $this->assertContains('totals_object', $cartData); - $this->assertEquals($cart->getSubtotal(), $cartData['totals_object']['subtotal']); - $this->assertEquals($cart->getGrandTotal(), $cartData['totals_object']['grand_total']); $this->assertContains('currency', $cartData); $this->assertEquals($cart->getGlobalCurrencyCode(), $cartData['currency']['global_currency_code']); $this->assertEquals($cart->getBaseCurrencyCode(), $cartData['currency']['base_currency_code']); @@ -211,9 +208,6 @@ class CartRepositoryInterfaceTest extends WebapiAbstract $this->assertEquals($cart->getUpdatedAt(), $cartData['updated_at']); $this->assertEquals($cart->getIsActive(), $cartData['is_active']); - $this->assertContains('totals_object', $cartData); - $this->assertEquals($cart->getBaseSubtotal(), $cartData['totals_object']['base_subtotal']); - $this->assertEquals($cart->getBaseGrandTotal(), $cartData['totals_object']['base_grand_total']); $this->assertContains('customer_is_guest', $cartData); $this->assertEquals(1, $cartData['customer_is_guest']); } -- GitLab From 6a6e732ac864aa23eadb4ec3c39df7bddc9a86dd Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@ebay.com> Date: Tue, 20 Jan 2015 17:07:57 +0200 Subject: [PATCH 089/114] MAGETWO-32501: Implement Cart Service interfaces --- app/code/Magento/Quote/Model/Quote.php | 25 ++++++------------- .../Quote/Api/CartManagementInterfaceTest.php | 3 --- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/app/code/Magento/Quote/Model/Quote.php b/app/code/Magento/Quote/Model/Quote.php index 75714136ecf..a5e60764ca5 100644 --- a/app/code/Magento/Quote/Model/Quote.php +++ b/app/code/Magento/Quote/Model/Quote.php @@ -319,14 +319,9 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C protected $customerRepository; /** - * @var \Magento\Quote\Api\Data\TotalsDataBuilder + * @var Cart\CurrencyFactory */ - protected $totalsBuilder; - - /** - * @var \Magento\Quote\Api\Data\CurrencyDataBuilder - */ - protected $currencyBuilder; + protected $currencyFactory; /** * @param \Magento\Framework\Model\Context $context @@ -359,8 +354,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C * @param \Magento\Customer\Api\Data\CustomerDataBuilder $customerBuilder * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository * @param \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter - * @param \Magento\Quote\Api\Data\TotalsDataBuilder $totalsBuilder - * @param \Magento\Quote\Api\Data\CurrencyDataBuilder $currencyBuilder + * @param Cart\CurrencyFactory $currencyFactory * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data @@ -396,8 +390,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C \Magento\Customer\Api\Data\CustomerDataBuilder $customerBuilder, \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository, \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter, - \Magento\Quote\Api\Data\TotalsDataBuilder $totalsBuilder, - \Magento\Quote\Api\Data\CurrencyDataBuilder $currencyBuilder, + \Magento\Quote\Model\Cart\CurrencyFactory $currencyFactory, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = [] @@ -428,8 +421,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C $this->customerBuilder = $customerBuilder; $this->customerRepository = $customerRepository; $this->extensibleDataObjectConverter = $extensibleDataObjectConverter; - $this->totalsBuilder = $totalsBuilder; - $this->currencyBuilder = $currencyBuilder; + $this->currencyFactory = $currencyFactory; parent::__construct( $context, $registry, @@ -452,13 +444,15 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C } /** + * @codeCoverageIgnoreStart + * * {@inheritdoc} */ public function getCurrency() { $currency = $this->getData('currency'); if (!$currency) { - $this->currencyBuilder + $currency = $this->currencyFactory->create() ->setGlobalCurrencyCode($this->getGlobalCurrencyCode()) ->setBaseCurrencyCode($this->getBaseCurrencyCode()) ->setStoreCurrencyCode($this->getStoreCurrencyCode()) @@ -467,14 +461,11 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C ->setStoreToQuoteRate($this->getStoreToQuoteRate()) ->setBaseToGlobalRate($this->getBaseToGlobalRate()) ->setBaseToQuoteRate($this->getBaseToQuoteRate()); - $currency = $this->currencyBuilder->create(); } return $currency; } /** - * @codeCoverageIgnoreStart - * * {@inheritdoc} */ public function getItems() diff --git a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php index 0515d3c219b..203f373a541 100644 --- a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php @@ -336,9 +336,6 @@ class CartManagementInterfaceTest extends WebapiAbstract $this->assertContains('customer', $cartData); $this->assertEquals(false, $cartData['customer_is_guest']); - $this->assertContains('totals_object', $cartData); - $this->assertEquals($cart->getSubtotal(), $cartData['totals_object']['subtotal']); - $this->assertEquals($cart->getGrandTotal(), $cartData['totals_object']['grand_total']); $this->assertContains('currency', $cartData); $this->assertEquals($cart->getGlobalCurrencyCode(), $cartData['currency']['global_currency_code']); $this->assertEquals($cart->getBaseCurrencyCode(), $cartData['currency']['base_currency_code']); -- GitLab From 2a7a62e773df40c77a358058ac909f72a3930123 Mon Sep 17 00:00:00 2001 From: Serhiy Shkolyarenko <sshkolyarenko@ebay.com> Date: Tue, 20 Jan 2015 17:34:05 +0200 Subject: [PATCH 090/114] MAGETWO-32501: Implement Cart Service interfaces added preference for CartInterface --- app/code/Magento/Quote/etc/di.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index f96f4cfd026..d6e44321ac6 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -19,6 +19,7 @@ </arguments> </type> <preference for="Magento\Quote\Api\Data\CartItemInterface" type="Magento\Quote\Model\Quote\Item" /> + <preference for="Magento\Quote\Api\Data\CartInterface" type="Magento\Quote\Model\Quote" /> <preference for="Magento\Quote\Api\CartItemRepositoryInterface" type="Magento\Quote\Model\Quote\Item\Repository" /> <preference for="Magento\Quote\Api\CartRepositoryInterface" type="Magento\Quote\Model\QuoteRepository" /> <preference for="Magento\Quote\Api\Data\CartSearchResultsInterface" type="Magento\Framework\Api\SearchResults" /> -- GitLab From 94e828215e94e5a83f64e9c41a685f34327f7707 Mon Sep 17 00:00:00 2001 From: Iryna Lagno <ilagno@ebay.com> Date: Tue, 20 Jan 2015 18:06:34 +0200 Subject: [PATCH 091/114] MAGETWO-32775: Prepare pull request for Checkout related modules MSC --- app/code/Magento/Checkout/composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Checkout/composer.json b/app/code/Magento/Checkout/composer.json index 38bd83c692b..721906c706c 100644 --- a/app/code/Magento/Checkout/composer.json +++ b/app/code/Magento/Checkout/composer.json @@ -5,7 +5,6 @@ "php": "~5.4.11|~5.5.0|~5.6.0", "magento/module-store": "0.42.0-beta4", "magento/module-sales": "0.42.0-beta4", - "magento/module-authorization": "0.42.0-beta4", "magento/module-catalog-inventory": "0.42.0-beta4", "magento/module-core": "0.42.0-beta4", "magento/module-customer": "0.42.0-beta4", -- GitLab From 0937adadb975d3dd1e394c3e02383e57eae5066b Mon Sep 17 00:00:00 2001 From: Olexii Korshenko <okorshenko@ebay.com> Date: Tue, 20 Jan 2015 18:17:21 +0200 Subject: [PATCH 092/114] MAGETWO-32775: Prepare pull request for Checkout related modules MSC - fixed API tests --- .../Magento/Quote/Api/ShippingMethodManagementInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Quote/Api/ShippingMethodManagementInterface.php b/app/code/Magento/Quote/Api/ShippingMethodManagementInterface.php index 47b10d540b1..d6d11dca4d3 100644 --- a/app/code/Magento/Quote/Api/ShippingMethodManagementInterface.php +++ b/app/code/Magento/Quote/Api/ShippingMethodManagementInterface.php @@ -25,7 +25,7 @@ interface ShippingMethodManagementInterface * Returns selected shipping method for a specified quote. * * @param int $cartId The shopping cart ID. - * @return \Magento\Quote\Api\Data\ShippingMethodInterface|null Shipping method. + * @return \Magento\Quote\Api\Data\ShippingMethodInterface Shipping method. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified shopping cart does not exist. * @throws \Magento\Framework\Exception\StateException The shipping address is not set. */ -- GitLab From 047662b58f1621f46f730861c1d79b4cbc03a192 Mon Sep 17 00:00:00 2001 From: Olexii Korshenko <okorshenko@ebay.com> Date: Tue, 20 Jan 2015 18:21:09 +0200 Subject: [PATCH 093/114] MAGETWO-32775: Prepare pull request for Checkout related modules MSC --- app/code/Magento/Quote/Model/QuoteManagement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Quote/Model/QuoteManagement.php b/app/code/Magento/Quote/Model/QuoteManagement.php index b2bea0ff3ae..4e5a00e13bd 100644 --- a/app/code/Magento/Quote/Model/QuoteManagement.php +++ b/app/code/Magento/Quote/Model/QuoteManagement.php @@ -167,8 +167,8 @@ class QuoteManagement implements \Magento\Quote\Api\CartManagementInterface } try { $this->quoteRepository->getForCustomer($customerId); - throw new StateException('Cannot assign customer to the given cart. Customer already has active cart.'); } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { + throw new StateException('Cannot assign customer to the given cart. Customer already has active cart.'); } $quote->setCustomer($customer); -- GitLab From ecc76ed18c1b1a6549c9ffa2fc0bccc567d83194 Mon Sep 17 00:00:00 2001 From: Iryna Lagno <ilagno@ebay.com> Date: Tue, 20 Jan 2015 15:58:48 +0200 Subject: [PATCH 094/114] MAGETWO-32783: Implement Gift message related interfaces --- app/code/Magento/GiftMessage/etc/webapi.xml | 4 ++-- .../testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php | 2 +- .../testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php | 2 +- .../testsuite/Magento/Test/Php/_files/whitelist/common.txt | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/GiftMessage/etc/webapi.xml b/app/code/Magento/GiftMessage/etc/webapi.xml index d63e200bb90..c5dd571a7ac 100644 --- a/app/code/Magento/GiftMessage/etc/webapi.xml +++ b/app/code/Magento/GiftMessage/etc/webapi.xml @@ -19,13 +19,13 @@ <resource ref="Magento_Sales::create" /> </resources> </route> - <route url="/V1/carts/:cartId/gift-message" method="PUT"> + <route url="/V1/carts/:cartId/gift-message" method="POST"> <service class="Magento\GiftMessage\Api\CartRepositoryInterface" method="save"/> <resources> <resource ref="Magento_Sales::create" /> </resources> </route> - <route url="/V1/carts/:cartId/gift-message/:itemId" method="PUT"> + <route url="/V1/carts/:cartId/gift-message/:itemId" method="POST"> <service class="Magento\GiftMessage\Api\ItemRepositoryInterface" method="save"/> <resources> <resource ref="Magento_Sales::create" /> diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php index 7a7a5320818..6cb6f6d9b3a 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php @@ -77,7 +77,7 @@ class CartRepositoryTest extends WebapiAbstract $serviceInfo = [ 'rest' => [ 'resourcePath' => self::RESOURCE_PATH . $cartId . '/gift-message', - 'httpMethod' => RestConfig::HTTP_METHOD_PUT, + 'httpMethod' => RestConfig::HTTP_METHOD_POST, ], 'soap' => [ 'service' => self::SERVICE_NAME, diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php index 6d70158ccfa..4419bf514bc 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php @@ -82,7 +82,7 @@ class ItemRepositoryTest extends WebapiAbstract $serviceInfo = [ 'rest' => [ 'resourcePath' => self::RESOURCE_PATH . $cartId . '/gift-message/' . $itemId, - 'httpMethod' => RestConfig::HTTP_METHOD_PUT, + 'httpMethod' => RestConfig::HTTP_METHOD_POST, ], 'soap' => [ 'service' => self::SERVICE_NAME, diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt index 58699d3f8c5..189894e9d16 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt @@ -63,7 +63,6 @@ app/code/Magento/Directory/Model/Resource/Region app/code/Magento/Eav/Model/Cache/Type.php app/code/Magento/GiftMessage/Model/Plugin app/code/Magento/GiftMessage/Model/Type/Plugin -app/code/Magento/GiftMessage/Service app/code/Magento/GoogleShopping/Block/SiteVerification.php app/code/Magento/GoogleShopping/Model/AttributeFactory.php app/code/Magento/GroupedImportExport -- GitLab From 38c5a03a408a3a5e7c45cd4997e74dc708404ef0 Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Tue, 20 Jan 2015 20:18:54 +0200 Subject: [PATCH 095/114] MAGETWO-32078: Validation for Terms and Conditions should be the same for OnePage Checkout and Multishipping Flow - CR fixes --- .../app/Magento/Customer/Test/Repository/CustomerInjectable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerInjectable.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerInjectable.php index 01653739c80..90c0f207943 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerInjectable.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerInjectable.php @@ -124,7 +124,7 @@ class CustomerInjectable extends AbstractRepository 'email' => 'JohnDoe_%isolation%@example.com', 'password' => '123123q', 'password_confirmation' => '123123q', - 'address' => ['presets' => 'US_address, US_address'], + 'address' => ['presets' => 'US_address_NY, US_address'], ]; } } -- GitLab From 0ffd7328303847442a68a08b55600fe9a5b64fd8 Mon Sep 17 00:00:00 2001 From: Serhiy Shkolyarenko <sshkolyarenko@ebay.com> Date: Tue, 20 Jan 2015 22:48:33 +0200 Subject: [PATCH 096/114] MAGETWO-32501: Implement Cart Service interfaces added unit test for QuoteManagement --- .../Quote/Model/QuoteManagementTest.php | 350 +++++++++++++++++- 1 file changed, 349 insertions(+), 1 deletion(-) diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php index 197141a2f9f..3593f62f858 100644 --- a/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php @@ -6,6 +6,8 @@ namespace Magento\Quote\Model; +use \Magento\Framework\Exception\NoSuchEntityException; + class QuoteManagementTest extends \PHPUnit_Framework_TestCase { /** @@ -63,6 +65,21 @@ class QuoteManagementTest extends \PHPUnit_Framework_TestCase */ protected $customerManagement; + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $userContextMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $customerRepositoryMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $customerFactoryMock; + protected function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); @@ -106,6 +123,22 @@ class QuoteManagementTest extends \PHPUnit_Framework_TestCase $this->customerManagement = $this->getMock('Magento\Quote\Model\CustomerManagement', [], [], '', false); $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); + $this->userContextMock = $this->getMock('\Magento\Authorization\Model\UserContextInterface', [], [], '', false); + $this->customerRepositoryMock = $this->getMock( + '\Magento\Customer\Api\CustomerRepositoryInterface', + ['create', 'save', 'get', 'getById', 'getList', 'delete', 'deleteById'], + [], + '', + false + ); + $this->customerFactoryMock = $this->getMock( + '\Magento\Customer\Model\CustomerFactory', + ['create'], + [], + '', + false + ); + $this->model = $objectManager->getObject( 'Magento\Quote\Model\QuoteManagement', [ @@ -118,11 +151,326 @@ class QuoteManagementTest extends \PHPUnit_Framework_TestCase 'quoteAddressToOrderAddress' => $this->quoteAddressToOrderAddress, 'quoteItemToOrderItem' => $this->quoteItemToOrderItem, 'quotePaymentToOrderPayment' => $this->quotePaymentToOrderPayment, - 'quoteRepository' => $this->quoteRepositoryMock + 'quoteRepository' => $this->quoteRepositoryMock, + 'userContext' => $this->userContextMock, + 'customerRepository' => $this->customerRepositoryMock, + 'customerModelFactory' => $this->customerFactoryMock, ] ); } + public function testCreateEmptyCartAnonymous() + { + $storeId = 345; + $quoteId = 2311; + + $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); + + $this->userContextMock->expects($this->once())->method('getUserType') + ->willReturn(\Magento\Authorization\Model\UserContextInterface::USER_TYPE_GUEST); + + $this->quoteRepositoryMock->expects($this->once())->method('create')->willReturn($quoteMock); + $quoteMock->expects($this->any())->method('setStoreId')->with($storeId); + + + $this->quoteRepositoryMock->expects($this->once())->method('save')->with($quoteMock); + $quoteMock->expects($this->once())->method('getId')->willReturn($quoteId); + + $this->assertEquals($quoteId, $this->model->createEmptyCart($storeId)); + } + + public function testCreateEmptyCartLoggedInUser() + { + $storeId = 345; + $quoteId = 2311; + $userId = 567; + + $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); + + $this->userContextMock->expects($this->once())->method('getUserType') + ->willReturn(\Magento\Authorization\Model\UserContextInterface::USER_TYPE_CUSTOMER); + + $this->userContextMock->expects($this->atLeastOnce())->method('getUserId')->willReturn($userId); + + $customerMock = $this->getMock('\Magento\Customer\Api\Data\CustomerInterface', [], [], '', false); + $this->customerRepositoryMock + ->expects($this->once()) + ->method('getById') + ->with($userId) + ->willReturn($customerMock); + + $this->quoteRepositoryMock->expects($this->once())->method('getActiveForCustomer')->with($userId); + + $this->quoteRepositoryMock->expects($this->once())->method('create')->willReturn($quoteMock); + $quoteMock->expects($this->any())->method('setStoreId')->with($storeId); + $quoteMock->expects($this->any())->method('setCustomer')->with($customerMock); + $quoteMock->expects($this->any())->method('setCustomerIsGuest')->with(0); + + + $this->quoteRepositoryMock->expects($this->once())->method('save')->with($quoteMock); + $quoteMock->expects($this->once())->method('getId')->willReturn($quoteId); + + $this->assertEquals($quoteId, $this->model->createEmptyCart($storeId)); + } + + /** + * @expectedException \Magento\Framework\Exception\CouldNotSaveException + */ + public function testCreateEmptyCartLoggedInUserException() + { + $storeId = 345; + $userId = 567; + + $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); + + $this->userContextMock->expects($this->once())->method('getUserType') + ->willReturn(\Magento\Authorization\Model\UserContextInterface::USER_TYPE_CUSTOMER); + + $this->userContextMock->expects($this->atLeastOnce())->method('getUserId')->willReturn($userId); + + $customerMock = $this->getMock('\Magento\Customer\Api\Data\CustomerInterface', [], [], '', false); + $this->customerRepositoryMock + ->expects($this->once()) + ->method('getById') + ->with($userId) + ->willReturn($customerMock); + + $this->quoteRepositoryMock + ->expects($this->once()) + ->method('getActiveForCustomer') + ->willThrowException(new NoSuchEntityException('123')); + + $this->quoteRepositoryMock->expects($this->never())->method('create')->willReturn($quoteMock); + + $this->quoteRepositoryMock->expects($this->never())->method('save')->with($quoteMock); + + $this->model->createEmptyCart($storeId); + } + + /** + * @expectedException \Magento\Framework\Exception\StateException + * @expectedExceptionMessage Cannot assign customer to the given cart. The cart belongs to different store + */ + public function testAssignCustomerFromAnotherStore() + { + $cartId = 220; + $customerId = 455; + $storeId = 5; + + $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); + $customerMock = $this->getMock('\Magento\Customer\Api\Data\CustomerInterface', [], [], '', false); + + $this->quoteRepositoryMock + ->expects($this->once()) + ->method('getActive') + ->with($cartId) + ->willReturn($quoteMock); + + $this->customerRepositoryMock + ->expects($this->once()) + ->method('getById') + ->with($customerId) + ->willReturn($customerMock); + + $customerModelMock = $this->getMock( + '\Magento\Customer\Model\Customer', + ['load', 'getSharedStoreIds'], + [], + '', + false + ); + $this->customerFactoryMock->expects($this->once())->method('create')->willReturn($customerModelMock); + $customerModelMock + ->expects($this->once()) + ->method('load') + ->with($customerId) + ->willReturnSelf(); + + $customerModelMock + ->expects($this->once()) + ->method('getSharedStoreIds') + ->willReturn([]); + + $this->model->assignCustomer($cartId, $customerId, $storeId); + } + + /** + * @expectedException \Magento\Framework\Exception\StateException + * @expectedExceptionMessage Cannot assign customer to the given cart. The cart is not anonymous. + */ + public function testAssignCustomerToNonanonymousCart() + { + $cartId = 220; + $customerId = 455; + $storeId = 5; + + $quoteMock = $this->getMock( + '\Magento\Quote\Model\Quote', + ['getCustomerId', 'setCustomer', 'setCustomerIsGuest'], + [], + '', + false + ); + $customerMock = $this->getMock('\Magento\Customer\Api\Data\CustomerInterface', [], [], '', false); + + $this->quoteRepositoryMock + ->expects($this->once()) + ->method('getActive') + ->with($cartId) + ->willReturn($quoteMock); + + $this->customerRepositoryMock + ->expects($this->once()) + ->method('getById') + ->with($customerId) + ->willReturn($customerMock); + + $customerModelMock = $this->getMock( + '\Magento\Customer\Model\Customer', + ['load', 'getSharedStoreIds'], + [], + '', + false + ); + $this->customerFactoryMock->expects($this->once())->method('create')->willReturn($customerModelMock); + $customerModelMock + ->expects($this->once()) + ->method('load') + ->with($customerId) + ->willReturnSelf(); + + $customerModelMock + ->expects($this->once()) + ->method('getSharedStoreIds') + ->willReturn([$storeId, 'some store value']); + + $quoteMock->expects($this->once())->method('getCustomerId')->willReturn(753); + + $this->model->assignCustomer($cartId, $customerId, $storeId); + } + + /** + * @expectedException \Magento\Framework\Exception\StateException + * @expectedExceptionMessage Cannot assign customer to the given cart. Customer already has active cart. + */ + public function testAssignCustomerNoSuchCustomer() + { + $cartId = 220; + $customerId = 455; + $storeId = 5; + + $quoteMock = $this->getMock( + '\Magento\Quote\Model\Quote', + ['getCustomerId', 'setCustomer', 'setCustomerIsGuest'], + [], + '', + false + ); + $customerMock = $this->getMock('\Magento\Customer\Api\Data\CustomerInterface', [], [], '', false); + + $this->quoteRepositoryMock + ->expects($this->once()) + ->method('getActive') + ->with($cartId) + ->willReturn($quoteMock); + + $this->customerRepositoryMock + ->expects($this->once()) + ->method('getById') + ->with($customerId) + ->willReturn($customerMock); + + $customerModelMock = $this->getMock( + '\Magento\Customer\Model\Customer', + ['load', 'getSharedStoreIds'], + [], + '', + false + ); + $this->customerFactoryMock->expects($this->once())->method('create')->willReturn($customerModelMock); + $customerModelMock + ->expects($this->once()) + ->method('load') + ->with($customerId) + ->willReturnSelf(); + + $customerModelMock + ->expects($this->once()) + ->method('getSharedStoreIds') + ->willReturn([$storeId, 'some store value']); + + $quoteMock->expects($this->once())->method('getCustomerId')->willReturn(null); + + $this->quoteRepositoryMock + ->expects($this->once()) + ->method('getForCustomer') + ->with($customerId) + ->willThrowException(new \Magento\Framework\Exception\NoSuchEntityException()); + + $this->model->assignCustomer($cartId, $customerId, $storeId); + } + + public function testAssignCustomer() + { + $cartId = 220; + $customerId = 455; + $storeId = 5; + + $quoteMock = $this->getMock( + '\Magento\Quote\Model\Quote', + ['getCustomerId', 'setCustomer', 'setCustomerIsGuest'], + [], + '', + false + ); + $customerMock = $this->getMock('\Magento\Customer\Api\Data\CustomerInterface', [], [], '', false); + + $this->quoteRepositoryMock + ->expects($this->once()) + ->method('getActive') + ->with($cartId) + ->willReturn($quoteMock); + + $this->customerRepositoryMock + ->expects($this->once()) + ->method('getById') + ->with($customerId) + ->willReturn($customerMock); + + $customerModelMock = $this->getMock( + '\Magento\Customer\Model\Customer', + ['load', 'getSharedStoreIds'], + [], + '', + false + ); + $this->customerFactoryMock->expects($this->once())->method('create')->willReturn($customerModelMock); + $customerModelMock + ->expects($this->once()) + ->method('load') + ->with($customerId) + ->willReturnSelf(); + + $customerModelMock + ->expects($this->once()) + ->method('getSharedStoreIds') + ->willReturn([$storeId, 'some store value']); + + $quoteMock->expects($this->once())->method('getCustomerId')->willReturn(null); + + $this->quoteRepositoryMock + ->expects($this->once()) + ->method('getForCustomer') + ->with($customerId); + + $quoteMock->expects($this->once())->method('setCustomer')->with($customerMock); + $quoteMock->expects($this->once())->method('setCustomerIsGuest')->with(0); + + $this->quoteRepositoryMock->expects($this->once())->method('save')->with($quoteMock); + + $this->model->assignCustomer($cartId, $customerId, $storeId); + } + public function testSubmit() { $orderData = []; -- GitLab From 1f54e55120f9b675c667ec0e7dff68285ca2979d Mon Sep 17 00:00:00 2001 From: Iryna Lagno <ilagno@ebay.com> Date: Wed, 21 Jan 2015 10:17:27 +0200 Subject: [PATCH 097/114] MAGETWO-32783: Implement Gift message related interfaces --- app/code/Magento/GiftMessage/Model/Message.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/GiftMessage/Model/Message.php b/app/code/Magento/GiftMessage/Model/Message.php index b65033c3fe3..808025555d5 100644 --- a/app/code/Magento/GiftMessage/Model/Message.php +++ b/app/code/Magento/GiftMessage/Model/Message.php @@ -6,6 +6,7 @@ namespace Magento\GiftMessage\Model; use Magento\Framework\Api\AttributeDataBuilder; + /** * Gift Message model * -- GitLab From c7e3fdad942b4eb7c3c0f64a6d8d1cd7754cfccd Mon Sep 17 00:00:00 2001 From: Olexii Korshenko <okorshenko@ebay.com> Date: Wed, 21 Jan 2015 10:22:54 +0200 Subject: [PATCH 098/114] MAGETWO-32775: Prepare pull request for Checkout related modules MSC - fixed REST tests --- app/code/Magento/Quote/Model/QuoteManagement.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Quote/Model/QuoteManagement.php b/app/code/Magento/Quote/Model/QuoteManagement.php index 4e5a00e13bd..af2aaca9ebf 100644 --- a/app/code/Magento/Quote/Model/QuoteManagement.php +++ b/app/code/Magento/Quote/Model/QuoteManagement.php @@ -167,8 +167,9 @@ class QuoteManagement implements \Magento\Quote\Api\CartManagementInterface } try { $this->quoteRepository->getForCustomer($customerId); - } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { throw new StateException('Cannot assign customer to the given cart. Customer already has active cart.'); + } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { + } $quote->setCustomer($customer); @@ -205,8 +206,9 @@ class QuoteManagement implements \Magento\Quote\Api\CartManagementInterface try { $this->quoteRepository->getActiveForCustomer($this->userContext->getUserId()); - } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { throw new CouldNotSaveException('Cannot create quote'); + } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { + } /** @var \Magento\Quote\Model\Quote $quote */ -- GitLab From 2731cf67ef3e0de84bd56e907335b78bff196e2a Mon Sep 17 00:00:00 2001 From: Serhiy Shkolyarenko <sshkolyarenko@ebay.com> Date: Wed, 21 Jan 2015 11:09:39 +0200 Subject: [PATCH 099/114] MAGETWO-32501: Implement Cart Service interfaces renamed tests --- .../{CartManagementInterfaceTest.php => CartManagementTest.php} | 2 +- .../{CartRepositoryInterfaceTest.php => CartRepositoryTest.php} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename dev/tests/api-functional/testsuite/Magento/Quote/Api/{CartManagementInterfaceTest.php => CartManagementTest.php} (99%) rename dev/tests/api-functional/testsuite/Magento/Quote/Api/{CartRepositoryInterfaceTest.php => CartRepositoryTest.php} (99%) diff --git a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementTest.php similarity index 99% rename from dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php rename to dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementTest.php index 203f373a541..4a4be8cbde2 100644 --- a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartManagementTest.php @@ -9,7 +9,7 @@ namespace Magento\Quote\Api; use Magento\TestFramework\TestCase\WebapiAbstract; use Magento\Webapi\Model\Rest\Config as RestConfig; -class CartManagementInterfaceTest extends WebapiAbstract +class CartManagementTest extends WebapiAbstract { const SERVICE_VERSION = 'V1'; const SERVICE_NAME = 'quoteCartManagementV1'; diff --git a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryTest.php similarity index 99% rename from dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php rename to dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryTest.php index 3b0a2c2e351..428d5cceeae 100644 --- a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryTest.php @@ -14,7 +14,7 @@ use Magento\TestFramework\ObjectManager; use Magento\TestFramework\TestCase\WebapiAbstract; use Magento\Webapi\Model\Rest\Config as RestConfig; -class CartRepositoryInterfaceTest extends WebapiAbstract +class CartRepositoryTest extends WebapiAbstract { /** * @var ObjectManager -- GitLab From e622a54e02c4334b28b13dccb980b0e1a0e43977 Mon Sep 17 00:00:00 2001 From: Serhiy Shkolyarenko <sshkolyarenko@ebay.com> Date: Wed, 21 Jan 2015 11:09:59 +0200 Subject: [PATCH 100/114] MAGETWO-32501: Implement Cart Service interfaces updated test --- .../Magento/Quote/Model/QuoteManagementTest.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php index 3593f62f858..d2d0708632c 100644 --- a/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php @@ -199,7 +199,11 @@ class QuoteManagementTest extends \PHPUnit_Framework_TestCase ->with($userId) ->willReturn($customerMock); - $this->quoteRepositoryMock->expects($this->once())->method('getActiveForCustomer')->with($userId); + $this->quoteRepositoryMock + ->expects($this->once()) + ->method('getActiveForCustomer') + ->with($userId) + ->willThrowException(new NoSuchEntityException()); $this->quoteRepositoryMock->expects($this->once())->method('create')->willReturn($quoteMock); $quoteMock->expects($this->any())->method('setStoreId')->with($storeId); @@ -238,7 +242,7 @@ class QuoteManagementTest extends \PHPUnit_Framework_TestCase $this->quoteRepositoryMock ->expects($this->once()) ->method('getActiveForCustomer') - ->willThrowException(new NoSuchEntityException('123')); + ->with($userId); $this->quoteRepositoryMock->expects($this->never())->method('create')->willReturn($quoteMock); @@ -404,8 +408,7 @@ class QuoteManagementTest extends \PHPUnit_Framework_TestCase $this->quoteRepositoryMock ->expects($this->once()) ->method('getForCustomer') - ->with($customerId) - ->willThrowException(new \Magento\Framework\Exception\NoSuchEntityException()); + ->with($customerId); $this->model->assignCustomer($cartId, $customerId, $storeId); } @@ -461,7 +464,8 @@ class QuoteManagementTest extends \PHPUnit_Framework_TestCase $this->quoteRepositoryMock ->expects($this->once()) ->method('getForCustomer') - ->with($customerId); + ->with($customerId) + ->willThrowException(new NoSuchEntityException()); $quoteMock->expects($this->once())->method('setCustomer')->with($customerMock); $quoteMock->expects($this->once())->method('setCustomerIsGuest')->with(0); -- GitLab From e627582a6bed0866795fee70ecf757120c16761a Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Wed, 21 Jan 2015 04:43:40 -0800 Subject: [PATCH 101/114] MAGETWO-31578: Implement tool for adding annotations to existing code - added phpmd annotations --- .../Backend/Controller/Adminhtml/System/Account/Save.php | 1 + app/code/Magento/CatalogRule/Plugin/Model/Product/Action.php | 1 + app/code/Magento/Cms/Model/Wysiwyg/Config.php | 1 + app/code/Magento/Customer/Model/GroupManagement.php | 3 +++ app/code/Magento/ProductAlert/Model/Email.php | 1 + app/code/Magento/Store/Model/Store.php | 1 + .../Magento/TestFramework/Authentication/Rest/OauthClient.php | 3 +++ .../Magento/TestFramework/TestCase/Webapi/Adapter/Rest.php | 1 + .../Magento/TestFramework/TestCase/WebapiAbstract.php | 3 +++ .../Magento/Catalog/Api/ProductCustomOptionRepositoryTest.php | 3 +++ .../Magento/CatalogInventory/Api/LowStockItemsTest.php | 1 + .../Checkout/Service/V1/Address/Shipping/ReadServiceTest.php | 1 + .../Checkout/Service/V1/ShippingMethod/ReadServiceTest.php | 1 + .../testsuite/Magento/Customer/Api/AddressMetadataTest.php | 1 + .../testsuite/Magento/Customer/Api/CustomerMetadataTest.php | 1 + .../testsuite/Magento/Framework/Stdlib/CookieManagerTest.php | 1 + .../Integration/Service/V1/CustomerTokenServiceTest.php | 1 + .../Magento/Sales/Service/V1/OrderAddressUpdateTest.php | 1 + .../Magento/Sales/Service/V1/OrderStatusHistoryAddTest.php | 1 + .../testsuite/Magento/Webapi/Routing/ServiceVersionV1Test.php | 1 + .../Magento/Webapi/WsdlGenerationFromDataObjectTest.php | 2 ++ .../Magento/Backend/Block/System/Config/FormStub.php | 3 +++ .../phpcs/input/naming/constant/minuscule_letter.php | 3 +++ .../phpcs/input/naming/method/normal_underscore_start.php | 3 +++ .../Model/Adapter/Mysql/Filter/PreprocessorTest.php | 3 +++ .../testsuite/Magento/Checkout/Model/Type/OnepageTest.php | 1 + .../Cms/Controller/Adminhtml/Wysiwyg/DirectiveTest.php | 1 + .../Magento/Framework/Code/Reader/SourceArgumentsReader.php | 4 ++++ lib/internal/Magento/Framework/Config/Theme.php | 1 + lib/internal/Magento/Framework/DB/AbstractMapper.php | 1 + lib/internal/Magento/Framework/DB/GenericMapper.php | 1 + lib/internal/Magento/Framework/Object/Mapper.php | 4 ++++ .../Magento/Framework/Search/Adapter/Mysql/Mapper.php | 1 + lib/internal/Magento/Framework/Search/Request/Mapper.php | 4 ++++ 34 files changed, 60 insertions(+) diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php index 0bbf7b3e73c..bbffca9f8eb 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php @@ -29,6 +29,7 @@ class Save extends \Magento\Backend\Controller\Adminhtml\System\Account * Saving edited user information * * @return \Magento\Backend\Model\View\Result\Redirect + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/CatalogRule/Plugin/Model/Product/Action.php b/app/code/Magento/CatalogRule/Plugin/Model/Product/Action.php index 8824a7be832..115255dcc9a 100644 --- a/app/code/Magento/CatalogRule/Plugin/Model/Product/Action.php +++ b/app/code/Magento/CatalogRule/Plugin/Model/Product/Action.php @@ -30,6 +30,7 @@ class Action * @return ProductAction * * @SuppressWarnings(PHPMD.UnusedFormatParameter) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterUpdateAttributes(ProductAction $object, ProductAction $result) { diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Config.php b/app/code/Magento/Cms/Model/Wysiwyg/Config.php index 3c6e755712a..7fd5b26290d 100644 --- a/app/code/Magento/Cms/Model/Wysiwyg/Config.php +++ b/app/code/Magento/Cms/Model/Wysiwyg/Config.php @@ -100,6 +100,7 @@ class Config extends \Magento\Framework\Object * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param array $windowSize * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Backend\Model\UrlInterface $backendUrl, diff --git a/app/code/Magento/Customer/Model/GroupManagement.php b/app/code/Magento/Customer/Model/GroupManagement.php index 52d557faaa8..d090e955927 100644 --- a/app/code/Magento/Customer/Model/GroupManagement.php +++ b/app/code/Magento/Customer/Model/GroupManagement.php @@ -17,6 +17,9 @@ use Magento\Customer\Api\GroupRepositoryInterface; use Magento\Customer\Api\Data\GroupDataBuilder; use Magento\Customer\Model\GroupFactory; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class GroupManagement implements \Magento\Customer\Api\GroupManagementInterface { const XML_PATH_DEFAULT_ID = 'customer/create_account/default_group'; diff --git a/app/code/Magento/ProductAlert/Model/Email.php b/app/code/Magento/ProductAlert/Model/Email.php index a0435d8775e..94d37b40539 100644 --- a/app/code/Magento/ProductAlert/Model/Email.php +++ b/app/code/Magento/ProductAlert/Model/Email.php @@ -285,6 +285,7 @@ class Email extends \Magento\Framework\Model\AbstractModel * @return bool * @SuppressWarnings(PHPMD.CyclomaticComplexity) * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function send() { diff --git a/app/code/Magento/Store/Model/Store.php b/app/code/Magento/Store/Model/Store.php index bac4f63ef52..442347f72b5 100644 --- a/app/code/Magento/Store/Model/Store.php +++ b/app/code/Magento/Store/Model/Store.php @@ -22,6 +22,7 @@ use Magento\Framework\Model\AbstractModel; * @SuppressWarnings(PHPMD.TooManyFields) * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) */ class Store extends AbstractModel implements \Magento\Framework\App\ScopeInterface, diff --git a/dev/tests/api-functional/framework/Magento/TestFramework/Authentication/Rest/OauthClient.php b/dev/tests/api-functional/framework/Magento/TestFramework/Authentication/Rest/OauthClient.php index 6a71b708ac9..ae4604fd1c3 100644 --- a/dev/tests/api-functional/framework/Magento/TestFramework/Authentication/Rest/OauthClient.php +++ b/dev/tests/api-functional/framework/Magento/TestFramework/Authentication/Rest/OauthClient.php @@ -19,6 +19,9 @@ use OAuth\OAuth1\Signature\SignatureInterface; use OAuth\OAuth1\Token\StdOAuth1Token; use OAuth\OAuth1\Token\TokenInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class OauthClient extends AbstractService { /** @var string|null */ diff --git a/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/Webapi/Adapter/Rest.php b/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/Webapi/Adapter/Rest.php index 26ae75ed204..7488f42ae06 100644 --- a/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/Webapi/Adapter/Rest.php +++ b/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/Webapi/Adapter/Rest.php @@ -62,6 +62,7 @@ class Rest implements \Magento\TestFramework\TestCase\Webapi\AdapterInterface * {@inheritdoc} * @throws \LogicException * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function call($serviceInfo, $arguments = [], $storeCode = null) { diff --git a/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/WebapiAbstract.php b/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/WebapiAbstract.php index e0f80d3ef43..50cd00f7497 100644 --- a/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/WebapiAbstract.php +++ b/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/WebapiAbstract.php @@ -11,6 +11,9 @@ use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Filesystem; use Magento\Webapi\Model\Soap\Fault; +/** + * @SuppressWarnings(PHPMD.NumberOfChildren) + */ abstract class WebapiAbstract extends \PHPUnit_Framework_TestCase { /** TODO: Reconsider implementation of fixture-management methods after implementing several tests */ diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductCustomOptionRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductCustomOptionRepositoryTest.php index 641256e025b..f62a48e7f09 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductCustomOptionRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductCustomOptionRepositoryTest.php @@ -97,6 +97,7 @@ class ProductCustomOptionRepositoryTest extends WebapiAbstract /** * @magentoApiDataFixture Magento/Catalog/_files/product_with_options.php * @magentoAppIsolation enabled + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function testGetList() { @@ -138,6 +139,7 @@ class ProductCustomOptionRepositoryTest extends WebapiAbstract * @magentoApiDataFixture Magento/Catalog/_files/product_without_options.php * @magentoAppIsolation enabled * @dataProvider optionDataProvider + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function testSave($optionData) { @@ -284,6 +286,7 @@ class ProductCustomOptionRepositoryTest extends WebapiAbstract * @magentoApiDataFixture Magento/Catalog/_files/product_with_options.php * @magentoAppIsolation enabled * @dataProvider validOptionDataProvider + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function testUpdateOptionAddingNewValue($optionType) { diff --git a/dev/tests/api-functional/testsuite/Magento/CatalogInventory/Api/LowStockItemsTest.php b/dev/tests/api-functional/testsuite/Magento/CatalogInventory/Api/LowStockItemsTest.php index 564bdbcb41a..bbcf1389aaf 100644 --- a/dev/tests/api-functional/testsuite/Magento/CatalogInventory/Api/LowStockItemsTest.php +++ b/dev/tests/api-functional/testsuite/Magento/CatalogInventory/Api/LowStockItemsTest.php @@ -23,6 +23,7 @@ class LowStockItemsTest extends WebapiAbstract * @param array $result * @magentoApiDataFixture Magento/Catalog/_files/multiple_products.php * @dataProvider getLowStockItemsDataProvider + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function testGetLowStockItems($qty, $currentPage, $pageSize, $result) { diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceTest.php index e732bdf1301..050dec40b18 100644 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceTest.php @@ -94,6 +94,7 @@ class ReadServiceTest extends WebapiAbstract /** * @return array + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function getServiceInfo() { diff --git a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceTest.php index 28458e67082..d01b488f605 100644 --- a/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceTest.php @@ -116,6 +116,7 @@ class ReadServiceTest extends WebapiAbstract /** * @param string $cartId * @return array + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function getSelectedMethodServiceInfo($cartId) { diff --git a/dev/tests/api-functional/testsuite/Magento/Customer/Api/AddressMetadataTest.php b/dev/tests/api-functional/testsuite/Magento/Customer/Api/AddressMetadataTest.php index 4a85003340c..4f701f7b038 100644 --- a/dev/tests/api-functional/testsuite/Magento/Customer/Api/AddressMetadataTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Customer/Api/AddressMetadataTest.php @@ -195,6 +195,7 @@ class AddressMetadataTest extends WebapiAbstract * @param array $expectedResult * @param array $actualResult * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function checkValidationRules($expectedResult, $actualResult) { diff --git a/dev/tests/api-functional/testsuite/Magento/Customer/Api/CustomerMetadataTest.php b/dev/tests/api-functional/testsuite/Magento/Customer/Api/CustomerMetadataTest.php index b82ec82b342..d4f80054723 100644 --- a/dev/tests/api-functional/testsuite/Magento/Customer/Api/CustomerMetadataTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Customer/Api/CustomerMetadataTest.php @@ -258,6 +258,7 @@ class CustomerMetadataTest extends WebapiAbstract * @param array $expectedResult * @param array $actualResult * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function checkValidationRules($expectedResult, $actualResult) { diff --git a/dev/tests/api-functional/testsuite/Magento/Framework/Stdlib/CookieManagerTest.php b/dev/tests/api-functional/testsuite/Magento/Framework/Stdlib/CookieManagerTest.php index c6f10aab550..219416fd6db 100644 --- a/dev/tests/api-functional/testsuite/Magento/Framework/Stdlib/CookieManagerTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Framework/Stdlib/CookieManagerTest.php @@ -152,6 +152,7 @@ class CookieManagerTest extends \Magento\TestFramework\TestCase\WebapiAbstract * @param string $cookieName * @param array $cookies * @return $cookie|null + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ private function findCookie($cookieName, $cookies) { diff --git a/dev/tests/api-functional/testsuite/Magento/Integration/Service/V1/CustomerTokenServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Integration/Service/V1/CustomerTokenServiceTest.php index 03318d3bffa..c565a0e9bb8 100644 --- a/dev/tests/api-functional/testsuite/Magento/Integration/Service/V1/CustomerTokenServiceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Integration/Service/V1/CustomerTokenServiceTest.php @@ -83,6 +83,7 @@ class CustomerTokenServiceTest extends WebapiAbstract /** * @dataProvider validationDataProvider + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function testCreateCustomerAccessTokenEmptyOrNullCredentials($username, $password) { diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderAddressUpdateTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderAddressUpdateTest.php index f1455585d4f..5827ababd9f 100644 --- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderAddressUpdateTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderAddressUpdateTest.php @@ -20,6 +20,7 @@ class OrderAddressUpdateTest extends WebapiAbstract /** * @magentoApiDataFixture Magento/Sales/_files/order.php + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function testOrderAddressUpdate() { diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderStatusHistoryAddTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderStatusHistoryAddTest.php index 99725a43c57..eb34dc77c7c 100644 --- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderStatusHistoryAddTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderStatusHistoryAddTest.php @@ -36,6 +36,7 @@ class OrderStatusHistoryAddTest extends WebapiAbstract /** * @magentoApiDataFixture Magento/Sales/_files/order.php + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function testOrderCommentAdd() { diff --git a/dev/tests/api-functional/testsuite/Magento/Webapi/Routing/ServiceVersionV1Test.php b/dev/tests/api-functional/testsuite/Magento/Webapi/Routing/ServiceVersionV1Test.php index b576028352f..6061850059d 100644 --- a/dev/tests/api-functional/testsuite/Magento/Webapi/Routing/ServiceVersionV1Test.php +++ b/dev/tests/api-functional/testsuite/Magento/Webapi/Routing/ServiceVersionV1Test.php @@ -71,6 +71,7 @@ class ServiceVersionV1Test extends \Magento\Webapi\Routing\BaseService /** * Test get item with any type + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function testItemAnyType() { diff --git a/dev/tests/api-functional/testsuite/Magento/Webapi/WsdlGenerationFromDataObjectTest.php b/dev/tests/api-functional/testsuite/Magento/Webapi/WsdlGenerationFromDataObjectTest.php index 525cf49359d..23bb628f554 100644 --- a/dev/tests/api-functional/testsuite/Magento/Webapi/WsdlGenerationFromDataObjectTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Webapi/WsdlGenerationFromDataObjectTest.php @@ -222,6 +222,7 @@ RESPONSE_TYPE; * Ensure that complex type generated from Data Object is correct. * * @param string $wsdlContent + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _checkReferencedTypeDeclaration($wsdlContent) { @@ -587,6 +588,7 @@ GENERIC_FAULT_IN_MESSAGES; /** * @param string $wsdlContent + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _checkFaultsComplexTypeSection($wsdlContent) { diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormStub.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormStub.php index cbb8303fc6d..d8b79308b4a 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormStub.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormStub.php @@ -9,6 +9,9 @@ */ namespace Magento\Backend\Block\System\Config; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class FormStub extends \Magento\Backend\Block\System\Config\Form { /** diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/constant/minuscule_letter.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/constant/minuscule_letter.php index ae52ab28aed..9f2166f5946 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/constant/minuscule_letter.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/constant/minuscule_letter.php @@ -1,6 +1,9 @@ <?php define('SOME_CONSTaNT_2_ACT_4_YOU', 42); define("SOME_CONSTaNT_2_ACT_4_YOU", 2783); +/** + * @SuppressWarnings(PHPMD.ConstantNamingConventions) + */ class Magento_Test_Php_Exemplar_CodeStyleTest_phpcs_input_naming_constant_minuscule_letter { const SOME_LONG_CONSTaNT_2_ACT_4_YOU = 1; diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/method/normal_underscore_start.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/method/normal_underscore_start.php index eb8932a74cc..6fffaa5f938 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/method/normal_underscore_start.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/method/normal_underscore_start.php @@ -1,6 +1,9 @@ <?php class Magento_Test_Php_Exemplar_CodeStyleTest_phpcs_input_naming_method_normal_underscore_start { + /** + * @SuppressWarnings(PHPMD.UnusedPrivateMethod) + */ private function _testFunctionPrivate() { } diff --git a/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/PreprocessorTest.php b/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/PreprocessorTest.php index 870a89f5cec..656d52726e0 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/PreprocessorTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/PreprocessorTest.php @@ -10,6 +10,9 @@ use Magento\Framework\DB\Select; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; use PHPUnit_Framework_MockObject_MockObject as MockObject; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class PreprocessorTest extends \PHPUnit_Framework_TestCase { /** diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php index 544b3bc1566..7f70068c0bd 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php @@ -385,6 +385,7 @@ class OnepageTest extends \PHPUnit_Framework_TestCase * @SuppressWarnings(PHPMD.ExcessiveParameterList) * @SuppressWarnings(PHPMD.NPathComplexity) * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function testSaveBilling( $data, diff --git a/dev/tests/unit/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/DirectiveTest.php b/dev/tests/unit/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/DirectiveTest.php index 021506cdbb6..ffd990dfc3b 100644 --- a/dev/tests/unit/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/DirectiveTest.php +++ b/dev/tests/unit/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/DirectiveTest.php @@ -7,6 +7,7 @@ namespace Magento\Cms\Controller\Adminhtml\Wysiwyg; /** * @covers \Magento\Cms\Controller\Adminhtml\Wysiwyg\Directive + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class DirectiveTest extends \PHPUnit_Framework_TestCase { diff --git a/lib/internal/Magento/Framework/Code/Reader/SourceArgumentsReader.php b/lib/internal/Magento/Framework/Code/Reader/SourceArgumentsReader.php index c31fa9c00d8..29b48c744ba 100644 --- a/lib/internal/Magento/Framework/Code/Reader/SourceArgumentsReader.php +++ b/lib/internal/Magento/Framework/Code/Reader/SourceArgumentsReader.php @@ -18,6 +18,9 @@ class SourceArgumentsReader * @param \ReflectionClass $class * @param bool $inherited * @return array List of constructor argument types. + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getConstructorArgumentTypes(\ReflectionClass $class, $inherited = false) { @@ -115,6 +118,7 @@ class SourceArgumentsReader * * @param array $file * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function getImportedNamespaces(array $file) { diff --git a/lib/internal/Magento/Framework/Config/Theme.php b/lib/internal/Magento/Framework/Config/Theme.php index 893f4dac153..4a68358e353 100644 --- a/lib/internal/Magento/Framework/Config/Theme.php +++ b/lib/internal/Magento/Framework/Config/Theme.php @@ -50,6 +50,7 @@ class Theme * * @param string $configContent * @return array + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _extractData($configContent) { diff --git a/lib/internal/Magento/Framework/DB/AbstractMapper.php b/lib/internal/Magento/Framework/DB/AbstractMapper.php index 2bc7d790ded..7a1206c095b 100644 --- a/lib/internal/Magento/Framework/DB/AbstractMapper.php +++ b/lib/internal/Magento/Framework/DB/AbstractMapper.php @@ -15,6 +15,7 @@ use Magento\Framework\Object; /** * Class AbstractMapper * @package Magento\Framework\DB + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractMapper implements MapperInterface { diff --git a/lib/internal/Magento/Framework/DB/GenericMapper.php b/lib/internal/Magento/Framework/DB/GenericMapper.php index 5b507baf56c..d3e07450ae4 100644 --- a/lib/internal/Magento/Framework/DB/GenericMapper.php +++ b/lib/internal/Magento/Framework/DB/GenericMapper.php @@ -87,6 +87,7 @@ class GenericMapper extends AbstractMapper * @param array $fields * @throws \Zend_Db_Select_Exception * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function mapFields(array $fields) { diff --git a/lib/internal/Magento/Framework/Object/Mapper.php b/lib/internal/Magento/Framework/Object/Mapper.php index bffeefb451d..ffa9bcb041e 100644 --- a/lib/internal/Magento/Framework/Object/Mapper.php +++ b/lib/internal/Magento/Framework/Object/Mapper.php @@ -9,6 +9,10 @@ */ namespace Magento\Framework\Object; +/** + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + */ class Mapper { /** diff --git a/lib/internal/Magento/Framework/Search/Adapter/Mysql/Mapper.php b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Mapper.php index 959ba62775a..2f8579a79e2 100644 --- a/lib/internal/Magento/Framework/Search/Adapter/Mysql/Mapper.php +++ b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Mapper.php @@ -16,6 +16,7 @@ use Magento\Framework\Search\RequestInterface; /** * Mapper class. Maps library request to specific adapter dependent query + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Mapper { diff --git a/lib/internal/Magento/Framework/Search/Request/Mapper.php b/lib/internal/Magento/Framework/Search/Request/Mapper.php index 346b5a66039..488880d07a0 100644 --- a/lib/internal/Magento/Framework/Search/Request/Mapper.php +++ b/lib/internal/Magento/Framework/Search/Request/Mapper.php @@ -8,6 +8,9 @@ namespace Magento\Framework\Search\Request; use Magento\Framework\Exception\StateException; use Magento\Framework\Search\Request\Query\Filter; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Mapper { /** @@ -96,6 +99,7 @@ class Mapper * @throws \Exception * @throws \InvalidArgumentException * @throws StateException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ private function mapQuery($queryName) { -- GitLab From 956d3e1fe34b97f96399abd7b71554f97a8b8bd4 Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Wed, 21 Jan 2015 05:23:45 -0800 Subject: [PATCH 102/114] MAGETWO-31578: Implement tool for adding annotations to existing code - added phpcs annotations --- .../Magento/Backend/Controller/Adminhtml/System/ConfigTest.php | 3 +++ dev/tests/integration/testsuite/Magento/Weee/Model/TaxTest.php | 3 +++ .../Framework/Code/Validator/ConstructorArgumentTypesTest.php | 3 +++ .../testsuite/Magento/GoogleShopping/Model/ObserverTest.php | 2 ++ .../Magento/Tools/Di/App/Task/OperationFactoryTest.php | 3 +++ 5 files changed, 14 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/ConfigTest.php index 3aeb7044dc2..883b43e6ef7 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/ConfigTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Controller\Adminhtml\System; use Magento\TestFramework\Helper\Bootstrap; diff --git a/dev/tests/integration/testsuite/Magento/Weee/Model/TaxTest.php b/dev/tests/integration/testsuite/Magento/Weee/Model/TaxTest.php index 8a94168c895..16f22d824e4 100644 --- a/dev/tests/integration/testsuite/Magento/Weee/Model/TaxTest.php +++ b/dev/tests/integration/testsuite/Magento/Weee/Model/TaxTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Weee\Model; use Magento\Customer\Api\Data\CustomerDataBuilder; diff --git a/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/ConstructorArgumentTypesTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/ConstructorArgumentTypesTest.php index 0de3d403d58..090f0e01598 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/ConstructorArgumentTypesTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/ConstructorArgumentTypesTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Code\Validator; class ConstructorArgumentTypesTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/GoogleShopping/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/GoogleShopping/Model/ObserverTest.php index 930c52facbf..3ce39e7517b 100644 --- a/dev/tests/unit/testsuite/Magento/GoogleShopping/Model/ObserverTest.php +++ b/dev/tests/unit/testsuite/Magento/GoogleShopping/Model/ObserverTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\GoogleShopping\Model; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; diff --git a/dev/tests/unit/testsuite/Magento/Tools/Di/App/Task/OperationFactoryTest.php b/dev/tests/unit/testsuite/Magento/Tools/Di/App/Task/OperationFactoryTest.php index c15e189b777..359adca36a6 100644 --- a/dev/tests/unit/testsuite/Magento/Tools/Di/App/Task/OperationFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Tools/Di/App/Task/OperationFactoryTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Tools\Di\App\Task; class OperationFactoryTest extends \PHPUnit_Framework_TestCase -- GitLab From 10400b8836bca35f58bbf4366af966032da75647 Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Wed, 21 Jan 2015 05:31:58 -0800 Subject: [PATCH 103/114] MAGETWO-31578: Implement tool for adding annotations to existing code - phpcs annotations added --- app/code/Magento/Checkout/Model/Type/Onepage.php | 2 ++ app/code/Magento/Customer/Model/AccountManagement.php | 2 ++ app/code/Magento/Customer/Model/Address/Mapper.php | 2 ++ app/code/Magento/Customer/Model/Customer/Mapper.php | 2 ++ .../Customer/Model/Resource/Group/Grid/ServiceCollection.php | 3 +++ .../Sales/Block/Adminhtml/Order/Create/Form/Account.php | 3 +++ 6 files changed, 14 insertions(+) diff --git a/app/code/Magento/Checkout/Model/Type/Onepage.php b/app/code/Magento/Checkout/Model/Type/Onepage.php index ef1b1cf6c27..016d413a7d5 100644 --- a/app/code/Magento/Checkout/Model/Type/Onepage.php +++ b/app/code/Magento/Checkout/Model/Type/Onepage.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * One page checkout processing model */ diff --git a/app/code/Magento/Customer/Model/AccountManagement.php b/app/code/Magento/Customer/Model/AccountManagement.php index 56871b94ceb..c5c59b797fa 100644 --- a/app/code/Magento/Customer/Model/AccountManagement.php +++ b/app/code/Magento/Customer/Model/AccountManagement.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Customer\Model; use Magento\Customer\Api\AccountManagementInterface; diff --git a/app/code/Magento/Customer/Model/Address/Mapper.php b/app/code/Magento/Customer/Model/Address/Mapper.php index fe19174210d..3fefe1c52cb 100644 --- a/app/code/Magento/Customer/Model/Address/Mapper.php +++ b/app/code/Magento/Customer/Model/Address/Mapper.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Customer\Model\Address; use Magento\Customer\Api\Data\AddressInterface; diff --git a/app/code/Magento/Customer/Model/Customer/Mapper.php b/app/code/Magento/Customer/Model/Customer/Mapper.php index 92b618edb24..c9f499c8226 100644 --- a/app/code/Magento/Customer/Model/Customer/Mapper.php +++ b/app/code/Magento/Customer/Model/Customer/Mapper.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Customer\Model\Customer; use Magento\Customer\Api\Data\CustomerInterface; diff --git a/app/code/Magento/Customer/Model/Resource/Group/Grid/ServiceCollection.php b/app/code/Magento/Customer/Model/Resource/Group/Grid/ServiceCollection.php index 22980e9d14f..ec1fb6b1be9 100644 --- a/app/code/Magento/Customer/Model/Resource/Group/Grid/ServiceCollection.php +++ b/app/code/Magento/Customer/Model/Resource/Group/Grid/ServiceCollection.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Customer\Model\Resource\Group\Grid; use Magento\Core\Model\EntityFactory; diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php index bb259cd7d86..08137358bf7 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Block\Adminhtml\Order\Create\Form; use Magento\Framework\Api\ExtensibleDataObjectConverter; -- GitLab From d6a05945ff0c53ee6cc163ee981a53d47476ae9f Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Wed, 21 Jan 2015 17:33:37 +0200 Subject: [PATCH 104/114] MAGETWO-31575: Remove black/white lists from file system and builds configuration - fixed test --- .../Framework/Test/Utility/FilesTest.php | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/dev/tests/unit/testsuite/Magento/Framework/Test/Utility/FilesTest.php b/dev/tests/unit/testsuite/Magento/Framework/Test/Utility/FilesTest.php index 480dc93a159..51617860c20 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Test/Utility/FilesTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Test/Utility/FilesTest.php @@ -44,21 +44,20 @@ class FilesTest extends \PHPUnit_Framework_TestCase $this->assertSame([], Files::init()->readLists(__DIR__ . '/_files/no_good.txt')); } - /** - * @expectedException \Exception - * @expectedExceptionMessage The glob() pattern 'bar/unknown' didn't return any result. - */ public function testReadListsCorruptedDir() { - Files::init()->readLists(__DIR__ . '/_files/list_corrupted_dir.txt'); + $result = Files::init()->readLists(__DIR__ . '/_files/list_corrupted_dir.txt'); + + foreach ($result as $path) { + $this->assertNotContains('bar/unknown', $path); + } } - /** - * @expectedException \Exception - * @expectedExceptionMessage The glob() pattern 'unknown.txt' didn't return any result. - */ public function testReadListsCorruptedFile() { - Files::init()->readLists(__DIR__ . '/_files/list_corrupted_file.txt'); - } + $result = Files::init()->readLists(__DIR__ . '/_files/list_corrupted_file.txt'); + + foreach ($result as $path) { + $this->assertNotContains('unknown.txt', $path); + } } } -- GitLab From 84f7e6673d2ac1170f4ab61c1483c1010b8320a5 Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Wed, 21 Jan 2015 17:42:12 +0200 Subject: [PATCH 105/114] MAGETWO-31575: Remove black/white lists from file system and builds configuration - fixed codestyle error --- .../testsuite/Magento/Framework/Test/Utility/FilesTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/tests/unit/testsuite/Magento/Framework/Test/Utility/FilesTest.php b/dev/tests/unit/testsuite/Magento/Framework/Test/Utility/FilesTest.php index 51617860c20..9c7dccdfd0e 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Test/Utility/FilesTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Test/Utility/FilesTest.php @@ -59,5 +59,6 @@ class FilesTest extends \PHPUnit_Framework_TestCase foreach ($result as $path) { $this->assertNotContains('unknown.txt', $path); - } } + } + } } -- GitLab From aec208993e9225dd55b315526dac749a3034352e Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Wed, 21 Jan 2015 17:50:55 +0200 Subject: [PATCH 106/114] MAGETWO-31575: Remove black/white lists from file system and builds configuration - fixed test --- .../TestFramework/CodingStandard/Tool/CodeSnifferTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/CodingStandard/Tool/CodeSnifferTest.php b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/CodingStandard/Tool/CodeSnifferTest.php index 1c603c48a6b..8f71637e829 100644 --- a/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/CodingStandard/Tool/CodeSnifferTest.php +++ b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/CodingStandard/Tool/CodeSnifferTest.php @@ -40,7 +40,6 @@ class CodeSnifferTest extends \PHPUnit_Framework_TestCase public function testRun() { $whiteList = ['test' . rand(), 'test' . rand()]; - $blackList = ['test' . rand(), 'test' . rand()]; $extensions = ['test' . rand(), 'test' . rand()]; $this->_wrapper->expects($this->once())->method('getDefaults')->will($this->returnValue([])); @@ -48,17 +47,18 @@ class CodeSnifferTest extends \PHPUnit_Framework_TestCase $expectedCliEmulation = [ 'files' => $whiteList, 'standard' => [self::RULE_SET], - 'ignored' => $blackList, 'extensions' => $extensions, 'reportFile' => self::REPORT_FILE, 'warningSeverity' => 0, 'reports' => ['checkstyle' => null], ]; + $this->_tool->setExtensions($extensions); + $this->_wrapper->expects($this->once())->method('setValues')->with($this->equalTo($expectedCliEmulation)); $this->_wrapper->expects($this->once())->method('process'); - $this->_tool->run($whiteList, $blackList, $extensions); + $this->_tool->run($whiteList); } } -- GitLab From 23791e4f9932868a2b4a747eab2d75d79248cf1c Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Wed, 21 Jan 2015 18:45:22 +0200 Subject: [PATCH 107/114] MAGETWO-32831: Can not checkout with multiple addresses --- app/code/Magento/Bundle/Model/Plugin/QuoteItem.php | 2 +- .../Model/Checkout/Type/Multishipping.php | 10 +++++----- app/code/Magento/Tax/Model/Quote/ToOrderConverter.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/Bundle/Model/Plugin/QuoteItem.php b/app/code/Magento/Bundle/Model/Plugin/QuoteItem.php index 0ed1f9390ce..2b75f6081ea 100644 --- a/app/code/Magento/Bundle/Model/Plugin/QuoteItem.php +++ b/app/code/Magento/Bundle/Model/Plugin/QuoteItem.php @@ -23,7 +23,7 @@ class QuoteItem \Magento\Quote\Model\Quote\Item\ToOrderItem $subject, Closure $proceed, \Magento\Quote\Model\Quote\Item\AbstractItem $item, - $additional + $additional = [] ) { /** @var $orderItem \Magento\Sales\Model\Order\Item */ $orderItem = $proceed($item, $additional); diff --git a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php index 5acdbda17e9..88428925113 100644 --- a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php +++ b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php @@ -597,17 +597,17 @@ class Multishipping extends \Magento\Framework\Object $quote->reserveOrderId(); $quote->collectTotals(); - $order = $this->quoteAddressToOrder->convert($address, []); + $order = $this->quoteAddressToOrder->convert($address); $order->setQuote($quote); - $order->setBillingAddress($this->quoteAddressToOrderAddress->convert($quote->getBillingAddress(), [])); + $order->setBillingAddress($this->quoteAddressToOrderAddress->convert($quote->getBillingAddress())); if ($address->getAddressType() == 'billing') { $order->setIsVirtual(1); } else { - $order->setShippingAddress($this->quoteAddressToOrderAddress->convert($address, [])); + $order->setShippingAddress($this->quoteAddressToOrderAddress->convert($address)); } - $order->setPayment($this->quotePaymentToOrderPayment->convert($quote->getPayment(), [])); + $order->setPayment($this->quotePaymentToOrderPayment->convert($quote->getPayment())); if ($this->priceCurrency->round($address->getGrandTotal()) == 0) { $order->getPayment()->setMethod('free'); } @@ -622,7 +622,7 @@ class Multishipping extends \Magento\Framework\Object )->setProductOptions( $_quoteItem->getProduct()->getTypeInstance()->getOrderOptions($_quoteItem->getProduct()) ); - $orderItem = $this->quoteItemToOrderItem->convert($_quoteItem, []); + $orderItem = $this->quoteItemToOrderItem->convert($_quoteItem); if ($item->getParentItem()) { $orderItem->setParentItem($order->getItemByQuoteItemId($item->getParentItem()->getId())); } diff --git a/app/code/Magento/Tax/Model/Quote/ToOrderConverter.php b/app/code/Magento/Tax/Model/Quote/ToOrderConverter.php index 5db47dec6ea..3bd9d085df8 100644 --- a/app/code/Magento/Tax/Model/Quote/ToOrderConverter.php +++ b/app/code/Magento/Tax/Model/Quote/ToOrderConverter.php @@ -22,7 +22,7 @@ class ToOrderConverter * @param array $additional * @return array */ - public function beforeConvert(QuoteAddressToOrder $subject, QuoteAddress $address, $additional) + public function beforeConvert(QuoteAddressToOrder $subject, QuoteAddress $address, $additional = []) { $this->quoteAddress = $address; return [$address, $additional]; -- GitLab From f1c9fdf61e0e6410e387423dc7205f92728b808b Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Thu, 22 Jan 2015 10:34:51 +0200 Subject: [PATCH 108/114] MAGETWO-31578: Implement tool for adding annotations to existing code - annotations reverted for test files --- .../phpcs/input/naming/constant/minuscule_letter.php | 3 --- .../phpcs/input/naming/method/normal_underscore_start.php | 3 --- 2 files changed, 6 deletions(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/constant/minuscule_letter.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/constant/minuscule_letter.php index 9f2166f5946..ae52ab28aed 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/constant/minuscule_letter.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/constant/minuscule_letter.php @@ -1,9 +1,6 @@ <?php define('SOME_CONSTaNT_2_ACT_4_YOU', 42); define("SOME_CONSTaNT_2_ACT_4_YOU", 2783); -/** - * @SuppressWarnings(PHPMD.ConstantNamingConventions) - */ class Magento_Test_Php_Exemplar_CodeStyleTest_phpcs_input_naming_constant_minuscule_letter { const SOME_LONG_CONSTaNT_2_ACT_4_YOU = 1; diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/method/normal_underscore_start.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/method/normal_underscore_start.php index 6fffaa5f938..eb8932a74cc 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/method/normal_underscore_start.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/method/normal_underscore_start.php @@ -1,9 +1,6 @@ <?php class Magento_Test_Php_Exemplar_CodeStyleTest_phpcs_input_naming_method_normal_underscore_start { - /** - * @SuppressWarnings(PHPMD.UnusedPrivateMethod) - */ private function _testFunctionPrivate() { } -- GitLab From 42634153d82a6bff1331b8702c6e9cb2f355fd28 Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Thu, 22 Jan 2015 10:53:37 +0200 Subject: [PATCH 109/114] MAGETWO-31578: Implement tool for adding annotations to existing code - annotations added --- app/code/Magento/Catalog/Block/Rss/Product/Special.php | 1 + .../Customer/Model/Resource/Group/Grid/ServiceCollection.php | 1 + app/code/Magento/CustomerImportExport/Model/Import/Address.php | 1 + app/code/Magento/OfflineShipping/Model/Quote/Freeshipping.php | 1 + app/code/Magento/Weee/Model/Total/Quote/Weee.php | 1 + 5 files changed, 5 insertions(+) diff --git a/app/code/Magento/Catalog/Block/Rss/Product/Special.php b/app/code/Magento/Catalog/Block/Rss/Product/Special.php index f9cb008f1b5..d5da4e503b8 100644 --- a/app/code/Magento/Catalog/Block/Rss/Product/Special.php +++ b/app/code/Magento/Catalog/Block/Rss/Product/Special.php @@ -77,6 +77,7 @@ class Special extends \Magento\Framework\View\Element\AbstractBlock implements D * @param \Magento\Framework\Stdlib\DateTime\DateFactory $dateFactory * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Customer/Model/Resource/Group/Grid/ServiceCollection.php b/app/code/Magento/Customer/Model/Resource/Group/Grid/ServiceCollection.php index ec1fb6b1be9..04589231f0b 100644 --- a/app/code/Magento/Customer/Model/Resource/Group/Grid/ServiceCollection.php +++ b/app/code/Magento/Customer/Model/Resource/Group/Grid/ServiceCollection.php @@ -59,6 +59,7 @@ class ServiceCollection extends AbstractServiceCollection * @param bool $printQuery * @param bool $logQuery * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function loadData($printQuery = false, $logQuery = false) { diff --git a/app/code/Magento/CustomerImportExport/Model/Import/Address.php b/app/code/Magento/CustomerImportExport/Model/Import/Address.php index 4f11734d2c4..425c3bab09f 100644 --- a/app/code/Magento/CustomerImportExport/Model/Import/Address.php +++ b/app/code/Magento/CustomerImportExport/Model/Import/Address.php @@ -585,6 +585,7 @@ class Address extends AbstractCustomer * * @param array $defaults * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _saveCustomerDefaults(array $defaults) { diff --git a/app/code/Magento/OfflineShipping/Model/Quote/Freeshipping.php b/app/code/Magento/OfflineShipping/Model/Quote/Freeshipping.php index a19ded05b53..efe7c7f63f4 100644 --- a/app/code/Magento/OfflineShipping/Model/Quote/Freeshipping.php +++ b/app/code/Magento/OfflineShipping/Model/Quote/Freeshipping.php @@ -94,6 +94,7 @@ class Freeshipping extends \Magento\Quote\Model\Quote\Address\Total\AbstractTota * * @param \Magento\Quote\Model\Quote\Address $address * @return \Magento\OfflineShipping\Model\Quote\Freeshipping + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function fetch(Address $address) { diff --git a/app/code/Magento/Weee/Model/Total/Quote/Weee.php b/app/code/Magento/Weee/Model/Total/Quote/Weee.php index ca6eccc0004..3ba498c70c4 100644 --- a/app/code/Magento/Weee/Model/Total/Quote/Weee.php +++ b/app/code/Magento/Weee/Model/Total/Quote/Weee.php @@ -316,6 +316,7 @@ class Weee extends AbstractTotal * * @param \Magento\Quote\Model\Quote\Address $address * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function fetch(\Magento\Quote\Model\Quote\Address $address) { -- GitLab From c148d2248b98b6dc4edde8fd659142c43a004b1d Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin <dkvashnin@ebay.com> Date: Thu, 22 Jan 2015 13:30:37 +0200 Subject: [PATCH 110/114] MAGETWO-31578: Implement tool for adding annotations to existing code - added phpmd annotations --- lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php b/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php index a90a813f8ce..83467bf6bcc 100644 --- a/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php +++ b/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php @@ -2453,6 +2453,8 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface * @return \Zend_Db_Statement_Interface * @throws \Zend_Db_Exception * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function addIndex( $tableName, @@ -2578,6 +2580,7 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface * @param string $schemaName * @param string $refSchemaName * @return \Zend_Db_Statement_Interface + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function addForeignKey( $fkName, @@ -2692,6 +2695,7 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface * @param string $fieldName * @param integer|string|array $condition * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function prepareSqlCondition($fieldName, $condition) { @@ -2798,6 +2802,9 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface * @param array $column the column describe array * @param mixed $value * @return mixed + * + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function prepareColumnValue(array $column, $value) { @@ -3383,6 +3390,8 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface * @param string|array $table * @return string * @throws \Magento\Framework\DB\DBException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function updateFromSelect(Select $select, $table) { -- GitLab From 04a81e514213801ff02cd15c12b5f1c55972754b Mon Sep 17 00:00:00 2001 From: Alex Akimov <aakimov@ebay.com> Date: Thu, 22 Jan 2015 13:54:17 +0200 Subject: [PATCH 111/114] MAGETWO-32811: GET /V1/carts/:cartId/selected-payment-methods service always return "cc_exp_year" even if it not needed --- .../Magento/Quote/Model/Quote/Payment.php | 3 +- .../Magento/Quote/Model/Quote/PaymentTest.php | 48 +++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 dev/tests/unit/testsuite/Magento/Quote/Model/Quote/PaymentTest.php diff --git a/app/code/Magento/Quote/Model/Quote/Payment.php b/app/code/Magento/Quote/Model/Quote/Payment.php index a6b5657263d..6eedc8b8925 100644 --- a/app/code/Magento/Quote/Model/Quote/Payment.php +++ b/app/code/Magento/Quote/Model/Quote/Payment.php @@ -279,7 +279,8 @@ class Payment extends \Magento\Payment\Model\Info implements \Magento\Quote\Api\ */ public function getCcExpYear() { - return $this->getData('cc_exp_year'); + $expirationYear = $this->getData('cc_exp_year') ?: null; + return $expirationYear; } /** diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/PaymentTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/PaymentTest.php new file mode 100644 index 00000000000..6d0bc8694a5 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/PaymentTest.php @@ -0,0 +1,48 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Quote\Model\Quote; + +use Magento\TestFramework\Helper\ObjectManager; + +class PaymentTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var Payment + */ + private $model; + + protected function setUp() + { + $objectManager = new ObjectManager($this); + $this->model = $objectManager->getObject( + '\Magento\Quote\Model\Quote\Payment' + ); + } + + /** + * @param int|string|null $databaseValue + * @param int|string|null $expectedValue + * @dataProvider yearValueDataProvider + */ + public function testGetCcExpYearReturnsValidValue($databaseValue, $expectedValue) + { + $this->model->setData('cc_exp_year', $databaseValue); + $this->assertEquals($expectedValue, $this->model->getCcExpYear()); + } + + /** + * @return array + */ + public function yearValueDataProvider() + { + return array( + array(null, null), + array(0, null), + array('0', null), + array(1939, 1939), + ); + } +} -- GitLab From 049ecf3c284da5cb00b78aaea72f7c5c35818690 Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Thu, 22 Jan 2015 14:40:37 +0200 Subject: [PATCH 112/114] MAGETWO-32078: Validation for Terms and Conditions should be the same for OnePage Checkout and Multishipping Flow - Code style fixes --- .../app/Magento/Customer/Test/Repository/CustomerInjectable.php | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerInjectable.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerInjectable.php index 90c0f207943..fccd0ebc423 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerInjectable.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerInjectable.php @@ -19,6 +19,7 @@ class CustomerInjectable extends AbstractRepository * @param array $defaultData * * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function __construct(array $defaultConfig = [], array $defaultData = []) { -- GitLab From 9cbe609b58b901766c7875e3b68c61e2d3fb4c71 Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Fri, 23 Jan 2015 14:11:12 +0200 Subject: [PATCH 113/114] MAGETWO-32775: Prepare pull request for Checkout related modules MSC --- .../Magento/Quote/Model/Quote/PaymentTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/PaymentTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/PaymentTest.php index 6d0bc8694a5..b09fe0b26b4 100644 --- a/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/PaymentTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/PaymentTest.php @@ -38,11 +38,11 @@ class PaymentTest extends \PHPUnit_Framework_TestCase */ public function yearValueDataProvider() { - return array( - array(null, null), - array(0, null), - array('0', null), - array(1939, 1939), - ); + return [ + [null, null], + [0, null], + ['0', null], + [1939, 1939], + ]; } } -- GitLab From 8d6b9c7fdf98b70832721a92052e4f89bd9120da Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov <ishakhsuvarov@ebay.com> Date: Fri, 23 Jan 2015 16:07:18 +0200 Subject: [PATCH 114/114] MAGETWO-32775: Prepare pull request for Checkout related modules MSC - stitic tests fix --- .../CheckoutAgreements/Api/Data/AgreementInterface.php | 2 ++ app/code/Magento/Directory/Model/Currency.php | 1 + app/code/Magento/Payment/Model/Method/AbstractMethod.php | 1 + app/code/Magento/Payment/Model/Method/Cc.php | 4 ++++ app/code/Magento/Payment/Model/Method/Free.php | 1 + .../Magento/Quote/Api/Data/ShippingMethodInterface.php | 1 + .../Quote/Api/PaymentMethodManagementInterface.php | 3 ++- .../Quote/Api/ShippingMethodManagementInterface.php | 3 ++- app/code/Magento/Quote/Model/QuoteManagement.php | 3 +++ app/code/Magento/Tax/Model/Quote/ToOrderConverter.php | 2 ++ .../Magento/GiftMessage/Api/CartRepositoryTest.php | 2 +- .../testsuite/Magento/Quote/Api/CouponManagementTest.php | 2 +- .../Magento/GiftMessage/Model/CartRepositoryTest.php | 9 ++++++--- .../Magento/GiftMessage/Model/ItemRepositoryTest.php | 9 ++++++--- .../Magento/Quote/Model/QuoteManagementTest.php | 9 +++++++-- 15 files changed, 40 insertions(+), 12 deletions(-) diff --git a/app/code/Magento/CheckoutAgreements/Api/Data/AgreementInterface.php b/app/code/Magento/CheckoutAgreements/Api/Data/AgreementInterface.php index 71088e34dcb..86daddcff06 100644 --- a/app/code/Magento/CheckoutAgreements/Api/Data/AgreementInterface.php +++ b/app/code/Magento/CheckoutAgreements/Api/Data/AgreementInterface.php @@ -46,6 +46,7 @@ interface AgreementInterface * Returns the agreement status. * * @return bool Agreement status. + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsActive(); @@ -54,6 +55,7 @@ interface AgreementInterface * * @return bool * true - HTML. * * false - plain text. + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsHtml(); } diff --git a/app/code/Magento/Directory/Model/Currency.php b/app/code/Magento/Directory/Model/Currency.php index 7b8365e5582..3b5ec26325a 100644 --- a/app/code/Magento/Directory/Model/Currency.php +++ b/app/code/Magento/Directory/Model/Currency.php @@ -158,6 +158,7 @@ class Currency extends \Magento\Framework\Model\AbstractModel * @param string $id * @param string $field * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function load($id, $field = null) { diff --git a/app/code/Magento/Payment/Model/Method/AbstractMethod.php b/app/code/Magento/Payment/Model/Method/AbstractMethod.php index 69e2ccddf9a..ca6dd62a7c5 100644 --- a/app/code/Magento/Payment/Model/Method/AbstractMethod.php +++ b/app/code/Magento/Payment/Model/Method/AbstractMethod.php @@ -19,6 +19,7 @@ use Magento\Quote\Api\Data\PaymentMethodInterface; * @method AbstractMethod setStore() * @SuppressWarnings(PHPMD.ExcessivePublicCount) * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractMethod extends \Magento\Framework\Model\AbstractExtensibleModel implements MethodInterface, diff --git a/app/code/Magento/Payment/Model/Method/Cc.php b/app/code/Magento/Payment/Model/Method/Cc.php index cc4de6cbacc..ab4058f3789 100644 --- a/app/code/Magento/Payment/Model/Method/Cc.php +++ b/app/code/Magento/Payment/Model/Method/Cc.php @@ -5,6 +5,9 @@ */ namespace Magento\Payment\Model\Method; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Cc extends \Magento\Payment\Model\Method\AbstractMethod { /** @@ -52,6 +55,7 @@ class Cc extends \Magento\Payment\Model\Method\AbstractMethod * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Payment/Model/Method/Free.php b/app/code/Magento/Payment/Model/Method/Free.php index 07776869cac..b7a7e00f601 100644 --- a/app/code/Magento/Payment/Model/Method/Free.php +++ b/app/code/Magento/Payment/Model/Method/Free.php @@ -51,6 +51,7 @@ class Free extends \Magento\Payment\Model\Method\AbstractMethod * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Quote/Api/Data/ShippingMethodInterface.php b/app/code/Magento/Quote/Api/Data/ShippingMethodInterface.php index de59f648042..62dafce5a1d 100644 --- a/app/code/Magento/Quote/Api/Data/ShippingMethodInterface.php +++ b/app/code/Magento/Quote/Api/Data/ShippingMethodInterface.php @@ -88,6 +88,7 @@ interface ShippingMethodInterface extends \Magento\Framework\Api\ExtensibleDataI * Returns the value of the availability flag for the current shipping method. * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getAvailable(); } diff --git a/app/code/Magento/Quote/Api/PaymentMethodManagementInterface.php b/app/code/Magento/Quote/Api/PaymentMethodManagementInterface.php index 3f6db9a7e12..47fa55271c3 100644 --- a/app/code/Magento/Quote/Api/PaymentMethodManagementInterface.php +++ b/app/code/Magento/Quote/Api/PaymentMethodManagementInterface.php @@ -13,8 +13,9 @@ interface PaymentMethodManagementInterface * @param int $cartId The cart ID. * @param \Magento\Quote\Api\Data\PaymentInterface $method The payment method. * @return int Payment method ID. - * @throws \Magento\Framework\Exception\State\InvalidTransitionException The billing or shipping address is not set, or the specified payment method is not available. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. + * @throws \Magento\Framework\Exception\State\InvalidTransitionException The billing or shipping address + * is not set, or the specified payment method is not available. */ public function set($cartId, \Magento\Quote\Api\Data\PaymentInterface $method); diff --git a/app/code/Magento/Quote/Api/ShippingMethodManagementInterface.php b/app/code/Magento/Quote/Api/ShippingMethodManagementInterface.php index d6d11dca4d3..9e7577a8f69 100644 --- a/app/code/Magento/Quote/Api/ShippingMethodManagementInterface.php +++ b/app/code/Magento/Quote/Api/ShippingMethodManagementInterface.php @@ -16,8 +16,9 @@ interface ShippingMethodManagementInterface * @return bool * @throws \Magento\Framework\Exception\InputException The shipping method is not valid for an empty cart. * @throws \Magento\Framework\Exception\CouldNotSaveException The shipping method could not be saved. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart contains only virtual products so the shipping method does not apply. * @throws \Magento\Framework\Exception\StateException The billing or shipping address is not set. + * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart contains only virtual products + * so the shipping method does not apply. */ public function set($cartId, $carrierCode, $methodCode); diff --git a/app/code/Magento/Quote/Model/QuoteManagement.php b/app/code/Magento/Quote/Model/QuoteManagement.php index af2aaca9ebf..7ff80972905 100644 --- a/app/code/Magento/Quote/Model/QuoteManagement.php +++ b/app/code/Magento/Quote/Model/QuoteManagement.php @@ -20,6 +20,8 @@ use Magento\Framework\Exception\StateException; /** * Class QuoteManagement + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class QuoteManagement implements \Magento\Quote\Api\CartManagementInterface { @@ -102,6 +104,7 @@ class QuoteManagement implements \Magento\Quote\Api\CartManagementInterface * @param QuoteRepository $quoteRepository * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository * @param \Magento\Customer\Model\CustomerFactory $customerModelFactory + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( EventManager $eventManager, diff --git a/app/code/Magento/Tax/Model/Quote/ToOrderConverter.php b/app/code/Magento/Tax/Model/Quote/ToOrderConverter.php index 3bd9d085df8..18fa11ad4c9 100644 --- a/app/code/Magento/Tax/Model/Quote/ToOrderConverter.php +++ b/app/code/Magento/Tax/Model/Quote/ToOrderConverter.php @@ -21,6 +21,7 @@ class ToOrderConverter * @param QuoteAddress $address * @param array $additional * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeConvert(QuoteAddressToOrder $subject, QuoteAddress $address, $additional = []) { @@ -32,6 +33,7 @@ class ToOrderConverter * @param QuoteAddressToOrder $subject * @param OrderInterface $order * @return OrderInterface + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterConvert(QuoteAddressToOrder $subject, OrderInterface $order) { diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php index 6cb6f6d9b3a..b34a8ab1ff9 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php @@ -68,7 +68,7 @@ class CartRepositoryTest extends WebapiAbstract { // sales/gift_options/allow_order must be set to 1 in system configuration // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed - $this->markTestIncomplete('This test relies on system configuration state.'); + $this->markTestIncomplete('This test relies on system configuration state.'); /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->objectManager->create('Magento\Quote\Model\Quote'); $quote->load('test_order_item_with_message', 'reserved_order_id'); diff --git a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CouponManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CouponManagementTest.php index d9e2f002dbb..07d86c26ddd 100644 --- a/dev/tests/api-functional/testsuite/Magento/Quote/Api/CouponManagementTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/CouponManagementTest.php @@ -149,4 +149,4 @@ class CouponManagementTest extends WebapiAbstract $this->assertEquals($quoteWithCoupon->getCouponCode(), $couponCode); } -} \ No newline at end of file +} diff --git a/dev/tests/unit/testsuite/Magento/GiftMessage/Model/CartRepositoryTest.php b/dev/tests/unit/testsuite/Magento/GiftMessage/Model/CartRepositoryTest.php index 9fd0ea04554..c2712492bba 100644 --- a/dev/tests/unit/testsuite/Magento/GiftMessage/Model/CartRepositoryTest.php +++ b/dev/tests/unit/testsuite/Magento/GiftMessage/Model/CartRepositoryTest.php @@ -75,7 +75,8 @@ class CartRepositoryTest extends \PHPUnit_Framework_TestCase ], [], '', - false); + false + ); $this->messageMock = $this->getMock('Magento\GiftMessage\Model\Message', [], [], '', false); $this->quoteItemMock = $this->getMock( '\Magento\Quote\Model\Quote\Item', @@ -85,7 +86,8 @@ class CartRepositoryTest extends \PHPUnit_Framework_TestCase ], [], '', - false); + false + ); $this->quoteMock = $this->getMock( '\Magento\Quote\Model\Quote', [ @@ -97,7 +99,8 @@ class CartRepositoryTest extends \PHPUnit_Framework_TestCase ], [], '', - false); + false + ); $this->storeManagerMock = $this->getMock('Magento\Store\Model\StoreManagerInterface'); $this->giftMessageManagerMock = $this->getMock('Magento\GiftMessage\Model\GiftMessageManager', [], [], '', false); diff --git a/dev/tests/unit/testsuite/Magento/GiftMessage/Model/ItemRepositoryTest.php b/dev/tests/unit/testsuite/Magento/GiftMessage/Model/ItemRepositoryTest.php index 9bf0ac91e24..18fb89322ce 100644 --- a/dev/tests/unit/testsuite/Magento/GiftMessage/Model/ItemRepositoryTest.php +++ b/dev/tests/unit/testsuite/Magento/GiftMessage/Model/ItemRepositoryTest.php @@ -76,7 +76,8 @@ class ItemRepositoryTest extends \PHPUnit_Framework_TestCase ], [], '', - false); + false + ); $this->messageMock = $this->getMock('Magento\GiftMessage\Model\Message', [], [], '', false); $this->quoteItemMock = $this->getMock( '\Magento\Qote\Model\Quote\Item', @@ -86,7 +87,8 @@ class ItemRepositoryTest extends \PHPUnit_Framework_TestCase ], [], '', - false); + false + ); $this->quoteMock = $this->getMock( '\Magento\Quote\Model\Quote', [ @@ -96,7 +98,8 @@ class ItemRepositoryTest extends \PHPUnit_Framework_TestCase ], [], '', - false); + false + ); $this->storeManagerMock = $this->getMock('Magento\Store\Model\StoreManagerInterface'); $this->giftMessageManagerMock = $this->getMock('Magento\GiftMessage\Model\GiftMessageManager', [], [], '', false); diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php index d2d0708632c..56e96636e95 100644 --- a/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteManagementTest.php @@ -8,6 +8,9 @@ namespace Magento\Quote\Model; use \Magento\Framework\Exception\NoSuchEntityException; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class QuoteManagementTest extends \PHPUnit_Framework_TestCase { /** @@ -520,7 +523,8 @@ class QuoteManagementTest extends \PHPUnit_Framework_TestCase ->willReturn($baseOrder); $this->quoteAddressToOrderAddress->expects($this->at(0)) ->method('convert') - ->with($shippingAddress, + ->with( + $shippingAddress, [ 'address_type' => 'shipping', 'email' => 'customer@example.com' @@ -529,7 +533,8 @@ class QuoteManagementTest extends \PHPUnit_Framework_TestCase ->willReturn($convertedShippingAddress); $this->quoteAddressToOrderAddress->expects($this->at(1)) ->method('convert') - ->with($billingAddress, + ->with( + $billingAddress, [ 'address_type' => 'billing', 'email' => 'customer@example.com' -- GitLab