diff --git a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php index 06eaf466068f04d004f52629d611f9a0c537f327..d53da043e61ad9bb1c2f9f2f353da7fad9aad2c2 100644 --- a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php +++ b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a505245c4e9bb01819212b47c7700923de9e599d..0f301a162280b8de18da5568a042b349a3e12749 100644 --- a/app/code/Magento/AdminNotification/Block/ToolbarEntry.php +++ b/app/code/Magento/AdminNotification/Block/ToolbarEntry.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\AdminNotification\Block; /** diff --git a/app/code/Magento/AdminNotification/Model/Observer.php b/app/code/Magento/AdminNotification/Model/Observer.php index e00218dd2dc26c2c3bfe003b9011d62c1a33991c..d25d89503b66c7009106c24dba7cfc03392e75ad 100644 --- a/app/code/Magento/AdminNotification/Model/Observer.php +++ b/app/code/Magento/AdminNotification/Model/Observer.php @@ -39,6 +39,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/Grid/Collection.php b/app/code/Magento/AdminNotification/Model/Resource/Grid/Collection.php index 85a46440ef05f7320dabd91622cfbe47f85c3113..b8b70ad479bbcf2f26ac52096ae192942d23caf9 100644 --- a/app/code/Magento/AdminNotification/Model/Resource/Grid/Collection.php +++ b/app/code/Magento/AdminNotification/Model/Resource/Grid/Collection.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * AdminNotification Inbox model * diff --git a/app/code/Magento/AdminNotification/Model/Resource/Inbox.php b/app/code/Magento/AdminNotification/Model/Resource/Inbox.php index 6134ef9b9d1bc57f9acd700f55443f7f34074b6c..5799cb9211b5f321d85151c2da8947e668fb0aa9 100644 --- a/app/code/Magento/AdminNotification/Model/Resource/Inbox.php +++ b/app/code/Magento/AdminNotification/Model/Resource/Inbox.php @@ -58,6 +58,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) { @@ -87,6 +88,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/AdminNotification/Model/System/Message/Baseurl.php b/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php index ef627597c4f0e0d9debac32ec4edaf1505250d62..ddab16bc6d71bd8986b1855f329a08945f1eefa2 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8e20bd027d16cdd938648baf956e7c1832d5b3ca..f14413eb82833cc24cf9b5c659f10a8bde98b0c1 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 fc274d250d9c1dbc83c7b5c59876f22d1187ebdf..72465b8fdfc3f1c57137881ce5bd921a3a63a571 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/Security.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/Security.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5fa52b0a6f91b50c4d7782af848fd229c961c9f4..dc2481ae7b569c6b8a3de42901fc2128eea81f9f 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 35c967093cf3aece4615bd49396c1371d07ea4d5..6932b44b60abc92ba8fc4391d95c0b7a3d6908ff 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6f11f46ea8d007ee38dfdc849d987969a34e7213..df849f7ddef563aa6713c19ed5e2f134d3aa101d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 fe314086d2968c233670805f0aa7a603c733e836..9c0fdf546b19a6bfc08058764ec2e118f71635b8 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/templates/toolbar_entry.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/toolbar_entry.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\AdminNotification\Block\ToolbarEntry */ ?> <?php $notificationCount = $this->getUnreadNotificationCount(); ?> diff --git a/app/code/Magento/Authorization/Model/Acl/AclRetriever.php b/app/code/Magento/Authorization/Model/Acl/AclRetriever.php index d572f94904d6a23823544f06573ebfc6218a8725..77fd1bb99186da3a4eea59a293c4a310f36dbac6 100644 --- a/app/code/Magento/Authorization/Model/Acl/AclRetriever.php +++ b/app/code/Magento/Authorization/Model/Acl/AclRetriever.php @@ -17,6 +17,7 @@ use Psr\Log\LoggerInterface as Logger; /** * Permission tree retriever + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AclRetriever { diff --git a/app/code/Magento/Authorization/Model/Resource/Rules.php b/app/code/Magento/Authorization/Model/Resource/Rules.php index 79ecf007b8fd61153b7a1927f8d628b173b3df5a..5e08f0a6cac10ed4631f330a453b778d4bd4653d 100644 --- a/app/code/Magento/Authorization/Model/Resource/Rules.php +++ b/app/code/Magento/Authorization/Model/Resource/Rules.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Authorization\Model\Resource; /** diff --git a/app/code/Magento/Backend/App/Action.php b/app/code/Magento/Backend/App/Action.php index f2d04fba8bf37f4407fd513f054f093411933cb3..784ea97a090f74e93b5ec238e4626c1edb650165 100644 --- a/app/code/Magento/Backend/App/Action.php +++ b/app/code/Magento/Backend/App/Action.php @@ -9,6 +9,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 51408474cdc0f8d481d9781852fab1092941343a..ceae4ef4bf04e4d98c9545d8fb72cd479a200875 100644 --- a/app/code/Magento/Backend/App/Action/Context.php +++ b/app/code/Magento/Backend/App/Action/Context.php @@ -7,6 +7,7 @@ namespace Magento\Backend\App\Action; /** * Backend Controller context + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Context extends \Magento\Framework\App\Action\Context { @@ -68,6 +69,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, @@ -136,6 +138,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/Config.php b/app/code/Magento/Backend/App/Config.php index d6344c1bf758689d581eec00fdf367aa309b254e..d8eaa7af14254bd16dd3c8f7ae3cc9a549e75cde 100644 --- a/app/code/Magento/Backend/App/Config.php +++ b/app/code/Magento/Backend/App/Config.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\App; /** diff --git a/app/code/Magento/Backend/App/DefaultPath.php b/app/code/Magento/Backend/App/DefaultPath.php index 91c1a1ab8d546a9ec2299ca562222f5d9842a32b..3298770157922e665207371779367225bbc018c6 100644 --- a/app/code/Magento/Backend/App/DefaultPath.php +++ b/app/code/Magento/Backend/App/DefaultPath.php @@ -16,6 +16,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.php b/app/code/Magento/Backend/Block/Dashboard.php index 36e268e5492423fc205bb971565f650814e674f6..6433c0a0514b7e127299077aa81a14f6ca8aa1af 100644 --- a/app/code/Magento/Backend/Block/Dashboard.php +++ b/app/code/Magento/Backend/Block/Dashboard.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 88b134a5d227c8a839b0b12997a2115f46088f94..d4572d0e3c0cf9dd82154e4c7bfbc873d443bdf8 100644 --- a/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php +++ b/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Dashboard; /** diff --git a/app/code/Magento/Backend/Block/Dashboard/Graph.php b/app/code/Magento/Backend/Block/Dashboard/Graph.php index a005066c96a3c0cac22dbbe7737776b0053b64d6..91c4d619072bac7d99c3e452ff28da690468faf0 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Graph.php +++ b/app/code/Magento/Backend/Block/Dashboard/Graph.php @@ -186,6 +186,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 969f69109639eaba652f13c021c4d6602e96acf4..8ecf07022340e93948602f9ad50c03f53b27ea72 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php +++ b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php @@ -9,6 +9,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 6ab4dd301d8b87aab4e8fcd379a0361beab9d146..69a835e1ca043dd48a3b5d2110b38316e4d72767 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php @@ -9,6 +9,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 6fa8e88aca1bd184ed516a6100d02a5daf87605d..ce7b2ac229701b1698b6c22b6d0fc449965e1a8c 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php @@ -9,6 +9,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 756f0574f535725d6e3feceaf2eaff520258308b..a211d5d26b87da0c468fa988facc4cc45c75cbf3 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php @@ -9,6 +9,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 33c91166768959d9131fb2f139d3d72922ba44e2..42c7cbb9115f99b8da761f0f1fb2d4fa94ea2737 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php @@ -9,6 +9,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/Menu.php b/app/code/Magento/Backend/Block/Menu.php index c6d269e464131319be0187389969d87e22a5a0b9..83f63bf04e03ecbc4b15a152c36ade4e6d7783bb 100644 --- a/app/code/Magento/Backend/Block/Menu.php +++ b/app/code/Magento/Backend/Block/Menu.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 72b7397a75c9bce2a0e2d84837bb561f2e26376a..f4b8eb0b23ed3660b45255b366c75c2771afb73d 100644 --- a/app/code/Magento/Backend/Block/Page/Header.php +++ b/app/code/Magento/Backend/Block/Page/Header.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4096807e8017ed1182a77a4964cd9662a28b4312..231d51c9919ddb093d476d93f90d54bcd8268294 100644 --- a/app/code/Magento/Backend/Block/Page/Notices.php +++ b/app/code/Magento/Backend/Block/Page/Notices.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 efe6e9c50acc37e60446569a053da137b72a8d1e..a02603a372e860b76e2038fbaaa7c1ff85f2953a 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 fef4b45c6c0ca9880b5a0b10da93af21a77e7b1e..dc4478cca4f6a9fe714453fb2fef8d121c367333 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 cdb08a29c2c2829b716d6c428db2815d4587af40..39ea89b31ca6cacba917185784643949ae390038 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Abstract config form element renderer * @@ -14,6 +16,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/System/Config/Form/Field/FieldArray/AbstractFieldArray.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php index 38154796f34b4c0cfffa824aae12761ab062c66c..1d6ae66117b0dd9545df01976ccb54bec978a4bc 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9864a56503df687665715b6e3ea23946b844c3b0..1137804348217b52d38150f4a23e32ee357ccb8c 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 cf875ddf67c0f934134d612b0967e3cd9e0f90dd..acf12f85721bb866dbe8f5d4fd875ef2f4b0b324 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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/Button/ButtonList.php b/app/code/Magento/Backend/Block/Widget/Button/ButtonList.php index cbc23d665e6e80f8de0a06971c2ef415907abbfa..2ff7df01256ccf732b9adf73f3cd781c65353b54 100644 --- a/app/code/Magento/Backend/Block/Widget/Button/ButtonList.php +++ b/app/code/Magento/Backend/Block/Widget/Button/ButtonList.php @@ -35,6 +35,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 9c599bdc8ac987f7cce7ca7d762fe1f746ad995b..73e18d3c7c1dadaf11a134f2e70dc1babdb7d5b6 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Container.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Container.php @@ -9,6 +9,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/Form/Element/Gallery.php b/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php index a8c7b2dcb6dc8495775f6c203bfa51674e3d230a..86f4f7fa68874560b81636dd68aabf4dc15ab4f2 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f7b561175392ebf047d534e8198219fae2063bbb..939a0100ac4ca0cbcbce20fef2ef42ec7167cc97 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Renderer/Element.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Renderer/Element.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 68eda4b964a1de664f1f6556cc52824e8a5352e8..b2b9b7f480efaeec44d6f87bafe8b45aed1fdd2e 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 07036c4b89ef1df83af79f1bb6a5a6c9c0a07e8e..bef68253a1c848bfe9e98aec1cce5b47aac33ec3 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8ebfcef792d1c66238f21295a2cf48b820757e3b..b98ddc117f4d319b49ec126aa2a62487f0342744 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid.php +++ b/app/code/Magento/Backend/Block/Widget/Grid.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget; /** @@ -10,6 +13,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 { @@ -146,6 +150,7 @@ class Grid extends \Magento\Backend\Block\Widget /** * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _construct() { @@ -331,6 +336,7 @@ class Grid extends \Magento\Backend\Block\Widget * Apply sorting and filtering to collection * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareCollection() { @@ -578,6 +584,7 @@ class Grid extends \Magento\Backend\Block\Widget * Return visibility of pager * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getPagerVisibility() { @@ -599,6 +606,7 @@ class Grid extends \Magento\Backend\Block\Widget * Return visibility of message blocks * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getMessageBlockVisibility() { @@ -761,6 +769,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 c1f28c40cd9be0c02c92933aa6d4c7813fee76fb..f5af4bf45fc6fb37a4651d5f50950c2dd1c3bca4 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column.php @@ -232,6 +232,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/Date.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php index 1a136de81c4b952fae6cc714ec86b63b669b0219..9510e30b9b165df44b72fae1f453da6657940964 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 da779e2fa200079a786f930e9669f8291d61058e..0505ff14caa823bbef143e59c17dc8f3ed0788ca 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Grid\Column\Filter; /** 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 44f7ad083f899e2c9984ab540f6e40adac051803..c589c58e9cfe864830d54c05520b54f9b4a41f89 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 @@ -37,6 +37,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 7871caac761531a3aafd92a1cc2b05f3cce5b67c..3e58f4104f66e56b77d946fbaa506e84d81e7268 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 @@ -10,6 +10,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 098e9010eb971de0177dac1636e5e27968a2d2dd..2da717929a0ecb67b15e1676c14d65c450c00efc 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Grid\Column\Renderer; /** @@ -116,6 +119,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 dd3f371962d76c897476d31c015bf25bf1a0b3d0..a0a9a97fc45dc24756cfaf11bb91304109a8827d 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 @@ -70,6 +70,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/Currency.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php index 727cd51239617b73a627f491ddf8f991ba7afb2b..f0454dd37a9ec1e60fd5e232c06e60635bf37d00 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Grid\Column\Renderer; /** 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 6dddb99c95e2a28e6467edb21b25a9ba1ba790a9..2ed159642da23198a7aca2b9f3f967ab42b41787 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 @@ -27,6 +27,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 d5c5f1152e1f56002207166fa9ae15067168a202..628d68b0fbccd0c69f2b7b698a499f1575d6d693 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 @@ -53,6 +53,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() { @@ -67,6 +68,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() { @@ -82,6 +84,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) { @@ -132,6 +136,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 e8eba5853fd4b28ba1d3c641577b2494765ece71..6078fff1bcbb6da5c87dbf28eeb3a730919569d4 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/ColumnSet.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/ColumnSet.php @@ -101,6 +101,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, @@ -486,6 +487,7 @@ class ColumnSet extends \Magento\Framework\View\Element\Template * Retrieve flag is collapsed * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsCollapsed() { @@ -528,6 +530,7 @@ class ColumnSet extends \Magento\Framework\View\Element\Template * Return count subtotals * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCountSubTotals() { @@ -550,6 +553,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 091ddbfebe50c007d2f97ab7ba6d86733cf19a50..875158fc2170c47e8eeb04d0250efc7c4fee8f22 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Container.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Container.php @@ -9,6 +9,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 6adeb90d57ddd22f70f58f53ebb1e08c84236af6..04a21fe7734109060210f04873753c80dd952144 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Export.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Export.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Grid; use Magento\Framework\App\Filesystem\DirectoryList; @@ -106,6 +109,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 eb54ce41d1d822c32c1633201665dba343eadaae..fe01cec33c9c1f51bc3c9ed88703ddcb541f15fa 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Extended.php @@ -7,6 +7,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 { /** @@ -778,6 +784,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() { @@ -799,6 +806,7 @@ class Extended extends \Magento\Backend\Block\Widget\Grid implements \Magento\Ba * Return visibility of filter * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getFilterVisibility() { @@ -865,6 +873,7 @@ class Extended extends \Magento\Backend\Block\Widget\Grid implements \Magento\Ba * Retrieve flag is collapsed * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsCollapsed() { @@ -1243,6 +1252,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 0adeb658a2277037aefab6ec2da3809c582b3c04..91c8d876eafca6549c4a0bf410dcc44ee90727d2 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php @@ -295,6 +295,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 335e1a30d2a1752daf698c4e0e7d4201cfe75c82..5f55cb9c98dead6b17dbc72b4b6338aade336ee0 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php @@ -306,6 +306,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 f87419051797e477a4c53496da6571623d1121d9..5f18982736998b966443a427feb8e003137e6122 100644 --- a/app/code/Magento/Backend/Block/Widget/Tabs.php +++ b/app/code/Magento/Backend/Block/Widget/Tabs.php @@ -9,6 +9,7 @@ use Magento\Backend\Block\Widget\Tab\TabInterface; /** * Tabs block + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Tabs extends \Magento\Backend\Block\Widget { @@ -106,6 +107,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) { @@ -302,6 +304,7 @@ class Tabs extends \Magento\Backend\Block\Widget /** * @param \Magento\Framework\Object|TabInterface $tab * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getTabIsHidden($tab) { @@ -390,6 +393,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/Account/Save.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php index 0bbf7b3e73c931fee11676ad3cd1cb8c7baf252f..bbffca9f8eb00426c5866dc211f70849ca2030b0 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/Backend/Controller/Adminhtml/System/Config/System/Storage/Status.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Config/System/Storage/Status.php index 493b016cd052d62162bf0c75278d2d43204ac729..e52f25a801e4af881ea9eec3be3d2fa6dfe0e288 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 @@ -29,6 +29,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.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php index a7e3d8694bffdce7072960187e4021cd865a3d49..9a9d2a4a6d620e056667cc5a44f95cef77decec1 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.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\Backend\App\Action; 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 b7952590b8f1c6169d5491aff2fe7d13772d4c2c..23a5e5c0fd95b5ed5376ca5fa20774846f5a44e7 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Store/EditStore.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Store/EditStore.php @@ -10,6 +10,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 fc11594dc3a24efd953347077fc98d8463161c04..039f53da5bd051472c4988a8546ddeb0c7e52fa4 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Store/Save.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Store/Save.php @@ -11,6 +11,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 aa49fb7104f19c75818e2e3b113ecbb1bbd95211..f9e5e549c732f836aa8c1de9fcebe1016b82aa20 100644 --- a/app/code/Magento/Backend/Model/Auth/Session.php +++ b/app/code/Magento/Backend/Model/Auth/Session.php @@ -64,6 +64,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 99744a7d3f0ab407112e985d037065b134615e42..b5b099997e3275dcb46cb5b671a96648f3978861 100644 --- a/app/code/Magento/Backend/Model/Config.php +++ b/app/code/Magento/Backend/Model/Config.php @@ -10,6 +10,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 { @@ -179,6 +180,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/Backend/Currency/Base.php b/app/code/Magento/Backend/Model/Config/Backend/Currency/Base.php index 7b86cfa1840b2bc3bdb12a1357d11927f43546d1..dfb95cc8ce2472686c070a688540c93ec958e44f 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Currency/Base.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Currency/Base.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 ad1b31b26e9fb40a914845ad92de5ffc7f95926c..cf5d40e4be496929480e8105f005178bbe7b9117 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Email/Sender.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Email/Sender.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 042e41b51f2957ea19a6c0b6f7a951c928fa7401..bf1fcd071432048e747324cc3163ccc90149e9b4 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 473463f39e0dccbcabb11e1490143528f3944382..d29625e33b0c4f5cadb769766fe59359907f982c 100644 --- a/app/code/Magento/Backend/Model/Config/Source/Dev/Dbautoup.php +++ b/app/code/Magento/Backend/Model/Config/Source/Dev/Dbautoup.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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/Converter.php b/app/code/Magento/Backend/Model/Config/Structure/Converter.php index 994a1006bdbb6771b50fd51cd26dd515385d43c7..a85c03025c958bada88a325965e8298a5f7476c5 100644 --- a/app/code/Magento/Backend/Model/Config/Structure/Converter.php +++ b/app/code/Magento/Backend/Model/Config/Structure/Converter.php @@ -72,6 +72,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/Config/Structure/Element/Group.php b/app/code/Magento/Backend/Model/Config/Structure/Element/Group.php index 7ecfc1c78d099cb357c3a6f86dbd1678fdbff830..251fa37a319d1bbc6c1d26374c508a40897c7290 100644 --- a/app/code/Magento/Backend/Model/Config/Structure/Element/Group.php +++ b/app/code/Magento/Backend/Model/Config/Structure/Element/Group.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Config\Structure\Element; class Group extends AbstractComposite diff --git a/app/code/Magento/Backend/Model/Locale/Resolver.php b/app/code/Magento/Backend/Model/Locale/Resolver.php index 2b305ef80c191554937413ba42a85c75d03b2cb9..767f3d71041b7c2a823a126777f2825010949223 100644 --- a/app/code/Magento/Backend/Model/Locale/Resolver.php +++ b/app/code/Magento/Backend/Model/Locale/Resolver.php @@ -41,6 +41,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 fec3a03ad4be6d4961191f1791176439ccd35d6b..b02a7aca7dc65eddf7b6f79388e48a72e1eb28b4 100644 --- a/app/code/Magento/Backend/Model/Menu/Config.php +++ b/app/code/Magento/Backend/Model/Menu/Config.php @@ -5,6 +5,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/Menu/Director/Director.php b/app/code/Magento/Backend/Model/Menu/Director/Director.php index 8d09c08a652e0946c08d59f80d294dc059d38d99..b5f30db5d84edeccd8801c732098d2bea25b9456 100644 --- a/app/code/Magento/Backend/Model/Menu/Director/Director.php +++ b/app/code/Magento/Backend/Model/Menu/Director/Director.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2013b5969443b3b15133d0e70decca2853c6ed94..c52c96fe555ab66caf9ba17a68ba4aed3150174e 100644 --- a/app/code/Magento/Backend/Model/Menu/Item.php +++ b/app/code/Magento/Backend/Model/Menu/Item.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Menu; /** diff --git a/app/code/Magento/Backend/Model/Session/Quote.php b/app/code/Magento/Backend/Model/Session/Quote.php index 2de789c053fab4ce09663990408c84ecbb0c1299..96141a383c6909794113c967076579ed1f698ae8 100644 --- a/app/code/Magento/Backend/Model/Session/Quote.php +++ b/app/code/Magento/Backend/Model/Session/Quote.php @@ -22,6 +22,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 { @@ -87,6 +88,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/Backend/Model/Widget/Grid/AbstractTotals.php b/app/code/Magento/Backend/Model/Widget/Grid/AbstractTotals.php index af1bac309a554a00ed071d9ac974d41c8736a95b..3022ef696507edfbf73c0d7cad0a9d42a14389d8 100644 --- a/app/code/Magento/Backend/Model/Widget/Grid/AbstractTotals.php +++ b/app/code/Magento/Backend/Model/Widget/Grid/AbstractTotals.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Widget\Grid; abstract class AbstractTotals implements \Magento\Backend\Model\Widget\Grid\TotalsInterface diff --git a/app/code/Magento/Backend/etc/di.xml b/app/code/Magento/Backend/etc/di.xml index 2871ef2508f37929a6a1c3af3228d92789511533..5445af580b20c677bc0cff5b40c9bae76fbfeab4 100644 --- a/app/code/Magento/Backend/etc/di.xml +++ b/app/code/Magento/Backend/etc/di.xml @@ -12,7 +12,6 @@ <preference for="Magento\Backend\Model\Config\Structure\SearchInterface" type="Magento\Backend\Model\Config\Structure" /> <preference for="Magento\Backend\Model\Config\Backend\File\RequestData\RequestDataInterface" type="Magento\Backend\Model\Config\Backend\File\RequestData" /> <preference for="Magento\Backend\Model\Auth\Credential\StorageInterface" type="Magento\User\Model\User" /> - <preference for="Magento\Adminhtml\Helper\Data" type="Magento\Backend\Helper\Data" /> <preference for="Magento\Backend\App\ConfigInterface" type="Magento\Backend\App\Config" /> <preference for="Magento\Backend\Model\UrlInterface" type="Magento\Backend\Model\Url" /> <preference for="Magento\Backend\Block\Widget\Button\ToolbarInterface" type="Magento\Backend\Block\Widget\Button\Toolbar" /> 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 3a92e9f8f9034b8f86e0e3ddcc9215b83f1a0cc9..20bbd091ff935265bd451d16858f071a22185945 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d75e37b380f911efd098a51bd4f34ffe6831280e..aaaa8e0dae823660166d287b9daec04757307178 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/admin/login.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/admin/login.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6ffe241c93bb299c23a5e7c46eb257212369607c..8f9fd4eb82ddd079f877ed80b8a5bf2a7e969e27 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 fa4fb1c651c20ce807cf22e7e9028e28271b8cda..6b87d5fd1636b94d813eaedf0d404c9ee13dddba 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/admin/page.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/admin/page.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5d6dc42114cbf8ae7910f2fad5ea133570a8817d..60307c043ac1eb4caadfa8610e7a6c0ab5dae8bd 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/graph.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/graph.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 34291c010c86ca24fb9b038e021fd543331d6ceb..b302c2d03e43d3c1a5c8720ad9a6ee30a9534dce 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/grid.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/grid.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 600b1f8c15cac33b49a5f88afce403bb0aeada80..d14649e5e2407249075f989cbbe4346b6573ee47 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/index.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/index.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 bffe1bd96936f0ef6125fe29947a39208dc18998..35e55da07426bfba69951e988a3abc3c42c732a2 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/salebar.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/salebar.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2ad225e0a5ffb39d128b87e5ea7ffcb226669da5..d0e11ba8c0a6bbcb0c034d0fa4df9e5f26507888 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/searches.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/searches.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a08e2faf7947f4c2f27a9c4b7e28786837ee3494..abb41eaff14ab269532fd6b7fd410045137c3263 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 222842a2d6109b0f14166abbd72a6967b10687d1..8a837773be68149ed36b8cc2ee3d7029f01c6f2c 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/totalbar.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/totalbar.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 1ee117f9558a946ce40cfd3fd555c32f4fe66841..b7f4a6af41df98e1fa5307faa9376f98a0ffb4ee 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/menu.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/menu.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 dc10ea6e35da8acdcc65ca193c9e86bcf583f5ed..d32b9b4f5c4ab7558209c2712384758d2e3c45b4 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/copyright.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/copyright.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4ad3c029f28b2a7a8a02de175e1e723d35c3f664..4f1fb03406d4463050567bca627a6ffba0fdf1a9 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/footer.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/footer.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a2fd0aff3c6f66ef25b3a511a8aee96f93bfe7a8..5c8db117c4e73e47dad3dab2d4637b75a294329f 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 478e18e57b0112afae4e77d1b3e19a7bd86dc54d..fdeaf01cd1882d7e7d6f9178c4e92d70519962b1 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6181341332471324fe6c139fe5acb0b91f8f9f5b..4daf9993d72b0e0b72d1e4db2b7b6d195b5ff6e1 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5fde4390a8435fdbdbdbd666f99d5c219fbe1316..3db04de8d5e373461551bfdf9818c6e99e57a21a 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/locale.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/locale.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 973581456ee53cf6f144cebf448526d40d48502d..76a9fe120c4b9dfe30871de7b45437d3cd107c7b 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/notices.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/notices.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a523e6d06a2ef311f0adf5c303afdafc5589366d..84fe5da528eb03f466c43a1c43541442376104bc 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 8bc07aba86ec4e3434beb111a81fff007aa8c23e..5a988cfb65c77e2ddb9137b5b7a03bc72bb48e70 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/pageactions.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/pageactions.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 86b81d54a82cb2959703de6622df6b87475b6ce9..641df75fc0d522ab1e24c8b127bb2343baf5433e 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 484cc43f6682b33e72640f9d54eda5898537f76b..94fbd082b8bbcba8f0dc2f3ce3e1e23706c896bd 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c795f32811b1f8d893fafdbcad7870991ad8a9e4..a6a8a3a59b90c2126fa00820a811826541958ada 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a19fc0d02c172fe3db0f63ffd84dffa20f3232ed..2cd37a6a5ae5e27991c1611d9265b658dbda6d0a 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/system/autocomplete.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/system/autocomplete.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b99df5f7d180a3098d922a007a0c63fdd599f494..603aff5f66626e4f492c59b43b6bf55f1989ca3e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2869af6a0ee53785bbc0e1bbe9afc1aaca5d1fa6..4b22ca0a2ace46b37dc21206fa1e2ebff0db4d9c 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6c1d3f0406b4b39ce133f57da74d60f9e96d973a..978f1806df767088feea206938412a00432c9b10 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a564f9d466c1962ef8c13adfdc84081b8d73bf67..dac09723f71f4ff21cd905a3c48d5484ff57c33b 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <script> //<![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 6fb13048ea34e405d71e66d37cd6522caf72cbb3..57146e4f1279dbb33dd435580413c6d2426a411f 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 99b7cf75b59f6a720a097eed361d8042a872aac6..98742b19a718730d1ddabac7dff8c78965114012 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 bf03d65e22e67a8e5afb6394646556c12cafd8ea..1a8810fb437f48d4eb6462b426bea8d612cbfd95 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 9228aa320afa5a3a1b7e14c79d3773991984487f..1d27f92b1d57cdd4045ec77cdb17e900c03c669d 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 @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b123a9fff17c93e0f6f04dc0b3a3112e7826b410..f023180974b5c7ef3d32bfcc00bb43c6c81fcf01 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 f6b7d7efa8576328b49c9578d31e3088990da86d..11282d76f56e71325f03366abde38fe61221b2ff 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/accordion.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/accordion.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 835df288963c225715539b16effa8a936eb30791..68ba27df9f5ffc295b1b9548d2649a16678abd01 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/breadcrumbs.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/breadcrumbs.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4166c496e11b5884a5ffa9b0570dab25e3b60297..6a1f5e4a28e3221cf0d7d7ba0e47f24e2319ab7a 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/button.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/button.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9bacbdb873cf3a50523bf8d93c0b982fa1a5fb08..566e51e79c9204a3d63589135332325e9453ace9 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6c5100e32c17206e9bd67d46696460af10117d9b..92f380112003e365aa299448cfe871ba0d748f91 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/form.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/form.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 be4a094380d8b139fa2731978afbeaecea5ef6de..d82ef9836caf686dbc86703a94276040ab76b352 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 030bd206b20743f3cb5a667f94debb1b247714ce..8fcf631f014a883c39b6a1e4bf8558dd5b7e26ac 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 95c7c229bb678423c1be3554a16d02d94bcc0178..74a7c81782bd2fbf22b0e02f7b3d7eca10c3476f 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 058e239fca867cbd2bb2b621eb78ab9ff8f0f459..edebad68f4ae477b0b0d821689005a1792ec736b 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 45c07f7f63e63f609c88c1decf2705bf9398e8e9..af96e0bb2cf72b88d24d57de2f3593712bd3e139 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ea7c0e8df4d643303d3197e4cb21cd1fe617dec0..b74a8456a2a844069d00fec21d51b2052eec29af 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d5b12d21404c6b4153950cb57f7f11c125a6649e..ea59605873cbef28b3d8d56dbe77fef9b0bb33f2 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 0da5cded6680c296f01bd306931febf4883d7a33..04eba07e620e4c71e32001c9dcbcd203c973469d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 dca0392fced9edf6771f829b3e83307e7589f4c2..914fc4d80329cec2dd46b6a6c46ad1f67d05ab72 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 744288619d63e421920bfec06db925d47b47ac93..16509b08f23f23cf2b4c70086e6cac75bc50074b 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 @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 80c2de13bf2e7d41eccf449b55514bb92c71626d..25cfbd6766b4a5a03ac68581bd04a6347a777c9e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 240eaa8ea4e83830d3f862256d756a5cb20cbda1..2b5b77c258ba91d291f7ef47a92686fffddd6008 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5513a10097654bc6424b1f50d02d16e13f89adcb..ede9400f6dd11b092ada9ddcf02169809eb7ad30 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 13f405a4326a6ccfc154801cbbce946c3bcb16ad..e14fbe74f569c4d951fe6140c543652acfe2865f 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 69196f4725181a9d60d458b283ed6b4e34c60e32..fae5424a2fb995cc65dbfbf7ca2fd137d99a3fb1 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 7a63da88d825a0dac63556dfd94ae52ae36b787a..e2546a5fe5ded16ea760ea585bd6b7afe3dfeffd 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 796cbb2d5e744b170aa0564c38c71673d96fada9..44cefcf35f24bce9a672c0f71c0485790835da18 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9a4a39f8f086458c67d407cf038b0a7276c512ae..3ed92243ce35b5caab231b9d47d6a3c27e5ff780 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabsleft.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabsleft.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2ec0c32cae218a05b432820975f838cc64be62be..7454f10a81d475c8575077c58386aed2ccddf202 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3a77746625ad345302fcce6bda1ba7f28e1e11fd..14a3b77f918bac8e16077ec716f437db12e2735b 100644 --- a/app/code/Magento/Backend/view/install/templates/page/copyright.phtml +++ b/app/code/Magento/Backend/view/install/templates/page/copyright.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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/Controller/Adminhtml/Index/Create.php b/app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php index 02504e35cf8c4d3b7a2f7b24a1feec3eba4cffab..3597571146444fc2d43d330908913623dcbb1500 100644 --- a/app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php +++ b/app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php @@ -15,6 +15,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 fa15004829eca6dfd6d214e79e439d9913da9607..a2647f428ccf17fcf4c11f618de97498eb43abad 100644 --- a/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php +++ b/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php @@ -14,6 +14,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 7be45cbcb4c02e590495ee7537f2167fbd11840b..ef03c35226aef73091e954a9e38aac1f0d16ef3a 100644 --- a/app/code/Magento/Backup/Controller/Adminhtml/Index/Rollback.php +++ b/app/code/Magento/Backup/Controller/Adminhtml/Index/Rollback.php @@ -15,6 +15,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 e5ac01021877294b074da4ba5bead0dab74e638f..71eec41eadb101c2520b6cfe84db6504fc2d45a1 100644 --- a/app/code/Magento/Backup/Model/Backup.php +++ b/app/code/Magento/Backup/Model/Backup.php @@ -6,6 +6,7 @@ namespace Magento\Backup\Model; use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\Filesystem\DriverPool; /** * Backup file item model @@ -13,6 +14,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 { @@ -292,11 +294,10 @@ class Backup extends \Magento\Framework\Object implements \Magento\Framework\Bac try { /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $varDirectory */ - $varDirectory = $this->_filesystem->getDirectoryWrite(DirectoryList::VAR_DIR); + $varDirectory = $this->_filesystem->getDirectoryWrite(DirectoryList::VAR_DIR, DriverPool::ZLIB); $this->_stream = $varDirectory->openFile( $this->_getFilePath(), - $mode, - \Magento\Framework\Filesystem\DriverPool::ZLIB + $mode ); } catch (\Magento\Framework\Filesystem\FilesystemException $e) { throw new \Magento\Framework\Backup\Exception\NotEnoughPermissions( diff --git a/app/code/Magento/Backup/Model/Resource/Db.php b/app/code/Magento/Backup/Model/Resource/Db.php index 2ec3d7c75ca67eb73d854a813970f86d5151051a..78c2b95445f3dd47f921d32ef75c8fc5563ba6be 100644 --- a/app/code/Magento/Backup/Model/Resource/Db.php +++ b/app/code/Magento/Backup/Model/Resource/Db.php @@ -181,6 +181,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 f6454f1f2591e58c44467f4dc6f29dc44d4afa6b..1ac7b4366810b5463fe9b358f80771e05d6c70d4 100644 --- a/app/code/Magento/Backup/Model/Resource/Helper.php +++ b/app/code/Magento/Backup/Model/Resource/Helper.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Backup\Model\Resource; class Helper extends \Magento\Framework\DB\Helper @@ -120,6 +123,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/Backup/view/adminhtml/templates/backup/dialogs.phtml b/app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml index 14f77c2580b42e0a5703e9a7a36fba9990dc1013..0c5ceb2637abf0bff303dcb81bc9f2943051c674 100644 --- a/app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml +++ b/app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9ae31398fdee4b5ba6d0c9c845e8be6e1d4355e7..ac6c6d48320a469c6aaede692ca081e04f999168 100644 --- a/app/code/Magento/Backup/view/adminhtml/templates/backup/list.phtml +++ b/app/code/Magento/Backup/view/adminhtml/templates/backup/list.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml('grid') ?> <?php echo $this->getGridHtml() ?> diff --git a/app/code/Magento/Bundle/Api/Data/LinkInterface.php b/app/code/Magento/Bundle/Api/Data/LinkInterface.php index 50e8f27ec3de28fc488d33ac57e6880c2b25e707..78a595f4da271d24dd864c911ddce954e16b3962 100644 --- a/app/code/Magento/Bundle/Api/Data/LinkInterface.php +++ b/app/code/Magento/Bundle/Api/Data/LinkInterface.php @@ -48,6 +48,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 ac139e758fc1395788ea0abf7af450a724201c06..10439a8fb192ffc6f578bcdde5271fd125d71dae 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 @@ -3,10 +3,14 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + 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 { @@ -14,6 +18,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 c8136f9ae32feb20aa1369d5a54a5f94e3099d14..c3bc776692e922326c706da4af6e381f5d0aa005 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 @@ -54,6 +54,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 461f74ed1aebe77b10b84c927c0847c064b44bcb..d348945a052bc154831fd92c1a5dd4c5db930edc 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 @@ -70,6 +70,7 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRend /** * @param mixed $item * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isShipmentSeparately($item = null) { @@ -105,6 +106,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 652a322f2a62e2fc79b5a5f49feecc282c9d5a5f..0c0a97e7ebef34bfdeabdbbfc85577e57391d2fd 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 @@ -33,6 +33,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) { @@ -65,6 +66,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 54b7bf1a3181e6194556b3cfa867f0a829f4b699..3fbebc9a79a4d0b9fd0832d9eeb8cce267b3ec6f 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Bundle\Block\Catalog\Product\View\Type\Bundle; use Magento\Bundle\Model\Product\Price; @@ -272,6 +275,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 6ca6a1c3bd906c2e268cc2fee101d05e9aa03b4a..02f8b96dffdf8296456236433cb2ab8f38865d9e 100644 --- a/app/code/Magento/Bundle/Block/Checkout/Cart/Item/Renderer.php +++ b/app/code/Magento/Bundle/Block/Checkout/Cart/Item/Renderer.php @@ -38,6 +38,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, @@ -83,6 +84,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 710b16638209c1449983da94904f4d5cc92fa1db..44df68a474e22e05fd759c7bcddf76e3802e3b94 100644 --- a/app/code/Magento/Bundle/Block/Sales/Order/Items/Renderer.php +++ b/app/code/Magento/Bundle/Block/Sales/Order/Items/Renderer.php @@ -17,6 +17,7 @@ class Renderer extends \Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer /** * @param mixed $item * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isShipmentSeparately($item = null) { @@ -52,6 +53,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 c363fecf0b978bb111e6c6ebaa4f79bdaeeab2b3..71577e116144405009a34cd1ed576fa60e624879 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 @@ -28,6 +28,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 1f9f1f507e8a7e10793927a984cb0642e8344b53..35bda8aafe5bbc699ad722f1074276b0bbafa7d8 100644 --- a/app/code/Magento/Bundle/Model/LinkManagement.php +++ b/app/code/Magento/Bundle/Model/LinkManagement.php @@ -10,6 +10,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 { /** @@ -96,6 +99,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 1f907283cd0cbf0f19dd2795664752436b65eaf9..c334969ade488b9463b77477a4586142d9359886 100644 --- a/app/code/Magento/Bundle/Model/Observer.php +++ b/app/code/Magento/Bundle/Model/Observer.php @@ -67,6 +67,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 c62eaaaa3db2545d113a95ac046f8036fb06ff9b..438a229021721800c5359053ddf0e31937c2e0f5 100644 --- a/app/code/Magento/Bundle/Model/OptionRepository.php +++ b/app/code/Magento/Bundle/Model/OptionRepository.php @@ -10,6 +10,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 { /** @@ -145,6 +148,7 @@ class OptionRepository implements \Magento\Bundle\Api\ProductOptionRepositoryInt /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function save( \Magento\Catalog\Api\Data\ProductInterface $product, @@ -218,6 +222,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 4d745118181c23ed54858ef913cd2524a4dc274a..af198bf0b1b72d3c2a79d11dc9f0e7be37d2aa89 100644 --- a/app/code/Magento/Bundle/Model/Product/Price.php +++ b/app/code/Magento/Bundle/Model/Product/Price.php @@ -11,6 +11,7 @@ use Magento\Framework\Pricing\PriceCurrencyInterface; /** * Bundle Price Model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Price extends \Magento\Catalog\Model\Product\Type\Price { @@ -74,6 +75,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() { @@ -181,6 +183,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) { @@ -523,6 +528,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 633f74881157f6f693536748735516f59e20b165..1ad99a75752791f039fac4572fc8c81800a22f7b 100644 --- a/app/code/Magento/Bundle/Model/Product/Type.php +++ b/app/code/Magento/Bundle/Model/Product/Type.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Bundle\Model\Product; use Magento\Catalog\Api\ProductRepositoryInterface; @@ -10,6 +13,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 { @@ -341,6 +347,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) { @@ -385,6 +392,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) { @@ -591,6 +599,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) { @@ -649,6 +659,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) { @@ -1014,6 +1027,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 5e8bdd6410c95a3dc07ce8da68900cff122a2df6..68a304f10dc78fb23011c4ccd41175a29a05be5a 100644 --- a/app/code/Magento/Bundle/Model/Resource/Indexer/Price.php +++ b/app/code/Magento/Bundle/Model/Resource/Indexer/Price.php @@ -125,6 +125,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) { @@ -373,6 +374,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 edf0e0dfa594a033f4aa0ed92f718efff42bc225..f5971bdb578de9b60cacaede66d9a0a8c9e397ec 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 @@ -54,6 +54,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) { @@ -91,6 +92,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) { @@ -130,6 +132,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) { @@ -164,6 +167,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 222cc6a4ca3d435a7acc77e2317f78963c8652c0..9c912505ae25f325e093d9e5f47544830990ba74 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 @@ -56,6 +56,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 6f3ff1901751a90b6bf4a00fd1545b6cc8098620..797529dacf45d44c048db9bf178e9fdfb71d2508 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Bundle\Model\Sales\Order\Pdf\Items; /** @@ -54,6 +57,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 5087f874b86f6c7e9845bd2f5bfe4116bbac65ef..19358878b50889a691df408aab58019f7964fd9a 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 @@ -54,6 +54,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 376a1c5f5e62828a6328f8ca0eebbd5afbc7313f..f3f59155be87ea4ecd4ffec0992b39eac5279b9c 100644 --- a/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php +++ b/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php @@ -20,6 +20,7 @@ use Magento\Tax\Helper\Data as TaxHelper; /** * Bundle price calculator + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Calculator implements BundleCalculatorInterface { @@ -79,6 +80,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 = []) { @@ -172,6 +174,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) { @@ -295,6 +299,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) { @@ -314,7 +319,7 @@ class Calculator implements BundleCalculatorInterface /** @var Store $store */ $store = $bundleProduct->getStore(); - $roundingMethod = $this->taxHelper->getCalculationAgorithm($store); + $roundingMethod = $this->taxHelper->getCalculationAlgorithm($store); foreach ($amountList as $amountInfo) { /** @var \Magento\Framework\Pricing\Amount\AmountInterface $itemAmount */ $itemAmount = $amountInfo['amount']; @@ -382,6 +387,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 78db911af98e85c7cefa9cccd0313feced598e36..6b5ede60719f51ca23d563444196f7cbc6f44177 100644 --- a/app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.php +++ b/app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.php @@ -16,6 +16,7 @@ use Magento\Framework\Pricing\Price\AbstractPrice; /** * Bundle option price + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class BundleSelectionPrice extends AbstractPrice { 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 27778d35ad5e5d7e40cdba3952d18a686d74b2ea..b6acc0f9033d7308a7b4420ea82fe81842f2b901 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e40fb4aa06b6e386dbd374e36024b2ebf6426189..b886a87eef049beb41f2bee38473546f953f86a9 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 7fb4da26a3efc3cadca939ada628da4ef059f65a..c1212d74dfdc6980a398481891156588b2e2801e 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 3d35168920bae61c8641f4394b4533447d07e544..fdae49d174eab84f0dae11e88b4bdf8bc2c0ad15 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 c9cc6d68ea045ac22d31b3aabaf06883b1023d2c..a73b8f2486e9700c2e9a25f3c9711562d2ff4f49 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 30df525b0984ecb3f5e8d74cfa73e1b3d88e8ab8..16e6c5e5c30bda0c43a285cf1af579abcba01e9d 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle */ ?> <script> 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 908ed29d232bb7dc085b862beedefb109ea221ca..2d68f15534eb43cf1b7213c52a6c6ac6456fc32d 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 96ea4f2aad9a3758ddede3ab382c0b9faa3e61f7..3e0fca0b440b4dbcfc46ffba09c5c62d185ecc5c 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 f8b0769935a136eb9f6d80c0776ef4fd8e97586c..26383fb52dca16a446b4023af7b555e364ebed89 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2bebcba33636ac79185bf0ada65631bd3344915e..d4fe089d9bdb0816d6e5407d31568d39a08189b5 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 7bc68f648651386790e7de544453e4fa6112fa18..8bc1bb7194d2bb779cb29f3cf51787d21372e52d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a0bf842d09fafe41096d1aa9b0d48960b4cc2ee4..9fb053cde59fe9801c96923c3e77c9d07ddbbb7e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f279adb441c2edd4f21ac8130945a8222c8ad18d..c4e91067b0d5b73ffe8c81f119035445b8c13730 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 499dc145b1d3abeb2e9ba677a06ca374e3ad59b7..8cee9aa2e52c9996243b2351293d62669e028dfa 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4e2a08aa7bac89946cbae90ed496f226ca3e70bd..160f8aa6ebcc729cb68bc26510b4fb42d01bad5f 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5fdd473281974c3c451a4bd05926cb00ea1c0ffa..bc76e6a2c44c44c56f89758a333e9b51e0b3f604 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8c6597dccfa6bfc074df6c43a02e4d8a3a7955af..96853648aa2e923fca2bbe26df1f7f46ac3f6407 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3bfb345d89dcf7fff149539cd1cce8778e98baee..5e187539667973657a355c20a4b7c0ba8cd2591b 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 54cbd6e4aad235a6a1f4343ecabd0447c29d2af8..6b68956b6518862653d2d4017def82fdc5ff23d0 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5d461fc315822a3fafdcc592cdb117b33620e27a..b7124fdbef421e2e246f92cd7cca09b8334fec06 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8880a2c9f297bcadb5f216505676761982f44674..6d524636e5ceb84b54cf519b6bb9c810e5cdedac 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /* @var $this \Magento\Bundle\Block\Catalog\Product\View\Type\Bundle */ ?> <?php $_product = $this->getProduct() ?> @@ -18,4 +20,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 5408596fc68c69c162806027fa4b144df8b6d696..5aa595f37d9c49cda51cd5de38f2c05db9aeec34 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 225c3b170b962b3738a6bad86d90c9b9bd5ae413..482d3fc80c85b3ccc660990cc4dc50c981bdde77 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 05b284411dcbd3387d538bb8d8de9125c41f1126..bbbd774f7ee50039465541ca39f22e52ea322c88 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 c525d53399111376627a27abd35695c25d53beca..cfbe57449ef7d8b3c31946fa082cf7e4b38edb38 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b3f7e2212864adc3f20fd5980880ebce5bf9e2a9..cab5b39bc7d5a50c2633e52404313b913874995c 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 1b08fe6f350e753513c957dd721a15913bd1bd4a..28c2466f059672bbcc2c7929734e223bef78f7bf 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 227b6e93e347cd94e6f005b8b2fc7d1eef3ce7f9..7b37cc48507500ef318f40e997a189cbef2544bb 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8e33b500f35de2333b319e8456f2b24a1e2265e5..d61a831e34f8bbdf7e6871cdf9aef54d2604bcf6 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ce49dcdcd7f01bb54e587306548580dc5bc0ff63..4bbfff568370460063db461a9ec1ade486a5cb7c 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 99be8e37348cec69521e018a61f416324e582a94..43f7e9c30c0126f46204910ee749ef83ad81e815 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/js/components.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b81f491429f3b2e4c49cb2b870d4eee9feae4a60..f2a1a774128b5273dca1d34decf92c69840ae509 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4eb202e6c2f412673d28e6aefbff30ee8cf91877..56ad8b54ee07c6261bc185f878451af50e4839ff 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4b6a05eb442e11811e7ab0f83b1661072e4ac321..0471828ba77213c619e7097316b1765e9325bcc7 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 0d29f6412b52848c1491bc960f01f43873d70851..5ca9f9dc07ea0b69a89a1e902de5d2e355f0e8a1 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a006766e8c90e6bd5f50becccb791c4eeb70cffe..dfd0456226d5c4ba4aef401d5db41c99e768fbd9 100644 --- a/app/code/Magento/Captcha/Model/Config/Form/AbstractForm.php +++ b/app/code/Magento/Captcha/Model/Config/Form/AbstractForm.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Data source to fill "Forms" field * diff --git a/app/code/Magento/Captcha/Model/Observer.php b/app/code/Magento/Captcha/Model/Observer.php index 340822047bbdfab6445d6faa503ebc21437de4a6..14ffd09fa49412ac7473669a879a734a0d27d9c7 100644 --- a/app/code/Magento/Captcha/Model/Observer.php +++ b/app/code/Magento/Captcha/Model/Observer.php @@ -9,6 +9,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/Captcha/view/adminhtml/templates/default.phtml b/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml index e44d995772e1a775ce38b041e1a4ea314ca70dff..cbff9a3d01a1277e3f694efb8dd830ae33c2a67c 100644 --- a/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml +++ b/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 31d59245224562db8e7b7f48fd6c354a8d4a3daa..90ded45d0d918c616c9b3dd4c53fb157fba3de55 100644 --- a/app/code/Magento/Captcha/view/frontend/templates/default.phtml +++ b/app/code/Magento/Captcha/view/frontend/templates/default.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 99be8e37348cec69521e018a61f416324e582a94..43f7e9c30c0126f46204910ee749ef83ad81e815 100644 --- a/app/code/Magento/Captcha/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Captcha/view/frontend/templates/js/components.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml() ?> diff --git a/app/code/Magento/Catalog/Api/Data/CategoryTreeInterface.php b/app/code/Magento/Catalog/Api/Data/CategoryTreeInterface.php index cd7bb21dd3cea692325fa59a8fe1df854a9020a2..ede64fcf762a488377d94efad9d86fae289d5080 100644 --- a/app/code/Magento/Catalog/Api/Data/CategoryTreeInterface.php +++ b/app/code/Magento/Catalog/Api/Data/CategoryTreeInterface.php @@ -32,6 +32,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 2443f11f966dc595b6ce7e09d538d81ac9c37a93..108979ba5d09eea35d3bf7ce21abb6d53cd929f1 100644 --- a/app/code/Magento/Catalog/Api/Data/ProductAttributeMediaGalleryEntryInterface.php +++ b/app/code/Magento/Catalog/Api/Data/ProductAttributeMediaGalleryEntryInterface.php @@ -41,6 +41,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 50641489f89992c4853f20729faef9894c897494..8d2c1af2dabb77b13c608a4ce425692f4c22cd3b 100644 --- a/app/code/Magento/Catalog/Api/Data/ProductCustomOptionInterface.php +++ b/app/code/Magento/Catalog/Api/Data/ProductCustomOptionInterface.php @@ -47,6 +47,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 00ec33315e9d8490a5a0458786e327e08250a1d5..03b52c6ac341ce065bf2c1920e859c2e4da29a2f 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/AbstractCategory.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/AbstractCategory.php @@ -121,6 +121,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 9a18675340c5dfa58776f9627122b7531a34ca64..25cd867302dfd63ae6898b1f7d4e4de0d19f87ef 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Checkboxes/Tree.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Checkboxes/Tree.php @@ -78,6 +78,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 96dd3e5a5da39b7bb790e9a5791e981ea7ed8074..06a77c8af6023a4add0a375633ec0009e97ab7c0 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php @@ -38,6 +38,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 60052fc8bb2c18a839176468b2b2f204480ff9fc..2bdf2ebf95be469c96277382b1bc6c00adab9a36 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Design.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Design.php @@ -5,6 +5,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 19322d4b7d801494b65527fa706363f8313c1eec..0f7bfb9042f735acff82ce5ecb91a7f37e5cc644 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tabs.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tabs.php @@ -106,6 +106,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 84cbd06e86b9d28be6e0caaa9b58cb772a8a15ef..6db0db075824da391371c6ac752d79b5fa6cda58 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Categories tree block */ @@ -244,6 +246,7 @@ class Tree extends \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsWasExpanded() { @@ -314,6 +317,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 b841cf0ede6a1dfb16ed6a46f6720bb32b8462a4..e9a129df7c06191ff95981ddcde098eb040db4b3 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 @@ -19,6 +19,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 775f529570ede2e66e621b46bc428025af03e9a6..4e8693474e09bd0bc8c751ec0789a7ffe904ac2e 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php @@ -138,6 +138,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 b2c928f6bcbbccb623caeadd9380c8d525734262..a3e16b89f1dbce7e825ff862087cff7bc379c62d 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Product attribute add/edit form main tab * @@ -54,6 +56,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 14c2b030991467593a6f7cd35e849da202cf72ec..6a4b55e2194c876502a46341471b2676812e152f 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 @@ -44,6 +44,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 05c49c39a9fd629cbdc228622db6c0ae0e01f2ed..35155d15e785a1a2be59598673020c419f7ed60d 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 @@ -13,12 +13,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 59433983c4b11d3c92942d9f549489d72cb0da49..8ca6195788ac8fa4cb4b9c8e090fac7d6d505012 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php @@ -13,6 +13,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 c365667768150d845c4d3c9f92b6edfcc1878cf0..a5d7eba7fc4ff9e42e7b3cf0a086226e117e8dc0 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 @@ -13,6 +13,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 60b7325fe8acee9b01cce0fcf7bca96b72a20681..2f184f4bc916a124c2959e03a9931a25aab6792a 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 @@ -345,6 +345,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 7ac536f9995816dd3e0c5a433fa5fd5f69d941b9..00fa7838673786656affb1c69206a4ca81de9e18 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Adminhtml catalog product edit action attributes update tab block * @@ -13,6 +15,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/Alerts.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts.php index 399de16c7df3517352dca38d5e4b38a37a597f4b..f757d4f3e99c133f275f93fb453ab80c633e120a 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Product alerts tab * 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 cf6d2a6e6bb6e53c7318796a4cdbcd6d46f1a45e..d72539539a1b9e1126f9cd1d752db2b3fec3f55e 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 @@ -11,12 +11,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 cf8c975d516cfdc6aab6e1feb383576247ac2555..9f6229afbb32bee847f6fdcc591e92ee16174375 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 @@ -15,6 +15,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 { /** @@ -187,6 +190,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 9e5cbf16174610935e07e471dacf950676e32ecc..3a86850d5f87c6a8abdcc4c68480d6b7e4eac86a 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Customers defined options */ @@ -269,6 +271,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 cc93e83fae357fb2bc5d82ef915ee7267f1ee1f5..ab0acdbf63b4f8d379fc5d84a79165f0f4067a25 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 @@ -13,6 +13,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 efd4344b6e231415646372ec52726d8b40d00c9e..d2c9e742545cd88859eb5e04d81ed80c5e1d1804 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 @@ -43,6 +43,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 930ab7102fd56facc07a8748f3d5b3aa5b53c735..685aa481fe9fa9c335987aae68ce1f7f0bb3056f 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 @@ -184,6 +184,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 4e2fd72745b34d99cc4542080811a4c5df64863f..ca442c0b98b3e9fe3f9dbaf56a3e0bd2c76e2471 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 @@ -181,6 +181,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 78aec16eee179ecc71a3ff3ca11cc584753e876b..c059866c2ae8f4c6bcaf7876783003f7c52cf351 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs.php @@ -72,6 +72,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, @@ -118,6 +119,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 f82a78689e81f78e9abb70a1b7da3ced7822919c..51e82133640303da9a9a719bc25ec96fb3f2f03d 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 @@ -126,6 +126,7 @@ class Watermark extends \Magento\Backend\Block\AbstractBlock implements /** * @param AbstractElement $element * @return string + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _getHeaderHtml($element) { @@ -149,6 +150,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 fe290eacf76e04e563dcd7caef391f70deae9e9f..f053cfff68c30a45b9b39f8b3da88d0c29e4159c 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php @@ -209,6 +209,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/Category.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php index 2f017a34926b5b57638d96259b33f697bec1a975..5dc08c3d96431071f24985754594fd26dac30ede 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 33c4824d8f93d85275fc421e12bc9d804d55561e..d8ad9281699487ced8601782e1131745e6f1e6c3 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Catalog product gallery attribute @@ -176,6 +178,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/Breadcrumbs.php b/app/code/Magento/Catalog/Block/Breadcrumbs.php index e8f4a3f3bac100b430f871ae6fdf550eb2c7ef0b..5b6769b296d1ac7d233c104fd770085b159ed91e 100644 --- a/app/code/Magento/Catalog/Block/Breadcrumbs.php +++ b/app/code/Magento/Catalog/Block/Breadcrumbs.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Catalog breadcrumbs */ diff --git a/app/code/Magento/Catalog/Block/Navigation.php b/app/code/Magento/Catalog/Block/Navigation.php index 8f62231591389defe0b362ed03bffb281ea080ca..3dc3f7a4d7bb8bfda94490b751e85637d100285c 100644 --- a/app/code/Magento/Catalog/Block/Navigation.php +++ b/app/code/Magento/Catalog/Block/Navigation.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Block; use Magento\Catalog\Model\Category; @@ -12,6 +15,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 { diff --git a/app/code/Magento/Catalog/Block/Product/AbstractProduct.php b/app/code/Magento/Catalog/Block/Product/AbstractProduct.php index 2199e3057104ef7189547d915266ea88505a012e..ea891535c263d82cfdab6d3d5025bddbdc1d4b79 100644 --- a/app/code/Magento/Catalog/Block/Product/AbstractProduct.php +++ b/app/code/Magento/Catalog/Block/Product/AbstractProduct.php @@ -7,6 +7,8 @@ namespace Magento\Catalog\Block\Product; /** * Class AbstractProduct + * @SuppressWarnings(PHPMD.NumberOfChildren) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AbstractProduct extends \Magento\Framework\View\Element\Template { @@ -377,6 +379,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 80e59304f4460def155d7ba0a52f5a36df7938df..861a0cbfffa6bbb2231b4be702e32f3bd4af9754 100644 --- a/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php +++ b/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php @@ -12,6 +12,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 9402df7bcb22768b45804922711310b227de7063..7244352e262863747eebdc0e4ba1c53bab71378d 100644 --- a/app/code/Magento/Catalog/Block/Product/Context.php +++ b/app/code/Magento/Catalog/Block/Product/Context.php @@ -7,6 +7,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 17bdf803742ebb4b504c74705feaa9b32e5153b4..bc007d7e3f47995774c44ea93b9a7e94fac3edbd 100644 --- a/app/code/Magento/Catalog/Block/Product/ListProduct.php +++ b/app/code/Magento/Catalog/Block/Product/ListProduct.php @@ -15,6 +15,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/Related.php b/app/code/Magento/Catalog/Block/Product/ProductList/Related.php index 05b10f8fe49dbff11ccc587a3078f03d3df716c9..f92b7b91b6911fca9621de872f1dd24fea1b6fcf 100644 --- a/app/code/Magento/Catalog/Block/Product/ProductList/Related.php +++ b/app/code/Magento/Catalog/Block/Product/ProductList/Related.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Block\Product\ProductList; use Magento\Catalog\Model\Resource\Product\Collection; diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php index 1526ed7afc49a5b86e6984f759854b570593a818..b2f02218b1d7ed604c72e6961e9bbef826e6ee9c 100644 --- a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php +++ b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php @@ -12,6 +12,8 @@ use Magento\Catalog\Model\Product\ProductList\Toolbar as ToolbarModel; * Product list toolbar * * @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/ProductList/Upsell.php b/app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php index 47246f8f3a84dc665d88f19c820eb41630d6c197..55aceddbe44e740185dc26966fb8282ebd70a4f8 100644 --- a/app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php +++ b/app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Block\Product\ProductList; use Magento\Catalog\Model\Resource\Product\Collection; diff --git a/app/code/Magento/Catalog/Block/Product/View.php b/app/code/Magento/Catalog/Block/Product/View.php index 09108d7c2a840bd0b7986aa0f5635ea897552382..2a5238075e225a2a10e5701938ef5348c41f0862 100644 --- a/app/code/Magento/Catalog/Block/Product/View.php +++ b/app/code/Magento/Catalog/Block/Product/View.php @@ -10,6 +10,7 @@ use Magento\Catalog\Model\Product; /** * Product View block + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class View extends AbstractProduct implements \Magento\Framework\View\Block\IdentityInterface { @@ -73,6 +74,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 040a1c916d1b56ef06f960aca0975bde1e3e0388..4cf183e49951943b3c324a735fb18489eca66254 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Attributes.php +++ b/app/code/Magento/Catalog/Block/Product/View/Attributes.php @@ -67,6 +67,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 0efffe87ced5ae15ccdb5d1f3ce1fba8c76753cb..d2c8f141aefab185f94c06cf9d9a0b10d6dcb8fb 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 @@ -38,6 +38,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 18943c0e202ec4bf435d4668e92b6278ae3dc204..7585d4e39f7b781d1aac6e5d4069980c94e52b01 100644 --- a/app/code/Magento/Catalog/Block/Product/Widget/Html/Pager.php +++ b/app/code/Magento/Catalog/Block/Product/Widget/Html/Pager.php @@ -152,6 +152,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 e5367387aac85bb2ccb19ef7a66ffe6e46cf9b89..e1eabc8745699639b3bb351d31c71a00d5df3176 100644 --- a/app/code/Magento/Catalog/Block/Product/Widget/NewWidget.php +++ b/app/code/Magento/Catalog/Block/Product/Widget/NewWidget.php @@ -197,6 +197,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 bb3e7e9817001eeebf2909cf60c1efd784e1e78e..aa9048ae51fe0a0828cc388abc9eb26b7feba00b 100644 --- a/app/code/Magento/Catalog/Block/Rss/Category.php +++ b/app/code/Magento/Catalog/Block/Rss/Category.php @@ -12,6 +12,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 { @@ -61,6 +62,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 fccd37da489770f0f9e237b3414df283253c650d..d5da4e503b8bc47df61286ae29e4c8b548043b85 100644 --- a/app/code/Magento/Catalog/Block/Rss/Product/Special.php +++ b/app/code/Magento/Catalog/Block/Rss/Product/Special.php @@ -11,6 +11,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 { @@ -76,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/Catalog/Block/Widget/Link.php b/app/code/Magento/Catalog/Block/Widget/Link.php index 96423e495eb4e2006a32b40173486b0fa3ee4b19..b9910e70b769a029f53dbe3bb709ab1f14d61c56 100644 --- a/app/code/Magento/Catalog/Block/Widget/Link.php +++ b/app/code/Magento/Catalog/Block/Widget/Link.php @@ -67,6 +67,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 ade075d0bca684666e85ec34153f737a5728d7f9..f6b54278aa3eabc0a117ebf45ad491337a5fe39a 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Category/Edit.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Category/Edit.php @@ -39,6 +39,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 923403a05d4c57d71b6888489eae76b5473a6494..4599a379adbc9bace4e4f1dbc2ca7277f4861994 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.php @@ -68,6 +68,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 9dd74c1cf7b37daacc2e60a6b8b13c22dc1b4147..d80a02f02aa9844fddfaed047bbfdb84e3feab61 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product.php @@ -9,6 +9,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.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute.php index 5f781b6f4055495ab9c645f8895839f028c9cfa9..5a1ebddaee421d4d4cdc42646e75d286a8d68940 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Controller\Adminhtml\Product\Action; use 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 676ca502bb9bd451dcb1c94bcadfab03db5554bb..ccff305f5280df1da130b00d5ce6af38332baa95 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 @@ -10,6 +10,7 @@ use Magento\Backend\App\Action; /** * Class Save + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Action\Attribute { @@ -80,6 +81,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 de363a251e4e7e61dce6ece55cec3443e8a6eeb2..7eee03d9f842eef0d0b3c1c3475644509c13c008 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Edit.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Edit.php @@ -39,6 +39,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 ac8b97d19e061f68dc4cfe4685b1e2e31b30c3b5..1de519b9b25b75006bef3b00bf752d2d1a65b8d9 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php @@ -4,10 +4,16 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + 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 { /** @@ -57,6 +63,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, @@ -83,6 +90,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 c3f764248861ce012aa0e6f77c25cc842eecdbe0..9dbbddcee68f828b225304bea6dad7050d74c275 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php @@ -58,6 +58,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 7893a9914ffd5d35764918feb474da10727c87d4..3de39b7dfb8c244db5d0abc3e05f62a9c9faa831 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilter.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilter.php @@ -45,6 +45,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 ee63fba1852bb4489103c162557ba5d3a4eaccdd..a325c816d6d2fb647f4501ca3e58881a2d2f9d27 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php @@ -58,6 +58,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 b6c6fcd1940ead117294d2ecb4832f6650c45fa5..5f2aec23a62a538148673696ff7dd9339398a589 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php @@ -63,6 +63,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 ff08a8cf3c3cb5d74fea312b28683e0087a85d37..b459ab001458a934c8eb4f6901131eb56ce62b1f 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Validate.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Validate.php @@ -58,6 +58,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 54234861d1559144cda8e166f6ecc71977ffa1ea..82f6992c1e8bbb5cdc1f0f79108a2ec35817838b 100644 --- a/app/code/Magento/Catalog/Controller/Category/View.php +++ b/app/code/Magento/Catalog/Controller/Category/View.php @@ -11,6 +11,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 { /** @@ -135,6 +138,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 45aaaa22de207f9187356b59015ac12a6f6ac971..4e934b0685e698f5e1f179935e8ee9d2a746025a 100644 --- a/app/code/Magento/Catalog/Controller/Product/Compare.php +++ b/app/code/Magento/Catalog/Controller/Product/Compare.php @@ -14,6 +14,7 @@ use Magento\Framework\View\Result\PageFactory; * Catalog compare controller * * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Compare extends \Magento\Framework\App\Action\Action { @@ -106,6 +107,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 78da553d5a9bb5e244ec2663d27a6afb32b00e79..aa311afa1c33047eeed43400001bf7096242e366 100644 --- a/app/code/Magento/Catalog/Controller/Product/Compare/Index.php +++ b/app/code/Magento/Catalog/Controller/Product/Compare/Index.php @@ -11,6 +11,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 99027a495d868fa29a1a300a7fff8ce303a70fe1..4609524bd509b1d0e3f7823bae87d56190b94f93 100644 --- a/app/code/Magento/Catalog/Helper/Data.php +++ b/app/code/Magento/Catalog/Helper/Data.php @@ -15,6 +15,8 @@ use Magento\Tax\Model\Config; /** * Catalog data helper + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Data extends \Magento\Framework\App\Helper\AbstractHelper { @@ -184,6 +186,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, @@ -464,6 +467,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 d8ab47819fec6f8f10d950349e7ca15758a6ba02..add8bd324ce9582fca7e33bbd480f9c6fdf24200 100644 --- a/app/code/Magento/Catalog/Helper/Image.php +++ b/app/code/Magento/Catalog/Helper/Image.php @@ -249,6 +249,7 @@ class Image extends AbstractHelper * @param bool $flag * @param string[] $position * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function keepFrame($flag, $position = ['center', 'middle']) { @@ -267,6 +268,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 990604192b14dffc4346d325083f7e1a29831a2f..c509c1d752e5fb22830546e1256a23ed363b63d6 100644 --- a/app/code/Magento/Catalog/Helper/Output.php +++ b/app/code/Magento/Catalog/Helper/Output.php @@ -133,6 +133,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 e622df9bf617d21bbfd9bb29619065ebf629bd56..5adf09c4ce778090bee50b4bb65bc1351a14a355 100644 --- a/app/code/Magento/Catalog/Helper/Product.php +++ b/app/code/Magento/Catalog/Helper/Product.php @@ -13,6 +13,7 @@ use Magento\Store\Model\Store; /** * Catalog category helper + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Product extends \Magento\Core\Helper\Url { @@ -110,6 +111,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, @@ -246,6 +248,7 @@ class Product extends \Magento\Core\Helper\Url * * @param ModelProduct|\Magento\Framework\Object $product * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getThumbnailUrl($product) { @@ -284,6 +287,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') { @@ -385,6 +389,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) { @@ -538,6 +544,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 62fbee193ce0f18d39630f50691fcb7de1985f06..469c47e77d539d84ed4bf04ceed27f4539fbf877 100644 --- a/app/code/Magento/Catalog/Helper/Product/Compare.php +++ b/app/code/Magento/Catalog/Helper/Product/Compare.php @@ -12,6 +12,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 { @@ -104,6 +105,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, @@ -357,6 +359,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 fb7b67d24fed5627580b8d62011a79ce956ef702..cb29ce5f7e883e06476a3695359540eae2f65090 100644 --- a/app/code/Magento/Catalog/Helper/Product/Composite.php +++ b/app/code/Magento/Catalog/Helper/Product/Composite.php @@ -19,6 +19,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 c356d77c5e54bb87efde664ca0111020272fa939..2018d7d2f8ec9885463842f442f88d6f1072d2c3 100644 --- a/app/code/Magento/Catalog/Helper/Product/Configuration.php +++ b/app/code/Magento/Catalog/Helper/Product/Configuration.php @@ -145,6 +145,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 9448849b95aa260672072dcbd3b5a98a336ded4b..add782fd4d41e654d853cf0cf47037d094ffd395 100644 --- a/app/code/Magento/Catalog/Helper/Product/Edit/Action/Attribute.php +++ b/app/code/Magento/Catalog/Helper/Product/Edit/Action/Attribute.php @@ -11,6 +11,7 @@ namespace Magento\Catalog\Helper\Product\Edit\Action; /** * Class Attribute + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Attribute extends \Magento\Backend\Helper\Data { @@ -67,6 +68,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 6ea99cb96b1af11ba9374391aa331708e342abf8..27d3d25fa89dc22eb08245e7a9dcdd227d99b94d 100644 --- a/app/code/Magento/Catalog/Helper/Product/Flat/Indexer.php +++ b/app/code/Magento/Catalog/Helper/Product/Flat/Indexer.php @@ -8,6 +8,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 { @@ -130,6 +132,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/ProductList.php b/app/code/Magento/Catalog/Helper/Product/ProductList.php index 5161aaa717c236862eb7ac77f7296580a44b629d..f298f7b940f79e14800711da955b83c3071eb3c6 100644 --- a/app/code/Magento/Catalog/Helper/Product/ProductList.php +++ b/app/code/Magento/Catalog/Helper/Product/ProductList.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 6360c56c71fb748fb5fcec2c1de0539889b570f8..18f48f0521c9cee617daea82d8a2fe79a09ef7fe 100644 --- a/app/code/Magento/Catalog/Helper/Product/View.php +++ b/app/code/Magento/Catalog/Helper/Product/View.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Helper\Product; use Magento\Framework\View\Result\Page as ResultPage; @@ -102,6 +104,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 2559e15926b376d257c4a65e3db773d38a4ac5e4..5694254c627ca971b8d27e7e39ab3d324e4afea6 100644 --- a/app/code/Magento/Catalog/Model/AbstractModel.php +++ b/app/code/Magento/Catalog/Model/AbstractModel.php @@ -313,6 +313,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 797528fe53a8eeebaf1e6f21bf499a52eee6aac5..5006b8fdb84bba61b70cff5cd0079f11e6462bd5 100644 --- a/app/code/Magento/Catalog/Model/App/Action/ContextPlugin.php +++ b/app/code/Magento/Catalog/Model/App/Action/ContextPlugin.php @@ -48,6 +48,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 de16d5850c0a95702afaa1ff59c94a531cd6e5f1..214cb33195bcbdba9fb4c5b302e38918d5b1f96c 100644 --- a/app/code/Magento/Catalog/Model/Category.php +++ b/app/code/Magento/Catalog/Model/Category.php @@ -27,6 +27,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, @@ -190,6 +194,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, @@ -257,6 +262,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements * Get flat resource model flag * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseFlatResource() { @@ -408,6 +414,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) { @@ -1093,6 +1100,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 8b0d73753f71e4ebd0ef72c959a4f99706205cc7..c1d07fc693ab29467a3765b2d30f9d5fb9b50a22 100644 --- a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php +++ b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php @@ -35,6 +35,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 a2015639d17a8ace900e588cf990ff9c34427226..8cbdb43ad337b980023575b93070cdcb929ca8a0 100644 --- a/app/code/Magento/Catalog/Model/Config.php +++ b/app/code/Magento/Catalog/Model/Config.php @@ -3,10 +3,15 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + 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 e5fc53eee22cb751b7a422b9db44d74c7fecd835..fa8019fc6298c1d2f4d9a546f983e3eee6a05e6e 100644 --- a/app/code/Magento/Catalog/Model/Entity/Attribute.php +++ b/app/code/Magento/Catalog/Model/Entity/Attribute.php @@ -43,6 +43,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 { @@ -86,6 +87,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/Factory.php b/app/code/Magento/Catalog/Model/Factory.php index 4140789849772016f9439c1d34fb6bed4b4506fa..55add909d9f8542506d3afeb6edbca40eb779134 100644 --- a/app/code/Magento/Catalog/Model/Factory.php +++ b/app/code/Magento/Catalog/Model/Factory.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Model factory */ diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/AffectCache.php b/app/code/Magento/Catalog/Model/Indexer/Category/AffectCache.php index 63c5da5aeafb46b7e1821f991a7384f15baaf742..124424648050de9216a216c51ed877de2a96bd16 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/AffectCache.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/AffectCache.php @@ -29,6 +29,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 0ad27cfd659d0fddc229a555e7e0763e2beffa05..9fba6a8ae96707b844aac77f2f95a1eea1394cec 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Flat/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Flat/AbstractAction.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Indexer\Category\Flat; class AbstractAction @@ -186,6 +189,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/AbstractAction.php b/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php index 0b6478356257c094c5628db819d1b698d36efeb8..fc76af0a7552bf05631cf973bf868445252b0ef6 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 0e45e6680e3487c5f5bfddfd07a24d438d1cb7f3..019d27e4bead31f68793f7ea11851889afe45787 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 @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f2cbf9b29888b2ce2b7945f397c1f82467354206..ccfde503a9d9099be57de7c539ad50ada96582ba 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 @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Indexer\Category\Product\Plugin; class MviewState 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 684e815cf31cb41ac8c7110f641006dbafb68752..ef9def13549270f2eb72db01f47d370be1cc574f 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 @@ -23,6 +23,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 35e4d36b8caab2e70f3f33132d08c17f2fedaff7..5e997400ec23e0725b745c0f0b359d92e9ccdfe4 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/AffectCache.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/AffectCache.php @@ -29,6 +29,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 181a5901b8abdda155f53e9626f8b4f62faf583d..c160e95db9b1f1836852dee34755e80b93bb6ea0 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/AbstractAction.php @@ -118,6 +118,7 @@ abstract class AbstractAction * @param array $tablesList * @param int|string $storeId * @return void + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _cleanOnFailure(array $tablesList, $storeId) { @@ -183,6 +184,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 6da2dceeeb1462a9c47cab8bb3d50330c6eba0b5..383fab299e86f0d43b425b873baa8a4317b5ebe3 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 @@ -41,6 +41,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 c0253fb24a80c8cbe4f9196e157c21fb3cc989f2..3c5fd37274111d25ad407d87d5b42528f811ee71 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/FlatTableBuilder.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/FlatTableBuilder.php @@ -98,6 +98,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/Flat/Plugin/Store.php b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Plugin/Store.php index e4b3ea3eb0b9b36fae8bc6fe2845879ea3160a38..781cb92d83a77702211b7e62d79a04ef230f8634 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 eba0f5ade8c9f55fee1e7ff9f558e47b3aaf23b1..7e59098153d5213d986643437a0f53de66e72458 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Indexer\Product\Flat\Plugin; class StoreGroup 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 3a52723a9a29e26eb61ba23b6d4a2c189d77d25c..52861a1d42adae0dc6159754e99eb1ac3f5516c9 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php @@ -8,6 +8,7 @@ namespace Magento\Catalog\Model\Indexer\Product\Price; /** * Abstract action reindex class * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractAction { @@ -444,6 +445,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 a113728fb032347d5cddbb8de7d03f7392791873..74bcbfdf7cc843adc5172d6a3f31a0b8cf43799b 100644 --- a/app/code/Magento/Catalog/Model/Layer.php +++ b/app/code/Magento/Catalog/Model/Layer.php @@ -12,6 +12,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/AlgorithmFactory.php b/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/AlgorithmFactory.php index 200f73de1b49a94384a7f05a9199012697cab68d..d86b8220296bf9842d1d601426bb4516ecb8c2e1 100644 --- a/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/AlgorithmFactory.php +++ b/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/AlgorithmFactory.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Layer\Filter\Dynamic; use Magento\Framework\App\Config\ScopeConfigInterface; 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 1f62c1c6de6103a437f27de185a3c55f722306ad..627c5dabb80bdb0e4b8c3ed1dd249306c7473ac8 100644 --- a/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/Auto.php +++ b/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/Auto.php @@ -13,6 +13,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/Item.php b/app/code/Magento/Catalog/Model/Layer/Filter/Item.php index 3fac2f8d64387585a75a18f14762964e4bad2f8a..367f58f8ba501c536e9037e84ead680dcfad2d73 100644 --- a/app/code/Magento/Catalog/Model/Layer/Filter/Item.php +++ b/app/code/Magento/Catalog/Model/Layer/Filter/Item.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 7183b9287b539d4e2e4eada8c66d88fe011e769c..8db29096c2852391fd4176473d167bed41eaae7a 100644 --- a/app/code/Magento/Catalog/Model/Layer/Filter/Price.php +++ b/app/code/Magento/Catalog/Model/Layer/Filter/Price.php @@ -3,12 +3,16 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + 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 { @@ -70,6 +74,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 32a82364c17a05c2205d7bf31c22287dc19da62e..8d7b4d3c726614631c10a4f2893ad99317995e4e 100644 --- a/app/code/Magento/Catalog/Model/Product.php +++ b/app/code/Magento/Catalog/Model/Product.php @@ -29,6 +29,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, @@ -640,6 +644,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) { @@ -662,6 +667,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() { @@ -777,8 +783,10 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements */ public function setQty($qty) { - $this->setData('qty', $qty); - $this->reloadPriceInfo(); + if ($this->getData('qty') != $qty) { + $this->setData('qty', $qty); + $this->reloadPriceInfo(); + } return $this; } @@ -1393,6 +1401,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements * Is product salable detecting by product type * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsSalable() { @@ -1679,6 +1688,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 d2447816e1d8c4561a55f2b097a29a95ca028bb6..5f86ef87a78997cb0d928c24782aae85380f5799 100644 --- a/app/code/Magento/Catalog/Model/Product/Action.php +++ b/app/code/Magento/Catalog/Model/Product/Action.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product; /** @@ -117,6 +120,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 fd074e4485b926c53c2ef096a3379f49c2899c5e..6aeacc7c2cd91303fe0b10414ba7e63a4b7e4a19 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product\Attribute\Backend\GroupPrice; use Magento\Catalog\Model\Product\Attribute\Backend\Price; @@ -109,6 +112,7 @@ abstract class AbstractGroupPrice extends Price * * @param array $objectArray * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getAdditionalUniqueFields($objectArray) { @@ -132,6 +136,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) { @@ -284,6 +290,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 19333586273f2b6a0d5d20f23c055ae5a1e95672..f8d053035fe87cec28091745d85cfb05a39d9bfc 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php @@ -14,6 +14,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 { /** @@ -164,6 +168,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) { @@ -254,6 +260,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) { @@ -347,6 +355,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 45e9dac9eba4b624b8a9f0e54ad04136d6d45520..79b2b1b752ad9a6cd367e5eeba0df8e06cea13f5 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php @@ -96,6 +96,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/Backend/Sku.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Sku.php index a0afc031fbf24c1b9909e7ae48dc2ab6fb967b0d..728cd250923fee5d7616e9958052d654a219f9f1 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Sku.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Sku.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Catalog product SKU backend attribute model * diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php b/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php index faaf5645680ae0e5c6fde4e07a2524cfc183bddd..86548f86dd1a2a812f4e2ec5e45fc4dea4af5924 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php @@ -9,6 +9,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 { /** @@ -72,6 +75,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, @@ -121,6 +125,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 aec2983c06c1858f16d091ed194b55672031134a..769a2aeb5a832cd27ffacffbaa6d4512468e5c1b 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Source/Inputtype.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Source/Inputtype.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Product attribute source input types */ @@ -39,6 +41,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 5f52479c57cb635801dc9cfb8dc5d6114e1762f0..b488f1d02e0bdba0c9530c720e48737e1d1c6775 100644 --- a/app/code/Magento/Catalog/Model/Product/Compare/Item.php +++ b/app/code/Magento/Catalog/Model/Product/Compare/Item.php @@ -207,6 +207,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 8b1fa1b3cab4c0e7a75986f55911ca5187f16cba..31a9d3963e2a47ec5e88704721929127f3e3cb78 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/Entry.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/Entry.php @@ -46,6 +46,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 89d0257b95967bf5c0b954fcfa333118b1124f01..bedbdec0d88602a8f4952b918d718ba7b7dab307 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php @@ -15,6 +15,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 41625fdb8c68980fdbb2e4f4647580dfd065c339..63b9a377bf952399c38fca3a93a25363eb73d8f5 100644 --- a/app/code/Magento/Catalog/Model/Product/GroupPriceManagement.php +++ b/app/code/Magento/Catalog/Model/Product/GroupPriceManagement.php @@ -69,6 +69,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 59f34349b8dd2ee4a945b2ef34cd3b727a6f3004..d133d26599e35211382ef682503cb6efd0d1307c 100644 --- a/app/code/Magento/Catalog/Model/Product/Image.php +++ b/app/code/Magento/Catalog/Model/Product/Image.php @@ -15,6 +15,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 { /** @@ -174,6 +179,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, @@ -381,6 +388,7 @@ class Image extends \Magento\Framework\Model\AbstractModel /** * @param string|null $file * @return float|int + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getNeedMemoryForFile($file = null) { @@ -436,6 +444,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) { @@ -611,6 +621,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/Media/Config.php b/app/code/Magento/Catalog/Model/Product/Media/Config.php index 067313d3f64ca250caeceb0a6b95849bc7d66847..55b22c509a9450c8296e4851d5797c1b64cf803b 100644 --- a/app/code/Magento/Catalog/Model/Product/Media/Config.php +++ b/app/code/Magento/Catalog/Model/Product/Media/Config.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 7582f0c38f7bb87c17d9c631036d88ed9311e275..cb57df12918acfa84ce21b88a467b349a14edf0b 100644 --- a/app/code/Magento/Catalog/Model/Product/Option.php +++ b/app/code/Magento/Catalog/Model/Product/Option.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product; use Magento\Catalog\Api\Data\ProductCustomOptionValuesInterface; @@ -22,6 +25,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 { @@ -104,6 +108,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, @@ -313,6 +318,7 @@ class Option extends AbstractExtensibleModel implements \Magento\Catalog\Api\Dat * Save options. * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function saveOptions() { @@ -626,6 +632,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 2765bdce22a707cda01338a7ca6f73da12b18d60..16f2ce870043191bc47bf124e8352caeac082041 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Type/Date.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Type/Date.php @@ -44,6 +44,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) { @@ -117,6 +119,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() { @@ -175,6 +179,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 6ec50cc610f9a27fdc017637e3861db01d058d76..b573c37ee059e5bed70f7b232686dbfcdc5fe891 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product\Option\Type; use Magento\Framework\Model\Exception; @@ -11,6 +14,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 { @@ -216,6 +220,7 @@ class DefaultType extends \Magento\Framework\Object * Check skip required option validation * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getSkipCheckRequiredOption() { @@ -298,6 +303,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) { @@ -321,6 +327,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) { @@ -335,6 +342,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 fdb25cdc8a5894eb800751dda71cce4c9b0c669d..2cf121a3aa25f113190302cc38b061240c10c939 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Type/File.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Type/File.php @@ -12,6 +12,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 { @@ -179,6 +180,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 36b44f9dd09a7cbc85b8d6a784e16980f1e14ce4..e53f8fd846215788c6877b17390799f527150290 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 @@ -9,6 +9,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 { /** @@ -87,6 +90,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 62d311a008e01f71f4901a5f8e34c0c162c9f0cc..cc86a79f92b9b5cec917cceec493f9b7cb2a8a02 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Validator/Select.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Validator/Select.php @@ -31,6 +31,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/Option/Value.php b/app/code/Magento/Catalog/Model/Product/Option/Value.php index 62a8ec0be92927e20074a4ffc1c4f2c69be8e64b..c4d59f564dbdb95034a15c11bc1fcb155dbb8f13 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Value.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Value.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product\Option; use Magento\Framework\Model\AbstractExtensibleModel; diff --git a/app/code/Magento/Catalog/Model/Product/PriceModifier.php b/app/code/Magento/Catalog/Model/Product/PriceModifier.php index a4b2cd7a6fca363f01e51bba6b7bebfe648f47df..56db5467cbe53959b691c05befeac43498e598c2 100644 --- a/app/code/Magento/Catalog/Model/Product/PriceModifier.php +++ b/app/code/Magento/Catalog/Model/Product/PriceModifier.php @@ -70,6 +70,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 6c39c1911ea2739b6e0ea4dd347f10fc6fac999f..acc29e26adb59125e24b31eac90fc5d5726f44c9 100644 --- a/app/code/Magento/Catalog/Model/Product/TierPriceManagement.php +++ b/app/code/Magento/Catalog/Model/Product/TierPriceManagement.php @@ -13,6 +13,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 456a51e9062492b639a0d6d52cdd5982cba6aa25..a3e7fcfc6c642ff13558e1a6d73d73627f88aa02 100644 --- a/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php +++ b/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php @@ -10,6 +10,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 { @@ -167,6 +171,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, @@ -225,6 +230,7 @@ abstract class AbstractType * @param int $parentId * @param bool $required * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getChildrenIds($parentId, $required = true) { @@ -236,6 +242,7 @@ abstract class AbstractType * * @param int|array $childId * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getParentIdsByChild($childId) { @@ -319,6 +326,7 @@ abstract class AbstractType * * @param \Magento\Catalog\Model\Product $product * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function isVirtual($product) { @@ -349,6 +357,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) { @@ -462,6 +471,8 @@ abstract class AbstractType * * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function processFileQueue() { @@ -714,6 +725,7 @@ abstract class AbstractType * * @param \Magento\Catalog\Model\Product $product * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function isComposite($product) { @@ -725,6 +737,7 @@ abstract class AbstractType * * @param \Magento\Catalog\Model\Product $product * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function canConfigure($product) { @@ -828,6 +841,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) { @@ -880,6 +894,8 @@ abstract class AbstractType * * @param \Magento\Catalog\Model\Product $product * @return boolean false + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getForceChildItemQtyChanges($product) { @@ -892,6 +908,7 @@ abstract class AbstractType * @param int|float $qty * @param \Magento\Catalog\Model\Product $product * @return float + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function prepareQuoteItemQty($qty, $product) { @@ -975,6 +992,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) { @@ -1028,6 +1046,7 @@ abstract class AbstractType * * @param \Magento\Catalog\Model\Product $product * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setImageFromChildProduct(\Magento\Catalog\Model\Product $product) { @@ -1039,6 +1058,7 @@ abstract class AbstractType * * @param \Magento\Catalog\Model\Product $product * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getIdentities(\Magento\Catalog\Model\Product $product) { @@ -1048,6 +1068,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 0e16080c1fe0c25a6c98c564e7ba48d84b16eb8e..43d0e981d6e45e2b0cda05c4ee5d91b2b82cc79e 100644 --- a/app/code/Magento/Catalog/Model/Product/Type/Price.php +++ b/app/code/Magento/Catalog/Model/Product/Type/Price.php @@ -157,6 +157,7 @@ class Price * @param Product $childProduct * @param float $childProductQty * @return float + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getChildFinalPrice($product, $productQty, $childProduct, $childProductQty) { @@ -243,6 +244,8 @@ class Price * @param Product $product * @return float|array * @deprecated (MAGETWO-31465) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getTierPrice($qty, $product) { @@ -410,6 +413,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/TypeTransitionManager.php b/app/code/Magento/Catalog/Model/Product/TypeTransitionManager.php index f20d51159554ec9249c35fd18368d02a2a3fb93c..99dd6a233fa65cb5ef2e531d09d8bb742ec938d9 100644 --- a/app/code/Magento/Catalog/Model/Product/TypeTransitionManager.php +++ b/app/code/Magento/Catalog/Model/Product/TypeTransitionManager.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product; use Magento\Catalog\Model\Product; diff --git a/app/code/Magento/Catalog/Model/Product/Url.php b/app/code/Magento/Catalog/Model/Product/Url.php index 2a3daf72a1dea2d9f3accad25bdfab598970f01a..819232c0725978042acbfc97257a5708a49f81cd 100644 --- a/app/code/Magento/Catalog/Model/Product/Url.php +++ b/app/code/Magento/Catalog/Model/Product/Url.php @@ -158,6 +158,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 0682a820cfd0c33efe69c1a26f2d48039ee2f44f..00bd85a34d45d272fb687704862b09b94fec650b 100644 --- a/app/code/Magento/Catalog/Model/Product/Validator.php +++ b/app/code/Magento/Catalog/Model/Product/Validator.php @@ -18,6 +18,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/Product/Website.php b/app/code/Magento/Catalog/Model/Product/Website.php index a4e4f460f3bee5a04b448d23923ee3ff349d011a..a375c114f96af62cb812068c18e8950eb874aafe 100644 --- a/app/code/Magento/Catalog/Model/Product/Website.php +++ b/app/code/Magento/Catalog/Model/Product/Website.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Catalog Product Website Model * diff --git a/app/code/Magento/Catalog/Model/ProductRepository.php b/app/code/Magento/Catalog/Model/ProductRepository.php index e455e62d77cf2bc1f4b658197af171a6a5a21de7..4a205ae8920f5a00fb1e0a3aad9de3dc09ff5151 100644 --- a/app/code/Magento/Catalog/Model/ProductRepository.php +++ b/app/code/Magento/Catalog/Model/ProductRepository.php @@ -11,6 +11,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 dc9b6a252c3fa64ab863c774870c0fe5a0c2b950..4a62d1cfc8f2a2d3f106bd8502c6ec94553d9046 100644 --- a/app/code/Magento/Catalog/Model/Resource/AbstractResource.php +++ b/app/code/Magento/Catalog/Model/Resource/AbstractResource.php @@ -3,12 +3,16 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Resource; use Magento\Eav\Model\Entity\Attribute\AbstractAttribute; /** * Catalog entity abstract model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractResource extends \Magento\Eav\Model\Entity\AbstractEntity { @@ -525,6 +529,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 d572d172925984f1d71cf1913eaf9d6826af71a8..d5c541c7cca51ddc17dfef8945b6eedafdefd327 100644 --- a/app/code/Magento/Catalog/Model/Resource/Category.php +++ b/app/code/Magento/Catalog/Model/Resource/Category.php @@ -11,6 +11,9 @@ */ namespace Magento\Catalog\Model\Resource; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Category extends AbstractResource { /** @@ -326,6 +329,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 a0841974d95abb7951f3ffa7a23f723bbd06f327..75efc53ebe0a71c8c58f3a2889eb4ad90ab28bb8 100644 --- a/app/code/Magento/Catalog/Model/Resource/Category/Collection.php +++ b/app/code/Magento/Catalog/Model/Resource/Category/Collection.php @@ -201,6 +201,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 9022084a49f316e7df93798f2caf13e5d66a52ca..bbd46711f99c340cfe661a48c372c837f96266cd 100644 --- a/app/code/Magento/Catalog/Model/Resource/Category/Tree.php +++ b/app/code/Magento/Catalog/Model/Resource/Category/Tree.php @@ -5,6 +5,9 @@ */ namespace Magento\Catalog\Model\Resource\Category; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Tree extends \Magento\Framework\Data\Tree\Dbp { const ID_FIELD = 'id'; @@ -157,6 +160,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, @@ -324,6 +329,7 @@ class Tree extends \Magento\Framework\Data\Tree\Dbp * * @param int $id * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ protected function _getItemIsActive($id) { @@ -437,6 +443,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 4ac7d33d68c4258b83b454bd0a8efeb38fbea21d..9c60527a4a71e1f54c347a057dd9a8baab80a79b 100644 --- a/app/code/Magento/Catalog/Model/Resource/Eav/Attribute.php +++ b/app/code/Magento/Catalog/Model/Resource/Eav/Attribute.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Resource\Eav; use Magento\Catalog\Model\Attribute\LockValidatorInterface; @@ -36,6 +39,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 @@ -113,6 +117,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, @@ -175,6 +180,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() { @@ -412,6 +418,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() { @@ -442,6 +449,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/Product.php b/app/code/Magento/Catalog/Model/Resource/Product.php index eeec4222eca33fd6deceedc26bb6edf26c7bec2c..814f9e6ec81e9c7607fe2057d0f3f9b0d3dc598b 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product.php +++ b/app/code/Magento/Catalog/Model/Resource/Product.php @@ -9,6 +9,7 @@ namespace Magento\Catalog\Model\Resource; * Product entity resource model * * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Product extends AbstractResource { @@ -311,6 +312,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/Attribute/Backend/Media.php b/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Backend/Media.php index 624fabad0eeb968842ee7f9500d08c98affc8420..6fde77a376fbed7e911eee4128e6094860ee201e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 178f39f62623b90023ee022273182b750afc6b5e..2d7139d4981841baf3bfb878ed08e0c63ba06ded 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Collection.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Collection.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Resource\Product; use Magento\Catalog\Model\Product\Attribute\Source\Status as ProductStatus; @@ -13,6 +16,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 { @@ -1390,6 +1398,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') { @@ -1529,6 +1538,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) { @@ -1626,6 +1637,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractColl * Join website product limitation * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _productLimitationJoinWebsite() { @@ -1678,6 +1690,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() { @@ -1977,6 +1991,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 6906d82753e4c30eb9a9fe6d78b7e92b957f1c81..c9a4fd6abfe36c20f307d0b76e56540d58542d22 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 @@ -10,6 +10,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 3e6cf3db6816fc7b6570905dce98482bd0c49f1f..bc256d7ee3426b152a0babc4fa3258e1882fb9a8 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 @@ -110,6 +110,7 @@ class DefaultPrice extends \Magento\Catalog\Model\Resource\Product\Indexer\Abstr * Check product type is composite * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsComposite() { @@ -203,6 +204,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) { @@ -391,6 +393,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() { @@ -641,6 +644,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/Model/Resource/Product/Link.php b/app/code/Magento/Catalog/Model/Resource/Product/Link.php index be29863658c1925405a973c6ee2a2d1be400b31c..cb70baff0420b403b7dc18e0cbf992512120f86f 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Link.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Link.php @@ -54,6 +54,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 9f619df100c98db894bda545dfcc06553a4eb736..0150acf9b0e767b2f8ea551e8588538170290669 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Option.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Option.php @@ -82,6 +82,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) { @@ -230,6 +232,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 8fda510c49d0246696644ce6ac3b9fd164cf03b3..89ecd99e7b368f5b467f9b3ad4a802ba2097449a 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Option/Value.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Option/Value.php @@ -83,6 +83,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) { @@ -209,6 +211,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 b1d0149833626678022a95effc0335a742351d33..8f2b9c316a478b01beea39f6fb9297321a8cd6ca 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 @@ -188,6 +188,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 85b813ff7ae71c406be9e0f4fabe860cbcbacdce..1b9a020792dc1af4942749ae1357ccda747cbcb9 100644 --- a/app/code/Magento/Catalog/Model/Resource/Setup.php +++ b/app/code/Magento/Catalog/Model/Resource/Setup.php @@ -71,6 +71,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 e8465ef90f37b291b02f3fcaef8e6f8bc2daaa96..b41e752056677d3461ae5f2778555779fd9faebf 100644 --- a/app/code/Magento/Catalog/Model/Resource/Url.php +++ b/app/code/Magento/Catalog/Model/Resource/Url.php @@ -363,6 +363,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 e01e5172c2d57c9b48a6af829b0d0e9d9d48e9f4..c9054ef4160d0d8d2f7f0f91af0982ccf6e2fa19 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 @@ -18,6 +18,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 */ @@ -43,6 +46,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/Model/Template/Filter.php b/app/code/Magento/Catalog/Model/Template/Filter.php index 624ff99b3a6033b8dcc2f72840ba94b9b816895f..93376946e09d1c98bbae3268581904817b4903ad 100644 --- a/app/code/Magento/Catalog/Model/Template/Filter.php +++ b/app/code/Magento/Catalog/Model/Template/Filter.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 f8b43b2baedecb2578098019712979af1f15713f..2ec6eee9de6699f1a4071f073da06c0ac691ea6b 100644 --- a/app/code/Magento/Catalog/Model/Template/Filter/Factory.php +++ b/app/code/Magento/Catalog/Model/Template/Filter/Factory.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 b20a1e2cc9ea4eff3c9769c5a924a4ce06a6253c..726d3d05e60f1bd5219b37f1b92cf031bb8da121 100644 --- a/app/code/Magento/Catalog/Pricing/Price/TierPrice.php +++ b/app/code/Magento/Catalog/Pricing/Price/TierPrice.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Pricing\Price; use Magento\Catalog\Model\Product; @@ -250,6 +252,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 69d24581c647db1d75c5b9fbe736285ecd797d04..5f0dfcba1714934b988b2713f6874feb17469cfe 100644 --- a/app/code/Magento/Catalog/Pricing/Render/PriceBox.php +++ b/app/code/Magento/Catalog/Pricing/Render/PriceBox.php @@ -39,6 +39,7 @@ class PriceBox extends PriceBoxRender * @param Data $coreDataHelper * @param Random $mathRandom * @param array $data + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct( Context $context, @@ -84,6 +85,7 @@ class PriceBox extends PriceBoxRender * * @param Product $product * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCanDisplayQty(Product $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 853bb4224961ae11f45a9cc8d2a19f4c5b57e049..1472110e5fd24e38ba625348f88e0bf4dbd011b2 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 1a9b64f32582d631f2e5aefe1067e57eefc5a0ad..78f0314f37e1de62a26e5b3666e5bd9ef6a54901 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d5be664dabbc569e15620d64e9e5fa91faa11e2d..330375f2bbd380a80b7ad97ac0378bb01a2d54d6 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f777553e7a66e174c26806dd60bb3fe7aac2c5be..6b3e96b3019fbca83d313b27f27d679cf043d1ed 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 a6e70b7e8e1a682715228a93c1a04e7a8fbdd0fc..ab241f4cf2526362021d4fa0d51278367eaf8c65 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 613d28de9c8b8170a2c6a6926a337da5b18fa96a..b40ac67e83969387dbadd4d8a2dbf784a44be429 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a4475fb7e4f0d9a057142a18b2982f375a051626..a3b0a37fefa88d5297d1f8a04d19f915113b932d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 888f68c0aa42ef3463bc163e748c567870d51e2c..e2c7b64715567b39c5f789b3eea8ba3ead79569f 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 847219fab39e94acc516581b975930c021059240..49733c945841ac98f9bb5bd6b4bb24615f97ddd4 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 16fbc6e24808925de4fd6d30f7fd1e9d8a20ad3d..46f2599f4f4298d4a358cef9aea7afe539890919 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <script> 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 19e1868ecf51f8554a588b560f123d930b1a106f..6d4eba95168d8ed4fbac08e89687de24d667f975 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e25e9d417993509deb62b48688aa250186af4c7f..6b62ffe820f1d4d1cb46d79e78564ab6fffdfb79 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 1d54c2626cea0c288bbc3c2ec73da1e4d3b0c72b..b5fb8f89ebc6c80e7ef7a146ded5c532bbdd4ef6 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9228aa320afa5a3a1b7e14c79d3773991984487f..1d27f92b1d57cdd4045ec77cdb17e900c03c669d 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 @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 97af22f635ee902bd62ee5b1c3fab7072acc229b..551e7b420c8c1492ba4a6ec09bf9c6df81c498f5 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6f5092f4d71783aa8ded2a52133efd7f7a9fc42f..af3a4af7341170bc2517ffc9a70df0c22a30e124 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d921293b86e4f3e05c435bdd42218a43102638a7..d569edd981107bf88748453fe2a607ea1e0d672a 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ed3512348f982c624cee350785a402a2eefc2458..40e578f3df31f963ddb00959748434f7d62d957a 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f7cd5944109cc85b475d59d872068cd1262232dd..c7fc9264685a676a9ba79f7a98d3070c160545cd 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ef269053ec96091cf896aa9cd8f892727f611386..de6953ff44f80dc08c7286f9922d35019068ab64 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 af8c05eff31e171876e71b43732d81ef36362f42..ab9098ab074d71df61a7da62ff1ed96f279613ce 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f24a6ab021b5f506e451e75d1ffa93db3b517fe2..42200afb58c0088f9096bbd8426f689ffecc0a83 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5904d4ec4a0c05d5a306afafbcbac74e42bfaedd..210f805d8a5a5be13108956da65c1f5f37cc3367 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 25b98f6245d1b4c5e08e19eeec2a7e5a140c2d66..f9c8e7ae3d9399e786f2a13f5202732f92996445 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <script> 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 cb2387ae562deb6c92d87965122d572dfdba2d6f..a771230a7091c55ce745c7d80af9082baffbe500 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 1033ad3e4a34a1fe565919725bd1f8db1b30ff22..2a010001630b0a36cd12ede15b554c581f2612f8 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3e5af8fa065e160e3726209f7d28e02c2cbe9a62..e5079a0d1768f00726aaf64cffdace7ea34a564b 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3c382dbad06637bf02d84e333f7b2df26e9fbe3d..5d159e46435decd0299e4b72c9595678772b10f9 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9bc1cd008b3b6d48243a259c032461e6998d10be..4e2f2f9e8c1b19ed50b13baf4857738166ec95d7 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 974bdfbed6b7338a7c2c7588ff6e6d65d872279d..d120de6bd696d518dcf83e5e8c77d8f43e68f363 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2a88c3009c09afa3f1d446271f12a39d51dee36b..4de96e3259293ee7c42eaf2c7b4c4c80dd045586 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 53026fd396af06eefda3cd3f2b672588ad36e184..5dbd088dcbc61cc8cd1d46a8aa85786aeb656719 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ac75338c15749f8197b0d8b973210b7fccc7647c..d486a300155b208396b9b8faad0855e273ce9fa6 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e3d9b46ec4c6f525d1ea072a3e14f15b2363f796..afa6d5cb57e872bfc9003d184e44cad7f36b58bb 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9abbec255c5105094831896552580ce9aa350f2e..c51ca7f6aa9e5f8bb21d1e1d3a2a67ea0152e7be 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3ae73372f4ec1e0a71b4c360c4f1f43437783ccc..2dcd3cc07a5c189f0ecdab1c922f3ee2500457e3 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4062dfd9bc6575e6752abe19472d09e982d73462..69eb4fdbcae41f31904d3ee2a63eaf9cb479ba78 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 bf21c4ab6d63a5a09cc9b30575397231eea9df8f..d7fb7cb3a2ce591a072ea2bd688414d55824bd8a 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** @var \Magento\Catalog\Block\Adminhtml\Product\Edit\Js $this */ ?> <script> 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 3d4710937046c3c603fc4cdb6072df44069699f2..fcedc9d106ccdd727e9c69952ca4c82c3845e9a0 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 be203cb6c31c4d39e040ff82d79d3378856ed0d0..fbdc4f2d9e4192c6a9726599a0b49bd0e5580ddf 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2ba5ae20a405296be23d182cce406abd11b1615f..cb5e7d11f6f382e8de4c6aeafb75fff7f3d3ecf6 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <script> 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 b96311cbabe05220cd2772f8c67e0066f6691a71..07dfbadb716e468a50d182d22a9c8800ef988f25 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 0c2a267f803219989634ee6951cfe4c4dad007d6..6b649604853308536bf83bb6b4dca541613b002e 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 3fa1e452402a5a16205fa032090e7eae1edfc1cb..ba1bf3a1a538cce1643b4ac3a9f43de64622ef86 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 bc0c5193493570a35f9629c3bde497f8cc8c5c7c..c481ee1b9b37eb32fd4eb339e965f48fde9da35f 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 b3482f3df77d03259ba735d4fced86c066c6195f..f7f2853e35710a42a40ada8c576fc228c2239d00 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 041f9ba8afb2ffafa18713d1b0d71db31978cdc5..8c509c4d454fcf0009414aa94dc9eb5b20027ccc 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 088d6b80bd274e3bee17d4f24a34e483b6551c8b..2a5e7c87bfe93778adcb78188b34638ee11c7230 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5529085b233e52d9823aa336b2df72014eebb409..833e4fe93c0166fa914c2cd6911882b5a6871119 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 7e64dab1aef2e5ba55ce65766036e2a7a6ab12dc..4a8a8c3e57d7dcaaf37773cbc06e46a947cc5eb3 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 0cac6a56853ea30428f87b8634181e1e6da62bcb..f9b9985913776e8704fc708bf4cde0b8feb40916 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/category/cms.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/category/cms.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 0dad008a4590b6b71e8876d6e45cee192b6ad293..256152bfcacd294368cff88893c92866ecbbf38f 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/category/description.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/category/description.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2df51bf5bc1381a64a12af9429070fa4c5310f09..c029eb807290cdc34a48bd3f30ae18ae690ed013 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/category/image.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/category/image.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e1cc98bc5fda57a130af65cda225dde05f7a58b8..8bf10b626e34b29f743f314f4f9ebcc354f331c3 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/category/products.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/category/products.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9a3879880526a619f0aadc0d540dfc3916113937..badbca5adf28335046975e9e9fd656ac144b76bd 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/category/rss.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/category/rss.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e9304b73264425dd7fa369454791b365458da2eb..5dfd1a5e49045a21099fa12b882768fb2f5e1bae 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/category/view.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/category/view.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 99be8e37348cec69521e018a61f416324e582a94..43f7e9c30c0126f46204910ee749ef83ad81e815 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/js/components.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 38aae93415f55d5c0273c713608ab7eb0bbbeec8..d5a48a87654b9db0f080a4c003148409a184371a 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/navigation/left.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/navigation/left.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 d9409740110031b8f7e34aec6e46c7a67736b5d8..1ff2d438f29d6eb79457d005baed9f746950c278 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a4a5beb5f3c6cf0ed53aab9a819031356a791216..c5dec7a2cb076077d54b52be47551c2cd1737f84 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e52fbf5ee1726cf6b6c35095d620ac4600cd7ea0..7a28c80facac7cb2b3c3c7a57a4f6891f919cae4 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 03d5f644a9b218c909130cb236c610af0d7ed671..e1fa094fbe735eb6c337396e9f68689796210bb2 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/gallery.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/gallery.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3e5ba55c32dfd575a8088c29e1a67ec9d68a2d40..224631a20f29efa6eee73130b36bfd8e6cea789a 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c3a1b0a7e0c941bad6486e05bfff93880dec4c70..7cfb02aae3ba5835f4fe2a82163f388920dca8ae 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 73b69a68947ef3e11daf0a68c741660cbe917716..d805e221cd9299ed944a08ea8287f1b735dbf4d0 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 7f078a5b29cf0260f56cf02d0f8fa89dde426da8..696ed2586b3ecbaf79ed5e45484097152b393abc 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 7b3c5f75b5f6549886cdfa22cd862bc7b49ea9ee..b5246811e8ee890280c4e82e3fef6b7449861575 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 fb967647360e0b863e0de2b73c43bc0566ae4202..1553857c6513d151b27f07d499019c41ff63273a 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9a12250d270d2b52266298422fde390c78c5d932..85ffaec51d7b0dcca393cd6b7f56a5cc8c664b51 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5a8691fd3950598e14dff434fc07058fe669a4dd..0118f002833a7d5d8c07e25d8babd5e159ebad22 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6e5011258cdeaf2e9724b4cf92583a7a360758ed..c7d848e17489a079a6021cc124a1ca76364e7095 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f4fdf56877d0d6dcf25cde8526ded8917146d0b7..81c9e6b827c4d6f400e1eab9d60c60bbaff94d26 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d886aa4075423e5db4d1d22bb3eb70936cedb56f..73c5aeafa13a6726a8135290b9cb73a855961eaf 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 4f0d36a9236e9da7f1f8de20be90592a26bcdae5..e73437f173a79077fa5b0c9cfc55c1c6dd7cbb56 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 3b855b2ee677d4f4c69334559adae5d396e35faf..9922012a2ab10c392bd2edea80979df022e6cda1 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 71878a37107b65e5ed23a8b8fcee47b688e6f290..30dd92080a5d0c1ceb3e36c8a96fe574385bc47e 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 a9551cfd7f33ceb7b39ce50c6d94d1e1d95e7ac6..07c0914ae9b9174afbf89d7c1b26f5aa4afeebab 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 ac0297f0017791e131bf059731a1082a60971a14..f5f6f766cdb629ddbeddbeb95db61b7b2f584b5d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c427f21e33fff8799b6d69701dddf18ebda12b3c..cf0e3ee6d59ec9eb30b1e2292302604a93162e22 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 0f4dae08440f14c729454ec18bdc7a2df6fca913..6105eb5ba0a39cd3687cde11289ebfafc0d93520 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 977708a69e4a449f7b30cae8db477add2be02dc0..8d2451d22f1a43f14d919d4c451f60d83e5493e6 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 afd6124620a13de6931504d14fd63847647fcf6e..a8377bd7096ff473d6223c0ece98c83ae8b4eda1 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8395c1939c6c8a5d854e159c0b0f401e02b6f411..965dba919e604ef9a7703e4ae6ddfb20cc58f6cd 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 75c18e5f7bd72f05654419655cb84019512144f8..39575520822e3e6c782c92213008223f18651220 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 57bdd806d829170ca0ede52f8bc9e68f56674d33..348e97ac91d0283847445735742296cfa5063ce6 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 908751bf439c677a2d7c5a3cd5ad571165046f4d..a861d27a70c8c277e4955b4dcc04d8fc443aa556 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e27ad1a9cb82ad7705808281474e223e83c9028d..1b34e2f11a4a210bd6d5dc7986b7f7f4f6109fbd 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4b5b0d1d52a8dae062ac16088b1be4a29fd36e89..5dc5ea489295d22ed4bfe131f15e44f9dd2eb818 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 734c87fdddabd707bc99d238f20c1d7a1e82b54e..fcd3f06e6c522b0e05fe537ac48d73f5d8878ded 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 98803d333d59441d0a94bdfc25de713d285f9597..ddcdaf2e86c177ea5be197fc6330c858ce7057a4 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 edaeccde7faa1b6507f9f7ebfa39b8d61abe3f45..220ed8a4724804b2288aad7411051e762c17eb9c 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8bdda5c87d9c5db652963201ee4a6a37b320baf8..bc6c4fa55ce385d6e3064b80abb73b4c5257ba5f 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 771ad1ef45c7f6c64da6df141e9a6db272458695..51fb3a3fd8580c2c409a51ce90a353d2bfb9ad77 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3d129802ce419cfd8f14258189421bf5a13b0b20..c806f16ca1b78077baf27d526b5fef883e39852a 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 72215d25438f10d39565613d39a68b33183bd194..1c29c88ac1482747ea99f77bc93d381339db1d06 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/CatalogImportExport/Model/Export/Product.php b/app/code/Magento/CatalogImportExport/Model/Export/Product.php index e4a7f205361bc08cb001ee0c7d2b24e662a52c43..923f303f798ce3a9588ce08d27a86e05baba9c28 100644 --- a/app/code/Magento/CatalogImportExport/Model/Export/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Export/Product.php @@ -9,6 +9,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 { @@ -213,6 +216,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, @@ -759,6 +763,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 dc3c48636420112015560a9029ed2517af657ccc..40abe3cd9757d5d53605cccb6f84291cb42c3dfc 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -3,12 +3,18 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogImportExport\Model\Import; 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 { @@ -525,6 +531,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, @@ -825,6 +832,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) { @@ -893,6 +902,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) { @@ -960,6 +970,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) { @@ -1050,6 +1061,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() { @@ -1279,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() { @@ -1632,6 +1649,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity * * @param array $mediaGalleryData * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _saveMediaGallery(array $mediaGalleryData) { @@ -1916,6 +1934,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 3beb252bf658241c2f03e6420170d34c4cb5cd83..f0e7b75f25d90035d6af10548010708e3a7b7488 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogImportExport\Model\Import\Product; /** @@ -1169,6 +1172,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, @@ -1438,6 +1442,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 8ab80ea553092d7c499d07f432190e924a5f4bc3..c6b445b8ce480da9ae7b29787e81e1570d0baf8d 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Type/AbstractType.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Type/AbstractType.php @@ -123,6 +123,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) { @@ -201,6 +202,7 @@ abstract class AbstractType * * @param string $attrCode * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _isAttributeRequiredCheckNeeded($attrCode) { @@ -213,6 +215,7 @@ abstract class AbstractType * @param array $rowData * @param int $rowNum * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _isParticularAttributesValid(array $rowData, $rowNum) { @@ -247,6 +250,7 @@ abstract class AbstractType * @param int $rowNum * @param bool $isNewProduct Optional * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isRowValid(array $rowData, $rowNum, $isNewProduct = true) { @@ -301,6 +305,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/CatalogImportExport/Model/Indexer/Category/Product/Plugin/Import.php b/app/code/Magento/CatalogImportExport/Model/Indexer/Category/Product/Plugin/Import.php index 3d188c1bde86d1f482026e75241c5b09c037b877..a0e7c5a578a87d4dae9c52f884337934f690ebb5 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 32cc1b827fa195dc45ccc8d16fc10baff11cd897..4033c84be63e539b85b345ef13aec3107d4cd074 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogImportExport\Model\Indexer\Product\Category\Plugin; class Import diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php index f2555d146f71199f6cfb03addfce4a392317874a..72759511123b125c28201447968cb6671367ae4d 100644 --- a/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php +++ b/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php @@ -92,16 +92,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(); @@ -126,6 +129,7 @@ interface StockItemInterface extends ExtensibleDataInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigMaxSaleQty(); @@ -138,6 +142,7 @@ interface StockItemInterface extends ExtensibleDataInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigBackorders(); @@ -150,6 +155,7 @@ interface StockItemInterface extends ExtensibleDataInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigNotifyStockQty(); @@ -162,6 +168,7 @@ interface StockItemInterface extends ExtensibleDataInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigQtyIncrements(); @@ -174,6 +181,7 @@ interface StockItemInterface extends ExtensibleDataInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigEnableQtyInc(); @@ -181,11 +189,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(); @@ -193,6 +203,7 @@ interface StockItemInterface extends ExtensibleDataInterface * Retrieve can Manage Stock * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getManageStock(); @@ -203,6 +214,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 879b438cc0f4100ec6d0ddc7f5962a8d870682f0..5052ea004b256113e1af1bb01a7c4a43b4ca83b0 100644 --- a/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php @@ -69,6 +69,7 @@ interface StockConfigurationInterface * * @param int $storeId * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getEnableQtyIncrements($storeId = null); @@ -99,6 +100,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 e6921ac68ae4b4ae43a073604730c79a9573bb80..e8d111dfa1f352ab469f627cc5c86cd6fbbfb1b7 100644 --- a/app/code/Magento/CatalogInventory/Helper/Stock.php +++ b/app/code/Magento/CatalogInventory/Helper/Stock.php @@ -84,6 +84,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 b72d5e9319e996b0a8c58252b098be3330b97bbb..d4612c3e2e32cac758fc8943d144ba16d89e5b25 100644 --- a/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php +++ b/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php @@ -36,6 +36,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, @@ -113,6 +114,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 990c5db1a2f492ed53b5109286eb3c287dad2983..2d4d0189a63c565b9bca8f97fb3b016e328220b6 100644 --- a/app/code/Magento/CatalogInventory/Model/Configuration.php +++ b/app/code/Magento/CatalogInventory/Model/Configuration.php @@ -255,6 +255,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) { @@ -313,6 +314,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 190ac3fa04b5619a858a7f25a26e8063c0b4a3ab..eb23b47a11b9ddae9e56f70708e5d26857f83016 100644 --- a/app/code/Magento/CatalogInventory/Model/Observer.php +++ b/app/code/Magento/CatalogInventory/Model/Observer.php @@ -16,6 +16,7 @@ use Magento\Quote\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 e05293b32374ab927bc51a401b0215b1f824b6a4..1af08b5f1a1f4bd665caa1ddf7d3fd896d29aca0 100644 --- a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php +++ b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php @@ -57,6 +57,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 3503260a1b0ee2802abc1514ecdcbb6352de59e0..a4f21f6336a6d7520bfd39836eb39da46255a3dd 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 @@ -50,6 +50,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 a7396a044f43b1089c23314a92007167c2fcf98a..6be23ba43302afed63fa6a4b9f5744b811af9602 100644 --- a/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/DefaultStock.php +++ b/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/DefaultStock.php @@ -132,6 +132,7 @@ class DefaultStock extends \Magento\Catalog\Model\Resource\Product\Indexer\Abstr * Check product type is composite * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsComposite() { @@ -157,6 +158,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) { @@ -279,6 +281,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/CatalogInventory/Model/Resource/Stock/Item/StockItemCriteria.php b/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item/StockItemCriteria.php index afa169fbd1d8655485329e04ea7654bff8e69239..ac004fe8581e9bd556698280073b10d3ab7a3366 100644 --- a/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item/StockItemCriteria.php +++ b/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item/StockItemCriteria.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c8b0b7a673ab6361d0331ca8f85c7a2e9240ef4a..4edc96f803ef3a4148c8d6d1b5655c723c899858 100644 --- a/app/code/Magento/CatalogInventory/Model/Resource/Stock/Status/StockStatusCriteria.php +++ b/app/code/Magento/CatalogInventory/Model/Resource/Stock/Status/StockStatusCriteria.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogInventory\Model\Resource\Stock\Status; use Magento\Framework\Data\AbstractCriteria; diff --git a/app/code/Magento/CatalogInventory/Model/Stock/Item.php b/app/code/Magento/CatalogInventory/Model/Stock/Item.php index f5ab4a65e038a355be3f10f615c3ce7136e7ad45..51a72cdf1d364e30ec16e3930ecd1f607a3bce08 100644 --- a/app/code/Magento/CatalogInventory/Model/Stock/Item.php +++ b/app/code/Magento/CatalogInventory/Model/Stock/Item.php @@ -40,6 +40,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 { @@ -123,6 +124,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, @@ -212,6 +214,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getStockStatusChangedAuto() { @@ -241,6 +244,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsQtyDecimal() { @@ -249,6 +253,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsDecimalDivided() { @@ -267,6 +272,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() { @@ -275,6 +281,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigMinQty() { @@ -298,6 +305,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigMinSaleQty() { @@ -321,6 +329,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigMaxSaleQty() { @@ -345,6 +354,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigNotifyStockQty() { @@ -366,6 +376,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigEnableQtyInc() { @@ -376,6 +387,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface * Retrieve whether Quantity Increments is enabled * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getEnableQtyIncrements() { @@ -389,6 +401,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface * Retrieve whether config for Quantity Increments should be used * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigQtyIncrements() { @@ -419,6 +432,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigBackorders() { @@ -440,6 +454,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 3d6427be091102e84c1d631fa6e3ca7040d3c520..10c1debd7335d941e1ad30af64fc0f047d8a1d3e 100644 --- a/app/code/Magento/CatalogInventory/Model/Stock/StockItemRepository.php +++ b/app/code/Magento/CatalogInventory/Model/Stock/StockItemRepository.php @@ -23,6 +23,7 @@ use Magento\Framework\Stdlib\DateTime\TimezoneInterface; /** * Class StockItemRepository + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class StockItemRepository implements StockItemRepositoryInterface { @@ -87,6 +88,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 98a9d3b2117d67a1f558ab8ae4ae2f7a7268d46c..bc3f7774e874cf186638f0f71f0d4ae7afd0cc60 100644 --- a/app/code/Magento/CatalogInventory/Model/Stock/StockRepository.php +++ b/app/code/Magento/CatalogInventory/Model/Stock/StockRepository.php @@ -18,6 +18,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 ce73c99e09e742245f90ddc72ecfc687fdac88f4..2c1e24a42c024e1f2512b2e89951be3c69d0673c 100644 --- a/app/code/Magento/CatalogInventory/Model/Stock/StockStatusRepository.php +++ b/app/code/Magento/CatalogInventory/Model/Stock/StockStatusRepository.php @@ -16,6 +16,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 b62116b5da040c37bf9d9317617b101afc81d5ed..2eaf9a9bac6c981e023100ed510e9ac9d1d8400d 100644 --- a/app/code/Magento/CatalogInventory/Model/StockIndex.php +++ b/app/code/Magento/CatalogInventory/Model/StockIndex.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogInventory\Model; use Magento\Catalog\Model\Product\Type as ProductType; @@ -75,6 +78,7 @@ class StockIndex implements StockIndexInterface * @param int $productId * @param int $websiteId * @return true + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function rebuild($productId = null, $websiteId = null) { @@ -127,6 +131,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 cb2894d11c4e971699602a19dc31dc969a9e2730..c70c610ae68791f18d189d526807a1252320c67a 100644 --- a/app/code/Magento/CatalogInventory/Model/StockManagement.php +++ b/app/code/Magento/CatalogInventory/Model/StockManagement.php @@ -68,6 +68,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 e1f900a3325305e862396ef697aa08960108b0aa..0a9f1f04d013281a4d64a76a1f364422e14ee603 100644 --- a/app/code/Magento/CatalogInventory/Model/StockRegistryProvider.php +++ b/app/code/Magento/CatalogInventory/Model/StockRegistryProvider.php @@ -19,6 +19,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 38a0f7e4670f8db56f36444c9f3d8caaa6631d44..f5dea5479c4409caf13a442f2d6b534a40aabcc9 100644 --- a/app/code/Magento/CatalogInventory/Model/StockStateProvider.php +++ b/app/code/Magento/CatalogInventory/Model/StockStateProvider.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogInventory\Model; use Magento\Catalog\Model\ProductFactory; @@ -93,6 +96,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) { @@ -320,6 +326,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/CatalogInventory/view/frontend/templates/qtyincrements.phtml b/app/code/Magento/CatalogInventory/view/frontend/templates/qtyincrements.phtml index 9aee089bb0063971fcd09ba5c409e7554ad45adf..5788b0c735b27881c869d1ef13d5e99b3e1f9ecc 100644 --- a/app/code/Magento/CatalogInventory/view/frontend/templates/qtyincrements.phtml +++ b/app/code/Magento/CatalogInventory/view/frontend/templates/qtyincrements.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 3de72c1c0a5438968fd289800d260f92f0d8653a..5b0ba2cde07ca723aabc06dec18dc9b324608f79 100644 --- a/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/composite.phtml +++ b/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/composite.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 4adf062f48740ffea4a2aae3df05bfed83bc4bfe..8fa8f59626bb5b34f8e2b1cb440261eca275c3aa 100644 --- a/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/default.phtml +++ b/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/default.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * @var $this \Magento\CatalogInventory\Block\Stockqty\DefaultStockqty */ 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 d27a0b4127f609275df97aa7ef0fbb139fdc82d4..b29dffb9b1779b6ad89c5b01d45dba2221a32eb3 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 @@ -53,6 +53,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 0109c1690e2f6e7c96d6e3601f299cec1bb643a6..b22840b7f547f4e49ccb6ad96549a442f9933516 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 @@ -106,6 +106,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.php b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog.php index 0a59763eabf4c8c1308ef61e4dc9e4105a238163..3b20dec460b319b8386ec39fde6ce99298870cfc 100644 --- a/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog.php +++ b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Backend Catalog Price Rules controller * 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 7c3637a402105980ce45a94e39efd2c9c4b90e2f..1a7ae10ca4f35cbce4754ef3a215f41f11c300b2 100644 --- a/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog/Save.php +++ b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog/Save.php @@ -12,6 +12,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 9309727f7eb7bb0ecf7b740908cb0cfe616c9b45..5812b16b0832d1b03d53041e0442d4dc28076b68 100644 --- a/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php +++ b/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php @@ -12,6 +12,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; @@ -82,6 +85,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, @@ -210,6 +214,7 @@ class IndexBuilder * @param Product $product * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function applyRule(Rule $rule, $product) { @@ -318,6 +323,8 @@ class IndexBuilder /** * @param Rule $rule * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function updateRuleProductData(Rule $rule) { @@ -400,6 +407,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 9f4913d23527ea2486ec029c8983d5945487eac6..887b60b9c8a2e5426eee596422197fb29c027dff 100644 --- a/app/code/Magento/CatalogRule/Model/Observer.php +++ b/app/code/Magento/CatalogRule/Model/Observer.php @@ -22,6 +22,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 e3b9617bdfe4a09b20449029bd3ce240986e741e..330c01f9680b2f1ba912b556e863563ecd0204e3 100644 --- a/app/code/Magento/CatalogRule/Model/Resource/Rule.php +++ b/app/code/Magento/CatalogRule/Model/Resource/Rule.php @@ -15,6 +15,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 { /** @@ -100,6 +103,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 77cd01db84d77960b5c2eb8193280461b8ca06a5..1228ac74d24cb34975ecd832a25d2f714b1af202 100644 --- a/app/code/Magento/CatalogRule/Model/Rule.php +++ b/app/code/Magento/CatalogRule/Model/Rule.php @@ -37,6 +37,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 { @@ -160,6 +162,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, @@ -341,6 +344,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/CatalogRule/Plugin/Model/Product/Action.php b/app/code/Magento/CatalogRule/Plugin/Model/Product/Action.php index 8824a7be8323431c0d2f40fe196f5823338cafac..115255dcc9a2867411ede46a94d78016d9efc47e 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/CatalogRule/view/adminhtml/templates/promo/fieldset.phtml b/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/fieldset.phtml index 5da1c6a5147144abb5373c7f043330ff9dabc314..7b0afb2d79f427bb841d9b2c7a048bdd41448a6c 100644 --- a/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/fieldset.phtml +++ b/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/fieldset.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 80a5f45c6d3d34b022e2778b94bf4950ce7d9ab0..ea0eb2cbfacb83b331d9f4f2131151efa7adaa59 100644 --- a/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/form.phtml +++ b/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/form.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <div class="entry-edit rule-tree"> <?php echo $this->getFormHtml() ?> 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 7fa83928ab995936e482379fae8efe44086e6035..8d528613e7951585390c2c374291d1441af41508 100644 --- a/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Aggregation/DataProvider.php +++ b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Aggregation/DataProvider.php @@ -16,6 +16,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 c56bde7b55e211abea8bdf12b68dcf0f12ba514d..341783fa0dcd6b1a71ec600f8edd392e0ccccc6b 100644 --- a/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Dynamic/DataProvider.php +++ b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Dynamic/DataProvider.php @@ -17,6 +17,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 14384ca630fe5e7f4aa3cce6c0dcf829f41a7abd..16fea125bdaf16b3f41197c88b812345414a5f40 100644 --- a/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php +++ b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php @@ -63,6 +63,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 7d9f0c6f69c9202277ab4af53783c490f7c52d35..61db41611533312086057ebd886403237c14123f 100644 --- a/app/code/Magento/CatalogSearch/Model/Advanced.php +++ b/app/code/Magento/CatalogSearch/Model/Advanced.php @@ -42,6 +42,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 { @@ -121,6 +122,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, @@ -156,6 +158,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) { @@ -284,6 +288,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 a4acccc995e2fe87e8b94aa74c32f1d940569314..e4f6fea57b08b1ef8befff137a864eca3aa6cebd 100644 --- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php @@ -7,6 +7,10 @@ namespace Magento\CatalogSearch\Model\Indexer\Fulltext\Action; use Magento\Framework\Pricing\PriceCurrencyInterface; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Full { /** @@ -155,6 +159,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, @@ -259,6 +264,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) { @@ -637,6 +644,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 c489fccae2c895c899bb1566d3fa005b46c440cf..9061a5755b2dfecc1f3e1bcde92291acf6f097a8 100644 --- a/app/code/Magento/CatalogSearch/Model/Layer/Filter/Decimal.php +++ b/app/code/Magento/CatalogSearch/Model/Layer/Filter/Decimal.php @@ -89,6 +89,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 44f01e3f491d5f1c2e8d6134b27fc472a40e0dc9..e3a419bbe47de61b5a7e3bce999dfe57df4df931 100644 --- a/app/code/Magento/CatalogSearch/Model/Layer/Filter/Price.php +++ b/app/code/Magento/CatalogSearch/Model/Layer/Filter/Price.php @@ -54,6 +54,8 @@ 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) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct( \Magento\Catalog\Model\Layer\Filter\ItemFactory $filterItemFactory, @@ -107,6 +109,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 bd841d931afe201c7e962ab30ca71aa2ac49edc3..2cbb9e51f972ca4665d6e177701054306b6c07a4 100644 --- a/app/code/Magento/CatalogSearch/Model/Resource/Advanced.php +++ b/app/code/Magento/CatalogSearch/Model/Resource/Advanced.php @@ -85,6 +85,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) { @@ -122,6 +123,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) { @@ -166,6 +168,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 16a6f822c818489698f4b9ee08c019fcfa6402c7..32c9cc320860266a2cc60650ba42fc4fd54052bc 100644 --- a/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php +++ b/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php @@ -11,6 +11,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 { @@ -122,6 +123,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 1eeed0d3ee58618325e8632bb398c7ada76ba087..31c0545235348970d43939d2b15e1cd1b8db46d7 100644 --- a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php +++ b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php @@ -11,6 +11,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 04c481e9994038142f3748cfa8d9c47fc7d061e0..331a441f066ea520de824bfb4eebad101978b1be 100644 --- a/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php +++ b/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php @@ -3,12 +3,16 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + 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 { @@ -271,6 +275,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 5d29b15faeeaaf31ffb7b0ba2aa765d74cc02b65..f29fd216af3e0fbf9921511fd7f7df6aaadc3197 100644 --- a/app/code/Magento/CatalogSearch/Model/Search/RequestGenerator.php +++ b/app/code/Magento/CatalogSearch/Model/Search/RequestGenerator.php @@ -136,6 +136,7 @@ class RequestGenerator * Generate advanced search request * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ private function generateAdvancedSearchRequest() { 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 225c4eb492bbafc291f12e9b4dff3e10096aa400..6de92ac5cc8382274531082e3fdc863e54e9b68e 100644 --- a/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/form.phtml +++ b/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/form.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c43f81778491217d51fc1598771cf69a87352646..d360f98e153a37a0753eaa126bc1a272a5d83402 100644 --- a/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/link.phtml +++ b/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/link.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d2aea7416e14ca1f1e9d2130de905700ce5d2c4a..2341f5bd6d7a8370723df3e4f96ca5aeb3cc8efa 100644 --- a/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/result.phtml +++ b/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/result.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5a090e8e3ee9e8541f35085885e8d5895e824e9c..880d62d27da246913736a9ab188cec8fec538b57 100644 --- a/app/code/Magento/CatalogSearch/view/frontend/templates/result.phtml +++ b/app/code/Magento/CatalogSearch/view/frontend/templates/result.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 20dad46dbf40dfeeadc9bfe951903450e90efa37..cc89420d21afb1d570004658abc9f4bd88504fa3 100644 --- a/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php +++ b/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php @@ -3,11 +3,15 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + 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 { @@ -147,6 +151,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 b6912210f11b6fe11f4fead78cff84ab27cbdea3..19da2e1702c3f1147df2fbc5b9a0c8872887b073 100644 --- a/app/code/Magento/CatalogWidget/Model/Rule/Condition/Product.php +++ b/app/code/Magento/CatalogWidget/Model/Rule/Condition/Product.php @@ -43,6 +43,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/CatalogWidget/view/adminhtml/templates/product/widget/conditions.phtml b/app/code/Magento/CatalogWidget/view/adminhtml/templates/product/widget/conditions.phtml index b55316c71000d128b9efd096053b91ecd35f9990..d3581d73080401d964b1519aea5a2767d9d680f8 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f081e7916356f1f5cbb868ec7f79545df53ecc2f..cf61d31a1ac0043fada9aaca4da132f0766990b9 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Centinel/Model/Config.php b/app/code/Magento/Centinel/Model/Config.php index c252afeec2d66cacf8147bb582ba94f8b352c4db..81d187f3ed2ed1abd52e349b4bf9c00fd5ffe19d 100644 --- a/app/code/Magento/Centinel/Model/Config.php +++ b/app/code/Magento/Centinel/Model/Config.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Config centinel model */ @@ -117,6 +119,7 @@ class Config * Return flag - is centinel mode test * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsTestMode() { @@ -138,6 +141,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 ad0a82a0ef69cb2c169802124492541b9113e0aa..5973fc76b5d7512fe77d4d002dcba53d7b52ee84 100644 --- a/app/code/Magento/Centinel/Model/Service.php +++ b/app/code/Magento/Centinel/Model/Service.php @@ -142,6 +142,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 b0e4f25a357277d40fe27ded4512b4b70bc89579..f42a2f8c0535a5fa4d93de70627478fe98beafff 100644 --- a/app/code/Magento/Centinel/Model/State/Mastercard.php +++ b/app/code/Magento/Centinel/Model/State/Mastercard.php @@ -26,6 +26,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() { @@ -133,6 +135,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 6d0d181642488ee48b8161f6fcecae25249c45b3..6c1436780913eecf823849a63e6bf2d31f027501 100644 --- a/app/code/Magento/Centinel/Model/State/Visa.php +++ b/app/code/Magento/Centinel/Model/State/Visa.php @@ -26,6 +26,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() { @@ -152,6 +155,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/Centinel/view/adminhtml/templates/authentication/complete.phtml b/app/code/Magento/Centinel/view/adminhtml/templates/authentication/complete.phtml index bebcb7a8fcd6dc2b18b657af53cf7fa0e9d05d0d..b572ff3ef4f86ada8e67cf316e35c6849535ac12 100644 --- a/app/code/Magento/Centinel/view/adminhtml/templates/authentication/complete.phtml +++ b/app/code/Magento/Centinel/view/adminhtml/templates/authentication/complete.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 1c38f1b50cda79847e741bb585623e678a1d5bc7..7d9d4a660c263b442a15c82c997a819af88d7df2 100644 --- a/app/code/Magento/Centinel/view/adminhtml/templates/validation/form.phtml +++ b/app/code/Magento/Centinel/view/adminhtml/templates/validation/form.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f9d7d2435cc4d07b6d0581c755368476d66276d9..73e180528def43ef10d7d3ad4b75b98795a37902 100644 --- a/app/code/Magento/Centinel/view/frontend/templates/authentication.phtml +++ b/app/code/Magento/Centinel/view/frontend/templates/authentication.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b340a88ba1aa4be09cbf17ae31016edc30a37e16..3134ce45fc339a52719f06f961add246dab256a9 100644 --- a/app/code/Magento/Centinel/view/frontend/templates/authentication/complete.phtml +++ b/app/code/Magento/Centinel/view/frontend/templates/authentication/complete.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 524f227731d75878b9882e4ec803987eb47f35c3..da30f623ad03056b4d822eda3cb35bfe20c5b3c5 100644 --- a/app/code/Magento/Centinel/view/frontend/templates/logo.phtml +++ b/app/code/Magento/Centinel/view/frontend/templates/logo.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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.php b/app/code/Magento/Checkout/Block/Cart.php index 264a3e9cbee2c8dc8500a1fd0d8229815b4d3c9c..6e406dae410fc3f9ce9153bc892039d8b39c77bc 100644 --- a/app/code/Magento/Checkout/Block/Cart.php +++ b/app/code/Magento/Checkout/Block/Cart.php @@ -67,6 +67,7 @@ class Cart extends \Magento\Checkout\Block\Cart\AbstractCart * prepare cart items URLs * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function prepareItemUrls() { @@ -164,6 +165,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 52470577554de2070fa485b6f9f1f08f3bfb1114..eef597d4fb1dcbfd234c9c929a1e5cf75c892bd7 100644 --- a/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php +++ b/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Block\Cart\Item; use Magento\Framework\Pricing\PriceCurrencyInterface; @@ -16,6 +19,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 001ddc248292eae0cac92e0b4ee5c2d5e06a6ccc..27f72fb347f391cd41e74da27eb83713e46abd1a 100644 --- a/app/code/Magento/Checkout/Block/Cart/Shipping.php +++ b/app/code/Magento/Checkout/Block/Cart/Shipping.php @@ -196,6 +196,7 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart * Show City in Shipping Estimation * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCityActive() { @@ -206,6 +207,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 32e88ac84006876ef7645cdc56dab462d957903b..a811d6069b6ffe4a1f7469064bb79a7581fe8f87 100644 --- a/app/code/Magento/Checkout/Block/Cart/Sidebar.php +++ b/app/code/Magento/Checkout/Block/Cart/Sidebar.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Block\Cart; use Magento\Framework\View\Block\IdentityInterface; @@ -159,6 +162,7 @@ class Sidebar extends AbstractCart implements IdentityInterface * Get one page checkout page url * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCheckoutUrl() { @@ -169,6 +173,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/Cart/Sidebar/Totals.php b/app/code/Magento/Checkout/Block/Cart/Sidebar/Totals.php index 90535c979f0b8cb6789fee8c293703a9b9086494..7e3325d7dc9de6b2af54bf31c7e4ccdc877586a7 100644 --- a/app/code/Magento/Checkout/Block/Cart/Sidebar/Totals.php +++ b/app/code/Magento/Checkout/Block/Cart/Sidebar/Totals.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Block\Cart\Sidebar; use Magento\Checkout\Block\Cart\AbstractCart; diff --git a/app/code/Magento/Checkout/Block/Onepage.php b/app/code/Magento/Checkout/Block/Onepage.php index 56adf62ef16d076c65df831d3ad26f0e8abe247f..04aaf4b495b313fef5c9502b82adeede8c7281d2 100644 --- a/app/code/Magento/Checkout/Block/Onepage.php +++ b/app/code/Magento/Checkout/Block/Onepage.php @@ -26,6 +26,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 9fd1608922ec640ec0e63887aba2f54db59d2efb..941b0425c66f41988d20bd0161fd6706968a2ff6 100644 --- a/app/code/Magento/Checkout/Block/Onepage/AbstractOnepage.php +++ b/app/code/Magento/Checkout/Block/Onepage/AbstractOnepage.php @@ -14,6 +14,7 @@ use Magento\Quote\Model\Quote; /** * One page common functionality block + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractOnepage extends \Magento\Framework\View\Element\Template { @@ -100,6 +101,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 fbbbb36a2d16d7bf5b99a3e17b5c657fbcad9b19..13730ef9d302e178f64e8932785230af6897b3a0 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Billing.php +++ b/app/code/Magento/Checkout/Block/Onepage/Billing.php @@ -10,6 +10,7 @@ use Magento\Customer\Model\Address\Config as AddressConfig; /** * One page checkout status + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Billing extends \Magento\Checkout\Block\Onepage\AbstractOnepage { @@ -46,6 +47,7 @@ class Billing extends \Magento\Checkout\Block\Onepage\AbstractOnepage * @param \Magento\Customer\Model\Address\Mapper $addressMapper * @param \Magento\Quote\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/Failure.php b/app/code/Magento/Checkout/Block/Onepage/Failure.php index a1dd3b59f7be89f2cc87de134ded04b76fc36b25..9d9b37b668bc052b71eb4059a76b4274a4452769 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Failure.php +++ b/app/code/Magento/Checkout/Block/Onepage/Failure.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Block\Onepage; class Failure extends \Magento\Framework\View\Element\Template diff --git a/app/code/Magento/Checkout/Block/Onepage/Login.php b/app/code/Magento/Checkout/Block/Onepage/Login.php index 7dbcee2cbecc502a33726874369a2116249afe28..1d37f5d8b7d095ad516f6539ca47d112bf87fe6a 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Login.php +++ b/app/code/Magento/Checkout/Block/Onepage/Login.php @@ -11,6 +11,7 @@ use Magento\Framework\Message\Collection; /** * One page checkout status + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Login extends AbstractOnepage { @@ -54,6 +55,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/Progress.php b/app/code/Magento/Checkout/Block/Onepage/Progress.php index c4500610d03d34e2ec6bf75cd422faf2e69fb78d..81426da154a8ddaec3bd35546653bed4d502b36f 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Progress.php +++ b/app/code/Magento/Checkout/Block/Onepage/Progress.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Block\Onepage; use Magento\Quote\Model\Quote\Address; diff --git a/app/code/Magento/Checkout/Block/Onepage/Shipping.php b/app/code/Magento/Checkout/Block/Onepage/Shipping.php index 24e47b6c0af92a01e13fac0c4f69d88d39fc949b..b17503ac8ab40b8771829681f0c0836e983755cc 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Shipping.php +++ b/app/code/Magento/Checkout/Block/Onepage/Shipping.php @@ -10,6 +10,7 @@ use Magento\Customer\Model\Address\Config as AddressConfig; /** * One page checkout status + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Shipping extends \Magento\Checkout\Block\Onepage\AbstractOnepage { @@ -39,6 +40,7 @@ class Shipping extends \Magento\Checkout\Block\Onepage\AbstractOnepage * @param \Magento\Customer\Model\Address\Mapper $addressMapper * @param \Magento\Quote\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 ddf87217ce3277140a24b420ca3eb5ed8f63c35d..679f00970c0e2cef87cbfb4004372d6103ec6cc3 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Shipping/Method/Available.php +++ b/app/code/Magento/Checkout/Block/Onepage/Shipping/Method/Available.php @@ -11,6 +11,7 @@ use Magento\Quote\Model\Quote\Address; /** * One page checkout status + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Available extends \Magento\Checkout\Block\Onepage\AbstractOnepage { @@ -37,6 +38,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/Controller/Cart/Add.php b/app/code/Magento/Checkout/Controller/Cart/Add.php index 1bbf5935c112480bc56a9aec82e9b58d2893644d..dc61e5350b9d5e8d3d9d8f18a0ef40a3993a490f 100644 --- a/app/code/Magento/Checkout/Controller/Cart/Add.php +++ b/app/code/Magento/Checkout/Controller/Cart/Add.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Controller\Cart; use Magento\Catalog\Api\ProductRepositoryInterface; @@ -62,6 +65,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/Configure.php b/app/code/Magento/Checkout/Controller/Cart/Configure.php index 1a0fc1f3148f350051b14497ac9dd8fbec9daf99..0c09470858bd3bbf929fc9a5667b64a497bb1a57 100644 --- a/app/code/Magento/Checkout/Controller/Cart/Configure.php +++ b/app/code/Magento/Checkout/Controller/Cart/Configure.php @@ -44,18 +44,19 @@ class Configure extends \Magento\Checkout\Controller\Cart { // Extract item and product to configure $id = (int)$this->getRequest()->getParam('id'); + $productId = (int)$this->getRequest()->getParam('product_id'); $quoteItem = null; if ($id) { $quoteItem = $this->cart->getQuote()->getItemById($id); } - if (!$quoteItem) { - $this->messageManager->addError(__("We can't find the quote item.")); - $this->_redirect('checkout/cart'); - return; - } - try { + if (!$quoteItem || $productId != $quoteItem->getProduct()->getId()) { + $this->messageManager->addError(__("We can't find the quote item.")); + $this->_redirect('checkout/cart'); + return; + } + $params = new \Magento\Framework\Object(); $params->setCategoryId(false); $params->setConfigureMode(true); diff --git a/app/code/Magento/Checkout/Controller/Cart/CouponPost.php b/app/code/Magento/Checkout/Controller/Cart/CouponPost.php index 5650f0cfbf62dcde583c5aa8752e325f5f56857b..0cf8613f7b2ea9bb98558dbfa3a10f4a14314a42 100644 --- a/app/code/Magento/Checkout/Controller/Cart/CouponPost.php +++ b/app/code/Magento/Checkout/Controller/Cart/CouponPost.php @@ -50,6 +50,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/Index.php b/app/code/Magento/Checkout/Controller/Cart/Index.php index cd0bb023dcaab629d303f7366b492e10be72d7df..144ae3fdeaa81fd34a88381df3a21974b3d7527e 100644 --- a/app/code/Magento/Checkout/Controller/Cart/Index.php +++ b/app/code/Magento/Checkout/Controller/Cart/Index.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Controller\Cart; class Index extends \Magento\Checkout\Controller\Cart @@ -15,6 +18,7 @@ class Index extends \Magento\Checkout\Controller\Cart */ public function execute() { + $this->_eventManager->dispatch('collect_totals_failed_items'); if ($this->cart->getQuote()->getItemsCount()) { $this->cart->init(); $this->cart->save(); diff --git a/app/code/Magento/Checkout/Controller/Cart/UpdateItemOptions.php b/app/code/Magento/Checkout/Controller/Cart/UpdateItemOptions.php index 87d618c17e353a6db23a6b5e9c13785f88131dd3..433300a78fda6cf8b71a95137f4b9b4756e9faa9 100644 --- a/app/code/Magento/Checkout/Controller/Cart/UpdateItemOptions.php +++ b/app/code/Magento/Checkout/Controller/Cart/UpdateItemOptions.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Controller\Cart; class UpdateItemOptions extends \Magento\Checkout\Controller\Cart @@ -12,6 +15,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/Cart/UpdatePost.php b/app/code/Magento/Checkout/Controller/Cart/UpdatePost.php index 7acd228d0f973ad444eaaf70d708716c4f98511f..094541435b0c20f1bc48585b497dbcf408c21d40 100644 --- a/app/code/Magento/Checkout/Controller/Cart/UpdatePost.php +++ b/app/code/Magento/Checkout/Controller/Cart/UpdatePost.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Controller\Cart; class UpdatePost extends \Magento\Checkout\Controller\Cart diff --git a/app/code/Magento/Checkout/Controller/Onepage.php b/app/code/Magento/Checkout/Controller/Onepage.php index 80dd6750cfe45a62dec44ea023e5a1cd654767e4..0cd64fb99023f9e27bcfc0a36de69364d20b7dc7 100644 --- a/app/code/Magento/Checkout/Controller/Onepage.php +++ b/app/code/Magento/Checkout/Controller/Onepage.php @@ -10,6 +10,9 @@ use Magento\Customer\Api\CustomerRepositoryInterface; use Magento\Framework\App\Action\NotFoundException; use Magento\Framework\App\RequestInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Onepage extends Action { /** @@ -69,6 +72,7 @@ class Onepage extends Action * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\View\LayoutFactory $layoutFactory * @param \Magento\Quote\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 bb7f400730195cdad1e6c79d8fb8ae74f1efbe3d..dc5032ca4cde14b6ec9b0d88cea1c98fccf660e9 100644 --- a/app/code/Magento/Checkout/Controller/Onepage/SaveOrder.php +++ b/app/code/Magento/Checkout/Controller/Onepage/SaveOrder.php @@ -12,6 +12,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 cda4c37a74be25cda70dedef86c7d15a7bf877e2..d401a79fb575f41952a1be60f3182f2e0d6015ac 100644 --- a/app/code/Magento/Checkout/Controller/Onepage/SavePayment.php +++ b/app/code/Magento/Checkout/Controller/Onepage/SavePayment.php @@ -24,6 +24,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 f6579584e8b3e15104baa37a73f88b7677b9fd10..54705d9d4d1dadf3d3a0359e9c3a88d698d8eeab 100644 --- a/app/code/Magento/Checkout/Helper/Cart.php +++ b/app/code/Magento/Checkout/Helper/Cart.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Helper; /** @@ -191,6 +194,7 @@ class Cart extends \Magento\Core\Helper\Url * Check quote for virtual products only * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsVirtualQuote() { @@ -202,6 +206,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 a19e334b56a0e2b2df8a811ecc4468880ada2fdb..145bf276e9c7bd8a976022fd414a0634146d1980 100644 --- a/app/code/Magento/Checkout/Helper/Data.php +++ b/app/code/Magento/Checkout/Helper/Data.php @@ -13,6 +13,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 { @@ -207,6 +208,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 4b24de9095d46f425b4408976aca9d43fec2c93f..bc7bbb9af1298229279e1a9f45ccc58106fc2ec2 100644 --- a/app/code/Magento/Checkout/Model/Cart.php +++ b/app/code/Magento/Checkout/Model/Cart.php @@ -13,6 +13,7 @@ use Magento\Framework\Object; /** * Shopping cart model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Cart extends Object implements CartInterface { @@ -102,6 +103,7 @@ class Cart extends Object implements CartInterface * @param \Magento\Quote\Model\QuoteRepository $quoteRepository * @param ProductRepositoryInterface $productRepository * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Event\ManagerInterface $eventManager, @@ -330,6 +332,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) { @@ -473,6 +476,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) { @@ -657,6 +662,7 @@ class Cart extends Object implements CartInterface * @throws \Magento\Framework\Model\Exception * * @see \Magento\Quote\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 0081c22fecbebe257705975bd51c5267897c17ad..d647592240822cdf1f22f59fdbfee95e3108f905 100644 --- a/app/code/Magento/Checkout/Model/Session.php +++ b/app/code/Magento/Checkout/Model/Session.php @@ -8,6 +8,9 @@ namespace Magento\Checkout\Model; use Magento\Customer\Api\Data\CustomerInterface; use Magento\Quote\Model\Quote; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Session extends \Magento\Framework\Session\SessionManager { /** @@ -94,6 +97,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, @@ -170,6 +174,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 93f7e97ee7acda7bbf509005da525e56ff57122b..c5ee84a6a2e75ab8162f3869c23a92250002b9e6 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 */ @@ -20,6 +22,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 { /** @@ -192,6 +199,8 @@ class Onepage * @param \Magento\Quote\Model\QuoteRepository $quoteRepository * @param \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter * @param \Magento\Quote\Model\QuoteManagement $quoteManagement + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * */ public function __construct( \Magento\Framework\Event\ManagerInterface $eventManager, @@ -298,6 +307,7 @@ class Onepage * Initialize quote state to be valid for one page checkout * * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function initCheckout() { @@ -372,6 +382,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) { @@ -623,6 +636,8 @@ class Onepage * @param array $data * @param int $customerAddressId * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function saveShipping($data, $customerAddressId) { @@ -843,6 +858,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 2b22baf6e955bc4bdba4fb706214c617349dfe1e..e9f453988d0dbf5ec52c3e506803a8860e6c634c 100644 --- a/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php +++ b/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php @@ -15,6 +15,7 @@ use Magento\Quote\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/Cart/WriteService.php b/app/code/Magento/Checkout/Service/V1/Cart/WriteService.php index 27ef7882906ade4d0fdafd7935c2ed9c524025b4..61066236f16fb81a1b7c0254bf3df495e05df53a 100644 --- a/app/code/Magento/Checkout/Service/V1/Cart/WriteService.php +++ b/app/code/Magento/Checkout/Service/V1/Cart/WriteService.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 d40daaec534cde2ebf0789ed76d34dce81af8580..d5cc15d0f206e121bdbe2ca789264c21f4f6107b 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\Data; /** 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 30275de8afa9a10fd1ccf198e98e06b3bbf22aab..0cb9d61bf18b97b914b01f6ec247752a87143ab7 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php @@ -172,6 +172,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 2b0d921bdfa5bfba75a8e2310d5a8ea2e38d82a2..1b821b603db8a1fb4d319745b6f7e53f43e2506b 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php @@ -111,6 +111,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 89de1557babc61fa7685ea0093b67147623ae31a..96327ac3aa9e5a927c40d13c791e22ffba9aeab3 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/CartMapper.php +++ b/app/code/Magento/Checkout/Service/V1/Data/CartMapper.php @@ -10,6 +10,7 @@ use Magento\Quote\Model\Quote; /** * Cart mapper + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class CartMapper { diff --git a/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteService.php b/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteService.php index eff5131710a100f697a58abc88fdf4d2a954ee18..e2a35850f226de32cb953e8a20cdbfde330b4ce4 100644 --- a/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteService.php +++ b/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteService.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8df03a63f104e6b629292c48f399616180c490d4..ff294bd3293007d8fe27698d352cd8205e119253 100644 --- a/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceInterface.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f0a8c56201a91c19e7b8ec53e23f3402ec1c8d32..72ca2acbd5037ee07fcc7c6e7a17263c97da5f11 100644 --- a/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadService.php +++ b/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadService.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 bfccc0f3dc57a859cc42cdfe28a3fad16a9d9b63..4dd75a5550f414afcadb25038c48481e46ad38e7 100644 --- a/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteService.php +++ b/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteService.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 04ecd30162a37aa0ae9533876e54eb4e88f39acd..15c7ae02f6ca71bbb615398d552a076f69b9fe0f 100644 --- a/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceInterface.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\ShippingMethod; /** diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_success.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_success.xml index 22ca2df12cec6add0680d95fcd284acc646ce85f..3fdbfc2c3cabc3be035e98cabd7a2f36cbb42456 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_success.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_success.xml @@ -6,6 +6,9 @@ */ --> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> + <head> + <title>Success Page</title> + </head> <body> <referenceBlock name="page.main.title"> <block class="Magento\Checkout\Block\Onepage\Success" name="checkout.success.print.button" template="button.phtml"/> diff --git a/app/code/Magento/Checkout/view/frontend/templates/button.phtml b/app/code/Magento/Checkout/view/frontend/templates/button.phtml index 172533b37b54483ce21f23d663a1c52f08aa204d..bbd2e27e279d57c0200f1c8e7330a1a6dfe7e2da 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/button.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/button.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ccec59cee49951a9261d3a266a6218ef821ccf4c..82efcb5bda2648a6f193e23485f70fe9edd30cc9 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2487fb279e2c05c2d1101a225ff804ff53b9a43d..affd2de86aacf906580ffd888faa21b0e77ba77f 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/coupon.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/coupon.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 13b2be3fbdaafaebfd35d41a6bb6029fd37e6e64..48741bc8f56778fc0d4b87e2d5b58add2798e31e 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 7874e93c5d6d8911e7c01df82b92fb19360fd973..ec0b669af8705a11c75005ce110f410686239e5b 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 c4b7a54c82f58807d601b8a07cafa9e41728fa44..e65a1f2f65632229fbb608a00ae2e8f41eceb634 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 2313738810bfc539ae1e64017007750be451c610..79d5327513d502f2783dd3257f08108ff291883e 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 e5f2faebb9e73d2ffefd9447fb4233d8aeb01c20..941b87e97655c648ebb34ce03a7da869de9d4636 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/methods.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/methods.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f0d8c92de6566cc9fbf684f6ab8e764ad5a77173..0a7b63a393ac9984e696bf449869ed7c96c2c4e2 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 34f3e59efe3364a38463bb2248e1f1c2b136da42..c3a6bd227d70937139f3d7f596bf34f40d1ec20c 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6a4e282672011eacc0b87e575e1f8e13504b02a3..bda5592a0731f09842514999af4b828c4af0e8f2 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a19936885ea8b3d6ac60801bca96c9669a445816..dd953145c0e584041e75a6ad525d40b0119b1ea1 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 47a9df414edb031316c9cbe220dffc359bde3a12..940fdebb33ba53714a5ec69a89edc0ed6d6fb942 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 99be8e37348cec69521e018a61f416324e582a94..43f7e9c30c0126f46204910ee749ef83ad81e815 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/js/components.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b908011858b4096caedfcc907b6d8aea3a244449..f8e5b4d5aa56d03ebecfef1595d5c79afbbfe9b2 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 b8a5b9499af1710ac14228dae4bb47ee4917c386..1e337503117069f13f65fff41454525a2885d0a0 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/billing.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/billing.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 142b1f6dfde4d3b896ba217c7c5cb5861f31e172..ba797b7b4d8201377ebbfc84b2d56477b6161040 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/failure.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/failure.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9658b24101f08f032f70686fcacb761158ea8ff9..229b2ac050f9057b830b65db84c4a31da077ac59 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/link.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/link.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 21a92194bdcc4708ce77c030ba9160fb7fb6a91c..47d5c7accb7d36ff60c67fd62d01bc4201c3f9c4 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/login.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/login.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 92c18fed651e20175ff8b64e5d7d7dcd92e4aba8..528e5e22fb47129d3e7b6dca7d19990360b355e0 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/payment.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/payment.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2e241cb102064e0851c9b7bfc992d3342392a6d5..a05338be6e1a19ec75524826be37fe0f31f09517 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3871a5166871092f9da56fc432023905bc12517a..3133cf56765da093f7d437246945183eeb7e9c46 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/progress.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/progress.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 49369fbd7b112169aff6e8b8915d94a55812834d..710ac5abb8436f71cf266e8172f1169696ff94e3 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 1e9f98a0ac2c42ffdfc6889bbfe91c2e44625189..feb98db7d786f001e6161a5bb044c889dc28b0f5 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 f21be674673e5700c0c03ee6a3bfe6aa47c28977..3c50f62b146fb263fcaa315aae266105edf10227 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 e096f814934bbf7f51c8686553311e635a7fdf40..a2400474f0bdbefddd9838155ed8e8e760213c66 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 8ce4a3970329de8084fbc16b7c772f1edfd49a6b..051852ec5624eb41ecfe63cf8a75833746137d76 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 bb9eda679db5efc5cbc03f55ab366c4364ff0e35..58a239d6f96f0d13efdc5afaac022abea044f551 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 437385b8d8d5e49bfbe1b616f8dae95b43201020..302f7fe3f8a681c91f8b2a9b04467e0acef9132d 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 fccdcd77dff12446e03625b3b3f22a8fd3a3d4b9..29b0718dacc172e086702c874fb7ae7b2137ace2 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 43aba9aa35a13ea3199d13daf0a47760a350b82c..36e848cc0128c97cc071011b7dcf8c04e01c533c 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 1c2f9bce2421b9cf8462a68d6c5c3728e0bf7890..6d72c8a9a035dc6522f611113b04276f35fd0962 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 565359f24acb4f8804b5a207696e3024757e80ef..a5eb00a22a70f410c5dff2b6b4b95adba242eaf6 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 58922d51b13ae7971d8566f7a58aaf26d669478e..0571c89ce7b74d1da3768920069c002d9eff5d16 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/shipping/price.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/shipping/price.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8169694e953e24fd730b7aaa16fcead965756ed7..dbfd08207420fe057a7814448b3904694d794862 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/success.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/success.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f96e96d87b29a92e836d90a7df4cfd9d01d7facf..1b75bd7f79220b9055b2595670b536a3da1add84 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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/CheckoutAgreements/Block/Adminhtml/Agreement/Edit/Form.php b/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Edit/Form.php index 32858a110220a74960daf27bfd56fef94a9f898f..c6cb28ad448597d4f87b71195f1c761ae5f0169c 100644 --- a/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Edit/Form.php +++ b/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Edit/Form.php @@ -45,6 +45,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 7d81ec090d5d43be2ce99edf67aa6c4771779d42..ccf00e4ef614705798677b4eef5051d72f8ef074 100644 --- a/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Grid.php +++ b/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Grid.php @@ -119,6 +119,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/Block/Agreements.php b/app/code/Magento/CheckoutAgreements/Block/Agreements.php index 802293ddcfc4b03d896b163cf6a74ec359f4f5f6..f43827a6b58201b97f3e4ae9fd89e485093523d3 100644 --- a/app/code/Magento/CheckoutAgreements/Block/Agreements.php +++ b/app/code/Magento/CheckoutAgreements/Block/Agreements.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\CheckoutAgreements\Block; class Agreements extends \Magento\Framework\View\Element\Template diff --git a/app/code/Magento/CheckoutAgreements/Controller/Adminhtml/Agreement/Edit.php b/app/code/Magento/CheckoutAgreements/Controller/Adminhtml/Agreement/Edit.php index a9723bed6b61986172b7f62341bb71e186aad939..01fcef39eaf979376eea60929d7f853fd6d889c8 100644 --- a/app/code/Magento/CheckoutAgreements/Controller/Adminhtml/Agreement/Edit.php +++ b/app/code/Magento/CheckoutAgreements/Controller/Adminhtml/Agreement/Edit.php @@ -10,6 +10,7 @@ class Edit extends \Magento\CheckoutAgreements\Controller\Adminhtml\Agreement { /** * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/CheckoutAgreements/Model/Resource/Agreement.php b/app/code/Magento/CheckoutAgreements/Model/Resource/Agreement.php index 5b28e26a142f898e5866ec210f48fb276a3e1cae..943e6738e9e67f18c320d9e73259f486cc96e1c3 100644 --- a/app/code/Magento/CheckoutAgreements/Model/Resource/Agreement.php +++ b/app/code/Magento/CheckoutAgreements/Model/Resource/Agreement.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e62b3ed73ea8658e4843524b06f4231a54e9470e..163474a2c62d4ed05bf4c195cc89d77644ce496f 100644 --- a/app/code/Magento/CheckoutAgreements/Model/Resource/Agreement/Collection.php +++ b/app/code/Magento/CheckoutAgreements/Model/Resource/Agreement/Collection.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ff5684b6c4537ea10dee9c2cb0e522faca691781..68c68ee8cdfec54083e6b8c97cc56cd218c7fa56 100644 --- a/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadService.php +++ b/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadService.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 41effe8f9898b7246bf7cb470916dfc4d391c11b..783fcc4497b0705d134cf0f711de1225c0300e0a 100644 --- a/app/code/Magento/CheckoutAgreements/view/frontend/templates/agreements.phtml +++ b/app/code/Magento/CheckoutAgreements/view/frontend/templates/agreements.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8d8d89abdbe471867f45fdd15c8bd7b651c895c4..decebb582354c710dec24a614c0076896ca5aeeb 100644 --- a/app/code/Magento/CheckoutAgreements/view/frontend/templates/multishipping_agreements.phtml +++ b/app/code/Magento/CheckoutAgreements/view/frontend/templates/multishipping_agreements.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php /** 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 1c6a982f545b4ea72fca90a1cdbdaee9aee4523c..7bf1236e1ee1313230bfd59dceec7e40f0fcf3a4 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 @@ -37,6 +37,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 966831d68ccf734966270e584db4cd0bf0a41348..ce330ce17a0b4ed1b7a4d2beef587060ab6cf27f 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Page/Grid.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Grid.php @@ -176,6 +176,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/Block/Block.php b/app/code/Magento/Cms/Block/Block.php index 7061c9f42d2355408f23dfc5c144f5d2460b358f..2f8f28e4334fc17c2f112217efbb9aad8c4f3cf0 100644 --- a/app/code/Magento/Cms/Block/Block.php +++ b/app/code/Magento/Cms/Block/Block.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Cms\Block; /** diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Block/Edit.php b/app/code/Magento/Cms/Controller/Adminhtml/Block/Edit.php index 20c6ef8e797691edbca3328165dc24032c32e84f..9214ba6354f13a3ed087dea1c341756af5c10961 100644 --- a/app/code/Magento/Cms/Controller/Adminhtml/Block/Edit.php +++ b/app/code/Magento/Cms/Controller/Adminhtml/Block/Edit.php @@ -12,6 +12,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 4c3a0427bb553bae79e1c316af91104b09ca50c7..1eea746d46d08c5d95692fc9333bd29efd74d1ae 100644 --- a/app/code/Magento/Cms/Controller/Adminhtml/Page/Edit.php +++ b/app/code/Magento/Cms/Controller/Adminhtml/Page/Edit.php @@ -60,6 +60,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 a1f99a751d90682108ed8bfc5cf3415c61096663..9fa1e103882df79132ff5364a5928a6219efb268 100644 --- a/app/code/Magento/Cms/Controller/Index/Index.php +++ b/app/code/Magento/Cms/Controller/Index/Index.php @@ -13,6 +13,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 be765e259f4ad4e547db55a93249824e65baa933..b6ce2979c70d2a0e901bf71b0d814775a3015674 100644 --- a/app/code/Magento/Cms/Helper/Page.php +++ b/app/code/Magento/Cms/Helper/Page.php @@ -93,6 +93,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, @@ -140,6 +141,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 9c554253d2940ddc050be867abcc21cae58779ce..894aa6d629576134cfa51e517905d78aa45aa23c 100644 --- a/app/code/Magento/Cms/Model/Resource/Block.php +++ b/app/code/Magento/Cms/Model/Resource/Block.php @@ -194,6 +194,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 60305493e002f077568558bdc8c28984aae1a179..ffac24c942d62253aed5c41b61564ef26d0fdc3e 100644 --- a/app/code/Magento/Cms/Model/Resource/CmsCriteriaMapper.php +++ b/app/code/Magento/Cms/Model/Resource/CmsCriteriaMapper.php @@ -38,6 +38,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/Resource/Page.php b/app/code/Magento/Cms/Model/Resource/Page.php index d45a2001f65af00168f5cd3ed015fea1e7df114c..4efe1734c056c1177cf69944b27f4cb9934fed51 100644 --- a/app/code/Magento/Cms/Model/Resource/Page.php +++ b/app/code/Magento/Cms/Model/Resource/Page.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Cms\Model\Resource; /** diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Config.php b/app/code/Magento/Cms/Model/Wysiwyg/Config.php index 3c6e755712a05aac54196966e3fb9a70886ccfe0..7fd5b26290dfc090bed06886557bb8919ed68b39 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/Cms/Model/Wysiwyg/Images/Storage.php b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php index 516b6121012b8c9f2af84fd003b60f6998281fb3..18cf095879c3703cb41a91b4cca845760cc9e558 100644 --- a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php +++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php @@ -12,6 +12,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 { @@ -187,6 +189,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/Cms/Model/Wysiwyg/Images/Storage/Collection.php b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage/Collection.php index 8fc88a3e673ff4cc2ad0c3dd44d69cedb9fd61f1..4971fd1f68fcd36c4133f3feee216840d2bde947 100644 --- a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage/Collection.php +++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage/Collection.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a558037a94329b3f9eb4e4000cff93017aa584ea..46847bf5cff2abe633c7f1b55d675599ba6e52f6 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 a22706aef475947f2e0a4508f6b004eb155227b0..e002bfe7d65b873c20bcfc3c9ea8de5a369918af 100644 --- a/app/code/Magento/Cms/view/adminhtml/templates/browser/content.phtml +++ b/app/code/Magento/Cms/view/adminhtml/templates/browser/content.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8e5ced05020d9d7b323d1ef8e788a23f9848ec79..131494d5a3a895a79dfa4ffe60fc2bafb3b241c6 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 484eec24c25213286a17537274306ac1b605a427..c76e6fddfeaefc33f80ca24e001e540fd2222d32 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ca7bb4c901c596e3db5a1ae3291fb4519abbbb98..8102ca5cc857bd791c86fe5fde243fa448902df5 100644 --- a/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml +++ b/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2b709598a31c3ed357c7635f815be03d7484b91c..ea70f5e6d9e5d1e81e3e15cb1b63a6e22816a2cc 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 7d2d1100cfcbdaf99851444fd0cd4f2bb61fd131..fe227c664e5ed03adca52c18f3abfd3d62a8d344 100644 --- a/app/code/Magento/Cms/view/frontend/templates/content.phtml +++ b/app/code/Magento/Cms/view/frontend/templates/content.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e19cdfe72ddfe0fb5da21566f8adbd9381010659..bf71d4807b8257423f0e2b6a0de538cf5d8fcf5b 100644 --- a/app/code/Magento/Cms/view/frontend/templates/meta.phtml +++ b/app/code/Magento/Cms/view/frontend/templates/meta.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php if ($pageData->getPageMetaKeywords()): ?> <meta name="keywords" content="<?php echo $pageData->getPageMetaKeywords() ?>"/> 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 b2d488a12a207f4ab24373070c4ecd1b3c06f52e..946ad7fe76593534fb2ca2bdbc6b76b0ca180c94 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 @@ -11,6 +11,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/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 d567e97297cb2ce033526dcb12026bc88520655b..86aa4e4d7b5566fcd6bb1956122794bbe72484f1 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 @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <script> 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 98048c0295cdb2302025622064dfbc46405f1828..54ca1bb89b6cc3f1540adc1080ae19010fcfe926 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a039419161fae919683a8ac15d7799dfc44b2ef0..3870f9f7cd7d6b59ce684837066383d6ff5c1449 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ec22cc2ead7bc4ba7bae66739618968273e2248d..88919daee9bf51da1ef87a700003988109aa95bd 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 bbae310539adef2c181b9d69b084680f61bf84cf..ff251e507b34cde535878792bb1e5dc2f2feaa22 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e13eb99291c3cf2c29b85e6284ce58859479e832..350278a567e2f0221cad66b60c2049ae84bc2321 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2f82dc3cea8e3994eed31eeac3a92a2314ef9596..8fbec783c9eecf9aceb93ea9e1cb70f800365670 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 e5bee19a9b65fe5ad8813f032ab277b2aea03b27..e152ac03776bc1845dda01ced8b348e22a3bf322 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\ConfigurableProduct\Block\Product\Configurable\AttributeSelector */ ?> <script> 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 99be8e37348cec69521e018a61f416324e582a94..43f7e9c30c0126f46204910ee749ef83ad81e815 100644 --- a/app/code/Magento/ConfigurableProduct/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/ConfigurableProduct/view/frontend/templates/js/components.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e168da87d1f3de2ea6db4220be10efd9628c8cbb..67e7df6afd16a6b4a5c032b797d60b9dc4f8e2d9 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c8d6c3582a439192885e6c47899972f1b93735c1..203018742a85edac48b488daed4a2714e1378692 100644 --- a/app/code/Magento/Contact/view/frontend/templates/form.phtml +++ b/app/code/Magento/Contact/view/frontend/templates/form.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <form class="form contact" action="<?php echo $this->getFormAction(); ?>" diff --git a/app/code/Magento/Core/App/Router/Base.php b/app/code/Magento/Core/App/Router/Base.php index e34fd166b9b986a0d58fdbfd895c1901dc37c3b8..fffca1867cb6eebb51615bf1fcc08c18a288601f 100644 --- a/app/code/Magento/Core/App/Router/Base.php +++ b/app/code/Magento/Core/App/Router/Base.php @@ -9,6 +9,10 @@ namespace Magento\Core\App\Router; use Magento\Framework\App\RequestInterface; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Base implements \Magento\Framework\App\RouterInterface { /** @@ -117,6 +121,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, @@ -254,6 +260,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) { @@ -345,6 +353,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/Asset/Config.php b/app/code/Magento/Core/Model/Asset/Config.php index 2960c751ac258bef1e258348e3203f25ec078289..817dd603a5f8e4ebbe3d4c9d368a4246e1ee4e00 100644 --- a/app/code/Magento/Core/Model/Asset/Config.php +++ b/app/code/Magento/Core/Model/Asset/Config.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 1961a8753289c1f5f4e38f697a2ea2cb24ab9178..540c0b8fb19a01444ea3282943f187f4540d4b0f 100644 --- a/app/code/Magento/Core/Model/File/Storage.php +++ b/app/code/Magento/Core/Model/File/Storage.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\File; use Magento\Framework\App\Filesystem\DirectoryList; @@ -11,6 +14,7 @@ use Magento\Framework\Model\AbstractModel; /** * Class Storage + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Storage extends AbstractModel { @@ -97,6 +101,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, @@ -195,6 +200,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 eebaa64ddd5b23872fc85850f57d50af0406e96f..8770fcf34b68893a59b75f6808f1031a3ec3aa2a 100644 --- a/app/code/Magento/Core/Model/File/Storage/Database.php +++ b/app/code/Magento/Core/Model/File/Storage/Database.php @@ -53,6 +53,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 1e14ed3cf0fa442e9db65498581b140c08ff9b93..74979050fd4b94f7578b61dd18c765debd266f86 100644 --- a/app/code/Magento/Core/Model/File/Storage/Directory/Database.php +++ b/app/code/Magento/Core/Model/File/Storage/Directory/Database.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\File\Storage\Directory; /** @@ -40,6 +43,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 589a72559cc58b9c338c47879a58172e501ec524..0ae3a40daf700d3ed94244039e247d9a13dda86a 100644 --- a/app/code/Magento/Core/Model/File/Storage/File.php +++ b/app/code/Magento/Core/Model/File/Storage/File.php @@ -131,6 +131,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 6a455b13948b76cfa51dbef3044d3c571fd1300a..03887a4f81fdf8c7ecfe77a7226439c4926a3dd7 100644 --- a/app/code/Magento/Core/Model/File/Storage/Flag.php +++ b/app/code/Magento/Core/Model/File/Storage/Flag.php @@ -50,6 +50,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 5381b8af10aee3a76b91b0165b2ed0505bc9689e..1b828a354ec3ef53c4e5bacbc88997225ef666af 100644 --- a/app/code/Magento/Core/Model/File/Validator/AvailablePath.php +++ b/app/code/Magento/Core/Model/File/Validator/AvailablePath.php @@ -191,6 +191,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) { @@ -232,6 +233,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/File/Validator/NotProtectedExtension.php b/app/code/Magento/Core/Model/File/Validator/NotProtectedExtension.php index e74a01f94de2100d82df8edd6675f99842e07e4c..a4e57209398de9e2512063da027d59de197d45ad 100644 --- a/app/code/Magento/Core/Model/File/Validator/NotProtectedExtension.php +++ b/app/code/Magento/Core/Model/File/Validator/NotProtectedExtension.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\File\Validator; /** diff --git a/app/code/Magento/Core/Model/Layout/Merge.php b/app/code/Magento/Core/Model/Layout/Merge.php index 49556843082e4cb3a545176e53086b7ab31903b8..7627c26dcea011b867262a0ec50fd466b0b4b183 100644 --- a/app/code/Magento/Core/Model/Layout/Merge.php +++ b/app/code/Magento/Core/Model/Layout/Merge.php @@ -10,6 +10,8 @@ use Magento\Framework\App\Filesystem\DirectoryList; /** * Layout merge model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Merge implements \Magento\Framework\View\Layout\ProcessorInterface { @@ -169,6 +171,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 f60375aeda72efd0f037469a033b256c5dbf90fe..d7f98a7af4a5dc555d4cc63c8f61706641e9f8c5 100644 --- a/app/code/Magento/Core/Model/Observer.php +++ b/app/code/Magento/Core/Model/Observer.php @@ -57,6 +57,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/Config.php b/app/code/Magento/Core/Model/Resource/Config.php index 0bbc234e6bc9254dc6869c577c0a745161f064c3..b1f4795206d2d0b5841cd33845d0058994b6e6a0 100644 --- a/app/code/Magento/Core/Model/Resource/Config.php +++ b/app/code/Magento/Core/Model/Resource/Config.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 df4bff17d80ce1b1c98f7146c2088c664757c95a..cc46d6be28404776160bcd2bd2f601143882837c 100644 --- a/app/code/Magento/Core/Model/Resource/Design.php +++ b/app/code/Magento/Core/Model/Resource/Design.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\Resource; use Magento\Framework\Stdlib\DateTime; @@ -106,6 +109,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/Resource/Layout/Update.php b/app/code/Magento/Core/Model/Resource/Layout/Update.php index d6dd5b7e001dc93bb9bc88bd465ab648c5e1ce41..00d3e0eff82816fc674d7c1fc3360fb6514b85a6 100644 --- a/app/code/Magento/Core/Model/Resource/Layout/Update.php +++ b/app/code/Magento/Core/Model/Resource/Layout/Update.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 0ed9582d16e438aa1970e7ef7001cb161723f594..89f12a20106ee768f78f1fdf52b1ef81bdb26822 100644 --- a/app/code/Magento/Core/Model/Resource/Variable.php +++ b/app/code/Magento/Core/Model/Resource/Variable.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 fe7d4f5bde5f1de15a2f8f392727d4cb8af928d5..d08a2b358f49346da60a7f7126bca32ba8258947 100644 --- a/app/code/Magento/Core/Model/TemplateEngine/Decorator/DebugHints.php +++ b/app/code/Magento/Core/Model/TemplateEngine/Decorator/DebugHints.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 72aa182d6f9f4fe782966b40f2c569370b395979..ee3a7e22f96c88cf283874599c4e0af3916f4931 100644 --- a/app/code/Magento/Core/Model/TemplateEngine/Plugin/DebugHints.php +++ b/app/code/Magento/Core/Model/TemplateEngine/Plugin/DebugHints.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f08c89fbbadbfeb10a8172920d696d3c4e5d506e..3cabde3cc42c9c2a20a71390a58dfc9cb5a3bc7e 100644 --- a/app/code/Magento/Core/Model/Url/RouteParamsResolver.php +++ b/app/code/Magento/Core/Model/Url/RouteParamsResolver.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Model\Url; class RouteParamsResolver extends \Magento\Framework\Object implements \Magento\Framework\Url\RouteParamsResolverInterface @@ -50,6 +53,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/Core/Model/Variable/Config.php b/app/code/Magento/Core/Model/Variable/Config.php index d6cda985cd31f61c53f321a1bf71fd3c6b069a76..aa4af98d5112832ebcc976e14ca7b7b9296328b3 100644 --- a/app/code/Magento/Core/Model/Variable/Config.php +++ b/app/code/Magento/Core/Model/Variable/Config.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Variable Wysiwyg Plugin Config * diff --git a/app/code/Magento/Core/etc/di.xml b/app/code/Magento/Core/etc/di.xml index cc73a8a5b388c8f7b565c7f114e408f4f851146e..3b6eb72b2b36b6088129f44d1e8a9be0a83e1da4 100644 --- a/app/code/Magento/Core/etc/di.xml +++ b/app/code/Magento/Core/etc/di.xml @@ -14,14 +14,12 @@ <preference for="Magento\Framework\Authorization\PolicyInterface" type="Magento\Framework\Authorization\Policy\DefaultPolicy" /> <preference for="Magento\Framework\Authorization\RoleLocatorInterface" type="Magento\Framework\Authorization\RoleLocator\DefaultRoleLocator" /> <preference for="Magento\Framework\Session\SessionManagerInterface" type="Magento\Framework\Session\Generic" /> - <preference for="Magento\Core\Model\DataService\ConfigInterface" type="Magento\Core\Model\DataService\Config" /> <preference for="Magento\Framework\App\Config\ScopeConfigInterface" type="Magento\Framework\App\Config" /> <preference for="Magento\Framework\App\Config\ReinitableConfigInterface" type="Magento\Framework\App\ReinitableConfig" /> <preference for="Magento\Framework\App\Config\MutableScopeConfigInterface" type="Magento\Framework\App\MutableScopeConfig" /> <preference for="Magento\Framework\App\Config\Storage\WriterInterface" type="Magento\Framework\App\Config\Storage\Writer" /> <preference for="Magento\Framework\View\Design\Theme\FileInterface" type="Magento\Core\Model\Theme\File" /> <preference for="Magento\Framework\Config\ConverterInterface" type="Magento\Framework\Config\Converter\Dom"/> - <preference for="Magento\Core\Model\Url\SecurityInfoInterface" type="Magento\Core\Model\Url\SecurityInfo\Proxy" /> <preference for="Magento\Framework\App\DefaultPathInterface" type="Magento\Framework\App\DefaultPath\DefaultPath" /> <preference for="Magento\Framework\Encryption\EncryptorInterface" type="Magento\Framework\Encryption\Encryptor" /> <preference for="Magento\Framework\Filter\Encrypt\AdapterInterface" type="Magento\Framework\Filter\Encrypt\Basic" /> diff --git a/app/code/Magento/Core/view/frontend/templates/messages.phtml b/app/code/Magento/Core/view/frontend/templates/messages.phtml index 9c2e61b4a80a6f5af61b36730f438b56d15c6a4a..c5c19765b1fdf22b602e4f4fd749c184203e7756 100644 --- a/app/code/Magento/Core/view/frontend/templates/messages.phtml +++ b/app/code/Magento/Core/view/frontend/templates/messages.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php foreach ($types as $type) { if ($messages = $this->getMessages($type)) { 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 d01472b6c3c62665bce9f678f330065b21a39dc7..dafb84f95ec90802c3f4d66e3eb6b72d27123b10 100644 --- a/app/code/Magento/Cron/Model/Backend/Config/Structure/Converter.php +++ b/app/code/Magento/Cron/Model/Backend/Config/Structure/Converter.php @@ -28,6 +28,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 06d50162570fb2216c2b9836f192676ea9147dab..2f8a1dafaa0a468261865288cb11bbdd0951566b 100644 --- a/app/code/Magento/Cron/Model/Observer.php +++ b/app/code/Magento/Cron/Model/Observer.php @@ -11,6 +11,9 @@ namespace Magento\Cron\Model; use Magento\Framework\App\Filesystem\DirectoryList; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Observer { /**#@+ @@ -118,6 +121,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 e3bf41f7c5526af6fbb02a340a07c41fa1dd0ff5..aea7916579d9c4c99dcf2d43c643e1f65013e63d 100644 --- a/app/code/Magento/Cron/Model/Schedule.php +++ b/app/code/Magento/Cron/Model/Schedule.php @@ -128,6 +128,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/Controller/Adminhtml/System/Currency/SaveRates.php b/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currency/SaveRates.php index 7ffd6dd70d821aeaec55cf609a027464cb52da75..01ba604f11065b040db154c4d422b4882490a500 100644 --- a/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currency/SaveRates.php +++ b/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currency/SaveRates.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\CurrencySymbol\Controller\Adminhtml\System\Currency; class SaveRates extends \Magento\CurrencySymbol\Controller\Adminhtml\System\Currency diff --git a/app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.php b/app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.php index 507b7f84bdfeac0e1893dd1d46c2c76fb9fbb573..19261b5ba0c895f514b3549da4a67d0e35c774d0 100644 --- a/app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.php +++ b/app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.php @@ -139,6 +139,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/CurrencySymbol/view/adminhtml/templates/grid.phtml b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml index 6fda0838c38e5d9c60112f62898652a194a2be58..539a5d49171c36a94158e2b553ed4bcc1ca77030 100644 --- a/app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml +++ b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 0e52efe888f09f0fa06c9c510baf163dfbc1034d..e749382db2c898163726317804efe4b1000881cc 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2ef9ce021ff20d4fe830437e99ddcf8855bfb61a..80eec83eef6c75f495486b388bbca5eff0242fda 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e4b2a983985e3133dae3e99ecdff09c4866379f0..6834b24cffad9b34b3a4f8ce4c4db54aa29ed397 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php /** 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 6aa58a32a0d0c3fe266a187add0ac9155c9dad85..1d6b498ffe26475c7e1c5bec1b9d11aec3cc7832 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php @@ -19,6 +19,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 b7787ba79b7dbbf601ded309122b4a300ad7cd0d..f8a715c4213c29bb39555e78daca203f821085e6 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Reviews.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Reviews.php @@ -11,6 +11,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 2f1faad85cac8d603298ff376547f83391024a29..398522e04a45838cc4537906d3e3d616395c63b6 100644 --- a/app/code/Magento/Customer/Helper/Address.php +++ b/app/code/Magento/Customer/Helper/Address.php @@ -15,6 +15,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/AccountManagement.php b/app/code/Magento/Customer/Model/AccountManagement.php index 56871b94cebd593d9c5c237e98acf65bd34c5c84..c5c59b797fae8087e2c8a07428dcb38e66f040f6 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.php b/app/code/Magento/Customer/Model/Address.php index 9186a155381718d937b67e1eb0d24b1343d7773d..7e89c37cbcc4c32c197668bf7f1beddfa6fe990c 100644 --- a/app/code/Magento/Customer/Model/Address.php +++ b/app/code/Magento/Customer/Model/Address.php @@ -16,6 +16,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 { @@ -54,6 +55,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 64490f90d083c6c05557190e70e8e1892bda6b6d..777c4d6a04e2aa52121d03d13a4c22f7771ac456 100644 --- a/app/code/Magento/Customer/Model/Address/AbstractAddress.php +++ b/app/code/Magento/Customer/Model/Address/AbstractAddress.php @@ -27,6 +27,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 { @@ -123,6 +124,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, @@ -472,6 +474,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) { @@ -527,6 +530,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/Address/Mapper.php b/app/code/Magento/Customer/Model/Address/Mapper.php index fe19174210d149bb3b8a170cba11000d2bfda25a..3fefe1c52cb54138c35d5fddcdc3ecd0d61e406c 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/App/Action/ContextPlugin.php b/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php index 024bef6043f414e536c70a6e1fe0e46d07916e8e..164740604d7f52c60bb99f1bce4cbbd8cd5584e2 100644 --- a/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php +++ b/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php @@ -41,6 +41,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 2dce07dea3fdba08c583a6333bd73ce180147f19..6cd272bb0c84ab27a5883d6791dc57f50d1b8f1b 100644 --- a/app/code/Magento/Customer/Model/Customer.php +++ b/app/code/Magento/Customer/Model/Customer.php @@ -31,6 +31,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 { @@ -219,6 +223,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, @@ -991,6 +996,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/Customer/Mapper.php b/app/code/Magento/Customer/Model/Customer/Mapper.php index 92b618edb243d9d05f48a3d7b9f8f43d34d6bc06..c9f499c8226f30e3cb637d60fbf00e306dd31ebd 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/Group.php b/app/code/Magento/Customer/Model/Group.php index ce608ce69a2df9b933d00e412f06bea2445325da..a586e39007900ca49a7ee55faf627f0586bad16e 100644 --- a/app/code/Magento/Customer/Model/Group.php +++ b/app/code/Magento/Customer/Model/Group.php @@ -78,6 +78,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/GroupManagement.php b/app/code/Magento/Customer/Model/GroupManagement.php index 52d557faaa8586b8296b934efbc544dffb94fbf5..d090e95592744f01dde02f2cbe23e143ae78dc09 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/Customer/Model/Metadata/ElementFactory.php b/app/code/Magento/Customer/Model/Metadata/ElementFactory.php index 81bbad11e015d4e8b6d52c9bb60cfd0e93d20da9..a6f9b33d4bed23bbf8b0c5f87735593b81566486 100644 --- a/app/code/Magento/Customer/Model/Metadata/ElementFactory.php +++ b/app/code/Magento/Customer/Model/Metadata/ElementFactory.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 69f1811f75eb4a6e6b5b1d41ca90bea07d101940..239fc3fb5ba5a0450cc8879acf28ba95cf7315de 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/AbstractData.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/AbstractData.php @@ -5,10 +5,16 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Customer\Model\Metadata\Form; use Magento\Framework\Api\ArrayObjectSearch; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ abstract class AbstractData { /** @@ -257,6 +263,8 @@ abstract class AbstractData * * @param string $value * @return array|true + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _validateInputRule($value) { @@ -437,6 +445,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 85119b1f203f04c57acfbed8bdc67c422d2fd684..6e55f61a5d225b968120b3013a093e4c2103c5aa 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/Date.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/Date.php @@ -22,6 +22,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 2c870b7a1f7035909f4b30849af97060ce9a743b..a9db19a68f90883bea48fc494ed0993e9d55d7d2 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/File.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/File.php @@ -12,6 +12,9 @@ use Magento\Framework\Filesystem; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Api\ArrayObjectSearch; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class File extends AbstractData { /** @@ -55,6 +58,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, @@ -78,6 +82,7 @@ class File extends AbstractData /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function extractValue(\Magento\Framework\App\RequestInterface $request) { @@ -194,6 +199,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 9950d4f4f4b89e7ea84ef824f047b9884871f779..b1e4ce9f362bb368c73da2e93ba8d934b6b60c2a 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/Image.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/Image.php @@ -17,6 +17,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 cec0be11f61edd3cf7b0f2cd5c48a26f86c82460..5a67fbf9cccb17c9d1eb5a32f80f9d4d369116f5 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/Multiline.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/Multiline.php @@ -25,6 +25,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 a7a3ceb2ee887911ff4000ae94319e44b8f0902d..89c93562e50dd575cbb658551467e01c4f02d2a6 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/Text.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/Text.php @@ -50,6 +50,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 921993eccb833e26d1761481369da2e111bc5eed..d20135db19bbf761074891fd2d279552f6935247 100644 --- a/app/code/Magento/Customer/Model/Observer.php +++ b/app/code/Magento/Customer/Model/Observer.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Customer\Model; /** @@ -151,6 +154,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 20d45ee772c6fb6f03b2b5c70f148db1fd6740da..1704789268f6374d644ab26810d24e0d5ebdc2fc 100644 --- a/app/code/Magento/Customer/Model/Renderer/Region.php +++ b/app/code/Magento/Customer/Model/Renderer/Region.php @@ -56,6 +56,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/Address.php b/app/code/Magento/Customer/Model/Resource/Address.php index bec7eec4634435e086829198f20f6284aea49c25..c047a54d3eeb81ef3976e7041ff68b8e382d1ae2 100644 --- a/app/code/Magento/Customer/Model/Resource/Address.php +++ b/app/code/Magento/Customer/Model/Resource/Address.php @@ -12,7 +12,7 @@ use Magento\Framework\Exception\InputException; class Address extends \Magento\Eav\Model\Entity\AbstractEntity { /** - * @var \Magento\Core\Model\Validator\Factory + * @var \Magento\Framework\Validator\Factory */ protected $_validatorFactory; @@ -28,7 +28,7 @@ class Address extends \Magento\Eav\Model\Entity\AbstractEntity * @param \Magento\Framework\Locale\FormatInterface $localeFormat * @param \Magento\Eav\Model\Resource\Helper $resourceHelper * @param \Magento\Framework\Validator\UniversalFactory $universalFactory - * @param \Magento\Core\Model\Validator\Factory $validatorFactory + * @param \Magento\Framework\Validator\Factory $validatorFactory * @param \Magento\Customer\Model\CustomerFactory $customerFactory * @param array $data */ @@ -39,7 +39,7 @@ class Address extends \Magento\Eav\Model\Entity\AbstractEntity \Magento\Framework\Locale\FormatInterface $localeFormat, \Magento\Eav\Model\Resource\Helper $resourceHelper, \Magento\Framework\Validator\UniversalFactory $universalFactory, - \Magento\Core\Model\Validator\Factory $validatorFactory, + \Magento\Framework\Validator\Factory $validatorFactory, \Magento\Customer\Model\CustomerFactory $customerFactory, $data = [] ) { diff --git a/app/code/Magento/Customer/Model/Resource/AddressRepository.php b/app/code/Magento/Customer/Model/Resource/AddressRepository.php index 90959b667315a1bb3b0b1069aebe31843ac5150b..6ef055761a2e58f5c3d7e85d71497c60aca83169 100644 --- a/app/code/Magento/Customer/Model/Resource/AddressRepository.php +++ b/app/code/Magento/Customer/Model/Resource/AddressRepository.php @@ -13,6 +13,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 9e250f63655976dc000b2fd8a4ee571d918d2574..4577a1a113bd39fa1c78c09f597b640e99e12f8f 100644 --- a/app/code/Magento/Customer/Model/Resource/Customer.php +++ b/app/code/Magento/Customer/Model/Resource/Customer.php @@ -9,11 +9,12 @@ use Magento\Framework\Exception\InputException; /** * Customer entity resource model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Customer extends \Magento\Eav\Model\Entity\AbstractEntity { /** - * @var \Magento\Core\Model\Validator\Factory + * @var \Magento\Framework\Validator\Factory */ protected $_validatorFactory; @@ -37,9 +38,10 @@ class Customer extends \Magento\Eav\Model\Entity\AbstractEntity * @param \Magento\Eav\Model\Resource\Helper $resourceHelper * @param \Magento\Framework\Validator\UniversalFactory $universalFactory * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Core\Model\Validator\Factory $validatorFactory + * @param \Magento\Framework\Validator\Factory $validatorFactory * @param \Magento\Framework\Stdlib\DateTime $dateTime * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Resource $resource, @@ -49,7 +51,7 @@ class Customer extends \Magento\Eav\Model\Entity\AbstractEntity \Magento\Eav\Model\Resource\Helper $resourceHelper, \Magento\Framework\Validator\UniversalFactory $universalFactory, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Core\Model\Validator\Factory $validatorFactory, + \Magento\Framework\Validator\Factory $validatorFactory, \Magento\Framework\Stdlib\DateTime $dateTime, $data = [] ) { @@ -182,6 +184,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 47b67411fafbd9b2f10dad4a64e2401684efd44a..f8100f6de0373821f4df27fe3af52d424cbb600b 100644 --- a/app/code/Magento/Customer/Model/Resource/CustomerRepository.php +++ b/app/code/Magento/Customer/Model/Resource/CustomerRepository.php @@ -13,6 +13,7 @@ use Magento\Framework\Exception\NoSuchEntityException; /** * Customer repository. + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class CustomerRepository implements \Magento\Customer\Api\CustomerRepositoryInterface { @@ -89,6 +90,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, @@ -120,6 +122,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/Group/Grid/ServiceCollection.php b/app/code/Magento/Customer/Model/Resource/Group/Grid/ServiceCollection.php index 22980e9d14f0cb3a78449e3a8143ca23d64dd31a..04589231f0bcbe46be5e3bc192ac438847fc3ab1 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; @@ -56,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/Customer/Model/Resource/Setup.php b/app/code/Magento/Customer/Model/Resource/Setup.php index a3b4333c5b7bf58bb9fecfe62d906084856fedee..3e1f8da9666f56fb1484e8709faa7db0075db304 100644 --- a/app/code/Magento/Customer/Model/Resource/Setup.php +++ b/app/code/Magento/Customer/Model/Resource/Setup.php @@ -47,6 +47,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() { @@ -114,6 +116,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 ddfabd8fbcab26ada8886ccda1176c08db7b524a..2f5115569e53f556d4148a9ee27491c46e23cf0c 100644 --- a/app/code/Magento/Customer/Model/Session.php +++ b/app/code/Magento/Customer/Model/Session.php @@ -14,6 +14,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 { @@ -112,6 +113,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/Customer/view/adminhtml/templates/edit/js.phtml b/app/code/Magento/Customer/view/adminhtml/templates/edit/js.phtml index a0c57e3e5b6a5a2460d4279ea747d97faae5d97c..bc03450977917dabdd5debcd3f0805e1b0b3b93f 100644 --- a/app/code/Magento/Customer/view/adminhtml/templates/edit/js.phtml +++ b/app/code/Magento/Customer/view/adminhtml/templates/edit/js.phtml @@ -3,4 +3,7 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 50b68da8b0fc7498ef7ac111382321872c1803e2..25f5e012252ae24718952058f0e0a895199fdd40 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 fd9eb327097134084e1949f3d3bfd9c0343cafe4..a73b42b2bc2fe82cdb131e0c29fde4d86c42811f 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 eddc0554a6afcc503fb276a210a8914f926d157b..175341dd7b60b57acfa6dd51ed0daee288658618 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 bb7309a276d40a596c39bfbacad20a1acca83536..ee154f5e3486262389ece17852bc5bf5e2f494c1 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ab87821f4903c11c325a736144c96074d1bc434e..ee931b00be13838bffb858fcbde16884532d98a1 100644 --- a/app/code/Magento/Customer/view/adminhtml/templates/tab/addresses.phtml +++ b/app/code/Magento/Customer/view/adminhtml/templates/tab/addresses.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 318a86133930f1e27db2f7c1c219db7b270d0e82..c876642597c2d1b9d674a7072fca7f0c0aa38cff 100644 --- a/app/code/Magento/Customer/view/adminhtml/templates/tab/cart.phtml +++ b/app/code/Magento/Customer/view/adminhtml/templates/tab/cart.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b622d823d53d50bdd46ab76436c27d004b7daabd..c2f1325e9b5e9b58dbe707145addc83517c3dd59 100644 --- a/app/code/Magento/Customer/view/adminhtml/templates/tab/newsletter.phtml +++ b/app/code/Magento/Customer/view/adminhtml/templates/tab/newsletter.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d6cc5cd6eaedb3a39017b1a981dbc72a4dabbb82..cd3e77def831d32ee7ff9db8df708ebd06da3816 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 98cc5642da418a989ffc888def33289538ef0555..dc6e656c1451c3b2a72cd37a38b916550f72b3cb 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6b41daa14eeae7e632a14b3fe89d2d3ef2e314b5..4d94ac8d130640558bcd0522bcd708776b68edf7 100644 --- a/app/code/Magento/Customer/view/frontend/templates/account/customer.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/account/customer.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php if($this->customerLoggedIn()): ?> <li class="customer-welcome"> @@ -16,4 +19,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 e125e2bbfc7b595d0ec922024b493d2abcd79b05..9002a562a269c7230759f93dfeab4f5b49371d42 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 46c687b43b26658b946210ffdf076e6995ae487c..47e509332865c1458e576cabb43508babba6b1cb 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 89d9bc1c5a357ba463202a069448601165818b18..c3c1f8a8263ed90ab9e00d7bb7a235ac47e9a197 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ff34a320a54aaf556dfd771f720a063d8c17c8aa..1a69ab4852e63861119a994ee9c6de14b52763aa 100644 --- a/app/code/Magento/Customer/view/frontend/templates/additionalinfocustomer.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/additionalinfocustomer.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9a489615ca3359591ace55682baf6eca9776cc33..a43a70e4cf7835e43addc5e5bedbda0f3b45da5f 100644 --- a/app/code/Magento/Customer/view/frontend/templates/address/book.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/address/book.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 28de5182ebcf123bc723b72003b74d63af269be4..ecefffcdd5f287cd930e8387a6dcfa4e1ffa5d97 100644 --- a/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5f9c117f2ff026c474c8272460403cbef8340f87..fde01563bf6ebf65245b942d70a081e0a13e8d7e 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/confirmation.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/confirmation.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ac69936069953a7423d8637f0f8261395f963791..fef3fe5925656db9eefe2b392e8627c037929fb1 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 6ea86c19faa2e681fa9f812291a1a43750cd34f3..5015484f07fb928ab607829fcd92d72499273f69 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml @@ -5,6 +5,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 402fd64e85d5731cb4f3055e247556ec42763cd4..c3ac3196103f1abc3bf2fd67fb64dcfa0eb77286 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/login.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/login.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 49fe0d0e4ac2a3586213dad2aaf1f4f0bf025ce2..11c4819b9df95f2ed5a7bc078e22c9a7d935b999 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/newsletter.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/newsletter.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c5e770fe209e114c840cc1a1574c44d63bf46045..c60c01c21b12b90e9a942d64c3cab049c9e0d5cd 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/register.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/register.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c8561e373e0ecd596f82a09344dc4e23729b16ab..b73f2bb0f7ae858e016d8aabaeae5d60de31afc4 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/resetforgottenpassword.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/resetforgottenpassword.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 99be8e37348cec69521e018a61f416324e582a94..43f7e9c30c0126f46204910ee749ef83ad81e815 100644 --- a/app/code/Magento/Customer/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/js/components.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a92dd5be986ce183fb1fcdc4491547b51fc5ac67..7a50e3435ed02324acbe0df769863c4f33de6520 100644 --- a/app/code/Magento/Customer/view/frontend/templates/newcustomer.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/newcustomer.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9e4f73573822d3cbef603528c8bdfbe441256fef..2fb484d208ce3977ce4b0587a0052265090f6dc9 100644 --- a/app/code/Magento/Customer/view/frontend/templates/widget/dob.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/widget/dob.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 88811b0ea8569c0c3cd1b662a5f5fbc0c70bb645..d1539783ae7a53f03a1d4f812bcfa39760bbe4a8 100644 --- a/app/code/Magento/Customer/view/frontend/templates/widget/gender.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/widget/gender.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 317612c3582e718ff31253e826b02663dc779c88..1824b642469fd712b1a2293c892d90747fb2e8f7 100644 --- a/app/code/Magento/Customer/view/frontend/templates/widget/name.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/widget/name.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 854193dcc2247290b57e4ec67841203fd8bbc671..c7040532aab80c07deb8007fa0eaa2c175c53d63 100644 --- a/app/code/Magento/Customer/view/frontend/templates/widget/taxvat.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/widget/taxvat.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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/CustomerImportExport/Model/Export/Address.php b/app/code/Magento/CustomerImportExport/Model/Export/Address.php index 479b3847fbc729ac8715f0a4647b92a2fbb54a8b..bfe77d3e13c450aa353d8bb7af894494bd81f0ca 100644 --- a/app/code/Magento/CustomerImportExport/Model/Export/Address.php +++ b/app/code/Magento/CustomerImportExport/Model/Export/Address.php @@ -5,6 +5,9 @@ */ namespace Magento\CustomerImportExport\Model\Export; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Address extends \Magento\ImportExport\Model\Export\Entity\AbstractEav { /**#@+ @@ -109,6 +112,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 68e54fe4ad7e1ccffbe8f9f6d5648e58fdf2fce6..fd577239948e53d486348ad0bd6e2b4009878302 100644 --- a/app/code/Magento/CustomerImportExport/Model/Import/AbstractCustomer.php +++ b/app/code/Magento/CustomerImportExport/Model/Import/AbstractCustomer.php @@ -9,6 +9,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 { @@ -79,6 +80,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 5eed460e571f6e1b7846737940d7a743bba915ad..425c3bab09f303f81aee5460a085c770fc3ecc8c 100644 --- a/app/code/Magento/CustomerImportExport/Model/Import/Address.php +++ b/app/code/Magento/CustomerImportExport/Model/Import/Address.php @@ -5,6 +5,10 @@ */ namespace Magento\CustomerImportExport\Model\Import; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Address extends AbstractCustomer { /**#@+ @@ -226,6 +230,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, @@ -451,6 +457,8 @@ class Address extends AbstractCustomer * * @param array $rowData * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _prepareDataForUpdate(array $rowData) { @@ -577,6 +585,7 @@ class Address extends AbstractCustomer * * @param array $defaults * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _saveCustomerDefaults(array $defaults) { @@ -641,6 +650,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 c2bb61efd6570d9021b9a003bc79bd640f5c275b..a498218c67381f0ed6baabef9bd49c9f56342e38 100644 --- a/app/code/Magento/CustomerImportExport/Model/Import/Customer.php +++ b/app/code/Magento/CustomerImportExport/Model/Import/Customer.php @@ -5,6 +5,9 @@ */ namespace Magento\CustomerImportExport\Model\Import; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Customer extends AbstractCustomer { /** @@ -128,6 +131,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) { @@ -363,6 +369,7 @@ class Customer extends AbstractCustomer * Import data rows * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _importData() { @@ -430,6 +437,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/Container.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Container.php index fd7e904516c9d73432aa06af9e72d6087f4a05b2..9d4a2c9dcab25d0fe1e1499f360fbd31de80f115 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Container.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Container.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 409ec8fc5f5a4a0328a2bfff745093fc14890bc3..275d18f9e429a20bd759ac407c459ab8c0d25e1f 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Renderer.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Renderer.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 7c7aac95ee12d39cf7a87629211cf1462b31d6d3..28db136b67d8f651be513e987e634e0508b6b5a0 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\DesignEditor\Block\Adminhtml\Editor\Form\Renderer; /** 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 f0601a8196a46f4559f80a99f404f79ff9d2edb9..f2771c3694de21a58ce6167b680f574e655b742b 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 @@ -81,6 +81,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 45a5a618c242e2e3c3dc134a58ff0fd11c9d63c1..ad833388d9e0a4480cd7c52941f7ad2ebb502a6d 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 @@ -79,6 +79,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/Controller/Adminhtml/System/Design/Editor/Tools/JsList.php b/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Tools/JsList.php index ef2b8b72ef1ad5aceab4bf7cd9813e52d6fff2ad..8133a7bfcbd0791bf827ecb83357803bf74ee03d 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 @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2611c0da296dd68b463e4cb1b09d6553a3d771c2..c3e19c8a2d682078f1fdf6562f50a4f880f97485 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6b6d156210ad774b043fafd25d16c78d135330f2..14a2bc8970f949c8bc275d31a0ad627f1b621067 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Renderer; /** diff --git a/app/code/Magento/DesignEditor/Model/Observer.php b/app/code/Magento/DesignEditor/Model/Observer.php index 6058551e4a3654f7e492acc3643cf814c7deb0fb..846f7992e8c0b18c84d1881a2de7037672b3c8e4 100644 --- a/app/code/Magento/DesignEditor/Model/Observer.php +++ b/app/code/Magento/DesignEditor/Model/Observer.php @@ -48,6 +48,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 38a8ab66a502749a1d90772d664543c9805195d7..af413fcd477b0b044e36d1bc9ed4bfc3c6637eb5 100644 --- a/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php +++ b/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php @@ -44,6 +44,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/DesignEditor/view/adminhtml/templates/editor/container.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/container.phtml index 4ee4f0791d6ceedaf64b6df4464ac9a4d6bb7b73..e2f53a5555d5cf8d66c98bea81ac8920537dfbb3 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/container.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/container.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 1be30cf7f6e0e52909047891bc0c5cca1b026c3b..f4103565a24935fcfbce4cae3bccad9dd49075bc 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 50a12b22aa369050d8de71d4b40afc55dbcf15f8..a34053ec0c2740c11d36c03fbf7e3fa529e9939e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 40b05756b023d79ae248e5e3fc237760828f677d..02a6d27d127ad73d705617b66aec525f295c08f3 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8f3879ee560c66ba2440b4a6433b8787a21cf86d..f14050bb4fbb351b4046389d99dc6b3d296dbc7d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f06a99f2b3c8817b32b8b75243aafb376ee21327..8d4dce8884c1e165e1fa388044cd6804067171e0 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9ce45e52445f26bc1fad21ec933c28a1fffda026..314b3321d8b2b8d8e8993b0c49e73aed8ca6d168 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 400138948f2236e039f025024c6db32675dca4a1..c0d33c4d0d84bb9e51dffa634c000e8c47228412 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e20ab01a0eeb09a07d5cfe2ef46df8653e50a306..17b71747825ca24be45112cba1b3de4a421b1ba5 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 0f78fd322d87500b7b09886c8a63595e0f8204dc..2694bf66dbac6a668bccbe41018128721748abe6 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4923ade335382366af50ad49ef9621d6ff67798b..f67f83345ca09445f30c33b7acd008ffa47e4e9d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 38b836a36011fff64b5bc6bf4aa5de9b48d0f2d9..cd74d7dcfb52ed7a41d694922d8434f04c6f5147 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c0a8ae9b5107aef8cefaf2b43a5543d222bd1544..3c78a93dde6b55d018778920ab271c4bd775ad13 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 7418f6cc9156d4fc9a2fa1024a01645c84fe8f37..9c5632221339aa11cd127f4e2c4b511b9981f742 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a397ce4e107c63c4cecf6e2da0eaee643875dbb2..2fa1b0f9d218337bead686076375ccf9fb2b20d6 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a20fee247a986faf6095009bc391e4a672edb5ab..de35aa79a816f6af599ef90bf882476fff36b0a3 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c4d38417e871c704d7127b62e9ff302401047fbe..fadcf835db331f11b1b74b71f959192be2e747ec 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b87324129da75be6565fedbee91e6f2d9bb7a67f..be422d61d7e047898080e60da2f50c01d50cad18 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 61217d12e4e6a9934526e2281961089e49449b0b..14df774abf2dfb29ab7498441f6092fd0ade27c8 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 111d85972b3c355129208bf00872d00d5925b081..9faf2a2eab414d134c4617a0bc10acbd68cd411b 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/available.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/available.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 34b3a00a2475f471fbd36945e32e5c5ebac3e018..8a84e69201f8226a52520e767d3ac9efd7b477b8 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/button.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/button.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 7e384006881bf5921b2c60d9158122f14aa7fc94..8eea9a6d145b8af75c69a337cc3eddc7ccde4af5 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/customized.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/customized.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 1f22c9d7099e434384f7f78d981f9a3234e497b9..993f45050fa90b5ac508d6478decb51df35ef481 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 adbcd78222932e183f4a3d32ebf303b2435c87d3..94e827929b0abab5bdbc17a16684bfd4808eccf8 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 00bedb2be73bd3a353ff33ca9f0aadca0834ab25..dffd1c51c5a3acc07e8480bb8f413efc5ab2b1bb 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 0c25310f54ad515ea0e028f3401b1cc316cc58ec..1cb62d26e45135c20d36bca4609c8655838411d0 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ef73f24c4e0a83bff820e0b7b8113dc4e5764d8e..59e66712dd0fbcb6c5f4307a31dff0ea77b490de 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <script> 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 d56fc37da8d0b825dfe3b06a135f2fab00ef602e..a8346f1dfdc34a95be869bbc277605cc5e899071 100644 --- a/app/code/Magento/DesignEditor/view/frontend/templates/translate_inline.phtml +++ b/app/code/Magento/DesignEditor/view/frontend/templates/translate_inline.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 66d9168c8e79e5c2822777b713bc34ceaf925e48..2cf8353c40866cd2e577bc93b1f8cd6b4ed1f36d 100644 --- a/app/code/Magento/Dhl/Block/Adminhtml/Unitofmeasure.php +++ b/app/code/Magento/Dhl/Block/Adminhtml/Unitofmeasure.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 66f4aaa64639928a088e59e5dcf903cd49f5a9cc..6b82978549bf8b8676bc89ef1f42f84ee6c14895 100644 --- a/app/code/Magento/Dhl/Model/Carrier.php +++ b/app/code/Magento/Dhl/Model/Carrier.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Dhl\Model; use Magento\Catalog\Model\Product\Type; @@ -15,6 +18,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 { @@ -207,6 +213,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, @@ -370,6 +377,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) { @@ -611,6 +620,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) { @@ -657,6 +667,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() { @@ -747,6 +759,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) { @@ -1009,6 +1022,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) { @@ -1096,6 +1111,7 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin * * @param \SimpleXMLElement $shipmentDetails * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _addRate(\SimpleXMLElement $shipmentDetails) { @@ -1291,6 +1307,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) { @@ -1360,6 +1377,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() { @@ -1553,6 +1573,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 = '') { @@ -1741,6 +1763,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/Dhl/Model/Plugin/Checkout/Block/Cart/Shipping.php b/app/code/Magento/Dhl/Model/Plugin/Checkout/Block/Cart/Shipping.php index 459a363a26597ad9824f301632ee1e56db8f7f95..43ed90ffedcdc732a05cde308c5c914b27ec59b0 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 03c8fdc65eb13226ca32ff3bd87ba716da70dc1f..4da7c58e06f0a90b3fe09ba1c45cd4887b535c34 100644 --- a/app/code/Magento/Directory/Model/Country.php +++ b/app/code/Magento/Directory/Model/Country.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Country model * diff --git a/app/code/Magento/Directory/Model/Currency.php b/app/code/Magento/Directory/Model/Currency.php index c20e8f7e80a5d6996621385e25789e1d446f0cdc..fc34e67f0c1656778c5d9b9727fec2d9ccb52b78 100644 --- a/app/code/Magento/Directory/Model/Currency.php +++ b/app/code/Magento/Directory/Model/Currency.php @@ -14,6 +14,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 { /** @@ -73,6 +76,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/Currency/Import/Factory.php b/app/code/Magento/Directory/Model/Currency/Import/Factory.php index 894a203a069bc5e74eab9cacb9192885d527adad..3b9970ba5cfb4aeb47bdcfc3d62f36f01f575b5b 100644 --- a/app/code/Magento/Directory/Model/Currency/Import/Factory.php +++ b/app/code/Magento/Directory/Model/Currency/Import/Factory.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 60a2c9c21d9b0b35f0fa9ad1cb8ac93e45367df9..9068c4429d7925d5a2f761b9e954177fce5e7bee 100644 --- a/app/code/Magento/Directory/Model/Currency/Import/Webservicex.php +++ b/app/code/Magento/Directory/Model/Currency/Import/Webservicex.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Currency rate import model (From www.webservicex.net) */ diff --git a/app/code/Magento/Directory/Model/Observer.php b/app/code/Magento/Directory/Model/Observer.php index 59d2499e08630f22ece378df0bbaf4420f7f9227..23d0b5c52f010583ae316fd3ee91fea5c6743a29 100644 --- a/app/code/Magento/Directory/Model/Observer.php +++ b/app/code/Magento/Directory/Model/Observer.php @@ -84,6 +84,7 @@ class Observer /** * @param mixed $schedule * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function scheduledUpdateCurrencyRates($schedule) { diff --git a/app/code/Magento/Directory/Model/PriceCurrency.php b/app/code/Magento/Directory/Model/PriceCurrency.php index 6e6b5872f379550ac670f24d3a4b846eb7fab12b..8232d9220b4128888b13b215597efa9a22e3c601 100644 --- a/app/code/Magento/Directory/Model/PriceCurrency.php +++ b/app/code/Magento/Directory/Model/PriceCurrency.php @@ -58,18 +58,12 @@ class PriceCurrency implements \Magento\Framework\Pricing\PriceCurrencyInterface } /** - * Convert and round price value for specified store or passed currency - * - * @param float $amount - * @param null|string|bool|int|\Magento\Store\Model\Store $store - * @param Currency|string|null $currency - * @param int $precision - * @return float + * {@inheritdoc} */ - public function convertAndRound($amount, $store = null, $currency = null, $precision = self::DEFAULT_PRECISION) + public function convertAndRound($amount, $scope = null, $currency = null, $precision = self::DEFAULT_PRECISION) { - $currentCurrency = $this->getCurrency($store, $currency); - $convertedValue = $this->getStore($store)->getBaseCurrency()->convert($amount, $currentCurrency); + $currentCurrency = $this->getCurrency($scope, $currency); + $convertedValue = $this->getStore($scope)->getBaseCurrency()->convert($amount, $currentCurrency); return round($convertedValue, $precision); } diff --git a/app/code/Magento/Directory/Model/Resource/Country/Collection.php b/app/code/Magento/Directory/Model/Resource/Country/Collection.php index e97ae6aa0b99c61653aa339e3361cea26fd8a487..2c188154998a6392fac02525810c060d488475a3 100644 --- a/app/code/Magento/Directory/Model/Resource/Country/Collection.php +++ b/app/code/Magento/Directory/Model/Resource/Country/Collection.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Directory Country Resource Collection */ @@ -54,6 +56,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 db63429f1c00999713e1e105f79b908f367ce620..078faf74e58d765253c17b890bf4ade7da1f55d1 100644 --- a/app/code/Magento/Directory/Model/Resource/Currency.php +++ b/app/code/Magento/Directory/Model/Resource/Currency.php @@ -161,6 +161,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/Directory/Model/Resource/Region.php b/app/code/Magento/Directory/Model/Resource/Region.php index 9346c0cc49aea9c7aed15f201d8d14d89aa590ff..f6d3ddeed228616dfec7f0da30cdb5e57eeaded1 100644 --- a/app/code/Magento/Directory/Model/Resource/Region.php +++ b/app/code/Magento/Directory/Model/Resource/Region.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 bcc61f1a3e7db0d0670fec6ae803046e597b305b..e0f3b9f24f32762d099ab5ecc954647fc5de33ea 100644 --- a/app/code/Magento/Directory/view/frontend/templates/currency.phtml +++ b/app/code/Magento/Directory/view/frontend/templates/currency.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 af561c5147681222ffba29079f3eb6a30c2d0e12..6589dc8816982535772cdbbb042b1caadd0626e1 100644 --- a/app/code/Magento/Directory/view/frontend/templates/currency/switch.phtml +++ b/app/code/Magento/Directory/view/frontend/templates/currency/switch.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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/Catalog/Product/Edit/Tab/Downloadable/Links.php b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php index 96e198f9b12c3ddd340149cb092bf4beb85e7a7a..50cdaebedacbc9b6b7aa2030f5bd136248a88aec 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 @@ -9,6 +9,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 { @@ -88,6 +89,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, @@ -215,6 +217,7 @@ class Links extends \Magento\Backend\Block\Template * Check exists defined links title * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUsedDefault() { @@ -225,6 +228,7 @@ class Links extends \Magento\Backend\Block\Template * Return true if price in website scope * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsPriceWebsiteScope() { @@ -242,6 +246,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 dd8b6b932b6197f6bdd96c2431471443a8ad7438..8725016bcd3eb00ac56f4b515df51c9ab091fb96 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 @@ -189,6 +189,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/Adminhtml/Sales/Items/Column/Downloadable/Name.php b/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php index 2ce0a5886f70c57457e8c2c2ba579b8b40546e0a..f2724cdfbd8c669014b7527331c89b2a32f2637f 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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/Links.php b/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php index 18d7fb4d305be749403a520336c2d3e11ff743a4..544d9c091faf67a14c96ad0627c53d04da988162 100644 --- a/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php +++ b/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php @@ -46,6 +46,7 @@ class Links extends \Magento\Catalog\Block\Product\AbstractProduct * Enter description here... * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getLinksPurchasedSeparately() { @@ -54,6 +55,7 @@ class Links extends \Magento\Catalog\Block\Product\AbstractProduct /** * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getLinkSelectionRequired() { @@ -137,6 +139,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() { @@ -151,6 +154,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 4fd51e7e64136231b721f23c18e73a3cdccb0d36..179b2816b92e3e001b32ad04ff40d61861b07e2b 100644 --- a/app/code/Magento/Downloadable/Block/Catalog/Product/Samples.php +++ b/app/code/Magento/Downloadable/Block/Catalog/Product/Samples.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Downloadable\Block\Catalog\Product; use Magento\Downloadable\Model\Resource\Sample; @@ -60,6 +63,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 a2a4b9839c58e950c31cdd898343805104135e11..4d4506765375100de70a7c5b8c3923166d775ded 100644 --- a/app/code/Magento/Downloadable/Block/Checkout/Cart/Item/Renderer.php +++ b/app/code/Magento/Downloadable/Block/Checkout/Cart/Item/Renderer.php @@ -33,6 +33,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 752f4e2109e32a2f32636eb59ed1ddda0f3688b5..644ecc9688535b31ac5d42420568a0099677b319 100644 --- a/app/code/Magento/Downloadable/Block/Checkout/Success.php +++ b/app/code/Magento/Downloadable/Block/Checkout/Success.php @@ -56,6 +56,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 62a2044250e530371c98e15beea95c8cd893eea1..66356a4b33bdc28e7fc62d1fce5c48d712df2b77 100644 --- a/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php +++ b/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Downloadable\Block\Customer\Products; use Magento\Downloadable\Model\Link\Purchased\Item; @@ -159,6 +162,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/Block/Sales/Order/Email/Items/Downloadable.php b/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Downloadable.php index fa5792e201c06c14eddb0d07e00c8d4545775984..80c7998839e1f2cc996f4be85d2f41bc5e98d37e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 253484b4ca699a6c83e4827ed37f1da804fbba37..2def86d9c63e08f4123847c905bf66e8aba8eff2 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 941fb00b40bb3ae376e24370e4b01c970a2937b0..7176465cae4437758a013a619683582b42949145 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2033aa4de701130fc05b870aaad5e32f7cebeb79..33c4360bb9fb526d0426a36f53d37a2ba243b09a 100644 --- a/app/code/Magento/Downloadable/Controller/Customer/Products.php +++ b/app/code/Magento/Downloadable/Controller/Customer/Products.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Downloadable\Controller\Customer; use Magento\Framework\App\RequestInterface; diff --git a/app/code/Magento/Downloadable/Controller/Download/Link.php b/app/code/Magento/Downloadable/Controller/Download/Link.php index ac1766522120e32fd0359c88b1ac8271dba70128..0c0cd1bbe8544c02137b5e0d853112b908b59c8f 100644 --- a/app/code/Magento/Downloadable/Controller/Download/Link.php +++ b/app/code/Magento/Downloadable/Controller/Download/Link.php @@ -26,6 +26,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 130992ca01acc177a7c21c5ba0172d3950eb0bab..351fc26c55c5f73eb3d02914e044da4b69267a2c 100644 --- a/app/code/Magento/Downloadable/Controller/Download/LinkSample.php +++ b/app/code/Magento/Downloadable/Controller/Download/LinkSample.php @@ -15,6 +15,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 4b1102ac5b35b0de05e6c9680115f1e56441cf8b..a8cecbc48bd075a86d2f201c024d3e790fcadff2 100644 --- a/app/code/Magento/Downloadable/Controller/Download/Sample.php +++ b/app/code/Magento/Downloadable/Controller/Download/Sample.php @@ -15,6 +15,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/Catalog/Product/Configuration.php b/app/code/Magento/Downloadable/Helper/Catalog/Product/Configuration.php index 749126e47bf5de88e2b6a510bb4f0c0c2af5fb07..8d4df3c04791accc9fdc49e496a4c777a584178a 100644 --- a/app/code/Magento/Downloadable/Helper/Catalog/Product/Configuration.php +++ b/app/code/Magento/Downloadable/Helper/Catalog/Product/Configuration.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Downloadable\Helper\Catalog\Product; /** diff --git a/app/code/Magento/Downloadable/Helper/Data.php b/app/code/Magento/Downloadable/Helper/Data.php index 622cdcd1487a08a220acc3d9e636e405a36c5189..faab224de0f9ece8f5081a8122c28ccc3ff8ab13 100644 --- a/app/code/Magento/Downloadable/Helper/Data.php +++ b/app/code/Magento/Downloadable/Helper/Data.php @@ -38,6 +38,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 d54c436b78179da2e62ba65921b6831a48bc00a8..4351cf3dccbf55249f5086184630cc662080abd7 100644 --- a/app/code/Magento/Downloadable/Helper/Download.php +++ b/app/code/Magento/Downloadable/Helper/Download.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Downloadable\Helper; use Magento\Framework\App\Filesystem\DirectoryList; @@ -11,6 +14,7 @@ use Magento\Framework\Model\Exception as CoreException; /** * Downloadable Products Download Helper + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Download extends \Magento\Framework\App\Helper\AbstractHelper { @@ -294,6 +298,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 df03020572301c229c76aa145819e03c85ac729e..87fce9c49a4dd5ada0eb52a37307673164351675 100644 --- a/app/code/Magento/Downloadable/Model/Observer.php +++ b/app/code/Magento/Downloadable/Model/Observer.php @@ -11,6 +11,7 @@ use Magento\Store\Model\ScopeInterface; * Downloadable Products Observer * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Observer { @@ -111,6 +112,8 @@ class Observer * * @param \Magento\Framework\Object $observer * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function saveDownloadableOrderItem($observer) { @@ -230,6 +233,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 295bfdad03370bb3bcd79d92d3263bdafba50036..7fcce95622ed09df8a726120b6920c85e9afa88b 100644 --- a/app/code/Magento/Downloadable/Model/Product/Type.php +++ b/app/code/Magento/Downloadable/Model/Product/Type.php @@ -11,6 +11,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 { @@ -73,6 +74,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, @@ -187,6 +189,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) { @@ -229,6 +232,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) { @@ -490,6 +496,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) { @@ -561,6 +568,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 a8551127a09eac9969ff77eef80e325a274b4d02..758401cb4b2e7778fe5f71f110582bfbb4e9627f 100644 --- a/app/code/Magento/Downloadable/Model/Resource/Link.php +++ b/app/code/Magento/Downloadable/Model/Resource/Link.php @@ -70,6 +70,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 6d37b4b34e41c1c0ed26d7cea1e12328a54cbe55..913d2f31f15cf928e1be3f38e5503b40d24c650e 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 @@ -3,10 +3,14 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + 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 { @@ -46,6 +50,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 f36030df917aa4c09ec9c02cfeb5d6f71a1bfee9..63a063842af1a697af18dca537728709b4b74b4d 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 @@ -28,6 +28,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 f78c138699d5495cb4ad4656d6c9b5cf45ea3955..1bd20800ae0383b8639da82874783266a95e91b2 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 @@ -28,6 +28,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, @@ -63,6 +64,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/Downloadable/view/adminhtml/templates/product/composite/fieldset/downloadable.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/product/composite/fieldset/downloadable.phtml index 73b83098f2c4d5117326cffdaf757f5c67044627..a5d10ad338f57501b29d8988d914fafbd1b6f8d5 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6bf51b413e7bd03be9c0a9a5be9964e2cf9c4f30..bb64dbcfa41d59cbbfcd59e953838fdc49961b9c 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e5ba1ac238ce7b1927d553b1a24d11f8ab79f7e2..63e1d5dd1a39ea67eae20fbe854e8e070c891485 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 02057dd2c59bbd4655d8e8e30145c864272cd3a6..fc38586b5b3fb070a834b511523523b90baab8d2 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 7c2d947026a9d16edc8ec8e8c7176135577365ef..a02c238cb9014ed1e6d86b3a8a8ea8a7fe328150 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 cb0d1443ee5beaadbab05ea2117d4b01d11b9393..c6aab1a4b0dbf391b8eae857e56c05474a37a015 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e5366a877da8b276415221891ccc4a083994f520..e723058544141e3e21e8dde66f7a058eaaceda17 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 dd3ab9d975d1009edbd19bfd9c5f13dd7a6ae213..f5de1b1c17d6c8b42750fe777fa9301dc3abf564 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ddba63489926f1d4c37c64205e40a66ceff727a5..0d623925b828dce85b32352b39c92d63180f71dd 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 afeaa4371f4ecca6e16c14cd31441cac6e2cc24c..23790561051795c0e66f383d57df3ed3514eb473 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 fda54f7b37bd27c7cecc9b8f99cf948fcb11534d..70bd4cb6afd6dcfe27901756f64fcb490fad73a3 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 cff04cebc6d05cdd1749b223ae49f0b248ca4e27..57f170df1b92a5482967237333de305cb3109116 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/checkout/links.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/checkout/links.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 978a4aa1b1dfdae11d28f2b726cd3fd7f9d5deb3..00d340b828f17de72c49a78dba92c210843a4b83 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/checkout/success.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/checkout/success.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4a59b0a4fbdb7af0f101ccaf80631bc0745765f6..d0de5703b59caa9051ef41f3b927f0a54fe579bb 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9247a39475b14143002b349db73be1232a0430d3..fc595b4c5635aed29c8442b007f1d6c0296ad621 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ac4b6bf730fa4c15210a45d6bcf70c5e6a9e5bb0..be81eaad8641c45a67faa24d7163352734503a08 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a06956972c957a60ffca485e8de105cae6793f90..46a48ae27569f719d57b852eed32d8cdc4157c91 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 99be8e37348cec69521e018a61f416324e582a94..43f7e9c30c0126f46204910ee749ef83ad81e815 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/js/components.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6ee377d824ed26a5634094faefef9c841f33a702..e29b554e00970abdeff254115476727b8c24c3b4 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 95dcf7c0480e0ede447cf01a5c80797e58ee871f..759bfb0f913d721f0d7ad5bf1c66b89502871b3c 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 a90322e4c2c7e40ea89492db85c95280d4fe91b6..407c4d359c6f679f56ce4e16407fa5ca3dbff478 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\Downloadable\Block\Sales\Order\Item\Renderer\Downloadable */ ?> <?php $_item = $this->getItem() ?> diff --git a/app/code/Magento/Eav/Api/Data/AttributeInterface.php b/app/code/Magento/Eav/Api/Data/AttributeInterface.php index b6bc71a689cd62e6dece743e00dadfaf8ca4fcd3..4d91ac5c841494f513100b556448de980597e5fe 100644 --- a/app/code/Magento/Eav/Api/Data/AttributeInterface.php +++ b/app/code/Magento/Eav/Api/Data/AttributeInterface.php @@ -74,6 +74,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 cd8b740e487b59a4b8bcfbe7c1d9db44a4c1d84a..e24bded921403101d8d4a412e0cd0b968e74a468 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Product attribute add/edit form main tab * @@ -100,6 +102,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/Helper/Data.php b/app/code/Magento/Eav/Helper/Data.php index 208af48b6cb59be3c11763592ae0447773cb2c37..851c189bc9f06aaba86f4f53c4dc0042591bba5e 100644 --- a/app/code/Magento/Eav/Helper/Data.php +++ b/app/code/Magento/Eav/Helper/Data.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Eav\Helper; /** diff --git a/app/code/Magento/Eav/Model/Attribute.php b/app/code/Magento/Eav/Model/Attribute.php index c5066616623ad3b7209a7217dd0c027d8e85199e..d6a034e9bbebb4d7ff5629f257cdde3e27df70c8 100644 --- a/app/code/Magento/Eav/Model/Attribute.php +++ b/app/code/Magento/Eav/Model/Attribute.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 8e0c35eb117d26de987fa4975230df1544510bb1..9e0889d58fd3f48064a1c9776ffd8ed111e6cf46 100644 --- a/app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php +++ b/app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Eav\Model\Attribute\Data; use Magento\Framework\App\RequestInterface; @@ -12,6 +15,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 { @@ -285,6 +289,8 @@ abstract class AbstractData * * @param string $value * @return string|true + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _validateInputRule($value) { @@ -479,6 +485,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 a0d20a8134f5c57c7e2271a451572f522875df59..b1ef1c3c84b35eb61667b8c14c18ff326ce0a5c6 100644 --- a/app/code/Magento/Eav/Model/Attribute/Data/Date.php +++ b/app/code/Magento/Eav/Model/Attribute/Data/Date.php @@ -32,6 +32,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 f0b4209e275e940bcbedcb085228d601a265d39c..d01a73a73d9ebed99dc98d7abca252d718d03e63 100644 --- a/app/code/Magento/Eav/Model/Attribute/Data/File.php +++ b/app/code/Magento/Eav/Model/Attribute/Data/File.php @@ -64,6 +64,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) { @@ -163,6 +164,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) { @@ -205,6 +208,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 ae8ea362d1248a9b0e8fab1e045b6719b25f5cd0..4110ddba02cf4dc03f9b477f4a8f753a617f2870 100644 --- a/app/code/Magento/Eav/Model/Attribute/Data/Image.php +++ b/app/code/Magento/Eav/Model/Attribute/Data/Image.php @@ -18,6 +18,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 5a6dabc2951b3f2f751870ead63a43f8f9ef4d81..4826543c56fbd9b33cccc0d4676a7365ca39e8f5 100644 --- a/app/code/Magento/Eav/Model/Attribute/Data/Text.php +++ b/app/code/Magento/Eav/Model/Attribute/Data/Text.php @@ -53,6 +53,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/AttributeDataFactory.php b/app/code/Magento/Eav/Model/AttributeDataFactory.php index 4ce92246b7a58ffdd188c1447b0e03b62d10bb32..84e3a099faa843a3c4c0ecdfc0a31afea89d2c17 100644 --- a/app/code/Magento/Eav/Model/AttributeDataFactory.php +++ b/app/code/Magento/Eav/Model/AttributeDataFactory.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Eav\Model; /** diff --git a/app/code/Magento/Eav/Model/AttributeRepository.php b/app/code/Magento/Eav/Model/AttributeRepository.php index 52af10c54d8812ddd4c2b500cd5aa2554e8761fd..86437cdbf3d48452e55aaefa5b6c2c0702c643a1 100644 --- a/app/code/Magento/Eav/Model/AttributeRepository.php +++ b/app/code/Magento/Eav/Model/AttributeRepository.php @@ -12,6 +12,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 975c4dab62d8f14b18018646dfc38ee7f5ab364e..29cfc020a170711c6f2560f924faf45870866aa8 100644 --- a/app/code/Magento/Eav/Model/AttributeSetRepository.php +++ b/app/code/Magento/Eav/Model/AttributeSetRepository.php @@ -16,6 +16,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 226fc7497a04ba7bdde5fa4351a87844c991cc41..e6afd9b32c8216ecb443e2d6b41a1680716071a5 100644 --- a/app/code/Magento/Eav/Model/Config.php +++ b/app/code/Magento/Eav/Model/Config.php @@ -7,6 +7,9 @@ namespace Magento\Eav\Model; use Magento\Eav\Model\Entity\Type; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Config { /**#@+ @@ -450,6 +453,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 432fb97f969b84f2262061bef148c396111cfc95..e7d7baa3cd43b1c27343564047e694d5f6c0999b 100644 --- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Eav\Model\Entity; use Magento\Eav\Model\Entity\Attribute\AbstractAttribute; @@ -17,6 +20,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 { @@ -414,6 +420,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) { @@ -637,6 +644,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) { @@ -657,6 +665,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) { @@ -739,6 +749,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) { @@ -1081,6 +1092,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) { @@ -1229,6 +1241,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) { @@ -1333,6 +1347,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) { @@ -1387,6 +1402,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) { @@ -1496,6 +1513,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) { @@ -1589,6 +1607,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) { @@ -1617,6 +1636,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) { @@ -1689,6 +1709,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 ab1c45e9d61471f0c9cffa273888febb84831f13..681ab2a4fc09226caac4b05785430a34a74506c6 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute.php @@ -12,6 +12,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 @@ -80,6 +81,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, @@ -208,6 +210,8 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute\AbstractAttribute im * * @return $this * @throws Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function beforeSave() { @@ -307,6 +311,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) { @@ -350,6 +355,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 c954b9fe13601a8cdd1286aa31291f78d90fd7a0..71280078353b11e150f7b680187ea55eee614bb4 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php @@ -10,6 +10,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, @@ -118,6 +121,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, @@ -300,6 +304,7 @@ abstract class AbstractAttribute extends \Magento\Framework\Model\AbstractExtens /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsVisibleOnFront() { @@ -657,6 +662,7 @@ abstract class AbstractAttribute extends \Magento\Framework\Model\AbstractExtens * Retrieve flat columns DDL definition * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function _getFlatColumnsDdlDefinition() { @@ -740,6 +746,7 @@ abstract class AbstractAttribute extends \Magento\Framework\Model\AbstractExtens * Used in database compatible mode * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _getFlatColumnsOldDefinition() { @@ -814,6 +821,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 a3b44a9821819470b9fbb6d229604ceb2858e1bb..e0b6cf4a8d77e15d36cbe92c105ecef18a4a4f68 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/AbstractBackend.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/AbstractBackend.php @@ -7,6 +7,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 { @@ -212,6 +213,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) { @@ -244,6 +246,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) { @@ -271,6 +274,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) { @@ -282,6 +286,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) { @@ -293,6 +298,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/Eav/Model/Entity/Attribute/Backend/Datetime.php b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php index e88a8af0ce75ba5b615f31771ed6d37aaa37401f..c4bc5512eda1a02174145d824e053dc5db7d4ff3 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2ce33331461d31caf574e72495d796c70ab48d2d..57f0b73b6c7589bc64f66324209ea3e63ffd4a54 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Frontend/Datetime.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Frontend/Datetime.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Eav\Model\Entity\Attribute\Frontend; class Datetime extends \Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFrontend diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Set.php b/app/code/Magento/Eav/Model/Entity/Attribute/Set.php index b4c7dd586fb03ffd92125f1f6dfe684b6f5dc252..6d0775efb81a7e5593060b82e2d71b1cbe27377b 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Set.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Set.php @@ -22,6 +22,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 { @@ -70,6 +73,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, @@ -156,6 +160,8 @@ class Set extends \Magento\Framework\Model\AbstractExtensibleModel implements * * @param array $data * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function organizeData($data) { @@ -263,6 +269,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 59451eec414a5626e3a590fd75f32edf573bc636..9c805984a21cd0bb9e2f67818189945b8ac35433 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Source/AbstractSource.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Source/AbstractSource.php @@ -9,6 +9,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, @@ -94,6 +95,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) { @@ -125,6 +127,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 146a4a96fe117216ff05094fa10571a6262be5f0..17d41237c1621f0315938b72e3d03c6fa726d35b 100644 --- a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php +++ b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php @@ -9,6 +9,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 { @@ -125,6 +128,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, @@ -621,6 +625,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) { @@ -771,6 +777,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') { @@ -1098,6 +1105,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) { @@ -1192,6 +1202,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) { @@ -1288,6 +1299,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 dd5aaec360adc744834204f788388977d834a523..d2d6a1fc1754ef45d4115cadab3e7becda4414d8 100644 --- a/app/code/Magento/Eav/Model/Entity/Setup.php +++ b/app/code/Magento/Eav/Model/Entity/Setup.php @@ -7,6 +7,9 @@ */ namespace Magento\Eav\Model\Entity; +/** + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + */ class Setup extends \Magento\Framework\Module\DataSetup { /** @@ -768,6 +771,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) { @@ -1217,6 +1221,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 bbd61209c57d8931767d8415dd38675de5e570f2..031c7b8ad9464b85c3eefdb01fccb692266dfa27 100644 --- a/app/code/Magento/Eav/Model/Entity/Setup/Context.php +++ b/app/code/Magento/Eav/Model/Entity/Setup/Context.php @@ -25,6 +25,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 6d960254fe485e91c3a1c167f8e28b9c6541b451..919985062333e000196f493d4b4d05a192b88890 100644 --- a/app/code/Magento/Eav/Model/Form.php +++ b/app/code/Magento/Eav/Model/Form.php @@ -11,6 +11,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 { @@ -577,6 +579,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 86b228f3da99359eac6c5d4ca6d5977845b18411..0111844ee74cb846742034214dd39ba3f387c62a 100644 --- a/app/code/Magento/Eav/Model/Resource/Attribute.php +++ b/app/code/Magento/Eav/Model/Resource/Attribute.php @@ -86,6 +86,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 2b9ea59ec2b4715501f053bdb5e91510269b5a08..0d10528a5ae92b55676465d5a977e525a88d1ea5 100644 --- a/app/code/Magento/Eav/Model/Resource/Entity/Attribute.php +++ b/app/code/Magento/Eav/Model/Resource/Entity/Attribute.php @@ -261,6 +261,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 04eebbc2c110dfd1c63226389f58f77bb10960c8..0cbb38ec3dd7f5c0464a2f3443d166c4ba121f4e 100644 --- a/app/code/Magento/Eav/Model/Resource/Form/Fieldset.php +++ b/app/code/Magento/Eav/Model/Resource/Form/Fieldset.php @@ -34,6 +34,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/Email/Model/AbstractTemplate.php b/app/code/Magento/Email/Model/AbstractTemplate.php index ca38c73e7c6243ea8e1610b4b5aba0425f9876d9..dbc58086db9bc348c5b92496c4c489e4b68cdc7f 100644 --- a/app/code/Magento/Email/Model/AbstractTemplate.php +++ b/app/code/Magento/Email/Model/AbstractTemplate.php @@ -56,7 +56,7 @@ abstract class AbstractTemplate extends AbstractModel implements TemplateTypesIn protected $_design = null; /** - * @var \Magento\Core\Model\App\Emulation + * @var \Magento\Store\Model\App\Emulation */ protected $_appEmulation; @@ -69,7 +69,7 @@ abstract class AbstractTemplate extends AbstractModel implements TemplateTypesIn * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\View\DesignInterface $design * @param \Magento\Framework\Registry $registry - * @param \Magento\Core\Model\App\Emulation $appEmulation + * @param \Magento\Store\Model\App\Emulation $appEmulation * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param array $data */ @@ -77,7 +77,7 @@ abstract class AbstractTemplate extends AbstractModel implements TemplateTypesIn \Magento\Framework\Model\Context $context, \Magento\Framework\View\DesignInterface $design, \Magento\Framework\Registry $registry, - \Magento\Core\Model\App\Emulation $appEmulation, + \Magento\Store\Model\App\Emulation $appEmulation, \Magento\Store\Model\StoreManagerInterface $storeManager, array $data = [] ) { diff --git a/app/code/Magento/Email/Model/BackendTemplate.php b/app/code/Magento/Email/Model/BackendTemplate.php index abc963099c9b558588bf5580684ba0700116a2f4..27c6084b4382fb0ac0aad564a7d5edf92742ebad 100644 --- a/app/code/Magento/Email/Model/BackendTemplate.php +++ b/app/code/Magento/Email/Model/BackendTemplate.php @@ -21,7 +21,7 @@ class BackendTemplate extends Template * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\View\DesignInterface $design * @param \Magento\Framework\Registry $registry - * @param \Magento\Core\Model\App\Emulation $appEmulation + * @param \Magento\Store\Model\App\Emulation $appEmulation * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Framework\Filesystem $filesystem * @param \Magento\Framework\View\Asset\Repository $assetRepo @@ -38,7 +38,7 @@ class BackendTemplate extends Template \Magento\Framework\Model\Context $context, \Magento\Framework\View\DesignInterface $design, \Magento\Framework\Registry $registry, - \Magento\Core\Model\App\Emulation $appEmulation, + \Magento\Store\Model\App\Emulation $appEmulation, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Filesystem $filesystem, \Magento\Framework\View\Asset\Repository $assetRepo, diff --git a/app/code/Magento/Email/Model/Template.php b/app/code/Magento/Email/Model/Template.php index a397317ff4cd9474192f26d83d8a35f0a30fe07f..e3b52978ca6541b3004af2ed20b1d42fe9ab9575 100644 --- a/app/code/Magento/Email/Model/Template.php +++ b/app/code/Magento/Email/Model/Template.php @@ -157,7 +157,7 @@ class Template extends \Magento\Email\Model\AbstractTemplate implements \Magento * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\View\DesignInterface $design * @param \Magento\Framework\Registry $registry - * @param \Magento\Core\Model\App\Emulation $appEmulation + * @param \Magento\Store\Model\App\Emulation $appEmulation * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Framework\Filesystem $filesystem * @param \Magento\Framework\View\Asset\Repository $assetRepo @@ -173,7 +173,7 @@ class Template extends \Magento\Email\Model\AbstractTemplate implements \Magento \Magento\Framework\Model\Context $context, \Magento\Framework\View\DesignInterface $design, \Magento\Framework\Registry $registry, - \Magento\Core\Model\App\Emulation $appEmulation, + \Magento\Store\Model\App\Emulation $appEmulation, StoreManagerInterface $storeManager, \Magento\Framework\Filesystem $filesystem, \Magento\Framework\View\Asset\Repository $assetRepo, 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 a3092a2a368e6bdfd1653c8f1f851660c05209cf..5c1ae09ee32b085bb7ad06d7bd918abfcf8fd427 100644 --- a/app/code/Magento/Email/view/adminhtml/templates/template/edit.phtml +++ b/app/code/Magento/Email/view/adminhtml/templates/template/edit.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 04c42695a8c0784d43d1975cabc76be0b6c412eb..0f136e1bfbc4819a3c3f24b08a921917ff04e1bb 100644 --- a/app/code/Magento/Email/view/adminhtml/templates/template/list.phtml +++ b/app/code/Magento/Email/view/adminhtml/templates/template/list.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4a9a2281b4014ac03e589413405e57a56c482209..e71ed00512e0c84d04726a585b8516fe3de40972 100644 --- a/app/code/Magento/Fedex/Model/Carrier.php +++ b/app/code/Magento/Fedex/Model/Carrier.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Fedex\Model; use Magento\Quote\Model\Quote\Address\RateRequest; @@ -13,6 +16,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 { @@ -253,6 +258,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) { @@ -493,6 +500,7 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * * @param mixed $response * @return Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareRateResponse($response) { @@ -690,6 +698,7 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * * @param mixed $response * @return Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _parseXmlResponse($response) { @@ -778,6 +787,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 = '') { @@ -1048,6 +1058,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) { @@ -1223,6 +1236,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) { @@ -1452,6 +1468,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 cc2a2554eebd40046368d98154804e4ed94616fa..dedec8c760dc868263e5970756baf036d2505d70 100644 --- a/app/code/Magento/GiftMessage/Block/Message/Inline.php +++ b/app/code/Magento/GiftMessage/Block/Message/Inline.php @@ -275,6 +275,7 @@ class Inline extends \Magento\Framework\View\Element\Template * Check if items has messages * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getItemsHasMesssages() { @@ -290,6 +291,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 d4ce4cb4f2b00bba7f01033b90dd9d0bf742aca7..7672d3f08763ecb24e284aba464b34bcf15789fe 100644 --- a/app/code/Magento/GiftMessage/Helper/Message.php +++ b/app/code/Magento/GiftMessage/Helper/Message.php @@ -3,10 +3,14 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\GiftMessage\Helper; /** * Gift Message helper + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Message extends \Magento\Core\Helper\Data { @@ -71,6 +75,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, @@ -136,6 +141,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) { @@ -288,6 +294,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) { @@ -305,6 +312,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 79fb3fafac8e22443530e9137b976d822111e894..5fcbe852b191e91cd95cfc888860db033339ba4f 100644 --- a/app/code/Magento/GiftMessage/Model/GiftMessageManager.php +++ b/app/code/Magento/GiftMessage/Model/GiftMessageManager.php @@ -25,6 +25,7 @@ class GiftMessageManager * @param array $giftMessages * @param \Magento\Quote\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 600f7da8744737f736b6eb501e92eb7ef20a3893..ee45cb98cf92405349b68eabeea9772aee3c4b4d 100644 --- a/app/code/Magento/GiftMessage/Model/Save.php +++ b/app/code/Magento/GiftMessage/Model/Save.php @@ -80,6 +80,7 @@ class Save extends \Magento\Framework\Object /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getSaved() { @@ -243,6 +244,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/GiftMessage/view/adminhtml/templates/giftoptionsform.phtml b/app/code/Magento/GiftMessage/view/adminhtml/templates/giftoptionsform.phtml index 243c87efbe082413886056c419d7110c39584811..a1975f3e8fbb35a4fb4ea17fa2202b83bc6e2abf 100644 --- a/app/code/Magento/GiftMessage/view/adminhtml/templates/giftoptionsform.phtml +++ b/app/code/Magento/GiftMessage/view/adminhtml/templates/giftoptionsform.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 747f2aa31e355f9fdbc233445193ad783d73e0c9..18cc1e82bf760f0963918df6e06732d577420452 100644 --- a/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml +++ b/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3eccaf65a090bfc54b0e80cc3987a118244b1b24..c628714a4f72e75810550f3c297388631f3a7a78 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4778d49229e1d5496c2391edc49530d53aa69872..08308c4ba999243c4507e57585dcbc4bd119f883 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b5011dd12bbbf3aa920220abb89a543e8ea05eec..ea281e18a9f2325c50a5341d88090ba302fb40e9 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d337ebc21f9446d8337d7623e4370d51ff6da6ad..09b181ebdfbfbdb99245ee62813aad3db14cd1c0 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3d3a03a7e88585b1e76e5648c98f0732751bb427..4e70de76630fb707de0fbcd01d539bb83524aee1 100644 --- a/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml +++ b/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9d43e1f144d71de2ebb5f617f0264e0b097a426a..8236e5fac9e5422e43293066b922e852e8a5668b 100644 --- a/app/code/Magento/GoogleAnalytics/Block/Ga.php +++ b/app/code/Magento/GoogleAnalytics/Block/Ga.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleAnalytics\Block; /** diff --git a/app/code/Magento/GoogleAnalytics/Helper/Data.php b/app/code/Magento/GoogleAnalytics/Helper/Data.php index 2545895e56b2ae1c7710ba68866a3d3b70701ab7..49b29bc28cf3e6b34418f3a7fabf1b87eb46bb01 100644 --- a/app/code/Magento/GoogleAnalytics/Helper/Data.php +++ b/app/code/Magento/GoogleAnalytics/Helper/Data.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 543754fa4fa7ab8a990587af02855e546dae8e92..09e206fa5a82daeb879a6f6c4b9a3ede220e8458 100644 --- a/app/code/Magento/GoogleAnalytics/view/frontend/templates/ga.phtml +++ b/app/code/Magento/GoogleAnalytics/view/frontend/templates/ga.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php b/app/code/Magento/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php index 1895625c2479a7aa2c60efda9731ca715b0d9607..2fc44ab02315a9c60de7ca26b166a351576a3fc9 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 @@ -7,6 +7,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/GoogleOptimizer/Block/Code/Category.php b/app/code/Magento/GoogleOptimizer/Block/Code/Category.php index 3a6a42e58907cde1fa1f29b1ec1d5c9b439f8245..5e611ec1be1362947f3ccd0923a0604ad9a933ec 100644 --- a/app/code/Magento/GoogleOptimizer/Block/Code/Category.php +++ b/app/code/Magento/GoogleOptimizer/Block/Code/Category.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 98a9888c196dcd0e7fa1f59cde4c7b70a6a566c3..371debd2a72741b724fbcd2c69238240f094f626 100644 --- a/app/code/Magento/GoogleOptimizer/Block/Code/Product.php +++ b/app/code/Magento/GoogleOptimizer/Block/Code/Product.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6f6ef4e1956d0e0dc621f12a4a492d07200dc54c..8010a5fc27292710c38eaa3e366b4d8c7648a765 100644 --- a/app/code/Magento/GoogleOptimizer/Helper/Data.php +++ b/app/code/Magento/GoogleOptimizer/Helper/Data.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a2077c5ed4f029b6d5d095208925409bd4f07b93..3c9b1b2d3fb63e62fdb19866ee4be5bd29bd8121 100644 --- a/app/code/Magento/GoogleOptimizer/Model/Observer/Block/Category/Tab.php +++ b/app/code/Magento/GoogleOptimizer/Model/Observer/Block/Category/Tab.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2a213dd90e5633227e1d31080e7de947d5aed786..073826ff9ebb613492bb4daafbb1fb5753f67310 100644 --- a/app/code/Magento/GoogleShopping/Block/Adminhtml/Items/Item.php +++ b/app/code/Magento/GoogleShopping/Block/Adminhtml/Items/Item.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleShopping\Block\Adminhtml\Items; /** 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 6c4edeb942f464491cca2c16db2f026bb7e11900..7d2ca2231ef508fd48b19b10c03258d910b0c6ab 100644 --- a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Form.php +++ b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Form.php @@ -71,6 +71,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/Items/Index.php b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items/Index.php index 6dea87aa9a32833f7529a8c6e92443183065400f..56380c2148cfacfde955603861af9d03fa33fbb4 100644 --- a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items/Index.php +++ b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items/Index.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ee0b27779d6ddb569cfbcc53deb7b37e1d9c6532..03fc43a2939797febd4ccdcc5bb1b837a3e9783c 100644 --- a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items/Refresh.php +++ b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items/Refresh.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleShopping\Controller\Adminhtml\Googleshopping\Items; class Refresh extends \Magento\GoogleShopping\Controller\Adminhtml\Googleshopping\Items 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 3da4fe25f1c62e215917ff22268098dc6f9bfc3b..78368e75a7f77f457db3fc467b31d208d4d2ba2a 100644 --- a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types/Save.php +++ b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types/Save.php @@ -12,6 +12,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/Category.php b/app/code/Magento/GoogleShopping/Helper/Category.php index 38d17c11f9e0a2ef0ca1b2f2b1b8d8ca14818160..36f2b197544fe02a3bab927d02acfb86cfde367e 100644 --- a/app/code/Magento/GoogleShopping/Helper/Category.php +++ b/app/code/Magento/GoogleShopping/Helper/Category.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleShopping\Helper; /** diff --git a/app/code/Magento/GoogleShopping/Helper/Data.php b/app/code/Magento/GoogleShopping/Helper/Data.php index 18469118375f4208178ede60243f72a45f4a8d2b..30e39ba157abfeb04d30bb66a9ec9636aa757106 100644 --- a/app/code/Magento/GoogleShopping/Helper/Data.php +++ b/app/code/Magento/GoogleShopping/Helper/Data.php @@ -86,6 +86,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 545c91d2f45b21f280dcd39923231f6293335f02..adbe22f41a86b983e875e59cf36cc2beae5b1915 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute.php @@ -109,6 +109,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 56d7dc701b8a5a28b97f1438ed4e6b5f903f37ee..e78e3b68c2f1d995c31965e33e8538d70f3657d0 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/ContentLanguage.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/ContentLanguage.php @@ -30,6 +30,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 b3f83375ce1ad5fe01c32385e7b942c4d4af81f8..0c9b83bf976edf37780fbf404fec3f43c905745b 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/DefaultAttribute.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/DefaultAttribute.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Default attribute model * @@ -11,6 +13,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 19b6b01e582dac6790f15af4a8f1a9a051f002f2..43dc01798d763a0d517a2c0eef59bf653c227d25 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/Destinations.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/Destinations.php @@ -30,6 +30,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 98bfca9bd664f98155d88341dc22a2f533c4aec4..1ac9b00897baee8d298808acc0c356a16c97bc1b 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/GoogleProductCategory.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/GoogleProductCategory.php @@ -38,6 +38,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 7afd93bcff94abc8078de14df0e1120f22ae209e..e286f926ea2ca575528a1aba0bc07a69bc9071ae 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/ImageLink.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/ImageLink.php @@ -28,6 +28,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 a234faf07f410d8d1d7b042fe26386cf6cd71b53..1e9b15cd96b556b55fada2f964136dab97b9f013 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/Link.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/Link.php @@ -28,6 +28,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/Price.php b/app/code/Magento/GoogleShopping/Model/Attribute/Price.php index 6a7eba0a92b034794a85d4762b5e755d6ea25a2f..a75a1f1a774fb21782fce489c671a8783e8ea4db 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/Price.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/Price.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleShopping\Model\Attribute; use Magento\Catalog\Model\Product; diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/ProductType.php b/app/code/Magento/GoogleShopping/Model/Attribute/ProductType.php index 2a614ea22daacd1674de3a64ae76d45b7fd322de..9be717ab564b6981c6e527319631dce30853c65f 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/ProductType.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/ProductType.php @@ -30,6 +30,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 a7c7a14ce20255386c97c7c4308b37d3b8a3d477..494e7185eb277037d3213af27e6613495c08ca1f 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/SalePriceEffectiveDate.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/SalePriceEffectiveDate.php @@ -19,6 +19,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 f83f5ce54b5757ebeaabe59566799787be446b9f..ca24c2f97d22f743da7c37ae9dd432134bb4b6a6 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/TargetCountry.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/TargetCountry.php @@ -30,6 +30,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 ead001020d259969ffd49b479b723da0cf47ce6f..1e49ece6ae9170f70a7e26beab7fc5fe0d4d41b3 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/Tax.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/Tax.php @@ -13,6 +13,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 { @@ -93,6 +94,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 7007b555fbdb84a2095bb8814444653a598a5675..5e4ef7014d13d80afb2c1a834654a1b2f481f22b 100644 --- a/app/code/Magento/GoogleShopping/Model/Config.php +++ b/app/code/Magento/GoogleShopping/Model/Config.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleShopping\Model; /** @@ -244,6 +247,7 @@ class Config extends \Magento\Framework\Object * where: key - attribute name, value - group name * * @return array + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getAttributeGroupsFlat() { @@ -272,6 +276,7 @@ class Config extends \Magento\Framework\Object * * @param int $storeId * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsDebug($storeId) { @@ -282,6 +287,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 d22319e6aa225b8da954b8d634307c1d862371c6..7cabe18ba1a86c9175a3559f49d91429b75408e5 100644 --- a/app/code/Magento/GoogleShopping/Model/MassOperations.php +++ b/app/code/Magento/GoogleShopping/Model/MassOperations.php @@ -12,6 +12,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 { @@ -74,6 +75,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, @@ -143,6 +145,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) { @@ -217,6 +221,7 @@ class MassOperations * @param int[]|ItemCollection $items * @return $this * @throws \Exception|\Zend_Gdata_App_CaptchaRequiredException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function synchronizeItems($items) { @@ -303,6 +308,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 92308116337d14600eabafed794995be5334d54b..3fc97c0a8991d02824a0dac071a9e0ae1b09abbd 100644 --- a/app/code/Magento/GoogleShopping/Model/Observer.php +++ b/app/code/Magento/GoogleShopping/Model/Observer.php @@ -146,6 +146,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 fc26f93ff7850a9cf22ec037027cdd27e5309e7c..855192cfab25a71a28a7b1b6eadb1f4217c10ad3 100644 --- a/app/code/Magento/GoogleShopping/Model/Resource/Attribute/Collection.php +++ b/app/code/Magento/GoogleShopping/Model/Resource/Attribute/Collection.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleShopping\Model\Resource\Attribute; /** @@ -94,6 +97,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/Resource/Grid/Collection.php b/app/code/Magento/GoogleShopping/Model/Resource/Grid/Collection.php index f0c4e582e1c8bcb558511b28a9bc9f44f5026847..9771f00fe4084cbdd33832bddc699e351b53236a 100644 --- a/app/code/Magento/GoogleShopping/Model/Resource/Grid/Collection.php +++ b/app/code/Magento/GoogleShopping/Model/Resource/Grid/Collection.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * GoogleShopping Types collection * diff --git a/app/code/Magento/GoogleShopping/Model/Service.php b/app/code/Magento/GoogleShopping/Model/Service.php index 134a4c6c4c75a7d5347301e4cbd1dc93d5202558..87192e45dfc7bce6db60b1e68a9098ac6c02408d 100644 --- a/app/code/Magento/GoogleShopping/Model/Service.php +++ b/app/code/Magento/GoogleShopping/Model/Service.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 03ee3addbba8e5234fca2b614899b05aae168a8a..836245c56de98013b440a784a8e01ad012f2ecc8 100644 --- a/app/code/Magento/GoogleShopping/Model/Source/Destinationstates.php +++ b/app/code/Magento/GoogleShopping/Model/Source/Destinationstates.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\GoogleShopping\Model\Source; /** diff --git a/app/code/Magento/GoogleShopping/Model/Type.php b/app/code/Magento/GoogleShopping/Model/Type.php index 4c95a44c3e59b21da7a2159ebb9c1e156d6288a7..715f76597a6eb4ed222a092099a10d7f23e0e6a6 100644 --- a/app/code/Magento/GoogleShopping/Model/Type.php +++ b/app/code/Magento/GoogleShopping/Model/Type.php @@ -64,6 +64,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, @@ -111,6 +112,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/GoogleShopping/view/adminhtml/templates/captcha.phtml b/app/code/Magento/GoogleShopping/view/adminhtml/templates/captcha.phtml index c957e3269413dbe2faa762f473716b8df57234d7..651229c12f515b8374923adb125cc6eab5489538 100644 --- a/app/code/Magento/GoogleShopping/view/adminhtml/templates/captcha.phtml +++ b/app/code/Magento/GoogleShopping/view/adminhtml/templates/captcha.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 cf530730e50ad281cc93c4100bb69c95af592a3a..e456f8529a0149f5fcae156cf2a110ee394cc105 100644 --- a/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit.phtml +++ b/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <script> 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 eed576c26c3479792e4ca99f62b43310b3973855..e693dbb9e672a7b0550dae9dfe47d98296f2b2b6 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 1903c6e5f62b3d7831a986dcf65b584db2a4bc0e..d9d5652ad3b265252698c4a34f4e595d971fa0b4 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 227515794af60b326ecd0c496955e812ecbfc045..11465a7d2396956b83b75ab5941f928473d5991d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 af984f3c1bbd61ea190a97bd4094f89eaa47a0d4..c3b4134cfbe2f0500b3f82d2a5ec320e40eb0586 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 e5a522a2241bf879ed061774a81ccaf0a9bf741b..2d2fd99f62dbb6b917961c132dc389120d47b343 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 6e4bfd48d9479f6a5ce4a727a3e294a179d80fa0..95b5c5e5006567f25fdb62d55673bb53649b36b6 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f345a7cef3005290e730a858bcf7c51882ff196b..edc0122cabe56955edd50cb338776cb9bdb1a4c3 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Grouped product data template * diff --git a/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php b/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php index 578407449813ab5126cb7ddea0a3d746a08be4f9..c4f2d1ab861a75f235ec17169cfe1a445ee8f196 100644 --- a/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php +++ b/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php @@ -210,6 +210,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) { @@ -323,6 +324,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/Helper/Data.php b/app/code/Magento/ImportExport/Helper/Data.php index 6000763b63598824fa45f72c9a1c678c91882675..43ec77d4f66f10c73bc0f8f8e3054da28813b29d 100644 --- a/app/code/Magento/ImportExport/Helper/Data.php +++ b/app/code/Magento/ImportExport/Helper/Data.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\ImportExport\Helper; /** diff --git a/app/code/Magento/ImportExport/Model/Export.php b/app/code/Magento/ImportExport/Model/Export.php index 21cfc97d95726bc5231f83bdfe3dea9a7ab6b0c9..6abad2c2ee392421d5938a520f7d649d1ea0e296 100644 --- a/app/code/Magento/ImportExport/Model/Export.php +++ b/app/code/Magento/ImportExport/Model/Export.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\ImportExport\Model; /** diff --git a/app/code/Magento/ImportExport/Model/Export/AbstractEntity.php b/app/code/Magento/ImportExport/Model/Export/AbstractEntity.php index 8450774a2201437c30c816de5fd03b02038b1a42..7241c25053d9dc8c567ba7a65fd5bdcae43d156f 100644 --- a/app/code/Magento/ImportExport/Model/Export/AbstractEntity.php +++ b/app/code/Magento/ImportExport/Model/Export/AbstractEntity.php @@ -13,6 +13,7 @@ use Magento\ImportExport\Model\Export; * Export entity abstract model * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.TooManyFields) */ abstract class AbstractEntity { @@ -176,6 +177,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 715d06f80402a6f0e5af667f50f0fa7b34b6f9f7..51b3a8a9a4690cf9f09083d6a46ca118c729615a 100644 --- a/app/code/Magento/ImportExport/Model/Export/Adapter/AbstractAdapter.php +++ b/app/code/Magento/ImportExport/Model/Export/Adapter/AbstractAdapter.php @@ -109,6 +109,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 c17ac6e481ac82ca57089b0982e8e389ac30b578..8803d34fc3d7061be086a9d5ad8c2627ac41377b 100644 --- a/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEav.php +++ b/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEav.php @@ -14,6 +14,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 { @@ -103,6 +104,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 0adea8ff300f690cf349bb5613524b27e38a4193..584b19dc908930fcfb0cba7c1b977e22490d9274 100644 --- a/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEntity.php +++ b/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEntity.php @@ -11,6 +11,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 { @@ -244,6 +246,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/Export/Entity/Factory.php b/app/code/Magento/ImportExport/Model/Export/Entity/Factory.php index 751da52806ae7a668c52c16c410fd3ed65dc1236..dd377a1235de87f9d564e7bf63126b6926bff615 100644 --- a/app/code/Magento/ImportExport/Model/Export/Entity/Factory.php +++ b/app/code/Magento/ImportExport/Model/Export/Entity/Factory.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Export entity factory */ diff --git a/app/code/Magento/ImportExport/Model/Import.php b/app/code/Magento/ImportExport/Model/Import.php index 743492a45e6b264cb6b1dc76b96a9e22c3691f77..69d0912b2d22e3f1716dc453b466d6a88187a5ff 100644 --- a/app/code/Magento/ImportExport/Model/Import.php +++ b/app/code/Magento/ImportExport/Model/Import.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\ImportExport\Model; use Magento\Framework\App\Filesystem\DirectoryList; @@ -15,6 +18,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 { @@ -124,6 +128,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 e52bff681c7fcb7cad69c2fe95d2a5d4e10791a1..4285ddd4224050551ab26e86dfcfb7981c0c1b03 100644 --- a/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php +++ b/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php @@ -8,6 +8,8 @@ namespace Magento\ImportExport\Model\Import; /** * Import entity abstract model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractEntity { @@ -244,6 +246,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, @@ -319,6 +322,8 @@ abstract class AbstractEntity * Validate data rows and save bunches to DB * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _saveValidatedBunches() { @@ -596,6 +601,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 defdbc98c945d8a7b2b25fbfbc39e1d40ba90c23..1345aa9c341d26fa3fa84c5412fc6bfa34259ca7 100644 --- a/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEav.php +++ b/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEav.php @@ -7,6 +7,7 @@ namespace Magento\ImportExport\Model\Import\Entity; /** * Import EAV entity abstract model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractEav extends \Magento\ImportExport\Model\Import\AbstractEntity { @@ -82,6 +83,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 e2b48ff43fad41fc18099a9d38e14e84b3160bae..bdb200723d9b9893a7ef5df648452b1f076a2bd5 100644 --- a/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEntity.php +++ b/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEntity.php @@ -9,6 +9,8 @@ use Magento\ImportExport\Model\Import\AbstractSource; /** * Import entity abstract model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractEntity { @@ -257,6 +259,7 @@ abstract class AbstractEntity * * @param array $rowData * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _isRowScopeDefault(array $rowData) { @@ -288,6 +291,7 @@ abstract class AbstractEntity * Validate data rows and save bunches to DB. * * @return $this|void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _saveValidatedBunches() { @@ -574,6 +578,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/ImportExport/Model/Import/Entity/Factory.php b/app/code/Magento/ImportExport/Model/Import/Entity/Factory.php index 38d3b5a1edd5fc6e5df35b7695894c52ec28df75..d07e8c13081d812397f0e52cc425cee48cb9db7e 100644 --- a/app/code/Magento/ImportExport/Model/Import/Entity/Factory.php +++ b/app/code/Magento/ImportExport/Model/Import/Entity/Factory.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Import entity factory */ diff --git a/app/code/Magento/Indexer/Model/Processor/InvalidateCache.php b/app/code/Magento/Indexer/Model/Processor/InvalidateCache.php index 233559a219a8f20555d675bc1eec12950bb80448..df397b3f720fd5cd0746dad8fd9c5ed10ed51767 100644 --- a/app/code/Magento/Indexer/Model/Processor/InvalidateCache.php +++ b/app/code/Magento/Indexer/Model/Processor/InvalidateCache.php @@ -46,6 +46,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/Integration/view/adminhtml/templates/integration/tokens_exchange.phtml b/app/code/Magento/Integration/view/adminhtml/templates/integration/tokens_exchange.phtml index 0d6bf6a6041fcb92818b0ed82d563e6372309340..cfc1c7b134e7e7aaedd810f7d46d822cf09a2e69 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 @@ -7,5 +7,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 b604f334f5376ded65ca962400b719f2277a3778..b87ca94f8b4bb95605aa6c70ad3a45728b3d0a20 100644 --- a/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/filter.phtml +++ b/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/filter.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f8213d988d5aecc4d9a13db393533dac6c667957..970c7bcb9d8bc1de3c9c47828ebb4d33a9ac84b6 100644 --- a/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/state.phtml +++ b/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/state.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ba471a9a2815fd8bdae4f077417c255f666b6bf5..20e288a9115fb07e2085ea13e2076d4ff62ae762 100644 --- a/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/view.phtml +++ b/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/view.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Log/Model/Aggregation.php b/app/code/Magento/Log/Model/Aggregation.php index 9fa40f6d3ad93230bc3ab1cce2f139f1f86d249c..30046eeb81353401489020c17e019ec12b862301 100644 --- a/app/code/Magento/Log/Model/Aggregation.php +++ b/app/code/Magento/Log/Model/Aggregation.php @@ -75,6 +75,7 @@ class Aggregation extends \Magento\Framework\Model\AbstractModel * * @param string $lastDate * @return null|void + * @SuppressWarnings(PHPMD.UnusedPrivateMethod) */ private function _removeEmpty($lastDate) { @@ -186,6 +187,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) { @@ -202,6 +204,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 dcf9c7501c8ac290de1e521247cd5dbc3cc8bbe3..80396b78c15d65db02107c5660b066aa72969fa8 100644 --- a/app/code/Magento/Log/Model/Cron.php +++ b/app/code/Magento/Log/Model/Cron.php @@ -66,6 +66,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 72e43569fc8d355ecadb8f758e0a94f427a1a0fb..a5f9996ba45631d8e930ae89197f9e1edcae9f0a 100644 --- a/app/code/Magento/Log/Model/Resource/Log.php +++ b/app/code/Magento/Log/Model/Resource/Log.php @@ -131,6 +131,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 379fabc98cedf29585c9816a4ff4d832ddeea454..a067aa6865dea50793277a9c61ea428d07e22494 100644 --- a/app/code/Magento/Log/Model/Resource/Visitor/Collection.php +++ b/app/code/Magento/Log/Model/Resource/Visitor/Collection.php @@ -173,6 +173,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 69060784d35c30c6cc3cf13432d9926e22fd1a5b..ffdfe18859e6a8d64858130694b0485f33079e16 100644 --- a/app/code/Magento/Log/Model/Resource/Visitor/Online.php +++ b/app/code/Magento/Log/Model/Resource/Visitor/Online.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Log\Model\Resource\Visitor; /** @@ -43,6 +46,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 c22caad70e98e05f93d5d8db0586bafe74232d27..ddd051f7ba5c3703625e49e65ac9510caefe296c 100644 --- a/app/code/Magento/Log/Model/Visitor.php +++ b/app/code/Magento/Log/Model/Visitor.php @@ -63,6 +63,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/Log/view/adminhtml/templates/customer/status.phtml b/app/code/Magento/Log/view/adminhtml/templates/customer/status.phtml index d07c88fe1b38c57eee0fbd44b7f526a76e71cca8..aac139b1a3cd8932d6b7b132178d45e5f292e793 100644 --- a/app/code/Magento/Log/view/adminhtml/templates/customer/status.phtml +++ b/app/code/Magento/Log/view/adminhtml/templates/customer/status.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 9228aa320afa5a3a1b7e14c79d3773991984487f..1d27f92b1d57cdd4045ec77cdb17e900c03c669d 100644 --- a/app/code/Magento/Log/view/adminhtml/templates/online.phtml +++ b/app/code/Magento/Log/view/adminhtml/templates/online.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5bd225acf1a2bd437151334646233828e1912708..e20d53d4d9d6fa36720ea4429fd432f9e48d20af 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 48287e72b1d1fdec3fe70e8effad0fecde27ea10..a73e2da7bef60760adb39cc36bdd4d751a4b46f4 100644 --- a/app/code/Magento/Msrp/view/frontend/templates/popup.phtml +++ b/app/code/Magento/Msrp/view/frontend/templates/popup.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 be002953de589539a6827aa8e961afbd05b99357..3751ec3ae109cd0ae457557ea6f46e713e3dfb87 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 642bda0d48756f03fa01172f37dc0706aad13fef..d3cb59434cbac9c3dda56453eed9f02d0b54c001 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Multishipping/Block/Checkout/Overview.php b/app/code/Magento/Multishipping/Block/Checkout/Overview.php index 8687571a9980bd2a0857d1eed8f89fe852283141..21d9e51815452b76c0aed6d6d089cbb4c61650a4 100644 --- a/app/code/Magento/Multishipping/Block/Checkout/Overview.php +++ b/app/code/Magento/Multishipping/Block/Checkout/Overview.php @@ -133,6 +133,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 230c7ad46c693df099342294f41a5d1b97573b17..baa5cffd12797b2e98fde9da51c8b9a49c0fcd78 100644 --- a/app/code/Magento/Multishipping/Controller/Checkout.php +++ b/app/code/Magento/Multishipping/Controller/Checkout.php @@ -11,6 +11,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 @@ -77,6 +78,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 bd56ac135c7f5baf8fdab2d1329b29dd15b2f478..4e9fce82bde999c519d1693f29b9a2dfc0a1e98d 100644 --- a/app/code/Magento/Multishipping/Controller/Checkout/OverviewPost.php +++ b/app/code/Magento/Multishipping/Controller/Checkout/OverviewPost.php @@ -43,6 +43,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/Helper/Data.php b/app/code/Magento/Multishipping/Helper/Data.php index 521d1cda2eb60eb9e0f47b356cf7d830531ec53c..d7458c1e1a0470bb40acb6ef00a22b9c77e9494a 100644 --- a/app/code/Magento/Multishipping/Helper/Data.php +++ b/app/code/Magento/Multishipping/Helper/Data.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 50d342810398444f459099af8981fcd8dd34886b..16088de7f6e184c6a29e6394e12a5faac5fd4fc3 100644 --- a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php +++ b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Multishipping\Model\Checkout\Type; use Magento\Customer\Api\AddressRepositoryInterface; @@ -11,6 +14,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 { @@ -149,6 +155,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, @@ -202,6 +209,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() { @@ -361,6 +369,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) { @@ -444,6 +454,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 462968de8d120b6de47e4d9114916ab472acac98..793a808e2a2ecf54d319f23c79ee780cea0305ce 100644 --- a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping/State.php +++ b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping/State.php @@ -144,6 +144,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/Multishipping/view/frontend/layout/multishipping_checkout_success.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_success.xml index 5ea53255269edf7ca4d32b50a0b90fe176d3c146..e9bca9477d829c01fe0c92260310c6378b5a71ac 100644 --- a/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_success.xml +++ b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_success.xml @@ -7,6 +7,9 @@ --> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> <update handle="multishipping_checkout"/> + <head> + <title>Success Page</title> + </head> <body> <referenceBlock name="page.main.title"> <action method="setPageTitle"> 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 04bdd592206fffd5066c28d42d4e4925fdd7a6b2..dac5501e9d214e70855ce28d96c48b2e0216d92a 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 3ac80bc353af543ddb23918fa12172e29cba5935..367ae99a906472da4c47e0cf902e774eff577941 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3a301a4a0ed22ef4694835b038d0dc72fdeb553b..c286971abb7d5ceaf1c718d5c2964ac85f0beffc 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f802304418c63d3396c154499f77143b38b7c1e3..0dd1962c34f010c95fc965cc165d804e657aaa8e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b2a877b9d859d7fe2c62a2464e45f0bb82c80dde..b9b4988bcf5c8da55a5d1e7dcaa92722f2a92d3b 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f225bbca3a9a415e64a9df136095d51310ace0dc..cc1f8ff73222abe5f393a046b9c8c073eb1323cc 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/link.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/link.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 79b0fb5b282c3333b8a6d08b934a28dd2c9dd9a5..51302fd4e104d3220833aa9ecc88b1fda7a3432b 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5dd56e7b200318d4b60527a1bca4cce39da03927..c2e07722eccc543f06b36d3f284593707c5679ad 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 bf788a1793236c776889c2694ff44e713a326806..c58c8f5efd3d51fbb2c002d0469bc37694f3dc00 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/shipping.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/shipping.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9788426ab3b8afb91524de3654870b6127effb91..e71b701338f20fc4a65e744c3eb36fb6c7623a53 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/state.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/state.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ba9b64fa1e8ff4d5915fe325ead214075c603e43..f0e0d9512e113afbdb89c0c28864a804f912384c 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/success.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/success.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 99be8e37348cec69521e018a61f416324e582a94..43f7e9c30c0126f46204910ee749ef83ad81e815 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/js/components.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8f9c7c23cf2d39317bd12d2f3a8b1c0341c70a35..bafd229b4d6ba455b26eb6c5d43cbb1a5e8686b5 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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/Problem.php b/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php index cad43065e2dbc6d2f3485b26ee5a8d45eb626f63..c3ae83df04bcea5d47684129144a8670a51af796 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php @@ -40,6 +40,7 @@ class Problem extends \Magento\Backend\Block\Template /** * @return void + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _construct() { @@ -101,6 +102,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 6ef487bb2bab83ac5e2685fb09ff737981f2fd24..271ae2c7c6635a82217e8a47b6936cb4f9cb2f29 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php @@ -218,6 +218,7 @@ class Edit extends \Magento\Backend\Block\Template * Getter for availability preview mode * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsPreview() { @@ -241,6 +242,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() { @@ -251,6 +253,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() { @@ -261,6 +264,7 @@ class Edit extends \Magento\Backend\Block\Template * Getter for availability resume action * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCanResume() { @@ -271,6 +275,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 716d3272bc449092e3e56f69a35ab48af4262a64..7675ac57c9a7104c31a23ad4eef0006eaccbbefe 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Newsletter\Block\Adminhtml\Queue\Edit; /** @@ -57,6 +60,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 936ab42d14178c2308b1e196e504371402b44c43..c6b88dfe2eafbefd4f2b08e6b539662d83b58b22 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview/Form.php @@ -17,6 +17,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 5ff6b98580345bd7043c75eb3952a7e267d1ca95..52641dcdc49fd239243a59d5a89c6dc6a02a27f5 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Newsletter Template Edit Block * @@ -56,6 +58,7 @@ class Edit extends \Magento\Backend\Block\Widget * Preparing block layout * * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareLayout() { @@ -171,6 +174,7 @@ class Edit extends \Magento\Backend\Block\Widget * Return edit flag for block * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getEditMode() { @@ -278,6 +282,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 fe3d2e7e12bdf84b08b2c41db4ad0a9abeaa45ad..18de6a18d03c5ebeb6e6079bda4bf10fa9b7e9e7 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit/Form.php @@ -50,6 +50,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 ff54609427df62940a8d140001078d687a1be9a1..b88a7309a7282d724004dcc1a525dead6117af25 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview/Form.php @@ -17,6 +17,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 0da1c89d1c6b835aa189bf4b7198067b2e569ae0..8bcc262340cc5d620447cbbc679e403de312620f 100644 --- a/app/code/Magento/Newsletter/Controller/Adminhtml/Queue/Save.php +++ b/app/code/Magento/Newsletter/Controller/Adminhtml/Queue/Save.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Newsletter\Controller\Adminhtml\Queue; class Save extends \Magento\Newsletter\Controller\Adminhtml\Queue @@ -13,6 +16,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 cb84858cfff0b77e1b3e28a75d8f553df892a206..72239c7dcfabd57bc466a3773e292e719169dfbf 100644 --- a/app/code/Magento/Newsletter/Model/Queue.php +++ b/app/code/Magento/Newsletter/Model/Queue.php @@ -31,6 +31,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 { @@ -114,7 +115,7 @@ class Queue extends \Magento\Email\Model\AbstractTemplate * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\View\DesignInterface $design * @param \Magento\Framework\Registry $registry - * @param \Magento\Core\Model\App\Emulation $appEmulation + * @param \Magento\Store\Model\App\Emulation $appEmulation * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Newsletter\Model\Template\Filter $templateFilter * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate @@ -124,12 +125,13 @@ 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, \Magento\Framework\View\DesignInterface $design, \Magento\Framework\Registry $registry, - \Magento\Core\Model\App\Emulation $appEmulation, + \Magento\Store\Model\App\Emulation $appEmulation, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Newsletter\Model\Template\Filter $templateFilter, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, @@ -196,6 +198,7 @@ class Queue extends \Magento\Email\Model\AbstractTemplate * * @param int $count * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function sendPerSubscriber($count = 20) { @@ -320,6 +323,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/Grid/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Grid/Collection.php index 8ddac79f305ae15f7eb452b7ae004ee718ea720b..0de676b32e8cd6b8d79016a445897f8892c678aa 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Grid/Collection.php +++ b/app/code/Magento/Newsletter/Model/Resource/Grid/Collection.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Newsletter problems collection * diff --git a/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php index 04c57f977d4891fe1555b432c90aeb9ead5d39ea..9c3afee8b9da91dcd1c112a6f0b57143d5b4b6d9 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php +++ b/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php @@ -264,6 +264,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/Resource/Template.php b/app/code/Magento/Newsletter/Model/Resource/Template.php index 9fea41a14401409ed28f4e7721533d76f13f4e65..9ca3e1351e2942367fc4eb35e05db427bc647732 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Template.php +++ b/app/code/Magento/Newsletter/Model/Resource/Template.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Newsletter\Model\Resource; /** diff --git a/app/code/Magento/Newsletter/Model/Subscriber.php b/app/code/Magento/Newsletter/Model/Subscriber.php index bbc21a7dcc9ebb32da57d17f6e263bdc2aa2528c..a201e88646585247aa7deb2860f5419c94a5cd32 100644 --- a/app/code/Magento/Newsletter/Model/Subscriber.php +++ b/app/code/Magento/Newsletter/Model/Subscriber.php @@ -136,6 +136,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 ddb12607ece31ab8514cd981bfdedfb16f2852cc..4ff5e4d526c661f2cad580ffdf468e27c121da3a 100644 --- a/app/code/Magento/Newsletter/Model/Template.php +++ b/app/code/Magento/Newsletter/Model/Template.php @@ -32,6 +32,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 { @@ -93,7 +94,7 @@ class Template extends \Magento\Email\Model\AbstractTemplate * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\View\DesignInterface $design * @param \Magento\Framework\Registry $registry - * @param \Magento\Core\Model\App\Emulation $appEmulation + * @param \Magento\Store\Model\App\Emulation $appEmulation * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Framework\App\RequestInterface $request * @param \Magento\Newsletter\Model\Template\Filter $filter @@ -101,12 +102,13 @@ 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, \Magento\Framework\View\DesignInterface $design, \Magento\Framework\Registry $registry, - \Magento\Core\Model\App\Emulation $appEmulation, + \Magento\Store\Model\App\Emulation $appEmulation, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\App\RequestInterface $request, \Magento\Newsletter\Model\Template\Filter $filter, @@ -217,6 +219,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/Newsletter/view/adminhtml/templates/preview/iframeswitcher.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/preview/iframeswitcher.phtml index cbff054dd92fe898593dd9b954794686bb4fbc27..cf09d83f1df88cfaeb3d991ba09c4f30ff5fe579 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/templates/preview/iframeswitcher.phtml +++ b/app/code/Magento/Newsletter/view/adminhtml/templates/preview/iframeswitcher.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 935cce22196302ce3d7349a2903734f207704544..b9c42dfe7a2bc86d6c4d95673bbe8804a852a8ab 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/templates/preview/store.phtml +++ b/app/code/Magento/Newsletter/view/adminhtml/templates/preview/store.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 bffcc4a783b0be12049771745b6ef3b5fab51693..fb872704914cc35329afc00a4d3ef94103874dfd 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/templates/problem/list.phtml +++ b/app/code/Magento/Newsletter/view/adminhtml/templates/problem/list.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 57aa808cb7bfd3642ecd5f7035f5f5f6dc6693f4..bfb2eb9c81c064a57b703612312098eb584097b1 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/templates/queue/edit.phtml +++ b/app/code/Magento/Newsletter/view/adminhtml/templates/queue/edit.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c1e2599f8e5d8fe14d88a0161ce8a871470a7b97..edc99139da10c27628a4141d12e176be722a7ae1 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/templates/queue/list.phtml +++ b/app/code/Magento/Newsletter/view/adminhtml/templates/queue/list.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2dc5299ef588a3aa8a76964acc6d4b1c4a87e990..dc0936b43a3de087faa0c5159be962cdb24ed0d6 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/templates/subscriber/list.phtml +++ b/app/code/Magento/Newsletter/view/adminhtml/templates/subscriber/list.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 283620035a7570bcdc29999f4c826f0b855bab46..f4d7f8f1d5a14bc64c21f8f3decd727002347c4d 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/templates/template/edit.phtml +++ b/app/code/Magento/Newsletter/view/adminhtml/templates/template/edit.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9228aa320afa5a3a1b7e14c79d3773991984487f..1d27f92b1d57cdd4045ec77cdb17e900c03c669d 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/templates/template/list.phtml +++ b/app/code/Magento/Newsletter/view/adminhtml/templates/template/list.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 99be8e37348cec69521e018a61f416324e582a94..43f7e9c30c0126f46204910ee749ef83ad81e815 100644 --- a/app/code/Magento/Newsletter/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Newsletter/view/frontend/templates/js/components.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d3134fd7eb4ced6e1780239a7beecea39979de21..b98b69a605794e4836b217d7cb9660d1ef0f4e1a 100644 --- a/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml +++ b/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <div class="block newsletter"> <div class="title"><strong>Newsletter</strong></div> diff --git a/app/code/Magento/OfflinePayments/Block/Form/AbstractInstruction.php b/app/code/Magento/OfflinePayments/Block/Form/AbstractInstruction.php new file mode 100644 index 0000000000000000000000000000000000000000..4ad7357cfdad92245256ae974a65cdc7ab7497b5 --- /dev/null +++ b/app/code/Magento/OfflinePayments/Block/Form/AbstractInstruction.php @@ -0,0 +1,32 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\OfflinePayments\Block\Form; + +/** + * Abstract class for Cash On Delivery and Bank Transfer payment method form + */ +abstract class AbstractInstruction extends \Magento\Payment\Block\Form +{ + /** + * Instructions text + * + * @var string + */ + protected $_instructions; + + /** + * Get instructions text from config + * + * @return string + */ + public function getInstructions() + { + if (is_null($this->_instructions)) { + $this->_instructions = $this->getMethod()->getInstructions(); + } + return $this->_instructions; + } +} diff --git a/app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php b/app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php index 1693929cdaabdc74e1661aee498d1d1bbf13765b..d71654418a38f9dc5a8939c6fa0952a0f3ab4edf 100644 --- a/app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php +++ b/app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php @@ -8,32 +8,12 @@ namespace Magento\OfflinePayments\Block\Form; /** * Block for Bank Transfer payment method form */ -class Banktransfer extends \Magento\Payment\Block\Form +class Banktransfer extends \Magento\OfflinePayments\Block\Form\AbstractInstruction { - /** - * Instructions text - * - * @var string - */ - protected $_instructions; - /** * Bank transfer template * * @var string */ protected $_template = 'form/banktransfer.phtml'; - - /** - * Get instructions text from config - * - * @return string - */ - public function getInstructions() - { - if (is_null($this->_instructions)) { - $this->_instructions = $this->getMethod()->getInstructions(); - } - return $this->_instructions; - } } diff --git a/app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php b/app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php index af0850e5860b8a762eb3b5ae0ce13ae1950aeea6..1e14cabb9ba2b08204d3b62a029f2aa793f22d62 100644 --- a/app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php +++ b/app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php @@ -8,32 +8,12 @@ namespace Magento\OfflinePayments\Block\Form; /** * Block for Cash On Delivery payment method form */ -class Cashondelivery extends \Magento\Payment\Block\Form +class Cashondelivery extends \Magento\OfflinePayments\Block\Form\AbstractInstruction { - /** - * Instructions text - * - * @var string - */ - protected $_instructions; - /** * Cash on delivery template * * @var string */ protected $_template = 'form/cashondelivery.phtml'; - - /** - * Get instructions text from config - * - * @return string - */ - public function getInstructions() - { - if (is_null($this->_instructions)) { - $this->_instructions = $this->getMethod()->getInstructions(); - } - return $this->_instructions; - } } diff --git a/app/code/Magento/OfflinePayments/Model/Banktransfer.php b/app/code/Magento/OfflinePayments/Model/Banktransfer.php index 044dd3301ba602fa85727bd7e6f9a71d5e816d75..4cc48a575272039644fe0c1211c4172249647f60 100644 --- a/app/code/Magento/OfflinePayments/Model/Banktransfer.php +++ b/app/code/Magento/OfflinePayments/Model/Banktransfer.php @@ -39,14 +39,4 @@ class Banktransfer extends \Magento\Payment\Model\Method\AbstractMethod * @var bool */ protected $_isOffline = true; - - /** - * Get instructions text from config - * - * @return string - */ - public function getInstructions() - { - return trim($this->getConfigData('instructions')); - } } diff --git a/app/code/Magento/OfflinePayments/Model/Observer.php b/app/code/Magento/OfflinePayments/Model/Observer.php index 61fc00d538940128a62e8aecafed8b3c22a7c433..1cb45ac753f568f3ffca0f55a33ea4a8a14d2000 100644 --- a/app/code/Magento/OfflinePayments/Model/Observer.php +++ b/app/code/Magento/OfflinePayments/Model/Observer.php @@ -21,9 +21,11 @@ class Observer { /** @var \Magento\Sales\Model\Order\Payment $payment */ $payment = $observer->getEvent()->getPayment(); - $banktransfer = \Magento\OfflinePayments\Model\Banktransfer::PAYMENT_METHOD_BANKTRANSFER_CODE; - if ($payment->getMethod() === $banktransfer) { - $payment->setAdditionalInformation('instructions', $payment->getMethodInstance()->getInstructions()); + if ($payment->getMethod() === Banktransfer::PAYMENT_METHOD_BANKTRANSFER_CODE) { + $payment->setAdditionalInformation( + 'instructions', + $payment->getMethodInstance()->getConfigData('instructions') + ); } } } 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 1614526442054e579a736d55704928c29903a232..00c2561926980aa38e5eaa3bd63996707b0d1611 100644 --- a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/banktransfer.phtml +++ b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/banktransfer.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 0a5c26ad023bceae16049d1cb103fb6dd4362c43..7ff8963cc97da2b0053375a6586b716ff5328ac8 100644 --- a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/cashondelivery.phtml +++ b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/cashondelivery.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 b7f61d6302315b76676d37b466c6ecd66d123cca..f8173386f3e8f0bceb76d1009fde8576970d8166 100644 --- a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/checkmo.phtml +++ b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/checkmo.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f4cebb6ed674bfcde647badcf8e2817e1b142463..4996b06a724b2c6cad2e17dc6b5b3ddf8fe1588f 100644 --- a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/purchaseorder.phtml +++ b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/purchaseorder.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 fbfb425f02e518e31b82f7bf7c5231568430f653..7fba0d299840c717df6c17b711e9a88405f4a629 100644 --- a/app/code/Magento/OfflinePayments/view/adminhtml/templates/info/checkmo.phtml +++ b/app/code/Magento/OfflinePayments/view/adminhtml/templates/info/checkmo.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d89c99066fa6a523cd9a76a5e89ad5a777eb0dfa..ab8c7e3d74d597b669886117a1c5e05053d15d71 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 fb12d3bb982f9e3c5d7f7032077dc28b7f20d591..c1e8d9c0a5625fc662c349b33621f0070862bd68 100644 --- a/app/code/Magento/OfflinePayments/view/frontend/templates/form/banktransfer.phtml +++ b/app/code/Magento/OfflinePayments/view/frontend/templates/form/banktransfer.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8d608055fa9468c19920eed7d6383d6d739088f4..0f6277e6868e8b257eb18363716baa0e3ddf2091 100644 --- a/app/code/Magento/OfflinePayments/view/frontend/templates/form/cashondelivery.phtml +++ b/app/code/Magento/OfflinePayments/view/frontend/templates/form/cashondelivery.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 c012151c31a36dfd260924629e9771e3e4df8be7..4fcebe8885965b94d6b2238cea15e962b5e2daaa 100644 --- a/app/code/Magento/OfflinePayments/view/frontend/templates/form/checkmo.phtml +++ b/app/code/Magento/OfflinePayments/view/frontend/templates/form/checkmo.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 050b7b7d07cff9b6e87623e85fb469c7d4a6a076..905181a1274f9611c33ca73262d83961803c399e 100644 --- a/app/code/Magento/OfflinePayments/view/frontend/templates/form/purchaseorder.phtml +++ b/app/code/Magento/OfflinePayments/view/frontend/templates/form/purchaseorder.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 daf65b7812a03d5a2337e3779e42e35f7334428d..c482883c6e0ed4743df973c91b85f94474717157 100644 --- a/app/code/Magento/OfflinePayments/view/frontend/templates/info/checkmo.phtml +++ b/app/code/Magento/OfflinePayments/view/frontend/templates/info/checkmo.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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/Carrier/Flatrate.php b/app/code/Magento/OfflineShipping/Model/Carrier/Flatrate.php index ac4774ea204eb8e3d2be3fffce1c2e11e62ce411..ff96421b77034d67dc4cf1cb6ab6c4d83077d3ad 100644 --- a/app/code/Magento/OfflineShipping/Model/Carrier/Flatrate.php +++ b/app/code/Magento/OfflineShipping/Model/Carrier/Flatrate.php @@ -57,6 +57,8 @@ class Flatrate extends \Magento\Shipping\Model\Carrier\AbstractCarrier implement /** * @param \Magento\Quote\Model\Quote\Address\RateRequest $request * @return Result|bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function collectRates(\Magento\Quote\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 01db8ac139cd048c531e97a3181fe0e25c1640cd..e1411217d1d5d1b96dae3cfd82ee4ba78047b4b1 100644 --- a/app/code/Magento/OfflineShipping/Model/Carrier/Pickup.php +++ b/app/code/Magento/OfflineShipping/Model/Carrier/Pickup.php @@ -52,6 +52,7 @@ class Pickup extends \Magento\Shipping\Model\Carrier\AbstractCarrier implements /** * @param \Magento\Quote\Model\Quote\Address\RateRequest $request * @return \Magento\Shipping\Model\Rate\Result + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function collectRates(\Magento\Quote\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 58f439930efee892e67e7456e37a8a4d80aed2b0..4456feee0578c38c56347f4ec2f474d5d5d765fa 100644 --- a/app/code/Magento/OfflineShipping/Model/Carrier/Tablerate.php +++ b/app/code/Magento/OfflineShipping/Model/Carrier/Tablerate.php @@ -51,6 +51,7 @@ class Tablerate extends \Magento\Shipping\Model\Carrier\AbstractCarrier implemen * @param \Magento\Quote\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, @@ -73,6 +74,9 @@ class Tablerate extends \Magento\Shipping\Model\Carrier\AbstractCarrier implemen /** * @param \Magento\Quote\Model\Quote\Address\RateRequest $request * @return \Magento\Shipping\Model\Rate\Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function collectRates(\Magento\Quote\Model\Quote\Address\RateRequest $request) { diff --git a/app/code/Magento/OfflineShipping/Model/Config/Backend/Tablerate.php b/app/code/Magento/OfflineShipping/Model/Config/Backend/Tablerate.php index 6056d7dbbb79206acb1bbc821790824db609a667..c0b311a1073addee40ce31187c130a2d8f7dfc98 100644 --- a/app/code/Magento/OfflineShipping/Model/Config/Backend/Tablerate.php +++ b/app/code/Magento/OfflineShipping/Model/Config/Backend/Tablerate.php @@ -46,6 +46,8 @@ class Tablerate extends \Magento\Framework\App\Config\Value */ public function afterSave() { - $this->_tablerateFactory->create()->uploadAndImport($this); + /** @var \Magento\OfflineShipping\Model\Resource\Carrier\Tablerate $tableRate */ + $tableRate = $this->_tablerateFactory->create(); + $tableRate->uploadAndImport($this); } } diff --git a/app/code/Magento/OfflineShipping/Model/Observer/SalesRule/ActionsTab.php b/app/code/Magento/OfflineShipping/Model/Observer/SalesRule/ActionsTab.php index b1e56563d747751aa40a5e68d34fbf05dee31348..10068f3d7e548a1d290ddc5dcc98a4e934dcab03 100644 --- a/app/code/Magento/OfflineShipping/Model/Observer/SalesRule/ActionsTab.php +++ b/app/code/Magento/OfflineShipping/Model/Observer/SalesRule/ActionsTab.php @@ -24,22 +24,24 @@ class ActionsTab $form = $observer->getForm(); foreach ($form->getElements() as $element) { /** @var \Magento\Framework\Data\Form\Element\AbstractElement $element */ - if ($element->getId() == 'action_fieldset') { - $element->addField( - 'simple_free_shipping', - 'select', - [ - 'label' => __('Free Shipping'), - 'title' => __('Free Shipping'), - 'name' => 'simple_free_shipping', - 'options' => [ - 0 => __('No'), - Rule::FREE_SHIPPING_ITEM => __('For matching items only'), - Rule::FREE_SHIPPING_ADDRESS => __('For shipment with matching items'), - ] - ] - ); + if ($element->getId() != 'action_fieldset') { + continue; } + + $element->addField( + 'simple_free_shipping', + 'select', + [ + 'label' => __('Free Shipping'), + 'title' => __('Free Shipping'), + 'name' => 'simple_free_shipping', + 'options' => [ + 0 => __('No'), + Rule::FREE_SHIPPING_ITEM => __('For matching items only'), + Rule::FREE_SHIPPING_ADDRESS => __('For shipment with matching items'), + ] + ] + ); } } } 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 6247a343565f386fa8d6b7833a1f864463f69a42..b3bc246030b9386d471eb0819511a097e7edb208 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Checkout cart shipping block plugin * diff --git a/app/code/Magento/OfflineShipping/Model/Quote/Freeshipping.php b/app/code/Magento/OfflineShipping/Model/Quote/Freeshipping.php index 44943d1d9935663ebaf3f94409fea48dab54d7e0..efe7c7f63f4062d051244b81ce6fc64f12953ebc 100644 --- a/app/code/Magento/OfflineShipping/Model/Quote/Freeshipping.php +++ b/app/code/Magento/OfflineShipping/Model/Quote/Freeshipping.php @@ -39,6 +39,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.CyclomaticComplexity) */ public function collect(Address $address) { @@ -93,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/OfflineShipping/Model/Resource/Carrier/Tablerate.php b/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php index 9c58cfb9196f020e9be2ca461b45aa345ede990b..23985af45cddcce41807863f3aa01f40b40dfb14 100644 --- a/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php +++ b/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php @@ -14,6 +14,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 { /** @@ -241,6 +245,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) { @@ -403,6 +409,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 50fb8210de847b77a69fe3fca838c7cd98b7c62f..83b9140a6c6adc3f34b02ceabb225eac10221316 100644 --- a/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php +++ b/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php @@ -57,6 +57,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 99ed432631319828421421921d74add7edf5520a..da41b208c7859b4081ee2ac8d50ae227580cabee 100644 --- a/app/code/Magento/PageCache/Model/App/FrontController/VarnishPlugin.php +++ b/app/code/Magento/PageCache/Model/App/FrontController/VarnishPlugin.php @@ -45,6 +45,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 554d300c2a9996d3815675d59175058c9db31ac2..a9d3bbaaa6e89309eb151c44d7474622b29bce3f 100644 --- a/app/code/Magento/PageCache/Model/Controller/Result/BuiltinPlugin.php +++ b/app/code/Magento/PageCache/Model/Controller/Result/BuiltinPlugin.php @@ -57,6 +57,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/PageCache/view/frontend/templates/js/components.phtml b/app/code/Magento/PageCache/view/frontend/templates/js/components.phtml index 99be8e37348cec69521e018a61f416324e582a94..43f7e9c30c0126f46204910ee749ef83ad81e815 100644 --- a/app/code/Magento/PageCache/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/PageCache/view/frontend/templates/js/components.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php echo $this->getChildHtml() ?> diff --git a/app/code/Magento/Payment/Block/Form/Cc.php b/app/code/Magento/Payment/Block/Form/Cc.php index e6ae5c10e030493187d089d8d7d285376c065077..494e76a7a7580eba2cbdb06aaa66526f33c29cab 100644 --- a/app/code/Magento/Payment/Block/Form/Cc.php +++ b/app/code/Magento/Payment/Block/Form/Cc.php @@ -37,6 +37,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 bb1ecc9dec5b1f4b8efbe76efe96e571268e01d9..533acfaaf234635529a3b42d1a55cfb35ab8565a 100644 --- a/app/code/Magento/Payment/Block/Info.php +++ b/app/code/Magento/Payment/Block/Info.php @@ -114,6 +114,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/Block/Info/Instructions.php b/app/code/Magento/Payment/Block/Info/Instructions.php index 2caeeb5f2f9e65098cdbc7ea5876b7f30ebc4771..55ffee89fa13694ff993d40637e4a2e14c2ba205 100644 --- a/app/code/Magento/Payment/Block/Info/Instructions.php +++ b/app/code/Magento/Payment/Block/Info/Instructions.php @@ -33,7 +33,7 @@ class Instructions extends \Magento\Payment\Block\Info if (is_null($this->_instructions)) { $this->_instructions = $this->getInfo()->getAdditionalInformation( 'instructions' - ) ?: $this->getMethod()->getInstructions(); + ) ?: $this->getMethod()->getConfigData('instructions'); } return $this->_instructions; } diff --git a/app/code/Magento/Payment/Helper/Data.php b/app/code/Magento/Payment/Helper/Data.php index ea221a6b8d3843863b4d70ce460e8f6ba5075812..6f77f919472e893a745e1ae516f3c7dc88e90cac 100644 --- a/app/code/Magento/Payment/Helper/Data.php +++ b/app/code/Magento/Payment/Helper/Data.php @@ -18,6 +18,7 @@ use Magento\Payment\Model\MethodInterface; /** * Payment module base helper + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Data extends \Magento\Framework\App\Helper\AbstractHelper { @@ -52,7 +53,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper /** * App emulation model * - * @var \Magento\Core\Model\App\Emulation + * @var \Magento\Store\Model\App\Emulation */ protected $_appEmulation; @@ -68,7 +69,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param LayoutFactory $layoutFactory * @param \Magento\Payment\Model\Method\Factory $paymentMethodFactory - * @param \Magento\Core\Model\App\Emulation $appEmulation + * @param \Magento\Store\Model\App\Emulation $appEmulation * @param \Magento\Payment\Model\Config $paymentConfig * @param \Magento\Framework\App\Config\Initial $initialConfig */ @@ -77,7 +78,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, LayoutFactory $layoutFactory, \Magento\Payment\Model\Method\Factory $paymentMethodFactory, - \Magento\Core\Model\App\Emulation $appEmulation, + \Magento\Store\Model\App\Emulation $appEmulation, \Magento\Payment\Model\Config $paymentConfig, \Magento\Framework\App\Config\Initial $initialConfig ) { @@ -265,6 +266,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 6774295014abb326ea1e5e6f9281e6a373421ddb..d34a730f44babe204a2412b7e2f70ff9cdd2f83d 100644 --- a/app/code/Magento/Payment/Model/Method/AbstractMethod.php +++ b/app/code/Magento/Payment/Model/Method/AbstractMethod.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Payment\Model\Method; use Magento\Payment\Model\Checks\PaymentMethodChecksInterface; @@ -13,6 +16,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 { @@ -305,6 +310,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) { @@ -358,6 +364,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) { @@ -419,6 +426,7 @@ abstract class AbstractMethod extends \Magento\Framework\Object implements Metho * * @param string $currencyCode * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function canUseForCurrency($currencyCode) { @@ -507,6 +515,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) { @@ -524,6 +533,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) { @@ -541,6 +551,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) { @@ -588,6 +599,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) { @@ -615,6 +627,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) { @@ -641,6 +654,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) { @@ -761,6 +775,7 @@ abstract class AbstractMethod extends \Magento\Framework\Object implements Metho * @param object $stateObject * * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function initialize($paymentAction, $stateObject) { @@ -795,6 +810,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/Payment/view/adminhtml/templates/form/cc.phtml b/app/code/Magento/Payment/view/adminhtml/templates/form/cc.phtml index b09d32a295e68627a3615e2549d65a3ef75a3155..847af50f37e715fdd4062a9995a1295343095434 100644 --- a/app/code/Magento/Payment/view/adminhtml/templates/form/cc.phtml +++ b/app/code/Magento/Payment/view/adminhtml/templates/form/cc.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4ea8730a2d41bde140539bc5f21830dcbdfcde7e..cd03f7eab0e8fbefc664145bcf4d9834f012c5f1 100644 --- a/app/code/Magento/Payment/view/adminhtml/templates/info/default.phtml +++ b/app/code/Magento/Payment/view/adminhtml/templates/info/default.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c9dca93608218775b29f47fdea889eee4cbc9852..33159eaea14a5e42a5e511ec48bc425d37c10d73 100644 --- a/app/code/Magento/Payment/view/adminhtml/templates/info/instructions.phtml +++ b/app/code/Magento/Payment/view/adminhtml/templates/info/instructions.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 0134ea7b75a058a22dd10f904b419595c9fa837a..2002851d2a93a6f2df4aa05b22920cd9b7da1670 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4f5041d28690184aea99e5414f7ee4ea5f0d6f66..27b52b5c34dd6a4dda17e49dcf82bf345dc5fb6e 100644 --- a/app/code/Magento/Payment/view/adminhtml/templates/info/substitution.phtml +++ b/app/code/Magento/Payment/view/adminhtml/templates/info/substitution.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ba983304f5d2f6ba5f914df8788039c46db1f543..f551c252a4ce658ba14e1d7bfbddefbb4edf1b12 100644 --- a/app/code/Magento/Payment/view/frontend/templates/form/cc.phtml +++ b/app/code/Magento/Payment/view/frontend/templates/form/cc.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b198076a0ab6d8e5839aeb65cff0c2d9c3822ee2..8ae798f3353f7bac36a68d53e6d66a045a968e8c 100644 --- a/app/code/Magento/Payment/view/frontend/templates/info/default.phtml +++ b/app/code/Magento/Payment/view/frontend/templates/info/default.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9aa879810df38bf7366917fb0b50e8f69afaac16..9412214833d7a5b4be37d30a360ab2e6e6848439 100644 --- a/app/code/Magento/Payment/view/frontend/templates/info/instructions.phtml +++ b/app/code/Magento/Payment/view/frontend/templates/info/instructions.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Persistent/Helper/Data.php b/app/code/Magento/Persistent/Helper/Data.php index 002dd36c26519ee2e9ad34d9370d2c7fd09476f1..b5b23229d72709f1e4e053fd64e1569410781297 100644 --- a/app/code/Magento/Persistent/Helper/Data.php +++ b/app/code/Magento/Persistent/Helper/Data.php @@ -157,6 +157,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() { @@ -191,6 +192,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 bbe563dd26d0c935eb266c9833ea0816f2b3ec07..8594aae8e72032ef5cd5752a9c22a5513ef31b24 100644 --- a/app/code/Magento/Persistent/Model/Observer/ClearExpiredCronJob.php +++ b/app/code/Magento/Persistent/Model/Observer/ClearExpiredCronJob.php @@ -39,6 +39,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 fe0d75eb032597228bfdd39e2f93ffaf64a333f6..598ddfd82a3b529000c263b22ef07bf3fe3a76d5 100644 --- a/app/code/Magento/Persistent/Model/Observer/CustomerAuthenticatedEvent.php +++ b/app/code/Magento/Persistent/Model/Observer/CustomerAuthenticatedEvent.php @@ -47,6 +47,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 d2c0159dc2b8f92600968113b45e79413719d3cd..1576a9828fe0c1e081d404144e9d8d3dd95614ce 100644 --- a/app/code/Magento/Persistent/Model/Observer/Session.php +++ b/app/code/Magento/Persistent/Model/Observer/Session.php @@ -73,6 +73,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 457bc9f44f5689236fc28aad61e13580a6bbd528..c72e99656119e59a557c5a788e14cd79d30d4c0f 100644 --- a/app/code/Magento/Persistent/Model/Observer/SetLoadPersistentQuote.php +++ b/app/code/Magento/Persistent/Model/Observer/SetLoadPersistentQuote.php @@ -59,6 +59,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 e69c4638d7d700256668f601b1aa9b441bc78841..afd932a75f7147222b469b3dbe41698d33f8e511 100644 --- a/app/code/Magento/Persistent/Model/Session.php +++ b/app/code/Magento/Persistent/Model/Session.php @@ -110,6 +110,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, @@ -163,6 +164,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/Persistent/view/frontend/templates/remember_me.phtml b/app/code/Magento/Persistent/view/frontend/templates/remember_me.phtml index 2b1ce8436c005211b47f8f63026925ebfe335605..b5f9f08ab86167ae093072d67391c17a647eb050 100644 --- a/app/code/Magento/Persistent/view/frontend/templates/remember_me.phtml +++ b/app/code/Magento/Persistent/view/frontend/templates/remember_me.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/ProductAlert/Block/Email/AbstractEmail.php b/app/code/Magento/ProductAlert/Block/Email/AbstractEmail.php index f1782cccf53413187e831c492a5a79ae584f91c8..b44dd2ca416aa8042f0814493f21f7c3386e9f66 100644 --- a/app/code/Magento/ProductAlert/Block/Email/AbstractEmail.php +++ b/app/code/Magento/ProductAlert/Block/Email/AbstractEmail.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\ProductAlert\Block\Email; use Magento\Framework\Pricing\PriceCurrencyInterface; diff --git a/app/code/Magento/ProductAlert/Model/Email.php b/app/code/Magento/ProductAlert/Model/Email.php index f90b089bfdead24d0a6385e43eb05fed9ba4eb08..395d2d9bef1416d60602e56d3dce9b3d8fdf1ea9 100644 --- a/app/code/Magento/ProductAlert/Model/Email.php +++ b/app/code/Magento/ProductAlert/Model/Email.php @@ -9,6 +9,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 { @@ -92,7 +93,7 @@ class Email extends \Magento\Framework\Model\AbstractModel protected $customerRepository; /** - * @var \Magento\Core\Model\App\Emulation + * @var \Magento\Store\Model\App\Emulation */ protected $_appEmulation; @@ -114,11 +115,12 @@ class Email extends \Magento\Framework\Model\AbstractModel * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository * @param \Magento\Customer\Helper\View $customerHelper - * @param \Magento\Core\Model\App\Emulation $appEmulation + * @param \Magento\Store\Model\App\Emulation $appEmulation * @param \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder * @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, @@ -128,7 +130,7 @@ class Email extends \Magento\Framework\Model\AbstractModel \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository, \Magento\Customer\Helper\View $customerHelper, - \Magento\Core\Model\App\Emulation $appEmulation, + \Magento\Store\Model\App\Emulation $appEmulation, \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, @@ -281,6 +283,9 @@ class Email extends \Magento\Framework\Model\AbstractModel * Send customer email * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function send() { diff --git a/app/code/Magento/ProductAlert/Model/Observer.php b/app/code/Magento/ProductAlert/Model/Observer.php index d2b238b0848d75218891109f7ad1f7e61cc57d5e..3a601e4518b66c4723ce26606c6c0c5b7be12313 100644 --- a/app/code/Magento/ProductAlert/Model/Observer.php +++ b/app/code/Magento/ProductAlert/Model/Observer.php @@ -9,6 +9,7 @@ namespace Magento\ProductAlert\Model; * ProductAlert observer * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Observer { @@ -124,6 +125,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, @@ -173,6 +175,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) { @@ -258,6 +262,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 09a8a75d559c13e49468b1b7edaee82fa41de1d4..af2fc5b9153a9eff477bea7d7cb6ef12c2f7ffa4 100644 --- a/app/code/Magento/ProductAlert/Model/Resource/AbstractResource.php +++ b/app/code/Magento/ProductAlert/Model/Resource/AbstractResource.php @@ -63,6 +63,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/ProductAlert/Model/Resource/Price.php b/app/code/Magento/ProductAlert/Model/Resource/Price.php index b68c190d5c17bc1547f210d4ccce96dfdfbe42a5..1d457c4981b8aad76045c297b70a075f1999d612 100644 --- a/app/code/Magento/ProductAlert/Model/Resource/Price.php +++ b/app/code/Magento/ProductAlert/Model/Resource/Price.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6e48aee304c7a2c7ec8a3c6bd5164e08fc38797f..637aaea87065da8126fce215618a2a3d2465048d 100644 --- a/app/code/Magento/ProductAlert/Model/Resource/Stock.php +++ b/app/code/Magento/ProductAlert/Model/Resource/Stock.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 aade28e6ed550c509f93a4120c2d5a8c26c28def..2720ccca2c986eaf25e31689ddaca965c5ea7f33 100644 --- a/app/code/Magento/ProductAlert/view/frontend/templates/email/price.phtml +++ b/app/code/Magento/ProductAlert/view/frontend/templates/email/price.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 83a65caa63ed4754200127f8662a2a7105661293..a18b63ee5a353a180608bc00353393b0b81d251b 100644 --- a/app/code/Magento/ProductAlert/view/frontend/templates/email/stock.phtml +++ b/app/code/Magento/ProductAlert/view/frontend/templates/email/stock.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** @var $this \Magento\ProductAlert\Block\Email\Stock */ ?> <?php if ($_products = $this->getProducts()): ?> diff --git a/app/code/Magento/Quote/Model/Quote.php b/app/code/Magento/Quote/Model/Quote.php index 57cc6983b6228a645a1e9628a32836be3cf17b61..16c402d18bf8344fb057fb6dc35119b11c536c68 100644 --- a/app/code/Magento/Quote/Model/Quote.php +++ b/app/code/Magento/Quote/Model/Quote.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Quote\Model; use Magento\Customer\Api\Data\CustomerInterface; @@ -119,6 +122,10 @@ use Magento\Sales\Model\Status; * @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 { @@ -360,6 +367,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, @@ -1060,6 +1068,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) { @@ -1269,6 +1278,8 @@ class Quote extends \Magento\Framework\Model\AbstractModel * @param null|string $processMode * @return \Magento\Quote\Model\Quote\Item|string * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function addProduct( \Magento\Catalog\Model\Product $product, @@ -1356,6 +1367,7 @@ class Quote extends \Magento\Framework\Model\AbstractModel * @param \Magento\Catalog\Model\Product $product * @param int $qty * @return \Magento\Quote\Model\Quote\Item + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _addCatalogProduct(\Magento\Catalog\Model\Product $product, $qty = 1) { @@ -1410,6 +1422,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) { @@ -1586,6 +1599,7 @@ class Quote extends \Magento\Framework\Model\AbstractModel /** * @param string $paymentId * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getPaymentById($paymentId) { @@ -1918,6 +1932,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) { @@ -2008,6 +2023,8 @@ class Quote extends \Magento\Framework\Model\AbstractModel /** * @param bool $multishipping * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validateMinimumAmount($multishipping = false) { @@ -2099,6 +2116,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/Quote/Model/Quote/Address.php b/app/code/Magento/Quote/Model/Quote/Address.php index 8435303c8dff0ea595474ae4b39b537c6a493ec0..ebdadc8f67809fee7b36efae95df8dd21d975886 100644 --- a/app/code/Magento/Quote/Model/Quote/Address.php +++ b/app/code/Magento/Quote/Model/Quote/Address.php @@ -112,6 +112,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 { @@ -263,6 +267,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, @@ -561,6 +566,8 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress * Get all available address items * * @return \Magento\Quote\Model\Quote\Address\Item[] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getAllItems() { @@ -949,6 +956,8 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress * * @param \Magento\Quote\Model\Quote\Item\AbstractItem $item * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function requestShippingRates(\Magento\Quote\Model\Quote\Item\AbstractItem $item = null) { @@ -1176,6 +1185,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) { @@ -1188,6 +1198,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/Quote/Model/Quote/Address/Total/AbstractTotal.php b/app/code/Magento/Quote/Model/Quote/Address/Total/AbstractTotal.php index 43371a61ac4e8dfad061af4156e3a401c988525f..3fc97522eaa26de16783c9eba121a8bc8efc7d5b 100644 --- a/app/code/Magento/Quote/Model/Quote/Address/Total/AbstractTotal.php +++ b/app/code/Magento/Quote/Model/Quote/Address/Total/AbstractTotal.php @@ -7,6 +7,7 @@ namespace Magento\Quote\Model\Quote\Address\Total; /** * Sales Quote Address Total abstract model + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractTotal { @@ -231,6 +232,7 @@ abstract class AbstractTotal * * @param \Magento\Quote\Model\Quote\Item\AbstractItem $item * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsItemRowTotalCompoundable(\Magento\Quote\Model\Quote\Item\AbstractItem $item) { @@ -247,6 +249,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/Quote/Model/Quote/Address/Total/Collector.php b/app/code/Magento/Quote/Model/Quote/Address/Total/Collector.php index 871f25cca448fc7cac24a5c7fad66e3aa5bf61ea..bc19616dd902fc7882111f38db335d6daddb5377 100644 --- a/app/code/Magento/Quote/Model/Quote/Address/Total/Collector.php +++ b/app/code/Magento/Quote/Model/Quote/Address/Total/Collector.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Quote\Model\Quote\Address\Total; /** @@ -138,6 +141,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/Quote/Model/Quote/Address/Total/Discount.php b/app/code/Magento/Quote/Model/Quote/Address/Total/Discount.php index 0b966bc1f09aad641b5a02bc7418a715d7fd8c62..aa50ef3fbe82259882832ba86d04269c49ebdd72 100644 --- a/app/code/Magento/Quote/Model/Quote/Address/Total/Discount.php +++ b/app/code/Magento/Quote/Model/Quote/Address/Total/Discount.php @@ -34,6 +34,7 @@ class Discount extends \Magento\Quote\Model\Quote\Address\Total\AbstractTotal /** * @param \Magento\Quote\Model\Quote\Address $address * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function collect(\Magento\Quote\Model\Quote\Address $address) { diff --git a/app/code/Magento/Quote/Model/Quote/Address/Total/Shipping.php b/app/code/Magento/Quote/Model/Quote/Address/Total/Shipping.php index 74c617ff304232d2febe75f2ed3ad6956900f967..50627185999fdf43dca48fda3b112f9b858c0d59 100644 --- a/app/code/Magento/Quote/Model/Quote/Address/Total/Shipping.php +++ b/app/code/Magento/Quote/Model/Quote/Address/Total/Shipping.php @@ -29,6 +29,9 @@ class Shipping extends \Magento\Quote\Model\Quote\Address\Total\AbstractTotal * * @param \Magento\Quote\Model\Quote\Address $address * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function collect(\Magento\Quote\Model\Quote\Address $address) { diff --git a/app/code/Magento/Quote/Model/Quote/Address/Total/Tax.php b/app/code/Magento/Quote/Model/Quote/Address/Total/Tax.php index 5cb075d4fad977c32e4261413055030c9c3f6f19..d2ed16c319f8f96ae39edcf8ff44ac7216e5e800 100644 --- a/app/code/Magento/Quote/Model/Quote/Address/Total/Tax.php +++ b/app/code/Magento/Quote/Model/Quote/Address/Total/Tax.php @@ -60,6 +60,9 @@ class Tax extends \Magento\Quote\Model\Quote\Address\Total\AbstractTotal /** * @param \Magento\Quote\Model\Quote\Address $address * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function collect(\Magento\Quote\Model\Quote\Address $address) { diff --git a/app/code/Magento/Quote/Model/Quote/Item.php b/app/code/Magento/Quote/Model/Quote/Item.php index 27808700ed1fe43fc53dbb2995e46c2c2830a3f2..5cc00a9e3c50ed2bc4ba9fc85893fcbb32f74b06 100644 --- a/app/code/Magento/Quote/Model/Quote/Item.php +++ b/app/code/Magento/Quote/Model/Quote/Item.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Quote\Model\Quote; /** @@ -97,6 +100,7 @@ namespace Magento\Quote\Model\Quote; * @method null|bool getHasConfigurationUnavailableError() * @method \Magento\Quote\Model\Quote\Item setHasConfigurationUnavailableError(bool $value) * @method \Magento\Quote\Model\Quote\Item unsHasConfigurationUnavailableError() + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Item extends \Magento\Quote\Model\Quote\Item\AbstractItem { diff --git a/app/code/Magento/Quote/Model/Quote/Item/AbstractItem.php b/app/code/Magento/Quote/Model/Quote/Item/AbstractItem.php index 898ee30862e3590c92a53c127b83bdbd65fd5fa0..e6ba9a34bb09edb87338c38ad5b4d30dd4f26b62 100644 --- a/app/code/Magento/Quote/Model/Quote/Item/AbstractItem.php +++ b/app/code/Magento/Quote/Model/Quote/Item/AbstractItem.php @@ -42,6 +42,7 @@ use Magento\Quote\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/Quote/Model/Quote/Item/Updater.php b/app/code/Magento/Quote/Model/Quote/Item/Updater.php index c1bff61908606e8bc9bccd7e587ec1c993ff0f8a..a71d872dc76405a5df8e3965c45d7b4014ad7e50 100644 --- a/app/code/Magento/Quote/Model/Quote/Item/Updater.php +++ b/app/code/Magento/Quote/Model/Quote/Item/Updater.php @@ -55,6 +55,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/Quote/Model/Quote/Payment.php b/app/code/Magento/Quote/Model/Quote/Payment.php index b7ae2cf005ca8772d96216a5784f761e42019088..fb06beae42cf99780f51eb6ae8ca117495eb06d7 100644 --- a/app/code/Magento/Quote/Model/Quote/Payment.php +++ b/app/code/Magento/Quote/Model/Quote/Payment.php @@ -42,6 +42,7 @@ use Magento\Framework\Api\AttributeDataBuilder; * @method \Magento\Quote\Model\Quote\Payment setCcSsIssue(string $value) * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Payment extends \Magento\Payment\Model\Info { @@ -78,6 +79,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/Quote/Model/QuoteRepository/Plugin/Authorization.php b/app/code/Magento/Quote/Model/QuoteRepository/Plugin/Authorization.php index 9af85c916acdb18621cd428cf152dee24431f751..14b7752728d1143352592b7a567cac0f57653c48 100644 --- a/app/code/Magento/Quote/Model/QuoteRepository/Plugin/Authorization.php +++ b/app/code/Magento/Quote/Model/QuoteRepository/Plugin/Authorization.php @@ -32,6 +32,7 @@ class Authorization * @param \Magento\Quote\Model\Quote $quote * @return \Magento\Quote\Model\Quote * @throws \Magento\Framework\Exception\NoSuchEntityException + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterGetActive( \Magento\Quote\Model\QuoteRepository $subject, @@ -50,6 +51,7 @@ class Authorization * @param \Magento\Quote\Model\Quote $quote * @return \Magento\Quote\Model\Quote * @throws \Magento\Framework\Exception\NoSuchEntityException + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterGetActiveForCustomer( \Magento\Quote\Model\QuoteRepository $subject, diff --git a/app/code/Magento/Quote/Model/Resource/Quote.php b/app/code/Magento/Quote/Model/Resource/Quote.php index d712a93ee3bb1bd2d1d0fa4345a7915df74dc83c..fac8e129483c30bc6eec359ad5a3f77d7d207f54 100644 --- a/app/code/Magento/Quote/Model/Resource/Quote.php +++ b/app/code/Magento/Quote/Model/Resource/Quote.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Quote\Model\Resource; use Magento\Framework\Model\Resource\Db\AbstractDb; diff --git a/app/code/Magento/Quote/Model/Resource/Quote/Address/Attribute/Backend.php b/app/code/Magento/Quote/Model/Resource/Quote/Address/Attribute/Backend.php index ad0bff45a3cac4897ddb80f699b15cf32a468677..7724381733562f8017326482fe15e78ce2c74125 100644 --- a/app/code/Magento/Quote/Model/Resource/Quote/Address/Attribute/Backend.php +++ b/app/code/Magento/Quote/Model/Resource/Quote/Address/Attribute/Backend.php @@ -17,6 +17,7 @@ class Backend extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBacken * * @param \Magento\Quote\Model\Quote\Address $address * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function collectTotals(\Magento\Quote\Model\Quote\Address $address) { diff --git a/app/code/Magento/Quote/Model/Resource/Quote/Address/Attribute/Frontend.php b/app/code/Magento/Quote/Model/Resource/Quote/Address/Attribute/Frontend.php index 4b834adc23fdf19f36faf7ce5d3880ced9e53b25..32351c123247545a2271167d28944cef0cead38f 100644 --- a/app/code/Magento/Quote/Model/Resource/Quote/Address/Attribute/Frontend.php +++ b/app/code/Magento/Quote/Model/Resource/Quote/Address/Attribute/Frontend.php @@ -17,6 +17,7 @@ class Frontend extends \Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFron * * @param \Magento\Quote\Model\Quote\Address $address * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function fetchTotals(\Magento\Quote\Model\Quote\Address $address) { diff --git a/app/code/Magento/Quote/Model/Resource/Quote/Item/Collection.php b/app/code/Magento/Quote/Model/Resource/Quote/Item/Collection.php index 9c0b2bc67e38ead743bbf9f543ba98e17f7bb157..3de177e2915b46febf6b118e1046426fe4897227 100644 --- a/app/code/Magento/Quote/Model/Resource/Quote/Item/Collection.php +++ b/app/code/Magento/Quote/Model/Resource/Quote/Item/Collection.php @@ -183,6 +183,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/Reports/Block/Adminhtml/Config/Form/Field/YtdStart.php b/app/code/Magento/Reports/Block/Adminhtml/Config/Form/Field/YtdStart.php index 228564cad23ace5763b6a85ed951c69898007eb6..046bfe1aa2dd769dfbba0bd69f4a7edccc6ac986 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 @@ -17,6 +17,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 b91ef443699a08d24b2cd986792051c3987d80fb..3399d0bd34b4234e35ca6b2ab5216a867ee0a573 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Filter/Form.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Filter/Form.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Block\Adminhtml\Filter; /** @@ -52,6 +55,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 d7a3c99fb0115d9ce0eb1d4ee3e0237d402760a6..ffe52417938c1a70831f6e7c517b0f5615ae7526 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Grid.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Block\Adminhtml; /** @@ -72,6 +75,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid * Apply sorting and filtering to collection * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareCollection() { @@ -184,6 +188,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid * * @param array $data * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _setFilterValues($data) { @@ -209,6 +214,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid * Return visibility of store switcher * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getStoreSwitcherVisibility() { @@ -241,6 +247,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 fa7e3329043384c732681d55173156f17a4fdb9f..7404aa6600f66404e4095e46dc38a4778fec27d8 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Grid/AbstractGrid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Grid/AbstractGrid.php @@ -186,6 +186,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() { @@ -393,6 +395,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/Grid/Column/Renderer/Currency.php b/app/code/Magento/Reports/Block/Adminhtml/Grid/Column/Renderer/Currency.php index 2af3ddc72cc47361557175da03445fb6ee176af8..ac9cf8c700bd7efc13558d6fb0161388dd2de4e3 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Block\Adminhtml\Grid\Column\Renderer; /** 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 4bc033806c14078cbd3020398da56d72613b0f05..b97781a1f04d98982deac868243fff14e8a7bc1c 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Product/Viewed/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Product/Viewed/Grid.php @@ -9,6 +9,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 d12f64956c96f8f2ac7f3318710e30cabca91007..d6820a811970fded00679f36d5ad6564ccae7e36 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Bestsellers/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Bestsellers/Grid.php @@ -9,6 +9,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 c8b8e1183de07842bea4a665d7c14a6064a8a052..c04265b1c531f9c8eaef861a81eacdd8998afc84 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons/Grid.php @@ -9,6 +9,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 { @@ -41,6 +42,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 c5eec01ddc391c29ddf452dbe5af063ca5ba9d60..414c2e775872a1e9a36795e820c9b417533c1416 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced/Grid.php @@ -3,12 +3,16 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + 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 282d9ae30336d1d8ddb88db0a1e5f002c2d5430b..e5f68a315f74013a51de8df19dc74cfbc996efb5 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded/Grid.php @@ -3,12 +3,16 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + 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 2820a424a76ae72f9f5f5537c5f47670fd5df07b..012e170b2c269dac90cdd6b43d1461edf4aa4ee4 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales/Grid.php @@ -3,12 +3,16 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + 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 { @@ -39,6 +43,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 4dc7d8fefe70cede14472c30621f94a86ef386ee..ee594aaa3447565990652114cee7ba498b1f3011 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping/Grid.php @@ -3,12 +3,16 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + 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 c565dcf44b89689878bd729dddf4086889039f61..48c3a647299b4b3cc76dde1dd63ed36a0e05f7a2 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax/Grid.php @@ -3,12 +3,16 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + 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 { @@ -153,6 +157,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 bb2252e78fd86861b74136f18fa54980b349656c..4ef5903836cc0b82e097b768f1f59f7ec672cd6a 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php @@ -9,6 +9,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 { @@ -86,6 +87,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 c509eeeac0260ef025ecde47ee8a857606740517..4d5fab61661678b4838b8c17996dfe0e9e80f7f6 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Customer/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Customer/Grid.php @@ -9,6 +9,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 cd49650ef6b6424fcf9992a7f3b03b43ea42b818..a4837b8f21861bff88ee59dd564d207c4eab75a5 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Product/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Product/Grid.php @@ -9,6 +9,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/Block/Adminhtml/Wishlist.php b/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php index e60807dfc45023fbc533f65ad1f4a1ec45b85f28..690c98b4d692559de2d645c23623801f0ebe4705 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2ce868921e363dc1b880d48f363635e6096fadd4..6693d0053ea87edac053ff4e54bb3ada3de04152 100644 --- a/app/code/Magento/Reports/Block/Product/Compared.php +++ b/app/code/Magento/Reports/Block/Product/Compared.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c34b21cc73fe01436635bf60d0173e2474c6e529..addfa8cafd53a941194c033bbcdc9f9978b393e0 100644 --- a/app/code/Magento/Reports/Block/Product/Viewed.php +++ b/app/code/Magento/Reports/Block/Product/Viewed.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Block\Product; /** diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales.php index c91b2f4c2bb3d21862c8305cd6ca29c528c9d322..cbb4b377759a9ad8567430b2761a43cbd2a53f50 100644 --- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales.php +++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales.php @@ -11,6 +11,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 74d44adbb953470466c071ec903674f3aa21473c..7553ee48de465cc896f4dc1d07015272b579be43 100644 --- a/app/code/Magento/Reports/Helper/Data.php +++ b/app/code/Magento/Reports/Helper/Data.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Reports data helper */ @@ -42,6 +44,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/DateFactory.php b/app/code/Magento/Reports/Model/DateFactory.php index fce16f4badf058e171e2b8ed296240a196308ed8..b604af9135446a9aea30ce5a684cd1fd1c68b5e4 100644 --- a/app/code/Magento/Reports/Model/DateFactory.php +++ b/app/code/Magento/Reports/Model/DateFactory.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Model; class DateFactory diff --git a/app/code/Magento/Reports/Model/Event/Observer.php b/app/code/Magento/Reports/Model/Event/Observer.php index 7d03a411baf273158b5f8f20d720e241605eba7f..0283cf6e15df5dcca6fabe573da3882bd2ce61e1 100644 --- a/app/code/Magento/Reports/Model/Event/Observer.php +++ b/app/code/Magento/Reports/Model/Event/Observer.php @@ -107,6 +107,7 @@ class Observer * * @param \Magento\Framework\Event\Observer $observer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function customerLogin(\Magento\Framework\Event\Observer $observer) { @@ -130,6 +131,7 @@ class Observer * * @param \Magento\Framework\Event\Observer $observer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function customerLogout(\Magento\Framework\Event\Observer $observer) { @@ -182,6 +184,7 @@ class Observer * * @param \Magento\Framework\Event\Observer $observer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function catalogProductCompareRemoveProduct(\Magento\Framework\Event\Observer $observer) { @@ -197,6 +200,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 02611d3f133fe6ec56840461cbcf6266ce522021..ecc9c805e91722136affdff251c4123ca873613c 100644 --- a/app/code/Magento/Reports/Model/Item.php +++ b/app/code/Magento/Reports/Model/Item.php @@ -33,6 +33,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 1fc837231ebc487c10adbfd29f33f386b9678727..4d3ca4716833f3ba99cd5dae823c9085e92880c6 100644 --- a/app/code/Magento/Reports/Model/Product/Index/AbstractIndex.php +++ b/app/code/Magento/Reports/Model/Product/Index/AbstractIndex.php @@ -59,6 +59,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 b1af74dc46abb1df4dac7398ee33a3f18d8a6f57..2bf6917f348786a75cce710579f3fa04b588278e 100644 --- a/app/code/Magento/Reports/Model/Product/Index/Compared.php +++ b/app/code/Magento/Reports/Model/Product/Index/Compared.php @@ -49,6 +49,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 dc3c8db4fffb6f5bb46094cdbb5bad6e976e124d..0e8ca1d37f81aa6291fe7c5594d1bc89f1c28339 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Reports summary collection * @@ -84,6 +86,7 @@ class AbstractCollection extends \Magento\Framework\Data\Collection * * @param int $period * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setDatePeriod($period) { @@ -95,6 +98,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 787e8d36c28102245e71e9c719f6d1c12c9d91ad..313876eb8d89a67752d069a4bc37281806c475c3 100644 --- a/app/code/Magento/Reports/Model/Resource/Event.php +++ b/app/code/Magento/Reports/Model/Resource/Event.php @@ -55,6 +55,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 = []) { @@ -169,6 +170,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 06f1ed962c9cc6defe373e4d21c74bbd43137b89..bc04bbe5a5c58ede12b689729a898570dabd975d 100644 --- a/app/code/Magento/Reports/Model/Resource/Order/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Order/Collection.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Model\Resource\Order; use Magento\Framework\DB\Select; @@ -11,6 +14,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 { @@ -106,6 +110,7 @@ class Collection extends \Magento\Sales\Model\Resource\Order\Collection * * @param string $range * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function checkIsLive($range) { @@ -362,6 +367,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) { @@ -384,6 +390,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) { @@ -540,6 +547,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 97228e4d29cf1986e12c0f4a4ec3ee4b511b092b..0ebba9cca35cf36d1db35a6d1f180ab41f9437a8 100644 --- a/app/code/Magento/Reports/Model/Resource/Product/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Product/Collection.php @@ -11,6 +11,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/AbstractIndex.php b/app/code/Magento/Reports/Model/Resource/Product/Index/AbstractIndex.php index bbdc48439e66bcfd5491bd84ee90bd48d0c05ce2..9397a7272a74dca2c3528452579a8da4b45074c3 100644 --- a/app/code/Magento/Reports/Model/Resource/Product/Index/AbstractIndex.php +++ b/app/code/Magento/Reports/Model/Resource/Product/Index/AbstractIndex.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Model\Resource\Product\Index; /** 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 aaa46e3164cbc443249026feca7d1a6225e8d6cc..0da793945459bf645a4d73b07aa73364c708e7b0 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 @@ -11,6 +11,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 bb7310d9760f8aa7c8bdb38e91b91c35a39bfb65..891dbabb61f921a2ea2a1d6ee19df22b47c90b0f 100644 --- a/app/code/Magento/Reports/Model/Resource/Product/Lowstock/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Product/Lowstock/Collection.php @@ -11,6 +11,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/Quote/Collection.php b/app/code/Magento/Reports/Model/Resource/Quote/Collection.php index 197cb90347cf39ef16a487f7324cf78d57dafa94..6ff03c604e1ce160363d445ad0b83b5746bc3b81 100644 --- a/app/code/Magento/Reports/Model/Resource/Quote/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Quote/Collection.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 3c74db144db62de0d74452f6e240943f1443334c..0ffd17fd9c7db31aacb03cee226c4fa8e248300e 100644 --- a/app/code/Magento/Reports/Model/Resource/Report/AbstractReport.php +++ b/app/code/Magento/Reports/Model/Resource/Report/AbstractReport.php @@ -4,10 +4,13 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Reports\Model\Resource\Report; /** * Abstract report aggregate resource model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractReport extends \Magento\Framework\Model\Resource\Db\AbstractDb { @@ -276,6 +279,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 e86195185f3ec82db748b153ae3238c8ea9c31dd..4f14518968734f06696080d5d9051f866b8969db 100644 --- a/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed.php +++ b/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Most viewed product report aggregate resource model * @@ -79,6 +81,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 24c60fec3319941ea5706d47049eea1d83d1c8e7..2f06240e07d106a9c9750be5a0e69b05e139bcb4 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 @@ -4,11 +4,16 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Report most viewed collection */ namespace Magento\Reports\Model\Resource\Report\Product\Viewed; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Collection extends \Magento\Reports\Model\Resource\Report\Collection\AbstractCollection { /** @@ -219,6 +224,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 cfd2365c682343b49c37f48e55a2f42ec9ae5868..c2abe745e0a17bb06902b8799f263c6a792ece3f 100644 --- a/app/code/Magento/Reports/Model/Resource/Review/Customer/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Review/Customer/Collection.php @@ -29,6 +29,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 9a5f19c6c32c8321f3e85c39cbed38f6fe16d3b8..8c251de78d6bd554fe73729dcef77b779fcd000d 100644 --- a/app/code/Magento/Reports/Model/Resource/Shopcart/Product/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Shopcart/Product/Collection.php @@ -32,6 +32,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 0982638cb8ecfdf4b915b718351ea640d34257e4..75fbaaed53317b09e1ccafb5a91a1c605d090895 100644 --- a/app/code/Magento/Reports/Model/Totals.php +++ b/app/code/Magento/Reports/Model/Totals.php @@ -19,6 +19,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/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 daf541ed3b51441d170351cc9cd4de16fb8d291e..1273bbcde6890a7248e8f9aef3c67b38c3f1d841 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 d12eb397e687c6c2ab1b72a7e9c8efe5e0ae6193..146ab829796fd14034ff7f8e49f407a3dd1ceacd 100644 --- a/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml +++ b/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 94fe3484a36f351443554f3b85374060dbfcecfe..23a52b20aa483327946a12545a4eb05640f6e38f 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 027ef242060ef664342626560cb84bd09d5eceec..476eb5940c95c5eca090a4f04459bfd204a56abe 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b4c27a635baa070eed5769a49e178ee0e577ff2d..6acf5ebffcc52bd993f0108924fd4da2cd31657c 100644 --- a/app/code/Magento/Reports/view/adminhtml/templates/store/switcher.phtml +++ b/app/code/Magento/Reports/view/adminhtml/templates/store/switcher.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 dc6182ad1eb9d1f46b9707a9dacb5464d03700ba..38233a4477095b6dbb38bf6e6d1a9e097763d93f 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 99be8e37348cec69521e018a61f416324e582a94..43f7e9c30c0126f46204910ee749ef83ad81e815 100644 --- a/app/code/Magento/Reports/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/js/components.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 deba99b44ca68572a76a58d7e50756a53530118e..9366134008b7bb551374b63af5ddbbfa5dc2a716 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3d60dc094b0f3abe8975fce65019f64a7cbf7c72..6a034ee7a4f67c668790e8d22441d8dfecad82f3 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 152cd7ac497cf44baa651503392b39aedd025161..dc783681253441bd9eb5091e80ee201b7d3b099d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c7f31e7f2661b669953557b977af42f27c290d80..34d6dc69024ca54502810fd6b7733e4f7acd9fc9 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 edd4a24b9ab6415e238c55c2efc0d6426b0afded..4839a54647868a74a0899721cbd7434c74ae4f90 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ab08bb94387347a2ccc263d62ddb0238a505ed93..9d7790176f57041c04c3f51cd838756cba79a9f7 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d9e54ff22d9bac41ed88295427e494861235c561..0b52ca4664c235b0e6f4a9237e4456ff629cbc57 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 14496071a749893e8352ed902c37afe4317af3f9..3f2285905c7ea3fd7282bdad1a2eec7dfe8e1cb6 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 29f151524634e45719e1834d4131c73e535cee47..bd95f6f5f879d2de14de5d01936c6fa88f922763 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 12c49ca2ac34d1a34dce3b6e30a2962f6b2c2555..89112448c3c70758ec46f0006c494710f9d7d83e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 72b07a32c53da0b1a6444be9970962a58376467f..6e014c1442c8518d3eb43e8637d9f025fc6fe407 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ccf80c74187c6c94918ba2fbf1fbe9e18b8f7969..aa85c35e2a2ca49bea566e20a31b7ba57892bdf5 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Review/Block/Adminhtml/Add.php b/app/code/Magento/Review/Block/Adminhtml/Add.php index 0f9789d0fac5ba78644d21f37efdd47e43ada156..ce58795f990a07583fd59ebe119649066a5a23a9 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Add.php +++ b/app/code/Magento/Review/Block/Adminhtml/Add.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Review\Block\Adminhtml; /** diff --git a/app/code/Magento/Review/Block/Adminhtml/Add/Form.php b/app/code/Magento/Review/Block/Adminhtml/Add/Form.php index 58e8d93332ff50534609a084ca7b7b65e8d1c810..ef18b5786913d006ecc81f2b1870731cb9140440 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Add/Form.php +++ b/app/code/Magento/Review/Block/Adminhtml/Add/Form.php @@ -51,6 +51,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 099f40c1d76dcdf584d1572a71ad3e802d3283eb..90b62eca191fc8c1880b27e958fb10ba4f9fc2a2 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Edit.php +++ b/app/code/Magento/Review/Block/Adminhtml/Edit.php @@ -55,6 +55,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 f7e570bb1baa4ca5cbb60e0cdf53777141448af0..e5904fd543c42c30bb50f9689fce036319b5b2c5 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Edit/Form.php +++ b/app/code/Magento/Review/Block/Adminhtml/Edit/Form.php @@ -68,6 +68,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 5f7a3aa9fc424afa9cf1f28d2b5a6fc6687a635b..73c09bc930e47a95a862513d3fd70bc6e1ffd181 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Grid.php +++ b/app/code/Magento/Review/Block/Adminhtml/Grid.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Adminhtml reviews grid * @@ -153,6 +155,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 b6e4d5da0acccdb6f96b922018b92cdd349cde23..d95a576962c38171ef1daee0a32505ef56f8bcc2 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 @@ -7,6 +7,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 8e2fda6f25c36bc08a6f212e6aa7b77f0df1ac9b..86f2ee89153e0abb2c9a09e01da0520a9c96daa7 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Product/Grid.php +++ b/app/code/Magento/Review/Block/Adminhtml/Product/Grid.php @@ -9,6 +9,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 79ac016cc13e0a98c38390d5d3f07f7d240089d3..e1332212f7959cc0abbfae71fe00aca03f37e895 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Rating/Detailed.php +++ b/app/code/Magento/Review/Block/Adminhtml/Rating/Detailed.php @@ -149,6 +149,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 3d0a0990732d0d17c66a4935a20dc0bc2f631ff7..d3971e9e08abbb914828d1e6a6cf64d43b784647 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 @@ -61,6 +61,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 391a2e64315db61dd98ad82e178a88ca34b62d7a..88429e9c1195415d153f9b0ad4e7b0a9fe46bb07 100644 --- a/app/code/Magento/Review/Block/Form.php +++ b/app/code/Magento/Review/Block/Form.php @@ -14,6 +14,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 { @@ -86,6 +87,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 0a9194717af43e6084a609edf915ca897ac7f30c..377301f384d8d907618c06b604abb5cc6d1cc16a 100644 --- a/app/code/Magento/Review/Block/Product/View.php +++ b/app/code/Magento/Review/Block/Product/View.php @@ -12,6 +12,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 { @@ -42,6 +43,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 d3fc11045bfb219a0713864eafb7d3a0c49dbe7e..39150b4857d5dd54094f4ccaf89d82772d601051 100644 --- a/app/code/Magento/Review/Controller/Adminhtml/Product/Save.php +++ b/app/code/Magento/Review/Controller/Adminhtml/Product/Save.php @@ -10,6 +10,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 3521c9f6b601f76084d96bc73d6511b39aa21ca3..b44a29ec6c42fe188ee2cbd65ec391a4dc15fee9 100644 --- a/app/code/Magento/Review/Controller/Product.php +++ b/app/code/Magento/Review/Controller/Product.php @@ -14,6 +14,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 { @@ -107,6 +108,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 c4910d951822f6a8a9cf19c864ddbfe1fc2d1136..f96213b50840bb6f0b74114a02b58c12af5bb7d8 100644 --- a/app/code/Magento/Review/Controller/Product/Post.php +++ b/app/code/Magento/Review/Controller/Product/Post.php @@ -14,6 +14,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/Action/Pager.php b/app/code/Magento/Review/Helper/Action/Pager.php index a276ab2ac6d5d794b6da09c996643bba78dd84ef..e6c8b6a2fb2f24d21c808554dfedc55045ee81a5 100644 --- a/app/code/Magento/Review/Helper/Action/Pager.php +++ b/app/code/Magento/Review/Helper/Action/Pager.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2a7f7ec10b0c903668bb4b5a21e9f58b48d505b8..a514519405b270e5de710f611917be9dc4f179f7 100644 --- a/app/code/Magento/Review/Helper/Data.php +++ b/app/code/Magento/Review/Helper/Data.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Review\Helper; /** @@ -77,6 +80,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 dc360c221f78ba73f618f77a8cc42b34bcd790df..ffe552b3c104d2e0b0abce711e514f26db9f9151 100644 --- a/app/code/Magento/Review/Model/Resource/Rating.php +++ b/app/code/Magento/Review/Model/Resource/Rating.php @@ -159,6 +159,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 abef04b8346e6ee4b56667f49699fee2cad37072..d6c65b46c43e21600e3da5074dab2a521bd4ca0d 100644 --- a/app/code/Magento/Review/Model/Resource/Review/Product/Collection.php +++ b/app/code/Magento/Review/Model/Resource/Review/Product/Collection.php @@ -11,6 +11,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 { @@ -448,6 +449,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 4292125f31e517da6c32a229f9bb62118c7c8324..3660815cf0249498575242fc03feea81a36ef0a7 100644 --- a/app/code/Magento/Review/Model/Review.php +++ b/app/code/Magento/Review/Model/Review.php @@ -19,6 +19,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 { @@ -121,6 +122,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/Review/view/adminhtml/templates/rating/detailed.phtml b/app/code/Magento/Review/view/adminhtml/templates/rating/detailed.phtml index b1321cfbef03a0b37ed650ccbda2f23dd6313aec..1e04a02ba904ac06f616cee4ed1c1173e07562b0 100644 --- a/app/code/Magento/Review/view/adminhtml/templates/rating/detailed.phtml +++ b/app/code/Magento/Review/view/adminhtml/templates/rating/detailed.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f7e773ca1863a9b4e866e957eddda6207cfbefcd..cc56a7a9a5e451ad346349c4fa7eaef70f4d805f 100644 --- a/app/code/Magento/Review/view/adminhtml/templates/rating/form.phtml +++ b/app/code/Magento/Review/view/adminhtml/templates/rating/form.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9d7af8197b66e4010379b453bcfe189aefc5486e..3d5a039bebe172ffd3ec198b09090803ec0e1947 100644 --- a/app/code/Magento/Review/view/adminhtml/templates/rating/options.phtml +++ b/app/code/Magento/Review/view/adminhtml/templates/rating/options.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9d270faf7d0c384f7bb974376700742dba68d90d..641dde0b7c008ab5726ad43e948df1dc15147f77 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e29a32ff228a7aab519785f0d910af3a0870f6eb..c5394e0bcb4d1168dc3edaa5b93e98c9e395b2c9 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 652e65e1dbc7ba254d54a14897bd81bd86704611..8ccde118920025656143cb7fcb1e6ccd2719db4e 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 1c920e199b2bce6554df426dc5011ac00997f372..84b2f72995d0816de421ad40f0ac83f60a7a9e95 100644 --- a/app/code/Magento/Review/view/frontend/templates/customer/list.phtml +++ b/app/code/Magento/Review/view/frontend/templates/customer/list.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 042d0c48946ea15156e5119367792882e4cd02c9..2fc2d83149f98e758c6c61e8512863d56cbc544d 100644 --- a/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml +++ b/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 128c24a021b3f989d813841817237985f80e15d5..b60f1858b64ace9043f8e2a1c4e6fe604b28af06 100644 --- a/app/code/Magento/Review/view/frontend/templates/customer/view.phtml +++ b/app/code/Magento/Review/view/frontend/templates/customer/view.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 13374f014b747ff1c7c6def4c097c120202fb353..7ffa92cea0ec02aa6e00eb3983c7eaa002de4881 100644 --- a/app/code/Magento/Review/view/frontend/templates/detailed.phtml +++ b/app/code/Magento/Review/view/frontend/templates/detailed.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ae8a03e69e55e4710a35aefda78805198714a7d5..94ab2d74533f1bfc180483cefcf07b2823e5d606 100644 --- a/app/code/Magento/Review/view/frontend/templates/form.phtml +++ b/app/code/Magento/Review/view/frontend/templates/form.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a3cc9f332c2b1c655af8fe7c3da575f2f48a0374..b112d00721c7d7b1840901fbe51b0d92b875c737 100644 --- a/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml +++ b/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 0c125ca10020451519bfc475ca574bc0f0eedab3..01c71a64bfb954a70a87e057ec8383eb5e4e7021 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 73df469ed1d07589825c30229358acf00a082e2f..9e6b13665e145c04169e668601f17f7ab32273f8 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c0f74d3a281f3b99268d3bea961ed11283099d11..cbb0f9c173e529eba680c6571f422a8f0f5eca86 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 fdb1119f88327f781f5cb1c7822ad6f3d93ea24e..3bd787ea696539121f118566dcc315f2c4317b64 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3d1f8869e3bcd0b476fad84d4cc4d448aa647a9d..b2e82d1b9cacb983774dd588cb788e5023d3e980 100644 --- a/app/code/Magento/Review/view/frontend/templates/redirect.phtml +++ b/app/code/Magento/Review/view/frontend/templates/redirect.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f779b0ddd8b0906c0aabd30e3394842120b9b1ae..1f6cfa6bbb9f70d47fa8ee5eb9244ed0e2a9a2b6 100644 --- a/app/code/Magento/Review/view/frontend/templates/view.phtml +++ b/app/code/Magento/Review/view/frontend/templates/view.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 266a3c61b06b11801554a52c14cdce4f3c1a14b4..fe1ea96e8c8594789918bcb386a537e9b1286dc9 100644 --- a/app/code/Magento/Rss/view/frontend/templates/feeds.phtml +++ b/app/code/Magento/Rss/view/frontend/templates/feeds.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e94c84ae9fd1f7f34e44a7fe86cfa7c35d3a898d..ccdd7bf107780a516c94bf1a89a15728421efdc4 100644 --- a/app/code/Magento/Rule/Model/AbstractModel.php +++ b/app/code/Magento/Rule/Model/AbstractModel.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Abstract Rule entity data model */ @@ -100,6 +102,7 @@ abstract class AbstractModel extends \Magento\Framework\Model\AbstractModel * * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function beforeSave() { @@ -297,6 +300,7 @@ abstract class AbstractModel extends \Magento\Framework\Model\AbstractModel * * @param array $data * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _convertFlatToRecursive(array $data) { @@ -351,6 +355,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 710a5dcbe9203673f0472a55f30441002991c079..8e01621b733e0ab7b60568444c36a465bacc022e 100644 --- a/app/code/Magento/Rule/Model/Action/AbstractAction.php +++ b/app/code/Magento/Rule/Model/Action/AbstractAction.php @@ -338,6 +338,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 59f917beb6bbd725357625deba10f1a24ddffab2..6bc5bd70d37e79939021284eda38e6c0a4812bb2 100644 --- a/app/code/Magento/Rule/Model/Condition/AbstractCondition.php +++ b/app/code/Magento/Rule/Model/Condition/AbstractCondition.php @@ -14,6 +14,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 { /** @@ -217,6 +221,7 @@ abstract class AbstractCondition extends \Magento\Framework\Object implements Co /** * @param array $arr * @return $this + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function loadArray($arr) { @@ -408,6 +413,7 @@ abstract class AbstractCondition extends \Magento\Framework\Object implements Co /** * @return array|string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getValueName() { @@ -702,6 +708,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 2f290cd984774dfd96f3100819ccdd96b1eb0c81..f68a13163a0b62dd93d4f887ff3a12134d32aa5b 100644 --- a/app/code/Magento/Rule/Model/Condition/Combine.php +++ b/app/code/Magento/Rule/Model/Condition/Combine.php @@ -200,6 +200,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 ee74a67b7ff67d49997067312bc18a6accc5de99..696fc409c69a7d1e1769317213427ef3a839e333 100644 --- a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php +++ b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php @@ -11,6 +11,10 @@ */ namespace Magento\Rule\Model\Condition\Product; +/** + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ abstract class AbstractProduct extends \Magento\Rule\Model\Condition\AbstractCondition { /** @@ -189,6 +193,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() { @@ -457,6 +462,7 @@ abstract class AbstractProduct extends \Magento\Rule\Model\Condition\AbstractCon * Retrieve Explicit Apply * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getExplicitApply() { @@ -483,6 +489,7 @@ abstract class AbstractProduct extends \Magento\Rule\Model\Condition\AbstractCon * * @param array $arr * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function loadArray($arr) { @@ -526,6 +533,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 aa5f1d74847af8fbba9b0aea90edcde8568ca143..43e1ab5177159766d4d0bdf1e48ada4134dd3540 100644 --- a/app/code/Magento/Rule/Model/Condition/Sql/Builder.php +++ b/app/code/Magento/Rule/Model/Condition/Sql/Builder.php @@ -141,6 +141,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/Api/CreditmemoCommentRepositoryInterface.php b/app/code/Magento/Sales/Api/CreditmemoCommentRepositoryInterface.php index 4fca9528e43ff385417b5749e8dd23a07d11f75d..5df81ef17ce49fb0007e3f584a64d079c03b3451 100644 --- a/app/code/Magento/Sales/Api/CreditmemoCommentRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/CreditmemoCommentRepositoryInterface.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Api; /** diff --git a/app/code/Magento/Sales/Api/CreditmemoManagementInterface.php b/app/code/Magento/Sales/Api/CreditmemoManagementInterface.php index 0295d03d2dce5e2de4c8ba0b4d2b4c0fff8ede82..0211a82933663431c110c1da6c206c63b7cafaaa 100644 --- a/app/code/Magento/Sales/Api/CreditmemoManagementInterface.php +++ b/app/code/Magento/Sales/Api/CreditmemoManagementInterface.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d3d0bee1c621888b249e5166345b9fcb2469b646..e7047e546f03668e2001fce706ca00ab5f3aaf5f 100644 --- a/app/code/Magento/Sales/Api/Data/CreditmemoInterface.php +++ b/app/code/Magento/Sales/Api/Data/CreditmemoInterface.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 943ad02d1e61655c9246f5cedd2612882a2250c0..071d1ac787f6b00b68a4c99d181cfcd5f94b822d 100644 --- a/app/code/Magento/Sales/Api/OrderManagementInterface.php +++ b/app/code/Magento/Sales/Api/OrderManagementInterface.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Api; /** diff --git a/app/code/Magento/Sales/Api/OrderStatusHistoryRepositoryInterface.php b/app/code/Magento/Sales/Api/OrderStatusHistoryRepositoryInterface.php index 660b27a82aa685b93f7f6058e8260ea53a0082ef..66db1edbaa4662929f132b537c37d0203f6479e4 100644 --- a/app/code/Magento/Sales/Api/OrderStatusHistoryRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/OrderStatusHistoryRepositoryInterface.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Api; /** 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 2510300b9ca0954eaffc903047d0bc79efcdf217..c2b04646e891dc815a62624b3819162dd7944be7 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php @@ -9,6 +9,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 d1f3ecc4f8c067f657c6813dd998e57b9ea2a8a2..83bb55bfe1b72efbec78a2944bcaf16c2ec6eecc 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/AbstractCreate.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/AbstractCreate.php @@ -11,6 +11,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 59f81853b034bfa3893d976b87590b96bd8fca4c..a72cf38445f4ccf07f6332b5d5509403676942ca 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 @@ -9,6 +9,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 8334ec391ef907f35b2a78b8585afa1b68066c45..5c4e676481b9e763c368d3eb8e15c89c27d14dcd 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form.php @@ -56,6 +56,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 712a00ea0b9482029a8a22d987ac7676625671da..db49cde19169e44967ddc82ab4aac3284989dd34 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 @@ -141,6 +141,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) { @@ -153,6 +154,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 aaa9f93d055618399cc50d611737ef4c1d546973..08137358bf707fcf9fd251f21c9d2c9e0dd1f152 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; @@ -46,6 +49,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 8dec273fe7ba482a160bc1b60fd405ee24480bd8..b139f0314352608c075dbf379ffcea3215aa345d 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 @@ -10,6 +10,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 a9aed237d31a257188b18424aadb57d27efd138a..6d53e62c71ab36b157551a929ffe97997acf6228 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 @@ -14,6 +14,7 @@ use Magento\Quote\Model\Quote\Item; /** * Adminhtml sales order create items grid block + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Grid extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate { @@ -82,6 +83,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, @@ -447,6 +449,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 b4a0f91f686ba19db746674e58f3e91092fcc407..e6c03f666a8e8f05024e0d4b7ccc4c3405c189e4 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 @@ -9,6 +9,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 { @@ -63,6 +64,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() { @@ -73,6 +75,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() { @@ -119,6 +122,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 28c05b5379901b6e8f4d1148cc67147ea1d7a778..ada04889aa2674a3fff8514b66c78de4abd5b606 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 @@ -140,6 +140,7 @@ class AbstractSidebar extends \Magento\Sales\Block\Adminhtml\Order\Create\Abstra * Retrieve all items * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getItems() { @@ -218,6 +219,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 b999c6d3d92ca2c6139e27ad8acbeb324fade6fe..66dc3274dd4def11ae4837029ed03419e7091c6e 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php @@ -187,6 +187,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 2b4a79d4bbd2bd766323857fa325e14c1c413f26..584f443efbefcbf9a88ce8ffd36fcc1c59b7c5d3 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 @@ -11,6 +11,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 2fe463f3809c2ddadf9508a7a74447f933e4a540..67211ec745a2eb9800e5e4caeeb96dae464e58a2 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 @@ -11,6 +11,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 b34c835fbc3d3a53292cd68570d9261dd0733354..1d00dad06c8c553ee7a0d63fb561c800a7fb2d07 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 @@ -11,6 +11,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 48a00d5b49286476e590367779829aba48ad862c..7f7fb65e1322e71c85766bb8eeba3e405d0bc2cd 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 @@ -11,6 +11,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 839c55464c75cc973cbeba6efddb094bd339c074..42731212784eb73a523acf465f8eec3ad18dafe1 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 @@ -9,6 +9,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 4749e8127d036a620f6bfb7e01efea39b249db46..7b77a9a64c407553f5268b2ee72a0cdf92df7d73 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 @@ -92,6 +92,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 ea629a60c9c1ad67f77a71c57a463dd552cacd1b..598eed53a15d6aa25d0e5b7768a606a0c35e2a43 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Block\Adminhtml\Order\Invoice; /** @@ -54,6 +57,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 7e8db3001f810459bac35064c948901d6d01f066..a14eb0ed898024d1031eb17ad87234ac060a1515 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 @@ -7,6 +7,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 fd9ce395e74ea99e39581c1c1ba0bfb86103b9df..79020e2a0c59067cc3569df62efee82bc9a5257e 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View.php @@ -64,6 +64,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 fde3381ab014ba5962b42ccb84268a43206c3aa5..b7aefa2d344ef1d56b5a9797092e1542bb43a382 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php @@ -9,6 +9,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 f69da0c59b9726cc53b00dcd24d11995dc1b225d..b67df217903c4123dedc5b399f1110a8422f22cd 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 @@ -9,6 +9,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 a9c5b16967156ccc18b6dc20cb22a0a482bfdb39..b8309267361eb24d5ac0266a16035c710aab15e1 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 @@ -9,6 +9,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 { @@ -16,6 +17,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 b3aee4a4bcab9e2bd5f9d04e10fa5b5da73f703d..1f775bf7c6634c47de1c972acf55de457c7c4bad 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 @@ -104,6 +104,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 11523ac439eb979b5e93401d16e611fb38bdc583..728b46470af08ca1b81c90b95346364304580277 100644 --- a/app/code/Magento/Sales/Block/Items/AbstractItems.php +++ b/app/code/Magento/Sales/Block/Items/AbstractItems.php @@ -9,6 +9,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 { @@ -23,6 +24,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) { @@ -47,6 +49,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/Creditmemo/Totals.php b/app/code/Magento/Sales/Block/Order/Creditmemo/Totals.php index 4fa114b5ee96d01086ae7842ed825de6240d00d1..a03ca172c5f7c293487bb93f9d7bde266f78483b 100644 --- a/app/code/Magento/Sales/Block/Order/Creditmemo/Totals.php +++ b/app/code/Magento/Sales/Block/Order/Creditmemo/Totals.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 79a29a35ba58109fbc8d958901f878fa3c5b1c72..c6ea7d810dc0948e6984bf152d6783cb2278ec28 100644 --- a/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php +++ b/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Block\Order\Item\Renderer; use Magento\Sales\Model\Order\CreditMemo\Item as CreditMemoItem; @@ -123,6 +126,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 5c19f07551de92c75e589a6bff298ff0fe7f80dc..a173a51146d3a1b699a8e12d9d3cd458f7a42c9d 100644 --- a/app/code/Magento/Sales/Block/Order/Totals.php +++ b/app/code/Magento/Sales/Block/Order/Totals.php @@ -285,6 +285,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 ac83c7879bd59cf798b10daeaa358ede3ec7d085..7f5b650e85fc7b6d4c70bb51f938d1f6352853c7 100644 --- a/app/code/Magento/Sales/Block/Status/Grid/Column/State.php +++ b/app/code/Magento/Sales/Block/Status/Grid/Column/State.php @@ -45,6 +45,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 27629b7809f1819cfc8a0284ff8a224006b9f013..0d924f05464a9ee88855914f8b611b3188c7aa59 100644 --- a/app/code/Magento/Sales/Block/Status/Grid/Column/Unassign.php +++ b/app/code/Magento/Sales/Block/Status/Grid/Column/Unassign.php @@ -25,6 +25,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 f535f59bc08586889146362388f04be661a22896..267d84431bd5b2dc4f4d5d160f36473348c7de35 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/View.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/View.php @@ -20,6 +20,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 5aa141ae06b18e76ec6af6b473197d5efa533702..ae425500611ade3fb71ca663dcbb58cc7faf1ede 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order.php @@ -11,6 +11,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 { @@ -101,6 +102,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 1d22b23b24bc449226be32eae6618cf0233337a3..08ac01a05321aad30771c27d55496c2298b1b75e 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php @@ -11,6 +11,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 { @@ -120,6 +121,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 601b6e683104be1afb1287d0e8b2738857f2b27d..49c7f1ae5ff482681a48d640a8d396ce233d2099 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Save.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Save.php @@ -13,6 +13,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 2856c97fecce926a7df987f8e03dc9000f86379a..29416472331b4a298753f2cc991c8ea8a0c77d4d 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/Save.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/Save.php @@ -50,6 +50,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 66b0cc06f0568f78a1e26d50ea210cd6470bad27..4468f01f7e68ce0a11579e15313013d6491dac8a 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/CreditmemoLoader.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/CreditmemoLoader.php @@ -79,6 +79,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, @@ -173,6 +174,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 82bcd79fe9a910ce21fbdf4e0adc0bdd8b67ebbc..cbc04f14c659dd0aa314ee6cc7acf0a50af2c45a 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/Save.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/Save.php @@ -95,6 +95,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 d7c3b45d5b29fab83323286cf4c579a74c59ec79..9fdebb897551af735087c9a593f15a9ed995385d 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfdocs.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfdocs.php @@ -15,6 +15,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 cd7bf2de861eecd5a38570c88fed6cadfa4c14ca..ba190ac2cbc5040338ca608dc560995455a633c3 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/View.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/View.php @@ -20,6 +20,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 ee5dca3db252af6309a2f2ec3bb5df4fbc1914b6..84defe91734829fc7a6c513c5fe0ab73665be1e1 100644 --- a/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php +++ b/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php @@ -14,6 +14,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 13356e24e572ddbd593fd3f050c00a376aa728cc..02aaad1b1baaa4df85de61e19c61ae6657367eac 100644 --- a/app/code/Magento/Sales/Controller/Order/Plugin/Authentication.php +++ b/app/code/Magento/Sales/Controller/Order/Plugin/Authentication.php @@ -38,6 +38,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 71318f24cacbd184168a09d227df3dd068ea044e..5ba1261f9a00552c590f0e88f727370db940724b 100644 --- a/app/code/Magento/Sales/Helper/Guest.php +++ b/app/code/Magento/Sales/Helper/Guest.php @@ -10,6 +10,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/Helper/Reorder.php b/app/code/Magento/Sales/Helper/Reorder.php index 9740e150da4844a185c1f7f7a502f70e270cdce9..f93c02fccdef0da47c54ca7b6ad1d6b8ca447af3 100644 --- a/app/code/Magento/Sales/Helper/Reorder.php +++ b/app/code/Magento/Sales/Helper/Reorder.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 59189864b2b544d358aaa04bfc36aa0c7f11fed7..fd4ec66b5e13c3fc087df66717682f265a9baf10 100644 --- a/app/code/Magento/Sales/Model/AdminOrder/Create.php +++ b/app/code/Magento/Sales/Model/AdminOrder/Create.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\AdminOrder; use Magento\Customer\Api\AddressMetadataInterface; @@ -11,6 +14,9 @@ use Magento\Quote\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 { @@ -229,6 +235,7 @@ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Mode * @param \Magento\Customer\Model\Customer\Mapper $customerMapper * @param \Magento\Quote\Model\QuoteManagement $quoteManagement * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\ObjectManagerInterface $objectManager, @@ -300,6 +307,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() { @@ -434,6 +442,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) { @@ -715,6 +725,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) { @@ -840,6 +852,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) { @@ -1553,6 +1568,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) { @@ -1653,6 +1670,7 @@ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Mode * Set customer data to quote. * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function _prepareCustomer() { @@ -1715,6 +1733,7 @@ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Mode * @param \Magento\Quote\Model\Quote\Address $quoteCustomerAddress * @return void * @throws \InvalidArgumentException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareCustomerAddress($customer, $quoteCustomerAddress) { @@ -1840,6 +1859,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 7529fc9d34c3791c199451a399baf7365bfc0a18..4f4b80f5995d1c8a5b4fe31d015f3172eaed026d 100644 --- a/app/code/Magento/Sales/Model/Config/Converter.php +++ b/app/code/Magento/Sales/Model/Config/Converter.php @@ -17,6 +17,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 76a2ff567121d4c45669cac5f74217d33630aee2..7ac320f80388b437544d4378fb9826834bdc09a1 100644 --- a/app/code/Magento/Sales/Model/Convert/Order.php +++ b/app/code/Magento/Sales/Model/Convert/Order.php @@ -9,6 +9,9 @@ */ namespace Magento\Sales\Model\Convert; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Order extends \Magento\Framework\Object { /** diff --git a/app/code/Magento/Sales/Model/Order.php b/app/code/Magento/Sales/Model/Order.php index ed7228c6288dcf69f2d606ae18da62258901c247..d2269ca8a1b7b6f3154f6b8bb5a10e67fe0c7b65 100644 --- a/app/code/Magento/Sales/Model/Order.php +++ b/app/code/Magento/Sales/Model/Order.php @@ -176,6 +176,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 { @@ -412,6 +416,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, @@ -530,6 +535,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() { @@ -590,6 +596,8 @@ class Order extends AbstractModel implements EntityInterface, ApiOrderInterface * Retrieve order cancel availability * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function canCancel() { @@ -649,6 +657,7 @@ class Order extends AbstractModel implements EntityInterface, ApiOrderInterface * Retrieve order invoice availability * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function canInvoice() { @@ -759,6 +768,7 @@ class Order extends AbstractModel implements EntityInterface, ApiOrderInterface * Retrieve order shipment availability * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function canShip() { @@ -842,6 +852,7 @@ class Order extends AbstractModel implements EntityInterface, ApiOrderInterface * * @param bool $ignoreSalable * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _canReorder($ignoreSalable = false) { @@ -2002,6 +2013,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 7d549e8c29c4e0e91b62206c40890cc2021fbe73..2cf363e7de2d8a38d33b8180f92b90a57abebeab 100644 --- a/app/code/Magento/Sales/Model/Order/Address.php +++ b/app/code/Magento/Sales/Model/Order/Address.php @@ -38,6 +38,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 { @@ -78,6 +79,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 2dd79cd89ba61e913682b3956731bae9b149398d..f0c2e25e4cdb4ce0affca3865030285f7fb16b9b 100644 --- a/app/code/Magento/Sales/Model/Order/Builder.php +++ b/app/code/Magento/Sales/Model/Order/Builder.php @@ -8,6 +8,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 1ccb71d61d0e48e1e4f5c8fbff012d431d669388..b9a2aea4780d63fe940f6087ff4120ca8f2a20d0 100644 --- a/app/code/Magento/Sales/Model/Order/Creditmemo.php +++ b/app/code/Magento/Sales/Model/Order/Creditmemo.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order; use Magento\Framework\Api\AttributeDataBuilder; @@ -60,6 +63,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 { @@ -165,6 +171,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, @@ -754,6 +761,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 27312a4aa22b9c6bdbde9053adcffd1edbb7d681..e3b00c1136294977299d37cfa4e0d809fd4dc45e 100644 --- a/app/code/Magento/Sales/Model/Order/Creditmemo/Comment.php +++ b/app/code/Magento/Sales/Model/Order/Creditmemo/Comment.php @@ -43,6 +43,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 b6cfb7a2d74f46f4a94085bc190ae67a4713900b..0b3af734428d8d2e49521dbc762e4af4f2abb1c8 100644 --- a/app/code/Magento/Sales/Model/Order/Creditmemo/Total/AbstractTotal.php +++ b/app/code/Magento/Sales/Model/Order/Creditmemo/Total/AbstractTotal.php @@ -17,6 +17,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 22edcac7c43186e12bb26de16d432858943d445c..87fb453e710f72085f367abc41c878d0cb9cbd5f 100644 --- a/app/code/Magento/Sales/Model/Order/Customer.php +++ b/app/code/Magento/Sales/Model/Order/Customer.php @@ -93,6 +93,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/Email/NotifySender.php b/app/code/Magento/Sales/Model/Order/Email/NotifySender.php index 2c027d604582b83bd4134e41177395ad3e224bc0..9244852e77523d8ac1d6db2d29b5a93bc5da013e 100644 --- a/app/code/Magento/Sales/Model/Order/Email/NotifySender.php +++ b/app/code/Magento/Sales/Model/Order/Email/NotifySender.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order\Email; use Magento\Sales\Model\Order; diff --git a/app/code/Magento/Sales/Model/Order/Invoice.php b/app/code/Magento/Sales/Model/Order/Invoice.php index 93854c2be239442c8467e46aafbffd648c4fd469..b494782a7dfab66c2d4c8879cc5613854f58fc19 100644 --- a/app/code/Magento/Sales/Model/Order/Invoice.php +++ b/app/code/Magento/Sales/Model/Order/Invoice.php @@ -52,6 +52,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 { @@ -166,6 +169,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, @@ -617,6 +621,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 7743e0c21fa00aef3b5bffaa04d75fc4da5678a7..3b4f4787f70c891850220d042b1aff4d7c245743 100644 --- a/app/code/Magento/Sales/Model/Order/Invoice/Comment.php +++ b/app/code/Magento/Sales/Model/Order/Invoice/Comment.php @@ -43,6 +43,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 a9bff16a96859750b26073160b3cee1e5fa5d4d5..ae4e6111cada93fda613c355fe937afc0de2441a 100644 --- a/app/code/Magento/Sales/Model/Order/Invoice/Total/AbstractTotal.php +++ b/app/code/Magento/Sales/Model/Order/Invoice/Total/AbstractTotal.php @@ -17,6 +17,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/Subtotal.php b/app/code/Magento/Sales/Model/Order/Invoice/Total/Subtotal.php index b36e7cfabfefa62251a43c301d2cdce0ffeb87b5..1b10667eaaddd1c8abcde92cd9b08e5f8d46a2b3 100644 --- a/app/code/Magento/Sales/Model/Order/Invoice/Total/Subtotal.php +++ b/app/code/Magento/Sales/Model/Order/Invoice/Total/Subtotal.php @@ -37,46 +37,15 @@ class Subtotal extends AbstractTotal $allowedSubtotal = $order->getSubtotal() - $order->getSubtotalInvoiced(); $baseAllowedSubtotal = $order->getBaseSubtotal() - $order->getBaseSubtotalInvoiced(); - $allowedSubtotalInclTax = $allowedSubtotal + - $order->getHiddenTaxAmount() + - $order->getTaxAmount() - - $order->getTaxInvoiced() - - $order->getHiddenTaxInvoiced(); - $baseAllowedSubtotalInclTax = $baseAllowedSubtotal + - $order->getBaseHiddenTaxAmount() + - $order->getBaseTaxAmount() - - $order->getBaseTaxInvoiced() - - $order->getBaseHiddenTaxInvoiced(); - - /** - * Check if shipping tax calculation is included to current invoice. - */ - $includeShippingTax = true; - foreach ($invoice->getOrder()->getInvoiceCollection() as $previousInvoice) { - if ($previousInvoice->getShippingAmount() && !$previousInvoice->isCanceled()) { - $includeShippingTax = false; - break; - } - } - - if ($includeShippingTax) { - $allowedSubtotalInclTax -= $order->getShippingTaxAmount(); - $baseAllowedSubtotalInclTax -= $order->getBaseShippingTaxAmount(); - } else { - $allowedSubtotalInclTax += $order->getShippingHiddenTaxAmount(); - $baseAllowedSubtotalInclTax += $order->getBaseShippingHiddenTaxAmount(); - } + //Note: The $subtotalInclTax and $baseSubtotalInclTax are not adjusted from those provide by the line items + //because the "InclTax" is displayed before any tax adjustments based on discounts, shipping, etc. if ($invoice->isLast()) { $subtotal = $allowedSubtotal; $baseSubtotal = $baseAllowedSubtotal; - $subtotalInclTax = $allowedSubtotalInclTax; - $baseSubtotalInclTax = $baseAllowedSubtotalInclTax; } else { $subtotal = min($allowedSubtotal, $subtotal); $baseSubtotal = min($baseAllowedSubtotal, $baseSubtotal); - $subtotalInclTax = min($allowedSubtotalInclTax, $subtotalInclTax); - $baseSubtotalInclTax = min($baseAllowedSubtotalInclTax, $baseSubtotalInclTax); } $invoice->setSubtotal($subtotal); 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 f6314349b17a9aef7705f2842520acad1fa1d9fe..d1d2cee1f3ec2ac6ee6ad92a7c84b6ee57ac7bec 100644 --- a/app/code/Magento/Sales/Model/Order/Invoice/Total/Tax.php +++ b/app/code/Magento/Sales/Model/Order/Invoice/Total/Tax.php @@ -12,6 +12,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 6f6044f24b3ae06ed97f92fe9861ebd0e2237f50..fcc9aa7959fb31e2287962ec790271ced56b3534 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 { @@ -181,6 +184,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, @@ -371,6 +375,8 @@ class Item extends AbstractExtensibleModel implements OrderItemInterface * Retrieve item status identifier * * @return int + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getStatusId() { @@ -625,6 +631,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() { @@ -668,6 +675,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 c1c956a50b92e29e470c3fa4251687daf18a1455..0ada9c295824bd8e2f916a262383ec1564be87ce 100644 --- a/app/code/Magento/Sales/Model/Order/Payment.php +++ b/app/code/Magento/Sales/Model/Order/Payment.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order; use Magento\Framework\Api\AttributeDataBuilder; @@ -67,6 +70,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 { @@ -159,6 +165,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, @@ -279,6 +286,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() { @@ -693,6 +701,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) { @@ -788,6 +798,7 @@ class Payment extends Info implements OrderPaymentInterface * * @param float $amount * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function registerRefundNotification($amount) { @@ -976,6 +987,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) { @@ -1193,6 +1206,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') { @@ -1267,6 +1282,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 82c5dc8495d2ee7bb31b1c531604f6e0dde0485e..1d87d92ad1751983e08f68a1fb5b106063a23c9c 100644 --- a/app/code/Magento/Sales/Model/Order/Payment/Transaction.php +++ b/app/code/Magento/Sales/Model/Order/Payment/Transaction.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order\Payment; use Magento\Framework\Api\AttributeDataBuilder; @@ -23,6 +26,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 { @@ -161,6 +166,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, @@ -300,6 +306,9 @@ class Transaction extends AbstractExtensibleModel implements TransactionInterfac * @param string $txnId * @param bool $recursive * @return Transaction[] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getChildTransactions($types = null, $txnId = null, $recursive = false) { @@ -568,6 +577,7 @@ class Transaction extends AbstractExtensibleModel implements TransactionInterfac * @return $this * @throws \Magento\Framework\Model\Exception * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function close($shouldSave = true) { @@ -727,6 +737,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 0e1157c30245d0dff406441d7dad381be6e338a4..a2c0b3de2f296987d0b30c15b6e07744b246d2c6 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php @@ -3,12 +3,17 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order\Pdf; use Magento\Framework\App\Filesystem\DirectoryList; /** * Sales Order PDF abstract model + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractPdf extends \Magento\Framework\Object { @@ -219,6 +224,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) { @@ -330,6 +336,7 @@ abstract class AbstractPdf extends \Magento\Framework\Object * * @param array $address * @return int Height + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _calcAddressHeight($address) { @@ -355,6 +362,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) { @@ -930,6 +940,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 03b9131ec0b414208767bc84c3cddb208577ef35..acd8d3f9b6d78474726192cf53fa521f997b935c 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php @@ -7,6 +7,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 1e3c554387dc7b3c417be82e3c90fd0d87d98bff..79b3130b684496b306b556ac7a089651960137f5 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php @@ -7,6 +7,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 ea036a57e78be13303900f8727e1b088501b0e76..a6c248caedf751d6250b892afa0107b41372268e 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Items/AbstractItems.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Items/AbstractItems.php @@ -9,6 +9,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 b38f5334997e2a805bb4a7f9f68ff63df1a9e52b..46594554ba69d203c2f2215dd2cdbac639d0c53b 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php @@ -7,6 +7,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 c5b7e801a368bbd2365dc10908ffbf63472985aa..aef42991031bf93a575ad64431320130a8f807d6 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order\Pdf\Total; /** @@ -89,6 +92,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 eb6ecf045f6fd8123ae7d6acf9cfac04e9d3af3b..7941d2e5706018ca71ef4186d0b1d07136d9b518 100644 --- a/app/code/Magento/Sales/Model/Order/Shipment.php +++ b/app/code/Magento/Sales/Model/Order/Shipment.php @@ -27,6 +27,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 { @@ -113,6 +114,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 a4c1ed52c006f3126426e2f8e048343d6897bc15..bec79910266e960b1260e34c4c4102da06f267b1 100644 --- a/app/code/Magento/Sales/Model/Order/Shipment/Comment.php +++ b/app/code/Magento/Sales/Model/Order/Shipment/Comment.php @@ -43,6 +43,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/Item.php b/app/code/Magento/Sales/Model/Order/Shipment/Item.php index 9f78dad996e7377079881a3a66594fe2a0269dd8..0980fc98559069616451237b3ee6be0efcf5e45e 100644 --- a/app/code/Magento/Sales/Model/Order/Shipment/Item.php +++ b/app/code/Magento/Sales/Model/Order/Shipment/Item.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order\Shipment; use Magento\Framework\Api\AttributeDataBuilder; diff --git a/app/code/Magento/Sales/Model/Order/Shipment/Track.php b/app/code/Magento/Sales/Model/Order/Shipment/Track.php index 6d7d8b5e9eccaf75e70616cde05d66a2598bdc75..41c4c2521d9639cd5bf3f25f1a53084954983b2e 100644 --- a/app/code/Magento/Sales/Model/Order/Shipment/Track.php +++ b/app/code/Magento/Sales/Model/Order/Shipment/Track.php @@ -23,6 +23,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 { @@ -68,6 +69,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 c5ca7be39735f319bad9416e0af407d616febd9a..306ba2715f4cd703bba8ef5e15d0b9ccdaf611e7 100644 --- a/app/code/Magento/Sales/Model/Order/Status/History.php +++ b/app/code/Magento/Sales/Model/Order/Status/History.php @@ -57,6 +57,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/Resource/Collection/AbstractCollection.php b/app/code/Magento/Sales/Model/Resource/Collection/AbstractCollection.php index 46a8e399166a5968a9a9307a19370ed603072487..6edcac391a19be29f25fdc1f585116c159fc7684 100644 --- a/app/code/Magento/Sales/Model/Resource/Collection/AbstractCollection.php +++ b/app/code/Magento/Sales/Model/Resource/Collection/AbstractCollection.php @@ -163,6 +163,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 f948734924783eada454776cfa9031e99787fa3a..2cc6faf6f126694130ff20a91c69eb05e5978a01 100644 --- a/app/code/Magento/Sales/Model/Resource/Entity.php +++ b/app/code/Magento/Sales/Model/Resource/Entity.php @@ -10,6 +10,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 43c78c11bf5b82cc61d02ca4aef3ce12647ccade..5b673d4a23dc5bad3e9dfa631ca32fdb8ba451a4 100644 --- a/app/code/Magento/Sales/Model/Resource/Order/Grid/Collection.php +++ b/app/code/Magento/Sales/Model/Resource/Order/Grid/Collection.php @@ -86,6 +86,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 39d46be2bd97b4fcf61f6cd3eeddd9d3a8cd1a5f..a0530530e0b14a6f854f7c62e705428fb2ca4382 100644 --- a/app/code/Magento/Sales/Model/Resource/Order/Handler/State.php +++ b/app/code/Magento/Sales/Model/Resource/Order/Handler/State.php @@ -18,6 +18,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 33d6e9ab88f20e181f3fc7b911f8ac26b2c039dd..4fc8acc8046c127a33caa8c4ce0046475926fe07 100644 --- a/app/code/Magento/Sales/Model/Resource/Order/Plugin/Authorization.php +++ b/app/code/Magento/Sales/Model/Resource/Order/Plugin/Authorization.php @@ -35,6 +35,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 e013a4a85c101a5280befcf662e02f83165c58e5..fb47d4cb1781c0947a9d4c0230b1e790345a06d6 100644 --- a/app/code/Magento/Sales/Model/Resource/Order/Status.php +++ b/app/code/Magento/Sales/Model/Resource/Order/Status.php @@ -266,6 +266,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/Report/Bestsellers.php b/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php index d0529e458400ec10e4eadaff2c3e9440fdadb5fb..173d376346079dd0d7fc149201de5e8b3ad2d6a0 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php @@ -7,6 +7,7 @@ namespace Magento\Sales\Model\Resource\Report; /** * Bestsellers report resource model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Bestsellers extends AbstractReport { @@ -80,6 +81,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 331a909384f6bffb470b32717998131dafa67a67..3ea1cfc8bae97789526812ca3fac0e6b55d39d0a 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Bestsellers/Collection.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Bestsellers/Collection.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Resource\Report\Bestsellers; /** @@ -217,6 +220,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 9d931bc56a8743dbd9d146c962a1dc712962f654..ceb64d2658b67dcee2baf3763617168bb9290570 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Invoiced.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Invoiced.php @@ -50,6 +50,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 f48f917c1298e015c1e25d25ee1cec2250533897..0de50475f360db0bbc4491d5b1e3ce398f02a118 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Order/Createdat.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Order/Createdat.php @@ -42,6 +42,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 583b86da77de7cfe082ca657e68c70d3a5c47d0a..80a0f43fb28d2daab8e2edfe8b0754a95336b731 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Refunded.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Refunded.php @@ -137,6 +137,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 387d810862e9ae505644857519ec64d7aae28528..5d041dac931ef9b188f71d3d873e7b12e10de816 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Shipping.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Shipping.php @@ -141,6 +141,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 c856c3a4a91390687be1abbae61caa203075c378..6a308344f68f947358f2490b9337414595296d54 100644 --- a/app/code/Magento/Sales/Model/Resource/Setup.php +++ b/app/code/Magento/Sales/Model/Resource/Setup.php @@ -159,6 +159,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 ad9c8ded4693a25b9d5271e159c861f49faf4b6a..5860dd46d6c91ef5a11130759b024f1f32f1bccc 100644 --- a/app/code/Magento/Sales/Model/Service/Order.php +++ b/app/code/Magento/Sales/Model/Service/Order.php @@ -205,6 +205,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 = []) { @@ -316,6 +318,7 @@ class Order * @param \Magento\Sales\Model\Order\Item $item * @param array $qtys * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _canInvoiceItem($item, $qtys = []) { @@ -356,6 +359,7 @@ class Order * @param \Magento\Sales\Model\Order\Item $item * @param array $qtys * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _canShipItem($item, $qtys = []) { @@ -402,6 +406,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/view/adminhtml/templates/items/column/name.phtml b/app/code/Magento/Sales/view/adminhtml/templates/items/column/name.phtml index 9fc94e8a439f26e69acd656e29f26d134db6efe3..dd9e46018498c2b2eff7f820ab54e1d92980f2ee 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b43ddc2c57a378d3a312ffaa5a519155cc02628b..77fb1ce783226decd83539945015b8312ec7d790 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6f8efd8ca688129680fd80f56bc266fe19120cdd..27eeaea2a092f6ab48b0f7cff2d32a27d0b0cbd1 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 40500face1c56b2010bf4e17f5272f6d0990c936..09086c0477d09ae4ab7ee266ee83c58fd6da5dab 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 52741f30012eac6c0d0f9f4be8e887c8fa5961d2..81d9dedfd189361a5c93c4ce07d6beabda2d712e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c8761f9b8bca77a550113eb48fbec71c8af4d6e8..1f7e6fb4a5e848569aeef8422aafc9aeb87875f6 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3716f80e4dfcca99fb70dadf8fd9d2e481be7f12..55c896f34a96df0c07495bcbfd9ff796919e6050 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 860b17146bb8de6fb6576f71751fb4a102ceb781..23af5210b39fa5b765a16497d929e810d9259663 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e34054186bc3eb012f849501151679f04d46c79d..9ce326d446a8aa7722287aa6a63a941e7a430afc 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 988a3b2d0770c90b5a47875c6c6a214261647a70..3e6161a03889101c741ca6a6e2f53e7390d50701 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f4bb723c7ad46c35eaf305dc742f40ae739a5868..6b46e3e78d94ad73a9bbcd61123208b0d6d3d1fb 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f6531d0c601f852a4e92c4fede0a5b5826a8e976..ea93c9e692d338eae58e4bb82c2bd99ccf287551 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e5d31d190fe86e90b060ea5e555a5c21364a6afe..1e0cb9b37021ae5db71be1597b37430e556fa737 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <div class="page-create-order"> <script> 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 e5b981914eb0898075a6a9976a372a152194f113..cc34fec1e78647c4372e6d0f4a3b624fe752af54 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4270bd0dba031c83d531fe5d1e6c96d634d6f05f..1adec92d5b2415f923c15df435774d3685ae1f2e 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 5c12eab59e48dd4b5cf33e6417bcc6e25dc725a3..8b0bd2ceebf7aba2dfb4265a325074dca1ca6182 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d67ec6012c27829dd018a0bd040cc22f63bda976..40b50025b94fe513f33ef4d93b7a859276c9eb4d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e43faf84a9898974faa82e2f0f73cb796043f82b..a7010061de1460218f772f6eb95141b229309a25 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 a4eaf9a360a983a7e7450c606c38c87f18069f3a..e14e843a1564b47599f594898ea27b717da8317c 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 7f959c1e552c5a2f752ac63b2c373048ddc151aa..96339794392a140607696b8020a511e363be118d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9718766a827fe1e966fc7b89d25e02cf66cac20d..9d04c05f8a34c074b60156d6cc5109a03e64d0fb 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 21c9c9c2996213774c3eca7b2f07f75a3a94caba..5d1982e987dcc59f13c285e76b76f8f2810191f3 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 @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 992c336464791093fcb95bb13691827a7dbf6e24..74b952f041732f9d5df7fc647f03d112fa8ad697 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 948c6be8b567117c3e7511f75f91bfe691be2499..088cbd658045be76b7b21168407945a631bebb11 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 d81a436ee3fb17eea6dc8df15b25a6b705eb40ae..2da0c29c1ec49bd8e97f1d32d0104cea569a081e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 91551cac984569c7413b33c36a6007fa4cbc8ed3..a1939afd258b0381ab44d36c76d9f5e0250989a0 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ec19a1b48c57fa92a59555b8c13d4bc2c720265d..60b6e11da34a41644a7a44b8d399be61dd33e614 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 93e9f0acd3d2615ad12b1af126c4ece07081288b..76dd4eeb66842626c71aa3e1a13ca85c27432fe7 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 62870a09cfc0e5931e378436ce4874daa7939d5a..bd75b807f45247b6647f499d37b636426ba9a115 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f6dd2d460ef0b844a86ba20691bede31967682b4..951a4a388b95f11cf93286f6631bec9f4235a8ee 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b329c6917624f50492c26064cc6752816bcc71a6..c3c5e3ed5eef699cf11422ed568333aedd08a607 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f9777da229597e5d83795bdc9e9394b9261bbaea..7a5f483c0ec25f35fc3a61b187fe71312462808a 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2d76548f8498a668443ec65030a3a8f40e05d09d..ff4bbded0347e4b39672a2db77f9fe36e4e8a370 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e3406620992accbea1fc6c55e970c99b21168399..6ce7f6e3ac679c4724becf0ff958b86b067e1533 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a285db5e369d36ce5e15a1f74ef9cc84ffa7cbc5..3f778b83f086995f3a3c7b671f2a6368e7f0a111 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b2c955838fd0679a327a90c5fb73d86a45ec53c8..61cf98f47fcc79f8706f67712bee99fc589b84b8 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 430201c0cdbacb3636e1abf7ac06aaa9c5594a93..57f80e69f8a59f95f45d3cb3076092708f100d40 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 56fc1ae70c183ed1a83e650046c580b6e4ff7b91..967fc53635ce0fc553f0f244da682b4d9b894381 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d29d907d1f2b836aecc13c48178bd95d863bf012..83555ad4117dd063c66f02bcebcd473d09f06e42 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 02cba53a043cf43afdf8cfe6e0b8c329b34e5d84..add08518ea7722c11c5fb361913d21d9377556f3 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/details.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/details.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c114d5ea2338f4b9b4e1a81fcb98dc947e291915..74245e781e2485dad628ea890f6f93ec62d1c909 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/giftoptions.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/giftoptions.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 55b63b8e9d98300c7978cc006216bb9959e6bab2..a5a24c7ca6cf3b0884d038f73c0bcdf0aa5e7cc5 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 677a1f5c78e425392f4dd2e555d15e9f9f20c239..ea8cca9f3ee42551e311f3f261bec9f90ae42236 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a04f1e717f45ba760233dc7505d92d07f12bbfe5..44ad6f88e4e15c8e6308c0764f18fd28847737df 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 0273514e8f4b5aebfe03f8a150d0adf9797df644..bed963601c833effc4beed0b091ae279f645fd37 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 de508d3645d4e3a830971a73732878051eedac8e..f0649065e7ff65c73216ed25e4f15e5af7a6d4de 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5c78e0b33e58ecba64d34dd79e7e34033cf66023..6bee257e4d551951e4839001d374b19508e26751 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 41226bc7a5608748c48b407ae16830eed057b407..3ea8064fd4835c281e01c683327a8abcd81023a5 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/totalbar.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totalbar.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e0fad63857514df11275862b3254f600fcfa5167..ac7182795609a6bd31cb6862b7d00fab4ea85658 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 23e6ce604afb9cb5928f0d0a798acf452e33e4bd..c4ab4aa4746e4f0af1a4f7310406a809fbea2397 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9b5a208a66c9741d125f7c05978824d9b09ebd36..f6cd709024606803300a0ef4b6337742577e1f76 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ca1a20df8831d8d3325f7514d7d051043bb7e000..6eaf0785fb29bacc0efddb0e4cca15431f6f7557 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 0b1ee30ebe37b7b919a6d69e8a3478fc7a4c5eb1..fb5363b2e4ee05e98495e2269aae6599980e7e76 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 29d7bab5759b95ed6ab4b375b195599a7e512463..bfa6bb1e6c8cae277ec475b32c114077416885a5 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3f24da57b05d4f84cae991f08ae23c9e9990e26e..3f95c981f60881f2192feb7e3b9e6359403dad2c 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3f7b10e905a9a741803d7cd6c5cde49a17208c80..06cd186baa17794564893cf320b3938a41c76c31 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2607277dc3be8e741cfdc6a7da7ff2c83a1cde9b..c7bb38ddcb4029a05cc2c1a9e004755b406e633c 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e9c3f2186dd6d09a6054b519fee1afc9b4f61bd0..0b19be4ac4dfcd0cd6f89c2c559c67986e925914 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f725af66fdb588ac5f3ef049b81e8b93794c091a..bc0ca07df458a3bda3a54dbd571322adf2095f51 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 919d90c65c2adec3943a216c12929f7a9818506a..de2a3fe86d7261ec4562dafd7b7d281b25c0ff75 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c483b77824ed628b7e216501a1d23553ed6ee652..ec03b899edf0087d5388415dd23664b0f32135f2 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d760c722c741b5e351dafb400374031bccd3accf..290ccba64a12204bbb87ec317a8d439c13738738 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4ab2cc74c6a99d3031af98e655684e84aefb5616..587d80e27d68f9b3681194c1455238b55bc3a28b 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 26431f848ca4e1d50671a523c003f0350544cc1f..772dd3dd12c07ee76f5531998ecbd0239c3d848a 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3fbf38c208e782479ef692a4de6647ae58b51a1a..e4b6ea73bdcc3d4800ff7c43155f3aba3bcc30b8 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 @@ -5,5 +5,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a33965d1e047c9d74b5f6074177965c643a95432..54f7be34d7c7043d557e34fa58504670d3ed8fe1 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 15c09aa0713e5b4bc96fad9843415728b2aad0c2..7d3564c822b40227d1ddf4481f582d492b218b02 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/transactions/detail.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/transactions/detail.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 71c907fdb4f0eb668255d48e35e5a27433a08cae..f748fbf43af4bab2be37df2b177c3fb4f3dfa31e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 29ba88018f614d90a23aaeec5e390417a2de42d1..68838929ac6858decac6756b3fd8ce5a6122dd08 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3185abac3d7f7b7f02625f5afff33aebd94ae6d1..5b97b7c93db76a8f4b4c9cf7252216e1877a63f4 100644 --- a/app/code/Magento/Sales/view/frontend/templates/email/items.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/email/items.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 48c4467de8af92ad88eb8fdc8bbd88f906bfa4f7..7d7ded1758e67ada1a9d934cdfa52a63d3ee1939 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 48c4467de8af92ad88eb8fdc8bbd88f906bfa4f7..7d7ded1758e67ada1a9d934cdfa52a63d3ee1939 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 15a6a7e4fc30ea5124c63782e5181b4e84578136..fa77988ed811a5edf361954368efcaab186f72f6 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 f37a65f9b010f819bcd0926b20c100dd342ca83a..bce28e7b09628960857c45fdc75ab11d1c2dc9d1 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d0d06ef52ddbf7505ed6441b7b288c22122e57f7..dee8a9db7af960810dc990018b9f8a5fa99800d3 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 68bb5574608ace1dd0f877e5b2196b031b0576fc..001c7be145b27c0a22665360c39db67a3cece75f 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2be9fbea5bf229d338104b1119c95b6dd28eb103..103fdae42f1d85b08367fed6e8bd5aa8808b2df0 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 675ac4831c2ef4d4ffbd698c6113ef605c005c45..14091e50f3cf9c5aab7b36c38debf491bcd2929d 100644 --- a/app/code/Magento/Sales/view/frontend/templates/guest/form.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/guest/form.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 041b5a3c0334f233a4382520a916e6504a861461..762b8d6b9969304db106a224ad16ea16c083332f 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 7f9cec2d8f631b119372696f35a5cfe2a5a05546..c7fbd22a5f3ed2d092aa93b4b244e4e1f1beacfc 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 99701092acdaad98637a9365c3c57625aed045d9..ee146a735b6a9fcb92e0d055426ebd56e9d2d2ff 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 99be8e37348cec69521e018a61f416324e582a94..43f7e9c30c0126f46204910ee749ef83ad81e815 100644 --- a/app/code/Magento/Sales/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/js/components.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 695f58ea3296fb34e8361625685be79aebd6a67c..a723d4461f8802081d6022e8b83d15919b57ea8a 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/comments.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/comments.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e59592bb6f248b9be94b49e9374ed5126571c958..2e994281949fbc424af37ab245ce6f6afeabd822 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 648b8d37fbc42fef092f0c0b61c90f4198d266a2..9885826af7b8c6065f69e79ed612c011f92e6b9f 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d083ecae975d38a7c8a887fbd00dea7f825a987c..8f5779f5a9564049d2f4edac05826e1e4706bc99 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/history.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/history.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6f50c0e8460bf7896a1ac4ff2477522f28e08c89..690059cdadaa400f618fa3d14b8e3975b2b50ee6 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/info.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/info.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5f5b979cb8510b6d26f8b99057d84d476a546926..3982f1cbc1f229c03c0635f9cdbe8b1a652d4a6d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 86ebea3eb090d5d8c6da35a4d081806f910070e4..ffd3b3349fd74484c79518f5f32e94cbb80d49d8 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 8c96be003c79673352c372fff2bd1a5eae292864..9c162c88b0a4181a5605676b05993619ceaf43f1 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 fd7adfdcbd6b260564415fadde58cf37d9824b08..6c27411e5952d90a1103fa951b13cb8dc75f4865 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 cd2e054a2b14001ae5b4a17505176c01e0af220c..26e5fa568b47acc520eeeb3ba5f5798315f6867d 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/items.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/items.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 967074190e39e655011f41ba0a1110c76779c270..abc4a8c4643536293adb74a98e302574303d0b4b 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 25636dfa40b75b7b01d3c898282389c08181a743..3d073e282cd3f6e97326f12dc76c3443c79a912d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d1c771e2fe4d48b0264c39e8e91759dcac36f767..bc6c07248eea1625ce51a3ae17f94455bc0ad424 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9b10b00f88e92f0a8035cf9e30aff9caedc9ba6a..fc3339d4d33c1bfe6f9a0dcf2a634ca9d410e5f0 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5ecfdeb8134b199a65f670872a718adfdb21aaa5..15fa73c75632d3309d3c18c64d140e9f55fc24fa 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a3e0665bdec5b3441836e716b8e90355ae426dcf..d71391f9bf667070b41338d60a69daf3be1ff86b 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 307739e8df4a1bcccf648c9d283a913898c50cb2..70c3fbbe87f30d6fad3c38cdd33c807595f823d8 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/recent.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/recent.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8986722b1d07f1d1819d29a30ec4da84a7a1c245..030d677fcbbca71455293579d1e713dd5fca17a8 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 abfdec91d22be6ef0e05579fabb715be0b86d6ba..49f7e75aac44fb516f0f9becdb7c9c8582a970be 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/totals.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/totals.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d3b1167912640bb534c7e12889ae00cb00f89d72..43779c2cbf3c03aac42d192870e4e6e061966dd6 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/view.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/view.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ab4b05ed78cfe2584405830125261dc6e78ce25f..d04daf4e5587cfe4d2baf2f75dd7807a3b128e3b 100644 --- a/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 cee5441daba93c70c5d2f90dec2a5f5c77ae3ca8..7cf9e95c0f0f8d389cbe1a8aad94f29b450f8747 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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/Actions.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.php index 075a54de7abc57cf32876799bc085b9c2a4bf6e5..97198aaac6a31459addbcd192954793eb3a477d2 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 @@ -85,6 +85,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 37b04892acd00f5d9ac5f58fc692c69c9c030de8..c2e17d7add90b1e6a26d10abf5c9d865357e4db1 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 @@ -41,6 +41,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/Coupons/Grid.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Grid.php index 7dece310192cbf057ed2cd1975d16ea3109b761e..8e726aef97be44ed6334bab0d5fa8376f9276f9b 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9ac3264d6f07a7aa1260dcaef50c46609d2a43ae..3a786b66aef8838113d36e8aa5df14a6070d222a 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab; use Magento\Backend\Block\Template\Context; @@ -116,6 +119,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 f408f5ced5dcb977460a8ede22acbfe0c3c0ab27..6138a59b95ac241b6df44e33edd90fba92fcc369 100644 --- a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Edit.php +++ b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Edit.php @@ -12,6 +12,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 256bd7cdcdc678615e04b237847cfb9aa31775ab..c9547549fa1baf262436af28201d3fc97d12a079 100644 --- a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php +++ b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php @@ -12,6 +12,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/Helper/Coupon.php b/app/code/Magento/SalesRule/Helper/Coupon.php index a445973a998939d1c9880b2a1bd0b0fd0f719611..2b3282ae12e647e3cc765233625359ac83710cbd 100644 --- a/app/code/Magento/SalesRule/Helper/Coupon.php +++ b/app/code/Magento/SalesRule/Helper/Coupon.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\SalesRule\Helper; /** diff --git a/app/code/Magento/SalesRule/Model/Observer.php b/app/code/Magento/SalesRule/Model/Observer.php index 881016526c6c3fdbaa4a82b53b782cfdf145b681..a31d559ee54756197e8b6c1137069ad14f17c0ca 100644 --- a/app/code/Magento/SalesRule/Model/Observer.php +++ b/app/code/Magento/SalesRule/Model/Observer.php @@ -7,6 +7,9 @@ namespace Magento\SalesRule\Model; use Magento\Framework\Event\Observer as EventObserver; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Observer { /** @@ -90,6 +93,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 7d99533a1d4d3d8af7f2ed34dca41cfe51b37d25..d108bb891e6ec7e6f4a684f55b6443a702a8c925 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -59,6 +59,7 @@ class Discount extends \Magento\Quote\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 32eafd1b1424b37b3b08ea875c26633262b61757..8f87fc3feb640e41759c71091bc638bf37575cc8 100644 --- a/app/code/Magento/SalesRule/Model/Resource/Report/Rule/Createdat.php +++ b/app/code/Magento/SalesRule/Model/Resource/Report/Rule/Createdat.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\SalesRule\Model\Resource\Report\Rule; /** @@ -42,6 +45,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/Resource/Rule/Collection.php b/app/code/Magento/SalesRule/Model/Resource/Rule/Collection.php index 3ca4e0d272faf9c0e6ac612f0be8f12b604c89a9..a3d49f61e3946222e717d347706e1df4610c9a3b 100644 --- a/app/code/Magento/SalesRule/Model/Resource/Rule/Collection.php +++ b/app/code/Magento/SalesRule/Model/Resource/Rule/Collection.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\SalesRule\Model\Resource\Rule; /** diff --git a/app/code/Magento/SalesRule/Model/Rule.php b/app/code/Magento/SalesRule/Model/Rule.php index 713d65305f405b75f623eca36ba717455d68581a..66dd6c7f054fcfadfab0166b17bf026c89052994 100644 --- a/app/code/Magento/SalesRule/Model/Rule.php +++ b/app/code/Magento/SalesRule/Model/Rule.php @@ -63,6 +63,7 @@ use Magento\Quote\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 { @@ -185,6 +186,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, @@ -436,6 +438,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) { @@ -525,6 +529,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/Action/Discount/ByPercent.php b/app/code/Magento/SalesRule/Model/Rule/Action/Discount/ByPercent.php index 59bc27a01ce7ffa1193b4de3b6dd344bfe5c88c6..19e2f81d657c3c5232fd484eb4cc12eb4750a2cf 100644 --- a/app/code/Magento/SalesRule/Model/Rule/Action/Discount/ByPercent.php +++ b/app/code/Magento/SalesRule/Model/Rule/Action/Discount/ByPercent.php @@ -57,7 +57,9 @@ class ByPercent extends AbstractDiscount $discountData->setAmount(($qty * $itemPrice - $item->getDiscountAmount()) * $_rulePct); $discountData->setBaseAmount(($qty * $baseItemPrice - $item->getBaseDiscountAmount()) * $_rulePct); $discountData->setOriginalAmount(($qty * $itemOriginalPrice - $item->getDiscountAmount()) * $_rulePct); - $discountData->setBaseOriginalAmount(($qty * $baseItemOriginalPrice - $item->getDiscountAmount()) * $_rulePct); + $discountData->setBaseOriginalAmount( + ($qty * $baseItemOriginalPrice - $item->getBaseDiscountAmount()) * $_rulePct + ); if (!$rule->getDiscountQty() || $rule->getDiscountQty() > $qty) { $discountPercent = min(100, $item->getDiscountPercent() + $rulePercent); 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 11092ec2fd22283c2e07fc15a34d61e8c95a848d..8255735b36cdbb45f5a7b6c4d1fb3dcdbc68fce7 100644 --- a/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php +++ b/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php @@ -55,6 +55,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 1d814f2042045efa20b3cae79e882c96f9c64eff..20b8c40142e50f2234bd0e2f6b203ea178118565 100644 --- a/app/code/Magento/SalesRule/Model/RulesApplier.php +++ b/app/code/Magento/SalesRule/Model/RulesApplier.php @@ -48,6 +48,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 e5fe1cd50e3905014bc6199e34ae0e4fcd822c12..3b170bc61e7e4a3441a68bb869dad84aa7582384 100644 --- a/app/code/Magento/SalesRule/Model/Utility.php +++ b/app/code/Magento/SalesRule/Model/Utility.php @@ -77,6 +77,8 @@ class Utility * @param \Magento\SalesRule\Model\Rule $rule * @param \Magento\Quote\Model\Quote\Address $address * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function canProcessRule($rule, $address) { @@ -180,6 +182,7 @@ class Utility * @param \Magento\SalesRule\Model\Rule\Action\Discount\Data $discountData * @param \Magento\Quote\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 4d6d2ef3942ad1aea60f12ae016f76a2bcb17c8d..a9b4ab5899628f49d1bab617a8178794bbf157ca 100644 --- a/app/code/Magento/SalesRule/Model/Validator.php +++ b/app/code/Magento/SalesRule/Model/Validator.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\SalesRule\Model; use Magento\Quote\Model\Quote\Address; @@ -19,6 +22,7 @@ use Magento\Quote\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 { @@ -101,6 +105,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, @@ -246,6 +251,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 bb6565132e775bc050bf93a37fb5164dd30c6046..b0fbd373efa7fa5403dde0299ce837582ae647c1 100644 --- a/app/code/Magento/Search/Block/Adminhtml/Dashboard/Last.php +++ b/app/code/Magento/Search/Block/Adminhtml/Dashboard/Last.php @@ -7,6 +7,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 c54e05fbe0e6731979b34df88c4f3bd3ce8de5c5..e08ec6515edb1b598bd1a7d054aae66ab2b4af32 100644 --- a/app/code/Magento/Search/Block/Adminhtml/Dashboard/Top.php +++ b/app/code/Magento/Search/Block/Adminhtml/Dashboard/Top.php @@ -7,6 +7,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 6b4cee2a663f5e949fd40c1bb78611749b9f854c..a7b63d6f28acb2a7027bf01e12a021a7189cad61 100644 --- a/app/code/Magento/Search/Block/Adminhtml/Term/Edit/Form.php +++ b/app/code/Magento/Search/Block/Adminhtml/Term/Edit/Form.php @@ -51,6 +51,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 ef21b7293e33ceccfd0b19749fe25fff1b6403e1..8f650796bf1973909679e931713355054012e558 100644 --- a/app/code/Magento/Search/Controller/Adminhtml/Term/Edit.php +++ b/app/code/Magento/Search/Controller/Adminhtml/Term/Edit.php @@ -33,6 +33,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 a186dfba7c169c5cd60e515bc527f18acec2622c..e40b00253d4b1e5dc4fa3e1ad7286dfdc4ef25b5 100644 --- a/app/code/Magento/Search/Controller/Adminhtml/Term/Save.php +++ b/app/code/Magento/Search/Controller/Adminhtml/Term/Save.php @@ -31,6 +31,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 e4b0202e1a79c75eec8e1b27679ff4165193d3b0..603f9317fe2b39d7b4776bbd63a84ef471b9f908 100644 --- a/app/code/Magento/Search/Helper/Data.php +++ b/app/code/Magento/Search/Helper/Data.php @@ -251,6 +251,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 9a0bfd70914431f9f61833b95fd8d0a038667e21..917abf841a7da2b22d9cf1096863efbff0f86fac 100644 --- a/app/code/Magento/Search/Model/Query.php +++ b/app/code/Magento/Search/Model/Query.php @@ -40,6 +40,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 8ccf11e186a9d2b869a796655b2b3407576068b8..3a9ddcf7bb682b3df296196d947db83a9594dc01 100644 --- a/app/code/Magento/Search/Model/Resource/Helper.php +++ b/app/code/Magento/Search/Model/Resource/Helper.php @@ -25,6 +25,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/Search/Model/Resource/Query.php b/app/code/Magento/Search/Model/Resource/Query.php index 855d5fa38faf8f51f10271296b49af732288ecde..b2af20520e73f86ea32cf07792512be48b14ecbd 100644 --- a/app/code/Magento/Search/Model/Resource/Query.php +++ b/app/code/Magento/Search/Model/Resource/Query.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2c65a6a8fb8dd1a2edb147e833f372a9ffd67e19..f03536c1aa4e318e13724427c5372c238f5daf0e 100644 --- a/app/code/Magento/Search/view/frontend/templates/search_data.phtml +++ b/app/code/Magento/Search/view/frontend/templates/search_data.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d15c1bddfe103f1898ea159ce96ca642a7db3f8b..c7c2d888159ae68dc3377646952e39542365f583 100644 --- a/app/code/Magento/Search/view/frontend/templates/term.phtml +++ b/app/code/Magento/Search/view/frontend/templates/term.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4d1645da39aa034827f4ac3c37e37e85b362d9a5..e3ac2a66b17ef58c0110fd96c8bc0d822d9f2e95 100644 --- a/app/code/Magento/Sendfriend/Controller/Product/Sendmail.php +++ b/app/code/Magento/Sendfriend/Controller/Product/Sendmail.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sendfriend\Controller\Product; use Magento\Framework\Exception\NoSuchEntityException; @@ -37,6 +40,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/Helper/Data.php b/app/code/Magento/Sendfriend/Helper/Data.php index 0b14d107863c49e781cc524596d92076c2c4b04a..e7befbc90105faea6729863e522ca7121ccab82e 100644 --- a/app/code/Magento/Sendfriend/Helper/Data.php +++ b/app/code/Magento/Sendfriend/Helper/Data.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sendfriend\Helper; /** diff --git a/app/code/Magento/Sendfriend/Model/Observer.php b/app/code/Magento/Sendfriend/Model/Observer.php index 6d792a985ff493a2e95b085ec069abe9a8a52924..b3883234c174074d88c7313e7426865e634d7e11 100644 --- a/app/code/Magento/Sendfriend/Model/Observer.php +++ b/app/code/Magento/Sendfriend/Model/Observer.php @@ -31,6 +31,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 d74e7a6cb15dab12094a03bf41652523951b3bd1..e2e98e4b7c1430506462d65e306cda1a3baf39da 100644 --- a/app/code/Magento/Sendfriend/Model/Resource/Sendfriend.php +++ b/app/code/Magento/Sendfriend/Model/Resource/Sendfriend.php @@ -30,6 +30,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 d365253ebfd91b65745669b7c097476e1452eb25..fc91a198568dae8c697e667feefda63a42b2173c 100644 --- a/app/code/Magento/Sendfriend/Model/Sendfriend.php +++ b/app/code/Magento/Sendfriend/Model/Sendfriend.php @@ -18,6 +18,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 { @@ -121,6 +122,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, @@ -219,6 +221,8 @@ class Sendfriend extends \Magento\Framework\Model\AbstractModel * Validate Form data * * @return bool|string[] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validate() { @@ -268,6 +272,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/Sendfriend/view/frontend/templates/send.phtml b/app/code/Magento/Sendfriend/view/frontend/templates/send.phtml index 50f4b22f3b9e8255f489a0516b55f313b8c6d880..91604d10ef48f6935c1ecfe8e401fe599cb42681 100644 --- a/app/code/Magento/Sendfriend/view/frontend/templates/send.phtml +++ b/app/code/Magento/Sendfriend/view/frontend/templates/send.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + /** * Send to friend form * diff --git a/app/code/Magento/Shipping/Block/Adminhtml/View/Form.php b/app/code/Magento/Shipping/Block/Adminhtml/View/Form.php index 9dafeb0810e4ea133850562a9a3c69302f89f0b4..2f848e0a150c139f624847ddbdab1d9a89abd174 100644 --- a/app/code/Magento/Shipping/Block/Adminhtml/View/Form.php +++ b/app/code/Magento/Shipping/Block/Adminhtml/View/Form.php @@ -70,6 +70,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 61cab60211554252e5c98ba5d0a00538c958a282..2959384a80acd7377399d80ca1a36fa266619e9b 100644 --- a/app/code/Magento/Shipping/Block/Tracking/Popup.php +++ b/app/code/Magento/Shipping/Block/Tracking/Popup.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Shipping\Block\Tracking; class Popup extends \Magento\Framework\View\Element\Template @@ -86,6 +89,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 8ef98d7eb22bc8700bd8bb47b6fc8c8b58d56d55..09b92ee211a1ce0cb121e81304945b947a6c744f 100644 --- a/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/MassPrintShippingLabel.php +++ b/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/MassPrintShippingLabel.php @@ -50,6 +50,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 9a3fcde21810585778de0c198c15020073cec8f6..7e35623f2d79bacbc748ae48cbdb1b280feb77ac 100644 --- a/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/Save.php +++ b/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/Save.php @@ -78,6 +78,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/Helper/Data.php b/app/code/Magento/Shipping/Helper/Data.php index b1c29f0d1bbba8af00995a4cd5e696ccd2d9c871..c7cddf2cab81c15c62b9dffc4fb6accb44f43d39 100644 --- a/app/code/Magento/Shipping/Helper/Data.php +++ b/app/code/Magento/Shipping/Helper/Data.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 2ac193161e577cbcee220c5e8dbc79cee7b69ae9..147f50e0ba15b9debdd514b581b46fcff1f0257c 100644 --- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php +++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Shipping\Model\Carrier; use Magento\Quote\Model\Quote\Address\AbstractCarrierInterface; @@ -133,6 +136,7 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst * * @param string $field * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getConfigFlag($field) { @@ -162,6 +166,7 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst * * @param Request $request * @return \Magento\Framework\Object + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function requestToShipment($request) { @@ -174,6 +179,7 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst * * @param Request $request * @return \Magento\Framework\Object + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function returnOfShipment($request) { @@ -185,6 +191,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) { @@ -196,6 +203,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) { @@ -259,6 +268,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) { @@ -268,6 +278,7 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst /** * @param \Magento\Quote\Model\Quote\Address\RateRequest $request * @return $this|bool|false|\Magento\Framework\Model\AbstractModel + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function checkAvailableShipCountries(\Magento\Quote\Model\Quote\Address\RateRequest $request) { @@ -314,6 +325,7 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst * * @param \Magento\Quote\Model\Quote\Address\RateRequest $request * @return $this|bool|Error + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function proccessAdditionalValidation(\Magento\Quote\Model\Quote\Address\RateRequest $request) { @@ -374,6 +386,8 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst /** * @param \Magento\Quote\Model\Quote\Address\RateRequest $request * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _updateFreeMethodQuote($request) { @@ -554,6 +568,7 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst * * @param string|null $countryId * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function isZipCodeRequired($countryId = null) { @@ -577,6 +592,7 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst * Define if debugging is enabled * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDebugFlag() { @@ -609,6 +625,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/Shipping/Model/Carrier/AbstractCarrierOnline.php b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php index a0c7ea000be84fb387481d6f3810720842261aca..592adb163f83660748e94335abef687ee62d7876 100644 --- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php +++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php @@ -12,6 +12,7 @@ use Magento\Shipping\Model\Shipment\Request; /** * Abstract online shipping carrier model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractCarrierOnline extends AbstractCarrier { @@ -247,6 +248,7 @@ abstract class AbstractCarrierOnline extends AbstractCarrier * * @param RateRequest $request * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getAllItems(RateRequest $request) { @@ -279,6 +281,8 @@ abstract class AbstractCarrierOnline extends AbstractCarrier * * @param RateRequest $request * @return $this|bool|Error + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function proccessAdditionalValidation(RateRequest $request) { @@ -518,6 +522,7 @@ abstract class AbstractCarrierOnline extends AbstractCarrier * @return bool * * @todo implement rollback logic + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function rollBack($data) { @@ -566,6 +571,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/Config.php b/app/code/Magento/Shipping/Model/Config.php index 68cb91bf39e2dee8519161ce6a05d9b56a8372c4..c5ac94f1ef5b3c51c82073bd1f07388fddd38694 100644 --- a/app/code/Magento/Shipping/Model/Config.php +++ b/app/code/Magento/Shipping/Model/Config.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ccbf79eaa36d525874095e3be0a2f24203b0cd56..c455c59d91e71d332f543974c93dab3b66a62778 100644 --- a/app/code/Magento/Shipping/Model/Info.php +++ b/app/code/Magento/Shipping/Model/Info.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Shipping\Model; use Magento\Sales\Model\Order\Shipment; diff --git a/app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php b/app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php index 80a94cc517f277e79bb05b1008da414375c01bdd..2e481201d7f10cb6f2718eff22e947ddf4c48488 100644 --- a/app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php +++ b/app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php @@ -7,6 +7,9 @@ namespace Magento\Shipping\Model\Order\Pdf; use Magento\Shipping\Helper\Carrier; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf { /** @@ -142,6 +145,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 14f1f881083dc7e117fd00cc1bfa757cee9f8d33..697b91b4d5941629c46b1caf9d4bffdbbecf0fb9 100644 --- a/app/code/Magento/Shipping/Model/Rate/Result.php +++ b/app/code/Magento/Shipping/Model/Rate/Result.php @@ -182,6 +182,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 8c67b2ed527190fd0ce70e68f2c1d9cbb5b3d106..bcb067aba82ed22e0984fe47e43f52287ade8c48 100644 --- a/app/code/Magento/Shipping/Model/Shipping.php +++ b/app/code/Magento/Shipping/Model/Shipping.php @@ -8,6 +8,9 @@ namespace Magento\Shipping\Model; use Magento\Sales\Model\Order\Shipment; use Magento\Quote\Model\Quote\Address\RateCollectorInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Shipping implements RateCollectorInterface { /** @@ -231,6 +234,8 @@ class Shipping implements RateCollectorInterface * @param string $carrierCode * @param \Magento\Quote\Model\Quote\Address\RateRequest $request * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function collectCarrierRates($carrierCode, $request) { @@ -310,6 +315,8 @@ class Shipping implements RateCollectorInterface * @param \Magento\Shipping\Model\Carrier\AbstractCarrier $carrier * @param \Magento\Quote\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 e55c9991d8bdcfa1f4e1c870adefa479a65e260c..e51a5eb891f07b31598f2cbe03c30d5d4829c0e0 100644 --- a/app/code/Magento/Shipping/Model/Shipping/LabelGenerator.php +++ b/app/code/Magento/Shipping/Model/Shipping/LabelGenerator.php @@ -9,6 +9,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 a279416633ca4cac85371c1cab8f02373983a1f1..40b7add661e011da1e88900076c500ef482f6865 100644 --- a/app/code/Magento/Shipping/Model/Shipping/Labels.php +++ b/app/code/Magento/Shipping/Model/Shipping/Labels.php @@ -3,12 +3,16 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Shipping\Model\Shipping; use Magento\Sales\Model\Order\Shipment; /** * Shipping labels model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Labels extends \Magento\Shipping\Model\Shipping { @@ -34,6 +38,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, @@ -69,6 +74,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/Shipping/view/adminhtml/templates/create/form.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/create/form.phtml index 38e4943a7f77b3f097b859ad04d12d691ec06858..3be6425cab0f1a44826eca845408be24bc5f3876 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/create/form.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/create/form.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 aa29650b2761ae142b129dd569f3c50e50a25eae..fc7b6960ebd1a05caefaacf9ea4afd44f4a6a5ca 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/create/items.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/create/items.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 761aec30674fda57b784f01e861e67f427edf1e3..2101fc41f1ce0e45c551045c7106f3c3ba112957 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a1f7be2a39dba7da47487e829df731c59d857396..98ab4af25e613aee86d6071e3a809f98c481a949 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 157b63e2b35de35043af6eb7b67e601367dceba2..0e213c1b817cdadf2ffb368ab1bd3e648b9c5e9f 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4d290a74b5a5ac1b0203c6015d85f06152684645..92b3bd34f5b04ea72329046325ddfe81c1ec796d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 cc8d316e7fec6420f871ef660e67cf5cd0409f16..cc236a2e9d2f62a87ad2d372faacfa9df08055ae 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2caf8723676e9ef04e9d056ac46d6a29f6ead5e4..c3e00c43e7baba96f2adebfa6ff930d4bc33a597 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this Magento\Shipping\Block\Adminhtml\Order\Tracking */?> <script> 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 1ec147e360b67ac415e7c5a5cd42fc3af1dc29a1..0b590f2f8f9c5f4c33989569b1b682c81c1ac7c4 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 cab45f4fd6336602294724ffb7537f31b18f5c15..5d8a5c3bf2d910c72fd1cf37176c28001f92ac50 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/view/form.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/view/form.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 7ec4fb2de9ffda1ffdc18b03e4217e00f95c1ab9..fb13e9585feab6117df14752cd8803fa8f694f20 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/view/items.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/view/items.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 62443c04c4ae3c12022856444e3f13cb4e622a30..0d2b5945c480c331e743bc5d9a802438dbf8a707 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f636df52fedc044150c0cf3c2681fe3103df3f75..2d3b1173e5853d9c2525484a4aa095c28f5b82d9 100644 --- a/app/code/Magento/Shipping/view/frontend/templates/items.phtml +++ b/app/code/Magento/Shipping/view/frontend/templates/items.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d98cadf13321b6fe93a10ca6339b4ec4b23775be..6603dd32deb00364e1e437b0ae6e8202cbd38e72 100644 --- a/app/code/Magento/Shipping/view/frontend/templates/tracking/link.phtml +++ b/app/code/Magento/Shipping/view/frontend/templates/tracking/link.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 678847951b89e4721ea0b266ef2135f5d677780c..11ef871e43541391620733cf9227f97de763007d 100644 --- a/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml +++ b/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php /** @var $this \Magento\Shipping\Block\Tracking\Popup */ ?> <?php $_results = $this->getTrackingInfo(); ?> diff --git a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php index c6fea032b57406cc7840fac919c32812f63b02f0..47cf66a319c0e9e0c7d78e521fb0f96078dd2dbc 100644 --- a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php +++ b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php @@ -29,6 +29,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 58f216f7b22ba929ee009a7c001fba6318670e5b..63e15c1c0c91c281120fb9e5aab1f22ae13e39a0 100644 --- a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php +++ b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php @@ -15,6 +15,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 4805c3676f19f1d050af5435bee91df5143a1906..f0f7066e7091ecca43e48db61813d9b5adf4c622 100644 --- a/app/code/Magento/Sitemap/Model/Observer.php +++ b/app/code/Magento/Sitemap/Model/Observer.php @@ -90,6 +90,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 9f7b3200e89dd8326458ac7f3bd225c1ff5230b3..bd3741d3f5f416e92d896f10ed3053b97ba5f6df 100644 --- a/app/code/Magento/Sitemap/Model/Resource/Catalog/Product.php +++ b/app/code/Magento/Sitemap/Model/Resource/Catalog/Product.php @@ -11,6 +11,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 0235f1e75adb55fae856428192ab540142cdc8b8..4baabe60a907eb0d60984115ce3e29cb3ad54142 100644 --- a/app/code/Magento/Sitemap/Model/Sitemap.php +++ b/app/code/Magento/Sitemap/Model/Sitemap.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sitemap\Model; use Magento\Framework\App\Filesystem\DirectoryList; @@ -22,6 +25,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 { @@ -157,6 +162,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 8332f4bca5aaa02f2fa65d05228783bf402e6e32..9ac06a3058ba99fbf04e3fe211ad8e6e1e835e6d 100644 --- a/app/code/Magento/Store/App/Action/Plugin/Context.php +++ b/app/code/Magento/Store/App/Action/Plugin/Context.php @@ -54,6 +54,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/Core/Model/App/Emulation.php b/app/code/Magento/Store/Model/App/Emulation.php similarity index 98% rename from app/code/Magento/Core/Model/App/Emulation.php rename to app/code/Magento/Store/Model/App/Emulation.php index 85f57ad61706303c0d05926efde1d96c1126a7a5..5b64511218ac279cc0bc1bb8c56a4e73436d9f8a 100644 --- a/app/code/Magento/Core/Model/App/Emulation.php +++ b/app/code/Magento/Store/Model/App/Emulation.php @@ -9,8 +9,9 @@ * * @author Magento Core Team <core@magentocommerce.com> */ -namespace Magento\Core\Model\App; +namespace Magento\Store\Model\App; +use Magento\Framework\Object; use Magento\Framework\Translate\Inline\ConfigInterface; class Emulation extends \Magento\Framework\Object @@ -145,7 +146,7 @@ class Emulation extends \Magento\Framework\Object * * Function restores initial store environment * - * @return \Magento\Core\Model\App\Emulation + * @return \Magento\Store\Model\App\Emulation */ public function stopEnvironmentEmulation() { diff --git a/app/code/Magento/Store/Model/Resource/Group/Collection.php b/app/code/Magento/Store/Model/Resource/Group/Collection.php index 832c7b46d2c8c84ad4ccc22562036048856c50d6..3f36a0229884193d4f197a22878232718882cb75 100644 --- a/app/code/Magento/Store/Model/Resource/Group/Collection.php +++ b/app/code/Magento/Store/Model/Resource/Group/Collection.php @@ -36,6 +36,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 6f8df5c43fab92ebb1965ace63be40b632d6544b..3eb4358c1e5724f67dc1096bf7adb41d7029204f 100644 --- a/app/code/Magento/Store/Model/Resource/Store/Collection.php +++ b/app/code/Magento/Store/Model/Resource/Store/Collection.php @@ -51,6 +51,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.php b/app/code/Magento/Store/Model/Resource/Website.php index 5a44136529c90d686371d40cae2e617a296de500..1213b6c8de7eb359b7eb8ef6a36a4aaa69c0145a 100644 --- a/app/code/Magento/Store/Model/Resource/Website.php +++ b/app/code/Magento/Store/Model/Resource/Website.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Store\Model\Resource; /** diff --git a/app/code/Magento/Store/Model/Resource/Website/Collection.php b/app/code/Magento/Store/Model/Resource/Website/Collection.php index 1b263ec39dfc127cf4a7cc57bbc3a8c83b4c9b3a..3c50219847772b12b8effdb57a5f9423f9619fac 100644 --- a/app/code/Magento/Store/Model/Resource/Website/Collection.php +++ b/app/code/Magento/Store/Model/Resource/Website/Collection.php @@ -57,6 +57,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 90bafe68904cf9bb0b674886d4289e7d065af2b8..f9cd545b5b1e740fa844a6c6cc336a6bda61766e 100644 --- a/app/code/Magento/Store/Model/Storage/Db.php +++ b/app/code/Magento/Store/Model/Storage/Db.php @@ -14,6 +14,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 { /** @@ -133,6 +137,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, @@ -179,6 +184,7 @@ class Db implements \Magento\Store\Model\StoreManagerInterface * Init store, group and website collections * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _initStores() { @@ -283,6 +289,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) { @@ -433,6 +441,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/Store/Model/StorageFactory.php b/app/code/Magento/Store/Model/StorageFactory.php index b46c0a09a4cb4148367b5c38cbbfcaf326871dab..cf53216bd169cd611b88f46838345831bef4bfaf 100644 --- a/app/code/Magento/Store/Model/StorageFactory.php +++ b/app/code/Magento/Store/Model/StorageFactory.php @@ -7,6 +7,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 e36ea55f6087333b7f4d12e6bebf38af2e159574..442347f72b5f1ae8673cae6a176b1497b6541045 100644 --- a/app/code/Magento/Store/Model/Store.php +++ b/app/code/Magento/Store/Model/Store.php @@ -19,6 +19,10 @@ 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) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) */ class Store extends AbstractModel implements \Magento\Framework\App\ScopeInterface, @@ -317,6 +321,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, @@ -526,6 +531,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) { @@ -1031,6 +1038,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 38850ba6ced3eb2becd35f9a6c8e51e1b4782cb8..d12f4d791e310915f62055ac738d48120815d0b8 100644 --- a/app/code/Magento/Store/Model/System/Store.php +++ b/app/code/Magento/Store/Model/System/Store.php @@ -100,6 +100,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) { @@ -156,6 +158,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 746777c9f4138b3c8e7744c6196b705b928d5592..6299b99237f2014b79cade78d25fc19bf2763ce8 100644 --- a/app/code/Magento/Store/Model/Website.php +++ b/app/code/Magento/Store/Model/Website.php @@ -26,6 +26,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, @@ -175,6 +177,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/Store/view/frontend/templates/switch/flags.phtml b/app/code/Magento/Store/view/frontend/templates/switch/flags.phtml index da14314d708f3b68ca1e83ba1756bf3900499da3..60839e5f31a78f61aa6a532becab9da640dc37c6 100644 --- a/app/code/Magento/Store/view/frontend/templates/switch/flags.phtml +++ b/app/code/Magento/Store/view/frontend/templates/switch/flags.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 0a266dd0064b444dd4844e903734cafccb7985a2..26d29298ce3b2227882f9b3daadeebbad4401a21 100644 --- a/app/code/Magento/Store/view/frontend/templates/switch/languages.phtml +++ b/app/code/Magento/Store/view/frontend/templates/switch/languages.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b5f7346fa6a9259e3686db2280bfd430b400c736..20935584a94d51f5976d7b8594f657c590d21b18 100644 --- a/app/code/Magento/Store/view/frontend/templates/switch/stores.phtml +++ b/app/code/Magento/Store/view/frontend/templates/switch/stores.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php /** diff --git a/app/code/Magento/Tax/Api/Data/QuoteDetailsItemInterface.php b/app/code/Magento/Tax/Api/Data/QuoteDetailsItemInterface.php index 3c439a5c418324fc4fca291227cafda31544923d..405eae5862810b0b9ce4054e17baf916a7af5a67 100644 --- a/app/code/Magento/Tax/Api/Data/QuoteDetailsItemInterface.php +++ b/app/code/Magento/Tax/Api/Data/QuoteDetailsItemInterface.php @@ -72,6 +72,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 54aedb14aaacea1f64a21020c376a0d8c47a81e8..7886702d51034b7e92ca5dbee59f4484ceed7bdc 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Admin product tax class add form * @@ -14,6 +16,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'; @@ -71,6 +76,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, @@ -104,6 +110,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 0afe26138498fec811d94fdf2fbee9564cf734c3..0d2b16bee6f0dff1154bba3c025f3a0f9b0b541a 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit/Form.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit/Form.php @@ -90,6 +90,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 167d30a11f40d0bcd77e267c432902002cdcae55..7b0b5bf2cc4d86ac9f9bf0eab8758d9db0c8afb1 100644 --- a/app/code/Magento/Tax/Block/Checkout/Cart/Sidebar/Totals.php +++ b/app/code/Magento/Tax/Block/Checkout/Cart/Sidebar/Totals.php @@ -86,6 +86,7 @@ class Totals extends SidebarTotals * Return whether subtotal should be displayed including tax * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDisplaySubtotalInclTax() { @@ -96,6 +97,7 @@ class Totals extends SidebarTotals * Return whether subtotal should be displayed excluding tax * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDisplaySubtotalExclTax() { @@ -106,6 +108,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 af87c80d409afa5a581daf6c75887b1906d78adf..86737961b60e2409050ec30a2da3d872958de441 100644 --- a/app/code/Magento/Tax/Block/Sales/Order/Tax.php +++ b/app/code/Magento/Tax/Block/Sales/Order/Tax.php @@ -115,6 +115,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 0a7e7af49fd7f83933ecd43eee8d60561c39164c..1ff5f1711a3418ad4d715c2ee44202f9ad9bd547 100644 --- a/app/code/Magento/Tax/Controller/Adminhtml/Rule.php +++ b/app/code/Magento/Tax/Controller/Adminhtml/Rule.php @@ -81,6 +81,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 38be2cfd6769e4afd5ff0e225e5e1cf7d8b8da7a..580aacd2f63ab4fb2357df744da120a563e19680 100644 --- a/app/code/Magento/Tax/Helper/Data.php +++ b/app/code/Magento/Tax/Helper/Data.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Tax\Helper; use Magento\Framework\Pricing\PriceCurrencyInterface; @@ -22,6 +25,8 @@ use Magento\Sales\Model\EntityInterface; /** * Catalog data helper + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Data extends \Magento\Framework\App\Helper\AbstractHelper { @@ -170,6 +175,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, @@ -629,7 +635,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * @param null|string|bool|int|Store $store * @return string */ - public function getCalculationAgorithm($store = null) + public function getCalculationAlgorithm($store = null) { return $this->_config->getAlgorithm($store); } @@ -790,6 +796,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) { @@ -797,23 +804,6 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper $orderTaxDetails = $this->orderTaxManagement->getOrderTaxDetails($order->getId()); - // Apply any taxes for shipping - $shippingTaxAmount = $salesItem->getShippingTaxAmount(); - $originalShippingTaxAmount = $order->getShippingTaxAmount(); - if ($shippingTaxAmount && $originalShippingTaxAmount && - $shippingTaxAmount != 0 && floatval($originalShippingTaxAmount) - ) { - //An invoice or credit memo can have a different qty than its order - $shippingRatio = $shippingTaxAmount / $originalShippingTaxAmount; - $itemTaxDetails = $orderTaxDetails->getItems(); - foreach ($itemTaxDetails as $itemTaxDetail) { - //Aggregate taxable items associated with shipping - if ($itemTaxDetail->getType() == \Magento\Quote\Model\Quote\Address::TYPE_SHIPPING) { - $taxClassAmount = $this->_aggregateTaxes($taxClassAmount, $itemTaxDetail, $shippingRatio); - } - } - } - // Apply any taxes for the items /** @var $item \Magento\Sales\Model\Order\Invoice\Item|\Magento\Sales\Model\Order\Creditmemo\Item */ foreach ($salesItem->getItems() as $item) { @@ -845,6 +835,23 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper } } + // Apply any taxes for shipping + $shippingTaxAmount = $salesItem->getShippingTaxAmount(); + $originalShippingTaxAmount = $order->getShippingTaxAmount(); + if ($shippingTaxAmount && $originalShippingTaxAmount && + $shippingTaxAmount != 0 && floatval($originalShippingTaxAmount) + ) { + //An invoice or credit memo can have a different qty than its order + $shippingRatio = $shippingTaxAmount / $originalShippingTaxAmount; + $itemTaxDetails = $orderTaxDetails->getItems(); + foreach ($itemTaxDetails as $itemTaxDetail) { + //Aggregate taxable items associated with shipping + if ($itemTaxDetail->getType() == \Magento\Quote\Model\Quote\Address::TYPE_SHIPPING) { + $taxClassAmount = $this->_aggregateTaxes($taxClassAmount, $itemTaxDetail, $shippingRatio); + } + } + } + return $taxClassAmount; } } diff --git a/app/code/Magento/Tax/Model/Calculation.php b/app/code/Magento/Tax/Model/Calculation.php index 2e997213216a34ed87670bd4371275c83f2c4d9d..8be6f10337d3902e757593b56e01d47168333e7b 100644 --- a/app/code/Magento/Tax/Model/Calculation.php +++ b/app/code/Magento/Tax/Model/Calculation.php @@ -20,6 +20,8 @@ use Magento\Tax\Model\Config; /** * Tax Calculation Model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Calculation extends \Magento\Framework\Model\AbstractModel { @@ -187,6 +189,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, @@ -470,6 +473,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 8fbda6ad0698e7271ce7eac2eea21feb85a230e4..0181d2e3426149d5fdd206979d1e877e5dc166c2 100644 --- a/app/code/Magento/Tax/Model/Calculation/AbstractCalculator.php +++ b/app/code/Magento/Tax/Model/Calculation/AbstractCalculator.php @@ -14,6 +14,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 d349ef20f63141be338921cc46ee3c43a898f5fd..77d534bff26d27fa4dd6e7a662a709d6b283347e 100644 --- a/app/code/Magento/Tax/Model/Calculation/Rate.php +++ b/app/code/Magento/Tax/Model/Calculation/Rate.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Tax\Model\Calculation; use Magento\Directory\Model\Region; @@ -23,6 +25,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 { @@ -63,6 +66,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, @@ -105,6 +109,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 6d62f585e4a14f7bbb09ac2102f84fb0c1081ee8..142735233d5b8f484fd5a4397d30a9bebf03db07 100644 --- a/app/code/Magento/Tax/Model/Calculation/RateRepository.php +++ b/app/code/Magento/Tax/Model/Calculation/RateRepository.php @@ -18,6 +18,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 d92455159c257288c0f291ca041627173cca81e0..929beae5f49390aeb902a813e83f184a44152b71 100644 --- a/app/code/Magento/Tax/Model/Calculation/Rule.php +++ b/app/code/Magento/Tax/Model/Calculation/Rule.php @@ -59,6 +59,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 2c29986cc5108592f5ef405246bca9481b56a0cd..a8b304942a0226bb9eabeec86316f968de0d62f5 100644 --- a/app/code/Magento/Tax/Model/Calculation/Rule/Validator.php +++ b/app/code/Magento/Tax/Model/Calculation/Rule/Validator.php @@ -33,6 +33,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 6dce2c84bb3dbcda27143c869a643f9268f356cd..116529a13b55162195607487539b4400fd1f29ff 100644 --- a/app/code/Magento/Tax/Model/Config.php +++ b/app/code/Magento/Tax/Model/Config.php @@ -13,6 +13,9 @@ namespace Magento\Tax\Model; use Magento\Store\Model\Store; +/** + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + */ class Config { // tax notifications @@ -263,6 +266,7 @@ class Config * Get flag what we need use shipping price exclude tax * * @return bool $flag + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getNeedUseShippingExcludeTax() { @@ -270,7 +274,7 @@ class Config } /** - * Get defined tax calculation agorithm + * Get defined tax calculation algorithm * * @param null|string|bool|int|Store $store * @return string @@ -784,6 +788,7 @@ class Config * * @param null|string|bool|int|Store $store * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getInfoUrl($store = null) { @@ -800,6 +805,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 6780ad5bae60acd2e7d4284e5295bbf706aacfdc..eca55e6365cf7a66b628c3c64880e826ba1b73c9 100644 --- a/app/code/Magento/Tax/Model/Observer.php +++ b/app/code/Magento/Tax/Model/Observer.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Tax Event Observer */ @@ -117,6 +119,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) { @@ -254,6 +259,7 @@ class Observer * * @param \Magento\Cron\Model\Schedule $schedule * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aggregateSalesReportTaxData($schedule) { @@ -300,7 +306,7 @@ class Observer return $this; } - $algorithm = $this->_taxData->getCalculationAgorithm(); + $algorithm = $this->_taxData->getCalculationAlgorithm(); $options['calculationAlgorithm'] = $algorithm; // prepare correct template for options render if ($this->_taxData->displayBothPrices()) { diff --git a/app/code/Magento/Tax/Model/Resource/Calculation.php b/app/code/Magento/Tax/Model/Resource/Calculation.php index 5ce230adbe9503c2ea7f9bb005d193b9e0e09f0e..160bea26fe1f9c5e03fd3cd6f1d58a4672305f33 100644 --- a/app/code/Magento/Tax/Model/Resource/Calculation.php +++ b/app/code/Magento/Tax/Model/Resource/Calculation.php @@ -130,6 +130,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) { @@ -263,6 +265,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/Resource/Sales/Order/Tax/Item.php b/app/code/Magento/Tax/Model/Resource/Sales/Order/Tax/Item.php index 7d73c540f14856de118b2513f733a29e59119db5..b13eb4cdfa3733eb669bcb776d12236f439420ac 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 82c093195d0a745814e1f0567e7b27f23ad3f816..c9f57704b409168753ef192dbf2c5a8a2691d250 100644 --- a/app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php +++ b/app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Tax\Model\Sales\Total\Quote; use Magento\Customer\Api\Data\AddressDataBuilder as CustomerAddressBuilder; @@ -20,6 +23,7 @@ use Magento\Tax\Api\Data\TaxDetailsItemInterface; /** * Tax totals calculation model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class CommonTaxCollector extends AbstractTotal { @@ -709,6 +713,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 597a80bf753a406530ba4ea5a51bf6f83eb4ee32..cfccee02b695f17663b350c5a9b4745eb5bdec22 100644 --- a/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php +++ b/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php @@ -13,6 +13,7 @@ use Magento\Tax\Model\Calculation; /** * Tax totals calculation model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Tax extends CommonTaxCollector { @@ -230,6 +231,7 @@ class Tax extends CommonTaxCollector * @param Address $address * @param array $itemsByType * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function processExtraTaxables(Address $address, Array $itemsByType) { @@ -281,6 +283,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 65eb1e2c18df47e5d308bdf3a41e7ea410791f88..ae2017ce90c6f25ce280736b22092dd5879e7f3f 100644 --- a/app/code/Magento/Tax/Model/TaxCalculation.php +++ b/app/code/Magento/Tax/Model/TaxCalculation.php @@ -20,6 +20,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 9518d9854ac6d4b1070058084f1b4142ea17524f..10698b291590b26605c46b9a86eac9d1ee208648 100644 --- a/app/code/Magento/Tax/Model/TaxClass/Repository.php +++ b/app/code/Magento/Tax/Model/TaxClass/Repository.php @@ -21,6 +21,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 991169ee45d65269d4780f7129ec0fdf93fe31eb..675f018765539265225ba284ea8435d0fea48e82 100644 --- a/app/code/Magento/Tax/Model/TaxRuleRepository.php +++ b/app/code/Magento/Tax/Model/TaxRuleRepository.php @@ -22,6 +22,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/Tax/view/adminhtml/templates/items/price/row.phtml b/app/code/Magento/Tax/view/adminhtml/templates/items/price/row.phtml index d22474d46c02fe1fe4be1cd3642c4068921e7bd9..36f6d039cbfe81184ae8566ba2bf4ac37c149140 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8a78cff00278ed053d549ecc694dcf9e31659573..2dca743b9efff2c80effd5de196216edb9144b74 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c9eb78a964eb57945a8bdf74c1d8f9af60260f18..48094d068aae27941704d1c2ecba612e5abf274d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 85fd68f69c6d6bafd3ba08a45e92eaed4990d838..db5eec6e9cd9936fd4c258c71679a8590797c53d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9c54a2ea6d7ed56bb90275082eaf734dd6a9d5a7..e06f57de36074941e8cfd8f0e065514fe2643ee2 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 be15aa941c3087d0f9138f3c1ddcecd9dece1dee..9fbe691194ae0bcb9174ef81b04cca37531d2c8e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 778086ccc36958b84dbcfa77498f39a9be3178db..63652dad28b90a7b01d304d67f419af99ab68741 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c3605bad850826c31e708c9e987dd2d1268cc1f9..dca9643affa6aa92dcc677c93ca609711545643e 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <script> 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 b91236614d440a717857e8404ff0efad6a44ccea..182e54b825a79c1e1c95a5e90c6d579331ee2899 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/rate/title.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/rate/title.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 adb8a7ef74235309dc7dddf12a35a5e380c59e6f..611cc27fa33acef904fbf4d03b8d514b96b92ee6 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b43379e5a04c2d6b9b74edb360e261d6258ee85d..4d1dccf3ddf08b5d2858cd531b8ee2dfbd7e59a5 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 @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 16f2e123b6d459b1d787b4b8aad5fe7785305636..ffef43a1956cd96a0cc00c95017753e6d3ebcab3 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9d50608721f772000ca237875d97cc12a794aff7..6601a6fee7a8fa0326abc62791df4e274a438e7e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 23d3ddd40f1fd0d18872e1641b9c8ae2c728a1a4..73014836ba2091a798afb465f174f9ba433b84b2 100644 --- a/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml +++ b/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 74e44645c5d449cb1b2d7c5f9a9f741777828f71..242b49afcdd3906a1a7ee568f9dbd89c1d126963 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c04709c6b633928e37ed355a1a3211f5b74a464f..c58739df971053c9a51475e88dc87b19f94481de 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 e172d60ae67a7ada5ce9311c6e271ae234c32618..4ccaa70f926355694facf7421f060448bf95fb54 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 82dbc0a2380164cab45fcb747763d6faef2d54a9..c2bd553543d8c9dfe51c7c158531579917644eaa 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d288eda19564c2927b9ee5882e0f916cebf277eb..dbceb0cb467139e780ad4f5dd244593b17f57ea1 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d7f08999b6f1d05db8a0b823e10b71e58ff46107..591ebbacac082536c6511b679f28fa2cdff04d21 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 1818d6a5360fc9e1af21aea26ef60974415f4b12..cc16babf635a6548e24bf187ff61e7f312265c90 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 93fb746addef5c56ab1ed6f40f786c4e18dbdd48..ae3062eb89d0800e33f53ed84c29bda3a67a4d64 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5b003c46139933f50f231160876d1f4f8f67f86c..3204c0570021e00dcdca15e7c4a443d6d90b11df 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 14c3c7ba761733ee23f317a2204db8e9ab3f479f..ecb7dfc01f6cc04b35047749865c2c82d5e061a1 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 59805ea42370e76b0d4ac07c8ec206bb0661564e..59d60a1d7fc74b5d3acd175863dc6a0178b265f8 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 082352620bde0964f4bcb7f7802748da09db4ff9..3194c867b65cc9519312433f3bf9611a7c4a916a 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 df9efdbbf3e8b04231c13d97919447d7dad75383..bdb8466a910d69b4cec79ccfa5e085cfb3e10d28 100644 --- a/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <?php $_order = $this->getOrder(); diff --git a/app/code/Magento/TaxImportExport/Model/Rate/CsvImportHandler.php b/app/code/Magento/TaxImportExport/Model/Rate/CsvImportHandler.php index e75dc06d7ab5f751395d9c7c0f66f18546d0824d..44a392b7484a588a06a1fe1ec226b0390ded1ac5 100644 --- a/app/code/Magento/TaxImportExport/Model/Rate/CsvImportHandler.php +++ b/app/code/Magento/TaxImportExport/Model/Rate/CsvImportHandler.php @@ -142,6 +142,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/TaxImportExport/view/adminhtml/templates/importExport.phtml b/app/code/Magento/TaxImportExport/view/adminhtml/templates/importExport.phtml index d23d064e686cae3be53046b9ad6adcfdc5f26e67..fb5fc443fe42ff4a594b6e78df2c2b1bb2296be0 100644 --- a/app/code/Magento/TaxImportExport/view/adminhtml/templates/importExport.phtml +++ b/app/code/Magento/TaxImportExport/view/adminhtml/templates/importExport.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 77c1f6b1ccbbbbbac3e65c96f40838be8dab0265..088aa900b849c7f8ca6c8ea1d30b4febfb42475c 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 1abea1421349e8bd5d77d0dc6575f2d36b7ac2cb..df0de42938530989d5751bd6e427832874a77788 100644 --- a/app/code/Magento/Theme/view/base/templates/root.phtml +++ b/app/code/Magento/Theme/view/base/templates/root.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 27aa62051cdb47b1ffb2e7b75d6c7bfbe0418a0e..3d26ab369375985cc441a347c08ff66c23e5bd38 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 27aa62051cdb47b1ffb2e7b75d6c7bfbe0418a0e..3d26ab369375985cc441a347c08ff66c23e5bd38 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c418c25733a731118dc1e0013ffbda5622195f0c..c041525a0a130369d8623bdae712ec07e58b708b 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/block.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/block.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 26ddadbece5848de25c75c31efdff675adabc5d4..7a1ac1da4eab0bc75ccfcd37783c0588f6808f6e 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/breadcrumbs.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/breadcrumbs.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ae267efb8e4ae592d4b055fb9ce743b3f6fd933d..6e3b91aef494301113fff2dc3a8222bef0b28fca 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/collapsible.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/collapsible.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c83baf666a119f65ad89f4ed9a8180293004fb86..594c738e487010629a32eff2693d1c7e14fd61bd 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/container.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/container.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5b08729dcdf87fbb8571195390a4cfdeb019e5fb..f00f79fae167edad4b850e088d5205010283bb8a 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/footer.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/footer.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4b8dc034ebdb7368b2faa3c4e824f877d9450a90..7de615e9174a709063ac916daeaa695f3025d03a 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/header.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/header.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 801ec16dc71824306c01fb9eb24909a64fd81da2..6ae7216aa8fe8b4a4423aa008874bd19a0f991fe 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 0d7e5a793a6c8f5f287200f4093d4fa3cac7f5aa..35ccc6db8955e1b8d48330bce4d0f36df7699967 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/notices.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/notices.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 be498084cb71a43b1051d1a704a73cb873749f11..15855ee05b8d16dd65ce4ebf4c3bf4b029e7f7ae 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/pager.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/pager.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 40ac34e1668431ae58fb94eaded19e39d9830ee9..b1a21ccc8dbdda98550801922e847a20f101ce02 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/sections.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/sections.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 df30bd4609cc7c2179f7e7c6c47f3ebc1be41d05..aa88448729952539cb44a1826b718da2a8e75bbf 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/skiptarget.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/skiptarget.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 25a435de956d0cef2bdc651327660b8cf02a53d9..cca31459612a243de6537285d448ef55e48a1dff 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/title.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/title.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 0849bca62a2f4449d0c7cdd9ec9ae4cc7261e28e..c83095a5f44d7d22991ace76b5c818db52de8b71 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/topmenu.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/topmenu.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 99be8e37348cec69521e018a61f416324e582a94..43f7e9c30c0126f46204910ee749ef83ad81e815 100644 --- a/app/code/Magento/Theme/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/js/components.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3c74b6202fdedc78086e67637cc419225c3af146..589a6db07b76b7383e42d5a1b65ef22a8bcb8501 100644 --- a/app/code/Magento/Theme/view/frontend/templates/link.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/link.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + /** * @var $this \Magento\Framework\View\Element\Html\Link */ diff --git a/app/code/Magento/Translation/Model/Inline/Parser.php b/app/code/Magento/Translation/Model/Inline/Parser.php index ae2fb54556b1485f7c378fec07f310ff5bd62c69..7635037657204c828d5049ee9a63ea076fa7fa83 100644 --- a/app/code/Magento/Translation/Model/Inline/Parser.php +++ b/app/code/Magento/Translation/Model/Inline/Parser.php @@ -272,6 +272,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) { @@ -285,6 +286,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 3a397628f9159522bbe98705403fcde2e546799d..317dc602a3c7abc55998972f72d9b9f4b8450027 100644 --- a/app/code/Magento/Translation/Model/Js/DataProvider.php +++ b/app/code/Magento/Translation/Model/Js/DataProvider.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Translation\Model\Js; class DataProvider implements DataProviderInterface @@ -12,6 +14,7 @@ class DataProvider implements DataProviderInterface * Get translation data * * @return string[] + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getData() { 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 445fb55a0099e9807503f3a801ffd62c1396081c..63cf2df2387826a64180d1416789ae6ef4685330 100644 --- a/app/code/Magento/Translation/view/adminhtml/templates/translate_inline.phtml +++ b/app/code/Magento/Translation/view/adminhtml/templates/translate_inline.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e31968a43908b9e89908333772f661e965c20ab5..34712ef99b2831417426e4ad52110027664c161b 100644 --- a/app/code/Magento/Translation/view/frontend/templates/translate_inline.phtml +++ b/app/code/Magento/Translation/view/frontend/templates/translate_inline.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <link rel="stylesheet" type="text/css" href="<?php echo $this->getViewFileUrl('prototype/windows/themes/default.css') ?>"/> diff --git a/app/code/Magento/Ui/Component/AbstractView.php b/app/code/Magento/Ui/Component/AbstractView.php index 308f30bd03ab6e28c35b1bf6c66e56bfe378af6a..e67d0e1ff40ee6b3182c77bebb844c143fa8a84c 100644 --- a/app/code/Magento/Ui/Component/AbstractView.php +++ b/app/code/Magento/Ui/Component/AbstractView.php @@ -19,6 +19,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 0dc2c3b5f46e9c058d418fa48dd27c8563b5e9d9..fa7a9564032774cf76e01c3078f7a403d7251ed9 100644 --- a/app/code/Magento/Ui/Component/Filter/Type/Date.php +++ b/app/code/Magento/Ui/Component/Filter/Type/Date.php @@ -19,6 +19,7 @@ use Magento\Ui\DataProvider\Manager; /** * Class Date + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Date extends FilterAbstract { @@ -56,6 +57,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 30887037e5fcce8d6c523283e9ef01f88655fd25..4e4435b6773638f14a510253edf655d196508f6a 100644 --- a/app/code/Magento/Ui/Component/Form.php +++ b/app/code/Magento/Ui/Component/Form.php @@ -19,6 +19,7 @@ use Magento\Ui\DataProvider\Manager; /** * Class Form + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Form extends AbstractView { @@ -74,6 +75,7 @@ class Form extends AbstractView * @param ActionPool $actionPool * @param ButtonProviderFactory $buttonProviderFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( TemplateContext $context, @@ -210,6 +212,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 e07e2b5d6a3d8fd827b50afa766b707c2ba91fc8..e536143ab6b4a719b6e8582159d748eb1bc8d182 100644 --- a/app/code/Magento/Ui/Component/Form/Element/AbstractFormElement.php +++ b/app/code/Magento/Ui/Component/Form/Element/AbstractFormElement.php @@ -38,6 +38,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 f0ffa83010988c9866762214f7ba9d4a61e44773..f6cd906ed59ec2b3113b6513f3d33e4bd88d2755 100644 --- a/app/code/Magento/Ui/Component/Form/Element/ElementInterface.php +++ b/app/code/Magento/Ui/Component/Form/Element/ElementInterface.php @@ -24,6 +24,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 bc856928cacc366585fb7757479e4cd3aa78ead3..1737d460db14218d51e0edad5542b86c716a4723 100644 --- a/app/code/Magento/Ui/Component/Form/Element/Radio.php +++ b/app/code/Magento/Ui/Component/Form/Element/Radio.php @@ -12,6 +12,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 6432e055a515e60d1f6f07df246f898d058d2a8d..59a366d3e4b2aac3a270c2e41cefa9e2e4e1e1f1 100644 --- a/app/code/Magento/Ui/Component/Form/Element/Select.php +++ b/app/code/Magento/Ui/Component/Form/Element/Select.php @@ -15,6 +15,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 d1372885f12efe38610114f84311fcb3548904b6..03fd8f62d6e847ba154c2390de4cde80732dcca0 100644 --- a/app/code/Magento/Ui/Component/Form/Fieldset.php +++ b/app/code/Magento/Ui/Component/Form/Fieldset.php @@ -29,6 +29,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 5d71edf9bba6f30d212e0145499a811bdda42ae7..8fdd8616b7c8b2b22eb3b2b390e06d3d534ed9b8 100644 --- a/app/code/Magento/Ui/Component/Layout/AbstractStructure.php +++ b/app/code/Magento/Ui/Component/Layout/AbstractStructure.php @@ -20,6 +20,7 @@ use Magento\Ui\DataProvider\Metadata; /** * Class AbstractStructure + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AbstractStructure extends AbstractView { @@ -89,6 +90,7 @@ class AbstractStructure extends AbstractView /** * @inheritdoc + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function prepare() { @@ -204,6 +206,7 @@ class AbstractStructure extends AbstractView /** * @param array $dataSourceConfig * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function processDataSource(array $dataSourceConfig) { @@ -442,6 +445,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) { @@ -540,6 +544,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 cbef1135d420ccec16ad65d44f7bc1fdcbe0aea3..efd05db22a826931acf8edfae37ce4f25c6cb533 100644 --- a/app/code/Magento/Ui/Component/Listing.php +++ b/app/code/Magento/Ui/Component/Listing.php @@ -18,6 +18,7 @@ use Magento\Ui\DataProvider\Manager; /** * Class Listing + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Listing extends AbstractView { @@ -59,6 +60,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/Controller/Adminhtml/Form/Fieldset.php b/app/code/Magento/Ui/Controller/Adminhtml/Form/Fieldset.php index fc90f0840bdd762f78520955b9494a004133a5fa..9c556c7191cdf6d854d146abea66c7c9586e7126 100644 --- a/app/code/Magento/Ui/Controller/Adminhtml/Form/Fieldset.php +++ b/app/code/Magento/Ui/Controller/Adminhtml/Form/Fieldset.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9de11534752a69d14fa7d845bcde730d8f615a09..6402821d585af92a6283787813f6e74fbdfcc860 100644 --- a/app/code/Magento/Ui/DataProvider/Config/Converter.php +++ b/app/code/Magento/Ui/DataProvider/Config/Converter.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Ui\DataProvider\Config; use Magento\Framework\Config\ConverterInterface; @@ -48,6 +50,7 @@ class Converter implements ConverterInterface * * @param \DOMNode $source * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function toArray(\DOMNode $source) { @@ -100,6 +103,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 acc60ea7bf9e5a702fd11b24dcc31204f1838068..c2f2379ff77ba8ded751261fe6754a1c1241067c 100644 --- a/app/code/Magento/Ui/DataProvider/Manager.php +++ b/app/code/Magento/Ui/DataProvider/Manager.php @@ -96,6 +96,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 949fd14d7753fedce1ce20d6a3223725059d9f0e..3606699e59b90707cbec8dcdc2a92cd16126f1f1 100644 --- a/app/code/Magento/Ui/DataProvider/Metadata.php +++ b/app/code/Magento/Ui/DataProvider/Metadata.php @@ -247,6 +247,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/Ui/view/base/templates/control/button/default.phtml b/app/code/Magento/Ui/view/base/templates/control/button/default.phtml index c5cb6598445dade2ade795ccde7bb879fde8aef3..98e1435a334dddd8e78471dbc05eb97bbaa70473 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 34599608b9b4130991d784e6b77a79a70e4c8361..021ede69ad571d74c2d80cbfbf981be0b0965287 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 35792fb71fe68f2720fbf99e9ffcc2f378f4bb51..95a5eab05ec51076356c92a6caf1eb0b9bbd7e6f 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 cf31ce434773e930563352000ef53ca63ad5cbe9..f1a8897d5849792a960cb56d8e8106ec3041c9a3 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + /** * @var \Magento\Ui\Component\Layout\Group $this */ diff --git a/app/code/Magento/Ups/Helper/Config.php b/app/code/Magento/Ups/Helper/Config.php index 465678c76af2d94aa7d0080fb5e4812505d3ebe2..2fd5bf7aa04624729e1cb819ac170188418bab76 100644 --- a/app/code/Magento/Ups/Helper/Config.php +++ b/app/code/Magento/Ups/Helper/Config.php @@ -37,6 +37,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 6cbca74e7d3ed61203a2fc730ba59e8e5517e3e1..e88b68ea433cafc08dba11c7c4dbec7547c6aaf8 100644 --- a/app/code/Magento/Ups/Model/Carrier.php +++ b/app/code/Magento/Ups/Model/Carrier.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Ups\Model; use Magento\Quote\Model\Quote\Address\RateRequest; @@ -14,6 +17,8 @@ use Magento\Ups\Helper\Config; /** * UPS shipping implementation + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Carrier extends AbstractCarrierOnline implements CarrierInterface { @@ -201,6 +206,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) { @@ -492,6 +500,7 @@ class Carrier extends AbstractCarrierOnline implements CarrierInterface * * @param string $response * @return Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _parseCgiResponse($response) { @@ -561,6 +570,9 @@ class Carrier extends AbstractCarrierOnline implements CarrierInterface * Get xml rates * * @return Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _getXmlQuotes() { @@ -748,6 +760,7 @@ XMLRequest; * * @param mixed $xmlResponse * @return Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _parseXmlResponse($xmlResponse) { @@ -973,6 +986,8 @@ XMLAuth; * @param string $trackingValue * @param string $xmlResponse * @return null + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _parseXmlTrackingResponse($trackingValue, $xmlResponse) { @@ -1134,6 +1149,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) { @@ -1506,6 +1524,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 40fe4c853b4ecffab081c9f9b2852660b495ddbe..baf8df8773611cd7dddfcbe42b90c34e34c45dc9 100644 --- a/app/code/Magento/Ups/Model/Config/Source/OriginShipment.php +++ b/app/code/Magento/Ups/Model/Config/Source/OriginShipment.php @@ -19,6 +19,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 bb297694431a66e8c07aaf61bc8a497104738de3..7a6f75395a9c6a432860697eb47ba3d19e3416aa 100644 --- a/app/code/Magento/Ups/Model/Config/Source/Unitofmeasure.php +++ b/app/code/Magento/Ups/Model/Config/Source/Unitofmeasure.php @@ -19,6 +19,7 @@ class Unitofmeasure extends \Magento\Ups\Model\Config\Source\Generic /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function toOptionArray() { 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 873568fa9971da787e0b92ab381fadaccbeec461..07424f23d1dd1060d4aef81c19421d1d200c85cf 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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/Block/Catalog/Product/Grid.php b/app/code/Magento/UrlRewrite/Block/Catalog/Product/Grid.php index b3a01003252a2ccea5ac8943ebf15d706a105dd4..f300660f42f601a82e76d082777c03ead01a83e1 100644 --- a/app/code/Magento/UrlRewrite/Block/Catalog/Product/Grid.php +++ b/app/code/Magento/UrlRewrite/Block/Catalog/Product/Grid.php @@ -9,6 +9,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 e755954ced4b4cd0368dd7cbf07ac8416c4ad23a..04b9b9cb51085a9703b332f9bebb907f9bddd44e 100644 --- a/app/code/Magento/UrlRewrite/Block/Cms/Page/Grid.php +++ b/app/code/Magento/UrlRewrite/Block/Cms/Page/Grid.php @@ -9,6 +9,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/UrlRewrite/view/adminhtml/templates/categories.phtml b/app/code/Magento/UrlRewrite/view/adminhtml/templates/categories.phtml index 526c4d75b3035728efd2c13b83233076775cb513..edb2043180e3080cb6fa12c1f63251a023196704 100644 --- a/app/code/Magento/UrlRewrite/view/adminhtml/templates/categories.phtml +++ b/app/code/Magento/UrlRewrite/view/adminhtml/templates/categories.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e640b690d9efce8edbf61fc94f2ee2df464a06a5..dfa66b948b3979d63db0cd0c1b192e065065da7e 100644 --- a/app/code/Magento/UrlRewrite/view/adminhtml/templates/edit.phtml +++ b/app/code/Magento/UrlRewrite/view/adminhtml/templates/edit.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 dd7e123bd02c0a0be88c77de770da726049ae0ef..fa3c88c6333a5c1a009d1bf4dc8ab7045178be1b 100644 --- a/app/code/Magento/UrlRewrite/view/adminhtml/templates/selector.phtml +++ b/app/code/Magento/UrlRewrite/view/adminhtml/templates/selector.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d84ca166cff17c1b757205cdfb478383c023e0c7..5eec5e84e013e6eca7cda23a2ae95bc87d9c612e 100644 --- a/app/code/Magento/User/Block/User/Edit/Tab/Main.php +++ b/app/code/Magento/User/Block/User/Edit/Tab/Main.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\User\Block\User\Edit\Tab; /** diff --git a/app/code/Magento/User/Controller/Adminhtml/User/Save.php b/app/code/Magento/User/Controller/Adminhtml/User/Save.php index e080bedeba812fad7781c4c7ba5587f76513166a..fcf6d4b54ea99a08df16479b516c89c713c59aa8 100644 --- a/app/code/Magento/User/Controller/Adminhtml/User/Save.php +++ b/app/code/Magento/User/Controller/Adminhtml/User/Save.php @@ -10,6 +10,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 1012a360aa651444e07c5d824605bdca73586442..a25b0836d6973fa1935a3cb18649be62e507104e 100644 --- a/app/code/Magento/User/Model/Resource/User.php +++ b/app/code/Magento/User/Model/Resource/User.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\User\Model\Resource; use Magento\Authorization\Model\Acl\Role\Group as RoleGroup; @@ -12,6 +15,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/User/view/adminhtml/templates/admin/forgotpassword.phtml b/app/code/Magento/User/view/adminhtml/templates/admin/forgotpassword.phtml index d173a29ffa272f1db9603366241568b38ecda5d3..5657758c199dcf23d740cc4ce27ca908822cd5f0 100644 --- a/app/code/Magento/User/view/adminhtml/templates/admin/forgotpassword.phtml +++ b/app/code/Magento/User/view/adminhtml/templates/admin/forgotpassword.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4fd332836f25ce3544cbd5f5d14b5ecd597a65fd..a7251b5b6538ab6f082af98a9838b590b6e84859 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 48405e15091fc975051fb898a9cded2792b0cce0..d2c97581ce3394e6c5d579b43d1701433aeab4eb 100644 --- a/app/code/Magento/User/view/adminhtml/templates/admin/resetforgottenpassword.phtml +++ b/app/code/Magento/User/view/adminhtml/templates/admin/resetforgottenpassword.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 7c8f082bad99d1aefe0517990249914863fb0dad..854c85003794a3c5c75414da0edea03df5b75a34 100644 --- a/app/code/Magento/User/view/adminhtml/templates/role/edit.phtml +++ b/app/code/Magento/User/view/adminhtml/templates/role/edit.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 57b73dff04c153cf201ff8b2f19e6301fcafe67c..60026b71834c242c8c4e5b4d1cbb0dc90f0b2143 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <script> 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 48adde0625c70425fc2586728c153ba7ab710c8d..3dc25bde09e9ada1563698d1dfae9386c9b2bdf7 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <script> require([ 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 24797911abd7287062c2a173e39a377a0ae3c35b..cc5bca51fa49bcf8247adb39aaba56c694bd877f 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 @@ -46,6 +46,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) { @@ -58,6 +59,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 b3de0074d630840eaefc5397509293d4a92df866..efccb26521a6358956bfc189fe02a4039dc5686a 100644 --- a/app/code/Magento/Usps/Model/Carrier.php +++ b/app/code/Magento/Usps/Model/Carrier.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Usps\Model; use Magento\Shipping\Helper\Carrier as CarrierHelper; @@ -11,6 +14,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 { @@ -195,6 +200,9 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * * @param \Magento\Quote\Model\Quote\Address\RateRequest $request * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function setRequest(\Magento\Quote\Model\Quote\Address\RateRequest $request) { @@ -362,6 +370,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() { @@ -484,6 +495,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) { @@ -584,6 +597,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 = '') { @@ -1019,6 +1033,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) { @@ -1122,6 +1138,7 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * * @param string $countryId * @return string|false + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _getCountryName($countryId) { @@ -1450,6 +1467,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) { @@ -1549,6 +1567,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) { @@ -1800,6 +1821,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/Usps/Model/Source/Method.php b/app/code/Magento/Usps/Model/Source/Method.php index f161f0a33b7d63d79f03fac76742ec8f340d6337..ad2edd94fc768efc35cdd7f7ba1d67fb32e86ea7 100644 --- a/app/code/Magento/Usps/Model/Source/Method.php +++ b/app/code/Magento/Usps/Model/Source/Method.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 35903869d87e8b3f7a14e9f4f3073678e10560be..4513220c07caee8f56dc1abf1f442413e5b3d3ae 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 @@ -7,6 +7,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 71d9249d62d461d637123395b7502bddfc3c555c..006bfc06806f773eb5a86815f19e666252cc013d 100644 --- a/app/code/Magento/Webapi/view/adminhtml/templates/resourcetree.phtml +++ b/app/code/Magento/Webapi/view/adminhtml/templates/resourcetree.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5dc9086d1645d6cc16b365c6d9cb6cf1b14cb186..43995cb9ff49d59433fe178840eb0bcd9b3da5ac 100644 --- a/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php +++ b/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Weee\Block\Renderer\Weee; use Magento\Framework\Data\Form\Element\AbstractElement; diff --git a/app/code/Magento/Weee/Helper/Data.php b/app/code/Magento/Weee/Helper/Data.php index d03520c87a2fda78d3537027afd31d0de5fd741d..aa6ac7d19875fd67ac0243e09a2815835a37ca7d 100644 --- a/app/code/Magento/Weee/Helper/Data.php +++ b/app/code/Magento/Weee/Helper/Data.php @@ -210,6 +210,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 c1cffc5c3cd45ed24df0888b364c5d35919df5e1..284593f0d3cfd2d57be62fd4803def7210fa592f 100644 --- a/app/code/Magento/Weee/Model/Attribute/Backend/Weee/Tax.php +++ b/app/code/Magento/Weee/Model/Attribute/Backend/Weee/Tax.php @@ -92,6 +92,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 3269a875f78c1d4a4c1a910af82d778aeaafb627..daca840e903b7e2e8c0f11390a84c259a66ff837 100644 --- a/app/code/Magento/Weee/Model/Observer.php +++ b/app/code/Magento/Weee/Model/Observer.php @@ -5,6 +5,9 @@ */ namespace Magento\Weee\Model; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Observer extends \Magento\Framework\Model\AbstractModel { /** @@ -45,6 +48,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 68951499429c89d58abfdfbd01cb97b006a0236d..7eab12df0722dbead3edf7667a66d52aab10a2c8 100644 --- a/app/code/Magento/Weee/Model/Tax.php +++ b/app/code/Magento/Weee/Model/Tax.php @@ -11,6 +11,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 { /** @@ -96,6 +99,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, @@ -197,6 +201,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 0c82ec0a5ee1487b4f625d0a74abf70fa339cea3..4107c5d55a44174261641944f63fb4e983910f82 100644 --- a/app/code/Magento/Weee/Model/Total/Creditmemo/Weee.php +++ b/app/code/Magento/Weee/Model/Total/Creditmemo/Weee.php @@ -38,6 +38,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 a13308b72f533f68bcaf7de14864346559f466c2..b89362baf000fa84ca1d9aa4d89441e4a5f3925d 100644 --- a/app/code/Magento/Weee/Model/Total/Invoice/Weee.php +++ b/app/code/Magento/Weee/Model/Total/Invoice/Weee.php @@ -36,6 +36,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 174d2d96f8cab9e583694c12fc4b03f131dd9734..3ba498c70c4f700f5d6830f1b65b702ff74c45ef 100644 --- a/app/code/Magento/Weee/Model/Total/Quote/Weee.php +++ b/app/code/Magento/Weee/Model/Total/Quote/Weee.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Weee\Model\Total\Quote; use Magento\Framework\Pricing\PriceCurrencyInterface; @@ -126,6 +129,8 @@ class Weee extends AbstractTotal * @param \Magento\Quote\Model\Quote\Address $address * @param \Magento\Quote\Model\Quote\Item\AbstractItem $item * @return void|$this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _process(\Magento\Quote\Model\Quote\Address $address, $item) { @@ -311,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) { diff --git a/app/code/Magento/Weee/Model/Total/Quote/WeeeTax.php b/app/code/Magento/Weee/Model/Total/Quote/WeeeTax.php index 1c801fb2323f4c35a65b224177004308da2d14de..9008fda31b5233cc0eeda0f700c79d8f663b1ebe 100644 --- a/app/code/Magento/Weee/Model/Total/Quote/WeeeTax.php +++ b/app/code/Magento/Weee/Model/Total/Quote/WeeeTax.php @@ -16,6 +16,8 @@ class WeeeTax extends Weee * * @param \Magento\Quote\Model\Quote\Address $address * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function collect(\Magento\Quote\Model\Quote\Address $address) { 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 56e96894609f8121c8988e66eefba4a99faa664a..460393161bd6ce536cc4affcd971e4b740e82fad 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 fc5037c7b1a72353788fce76952fd3ed74a30c7a..a54d234656ceb55fbdaf607ecd60b03b20327a1b 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 cb9928b5f2c264f861fdb2b7274232da316b210a..533d874ba3dd6634772ab04ffe2f53d752e79a50 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2bc26762b8fabfc830c3bd0bf90ed7fbc21d8f46..ca8bfceef26b6ea9a47b95769c49dfe19078a00d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 57827f4d5489bd330d30da3c67548963630a69db..35127cbf95f04b2f713fc4bc91284301d3642a5d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 08a1a7f7887fb31e54509a7de53e1d74d0c41362..ebff20c3f4e2c36ed2689dc871efb40e7479557e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b1ca5c16c489bb64f33cb75fb4c7f8a00f34cf1b..44243d19a4dc46fc8896ce03223383fc004e5971 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ca3e295f83e75f676a8aa9e46a878585acfe6707..79ecab8181839c6d8d8d988668ba364d683ef6e9 100644 --- a/app/code/Magento/Weee/view/base/templates/pricing/adjustment.phtml +++ b/app/code/Magento/Weee/view/base/templates/pricing/adjustment.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e94b43959156d76a518de93836011c1e80a38fbe..58be1c22e053e3129230ee9c47b6ae2479f940cf 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 ac842cdfe6ecdc6d71dee8e5c7a48972f1d101dc..1fae6dfcbf3efe2df2599f33e8c1b9e0df9916b8 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 ff00cb4e9bf152957e69f1686c0ec94296e3557d..5782357df3b224145e62b3b5321a3d5af34671bc 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 419a17a992baab9980cb42ab5fc586b8dfa38ff8..5ed7782e839206497d516eb575bf2f0474550f33 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 8cfd55c4277e1812872f715cdfd4f5c2c967fbff..a3bdf78bc3c405ccb1c726d63039e17369d85861 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 50353124f100fb2efe29ba99f02f557ed062de36..8a46deb9f8fc80d577e1cf6d5f594a6e9517def9 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b17ca8be9fa1820d43f9e519e616e5204f7bf3ae..c5df85d313ce185b20fa788ac0d9b2b967d3f4f0 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 a7e1bc5529cb6c50278641216609946ec42a46af..c094b12eb04fd7948eab50bd8909e47033f63e61 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 06f21282765f40294c16627b895d03da9bf1476f..1d5a0f621ee7883ab3733b2dc820f44db29d840b 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 4a91071fc1802ad10c1bbc1fed63d388e81979eb..cc8d4932b55c4e48d37baba7e66c664701531292 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * WYSIWYG widget plugin main block * diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php index 2d55a8fa810d0455254cadc384bbe55947fadd82..8d49f625148908f0de4c9142d196400e37a98b62 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php @@ -119,6 +119,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 f3c95ff9b4b2311f553eef425caaffd05d38206f..409741cec2280a23401a8a7a6e69341c305788f7 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 @@ -109,6 +109,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 2db9f1f3a65fda8d9417b6275ce727bb846ed1b0..b80f97e56e2ba80af5e9d7b63ce8da519439ff09 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Tab\Main; use Magento\Framework\Data\Form\Element\AbstractElement; @@ -185,6 +188,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 c2add4b2bd5a2545ac43562a25be057ac43c7a64..665a0dcda716301b26052fc149e075c91b2d4a08 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 @@ -11,6 +11,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 433bff93d24cbc68b62e7554e8b296178cdbac76..eec29885c95734eff2f38a0aff6166f8b4e2f585 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php @@ -134,6 +134,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 46832d20756b0b0eea6094b5c11b6f0568f012cd..f4e035bdea589a6d61f7a5fda4ca643c1e93930f 100644 --- a/app/code/Magento/Widget/Model/NamespaceResolver.php +++ b/app/code/Magento/Widget/Model/NamespaceResolver.php @@ -34,6 +34,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 081e508e9c00c52368974ba57035a5aa156de357..b22efabc1483bc662444fb0be9e344cd5f50d642 100644 --- a/app/code/Magento/Widget/Model/Template/Filter.php +++ b/app/code/Magento/Widget/Model/Template/Filter.php @@ -7,6 +7,7 @@ namespace Magento\Widget\Model\Template; /** * Template Filter Model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Filter extends \Magento\Cms\Model\Template\Filter { @@ -34,6 +35,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 f55a55451e6f7928607cf5e3619d3b8007c3e281..569c2fae5e22d3f027e20b1161c528b22afecbc3 100644 --- a/app/code/Magento/Widget/Model/Widget.php +++ b/app/code/Magento/Widget/Model/Widget.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Widget model for different purposes * @@ -117,6 +119,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 11a0f14073483705663edf28a63409e731ea1f3d..f0344e35cc13a04ec4977057cb3e1d2cb3b32a83 100644 --- a/app/code/Magento/Widget/Model/Widget/Instance.php +++ b/app/code/Magento/Widget/Model/Widget/Instance.php @@ -18,6 +18,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 { @@ -123,6 +124,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, @@ -187,6 +189,8 @@ class Instance extends \Magento\Framework\Model\AbstractModel * Processing object before save data * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function beforeSave() { @@ -408,6 +412,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() { @@ -532,6 +537,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/Widget/view/adminhtml/templates/instance/edit/layout.phtml b/app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml index 4f7e76aa3b19568e6bf296d9092da57b48be6a42..ccd04fb7a617b2f6f9b7361036b40d5f5ab077d0 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + ?> <fieldset class="fieldset"> <legend class="legend"><span><?php echo __('Layout Updates') ?></span></legend> diff --git a/app/code/Magento/Wishlist/Block/AbstractBlock.php b/app/code/Magento/Wishlist/Block/AbstractBlock.php index e608b7b93948c7c9a61e2e841fa5f167f8d182a0..a8a1b6a56abe0f25e76f8f9d86e853491ed2d215 100644 --- a/app/code/Magento/Wishlist/Block/AbstractBlock.php +++ b/app/code/Magento/Wishlist/Block/AbstractBlock.php @@ -81,6 +81,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 72d357a33ea961167d68f2216e94154d0f1df7f8..1898c981c239bb2616dcf44b9fe9f9a9929cf0cc 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Sidebar.php +++ b/app/code/Magento/Wishlist/Block/Customer/Sidebar.php @@ -57,6 +57,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 e8c9864d08f8945dd8086300fa2a015812f2e61c..91b2eede9db6437d9b17d9735a29a855f4953885 100644 --- a/app/code/Magento/Wishlist/Controller/Index/Add.php +++ b/app/code/Magento/Wishlist/Controller/Index/Add.php @@ -52,6 +52,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 167a08195ce19d0244ba1ee8aab8532b3fdcc3d4..9f599b5e1d44263d56bc8f5eb11192c5043ac416 100644 --- a/app/code/Magento/Wishlist/Controller/Index/Cart.php +++ b/app/code/Magento/Wishlist/Controller/Index/Cart.php @@ -10,6 +10,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 { /** @@ -92,6 +95,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 4e87d03ce965973ba83f3f1bc4118d53be906305..3c26bf8e64db6f7007b465927d10622f2e5a3816 100644 --- a/app/code/Magento/Wishlist/Controller/Index/DownloadCustomOption.php +++ b/app/code/Magento/Wishlist/Controller/Index/DownloadCustomOption.php @@ -33,6 +33,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 fa4dda67b9ca8b2895408f9d5d3df894f061331f..174a12bdd49ddf0ad32283097460d8dd835b1794 100644 --- a/app/code/Magento/Wishlist/Controller/Index/Fromcart.php +++ b/app/code/Magento/Wishlist/Controller/Index/Fromcart.php @@ -34,6 +34,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 39449a53fd3cb3385322115c58bc57fd41a68678..c989d815bda47004d0eb6a2ed73395160cb34152 100644 --- a/app/code/Magento/Wishlist/Controller/Index/Send.php +++ b/app/code/Magento/Wishlist/Controller/Index/Send.php @@ -11,6 +11,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 { /** @@ -83,6 +86,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 adce8168110f2563017e71582a073f4aa4e49772..3a35fced9d37cb8d4453de94876d0d566b951394 100644 --- a/app/code/Magento/Wishlist/Controller/Index/Update.php +++ b/app/code/Magento/Wishlist/Controller/Index/Update.php @@ -51,6 +51,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 368c086d2c94b6940410907d3bb2bb676e97bd3e..20daf96c7b1011fbca8cd96ed2836ac369b38919 100644 --- a/app/code/Magento/Wishlist/Controller/WishlistProvider.php +++ b/app/code/Magento/Wishlist/Controller/WishlistProvider.php @@ -55,6 +55,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 aa891ea8cd1df47c27d922c16ce38ba6f8e1a184..2eed816763a185c68f41171aaeb6743f63a81665 100644 --- a/app/code/Magento/Wishlist/Helper/Data.php +++ b/app/code/Magento/Wishlist/Helper/Data.php @@ -11,6 +11,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 2ab829a15d2a43bd2c79a3d966f0f70e5749477b..5cfee1dc5f20510cff14bd89bce9f4cffdbf69d6 100644 --- a/app/code/Magento/Wishlist/Helper/Rss.php +++ b/app/code/Magento/Wishlist/Helper/Rss.php @@ -6,6 +6,9 @@ namespace Magento\Wishlist\Helper; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Rss extends \Magento\Wishlist\Helper\Data { /** @@ -35,6 +38,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 f9b15970143e190090368477f643331a524e554e..314afecc70465724a6fccaa2c92a8c1b9b39e01a 100644 --- a/app/code/Magento/Wishlist/Model/Item.php +++ b/app/code/Magento/Wishlist/Model/Item.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Wishlist\Model; use Magento\Catalog\Api\ProductRepositoryInterface; @@ -27,6 +30,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 { @@ -132,6 +136,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 a94c5804d34b5b1a01694b20afe1144b4e3a95f4..093022fd52078c33ceaac3f822839f852f3c6745 100644 --- a/app/code/Magento/Wishlist/Model/ItemCarrier.php +++ b/app/code/Magento/Wishlist/Model/ItemCarrier.php @@ -15,6 +15,9 @@ use Magento\Framework\Message\ManagerInterface as MessageManager; use Magento\Framework\UrlInterface; use Magento\Wishlist\Helper\Data as WishlistHelper; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class ItemCarrier { /** @@ -101,6 +104,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 282121b75004cbcf908acfa0c6a12a06087d87d0..a484c5c8b9a208a4ef4d4f24a30e8a42ed6239f1 100644 --- a/app/code/Magento/Wishlist/Model/Observer.php +++ b/app/code/Magento/Wishlist/Model/Observer.php @@ -122,6 +122,7 @@ class Observer /** * @param \Magento\Framework\Event\Observer $observer * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function processAddToCart($observer) { @@ -177,6 +178,7 @@ class Observer * * @param \Magento\Framework\Event\Observer $observer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function customerLogin(\Magento\Framework\Event\Observer $observer) { @@ -190,6 +192,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 7494f287f8af20b58f8c8fcc632c51dbe782b150..847f86a83e75922ae2b9eba6837b7b18b2ad0828 100644 --- a/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php +++ b/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php @@ -7,6 +7,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 705b219bd04035a92d8bc6d1170c61b29ccf7368..d9bad91899272ffe8d6006c243f4b40f9af7d11b 100644 --- a/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php +++ b/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php @@ -11,6 +11,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 bf637020ddd685bdd0b92d32dc5876f86d08fcfc..45933e31a1a7f4d255f5fac6d298f35e011adaf0 100644 --- a/app/code/Magento/Wishlist/Model/Wishlist.php +++ b/app/code/Magento/Wishlist/Model/Wishlist.php @@ -23,6 +23,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 { @@ -135,6 +136,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, @@ -370,6 +372,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) { @@ -600,6 +604,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) { 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 56e1abe9ae014cb1feaf137bab0e795126e93a3a..8d30ddbd7b30b68aac5eaa7043191973a716cd8b 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 ee82d2d638693d771eaebbe1c71361d439458138..266d47e4593d085ab6cc7f5d424edaf8926a03ee 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 87981a7c2f9a6a28720dd830d563cf86b5eaff24..3991fbcf0f24e4b05728c2435473b812a542f696 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/button/share.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/button/share.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 872dbf1e6879fd06c11f5ab27890b3015bc6c17c..0d1c7bd7f527f7a4435fb243f315f411df8444be 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/button/tocart.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/button/tocart.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f4b058938bb8cce34d0944818600ed791f8fbcf9..c0c3807b5ccb0aa26c5f1c2197b52d54f13bbce6 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/button/update.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/button/update.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 26bb715eed991ed5371541dc5312ad3cd5aba01c..c48029a6bc5d1a02a7649730ab24e96907bbb38a 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/email/items.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/email/items.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 1346e78554c65c7be24c5a6f1d279c57b2390bca..9a4d27751f76b07982ee2a82173821789f369a86 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 d15fa004e43e94863549bd8dce7dc5a6b286f865..6559dc3ce7c1b6265167f29f20fe82089c4ca4bb 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 f87ff5c5d3a47b78af4879a519ee8739bc487ee4..d748c629d2e4f9f7791a0e1d37ab93c84cc4f8de 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 2e1f95ffd8728e794acc8628ccdfa63bb7ea62bc..b07a108332ec28ac29b4832ea2563d32b32b03a6 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 e108bb00cf1eb4d037d4456c67b021f19a4c4440..25d4675cb0a2c85ec5bb34a8236caf105637a6dd 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 a4469c5e1f3a7602f8f99b9ad0ab7020292820b0..51926c9beb60825ffcce588961ff030193ef4abe 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 fc84c28629e46d04aa9f83fb59eb2aca78dceb66..ffd35d1a31db1dfe6592756c331d233f2bbd8301 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 6c09eecb96ce7872e25234bdf8cbf80ab289c7b9..20a2458f7a04a7cbd931b78ea330535021331bd5 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 416a9e6b72523eb4ae060e8f3c18de60f802534e..7e5042ab2ea8ebc8b3e95a5401adbf84b0039407 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 0d36507547198198565f573e1d4d1d38a6e5debb..9601fd557d3817ccaab1c20c77d36ae28a3a70fa 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 99be8e37348cec69521e018a61f416324e582a94..43f7e9c30c0126f46204910ee749ef83ad81e815 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/js/components.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/js/components.phtml @@ -3,5 +3,8 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c2b312ffa50aa34efeffa4de96ce1e6ef51c1d5f..ed84ed72388be9e20512055a75a799e06c5fbebb 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/link.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/link.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 cfa90e4c054eb47ccf1e12d8033d2a8d0e11475d..9b66b4bbb566bd59408d712d8c5e0216f17a32fe 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/options_list.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/options_list.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b4be8a2ac87d79005c64090fe8bbc2fdca94c7db..5cd029e105e32e4e8d0f651bfcee3c6723fe54ff 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/rss/email.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/rss/email.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ab7ea7b436e8791818909d0e987598e6d4c2a55f..1f55d5f8ca037bcd53e9112e123ac8561d2ddd8c 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/rss/wishlist.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/rss/wishlist.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 48eb0afdfc41d78b8c46d22a9cd767d7b51cc810..f2c671832ec83ccb6c71db1085aa701e7f5b7162 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d9477b34c725b7c685a20b59cd6b4dd89f9f705b..2fe96e7784940ef7734b180f2a5257663d5719da 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/sharing.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/sharing.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 ec6137afee6c5b05ae37baab84633f6af71c4416..732ab1714e2c0099b457862caa34812fa3f268c1 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/sidebar.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/sidebar.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c152b3b67572d72667429252de2e32a8fab65824..b47de0c8c54f06f14f19956d5ad1f246dc81bfd0 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/view.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/view.phtml @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + /* @var $this \Magento\Wishlist\Block\Customer\Wishlist */ ?> diff --git a/composer.json b/composer.json index 675ca726dafc5f9ac4f57b9d8ac122d5b1e03644..64f4d82c9d865f6e72914ece47865acfa5d54131 100644 --- a/composer.json +++ b/composer.json @@ -143,7 +143,6 @@ "magento/language-pt_br": "self.version", "magento/language-zh_cn": "self.version", "magento/framework": "self.version", - "magento/project-setup": "0.1.0", "oyejorge/less.php": "1.7.0", "trentrichardson/jquery-timepicker-addon": "1.4.3", "components/handlebars.js": "1.3.0", diff --git a/composer.lock b/composer.lock index d9dde5fab26f383959bee5f375672ca6dc80df7d..7b97eaf296a318fe02d104c15f032bca9537ba42 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "26d01745182292ebe1704daed40c6d4a", + "hash": "b2434120b753fdef32c2584eade97c9d", "packages": [ { "name": "composer/composer", @@ -1821,16 +1821,16 @@ }, { "name": "fabpot/php-cs-fixer", - "version": "v1.3", + "version": "v1.4", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "653cefbf33241185b58f7323157f1829552e370d" + "reference": "72a8c34210c0fbd8caa007fccea87a59f6f0a4d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/653cefbf33241185b58f7323157f1829552e370d", - "reference": "653cefbf33241185b58f7323157f1829552e370d", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/72a8c34210c0fbd8caa007fccea87a59f6f0a4d3", + "reference": "72a8c34210c0fbd8caa007fccea87a59f6f0a4d3", "shasum": "" }, "require": { @@ -1843,15 +1843,13 @@ "symfony/process": "~2.3", "symfony/stopwatch": "~2.5" }, + "require-dev": { + "satooshi/php-coveralls": "0.7.*@dev" + }, "bin": [ "php-cs-fixer" ], "type": "application", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\CS\\": "Symfony/CS/" @@ -1872,20 +1870,20 @@ } ], "description": "A script to automatically fix Symfony Coding Standard", - "time": "2014-12-12 06:09:01" + "time": "2015-01-12 21:28:53" }, { "name": "league/climate", - "version": "2.6.0", + "version": "2.6.1", "source": { "type": "git", "url": "https://github.com/thephpleague/climate.git", - "reference": "776b6c3b32837832a9f6d94f134b55cb7910ece6" + "reference": "28851c909017424f61cc6a62089316313c645d1c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/climate/zipball/776b6c3b32837832a9f6d94f134b55cb7910ece6", - "reference": "776b6c3b32837832a9f6d94f134b55cb7910ece6", + "url": "https://api.github.com/repos/thephpleague/climate/zipball/28851c909017424f61cc6a62089316313c645d1c", + "reference": "28851c909017424f61cc6a62089316313c645d1c", "shasum": "" }, "require": { @@ -1921,7 +1919,7 @@ "php", "terminal" ], - "time": "2015-01-08 02:28:23" + "time": "2015-01-18 14:31:58" }, { "name": "lusitanian/oauth", @@ -2261,16 +2259,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "f8d5d08c56de5cfd592b3340424a81733259a876" + "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/f8d5d08c56de5cfd592b3340424a81733259a876", - "reference": "f8d5d08c56de5cfd592b3340424a81733259a876", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/db32c18eba00b121c145575fcbcd4d4d24e6db74", + "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74", "shasum": "" }, "require": { @@ -2283,7 +2281,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -2306,7 +2304,7 @@ "keywords": [ "tokenizer" ], - "time": "2014-08-31 06:12:13" + "time": "2015-01-17 09:51:32" }, { "name": "phpunit/phpunit", 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 b67c6545cb9f3ff9d58018268d77c9788ccc207e..f3b219f7e65a5b0fc61be6a73054ec6f9088c18f 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 25bbcf16458a0c57e40b003f89a3e76441958e88..d96ca365fbd34fa3d1efa4fb02efa4267243ccfa 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\TestModule4\Service\V1\Entity; class ExtensibleRequest extends \Magento\Framework\Model\AbstractExtensibleModel implements ExtensibleRequestInterface 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 86cdddf8d5949849f9f13b0686f8d1c2dd6842aa..f6b61082458b361c76db197749a866d3cdc3d48e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4e9e2afcf9cacb09330436b6f739ffbdd855f3f7..24937c7ecae46870cb3af65c34e1cad80daf9310 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c3854c46419ef5c04b10598d4560e15f58a06efe..c35147c0e7745c3829215f1c93ba772894a9f0f5 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 849f7838a3e0de87eed0edcdf5afc3e65c4b01f0..749c0de354ea2b9530f392c478be5eea5ccf5e61 100644 --- a/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiDataFixture.php +++ b/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiDataFixture.php @@ -9,6 +9,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\TestFramework\Annotation; class ApiDataFixture 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 6a71b708ac95f5941def2e26e81ad96946476036..ae4604fd1c322d09f41da047fc23ae9fcff6934f 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 26ae75ed20431bd2bf9f4bf56c5a7192040bb058..7488f42ae06740f31bbb0723920220e1edd51239 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 e0f80d3ef43a7d8a4e6dd8958093340e67c89927..50cd00f7497f0d5a6bf4f801b01d00828f875772 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/CategoryManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/CategoryManagementTest.php index 1281c5d2ef18aa8d3213586dbf5b4df340bdfecb..9bcc44ac3a7b993869bb2e4627218f917e96c577 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/CategoryManagementTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/CategoryManagementTest.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 bb5aaf7920ff3c7e3ac8e33e2ab0b89f200044b5..b6838804873bff5d690822da4948741a229b540f 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeManagementTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeManagementTest.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3f1ee1c99f4eded12cc7acd42c7547f6737aa9cb..e6a159a4675067d0b7c3551eced9ce7e9c2a3673 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductCustomOptionRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductCustomOptionRepositoryTest.php @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Api; use Magento\TestFramework\Helper\Bootstrap; @@ -95,6 +97,7 @@ class ProductCustomOptionRepositoryTest extends WebapiAbstract /** * @magentoApiDataFixture Magento/Catalog/_files/product_with_options.php * @magentoAppIsolation enabled + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function testGetList() { @@ -136,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) { @@ -281,6 +285,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/Catalog/Api/ProductMediaAttributeManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductMediaAttributeManagementTest.php index a470b771b754656220c8247748e771a304d03e46..d8eca5a6c52809f194b67f08dbe28faf89b29fc7 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductMediaAttributeManagementTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductMediaAttributeManagementTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 cc95447785187e169c75e74a88417ceeb9029ec7..1dbc5e0d5218d56d2713ffa6a491539bb4065bbb 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductTierPriceManagementTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductTierPriceManagementTest.php @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Api; use Magento\TestFramework\TestCase\WebapiAbstract; 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 564bdbcb41a748275d70732dccd34f08a5d4ac9b..bbcf1389aafad111e7d5af62cd0b6cd2a2459123 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/CatalogInventory/Api/StockItemTest.php b/dev/tests/api-functional/testsuite/Magento/CatalogInventory/Api/StockItemTest.php index 595a0a2bd410618b1e186a857bf4ab4682446941..747b12d4f189c58e21b053318e9aeb20a0a642df 100644 --- a/dev/tests/api-functional/testsuite/Magento/CatalogInventory/Api/StockItemTest.php +++ b/dev/tests/api-functional/testsuite/Magento/CatalogInventory/Api/StockItemTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogInventory\Api; use Magento\TestFramework\Helper\Bootstrap; 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 316e61db3d8dc7cecf061dbda246c35d2d2c1910..21562162dad41a76b77b06eaecfefbf5ea1ef69e 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 de4697fd4aa9eb66dcdbc1f1d9c1a282e6a21578..40cfd42c3a5b68a3609619c60187213680ccacb5 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/ConfigurableProduct/Api/OptionRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/ConfigurableProduct/Api/OptionRepositoryTest.php index 7bf583b74df506d70c5ebb84d4bcef77c81216b9..1c4993fd6ca1921a2d3c2fe7b065198a3c3dbd8f 100644 --- a/dev/tests/api-functional/testsuite/Magento/ConfigurableProduct/Api/OptionRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/ConfigurableProduct/Api/OptionRepositoryTest.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\ConfigurableProduct\Api; use Magento\Webapi\Model\Rest\Config; 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 4a85003340c26a9100690283ad601419efac2765..4f701f7b038ddf52a7e2022479733a1469676b97 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/AddressRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/Customer/Api/AddressRepositoryTest.php index 6d8fa26eb22ea148d2d0a5aae4f4b1777110b8d9..371c7229b112c60b8a5ac7d44c2c7bd6c4075812 100644 --- a/dev/tests/api-functional/testsuite/Magento/Customer/Api/AddressRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Customer/Api/AddressRepositoryTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Customer\Api; use Magento\TestFramework\Helper\Bootstrap; 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 b82ec82b34292709859b8824248b269928e76be7..d4f800547232b22db12b28dcc42f7b4bb3552bac 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/Downloadable/Service/V1/DownloadableLink/WriteServiceTest.php b/dev/tests/api-functional/testsuite/Magento/Downloadable/Service/V1/DownloadableLink/WriteServiceTest.php index be271d6775cccc858793b60c54e6e6602f1bf0f1..b398ffcaa81fd5a91e8419069d5efe1018b32aa2 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a322af9750842faf335e2a38cffbd9a8761a3633..f6a35621f59edf42b73235ed97f9ce78c38cd7f4 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Downloadable\Service\V1\DownloadableSample; use Magento\Catalog\Model\Product; 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 c6f10aab5508ca9c126db72a1f3b586279dc12af..219416fd6db0c23aef5782eff447bd2386d6623b 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/GiftMessage/Service/V1/WriteServiceTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Service/V1/WriteServiceTest.php index a5161f2e2b83077a4edc6ee8e715f84875ea22d1..501509ef33a63bbd7078812ff4c4bd14bfb0ab88 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\GiftMessage\Service\V1; use Magento\TestFramework\TestCase\WebapiAbstract; 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 03318d3bffac91c0dbed9360efed9e4ba89658ae..c565a0e9bb846e00c7a68225265a159dd6d9108f 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/CreditmemoCreateTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/CreditmemoCreateTest.php index 8c6087b2e8c76de1a30adb59d426576cd8ee8a20..3884e6e449c6695f7df146c5fdb7b1b764dab1f2 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Service\V1; use Magento\TestFramework\TestCase\WebapiAbstract; 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 f1455585d4f3460e5a35c8dbac5b1aff3d4133ee..5827ababd9fb042eeaad7e9751440938119f93f6 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 4886ef2da167e688d5ebca450210b623a32a222d..b5bda07bc0a0138b51137b42d05ef2048053a02f 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Service\V1; use Magento\Sales\Api\Data\OrderStatusHistoryInterface; @@ -33,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/Sales/Service/V1/ShipmentCreateTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipmentCreateTest.php index d15b8cacd4c789a5b179522142a27e9757c8ce39..38925a62319c9454358e545dc3b365e06fb2b2c5 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9cad14372f9520b35cd7079055b6e13844b530b1..4dfd23166bd53cb76bcafce8841baedd8d9b1810 100644 --- a/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxClassRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxClassRepositoryTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Tax\Api; use Magento\Framework\Api\FilterBuilder; 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 b576028352f1b691609bd3ffa54a0e3d85b2d46b..6061850059dacf24947d2323f56a88405e1749a5 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 2d7c98bde2267f274e03db022436f914ff298d46..23bb628f55448a1dd85da8582c7360498358e584 100644 --- a/dev/tests/api-functional/testsuite/Magento/Webapi/WsdlGenerationFromDataObjectTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Webapi/WsdlGenerationFromDataObjectTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Webapi; use Magento\TestFramework\Helper\Bootstrap; @@ -220,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) { @@ -585,6 +588,7 @@ GENERIC_FAULT_IN_MESSAGES; /** * @param string $wsdlContent + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _checkFaultsComplexTypeSection($wsdlContent) { diff --git a/dev/tests/functional/.gitignore b/dev/tests/functional/.gitignore index d3b32c5f1d405f9a8bb0a4b6ba742409c6f6050b..a415b0cffbf047e222eb3fa16734eeb8c1382409 100755 --- a/dev/tests/functional/.gitignore +++ b/dev/tests/functional/.gitignore @@ -8,4 +8,4 @@ !/config/isolation.yml.dist !/config/server.yml.dist phpunit.xml -/lib/Mtf/Util/Generate/testcase.xml +/lib/Magento/Mtf/Util/Generate/testcase.xml diff --git a/dev/tests/functional/composer.json b/dev/tests/functional/composer.json index 8d1cee6c7cd6d7b434978d21c193e86872d8b04f..0cd1467c6a9172fd9cfd7fd36d7d48557c9256a2 100644 --- a/dev/tests/functional/composer.json +++ b/dev/tests/functional/composer.json @@ -1,15 +1,17 @@ { "require": { - "magento/mtf": "1.0.0-rc12", + "magento/mtf": "1.0.0-rc14", "php": ">=5.4.0", "phpunit/phpunit": "4.1.0", "phpunit/phpunit-selenium": ">=1.2", "netwing/selenium-server-standalone": ">=2.35" }, + "suggest": { + "facebook/webdriver": "dev-master" + }, "autoload": { "psr-4": { - "Mtf\\": ["lib/Mtf/", "generated/Mtf/", "testsuites/Mtf/"], - "Magento\\": ["generated/Magento/", "tests/app/Magento/"], + "Magento\\": ["lib/Magento/", "testsuites/Magento", "generated/Magento/", "tests/app/Magento/"], "Test\\": "generated/Test/" } } diff --git a/dev/tests/functional/composer.json.dist b/dev/tests/functional/composer.json.dist index 2ea37c5b4a7aad5482f3df3812de7030e6684306..81d984634e945462ad6b3f79fe23d305d9b14bad 100644 --- a/dev/tests/functional/composer.json.dist +++ b/dev/tests/functional/composer.json.dist @@ -6,10 +6,12 @@ "phpunit/phpunit-selenium": ">=1.2", "netwing/selenium-server-standalone": ">=2.35" }, + "suggest": { + "facebook/webdriver": "dev-master" + }, "autoload": { "psr-4": { - "Mtf\\": ["lib/Mtf/", "generated/Mtf/", "testsuites/Mtf/"], - "Magento\\": ["generated/Magento/", "tests/app/Magento/"], + "Magento\\": ["lib/Magento/", "testsuites/Magento", "generated/Magento/", "tests/app/Magento/"], "Test\\": "generated/Test/" } } diff --git a/dev/tests/functional/etc/global/di.xml b/dev/tests/functional/etc/global/di.xml index e4cd6218292aead4caf9cdea7fac747ca44956d2..034b05ab359dbc1b48e241a95db5096de1e2678f 100644 --- a/dev/tests/functional/etc/global/di.xml +++ b/dev/tests/functional/etc/global/di.xml @@ -6,6 +6,6 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> - <preference for="Mtf\Util\Generate\Fixture\FieldsProviderInterface" type="Mtf\Util\Generate\Fixture\FieldsProvider" /> - <preference for="Mtf\Util\Generate\Repository\CollectionProviderInterface" type="Mtf\Util\Generate\Repository\CollectionProvider" /> + <preference for="Magento\Mtf\Util\Generate\Fixture\FieldsProviderInterface" type="Magento\Mtf\Util\Generate\Fixture\FieldsProvider" /> + <preference for="Magento\Mtf\Util\Generate\Repository\CollectionProviderInterface" type="Magento\Mtf\Util\Generate\Repository\CollectionProvider" /> </config> diff --git a/dev/tests/functional/lib/Mtf/App/State/AbstractState.php b/dev/tests/functional/lib/Magento/Mtf/App/State/AbstractState.php similarity index 93% rename from dev/tests/functional/lib/Mtf/App/State/AbstractState.php rename to dev/tests/functional/lib/Magento/Mtf/App/State/AbstractState.php index f1c47546ed044ca9c870b7e52c75afa7fb11550c..ef8d88494f1aebb463c210ce18e7c00959ab4dbc 100644 --- a/dev/tests/functional/lib/Mtf/App/State/AbstractState.php +++ b/dev/tests/functional/lib/Magento/Mtf/App/State/AbstractState.php @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ -namespace Mtf\App\State; +namespace Magento\Mtf\App\State; use Magento\Framework\App\DeploymentConfig\DbConfig; use Magento\Framework\App\Filesystem\DirectoryList; @@ -39,7 +39,8 @@ abstract class AbstractState implements StateInterface */ public function clearInstance() { - $dirList = \Mtf\ObjectManagerFactory::getObjectManager()->get('Magento\Framework\Filesystem\DirectoryList'); + $dirList = \Magento\Mtf\ObjectManagerFactory::getObjectManager() + ->get('Magento\Framework\Filesystem\DirectoryList'); $deploymentConfig = new \Magento\Framework\App\DeploymentConfig( new \Magento\Framework\App\DeploymentConfig\Reader($dirList), [] diff --git a/dev/tests/functional/lib/Mtf/App/State/State1.php b/dev/tests/functional/lib/Magento/Mtf/App/State/State1.php similarity index 93% rename from dev/tests/functional/lib/Mtf/App/State/State1.php rename to dev/tests/functional/lib/Magento/Mtf/App/State/State1.php index 59d8ecced3bc7a25cf283b279d9a128b7652e6c5..a5422ee0884ce75233a85e3a1d7132a09f56f659 100644 --- a/dev/tests/functional/lib/Mtf/App/State/State1.php +++ b/dev/tests/functional/lib/Magento/Mtf/App/State/State1.php @@ -4,10 +4,10 @@ * See COPYING.txt for license details. */ -namespace Mtf\App\State; +namespace Magento\Mtf\App\State; -use Mtf\ObjectManager; -use Mtf\Fixture\FixtureFactory; +use Magento\Mtf\ObjectManager; +use Magento\Mtf\Fixture\FixtureFactory; use Magento\Core\Test\Fixture\ConfigData; /** diff --git a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/ConditionsElement.php b/dev/tests/functional/lib/Magento/Mtf/Client/Element/ConditionsElement.php similarity index 86% rename from dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/ConditionsElement.php rename to dev/tests/functional/lib/Magento/Mtf/Client/Element/ConditionsElement.php index 6f755fd6d159c48c73a072a0a6f8dc40743a0b7a..ea8d59e184ec1bf120c411d0665803e4d132652a 100644 --- a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/ConditionsElement.php +++ b/dev/tests/functional/lib/Magento/Mtf/Client/Element/ConditionsElement.php @@ -4,12 +4,11 @@ * See COPYING.txt for license details. */ -namespace Mtf\Client\Driver\Selenium\Element; +namespace Magento\Mtf\Client\Element; -use Mtf\Client\Driver\Selenium\Element as AbstractElement; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\ObjectManager; +use Magento\Mtf\ObjectManager; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\ElementInterface; /** * Class ConditionsElement @@ -37,7 +36,7 @@ use Mtf\ObjectManager; * * @SuppressWarnings(PHPMD.TooManyFields) */ -class ConditionsElement extends AbstractElement +class ConditionsElement extends SimpleElement { /** * Main condition @@ -86,7 +85,7 @@ class ConditionsElement extends AbstractElement * * @var string */ - protected $created = './/preceding-sibling::li[1]'; + protected $created = './ul/li[span[contains(@class,"rule-param-new-child")]]/preceding-sibling::li[1]'; /** * Children condition @@ -100,7 +99,7 @@ class ConditionsElement extends AbstractElement * * @var string */ - protected $param = './span[@class="rule-param"]/span/*[substring(@id,(string-length(@id)-%d+1))="%s"]/../..'; + protected $param = './span[span[*[substring(@id,(string-length(@id)-%d+1))="%s"]]]'; /** * Key of last find param @@ -187,19 +186,19 @@ class ConditionsElement extends AbstractElement * Add condition combination * * @param string $condition - * @param Element $context - * @return Element + * @param ElementInterface $context + * @return ElementInterface */ - protected function addConditionsCombination($condition, Element $context) + protected function addConditionsCombination($condition, ElementInterface $context) { $condition = $this->parseCondition($condition); $newCondition = $context->find($this->newCondition, Locator::SELECTOR_XPATH); $newCondition->find($this->addNew, Locator::SELECTOR_XPATH)->click(); $typeNewCondition = $newCondition->find($this->typeNew, Locator::SELECTOR_XPATH, 'select'); $typeNewCondition->setValue($condition['type']); - $this->ruleParamWait(); - $createdCondition = $newCondition->find($this->created, Locator::SELECTOR_XPATH); + $createdCondition = $context->find($this->created, Locator::SELECTOR_XPATH); + $this->waitForCondition($createdCondition); if (!empty($condition['rules'])) { $this->fillCondition($condition['rules'], $createdCondition); } @@ -210,10 +209,10 @@ class ConditionsElement extends AbstractElement * Add conditions * * @param array $conditions - * @param Element $context + * @param ElementInterface $context * @return void */ - protected function addMultipleCondition(array $conditions, Element $context) + protected function addMultipleCondition(array $conditions, ElementInterface $context) { foreach ($conditions as $key => $condition) { $elementContext = is_numeric($key) ? $context : $this->addConditionsCombination($key, $context); @@ -229,10 +228,10 @@ class ConditionsElement extends AbstractElement * Add single Condition * * @param string $condition - * @param Element $context + * @param ElementInterface $context * @return void */ - protected function addSingleCondition($condition, Element $context) + protected function addSingleCondition($condition, ElementInterface $context) { $condition = $this->parseCondition($condition); @@ -246,9 +245,8 @@ class ConditionsElement extends AbstractElement } ); $newCondition->find($this->typeNew, Locator::SELECTOR_XPATH, 'select')->setValue($condition['type']); - $this->ruleParamWait(); - - $createdCondition = $newCondition->find($this->created, Locator::SELECTOR_XPATH); + $createdCondition = $context->find($this->created, Locator::SELECTOR_XPATH); + $this->waitForCondition($createdCondition); $this->fillCondition($condition['rules'], $createdCondition); } @@ -256,14 +254,15 @@ class ConditionsElement extends AbstractElement * Fill single condition * * @param array $rules - * @param Element $element + * @param ElementInterface $element * @return void * @throws \Exception */ - protected function fillCondition(array $rules, Element $element) + protected function fillCondition(array $rules, ElementInterface $element) { $this->resetKeyParam(); foreach ($rules as $rule) { + /** @var ElementInterface $param */ $param = $this->findNextParam($element); $param->find('a')->click(); @@ -287,13 +286,13 @@ class ConditionsElement extends AbstractElement return $element->isVisible() ? true : null; } ); - $value = $param->find('select', Locator::SELECTOR_CSS, 'select'); + $value = $param->find('select', Locator::SELECTOR_TAG_NAME, 'select'); if ($value->isVisible()) { $value->setValue($rule); $this->click(); continue; } - $value = $param->find('input'); + $value = $param->find('input', Locator::SELECTOR_TAG_NAME); if ($value->isVisible()) { $value->setValue($rule); @@ -356,11 +355,11 @@ class ConditionsElement extends AbstractElement /** * Find next param of condition for fill * - * @param Element $context - * @return Element + * @param ElementInterface $context + * @return ElementInterface * @throws \Exception */ - protected function findNextParam(Element $context) + protected function findNextParam(ElementInterface $context) { do { if (!isset($this->mapParams[$this->findKeyParam])) { @@ -389,14 +388,11 @@ class ConditionsElement extends AbstractElement * * @return void */ - protected function ruleParamWait() + protected function waitForCondition(ElementInterface $element) { - $browser = $this; - $ruleParamWait = $this->ruleParamWait; - $browser->waitUntil( - function () use ($browser, $ruleParamWait) { - $element = $browser->find($ruleParamWait, Locator::SELECTOR_XPATH); - return $element->isVisible() ? null : true; + $this->waitUntil( + function () use ($element) { + return $element->getAttribute('class') == 'rule-param-wait' ? null : true; } ); } diff --git a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/DatepickerElement.php b/dev/tests/functional/lib/Magento/Mtf/Client/Element/DatepickerElement.php similarity index 94% rename from dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/DatepickerElement.php rename to dev/tests/functional/lib/Magento/Mtf/Client/Element/DatepickerElement.php index 97c094b5b4cfba8f230402b33ec45c9495d348f1..06e569057153cfa433bf399daf28b93ecec41f9f 100644 --- a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/DatepickerElement.php +++ b/dev/tests/functional/lib/Magento/Mtf/Client/Element/DatepickerElement.php @@ -4,15 +4,14 @@ * See COPYING.txt for license details. */ -namespace Mtf\Client\Driver\Selenium\Element; +namespace Magento\Mtf\Client\Element; -use Mtf\Client\Driver\Selenium\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * General class for datepicker elements. */ -class DatepickerElement extends Element +class DatepickerElement extends SimpleElement { /** * DatePicker button. diff --git a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/GlobalsearchElement.php b/dev/tests/functional/lib/Magento/Mtf/Client/Element/GlobalsearchElement.php similarity index 82% rename from dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/GlobalsearchElement.php rename to dev/tests/functional/lib/Magento/Mtf/Client/Element/GlobalsearchElement.php index 5c934406a4d52d7d7272c0466eb35b05c15432fa..9d074a65d2c4a9b92458149c1854af30b7957bb4 100644 --- a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/GlobalsearchElement.php +++ b/dev/tests/functional/lib/Magento/Mtf/Client/Element/GlobalsearchElement.php @@ -4,16 +4,21 @@ * See COPYING.txt for license details. */ -namespace Mtf\Client\Driver\Selenium\Element; +namespace Magento\Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Client\Driver\Selenium\Element; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\ElementInterface; /** * Typified element class for global search element. */ -class GlobalsearchElement extends Element +class GlobalsearchElement extends SimpleElement { + /** + * "Backspace" key code. + */ + const BACKSPACE = "\xEE\x80\x83"; + /** * Search icon selector. * @@ -49,11 +54,6 @@ class GlobalsearchElement extends Element */ protected $resultItem = 'li'; - /** - * "Backspace" key code. - */ - const BACKSPACE = "\xEE\x80\x83"; - /** * Set value. * @@ -62,7 +62,7 @@ class GlobalsearchElement extends Element */ public function setValue($value) { - $this->_eventManager->dispatchEvent(['set_value'], [__METHOD__, $this->getAbsoluteSelector()]); + $this->eventManager->dispatchEvent(['set_value'], [__METHOD__, $this->getAbsoluteSelector()]); $this->waitInitElement(); @@ -71,7 +71,7 @@ class GlobalsearchElement extends Element } $this->selectWindow(); $this->clear(); - $this->find($this->searchInput)->_getWrappedElement()->value($value); + $this->find($this->searchInput)->setValue($value); $this->selectWindow(); $this->waitResult(); @@ -86,7 +86,7 @@ class GlobalsearchElement extends Element { $element = $this->find($this->searchInput); while ('' != $element->getValue()) { - $element->keys([self::BACKSPACE]); + $element->setValue([self::BACKSPACE]); } } @@ -97,8 +97,7 @@ class GlobalsearchElement extends Element */ protected function selectWindow() { - $windowHandles = $this->_driver->windowHandles(); - $this->_driver->window(end($windowHandles)); + $this->driver->closeWindow(); } /** @@ -109,10 +108,10 @@ class GlobalsearchElement extends Element */ protected function waitInitElement() { - $browser = clone $this; $selector = $this->initializedSuggest; - $browser->waitUntil( + $browser = $this->driver; + $this->driver->waitUntil( function () use ($browser, $selector) { return $browser->find($selector, Locator::SELECTOR_XPATH)->isVisible() ? true : null; } @@ -126,10 +125,10 @@ class GlobalsearchElement extends Element */ public function waitResult() { - $browser = clone $this; $selector = $this->searchResult; + $browser = $this->driver; - $browser->waitUntil( + $this->driver->waitUntil( function () use ($browser, $selector) { if ($browser->find($selector)->isVisible()) { return true; @@ -174,12 +173,12 @@ class GlobalsearchElement extends Element */ protected function getSearchResults() { - /** @var Element $searchResult */ + /** @var ElementInterface $searchResult */ $searchResult = $this->find($this->searchResult); - $resultItems = $searchResult->find($this->resultItem)->getElements(); + $resultItems = $searchResult->getElements($this->resultItem); $resultArray = []; - /** @var Element $resultItem */ + /** @var ElementInterface $resultItem */ foreach ($resultItems as $resultItem) { $resultItemLink = $resultItem->find('a'); $resultText = $resultItemLink->isVisible() diff --git a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/JquerytreeElement.php b/dev/tests/functional/lib/Magento/Mtf/Client/Element/JquerytreeElement.php similarity index 95% rename from dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/JquerytreeElement.php rename to dev/tests/functional/lib/Magento/Mtf/Client/Element/JquerytreeElement.php index f94db8b433ba4351f54d59a8bab33f92d7a982d6..e08b8a6adff03f71182cb7366445c3509970713e 100644 --- a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/JquerytreeElement.php +++ b/dev/tests/functional/lib/Magento/Mtf/Client/Element/JquerytreeElement.php @@ -4,15 +4,13 @@ * See COPYING.txt for license details. */ -namespace Mtf\Client\Driver\Selenium\Element; +namespace Magento\Mtf\Client\Element; -use Mtf\Client\Element; +use Magento\Mtf\Client\ElementInterface; /** * Class JquerytreeElement * Typified element class for JqueryTree elements - * - * @package Mtf\Client\Element */ class JquerytreeElement extends Tree { @@ -64,11 +62,11 @@ class JquerytreeElement extends Tree /** * Recursive walks tree * - * @param Element $node + * @param ElementInterface $node * @param string $parentCssClass * @return array */ - protected function _getNodeContent($node, $parentCssClass) + protected function _getNodeContent(ElementInterface $node, $parentCssClass) { $counter = 1; $nextNodeSelector = $parentCssClass . " > " . $this->nodeSelector . ":nth-of-type($counter)"; diff --git a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/LiselectstoreElement.php b/dev/tests/functional/lib/Magento/Mtf/Client/Element/LiselectstoreElement.php similarity index 80% rename from dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/LiselectstoreElement.php rename to dev/tests/functional/lib/Magento/Mtf/Client/Element/LiselectstoreElement.php index 1a513bc921fd12ad18afa1dc43284184629953c9..ee459e0ef5db890fa20c42666685e69d18a727ad 100644 --- a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/LiselectstoreElement.php +++ b/dev/tests/functional/lib/Magento/Mtf/Client/Element/LiselectstoreElement.php @@ -4,16 +4,15 @@ * See COPYING.txt for license details. */ -namespace Mtf\Client\Driver\Selenium\Element; +namespace Magento\Mtf\Client\Element; -use Mtf\Client\Driver\Selenium\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class LiselectstoreElement * Typified element class for lists selectors */ -class LiselectstoreElement extends Element +class LiselectstoreElement extends SimpleElement { /** * Template for each element of option @@ -65,8 +64,8 @@ class LiselectstoreElement extends Element */ public function setValue($value) { - $this->_eventManager->dispatchEvent(['set_value'], [__METHOD__, $this->getAbsoluteSelector()]); - $this->_context->find($this->toggleSelector)->click(); + $this->eventManager->dispatchEvent(['set_value'], [__METHOD__, $this->getAbsoluteSelector()]); + $this->driver->find($this->toggleSelector)->click(); $value = explode('/', $value); $optionSelector = []; @@ -75,7 +74,7 @@ class LiselectstoreElement extends Element } $optionSelector = './/' . implode($this->optionMaskFollowing, $optionSelector) . '/a'; - $option = $this->_context->find($optionSelector, Locator::SELECTOR_XPATH); + $option = $this->driver->find($optionSelector, Locator::SELECTOR_XPATH); if (!$option->isVisible()) { throw new \Exception('[' . implode('/', $value) . '] option is not visible in store switcher.'); } @@ -89,13 +88,11 @@ class LiselectstoreElement extends Element */ protected function getLiElements() { - $this->_context->find($this->toggleSelector)->click(); - $criteria = new \PHPUnit_Extensions_Selenium2TestCase_ElementCriteria('css selector'); - $criteria->value('li'); - $elements = $this->_getWrappedElement()->elements($criteria); + $this->driver->find($this->toggleSelector)->click(); + $elements = $this->driver->getElements($this, 'li', Locator::SELECTOR_TAG_NAME); $dropdownData = []; foreach ($elements as $element) { - $class = $element->attribute('class'); + $class = $element->getAttribute('class'); $dropdownData[] = [ 'element' => $element, 'storeView' => $this->isSubstring($class, "store-switcher-store-view"), @@ -121,7 +118,7 @@ class LiselectstoreElement extends Element if ($dropdownElement['storeView']) { $data[] = $this->findNearestElement('website', $key, $dropdownData) . "/" . $this->findNearestElement('store', $key, $dropdownData) . "/" - . $dropdownElement['element']->text(); + . $dropdownElement['element']->getText(); } } return $data; @@ -151,7 +148,7 @@ class LiselectstoreElement extends Element { $elementText = false; while ($elementText == false) { - $elementText = $elements[$key][$criteria] == true ? $elements[$key]['element']->text() : false; + $elementText = $elements[$key][$criteria] == true ? $elements[$key]['element']->getText() : false; $key--; } return $elementText; @@ -165,18 +162,20 @@ class LiselectstoreElement extends Element */ public function getValue() { - $this->_eventManager->dispatchEvent(['get_value'], [(string)$this->_locator]); + $this->eventManager->dispatchEvent(['get_value'], [$this->getAbsoluteSelector()]); $elements = $this->getLiElements(); foreach ($elements as $key => $element) { if ($element['current'] == true) { if ($element['default_config'] == true) { - return $element['element']->text(); + return $element['element']->getText(); } $path = $this->findNearestElement('website', $key, $elements) . "/" . $this->findNearestElement('store', $key, $elements) . "/" - . $element['element']->text(); + . $element['element']->getText(); return $path; } } + + return ''; } } diff --git a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/MultiselectgrouplistElement.php b/dev/tests/functional/lib/Magento/Mtf/Client/Element/MultiselectgrouplistElement.php similarity index 90% rename from dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/MultiselectgrouplistElement.php rename to dev/tests/functional/lib/Magento/Mtf/Client/Element/MultiselectgrouplistElement.php index f54b1570870bba2da3a1c692beb61d1b44acb17a..88f9924f7ebf905594b2ca20994c0eaab1996443 100644 --- a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/MultiselectgrouplistElement.php +++ b/dev/tests/functional/lib/Magento/Mtf/Client/Element/MultiselectgrouplistElement.php @@ -4,10 +4,10 @@ * See COPYING.txt for license details. */ -namespace Mtf\Client\Driver\Selenium\Element; +namespace Magento\Mtf\Client\Element; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\ElementInterface; /** * Class MultiselectgrouplistElement @@ -105,7 +105,7 @@ class MultiselectgrouplistElement extends MultiselectElement */ public function setValue($values) { - $this->clearSelectedOptions(); + $this->deselectAll(); $values = is_array($values) ? $values : [$values]; foreach ($values as $value) { $this->selectOption($value); @@ -152,16 +152,17 @@ class MultiselectgrouplistElement extends MultiselectElement * Get optgroup * * @param string $value - * @param Element $context - * @return Element + * @param ElementInterface $context + * @return ElementInterface * @throws \Exception */ - protected function getOptgroup($value, Element $context) + protected function getOptgroup($value, ElementInterface $context) { $optgroup = $context->find(sprintf($this->optgroupByLabel, $value), Locator::SELECTOR_XPATH); if (!$optgroup->isVisible()) { throw new \Exception("Can't find group \"{$value}\"."); } + return $optgroup; } @@ -169,11 +170,11 @@ class MultiselectgrouplistElement extends MultiselectElement * Get child optgroup * * @param string $value - * @param Element $context - * @return Element + * @param ElementInterface $context + * @return ElementInterface * @throws \Exception */ - protected function getChildOptgroup($value, Element $context) + protected function getChildOptgroup($value, ElementInterface $context) { $childOptgroup = null; $count = 1; @@ -210,7 +211,7 @@ class MultiselectgrouplistElement extends MultiselectElement foreach ($this->getSelectedOptions() as $option) { $value = []; - /** @var Element $option */ + /** @var ElementInterface $option */ $optionText = $option->getText(); $optionValue = trim($optionText, $this->trim); $value[] = $optionValue; @@ -220,8 +221,8 @@ class MultiselectgrouplistElement extends MultiselectElement } $pathOptgroup = sprintf($this->parentOptgroup, $this->indent . $optionValue); - $optgroup = $this->_getWrappedElement()->byXPath($pathOptgroup); - $optgroupText = $optgroup->attribute('label'); + $optgroup = $this->find($pathOptgroup, Locator::SELECTOR_XPATH); + $optgroupText = $optgroup->getAttribute('label'); $optgroupValue = trim($optgroupText, $this->trim); $amountIndent = strlen($optgroupText) - strlen($optgroupValue); $amountIndent = $amountIndent ? ($amountIndent / strlen($this->indent)) : 0; @@ -235,8 +236,8 @@ class MultiselectgrouplistElement extends MultiselectElement $indent = $amountIndent ? str_repeat($this->indent, $amountIndent) : ''; $pathOptgroup .= sprintf($this->precedingOptgroup, $amountIndent * self::INDENT_LENGTH, $indent); while (0 <= $amountIndent && $this->find($pathOptgroup, Locator::SELECTOR_XPATH)->isVisible()) { - $optgroup = $this->_getWrappedElement()->byXPath($pathOptgroup); - $optgroupText = $optgroup->attribute('label'); + $optgroup = $this->find($pathOptgroup, Locator::SELECTOR_XPATH); + $optgroupText = $optgroup->getAttribute('label'); $optgroupValue = trim($optgroupText, $this->trim); $value[] = $optgroupValue; @@ -254,7 +255,7 @@ class MultiselectgrouplistElement extends MultiselectElement /** * Get options * - * @return array + * @return ElementInterface[] */ protected function getOptions() { @@ -288,6 +289,7 @@ class MultiselectgrouplistElement extends MultiselectElement ++$countOptgroup; $optgroup = $this->find(sprintf($this->optgroupByNumber, $countOptgroup), Locator::SELECTOR_XPATH); } + return $options; } @@ -300,11 +302,11 @@ class MultiselectgrouplistElement extends MultiselectElement { $options = []; foreach ($this->getOptions() as $option) { - /** Element $option */ if ($option->isSelected()) { $options[] = $option; } } + return $options; } } diff --git a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/MultiselectlistElement.php b/dev/tests/functional/lib/Magento/Mtf/Client/Element/MultiselectlistElement.php similarity index 75% rename from dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/MultiselectlistElement.php rename to dev/tests/functional/lib/Magento/Mtf/Client/Element/MultiselectlistElement.php index df89e94d040387c4246671d87fb5e271081ded40..d5d4539e1b4e0c022f7d89d495118da02b31cf42 100644 --- a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/MultiselectlistElement.php +++ b/dev/tests/functional/lib/Magento/Mtf/Client/Element/MultiselectlistElement.php @@ -4,10 +4,9 @@ * See COPYING.txt for license details. */ -namespace Mtf\Client\Driver\Selenium\Element; +namespace Magento\Mtf\Client\Element; -use Mtf\Client\Driver\Selenium\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Typified element class for Multiple Select List elements @@ -28,21 +27,6 @@ class MultiselectlistElement extends MultiselectElement */ protected $optionCheckedElement = './/*[contains(@class, "mselect-checked")]/following-sibling::span'; - /** - * Return Wrapped Element. - * If element was not created before: - * 1. Context is defined. If context was not passed to constructor - test case (all page) is taken as context - * 2. Attempt to get selenium element is performed in loop - * that is terminated if element is found or after timeout set in configuration - * - * @param bool $waitForElementPresent - * @return \PHPUnit_Extensions_Selenium2TestCase_Element|\PHPUnit_Extensions_Selenium2TestCase_Element_Select - */ - protected function _getWrappedElement($waitForElementPresent = true) - { - return Element::_getWrappedElement($waitForElementPresent); - } - /** * Select options by values in multiple select list * @@ -55,7 +39,7 @@ class MultiselectlistElement extends MultiselectElement $values = is_array($values) ? $values : [$values]; foreach ($options as $option) { - /** @var Element $option */ + /** @var \Magento\Mtf\Client\ElementInterface $option */ $optionText = $option->getText(); $isChecked = $option->find($this->optionCheckedElement, Locator::SELECTOR_XPATH)->isVisible(); $inArray = in_array($optionText, $values); @@ -76,7 +60,7 @@ class MultiselectlistElement extends MultiselectElement $options = $this->getOptions(); foreach ($options as $option) { - /** @var Element $option */ + /** @var \Magento\Mtf\Client\ElementInterface $option */ $checkedOption = $option->find($this->optionCheckedElement, Locator::SELECTOR_XPATH); if ($checkedOption->isVisible()) { $checkedOptions[] = $checkedOption->getText(); @@ -117,7 +101,7 @@ class MultiselectlistElement extends MultiselectElement $options = $this->getOptions(); foreach ($options as $option) { - /** @var Element $option */ + /** @var \Magento\Mtf\Client\ElementInterface $option */ $optionsValue[] = $option->getText(); } diff --git a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/MultisuggestElement.php b/dev/tests/functional/lib/Magento/Mtf/Client/Element/MultisuggestElement.php similarity index 65% rename from dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/MultisuggestElement.php rename to dev/tests/functional/lib/Magento/Mtf/Client/Element/MultisuggestElement.php index d9a752f89798af8f76c9e24fb23e77c3f7ec9262..a2644d92930c429ef3aa16241e86a8f64fd0a7a8 100644 --- a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/MultisuggestElement.php +++ b/dev/tests/functional/lib/Magento/Mtf/Client/Element/MultisuggestElement.php @@ -4,10 +4,9 @@ * See COPYING.txt for license details. */ -namespace Mtf\Client\Driver\Selenium\Element; +namespace Magento\Mtf\Client\Element; -use Mtf\Client\Driver\Selenium\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Typified element class for multi suggest element. @@ -15,74 +14,73 @@ use Mtf\Client\Element\Locator; class MultisuggestElement extends SuggestElement { /** - * Selector list choice. + * Selector list choice * * @var string */ protected $listChoice = './/ul[contains(@class,"mage-suggest-choices")]'; /** - * Selector choice item. + * Selector choice item * * @var string */ protected $choice = './/li/div[text()="%s"]/..'; /** - * Selector choice value. + * Selector choice value * * @var string */ protected $choiceValue = './/li[contains(@class,"mage-suggest-choice")]/div'; /** - * Selector remove choice item. + * Selector remove choice item * * @var string */ protected $choiceClose = '.mage-suggest-choice-close'; /** - * Set value. + * Set value * * @param array|string $values * @return void */ public function setValue($values) { - $this->_eventManager->dispatchEvent(['set_value'], [__METHOD__, $this->getAbsoluteSelector()]); + $this->eventManager->dispatchEvent(['set_value'], [__METHOD__, $this->getAbsoluteSelector()]); $this->clear(); foreach ((array)$values as $value) { if (!$this->isChoice($value)) { - $this->selectWindow(); parent::setValue($value); } } } /** - * Get value. + * Get value * * @return array */ public function getValue() { - $this->_eventManager->dispatchEvent(['get_value'], [(string) $this->_locator]); + $this->eventManager->dispatchEvent(['get_value'], [(string) $this->getAbsoluteSelector()]); $listChoice = $this->find($this->listChoice, Locator::SELECTOR_XPATH); - $choices = $listChoice->find($this->choiceValue, Locator::SELECTOR_XPATH)->getElements(); + $choices = $listChoice->getElements($this->choiceValue, Locator::SELECTOR_XPATH); $values = []; foreach ($choices as $choice) { - /** @var Element $choice */ + /** @var \Magento\Mtf\Client\ElementInterface $choice */ $values[] = $choice->getText(); } return $values; } /** - * Check exist selected item. + * Check exist selected item * * @param string $value * @return bool @@ -93,7 +91,7 @@ class MultisuggestElement extends SuggestElement } /** - * Clear element. + * Clear element * * @return void */ @@ -105,15 +103,4 @@ class MultisuggestElement extends SuggestElement $choiceClose = $this->find($this->choiceClose); } } - - /** - * Select to last window. - * - * @return void - */ - protected function selectWindow() - { - $windowHandles = $this->_driver->windowHandles(); - $this->_driver->window(end($windowHandles)); - } } diff --git a/dev/tests/functional/lib/Magento/Mtf/Client/Element/OptgroupselectElement.php b/dev/tests/functional/lib/Magento/Mtf/Client/Element/OptgroupselectElement.php new file mode 100644 index 0000000000000000000000000000000000000000..a8398f49316853599b3fd68b8a011f0b0e26efe7 --- /dev/null +++ b/dev/tests/functional/lib/Magento/Mtf/Client/Element/OptgroupselectElement.php @@ -0,0 +1,51 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Mtf\Client\Element; + +use Magento\Mtf\Client\Locator; + +/** + * Class OptgroupselectElement + * Typified element class for option group selectors + */ +class OptgroupselectElement extends SelectElement +{ + /** + * Option group selector + * + * @var string + */ + protected $optGroup = 'optgroup[option[contains(.,"%s")]]'; + + /** + * Get the value of form element + * + * @return string + */ + public function getValue() + { + $this->eventManager->dispatchEvent(['get_value'], [(string)$this->getAbsoluteSelector()]); + $selectedLabel = trim(parent::getValue()); + $element = $this->find(sprintf($this->optGroup, $selectedLabel), Locator::SELECTOR_XPATH); + $value = trim($element->getAttribute('label'), chr(0xC2) . chr(0xA0)); + $value .= '/' . $selectedLabel; + return $value; + } + + /** + * Select value in dropdown which has option groups + * + * @param string $value + * @return void + */ + public function setValue($value) + { + $this->eventManager->dispatchEvent(['set_value'], [__METHOD__, $this->getAbsoluteSelector()]); + list($group, $option) = explode('/', $value); + parent::setOptionGroupValue($group, $option); + } +} diff --git a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/SelectstoreElement.php b/dev/tests/functional/lib/Magento/Mtf/Client/Element/SelectstoreElement.php similarity index 71% rename from dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/SelectstoreElement.php rename to dev/tests/functional/lib/Magento/Mtf/Client/Element/SelectstoreElement.php index 91555c65121da5e605dba95696f45503941bc6e0..32d1b11119a75fb1252240d97a4c0d98056f739f 100644 --- a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/SelectstoreElement.php +++ b/dev/tests/functional/lib/Magento/Mtf/Client/Element/SelectstoreElement.php @@ -4,10 +4,9 @@ * See COPYING.txt for license details. */ -namespace Mtf\Client\Driver\Selenium\Element; +namespace Magento\Mtf\Client\Element; -use Mtf\Client\Driver\Selenium\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Typified element class for option group selectors. @@ -35,14 +34,11 @@ class SelectstoreElement extends SelectElement */ public function getValue() { - $selectedLabel = trim($this->_getWrappedElement()->selectedLabel()); - $value = trim( - $this->_getWrappedElement()->byXPath(sprintf($this->website, $selectedLabel))->attribute('label') - ); - $value .= '/' . trim( - $this->_getWrappedElement()->byXPath(sprintf($this->storeGroup, $selectedLabel))->attribute('label'), - chr(0xC2) . chr(0xA0) - ); + $selectedLabel = trim(parent::getValue()); + $element = $this->find(sprintf($this->website, $selectedLabel), Locator::SELECTOR_XPATH); + $value = trim($element->getAttribute('label')); + $element = $this->find(sprintf($this->storeGroup, $selectedLabel), Locator::SELECTOR_XPATH); + $value .= '/' . trim($element->getAttribute('label'), chr(0xC2) . chr(0xA0)); $value .= '/' . $selectedLabel; return $value; } @@ -67,7 +63,7 @@ class SelectstoreElement extends SelectElement . $pieces[2] . '")]'; } - $option = $this->_context->find($optionLocator, Locator::SELECTOR_XPATH); + $option = $this->context->find($optionLocator, Locator::SELECTOR_XPATH); if (!$option->isVisible()) { throw new \Exception('[' . implode('/', $pieces) . '] option is not visible in store switcher.'); } diff --git a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/SuggestElement.php b/dev/tests/functional/lib/Magento/Mtf/Client/Element/SuggestElement.php old mode 100755 new mode 100644 similarity index 84% rename from dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/SuggestElement.php rename to dev/tests/functional/lib/Magento/Mtf/Client/Element/SuggestElement.php index 5eff1d3acb6affaefa72c864414d3dfe3949cf42..a44151e5a9829d8f32829b611e60188c0facbf2c --- a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/SuggestElement.php +++ b/dev/tests/functional/lib/Magento/Mtf/Client/Element/SuggestElement.php @@ -4,16 +4,15 @@ * See COPYING.txt for license details. */ -namespace Mtf\Client\Driver\Selenium\Element; +namespace Magento\Mtf\Client\Element; -use Mtf\Client\Driver\Selenium\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class SuggestElement * General class for suggest elements. */ -class SuggestElement extends Element +class SuggestElement extends SimpleElement { /** * "Backspace" key code. @@ -56,12 +55,13 @@ class SuggestElement extends Element */ public function setValue($value) { - $this->_eventManager->dispatchEvent(['set_value'], [__METHOD__, $this->getAbsoluteSelector()]); + $this->eventManager->dispatchEvent(['set_value'], [__METHOD__, $this->getAbsoluteSelector()]); $this->clear(); foreach (str_split($value) as $symbol) { - $this->find($this->suggest)->click(); - $this->_driver->keys($symbol); + $input = $this->find($this->suggest); + $input->click(); + $input->keys([$symbol]); $this->waitResult(); $searchedItem = $this->find(sprintf($this->resultItem, $value), Locator::SELECTOR_XPATH); if ($searchedItem->isVisible()) { @@ -91,7 +91,7 @@ class SuggestElement extends Element */ public function waitResult() { - $browser = clone $this; + $browser = $this; $selector = $this->suggestStateLoader; $browser->waitUntil( function () use ($browser, $selector) { @@ -108,7 +108,7 @@ class SuggestElement extends Element */ public function getValue() { - $this->_eventManager->dispatchEvent(['get_value'], [(string)$this->_locator]); + $this->eventManager->dispatchEvent(['get_value'], [__METHOD__, $this->getAbsoluteSelector()]); return $this->find($this->suggest)->getValue(); } @@ -128,6 +128,7 @@ class SuggestElement extends Element if (!$searchResult->isVisible()) { return false; } + return $searchResult->find(sprintf($this->resultItem, $value), Locator::SELECTOR_XPATH)->isVisible(); } } diff --git a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/Tree.php b/dev/tests/functional/lib/Magento/Mtf/Client/Element/Tree.php similarity index 80% rename from dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/Tree.php rename to dev/tests/functional/lib/Magento/Mtf/Client/Element/Tree.php index d017dd2efd165d76f3fced6f056471d3a0832bfc..00c3d41ffe2bca015596392b0b6a30616fc1da9a 100644 --- a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/Tree.php +++ b/dev/tests/functional/lib/Magento/Mtf/Client/Element/Tree.php @@ -4,18 +4,15 @@ * See COPYING.txt for license details. */ -namespace Mtf\Client\Driver\Selenium\Element; +namespace Magento\Mtf\Client\Element; -use Mtf\Client\Driver\Selenium\Element; -use Mtf\Client\Element as ElementInterface; +use Magento\Mtf\Client\ElementInterface; /** * Class Tree * General class for tree elements. Holds general implementation of methods, which overrides in child classes. - * - * @package Mtf\Client\Driver\Selenium\Element */ -abstract class Tree extends Element +abstract class Tree extends SimpleElement { /** * Css class for finding tree nodes @@ -44,27 +41,26 @@ abstract class Tree extends Element abstract public function getStructure(); /** - * Drag'n'drop method is not accessible in this class. - * Throws exception if used. + * Drag and drop element to(between) another element(s) * * @param ElementInterface $target - * @throws \BadMethodCallException + * @throws \Exception * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function dragAndDrop(ElementInterface $target) { - throw new \BadMethodCallException('Not applicable for this class of elements (TreeElement)'); + throw new \Exception('Not applicable for this class of elements (TreeElement)'); } /** * getValue method is not accessible in this class. * Throws exception if used. * - * @throws \BadMethodCallException + * @throws \Exception */ public function getValue() { - throw new \BadMethodCallException('Not applicable for this class of elements (TreeElement)'); + throw new \Exception('Not applicable for this class of elements (TreeElement)'); } /** @@ -72,12 +68,12 @@ abstract class Tree extends Element * Throws exception if used. * * @param array $keys - * @throws \BadMethodCallException + * @throws \Exception * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function keys(array $keys) { - throw new \BadMethodCallException('Not applicable for this class of elements (TreeElement)'); + throw new \Exception('Not applicable for this class of elements (TreeElement)'); } /** @@ -99,6 +95,7 @@ abstract class Tree extends Element ++$pathChunkCounter; } if ($structureChunk) { + /** @var ElementInterface $needleElement */ $needleElement = $structureChunk->find($this->nodeName); $needleElement->click(); } else { @@ -112,7 +109,7 @@ abstract class Tree extends Element * * @param string $pathChunk * @param array $structureChunk - * @return array|Element||false + * @return array|ElementInterface|false */ protected function deep($pathChunk, $structureChunk) { @@ -124,17 +121,18 @@ abstract class Tree extends Element } } } + return false; } /** * Recursive walks tree * - * @param Element $node + * @param ElementInterface $node * @param string $parentCssClass * @return array */ - protected function _getNodeContent($node, $parentCssClass) + protected function _getNodeContent(ElementInterface $node, $parentCssClass) { $nodeArray = []; $nodeList = []; @@ -148,7 +146,7 @@ abstract class Tree extends Element } //Write to array values of current node foreach ($nodeList as $currentNode) { - /** @var Element $currentNode */ + /** @var ElementInterface $currentNode */ $nodesNames = $currentNode->find($this->nodeName); $nodesContents = $currentNode->find($this->nodeCssClass); $text = ltrim($nodesNames->getText()); @@ -156,9 +154,10 @@ abstract class Tree extends Element 'name' => $text, 'element' => $currentNode, 'subnodes' => $nodesContents->isVisible() ? - $this->_getNodeContent($nodesContents, $this->nodeCssClass) : null, + $this->_getNodeContent($nodesContents, $this->nodeCssClass) : null, ]; } + return $nodeArray; } } diff --git a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/TreeElement.php b/dev/tests/functional/lib/Magento/Mtf/Client/Element/TreeElement.php similarity index 94% rename from dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/TreeElement.php rename to dev/tests/functional/lib/Magento/Mtf/Client/Element/TreeElement.php index d373a6de315daeff05eb5e093104a11ed375985a..09995686b04c96c3dd4378b3ec3bb93eb2d23780 100644 --- a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/TreeElement.php +++ b/dev/tests/functional/lib/Magento/Mtf/Client/Element/TreeElement.php @@ -4,12 +4,11 @@ * See COPYING.txt for license details. */ -namespace Mtf\Client\Driver\Selenium\Element; +namespace Magento\Mtf\Client\Element; /** * Class TreeElement * Typified element class for Tree elements - * */ class TreeElement extends Tree { diff --git a/dev/tests/functional/lib/Mtf/Constraint/AbstractAssertForm.php b/dev/tests/functional/lib/Magento/Mtf/Constraint/AbstractAssertForm.php old mode 100755 new mode 100644 similarity index 99% rename from dev/tests/functional/lib/Mtf/Constraint/AbstractAssertForm.php rename to dev/tests/functional/lib/Magento/Mtf/Constraint/AbstractAssertForm.php index e6b0d60d131644719acaab483e79171625cb2dc2..a26ff55f584f007b927d78636cc12d1f171c7bcb --- a/dev/tests/functional/lib/Mtf/Constraint/AbstractAssertForm.php +++ b/dev/tests/functional/lib/Magento/Mtf/Constraint/AbstractAssertForm.php @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ -namespace Mtf\Constraint; +namespace Magento\Mtf\Constraint; /** * Class AssertForm diff --git a/dev/tests/functional/lib/Mtf/EntryPoint/EntryPoint.php b/dev/tests/functional/lib/Magento/Mtf/EntryPoint/EntryPoint.php similarity index 91% rename from dev/tests/functional/lib/Mtf/EntryPoint/EntryPoint.php rename to dev/tests/functional/lib/Magento/Mtf/EntryPoint/EntryPoint.php index f991ae7b6b159533ac5206e1af9956f5dfb8c207..701897c456230df2b680c45b78491657e6531d27 100644 --- a/dev/tests/functional/lib/Mtf/EntryPoint/EntryPoint.php +++ b/dev/tests/functional/lib/Magento/Mtf/EntryPoint/EntryPoint.php @@ -4,9 +4,9 @@ * See COPYING.txt for license details. */ -namespace Mtf\EntryPoint; +namespace Magento\Mtf\EntryPoint; -use Mtf\ObjectManager; +use Magento\Mtf\ObjectManager; /** * Class EntryPoint @@ -60,7 +60,7 @@ class EntryPoint { try { if (!$this->_locator) { - $locatorFactory = new \Mtf\ObjectManagerFactory(); + $locatorFactory = new \Magento\Mtf\ObjectManagerFactory(); $this->_locator = $locatorFactory->create(); } return $this->_locator->create($applicationName, $arguments)->launch(); diff --git a/dev/tests/functional/lib/Mtf/ObjectManagerFactory.php b/dev/tests/functional/lib/Magento/Mtf/ObjectManagerFactory.php similarity index 56% rename from dev/tests/functional/lib/Mtf/ObjectManagerFactory.php rename to dev/tests/functional/lib/Magento/Mtf/ObjectManagerFactory.php index 62524b92770f5646218198946ea1d465afe929e5..9811a2e9f844b0f99839fca83713f7fd3c5043e8 100644 --- a/dev/tests/functional/lib/Mtf/ObjectManagerFactory.php +++ b/dev/tests/functional/lib/Magento/Mtf/ObjectManagerFactory.php @@ -4,13 +4,11 @@ * See COPYING.txt for license details. */ -namespace Mtf; +namespace Magento\Mtf; -use Magento\Framework\App\Filesystem\DirectoryList; -use Magento\Framework\ObjectManagerInterface as MagentoObjectManager; -use Magento\Framework\Stdlib\BooleanUtils; -use Mtf\ObjectManager\Factory; -use Mtf\System\Config as SystemConfig; +use Magento\Mtf\ObjectManagerInterface as MagentoObjectManager; +use Magento\Mtf\Stdlib\BooleanUtils; +use Magento\Mtf\ObjectManager\Factory; /** * Class ObjectManagerFactory @@ -25,14 +23,14 @@ class ObjectManagerFactory * * @var string */ - protected $locatorClassName = '\Mtf\ObjectManager'; + protected $locatorClassName = '\Magento\Mtf\ObjectManager'; /** * DI Config class name * * @var string */ - protected $configClassName = '\Mtf\ObjectManager\Config'; + protected $configClassName = '\Magento\Mtf\ObjectManager\Config'; /** * Create Object Manager @@ -46,18 +44,15 @@ class ObjectManagerFactory define('MTF_TESTS_PATH', MTF_BP . '/tests/app/'); } if (!defined('MTF_STATES_PATH')) { - define('MTF_STATES_PATH', MTF_BP . '/lib/Mtf/App/State/'); + define('MTF_STATES_PATH', MTF_BP . '/lib/Magento/Mtf/App/State/'); } $diConfig = new $this->configClassName(); - $systemConfig = new SystemConfig(); - $configuration = $systemConfig->getConfigParam(); - $diConfig->extend($configuration); $factory = new Factory($diConfig); $argInterpreter = $this->createArgumentInterpreter(new BooleanUtils()); - $argumentMapper = new \Magento\Framework\ObjectManager\Config\Mapper\Dom($argInterpreter); + $argumentMapper = new \Magento\Mtf\ObjectManager\Config\Mapper\Dom($argInterpreter); - $sharedInstances['Magento\Framework\ObjectManager\Config\Mapper\Dom'] = $argumentMapper; + $sharedInstances['Magento\Mtf\ObjectManager\Config\Mapper\Dom'] = $argumentMapper; $objectManager = new $this->locatorClassName($factory, $diConfig, $sharedInstances); $factory->setObjectManager($objectManager); @@ -79,38 +74,39 @@ class ObjectManagerFactory \Magento\Framework\App\Filesystem\DirectoryList $directoryList, array $arguments ) { + $data = isset($arguments[\Magento\Framework\App\Arguments\Loader::PARAM_CUSTOM_FILE]) + ? $arguments[\Magento\Framework\App\Arguments\Loader::PARAM_CUSTOM_FILE] + : null; return new \Magento\Framework\App\DeploymentConfig( new \Magento\Framework\App\DeploymentConfig\Reader($directoryList), - isset($arguments[\Magento\Framework\App\Arguments\Loader::PARAM_CUSTOM_FILE]) - ? $arguments[\Magento\Framework\App\Arguments\Loader::PARAM_CUSTOM_FILE] - : null + $data ); } /** * Return newly created instance on an argument interpreter, suitable for processing DI arguments * - * @param \Magento\Framework\Stdlib\BooleanUtils $booleanUtils - * @return \Magento\Framework\Data\Argument\InterpreterInterface + * @param \Magento\Mtf\Stdlib\BooleanUtils $booleanUtils + * @return \Magento\Mtf\Data\Argument\InterpreterInterface */ protected function createArgumentInterpreter( - \Magento\Framework\Stdlib\BooleanUtils $booleanUtils + \Magento\Mtf\Stdlib\BooleanUtils $booleanUtils ) { - $constInterpreter = new \Magento\Framework\Data\Argument\Interpreter\Constant(); - $result = new \Magento\Framework\Data\Argument\Interpreter\Composite( + $constInterpreter = new \Magento\Mtf\Data\Argument\Interpreter\Constant(); + $result = new \Magento\Mtf\Data\Argument\Interpreter\Composite( [ - 'boolean' => new \Magento\Framework\Data\Argument\Interpreter\Boolean($booleanUtils), - 'string' => new \Magento\Framework\Data\Argument\Interpreter\String($booleanUtils), - 'number' => new \Magento\Framework\Data\Argument\Interpreter\Number(), - 'null' => new \Magento\Framework\Data\Argument\Interpreter\NullType(), + 'boolean' => new \Magento\Mtf\Data\Argument\Interpreter\Boolean($booleanUtils), + 'string' => new \Magento\Mtf\Data\Argument\Interpreter\String($booleanUtils), + 'number' => new \Magento\Mtf\Data\Argument\Interpreter\Number(), + 'null' => new \Magento\Mtf\Data\Argument\Interpreter\NullType(), 'const' => $constInterpreter, - 'object' => new \Magento\Framework\Data\Argument\Interpreter\Object($booleanUtils), - 'init_parameter' => new \Magento\Framework\App\Arguments\ArgumentInterpreter($constInterpreter), + 'object' => new \Magento\Mtf\Data\Argument\Interpreter\Object($booleanUtils), + 'init_parameter' => new \Magento\Mtf\Data\Argument\Interpreter\Argument($constInterpreter), ], - \Magento\Framework\ObjectManager\Config\Reader\Dom::TYPE_ATTRIBUTE + \Magento\Mtf\ObjectManager\Config\Reader\Dom::TYPE_ATTRIBUTE ); // Add interpreters that reference the composite - $result->addInterpreter('array', new \Magento\Framework\Data\Argument\Interpreter\ArrayType($result)); + $result->addInterpreter('array', new \Magento\Mtf\Data\Argument\Interpreter\ArrayType($result)); return $result; } @@ -138,19 +134,19 @@ class ObjectManagerFactory public static function configure(MagentoObjectManager $objectManager) { $objectManager->configure( - $objectManager->get('Mtf\ObjectManager\ConfigLoader\Primary')->load() + $objectManager->get('Magento\Mtf\ObjectManager\ConfigLoader\Primary')->load() ); $objectManager->configure( - $objectManager->get('Mtf\ObjectManager\ConfigLoader\Module')->load() + $objectManager->get('Magento\Mtf\ObjectManager\ConfigLoader\Module')->load() ); $objectManager->configure( - $objectManager->get('Mtf\ObjectManager\ConfigLoader\Module')->load('etc/ui') + $objectManager->get('Magento\Mtf\ObjectManager\ConfigLoader\Module')->load('etc/ui') ); $objectManager->configure( - $objectManager->get('Mtf\ObjectManager\ConfigLoader\Module')->load('etc/curl') + $objectManager->get('Magento\Mtf\ObjectManager\ConfigLoader\Module')->load('etc/curl') ); } } diff --git a/dev/tests/functional/lib/Mtf/Page/BackendPage.php b/dev/tests/functional/lib/Magento/Mtf/Page/BackendPage.php similarity index 91% rename from dev/tests/functional/lib/Mtf/Page/BackendPage.php rename to dev/tests/functional/lib/Magento/Mtf/Page/BackendPage.php index 47999dd68527526e15df5a99b241f686a8de8d2b..e5b6c09f905383cb25fd2875245fc6100fd9f87d 100644 --- a/dev/tests/functional/lib/Mtf/Page/BackendPage.php +++ b/dev/tests/functional/lib/Magento/Mtf/Page/BackendPage.php @@ -3,9 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Mtf\Page; +namespace Magento\Mtf\Page; -use Mtf\Factory\Factory; +use Magento\Mtf\Factory\Factory; /** * Class BackendPage diff --git a/dev/tests/functional/lib/Mtf/Util/Generate/Factory.php b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory.php similarity index 97% rename from dev/tests/functional/lib/Mtf/Util/Generate/Factory.php rename to dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory.php index 5f87958798dadf6b3cc7ebdbb35972e38f869918..6083b509f9a72918d0be626a24997dcc22b8b663 100644 --- a/dev/tests/functional/lib/Mtf/Util/Generate/Factory.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory.php @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ -namespace Mtf\Util\Generate; +namespace Magento\Mtf\Util\Generate; use Magento\Framework\App; use Magento\Framework\ObjectManagerInterface; diff --git a/dev/tests/functional/lib/Mtf/Util/Generate/Factory/AbstractFactory.php b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/AbstractFactory.php similarity index 94% rename from dev/tests/functional/lib/Mtf/Util/Generate/Factory/AbstractFactory.php rename to dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/AbstractFactory.php index 5239975f965d3dc63d61b8595f90d867b02f54b4..df7b6c873c5397623e97c7067041c0ac0222b347 100644 --- a/dev/tests/functional/lib/Mtf/Util/Generate/Factory/AbstractFactory.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/AbstractFactory.php @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ -namespace Mtf\Util\Generate\Factory; +namespace Magento\Mtf\Util\Generate\Factory; /** * Class AbstractFactory @@ -37,7 +37,7 @@ abstract class AbstractFactory $this->endFactory($this->type); - \Mtf\Util\Generate\GenerateResult::addResult($this->type, $this->cnt); + \Magento\Mtf\Util\Generate\GenerateResult::addResult($this->type, $this->cnt); } abstract protected function generateContent(); @@ -50,15 +50,15 @@ abstract class AbstractFactory protected function startFactory($type) { $this->factoryContent = "<?php\n\n"; - $this->factoryContent .= "namespace Mtf\\{$type}; \n\n"; - $this->factoryContent .= "use Mtf\\Fixture\\FixtureInterface; \n\n"; + $this->factoryContent .= "namespace Magento\Mtf\\{$type}; \n\n"; + $this->factoryContent .= "use Magento\Mtf\\Fixture\\FixtureInterface; \n\n"; $this->factoryContent .= "class {$type}FactoryDeprecated\n"; $this->factoryContent .= "{\n"; $this->factoryContent .= " /** * Object Manager * - * @var \\Mtf\\ObjectManager + * @var \\Magento\Mtf\\ObjectManager */ protected \$objectManager; @@ -68,7 +68,7 @@ abstract class AbstractFactory */ public function __construct() { - \$this->objectManager = \\Mtf\\ObjectManager::getInstance(); + \$this->objectManager = \\Magento\Mtf\\ObjectManager::getInstance(); }\n"; } @@ -85,11 +85,11 @@ abstract class AbstractFactory return $this; } - $this->checkAndCreateFolder(MTF_BP . "/generated/Mtf/{$type}"); + $this->checkAndCreateFolder(MTF_BP . "/generated/Magento/Mtf/{$type}"); $this->factoryContent .= "}\n"; - $file = MTF_BP . "/generated/Mtf/{$type}/{$type}FactoryDeprecated.php"; + $file = MTF_BP . "/generated/Magento/Mtf/{$type}/{$type}FactoryDeprecated.php"; if (false === file_put_contents($file, $this->factoryContent)) { throw new \RuntimeException("Can't write content to {$file} file"); } diff --git a/dev/tests/functional/lib/Mtf/Util/Generate/Factory/Block.php b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/Block.php similarity index 97% rename from dev/tests/functional/lib/Mtf/Util/Generate/Factory/Block.php rename to dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/Block.php index 24bdbf29f8a28b3bf2618cc5d79cfe82f360aca8..b564d6aca69dc246797e28702771ad643b6c90ab 100644 --- a/dev/tests/functional/lib/Mtf/Util/Generate/Factory/Block.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/Block.php @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ -namespace Mtf\Util\Generate\Factory; +namespace Magento\Mtf\Util\Generate\Factory; /** * Class Block diff --git a/dev/tests/functional/lib/Mtf/Util/Generate/Factory/Fixture.php b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/Fixture.php similarity index 97% rename from dev/tests/functional/lib/Mtf/Util/Generate/Factory/Fixture.php rename to dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/Fixture.php index 1d9425f68e16d5f4c8ac31e4bc9ae170bbc438a7..174a17a271875b41f30c9527f2c459859977f016 100644 --- a/dev/tests/functional/lib/Mtf/Util/Generate/Factory/Fixture.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/Fixture.php @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ -namespace Mtf\Util\Generate\Factory; +namespace Magento\Mtf\Util\Generate\Factory; /** * Class Fixture diff --git a/dev/tests/functional/lib/Mtf/Util/Generate/Factory/Handler.php b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/Handler.php similarity index 98% rename from dev/tests/functional/lib/Mtf/Util/Generate/Factory/Handler.php rename to dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/Handler.php index c8c0b42a3e530c91a704992e4a46011ab65b65db..2dbced547a606e1fe6d77b2c64b35e44cc5bacd7 100644 --- a/dev/tests/functional/lib/Mtf/Util/Generate/Factory/Handler.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/Handler.php @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ -namespace Mtf\Util\Generate\Factory; +namespace Magento\Mtf\Util\Generate\Factory; /** * Class Handler diff --git a/dev/tests/functional/lib/Mtf/Util/Generate/Factory/Page.php b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/Page.php similarity index 97% rename from dev/tests/functional/lib/Mtf/Util/Generate/Factory/Page.php rename to dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/Page.php index b557cb15d2e8c8b28c4b1cef1880f2bb08a8b611..c1cb6f22762be2cd5da35ed33c425a71fe2e9aab 100644 --- a/dev/tests/functional/lib/Mtf/Util/Generate/Factory/Page.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/Page.php @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ -namespace Mtf\Util\Generate\Factory; +namespace Magento\Mtf\Util\Generate\Factory; /** * Class Page diff --git a/dev/tests/functional/lib/Mtf/Util/Generate/Factory/Repository.php b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/Repository.php similarity index 97% rename from dev/tests/functional/lib/Mtf/Util/Generate/Factory/Repository.php rename to dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/Repository.php index ea6f30c9c8a5ba8037898d4f658797ada85e2c2c..79facfdcb13f3c839f394f3ddd6dd1a244de7d04 100644 --- a/dev/tests/functional/lib/Mtf/Util/Generate/Factory/Repository.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/Repository.php @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ -namespace Mtf\Util\Generate\Factory; +namespace Magento\Mtf\Util\Generate\Factory; /** * Class Repository diff --git a/dev/tests/functional/lib/Mtf/Util/Generate/Fixture/FieldsProvider.php b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Fixture/FieldsProvider.php similarity index 98% rename from dev/tests/functional/lib/Mtf/Util/Generate/Fixture/FieldsProvider.php rename to dev/tests/functional/lib/Magento/Mtf/Util/Generate/Fixture/FieldsProvider.php index b0ae3b9eade06d0a31dd31c4e5925e917c8f3343..fa8923f4ba0158403f86ebe4b5672e623471b259 100644 --- a/dev/tests/functional/lib/Mtf/Util/Generate/Fixture/FieldsProvider.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Fixture/FieldsProvider.php @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ -namespace Mtf\Util\Generate\Fixture; +namespace Magento\Mtf\Util\Generate\Fixture; use Magento\Framework\App\Resource; use Magento\Framework\ObjectManagerInterface; diff --git a/dev/tests/functional/lib/Mtf/Util/Generate/Repository/CollectionProvider.php b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Repository/CollectionProvider.php similarity index 95% rename from dev/tests/functional/lib/Mtf/Util/Generate/Repository/CollectionProvider.php rename to dev/tests/functional/lib/Magento/Mtf/Util/Generate/Repository/CollectionProvider.php index 5088d06530b63b90faa8fc6937756a88ecb7d339..a02df91cb8a3d07f41f7f214f8a5541b65d9579c 100644 --- a/dev/tests/functional/lib/Mtf/Util/Generate/Repository/CollectionProvider.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Repository/CollectionProvider.php @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ -namespace Mtf\Util\Generate\Repository; +namespace Magento\Mtf\Util\Generate\Repository; use Magento\Framework\ObjectManagerInterface; @@ -69,7 +69,7 @@ class CollectionProvider implements CollectionProviderInterface { $collection = $fixture['collection']; $collection = $this->objectManager->create($collection, ['fixture' => $fixture]); - /** @var $collection \Mtf\Util\Generate\Repository\TableCollection */ + /** @var $collection \Magento\Mtf\Util\Generate\Repository\TableCollection */ return $collection->getItems(); } diff --git a/dev/tests/functional/lib/Mtf/Util/Generate/Repository/Resource.php b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Repository/Resource.php similarity index 95% rename from dev/tests/functional/lib/Mtf/Util/Generate/Repository/Resource.php rename to dev/tests/functional/lib/Magento/Mtf/Util/Generate/Repository/Resource.php index 3df60fd5bc9abac7c2299a9d0010c8d882035510..f366bbc74009cee589f3ba1043a4846dbd054994 100644 --- a/dev/tests/functional/lib/Mtf/Util/Generate/Repository/Resource.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Repository/Resource.php @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ -namespace Mtf\Util\Generate\Repository; +namespace Magento\Mtf\Util\Generate\Repository; /** * Class Resource diff --git a/dev/tests/functional/lib/Mtf/Util/Generate/Repository/TableCollection.php b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Repository/TableCollection.php similarity index 89% rename from dev/tests/functional/lib/Mtf/Util/Generate/Repository/TableCollection.php rename to dev/tests/functional/lib/Magento/Mtf/Util/Generate/Repository/TableCollection.php index 35d36c1a0510682b9586cfc4a69f298c9c3a633f..9c4ed81e91f72451e9be3ed67a824181b0f4c1b4 100644 --- a/dev/tests/functional/lib/Mtf/Util/Generate/Repository/TableCollection.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Repository/TableCollection.php @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ -namespace Mtf\Util\Generate\Repository; +namespace Magento\Mtf\Util\Generate\Repository; use Magento\Framework\Model\Resource\Db\Collection\AbstractCollection; @@ -39,7 +39,7 @@ class TableCollection extends AbstractCollection array $fixture = [] ) { $this->setModel('Magento\Framework\Object'); - $this->setResourceModel('Mtf\Util\Generate\Repository\Resource'); + $this->setResourceModel('Magento\Mtf\Util\Generate\Repository\Resource'); $resource = $this->getResource(); $resource->setFixture($fixture); @@ -50,7 +50,7 @@ class TableCollection extends AbstractCollection /** * Get resource instance * - * @return \Mtf\Util\Generate\Repository\Resource + * @return \Magento\Mtf\Util\Generate\Repository\Resource */ public function getResource() { diff --git a/dev/tests/functional/lib/Mtf/Util/Protocol/CurlInterface.php b/dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlInterface.php similarity index 96% rename from dev/tests/functional/lib/Mtf/Util/Protocol/CurlInterface.php rename to dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlInterface.php index f3233d88817ad930fc19cbc068e5776558589e4b..63a53a84e1ca877e2a4d5017a6a8d5890eafc76a 100644 --- a/dev/tests/functional/lib/Mtf/Util/Protocol/CurlInterface.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlInterface.php @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ -namespace Mtf\Util\Protocol; +namespace Magento\Mtf\Util\Protocol; /** * Class CurlInterface diff --git a/dev/tests/functional/lib/Mtf/Util/Protocol/CurlTransport.php b/dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlTransport.php similarity index 99% rename from dev/tests/functional/lib/Mtf/Util/Protocol/CurlTransport.php rename to dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlTransport.php index 9d1ccb866174851fa358ca68e8cf2379043c5da2..30c20908ed75cba5c20ac4a440f78d9f21c3ed80 100644 --- a/dev/tests/functional/lib/Mtf/Util/Protocol/CurlTransport.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlTransport.php @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ -namespace Mtf\Util\Protocol; +namespace Magento\Mtf\Util\Protocol; /** * HTTP CURL Adapter diff --git a/dev/tests/functional/lib/Mtf/Util/Protocol/CurlTransport/BackendDecorator.php b/dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlTransport/BackendDecorator.php similarity index 95% rename from dev/tests/functional/lib/Mtf/Util/Protocol/CurlTransport/BackendDecorator.php rename to dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlTransport/BackendDecorator.php index a255547319ac928ca72cf44b6d349fba161d2aa5..5705d52766dc96dccb6c4e2ecd75dd727365bcb6 100644 --- a/dev/tests/functional/lib/Mtf/Util/Protocol/CurlTransport/BackendDecorator.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlTransport/BackendDecorator.php @@ -4,11 +4,11 @@ * See COPYING.txt for license details. */ -namespace Mtf\Util\Protocol\CurlTransport; +namespace Magento\Mtf\Util\Protocol\CurlTransport; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; /** * Class BackendDecorator diff --git a/dev/tests/functional/lib/Mtf/Util/Protocol/CurlTransport/FrontendDecorator.php b/dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlTransport/FrontendDecorator.php similarity index 96% rename from dev/tests/functional/lib/Mtf/Util/Protocol/CurlTransport/FrontendDecorator.php rename to dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlTransport/FrontendDecorator.php index fbd0aa152d17535a33c47efc188115e4008fda86..97b29483cbac799935092aee03786fc8d92c8e3f 100644 --- a/dev/tests/functional/lib/Mtf/Util/Protocol/CurlTransport/FrontendDecorator.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlTransport/FrontendDecorator.php @@ -4,11 +4,11 @@ * See COPYING.txt for license details. */ -namespace Mtf\Util\Protocol\CurlTransport; +namespace Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Customer\Test\Fixture\CustomerInjectable; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; /** * Class FrontendDecorator diff --git a/dev/tests/functional/lib/Mtf/Util/Protocol/SoapTransport.php b/dev/tests/functional/lib/Magento/Mtf/Util/Protocol/SoapTransport.php similarity index 97% rename from dev/tests/functional/lib/Mtf/Util/Protocol/SoapTransport.php rename to dev/tests/functional/lib/Magento/Mtf/Util/Protocol/SoapTransport.php index 943a45b9801f62ef4d68cb1627200c1d164ce9f6..8ddeb74e4cd4dcad29b7a9ac9ad39e3a8d0a3e46 100644 --- a/dev/tests/functional/lib/Mtf/Util/Protocol/SoapTransport.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Protocol/SoapTransport.php @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ -namespace Mtf\Util\Protocol; +namespace Magento\Mtf\Util\Protocol; class SoapTransport { diff --git a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/OptgroupselectElement.php b/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/OptgroupselectElement.php deleted file mode 100644 index 76a9091ad17a936582bdeb38161a700a163c70b7..0000000000000000000000000000000000000000 --- a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/OptgroupselectElement.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Mtf\Client\Driver\Selenium\Element; - -use Mtf\Client\Driver\Selenium\Element; - -/** - * Class OptgroupselectElement - * Typified element class for option group selectors - */ -class OptgroupselectElement extends SelectElement -{ - /** - * Option group selector - * - * @var string - */ - protected $optGroup = 'optgroup[option[contains(.,"%s")]]'; - - /** - * Get the value of form element - * - * @return string - */ - public function getValue() - { - $this->_eventManager->dispatchEvent(['get_value'], [(string)$this->_locator]); - $selectedLabel = trim($this->_getWrappedElement()->selectedLabel()); - $value = trim( - $this->_getWrappedElement()->byXPath(sprintf($this->optGroup, $selectedLabel))->attribute('label'), - chr(0xC2) . chr(0xA0) - ); - $value .= '/' . $selectedLabel; - return $value; - } - - /** - * Select value in dropdown which has option groups - * - * @param string $value - * @return void - */ - public function setValue($value) - { - $this->_eventManager->dispatchEvent(['set_value'], [__METHOD__, $this->getAbsoluteSelector()]); - list($group, $option) = explode('/', $value); - $optionLocator = ".//optgroup[@label='$group']/option[contains(text(), '$option')]"; - $criteria = new \PHPUnit_Extensions_Selenium2TestCase_ElementCriteria('xpath'); - $criteria->value($optionLocator); - $this->_getWrappedElement(true)->selectOptionByCriteria($criteria); - } -} diff --git a/dev/tests/functional/phpunit.xml.dist b/dev/tests/functional/phpunit.xml.dist index 88428963045e80fd73e217dbaf77c9eff48deb3e..1bc47ba8998a80e915e08c384657b5aa9280ab34 100755 --- a/dev/tests/functional/phpunit.xml.dist +++ b/dev/tests/functional/phpunit.xml.dist @@ -19,14 +19,14 @@ </testsuites> <listeners> - <listener class="Mtf\System\Browser\Listener" /> - <listener class="Mtf\System\Isolation\Listener"> + <listener class="Magento\Mtf\System\Browser\Listener" /> + <listener class="Magento\Mtf\System\Isolation\Listener"> <arguments> - <object class="Mtf\System\Isolation\Driver\Base" /> + <object class="Magento\Mtf\System\Isolation\Driver\Base" /> </arguments> </listener> - <listener class="Mtf\System\Event\StateListener" /> - <listener class="Mtf\System\JUnit"/> + <listener class="Magento\Mtf\System\Event\StateListener" /> + <listener class="Magento\Mtf\System\JUnit"/> </listeners> <php> @@ -36,6 +36,7 @@ <env name="server_config_path" value="config/server.yml.dist" /> <env name="isolation_config_path" value="config/isolation.yml.dist" /> <env name="handlers_config_path" value="config/handler.yml.dist" /> + <env name="install_config_path" value="config/install_data.yml.dist" /> <env name="testsuite_rule" value="basic" /> <env name="testsuite_rule_path" value="Mtf/TestSuite/InjectableTests" /> <env name="log_directory" value="var/log" /> diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Admin/Login.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Admin/Login.php index 3ba5eb506099636c07abb9de216797a11a844ad9..54f750ceeec48e8fd45c0ae8682793d0e9d8ad6e 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Admin/Login.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Admin/Login.php @@ -6,8 +6,8 @@ namespace Magento\Backend\Test\Block\Admin; -use Mtf\Block\Form; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; /** * Class Login diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Cache.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Cache.php index 6918b92ae9c6738f491555fe221c2415f1083761..c25eac6454d23fcb9ef9b754ce91b03a5a185219 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Cache.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Cache.php @@ -6,9 +6,9 @@ namespace Magento\Backend\Test\Block; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; -use Mtf\Factory\Factory; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Factory\Factory; /** * Class Actions @@ -62,7 +62,7 @@ class Cache extends Block public function flushCacheStorage() { $this->_rootElement->find($this->flushCacheStorageButton)->click(); - $this->_rootElement->acceptAlert(); + $this->browser->acceptAlert(); } /** diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Denied.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Denied.php index 551202c18d02bad4fc413ab37aac9dc86813bbc6..c74b042f76f692054a37e72643d22bc243a12388 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Denied.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Denied.php @@ -6,8 +6,8 @@ namespace Magento\Backend\Test\Block; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Denied diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/FormPageActions.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/FormPageActions.php index 4d8abcfd1fa582a2621f93caca4d05315b8bc3fe..246c3113a8d176f05a2b226aab70d056f2effe50 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/FormPageActions.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/FormPageActions.php @@ -6,7 +6,7 @@ namespace Magento\Backend\Test\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class FormPageActions @@ -110,7 +110,7 @@ class FormPageActions extends PageActions public function delete() { $this->_rootElement->find($this->deleteButton)->click(); - $this->_rootElement->acceptAlert(); + $this->browser->acceptAlert(); } /** @@ -131,6 +131,7 @@ class FormPageActions extends PageActions */ protected function waitBeforeClick() { + time_nanosleep(0, 600000000); usleep(500000); } } diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Menu.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Menu.php index 4f3aee6105530b2b531064be9b94e631c3d2a97b..23cd977b4c224ee95bb258281367bed61673c8a6 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Menu.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Menu.php @@ -6,7 +6,7 @@ */ namespace Magento\Backend\Test\Block; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Class Menu diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Page/Header.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Page/Header.php index b9732c73c2adb69c30b44ff3952c206dd1717ab6..94b36cc6a95ea6c8e46707c102c7fa3ac70aa0d5 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Page/Header.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Page/Header.php @@ -6,9 +6,9 @@ namespace Magento\Backend\Test\Block\Page; -use Mtf\Block\Block; -use Mtf\Client\Driver\Selenium\Element\GlobalsearchElement; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\GlobalsearchElement; /** * Header block. diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Page/Main.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Page/Main.php index da9b8ec3376c12b242d4a95d2e3516093d88ac2a..9de2cdc43498326ae52a79eb41ebbf373ec6b4f6 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Page/Main.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Page/Main.php @@ -6,7 +6,7 @@ namespace Magento\Backend\Test\Block\Page; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Main block. diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/PageActions.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/PageActions.php index 1f55b62de5327649731b80eaab6911eaa1ea2ed2..58e1d53e0cead0329d456c6b78f48a4092ee44d7 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/PageActions.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/PageActions.php @@ -6,7 +6,7 @@ namespace Magento\Backend\Test\Block; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Class PageActions diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Form.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Form.php index 99ad6c7620eb68c716b9b515b0624a6ae40291a9..86ae1d8d66a067591d0fae2bed7b35c58f068663 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Form.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Form.php @@ -7,9 +7,9 @@ */ namespace Magento\Backend\Test\Block\System\Config; -use Mtf\Block\Block; -use Mtf\Factory\Factory; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Client\Locator; class Form extends Block { diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Form/Group.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Form/Group.php index e168ce41053af7fd19ce5ff9b166801a12ac430b..0d3244802c70260eedce3ed996df9856c77a3057 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Form/Group.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Form/Group.php @@ -8,9 +8,12 @@ namespace Magento\Backend\Test\Block\System\Config\Form; +use Magento\Mtf\Client\Locator; use Magento\Backend\Test\Block\Widget\Form; -use Mtf\Client\Element; +/** + * Class Group + */ class Group extends Form { /** @@ -67,14 +70,14 @@ class Group extends Form $element = $this->_rootElement->find( sprintf($this->element, $field), - Element\Locator::SELECTOR_XPATH, + Locator::SELECTOR_XPATH, $input ); if ($element->isDisabled()) { $checkbox = $this->_rootElement->find( sprintf($this->defaultCheckbox, $field), - Element\Locator::SELECTOR_XPATH, + Locator::SELECTOR_XPATH, 'checkbox' ); $checkbox->setValue('No'); diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/PageActions.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/PageActions.php index d416864fe1542bd886a42a96c3e8d3c29761e1cf..8ed2b6a7bfb7acdadf0b2fd106939052fb7de5d2 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/PageActions.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/PageActions.php @@ -10,7 +10,7 @@ namespace Magento\Backend\Test\Block\System\Config; use Magento\Backend\Test\Block\FormPageActions as AbstractPageActions; use Magento\Store\Test\Fixture\Store; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class PageActions @@ -35,7 +35,7 @@ class PageActions extends AbstractPageActions { $this->_rootElement->find($this->scopeSelector, Locator::SELECTOR_CSS, 'liselectstore') ->setValue($websiteScope); - $this->_rootElement->acceptAlert(); + $this->browser->acceptAlert(); return $this; } diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/Delete/Form.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/Delete/Form.php index cde30ce25ebddbf4d0dc6bc90150b256e7097254..ac3cce607228743746f8cec0237d349ed617b143 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/Delete/Form.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/Delete/Form.php @@ -6,8 +6,8 @@ namespace Magento\Backend\Test\Block\System\Store\Delete; -use Mtf\Block\Form as AbstractForm; -use Mtf\Client\Element; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Block\Form as AbstractForm; /** * Class Form @@ -19,10 +19,10 @@ class Form extends AbstractForm * Fill Backup Option in delete * * @param array $data - * @param Element $element + * @param SimpleElement $element * @return void */ - public function fillForm(array $data, Element $element = null) + public function fillForm(array $data, SimpleElement $element = null) { $mapping = $this->dataMapping($data); $this->_fill($mapping, $element); diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/Edit/Form/GroupForm.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/Edit/Form/GroupForm.php index a703a31bc2b576a79fe2b9c6ccb440b1ec6b1a6b..819e075dbe9ab87b9d92914cb6d2c9122d93a019 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/Edit/Form/GroupForm.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/Edit/Form/GroupForm.php @@ -6,8 +6,8 @@ namespace Magento\Backend\Test\Block\System\Store\Edit\Form; -use Mtf\Block\Form; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; /** * Class GroupForm diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/Edit/Form/StoreForm.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/Edit/Form/StoreForm.php index 2c7f54f9f6800badc784ea7d675359d892f60ef6..0d9824e284fb8b7c1326c7dbb0b985521bdd045a 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/Edit/Form/StoreForm.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/Edit/Form/StoreForm.php @@ -6,8 +6,8 @@ namespace Magento\Backend\Test\Block\System\Store\Edit\Form; -use Mtf\Block\Form; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; /** * Class StoreForm diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/Edit/Form/WebsiteForm.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/Edit/Form/WebsiteForm.php index 28a29b48688c50e85eadfca07094ec2c42cf3c27..cfbfa524c77c55fdebee79a250f7a30666e33688 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/Edit/Form/WebsiteForm.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/Edit/Form/WebsiteForm.php @@ -6,7 +6,7 @@ namespace Magento\Backend\Test\Block\System\Store\Edit\Form; -use Mtf\Block\Form; +use Magento\Mtf\Block\Form; /** * Class WebsiteForm diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/StoreGrid.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/StoreGrid.php index b6c7817121d118b1777fc3d273c566dd30f05a90..f559e6130eca347c24b9db4dcd961d1f778a1c09 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/StoreGrid.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Store/StoreGrid.php @@ -10,7 +10,7 @@ use Magento\Backend\Test\Block\Widget\Grid as GridInterface; use Magento\Store\Test\Fixture\Store; use Magento\Store\Test\Fixture\StoreGroup; use Magento\Store\Test\Fixture\Website; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class StoreGrid diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Variable/Edit/VariableForm.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Variable/Edit/VariableForm.php index 0c3ad11e969ee626174b652671a6eafdc9677bc4..2b0c596f1f1e5e8541e5f8895f08b2fb1b6369e0 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Variable/Edit/VariableForm.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Variable/Edit/VariableForm.php @@ -6,7 +6,7 @@ namespace Magento\Backend\Test\Block\System\Variable\Edit; -use Mtf\Block\Form; +use Magento\Mtf\Block\Form; /** * Class Form diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Template.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Template.php index 31b67b6b87330dde3e62f347f087a02328458293..5170a9b72ee00aeb4896c8e5dd4aa5e4361cd7c1 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Template.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Template.php @@ -7,7 +7,7 @@ namespace Magento\Backend\Test\Block; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Class Template diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Form.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Form.php index fe0aad5c9cdc69057d9f43e92826a5d67af7d80c..d57bd1aa4d78f8f9829b08857a27611793b1d462 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Form.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Form.php @@ -7,10 +7,10 @@ namespace Magento\Backend\Test\Block\Widget; -use Mtf\Block\Form as FormInstance; -use Mtf\Client\Element\Locator; -use Mtf\Factory\Factory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Block\Form as FormInstance; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Form diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/FormTabs.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/FormTabs.php index edf9d9de7e3b4325741121bef2939b85ef7f9d37..ad1e586f8b6e9a1686c14d00a5177c83e3e60ee5 100755 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/FormTabs.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/FormTabs.php @@ -6,15 +6,15 @@ namespace Magento\Backend\Test\Block\Widget; -use Mtf\Block\BlockFactory; -use Mtf\Block\Mapper; -use Mtf\Client\Driver\Selenium\Browser; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; -use Mtf\Util\Iterator\File; -use Mtf\Util\XmlConverter; +use Magento\Mtf\Block\BlockFactory; +use Magento\Mtf\Block\Mapper; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Util\Iterator\File; +use Magento\Mtf\Util\XmlConverter; /** * Class FormTabs @@ -44,18 +44,18 @@ class FormTabs extends Form /** * @constructor - * @param Element $element + * @param SimpleElement $element * @param Mapper $mapper * @param BlockFactory $blockFactory - * @param Browser $browser + * @param BrowserInterface $browser * @param XmlConverter $xmlConverter * @param array $config */ public function __construct( - Element $element, + SimpleElement $element, Mapper $mapper, BlockFactory $blockFactory, - Browser $browser, + BrowserInterface $browser, XmlConverter $xmlConverter, array $config = [] ) { @@ -102,10 +102,10 @@ class FormTabs extends Form * Fill form with tabs * * @param FixtureInterface $fixture - * @param Element|null $element + * @param SimpleElement|null $element * @return FormTabs */ - public function fill(FixtureInterface $fixture, Element $element = null) + public function fill(FixtureInterface $fixture, SimpleElement $element = null) { $tabs = $this->getFieldsByTabs($fixture); return $this->fillTabs($tabs, $element); @@ -115,10 +115,10 @@ class FormTabs extends Form * Fill specified form with tabs * * @param array $tabs - * @param Element|null $element + * @param SimpleElement|null $element * @return FormTabs */ - protected function fillTabs(array $tabs, Element $element = null) + protected function fillTabs(array $tabs, SimpleElement $element = null) { $context = ($element === null) ? $this->_rootElement : $element; foreach ($tabs as $tabName => $tabFields) { @@ -179,13 +179,13 @@ class FormTabs extends Form * Get data of the tabs * * @param FixtureInterface|null $fixture - * @param Element|null $element + * @param SimpleElement|null $element * @return array * * @SuppressWarnings(PHPMD.UnusedLocalVariable) * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getData(FixtureInterface $fixture = null, Element $element = null) + public function getData(FixtureInterface $fixture = null, SimpleElement $element = null) { $data = []; diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php index d4677523c25c1d31b80fab4e676b65d368fffb3d..3843da95b7b0a4e8cc43bb15ce5b0bd8db7db83a 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php @@ -6,10 +6,10 @@ namespace Magento\Backend\Test\Block\Widget; -use Mtf\Block\Block; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Factory\Factory; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Factory\Factory; /** * Abstract class Grid @@ -243,7 +243,6 @@ abstract class Grid extends Block $this->prepareForSearch($filter); $this->_rootElement->find($this->searchButton, Locator::SELECTOR_CSS)->click(); $this->waitLoader(); - $this->reinitRootElement(); } /** @@ -323,7 +322,6 @@ abstract class Grid extends Block $this->openFilterBlock(); $this->_rootElement->find($this->resetButton, Locator::SELECTOR_CSS)->click(); $this->waitLoader(); - $this->reinitRootElement(); } /** @@ -365,7 +363,7 @@ abstract class Grid extends Block { $this->_rootElement->find($this->massactionSubmit, Locator::SELECTOR_CSS)->click(); if ($acceptAlert) { - $this->_rootElement->acceptAlert(); + $this->browser->acceptAlert(); } } @@ -375,7 +373,7 @@ abstract class Grid extends Block * @param array $filter * @param bool $isSearchable * @param bool $isStrict - * @return Element + * @return SimpleElement */ protected function getRow(array $filter, $isSearchable = true, $isStrict = true) { @@ -406,7 +404,7 @@ abstract class Grid extends Block { $data = []; do { - $rows = $this->_rootElement->find($this->rowItem)->getElements(); + $rows = $this->_rootElement->getElements($this->rowItem); foreach ($rows as $row) { $rowData = []; foreach ($columns as $columnName) { @@ -448,7 +446,6 @@ abstract class Grid extends Block $sortBlock->click(); $this->waitLoader(); } - $this->reinitRootElement(); } /** diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Tab.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Tab.php index 88bb906a8f582df3d960f1f69aa9bbe76d0f2e9f..a4f434313fc12b49c2088d85d8b7e9b33fe1b54a 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Tab.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Tab.php @@ -6,9 +6,9 @@ namespace Magento\Backend\Test\Block\Widget; -use Mtf\Block\Form as AbstractForm; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form as AbstractForm; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Client\Locator; /** * Class Tab @@ -43,10 +43,10 @@ class Tab extends AbstractForm * Fill data to fields on tab * * @param array $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return $this */ - public function fillFormTab(array $fields, Element $element = null) + public function fillFormTab(array $fields, SimpleElement $element = null) { $data = $this->dataMapping($fields); $this->_fill($data, $element); @@ -58,10 +58,10 @@ class Tab extends AbstractForm * Get data of tab * * @param array|null $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return array */ - public function getDataFormTab($fields = null, Element $element = null) + public function getDataFormTab($fields = null, SimpleElement $element = null) { $data = $this->dataMapping($fields); return $this->_getData($data, $element); @@ -71,9 +71,9 @@ class Tab extends AbstractForm * Update data to fields on tab * * @param array $fields - * @param Element|null $element + * @param SimpleElement|null $element */ - public function updateFormTab(array $fields, Element $element = null) + public function updateFormTab(array $fields, SimpleElement $element = null) { $this->fillFormTab($fields, $element); } @@ -86,7 +86,7 @@ class Tab extends AbstractForm public function getJsErrors() { $data = []; - $elements = $this->_rootElement->find($this->mageErrorField, Locator::SELECTOR_XPATH)->getElements(); + $elements = $this->_rootElement->getElements($this->mageErrorField, Locator::SELECTOR_XPATH); foreach ($elements as $element) { $error = $element->find($this->mageErrorText, Locator::SELECTOR_XPATH); if ($error->isVisible()) { diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchCustomerName.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchCustomerName.php index 999eb88ce4ef0b6cc5c33f36443c7dd2edfdd9ea..70e2cf29fb4ee0739026c568646626b704572741 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchCustomerName.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchCustomerName.php @@ -8,7 +8,7 @@ namespace Magento\Backend\Test\Constraint; use Magento\Backend\Test\Fixture\GlobalSearch; use Magento\Backend\Test\Page\Adminhtml\Dashboard; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertGlobalSearchCustomerName diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchNoRecordsFound.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchNoRecordsFound.php index 8b14b75af7cfd924ad3f90e70ba0c622b876abf1..69a2652ce24c741b34e4f87311a4b0e951cadc5b 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchNoRecordsFound.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchNoRecordsFound.php @@ -7,7 +7,7 @@ namespace Magento\Backend\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\Dashboard; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertGlobalSearchNoRecordsFound diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchOrderId.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchOrderId.php index cc0af65d02874a206a7c6ff4ffb39173e2ce8ded..4f78438f27c5fee03415b598dd6c8315228a0805 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchOrderId.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchOrderId.php @@ -8,7 +8,7 @@ namespace Magento\Backend\Test\Constraint; use Magento\Backend\Test\Fixture\GlobalSearch; use Magento\Backend\Test\Page\Adminhtml\Dashboard; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertGlobalSearchOrderId diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchProductName.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchProductName.php index 5c32c84fb1f9edb2c4d2d508325b7d682327a02f..4e477ff193cf26098a7d6168ea36ad443dac6dd5 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchProductName.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertGlobalSearchProductName.php @@ -9,7 +9,7 @@ namespace Magento\Backend\Test\Constraint; use Magento\Backend\Test\Fixture\GlobalSearch; use Magento\Backend\Test\Page\Adminhtml\Dashboard; use Magento\Sales\Test\Fixture\OrderInjectable; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertGlobalSearchProductName diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Admin/SuperAdmin.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Admin/SuperAdmin.php index 017da4d2aca591ca036dbbe37dac316cd60c64cd..2a519151087272f37a464675af3a59aa5a948539 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Admin/SuperAdmin.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Admin/SuperAdmin.php @@ -6,7 +6,7 @@ namespace Magento\Backend\Test\Fixture\Admin; -use Mtf\Fixture\DataFixture; +use Magento\Mtf\Fixture\DataFixture; /** * Class SuperAdmin diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Date.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Date.php index e9f9c69db999dcb44c2f2d25b435d870ab8b1457..12c06f560e703348ad9aa6d13f3dac781d7dc53d 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Date.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Date.php @@ -6,7 +6,7 @@ namespace Magento\Backend\Test\Fixture; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Date diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch.php index a32966711b5094325fc654d72e730fde5159a134..d4f4890694a21961d660cf68c0677bfb48cb748f 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch.php @@ -6,7 +6,7 @@ namespace Magento\Backend\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class GlobalSearch diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch/Query.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch/Query.php index 2c7de34543506265378e076a1df0242a86af6f6a..3f14768fb4511a5233a1e4038d693bed751acd32 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch/Query.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch/Query.php @@ -6,9 +6,9 @@ namespace Magento\Backend\Test\Fixture\GlobalSearch; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class Query diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Conditions.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Conditions.php index 527fa524e21bdd7c7cb1a2fd4d9fb96ef9b27d9f..ce80fa82d407470fe142e0fbc193579172363ba4 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Conditions.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Conditions.php @@ -6,7 +6,7 @@ namespace Magento\Backend\Test\Handler; -use Mtf\Handler\Curl; +use Magento\Mtf\Handler\Curl; /** * Class Conditions diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Extractor.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Extractor.php index 9346e1203a5c83fa25dc320c190c65e1c08d150f..6e980ea374c9f49f781ee631dc51b2a45015c43a 100755 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Extractor.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Extractor.php @@ -7,10 +7,10 @@ namespace Magento\Backend\Test\Handler; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Extractor diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Ui/LoginUser.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Ui/LoginUser.php index 7589e2bddd681c6babe4e4c10b42eca282ae5956..51cc5e3ab6f2fcfefb51b469432d86d5f4078c25 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Ui/LoginUser.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Ui/LoginUser.php @@ -6,9 +6,9 @@ namespace Magento\Backend\Test\Handler\Ui; -use Mtf\Factory\Factory; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Ui; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Ui; /** * Class LoginUser diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Ui/LogoutUser.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Ui/LogoutUser.php index e774b6dc7fd3882299a0da727a23dc6f721d4773..9ffe8a5665bf9dc7eaef69aefe1e43282dd85d98 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Ui/LogoutUser.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Ui/LogoutUser.php @@ -7,9 +7,9 @@ namespace Magento\Backend\Test\Handler\Ui; -use Mtf\Factory\Factory; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Ui; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Ui; /** * Class LogoutUser diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Page/AdminAuthLogin.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Page/AdminAuthLogin.php index 3215460fa6055d5c775b815cc29e0568d01625cb..c53ef25e6dc0a4a7dc930ed96849953f74d038a5 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Page/AdminAuthLogin.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Page/AdminAuthLogin.php @@ -5,9 +5,9 @@ */ namespace Magento\Backend\Test\Page; -use Mtf\Client\Element\Locator; -use Mtf\Factory\Factory; -use Mtf\Page\Page; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Page\Page; /** * Class AdminAuthLogin diff --git a/dev/tests/functional/tests/app/Magento/Backup/Test/Constraint/AssertBackupInGrid.php b/dev/tests/functional/tests/app/Magento/Backup/Test/Constraint/AssertBackupInGrid.php index 073ce6fcde77f96ab6ba484fc6dba5c15399754b..71c85156978498e81dbfdde4dc7124debef1ae4a 100644 --- a/dev/tests/functional/tests/app/Magento/Backup/Test/Constraint/AssertBackupInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Backup/Test/Constraint/AssertBackupInGrid.php @@ -7,7 +7,7 @@ namespace Magento\Backup\Test\Constraint; use Magento\Backup\Test\Page\Adminhtml\BackupIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertBackupInGrid diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php index fb31b7e0db1528bda7449d96069aa6a398dd6014..12d9fc7f39ea1e69f119a213a66e1e9b94a03fd4 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php @@ -7,8 +7,9 @@ namespace Magento\Bundle\Test\Block\Adminhtml\Catalog\Product\Edit\Tab; use Magento\Backend\Test\Block\Widget\Tab; +use Magento\Mtf\Client\Element\SimpleElement; use Magento\Bundle\Test\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option; -use Mtf\Client\Element; +use Magento\Mtf\Client\Element; /** * Class Bundle @@ -55,10 +56,10 @@ class Bundle extends Tab * Fill bundle options * * @param array $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return $this */ - public function fillFormTab(array $fields, Element $element = null) + public function fillFormTab(array $fields, SimpleElement $element = null) { if (!isset($fields['bundle_selections'])) { return $this; @@ -80,10 +81,10 @@ class Bundle extends Tab * Get data to fields on downloadable tab * * @param array|null $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return array */ - public function getDataFormTab($fields = null, Element $element = null) + public function getDataFormTab($fields = null, SimpleElement $element = null) { $newFields = []; if (!isset($fields['bundle_selections'])) { diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php index 4aa699e98b36ad19e6c896402de869f8f450da26..b3286de48a5bd3a1fc50838887eb313e8d8408ed 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php @@ -8,9 +8,8 @@ namespace Magento\Bundle\Test\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle; use Magento\Bundle\Test\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option\Search\Grid; use Magento\Bundle\Test\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option\Selection; -use Mtf\Block\Form; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; /** * Class Option @@ -92,9 +91,9 @@ class Option extends Form { $mapping = $this->dataMapping($fields); $this->_fill($mapping); - $selections = $this->_rootElement->find($this->removeSelection)->getElements(); + $selections = $this->_rootElement->getElements($this->removeSelection); if (count($selections)) { - foreach ($selections as $itemSelection) { + foreach (array_reverse($selections) as $itemSelection) { $itemSelection->click(); } } diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php index f7e96753e9e7eb2c05738860af221b0e47dbd0c8..5d213baa8b4b5707b0cdaa4d13b31ce32757363e 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php @@ -6,7 +6,7 @@ namespace Magento\Bundle\Test\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option; -use Mtf\Block\Form; +use Magento\Mtf\Block\Form; /** * Class Selection diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Product/Composite/Configure.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Product/Composite/Configure.php index f34696966fd96f7ed0133603b3192249091995f6..af5173612c1aad9118fc66b92a2e924691a43674 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Product/Composite/Configure.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Product/Composite/Configure.php @@ -7,7 +7,7 @@ namespace Magento\Bundle\Test\Block\Adminhtml\Product\Composite; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Configure diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View.php index de4c47845b37033d56080fff5954a13812413e19..5f99ab3bce393aef59a3a5d46ad4e7ee77915d43 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View.php @@ -8,9 +8,9 @@ namespace Magento\Bundle\Test\Block\Catalog\Product; use Magento\Bundle\Test\Block\Catalog\Product\View\Type\Bundle; use Magento\Bundle\Test\Fixture\BundleProduct; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class View @@ -70,7 +70,6 @@ class View extends \Magento\Catalog\Test\Block\Product\View $selector = $this->newsletterFormSelector; $this->browser->waitUntil( function () use ($browser, $selector) { - $this->reinitRootElement(); $element = $browser->find($selector); return $element->isVisible() ? true : null; } diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View/Type/Bundle.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View/Type/Bundle.php index feb5b963ab896be79dfe1f413f5bee7f6a3b23eb..137eadb438b48f4addcdb229ca72df4c53e5fbd5 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View/Type/Bundle.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View/Type/Bundle.php @@ -9,11 +9,12 @@ namespace Magento\Bundle\Test\Block\Catalog\Product\View\Type; use Magento\Bundle\Test\Fixture\Bundle as BundleDataFixture; use Magento\Bundle\Test\Fixture\BundleProduct; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Block\Block; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Bundle\Test\Block\Catalog\Product\View\Type\Option; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class Bundle @@ -111,7 +112,7 @@ class Bundle extends Block throw new \Exception("Can't find option: \"{$title}\""); } - /** @var Element $optionElement */ + /** @var SimpleElement $optionElement */ $optionElement = $listFormOptions[$title]; $getTypeData = 'get' . $this->optionNameConvert($option['type']) . 'Data'; @@ -152,10 +153,10 @@ class Bundle extends Block /** * Get data of "Drop-down" option * - * @param Element $option + * @param SimpleElement $option * @return array */ - protected function getDropdownData(Element $option) + protected function getDropdownData(SimpleElement $option) { $select = $option->find($this->selectOption, Locator::SELECTOR_XPATH, 'select'); // Skip "Choose option ..."(option #1) @@ -165,10 +166,10 @@ class Bundle extends Block /** * Get data of "Multiple select" option * - * @param Element $option + * @param SimpleElement $option * @return array */ - protected function getMultipleselectData(Element $option) + protected function getMultipleselectData(SimpleElement $option) { $multiselect = $option->find($this->selectOption, Locator::SELECTOR_XPATH, 'multiselect'); $data = $this->getSelectOptionsData($multiselect, 1); @@ -184,13 +185,13 @@ class Bundle extends Block /** * Get data of "Radio buttons" option * - * @param Element $option + * @param SimpleElement $option * @return array */ - protected function getRadiobuttonsData(Element $option) + protected function getRadiobuttonsData(SimpleElement $option) { $listOptions = []; - $optionLabels = $option->find($this->optionLabel, Locator::SELECTOR_XPATH)->getElements(); + $optionLabels = $option->getElements($this->optionLabel, Locator::SELECTOR_XPATH); foreach ($optionLabels as $optionLabel) { if ($optionLabel->isVisible()) { @@ -204,10 +205,10 @@ class Bundle extends Block /** * Get data of "Checkbox" option * - * @param Element $option + * @param SimpleElement $option * @return array */ - protected function getCheckboxData(Element $option) + protected function getCheckboxData(SimpleElement $option) { $data = $this->getRadiobuttonsData($option); @@ -222,11 +223,11 @@ class Bundle extends Block /** * Get data from option of select and multiselect * - * @param Element $element + * @param SimpleElement $element * @param int $firstOption * @return array */ - protected function getSelectOptionsData(Element $element, $firstOption = 1) + protected function getSelectOptionsData(SimpleElement $element, $firstOption = 1) { $listOptions = []; diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View/Type/Option.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View/Type/Option.php index 9a9427361df7b780f6f84c3632490d0ed8c089ae..1d3c35cceceef00da7e51acaf78edfa5be9832f3 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View/Type/Option.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View/Type/Option.php @@ -9,7 +9,7 @@ namespace Magento\Bundle\Test\Block\Catalog\Product\View\Type; -use Mtf\Block\Form; +use Magento\Mtf\Block\Form; /** * Class Option diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleInCategory.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleInCategory.php index e808b34f92e98b64c3f06f19699a21b851c5bea5..d05b7beb50e61ec1f8adcecee342e676a70e778d 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleInCategory.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleInCategory.php @@ -10,7 +10,7 @@ use Magento\Bundle\Test\Fixture\BundleProduct; use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Page\Category\CatalogCategoryView; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Check bundle product on the category page. diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleItemsOnProductPage.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleItemsOnProductPage.php index 4c74bc353fcc744e026f967dc97ea3c2af6bb547..a7ceb39b65a592dbaa0558d637607a72a59a543d 100755 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleItemsOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleItemsOnProductPage.php @@ -8,8 +8,8 @@ namespace Magento\Bundle\Test\Constraint; use Magento\Bundle\Test\Fixture\BundleProduct; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractAssertForm; /** * Class AssertBundleItemsOnProductPage @@ -26,13 +26,13 @@ class AssertBundleItemsOnProductPage extends AbstractAssertForm * * @param CatalogProductView $catalogProductView * @param BundleProduct $product - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ public function processAssert( CatalogProductView $catalogProductView, BundleProduct $product, - Browser $browser + BrowserInterface $browser ) { $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundlePriceType.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundlePriceType.php index 40fe60cf5379872fc295074d06414b0a7c34d9ad..22e4f9c693a3098d9a8e011628cf7ee6f5f09511 100755 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundlePriceType.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundlePriceType.php @@ -9,8 +9,8 @@ namespace Magento\Bundle\Test\Constraint; use Magento\Bundle\Test\Fixture\BundleProduct; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Checkout\Test\Page\CheckoutCart; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertBundlePriceType @@ -37,7 +37,7 @@ class AssertBundlePriceType extends AbstractConstraint * @param CatalogProductView $catalogProductView * @param BundleProduct $product * @param CheckoutCart $checkoutCartView - * @param Browser $browser + * @param BrowserInterface $browser * @param BundleProduct $originalProduct [optional] * @return void */ @@ -45,7 +45,7 @@ class AssertBundlePriceType extends AbstractConstraint CatalogProductView $catalogProductView, BundleProduct $product, CheckoutCart $checkoutCartView, - Browser $browser, + BrowserInterface $browser, BundleProduct $originalProduct = null ) { $checkoutCartView->open()->getCartBlock()->clearShoppingCart(); diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundlePriceView.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundlePriceView.php index df510064e829bb37ec25333d393f7d5bdb62d3a9..d4e8779a7786966ac464d6186ecff63ea04d326a 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundlePriceView.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundlePriceView.php @@ -8,8 +8,8 @@ namespace Magento\Bundle\Test\Constraint; use Magento\Bundle\Test\Fixture\BundleProduct; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Check displayed price view for bundle product on product page. @@ -24,13 +24,13 @@ class AssertBundlePriceView extends AbstractConstraint * Assert that displayed price view for bundle product on product page equals passed from fixture. * * @param CatalogProductView $catalogProductView - * @param Browser $browser + * @param BrowserInterface $browser * @param BundleProduct $product * @return void */ public function processAssert( CatalogProductView $catalogProductView, - Browser $browser, + BrowserInterface $browser, BundleProduct $product ) { //Open product view page diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductInCustomerWishlistOnBackendGrid.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductInCustomerWishlistOnBackendGrid.php index f512ad015560f280f3da66574586f7a122a033ff..868112dce9fb03bde9fad1cf6c9538688bca0c39 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductInCustomerWishlistOnBackendGrid.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductInCustomerWishlistOnBackendGrid.php @@ -8,7 +8,7 @@ namespace Magento\Bundle\Test\Constraint; use Magento\Bundle\Test\Fixture\BundleProduct; use Magento\Wishlist\Test\Constraint\AssertProductInCustomerWishlistOnBackendGrid; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertBundleProductInCustomerWishlistOnBackendGrid diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertGroupedPriceOnBundleProductPage.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertGroupedPriceOnBundleProductPage.php index 4f431b4a0c164de06c8f3ae0403aad04ea777ce4..da18ba61b486e1c9bfa31c6a1ec2464747626e77 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertGroupedPriceOnBundleProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertGroupedPriceOnBundleProductPage.php @@ -8,7 +8,7 @@ namespace Magento\Bundle\Test\Constraint; use Magento\Catalog\Test\Block\Product\View; use Magento\Catalog\Test\Constraint\AssertProductGroupedPriceOnProductPage; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertGroupedPriceOnBundleProductPage diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertTierPriceOnBundleProductPage.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertTierPriceOnBundleProductPage.php index 288f73b194192119d797d93a8f22b1b752c8c203..3c62ea1c4eac77055ad478c6b28de567657631cf 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertTierPriceOnBundleProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertTierPriceOnBundleProductPage.php @@ -8,8 +8,8 @@ namespace Magento\Bundle\Test\Constraint; use Magento\Catalog\Test\Constraint\AssertProductTierPriceOnProductPage; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Client\Browser; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertTierPriceOnBundleProductPage @@ -37,13 +37,16 @@ class AssertTierPriceOnBundleProductPage extends AssertProductTierPriceOnProduct /** * Assertion that tier prices are displayed correctly * - * @param Browser $browser + * @param BrowserInterface $browser * @param CatalogProductView $catalogProductView * @param FixtureInterface $product * @return void */ - public function processAssert(Browser $browser, CatalogProductView $catalogProductView, FixtureInterface $product) - { + public function processAssert( + BrowserInterface $browser, + CatalogProductView $catalogProductView, + FixtureInterface $product + ) { //Open product view page $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); $viewBlock = $catalogProductView->getBundleViewBlock(); diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/Bundle.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/Bundle.php index 092be30151c78bbaf6f27ce5aa5d3a18d6ea0208..082ce5fa3dbee08d0bc963fed6b9d449900935b7 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/Bundle.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/Bundle.php @@ -7,8 +7,8 @@ namespace Magento\Bundle\Test\Fixture; use Magento\Catalog\Test\Fixture\Product; -use Mtf\Factory\Factory; -use Mtf\System\Config; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\System\Config; /** * Class Bundle diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleDynamic.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleDynamic.php index 05619530cf7f8045cda8c1b61854c695b4e16465..18f692eeda8fe0f84c5c1013c2ebbbd952e376d6 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleDynamic.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleDynamic.php @@ -6,7 +6,7 @@ namespace Magento\Bundle\Test\Fixture; -use Mtf\Factory\Factory; +use Magento\Mtf\Factory\Factory; /** * Class BundleDynamic diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleFixed.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleFixed.php index 903a8da05d00eb264cda5967fbdbddae1ce2d44f..3cebc6dfa36b2e22d3bb6c36e36a309c286c740b 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleFixed.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleFixed.php @@ -6,7 +6,7 @@ namespace Magento\Bundle\Test\Fixture; -use Mtf\Factory\Factory; +use Magento\Mtf\Factory\Factory; /** * Class BundleFixed diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.php index 9745ac6b032f616e37203328310f43b4ee2af66c..399f0184150b4f71d3db05deb87e46e693428d9c 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.php @@ -6,12 +6,12 @@ namespace Magento\Bundle\Test\Fixture; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\InjectableFixture; -use Mtf\Handler\HandlerFactory; -use Mtf\Repository\RepositoryFactory; -use Mtf\System\Config; -use Mtf\System\Event\EventManagerInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Handler\HandlerFactory; +use Magento\Mtf\Repository\RepositoryFactory; +use Magento\Mtf\System\Config; +use Magento\Mtf\System\Event\EventManagerInterface; /** * Class BundleProduct diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/BundleSelections.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/BundleSelections.php index 02d987d9eb3be30324a5c1781017151a45540997..b3d46087acd1b1d44e534d0c3be3451dd157510a 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/BundleSelections.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/BundleSelections.php @@ -6,8 +6,8 @@ namespace Magento\Bundle\Test\Fixture\BundleProduct; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class BundleSelections diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/Price.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/Price.php index d155c6236f702405766ac4ad3acf956f01725fa8..33965ee8bdfedb2d4eeff1a461e43ced0ac4cfce 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/Price.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/Price.php @@ -6,7 +6,7 @@ namespace Magento\Bundle\Test\Fixture\BundleProduct; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Price diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/Cart/Item.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/Cart/Item.php index 8ecfd8c910f0ae41716585b61b61dcd839123ccd..89bab0c1b7e8a5e30e95020d9426b4bd116475db 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/Cart/Item.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/Cart/Item.php @@ -7,7 +7,7 @@ namespace Magento\Bundle\Test\Fixture\Cart; use Magento\Bundle\Test\Fixture\BundleProduct; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Item diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/BundleProductInterface.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/BundleProductInterface.php index c1f62b99914238fb405487f62f3e8218d848d7f6..d53e765d8c0e6c83291d096ff07c1dbda6645028 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/BundleProductInterface.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/BundleProductInterface.php @@ -6,7 +6,7 @@ namespace Magento\Bundle\Test\Handler\BundleProduct; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface BundleProductInterface diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Curl.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Curl.php index e5f194127e99a628babc233fa398bd10f3f9ac04..c7746327b728b8bdae8d5c050339db83e80a99a9 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Curl.php @@ -8,8 +8,8 @@ namespace Magento\Bundle\Test\Handler\BundleProduct; use Magento\Bundle\Test\Fixture\BundleProduct; use Magento\Catalog\Test\Handler\CatalogProductSimple\Curl as ProductCurl; -use Mtf\Fixture\FixtureInterface; -use Mtf\System\Config; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\System\Config; /** * Create new bundle product via curl. diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/Curl/CreateBundle.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/Curl/CreateBundle.php index 2b93aaf4b9585fa3fa86f6e43fb1eb54b7c9e7c7..31abf5c15478c01defa5914deeeb1052e4eed9b5 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/Curl/CreateBundle.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/Curl/CreateBundle.php @@ -7,12 +7,12 @@ namespace Magento\Bundle\Test\Handler\Curl; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class CreateBundle diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct.php index 7f91b0f2ae95fc68dd8c9dc6741f55c550a3c948..7e3ea715cca10bd1da1ade7b4567a0a8e820da69 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct.php @@ -6,7 +6,7 @@ namespace Magento\Bundle\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class BundleProduct diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/BundleDynamicTest.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/BundleDynamicTest.php index 42af8b78cc83149ac8e72dcc75ee6609e8266519..fcdff4b9407d0f26811c9522b8bd50e774fc03b7 100755 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/BundleDynamicTest.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/BundleDynamicTest.php @@ -7,8 +7,8 @@ namespace Magento\Bundle\Test\TestCase; use Magento\Bundle\Test\Fixture\Bundle; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; /** * Class BundleDynamicTest diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/BundleFixedTest.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/BundleFixedTest.php index cbc2227fd0ee1769b64b411f4b999849566e12c6..ba309fcd6ed5f5670ac651dba9a80085e3925cc6 100755 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/BundleFixedTest.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/BundleFixedTest.php @@ -7,8 +7,8 @@ namespace Magento\Bundle\Test\TestCase; use Magento\Bundle\Test\Fixture\Bundle; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; /** * Class BundleFixedTest diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest.php index d39be09dbb642cc66a28bcf35a2224f8750d339c..3dc5fec8c7a2dde69fed367bd24e4bac365f9e6f 100755 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest.php @@ -10,7 +10,7 @@ use Magento\Bundle\Test\Fixture\BundleProduct; use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for CreateBundleProductEntity diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/EditBundleTest.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/EditBundleTest.php index 6e466a1f8095c16b48ee306fd01cddc756bcb925..f4592e21ddab9c526025f74e3d2b04718d78f88b 100755 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/EditBundleTest.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/EditBundleTest.php @@ -7,8 +7,8 @@ namespace Magento\Bundle\Test\TestCase; use Magento\Bundle\Test\Fixture\Bundle; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; /** * Class EditBundleTest diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/UpdateBundleProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/UpdateBundleProductEntityTest.php index aeddf4bcaae49440923e1a89642286f9618881e4..e2ab1af866a86204cd72578d2c80d8495e13252d 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/UpdateBundleProductEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/UpdateBundleProductEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Bundle\Test\TestCase; use Magento\Bundle\Test\Fixture\BundleProduct; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Update BundleProductEntity diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/AbstractConfigureBlock.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/AbstractConfigureBlock.php index e291635c52ff3b4717350a3dedd5495c30bdd12a..148e06c61fa1efcec312e79863e5bfb72b67e6d6 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/AbstractConfigureBlock.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/AbstractConfigureBlock.php @@ -8,9 +8,9 @@ namespace Magento\Catalog\Test\Block; use Magento\Catalog\Test\Block\Product\View\CustomOptions; use Magento\Catalog\Test\Fixture\CatalogProductSimple; -use Mtf\Block\Form; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class AbstractConfigureBlock diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Edit/CategoryForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Edit/CategoryForm.php index 27aac4a235edcedc3577f52c54a0d0355574a154..4a1ba08b8565e73dd84123bdd8f363c5b5cd794f 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Edit/CategoryForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Edit/CategoryForm.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Category\Edit; use Magento\Backend\Test\Block\Widget\FormTabs; -use Mtf\Factory\Factory; +use Magento\Mtf\Factory\Factory; /** * Class CategoryForm diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Edit/Tab/Product.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Edit/Tab/Product.php index 18d60a47e0ae81fb9e55f3425327ef64e84511aa..3f29be8ab7f41ab9d9be179571a7c06ee4a6f39b 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Edit/Tab/Product.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Edit/Tab/Product.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Category\Edit\Tab; use Magento\Backend\Test\Block\Widget\Tab; +use Magento\Mtf\Client\Element\SimpleElement; use Magento\Catalog\Test\Block\Adminhtml\Category\Tab\ProductGrid; -use Mtf\Client\Element; /** * Products grid of Category Products tab. @@ -33,10 +33,10 @@ class Product extends Tab * Fill category products. * * @param array $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return void */ - public function fillFormTab(array $fields, Element $element = null) + public function fillFormTab(array $fields, SimpleElement $element = null) { if (!isset($fields['category_products'])) { return; @@ -50,10 +50,10 @@ class Product extends Tab * Get data of tab. * * @param array|null $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return array */ - public function getDataFormTab($fields = null, Element $element = null) + public function getDataFormTab($fields = null, SimpleElement $element = null) { $data = $this->dataMapping($fields); $result = []; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Tree.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Tree.php index ccb3ce9c8f046c1d0fe4d18dfd1cdb59366d3c81..15a87f2de91c0097db842d621b8b8d41d697f5ac 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Tree.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Tree.php @@ -8,10 +8,11 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Category; use Magento\Catalog\Test\Fixture\Category; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\Element\TreeElement; /** * Class Tree @@ -158,7 +159,9 @@ class Tree extends Block public function isCategoryVisible(Category $category) { $categoryPath = $this->prepareFullCategoryPath($category); - $structure = $this->_rootElement->find($this->treeElement, Locator::SELECTOR_CSS, 'tree')->getStructure(); + /** @var TreeElement $treeElement */ + $treeElement = $this->_rootElement->find($this->treeElement, Locator::SELECTOR_CSS, 'tree'); + $structure = $treeElement->getStructure(); $result = false; $element = array_shift($categoryPath); foreach ($structure as $item) { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Widget/Chooser.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Widget/Chooser.php index 2ac3d3251c5baf19f6d177d5ea974a0327e695b1..160116b75181321f160bd0f7db82289a0f79caf0 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Widget/Chooser.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Widget/Chooser.php @@ -6,8 +6,8 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Category\Widget; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class CategoryChooser diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/AttributeForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/AttributeForm.php index 1161c7a95ea38482dd181224587faef8968b05a4..75a6c1b1c8958f6fd8c09d109302826a6b948bc5 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/AttributeForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/AttributeForm.php @@ -6,11 +6,12 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Attribute; -use Magento\Backend\Test\Block\Widget\FormTabs; use Magento\Backend\Test\Block\Widget\Tab; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; +use Magento\Backend\Test\Block\Widget\FormTabs; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Client\Element; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; /** * Edit attribute form on catalog product edit page. @@ -35,10 +36,10 @@ class AttributeForm extends FormTabs * Fill the attribute form. * * @param FixtureInterface $fixture - * @param Element|null $element + * @param SimpleElement|null $element * @return $this */ - public function fill(FixtureInterface $fixture, Element $element = null) + public function fill(FixtureInterface $fixture, SimpleElement $element = null) { $this->browser->switchToFrame(new Locator($this->iFrame)); $browser = $this->browser; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/CustomAttribute.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/CustomAttribute.php index b721484e4738b2dd65cf76353c45bfec241738a7..4dfc6d203b3f945c520bc8fadfff384600d1b20d 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/CustomAttribute.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/CustomAttribute.php @@ -6,13 +6,13 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Attribute; -use Mtf\Client\Driver\Selenium\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\SimpleElement; /** * Catalog product custom attribute element. */ -class CustomAttribute extends Element +class CustomAttribute extends SimpleElement { /** * Attribute input selector; @@ -42,7 +42,7 @@ class CustomAttribute extends Element */ public function setValue($data) { - $this->_eventManager->dispatchEvent(['set_value'], [__METHOD__, $this->getAbsoluteSelector()]); + $this->eventManager->dispatchEvent(['set_value'], [__METHOD__, $this->getAbsoluteSelector()]); $element = $this->getElementByClass($this->getElementClass()); $value = is_array($data) ? $data['value'] : $data; $this->find($this->inputSelector, Locator::SELECTOR_CSS, $element)->setValue($value); @@ -55,7 +55,7 @@ class CustomAttribute extends Element */ public function getValue() { - $this->_eventManager->dispatchEvent(['get_value'], [__METHOD__, $this->getAbsoluteSelector()]); + $this->eventManager->dispatchEvent(['get_value'], [__METHOD__, $this->getAbsoluteSelector()]); $inputType = $this->getElementByClass($this->getElementClass()); return $this->find($this->inputSelector, Locator::SELECTOR_CSS, $inputType)->getValue(); } @@ -84,9 +84,6 @@ class CustomAttribute extends Element */ protected function getElementClass() { - $criteria = new \PHPUnit_Extensions_Selenium2TestCase_ElementCriteria('css selector'); - $criteria->value($this->inputSelector); - $input = $this->_getWrappedElement()->element($criteria); - return $input->attribute('class'); + return $this->find($this->inputSelector, Locator::SELECTOR_CSS)->getAttribute('class'); } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/AttributeForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/AttributeForm.php index b3ee1ca8e5313b9f60bde17db50fa6387e5f9d20..0a3a1b52f4a50f8018e6b593767b67307e3dd719 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/AttributeForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/AttributeForm.php @@ -6,12 +6,13 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Attribute\Edit; -use Magento\Backend\Test\Block\Widget\FormTabs; use Magento\Backend\Test\Block\Widget\Tab; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Backend\Test\Block\Widget\FormTabs; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Client\Element; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; /** * Catalog Product Attribute form. @@ -36,14 +37,14 @@ class AttributeForm extends FormTabs * Get data of the tabs. * * @param FixtureInterface $fixture - * @param Element $element + * @param SimpleElement $element * @return array * @throws \Exception * * @SuppressWarnings(PHPMD.UnusedLocalVariable) * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getData(FixtureInterface $fixture = null, Element $element = null) + public function getData(FixtureInterface $fixture = null, SimpleElement $element = null) { $this->waitForElementVisible($this->propertiesTab); $data = []; @@ -79,7 +80,7 @@ class AttributeForm extends FormTabs */ protected function expandAllToggles() { - $closedToggles = $this->_rootElement->find($this->closedToggle, Locator::SELECTOR_XPATH)->getElements(); + $closedToggles = $this->_rootElement->getElements($this->closedToggle, Locator::SELECTOR_XPATH); foreach ($closedToggles as $toggle) { $toggle->click(); } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/Options.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/Options.php index 231c6b08f9a63f7968476cf9403121682cc9de6c..3e5a6fd3355b4c3caac80329b35b5c8a3d309b83 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/Options.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/Options.php @@ -6,14 +6,14 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Attribute\Edit; +use Magento\Mtf\ObjectManager; +use Magento\Mtf\Client\Element\SimpleElement; use Magento\Catalog\Test\Block\Adminhtml\Product\Attribute\Edit\Tab\Options\Option; -use Mtf\Client\Driver\Selenium\Element; -use Mtf\ObjectManager; /** * Options element. */ -class Options extends Element +class Options extends SimpleElement { /** * 'Add Option' button. @@ -52,7 +52,7 @@ class Options extends Element public function getValue() { $data = []; - $options = $this->find($this->option)->getElements(); + $options = $this->getElements($this->option); foreach ($options as $option) { $data[] = $this->getFormInstance($option)->getData(); } @@ -62,10 +62,10 @@ class Options extends Element /** * Get options form. * - * @param Element|null $element + * @param SimpleElement|null $element * @return Option */ - protected function getFormInstance(Element $element = null) + protected function getFormInstance(SimpleElement $element = null) { return ObjectManager::getInstance()->create( 'Magento\Catalog\Test\Block\Adminhtml\Product\Attribute\Edit\Tab\Options\Option', diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php index ae4eb3a3987c63af5a3097bbed41e7f79a9ac55c..b1091273427d381a749fb588bb47b4dd7883cac8 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php @@ -7,7 +7,8 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Attribute\Edit\Tab; use Magento\Backend\Test\Block\Widget\Tab; -use Mtf\Client\Element; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Client\Element; /** * Class AdvancedPropertiesTab @@ -33,10 +34,10 @@ class Advanced extends Tab * Fill 'Advanced Attribute Properties' tab * * @param array $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return $this */ - public function fillFormTab(array $fields, Element $element = null) + public function fillFormTab(array $fields, SimpleElement $element = null) { if (!$this->_rootElement->find($this->propertiesTabActive)->isVisible()) { $this->_rootElement->find($this->propertiesTab)->click(); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/Tab/Options.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/Tab/Options.php index 861b320f6e23bd25e445d84b3d47567622b3f06e..37bf323fa12f4cc22f0262b576e4e489b1f17703 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/Tab/Options.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/Tab/Options.php @@ -7,7 +7,8 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Attribute\Edit\Tab; use Magento\Backend\Test\Block\Widget\Tab; -use Mtf\Client\Element; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Client\Element; /** * Class Options @@ -26,10 +27,10 @@ class Options extends Tab * Fill 'Options' tab * * @param array $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return $this */ - public function fillFormTab(array $fields, Element $element = null) + public function fillFormTab(array $fields, SimpleElement $element = null) { foreach ($fields['options']['value'] as $field) { $this->_rootElement->find($this->addOption)->click(); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/Tab/Options/Option.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/Tab/Options/Option.php index 6918f41b76766607fb2691c137cc971ef0f564db..062ac3c4a3562300724acecdc7c65aa5edcf6be1 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/Tab/Options/Option.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/Tab/Options/Option.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Attribute\Edit\Tab\Options; -use Mtf\Block\Form; +use Magento\Mtf\Block\Form; /** * Class Option diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Set/Main.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Set/Main.php index e819d78acfd3856404caff7b7b6ebc1654429d25..47a2e261ba15fd602141d4e20f9cc5d73b7bf695 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Set/Main.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Set/Main.php @@ -6,8 +6,8 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Attribute\Set; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Main @@ -123,7 +123,7 @@ class Main extends Block public function addAttributeSetGroup($groupName) { $this->_rootElement->find($this->addGroupButton)->click(); - $this->_rootElement->setAlertText($groupName); - $this->_rootElement->acceptAlert(); + $this->browser->setAlertText($groupName); + $this->browser->acceptAlert(); } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Set/Main/AttributeSetForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Set/Main/AttributeSetForm.php index 4d034090adf44803e7a309c84424cb0583916f8d..ef673d484b78d723f62eb95e8ffad9e11ea2ec10 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Set/Main/AttributeSetForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Set/Main/AttributeSetForm.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Attribute\Set\Main; -use Mtf\Block\Form as AbstractForm; +use Magento\Mtf\Block\Form as AbstractForm; /** * Class Form diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Set/Main/EditForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Set/Main/EditForm.php index 6f9dc7e7be315643ab9559afb01d8a7abb9db921..9dcc851e7f9e1f4c5a700026ee3c3f459f579cc1 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Set/Main/EditForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Set/Main/EditForm.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Attribute\Set\Main; -use Mtf\Block\Form as AbstractForm; +use Magento\Mtf\Block\Form as AbstractForm; /** * Class EditForm diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Composite/Configure.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Composite/Configure.php index b5b29452bb7c298c5e67eb5db87ad127202f6e52..bd6988a5afe234354f0b3148c6e93b277dc201d3 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Composite/Configure.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Composite/Configure.php @@ -7,12 +7,11 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Composite; -use Magento\Backend\Test\Block\Template; -use Magento\Catalog\Test\Block\AbstractConfigureBlock; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; use Magento\Catalog\Test\Fixture\CatalogProductSimple; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Catalog\Test\Block\AbstractConfigureBlock; /** * Class Configure diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Action/Attribute.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Action/Attribute.php index dc054d3f4fb803562a19bbb47514b7ff9eb4661b..d6943bf14db79c61c29156987c56e370ba945271 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Action/Attribute.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Action/Attribute.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Action; use Magento\Backend\Test\Block\Widget\Form; -use Mtf\Client\Element; +use Magento\Mtf\Client\Locator; /** * Product attribute massaction edit page. @@ -37,7 +37,7 @@ class Attribute extends Form { $this->_rootElement->find( $this->priceFieldEnablerSelector, - Element\Locator::SELECTOR_XPATH, + Locator::SELECTOR_XPATH, 'checkbox' )->setValue('Yes'); } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/AdvancedPricingTab.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/AdvancedPricingTab.php index 761c1c5de7500b0146a326a74a94e24899255c31..269e53dfcba0d2fda6391f9bd8c80aca4f27c676 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/AdvancedPricingTab.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/AdvancedPricingTab.php @@ -6,8 +6,7 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit; -use Magento\Backend\Test\Block\Widget\Tab; -use Mtf\Client\Element; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class AdvancedPricingTab @@ -29,10 +28,10 @@ class AdvancedPricingTab extends ProductTab * Fill 'Advanced price' product form on tab * * @param array $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return $this */ - public function fillFormTab(array $fields, Element $element = null) + public function fillFormTab(array $fields, SimpleElement $element = null) { $context = $element ? $element : $this->_rootElement; foreach ($fields as $fieldName => $field) { @@ -66,10 +65,10 @@ class AdvancedPricingTab extends ProductTab * Get data of tab * * @param array|null $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return array */ - public function getDataFormTab($fields = null, Element $element = null) + public function getDataFormTab($fields = null, SimpleElement $element = null) { $formData = []; foreach ($fields as $fieldName => $field) { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/AdvancedPricingTab/OptionGroup.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/AdvancedPricingTab/OptionGroup.php index 3cd38b1cb63a1fffe914bde54ddd16c875635508..36ea46aaff06384131663ff5e6557a5b928f25b3 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/AdvancedPricingTab/OptionGroup.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/AdvancedPricingTab/OptionGroup.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\AdvancedPricingTab; use Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\Options\AbstractOptions; -use Mtf\Client\Element; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class OptionField @@ -26,10 +26,10 @@ class OptionGroup extends AbstractOptions * Fill the form 'Extended price' * * @param array $fields - * @param Element $element + * @param SimpleElement $element * @return $this */ - public function fillOptions(array $fields, Element $element = null) + public function fillOptions(array $fields, SimpleElement $element = null) { $this->_rootElement->find($this->buttonFormLocator)->click(); return parent::fillOptions($fields, $element); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/AdvancedPricingTab/OptionTier.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/AdvancedPricingTab/OptionTier.php index 79eb22af2fda245b686a65655aa0f79942118b7d..7dc90c88899bb8f1318dd7141c257c1aafc6eef8 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/AdvancedPricingTab/OptionTier.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/AdvancedPricingTab/OptionTier.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\AdvancedPricingTab; use Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\Options\AbstractOptions; -use Mtf\Client\Element; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class OptionTier @@ -26,10 +26,10 @@ class OptionTier extends AbstractOptions * Fill product form 'Tier price' * * @param array $fields - * @param Element $element + * @param SimpleElement $element * @return $this */ - public function fillOptions(array $fields, Element $element = null) + public function fillOptions(array $fields, SimpleElement $element = null) { $this->_rootElement->find($this->buttonFormLocator)->click(); return parent::fillOptions($fields, $element); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/ProductTab.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/ProductTab.php index 08f7f5a71e648674a810207448fcf9a6b9824424..c7c48a1847c784ab2dc885b98fe3c3640c73549d 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/ProductTab.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/ProductTab.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; use Magento\Backend\Test\Block\Widget\Tab; use Magento\Catalog\Test\Block\Adminhtml\Product\Attribute\Edit; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/AbstractRelated.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/AbstractRelated.php index 33bd8e681b1cc819af446c4a18f89e2d79dff957..e23a8abf1adee5b88ad250c42ca60ff432c5a014 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/AbstractRelated.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/AbstractRelated.php @@ -6,9 +6,9 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab; -use Magento\Backend\Test\Block\Widget\Grid; use Magento\Backend\Test\Block\Widget\Tab; -use Mtf\Client\Element; +use Magento\Backend\Test\Block\Widget\Grid; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class AbstractRelated @@ -27,10 +27,10 @@ abstract class AbstractRelated extends Tab * Select related products * * @param array $data - * @param Element|null $element + * @param SimpleElement|null $element * @return $this */ - public function fillFormTab(array $data, Element $element = null) + public function fillFormTab(array $data, SimpleElement $element = null) { if (isset($data[$this->relatedType]['value'])) { $context = $element ? $element : $this->_rootElement; @@ -48,10 +48,10 @@ abstract class AbstractRelated extends Tab * Get data of tab * * @param array|null $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return array */ - public function getDataFormTab($fields = null, Element $element = null) + public function getDataFormTab($fields = null, SimpleElement $element = null) { $relatedBlock = $this->getRelatedGrid($element); $columns = [ @@ -67,8 +67,8 @@ abstract class AbstractRelated extends Tab /** * Return related products grid * - * @param Element $element + * @param SimpleElement $element * @return Grid */ - abstract protected function getRelatedGrid(Element $element = null); + abstract protected function getRelatedGrid(SimpleElement $element = null); } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php index 4a4374d1bed5b1e311c40582ad00808ac1030462..fac0fe3f9fb44bf1fbd89011621b72ab44530555 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php @@ -6,8 +6,8 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\Attributes; +use Magento\Mtf\Client\Element\SuggestElement; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; -use Mtf\Client\Driver\Selenium\Element\SuggestElement; /** * Class FormAttributeSearch @@ -72,6 +72,7 @@ class Search extends SuggestElement if ($this->find($this->searchResult)->getText() == $productAttribute->getFrontendLabel()) { return true; } + return false; } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Crosssell.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Crosssell.php index 552e58154ed5a112fa19b3e0083a17b676a48820..ea40e9576f8256f124eee3cd248ca9fc4285b766 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Crosssell.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Crosssell.php @@ -8,7 +8,7 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab; use Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\Crosssell\Grid as CrosssellGrid; -use Mtf\Client\Element; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class Crosssell @@ -33,10 +33,10 @@ class Crosssell extends AbstractRelated /** * Return cross sell products grid * - * @param Element|null $element [optional] + * @param SimpleElement|null $element [optional] * @return CrosssellGrid */ - protected function getRelatedGrid(Element $element = null) + protected function getRelatedGrid(SimpleElement $element = null) { $element = $element ? $element : $this->_rootElement; return $this->blockFactory->create( diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Options.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Options.php index e3c653e1cd3395bed4d9c4f7c9adaf35523e3123..e1782ef6ca1f6f2cb603e31f627a0c99c1096d8a 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Options.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Options.php @@ -7,9 +7,10 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab; use Magento\Backend\Test\Block\Widget\Tab; +use Magento\Mtf\Client\Element\SimpleElement; use Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\Options\Search\Grid; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\ObjectManager; +use Magento\Mtf\Client\Locator; /** * Class Options @@ -56,10 +57,10 @@ class Options extends Tab * Fill custom options form on tab * * @param array $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return $this */ - public function fillFormTab(array $fields, Element $element = null) + public function fillFormTab(array $fields, SimpleElement $element = null) { $fields = reset($fields); if (empty($fields['value']) || !is_array($fields['value'])) { @@ -136,10 +137,10 @@ class Options extends Tab * Get data of tab * * @param array|null $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return array */ - public function getDataFormTab($fields = null, Element $element = null) + public function getDataFormTab($fields = null, SimpleElement $element = null) { $fields = reset($fields); $formData = []; @@ -196,6 +197,7 @@ class Options extends Tab $importOptions = $options['import']['options']; $options = array_merge($options, $importOptions); unset($options['import']); + return $options; } @@ -211,6 +213,7 @@ class Options extends Tab if ($end = strpos($str, '-')) { $str = substr($str, 0, $end) . ucfirst(substr($str, ($end + 1))); } + return $str; } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Options/AbstractOptions.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Options/AbstractOptions.php index a503837d1199c87956098006acf8e1ba49bc711c..55af1526e62097c49f674318e3ee8f5872998e6b 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Options/AbstractOptions.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Options/AbstractOptions.php @@ -6,8 +6,8 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\Options; +use Magento\Mtf\Client\Element\SimpleElement; use Magento\Backend\Test\Block\Widget\Tab; -use Mtf\Client\Element; /** * Abstract class AbstractOptions @@ -19,14 +19,15 @@ abstract class AbstractOptions extends Tab * Fills in the form of an array of input data * * @param array $fields - * @param Element $element + * @param SimpleElement $element * @return $this */ - public function fillOptions(array $fields, Element $element = null) + public function fillOptions(array $fields, SimpleElement $element = null) { $element = $element === null ? $this->_rootElement : $element; $mapping = $this->dataMapping($fields); $this->_fill($mapping, $element); + return $this; } @@ -34,13 +35,14 @@ abstract class AbstractOptions extends Tab * Getting options data form on the product form * * @param array $fields - * @param Element $element + * @param SimpleElement $element * @return $this */ - public function getDataOptions(array $fields = null, Element $element = null) + public function getDataOptions(array $fields = null, SimpleElement $element = null) { $element = $element === null ? $this->_rootElement : $element; $mapping = $this->dataMapping($fields); + return $this->_getData($mapping, $element); } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Options/Type/DropDown.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Options/Type/DropDown.php index 637636979a89ec82885b3548efb84bb2416196bd..bf958e52b0adddc21e48a03be9a69ba826d100ad 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Options/Type/DropDown.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Options/Type/DropDown.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\Options\Type; use Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\Options\AbstractOptions; -use Mtf\Client\Element; +use Magento\Mtf\Client\Element\SimpleElement; /** * Form "Option dropdown" on tab product "Custom options". @@ -32,13 +32,14 @@ class DropDown extends AbstractOptions * Fill the form. * * @param array $fields - * @param Element $element + * @param SimpleElement $element * @return $this */ - public function fillOptions(array $fields, Element $element = null) + public function fillOptions(array $fields, SimpleElement $element = null) { $this->_rootElement->find($this->optionTitle)->click(); $this->_rootElement->find($this->buttonAddLocator)->click(); + return parent::fillOptions($fields, $element); } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails.php index 6d4db31a1b2ee834a5dbc2def0e245522a23c9ac..546719a20d45924939f41db8bad0bbd905687219 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails.php @@ -6,8 +6,8 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Client\Locator; /** * Product details tab. @@ -32,10 +32,10 @@ class ProductDetails extends \Magento\Catalog\Test\Block\Adminhtml\Product\Edit\ * Fill data to fields on tab. * * @param array $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return $this */ - public function fillFormTab(array $fields, Element $element = null) + public function fillFormTab(array $fields, SimpleElement $element = null) { $data = $this->dataMapping($fields); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/AttributeSet.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/AttributeSet.php index 651739618a84d8ddaa3611b5719d539f5642e244..56d6b46ed629a7a40590f3b57171d3e496ee9fc4 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/AttributeSet.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/AttributeSet.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\ProductDetails; -use Mtf\Client\Driver\Selenium\Element\SuggestElement; +use Magento\Mtf\Client\Element\SuggestElement; /** * Class AttributeSet diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/CategoryIds.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/CategoryIds.php index 2cc41dd5bec986eadecf891217d45abb3ff05540..0e45e4c6cdd835a113375903f9199f56ad20d089 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/CategoryIds.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/CategoryIds.php @@ -6,8 +6,8 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\ProductDetails; -use Mtf\Client\Driver\Selenium\Element\MultisuggestElement; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\MultisuggestElement; /** * Typified element class for category element. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/ProductOnlineSwitcher.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/ProductOnlineSwitcher.php index 60b84be3c1245442ba952d4ef97a0c45a2cad13b..55f800b3f67b7f2b0ffc2c1bf73c999ddfb85009 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/ProductOnlineSwitcher.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/ProductOnlineSwitcher.php @@ -6,14 +6,14 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\ProductDetails; -use Mtf\Client\Driver\Selenium\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class ProductOnlineSwitcher * Typified element class for product status element */ -class ProductOnlineSwitcher extends Element +class ProductOnlineSwitcher extends SimpleElement { /** * CSS locator button status of the product diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Related.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Related.php index 93fb6f594f2fdaa159c91ab4c86084592078fde2..78298efb56abf89f5d919398e1b22afcad7aceb8 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Related.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Related.php @@ -8,7 +8,7 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab; use Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\Related\Grid as RelatedGrid; -use Mtf\Client\Element; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class Related @@ -33,12 +33,13 @@ class Related extends AbstractRelated /** * Return related products grid * - * @param Element|null $element [optional] + * @param SimpleElement|null $element [optional] * @return RelatedGrid */ - protected function getRelatedGrid(Element $element = null) + protected function getRelatedGrid(SimpleElement $element = null) { $element = $element ? $element : $this->_rootElement; + return $this->blockFactory->create( '\Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\Related\Grid', ['element' => $element->find($this->relatedGrid)] diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Upsell.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Upsell.php index 010c5bd3020c1cfde77a242f263c07525a813e53..f3d4ff8f8bc97232d85a14d58afb29a3e2ffd568 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Upsell.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Upsell.php @@ -8,7 +8,7 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab; use Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\Upsell\Grid as UpsellGrid; -use Mtf\Client\Element; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class Upsell @@ -33,12 +33,13 @@ class Upsell extends AbstractRelated /** * Return related products grid * - * @param Element|null $element [optional] + * @param SimpleElement|null $element [optional] * @return UpsellGrid */ - protected function getRelatedGrid(Element $element = null) + protected function getRelatedGrid(SimpleElement $element = null) { $element = $element ? $element : $this->_rootElement; + return $this->blockFactory->create( '\Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\Upsell\Grid', ['element' => $element->find($this->crossSellGrid)] diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Websites/StoreTree.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Websites/StoreTree.php index cf1ddaee1ee32016c41d31edfabe96b28304bcb4..f9b1f1a92be20b77040dc52b07c872a23f1bb045 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Websites/StoreTree.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Websites/StoreTree.php @@ -6,14 +6,14 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\Websites; -use Mtf\Client\Driver\Selenium\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class StoreTree * Typified element class for store tree element */ -class StoreTree extends Element +class StoreTree extends SimpleElement { /** * Selector for website checkbox diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/FormPageActions.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/FormPageActions.php index fd99b998c340f4282f55e6b586dbf98ade4c09f9..9778f9a4b34a57e9725ae66b6516f0e1385889d3 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/FormPageActions.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/FormPageActions.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product; use Magento\Backend\Test\Block\FormPageActions as ParentFormPageActions; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class FormAction diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/GridPageAction.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/GridPageAction.php index 47526b696ca0bfb289a964cc0976b04b0b193aad..bafda38e5f53d11d5af355b7878e512e3f2a01dc 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/GridPageAction.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/GridPageAction.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product; use Magento\Backend\Test\Block\GridPageActions as ParentGridPageActions; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class GridPageAction diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.php index b582f3526f3c9ecf83548197e23b4f503d0ff8f3..51df922610d9164ae09c3f6faa155096b886d99d 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.php @@ -10,14 +10,15 @@ use Magento\Backend\Test\Block\Widget\FormTabs; use Magento\Backend\Test\Block\Widget\Tab; use Magento\Catalog\Test\Block\Adminhtml\Product\Attribute\AttributeForm; use Magento\Catalog\Test\Block\Adminhtml\Product\Attribute\CustomAttribute; -use Magento\Catalog\Test\Block\Adminhtml\Product\Edit\ProductTab; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Catalog\Test\Block\Adminhtml\Product\Edit\ProductTab; use Magento\Catalog\Test\Fixture\Product; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\DataFixture; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\Element; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\DataFixture; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; /** * Product form on backend product page. @@ -126,13 +127,13 @@ class ProductForm extends FormTabs * Fill the product form. * * @param FixtureInterface $product - * @param Element|null $element [optional] + * @param SimpleElement|null $element [optional] * @param FixtureInterface|null $category [optional] * @return FormTabs * * @SuppressWarnings(PHPMD.NPathComplexity) */ - public function fill(FixtureInterface $product, Element $element = null, FixtureInterface $category = null) + public function fill(FixtureInterface $product, SimpleElement $element = null, FixtureInterface $category = null) { $dataConfig = $product->getDataConfig(); $typeId = isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null; @@ -182,7 +183,6 @@ class ProductForm extends FormTabs $tab = $this->openTab($tabName); $tab->addNewAttribute($tabName); $this->fillAttributeForm($attribute); - $this->reinitRootElement(); } } @@ -190,12 +190,13 @@ class ProductForm extends FormTabs * Get data of the tabs. * * @param FixtureInterface|null $fixture - * @param Element|null $element + * @param SimpleElement|null $element * @return array */ - public function getData(FixtureInterface $fixture = null, Element $element = null) + public function getData(FixtureInterface $fixture = null, SimpleElement $element = null) { $this->showAdvancedSettings(); + return parent::getData($fixture, $element); } @@ -328,6 +329,7 @@ class ProductForm extends FormTabs $tabName = strtolower($tabName); $selector = sprintf($this->customTab, $tabName); $this->waitForElementVisible($selector, Locator::SELECTOR_XPATH); + return $this->_rootElement->find($selector, Locator::SELECTOR_XPATH)->isVisible(); } @@ -363,6 +365,7 @@ class ProductForm extends FormTabs $data[$tabName] = $errors; } } + return $data; } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Category/ProductPagination.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Category/ProductPagination.php index ae9a508fb562a22cffa7674f11d494b26da80f86..7051e8d5372ead5dab04b364e523d1be32e12655 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Category/ProductPagination.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Category/ProductPagination.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Block\Category; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Class ProductPagination @@ -26,7 +26,7 @@ class ProductPagination extends Block /** * Getting the active element to go to the next page * - * @return \Mtf\Client\Element|null + * @return \Magento\Mtf\Client\Element|null */ public function getNextPage() { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Category/View.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Category/View.php index e49e273cb7302b9749cf591aa24244ac1f07a6bb..b8c85e290dd14f129545de8f05f50bd98352f79d 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Category/View.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Category/View.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Block\Category; use Magento\Widget\Test\Fixture\Widget; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class View @@ -66,8 +66,7 @@ class View extends Block { $products = []; $this->waitForElementVisible($this->recentlyViewedProducts, Locator::SELECTOR_XPATH); - $productNames = $this->_rootElement->find($this->recentlyViewedProducts, Locator::SELECTOR_XPATH) - ->getElements(); + $productNames = $this->_rootElement->getElements($this->recentlyViewedProducts, Locator::SELECTOR_XPATH); foreach ($productNames as $productName) { $products[] = $productName->getText(); } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Additional.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Additional.php index 7cdcada069665e9aa94daeaaaf9ee83d9e87ac3e..fdfbc654c12bbc94ebfd21df16c4b71c332fbf9d 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Additional.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Additional.php @@ -6,10 +6,11 @@ namespace Magento\Catalog\Test\Block\Product; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; -use Mtf\Block\Block; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Client\Element; /** * Product additional information block on the product page. @@ -33,18 +34,19 @@ class Additional extends Block /** * Get product attributes. * - * @return Element[] + * @return SimpleElement[] */ protected function getProductAttributes() { $data = []; - $elements = $this->_rootElement->find($this->attributeSelector, Locator::SELECTOR_XPATH)->getElements(); + $elements = $this->_rootElement->getElements($this->attributeSelector, Locator::SELECTOR_XPATH); foreach ($elements as $element) { $data[$element->getText()] = $this->_rootElement->find( $this->attributeSelector . $this->attributeValueSelector, Locator::SELECTOR_XPATH ); } + return $data; } @@ -67,11 +69,11 @@ class Additional extends Block /** * Find <tag1><tag2><tagN> ... </tagN></tag2></tag1> tag structure in element. * - * @param Element $element + * @param SimpleElement $element * @param string $selector - * @return Element + * @return SimpleElement */ - protected function checkHtmlTagStructure(Element $element, $selector) + protected function checkHtmlTagStructure(SimpleElement $element, $selector) { return $element->find($selector); } @@ -105,6 +107,7 @@ class Additional extends Block for ($index = 0; $index < $middleElement; $index++) { $selector .= $htmlData[$index]['tag'] . " "; } + return trim($selector); } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Compare/ListCompare.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Compare/ListCompare.php index 768edce417884a0dd1ec159f019b0cb66c85457c..22c7b8213d29da77df1d519a31ef2cf599554d05 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Compare/ListCompare.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Compare/ListCompare.php @@ -6,9 +6,10 @@ namespace Magento\Catalog\Test\Block\Product\Compare; -use Mtf\Block\Block; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Catalog\Test\Fixture\CatalogProductAttribute; +use Magento\Mtf\Client\Element\SimpleElement; /** * Compare list product block. @@ -116,7 +117,7 @@ class ListCompare extends Block * Get item compare product info. * * @param int $index - * @return Element + * @return SimpleElement */ protected function getCompareProductInfo($index) { @@ -139,7 +140,7 @@ class ListCompare extends Block ); $data = []; - $attributes = $this->_rootElement->find($this->attribute)->getElements(); + $attributes = $this->_rootElement->getElements($this->attribute); foreach ($attributes as $attribute) { $data[] = $attribute->getText(); } @@ -150,7 +151,7 @@ class ListCompare extends Block * Get item compare product attribute. * * @param string $key - * @return Element + * @return SimpleElement */ public function getCompareProductAttribute($key) { @@ -207,7 +208,6 @@ class ListCompare extends Block while ($this->isProductVisible()) { $this->removeProduct(); $messageBlock->waitSuccessMessage(); - $this->reinitRootElement(); } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Compare/Sidebar.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Compare/Sidebar.php index 6c6cc28808b42838de04a81ada3d6df2c89e6046..89d6ffe88b1ca4965507e43312608fc161f1c524 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Compare/Sidebar.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Compare/Sidebar.php @@ -6,8 +6,6 @@ namespace Magento\Catalog\Test\Block\Product\Compare; -use Mtf\Client\Element; - /** * Compare product block on cms page. */ @@ -51,7 +49,7 @@ class Sidebar extends ListCompare return $rootElement->find($selector)->isVisible() ? true : null; } ); - $elements = $this->_rootElement->find($this->productName)->getElements(); + $elements = $this->_rootElement->getElements($this->productName); foreach ($elements as $element) { $result[] = $element->getText(); } @@ -74,6 +72,6 @@ class Sidebar extends ListCompare public function clickClearAll() { $this->_rootElement->find($this->clearAll)->click(); - $this->_rootElement->acceptAlert(); + $this->browser->acceptAlert(); } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts.php index 4ac1574f4ef2df7ab256d03d0b68c6b4c4d065b2..59f48c60913a61f1803a35c706cead61b7272668 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts.php @@ -7,9 +7,10 @@ namespace Magento\Catalog\Test\Block\Product\Grouped; use Magento\Backend\Test\Block\Widget\Tab; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Factory\Factory; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Client\Element; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Factory\Factory; /** * Class AssociatedProducts @@ -20,7 +21,7 @@ class AssociatedProducts extends Tab /** * 'Create New Option' button * - * @var Element + * @var SimpleElement */ protected $addNewOption = '#grouped-product-container>button'; @@ -53,10 +54,10 @@ class AssociatedProducts extends Tab /** * Get associated products list block * - * @param Element $context + * @param SimpleElement $context * @return \Magento\Catalog\Test\Block\Product\Grouped\AssociatedProducts\ListAssociatedProducts */ - protected function getListAssociatedProductsBlock(Element $context = null) + protected function getListAssociatedProductsBlock(SimpleElement $context = null) { $element = $context ?: $this->_rootElement; @@ -69,10 +70,10 @@ class AssociatedProducts extends Tab * Fill data to fields on tab * * @param array $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return $this */ - public function fillFormTab(array $fields, Element $element = null) + public function fillFormTab(array $fields, SimpleElement $element = null) { if (isset($fields['grouped_products'])) { foreach ($fields['grouped_products']['value'] as $groupedProduct) { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts/ListAssociatedProducts.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts/ListAssociatedProducts.php index c99c9348ce3e2968ff4536b977337b32f6c487af..51fba6b4440a121a27ba5281175a4d52c99fb689 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts/ListAssociatedProducts.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts/ListAssociatedProducts.php @@ -6,10 +6,10 @@ namespace Magento\Catalog\Test\Block\Product\Grouped\AssociatedProducts; -use Mtf\Block\Block; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Factory\Factory; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Factory\Factory; /** * Class ListAssociatedProducts @@ -21,10 +21,10 @@ class ListAssociatedProducts extends Block * Getting block products * * @param string $productId - * @param Element $context + * @param SimpleElement $context * @return ListAssociatedProducts\Product */ - private function getProductBlock($productId, Element $context = null) + private function getProductBlock($productId, SimpleElement $context = null) { $element = $context ?: $this->_rootElement; return Factory::getBlockFactory() @@ -40,9 +40,9 @@ class ListAssociatedProducts extends Block * Filling options products * * @param array $data - * @param Element $element + * @param SimpleElement $element */ - public function fillProductOptions(array $data, Element $element = null) + public function fillProductOptions(array $data, SimpleElement $element = null) { $productBlock = $this->getProductBlock($data['product_id']['value'], $element); $productBlock->fillQty($data['selection_qty']['value']); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts/ListAssociatedProducts/Product.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts/ListAssociatedProducts/Product.php index 7b1fadb9301234b426eeeba68d0a548a37340cef..80f0b1d6b8bd94d816c9d0cf676a96421a4ea339 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts/ListAssociatedProducts/Product.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts/ListAssociatedProducts/Product.php @@ -6,8 +6,11 @@ namespace Magento\Catalog\Test\Block\Product\Grouped\AssociatedProducts\ListAssociatedProducts; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; +/** + * Class Product + */ class Product extends Block { /** diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts/Search/Grid.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts/Search/Grid.php index f04e5fefeb8c1ddcb89779c784846111e978dbf7..e8dc06003db01756a30cd7a4be1c7565e0be7557 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts/Search/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Grouped/AssociatedProducts/Search/Grid.php @@ -10,7 +10,6 @@ use Magento\Backend\Test\Block\Widget\Grid as GridInterface; /** * Class Grid - * */ class Grid extends GridInterface { @@ -37,6 +36,8 @@ class Grid extends GridInterface /** * Initialize block elements + * + * @return void */ protected function _init() { @@ -46,6 +47,8 @@ class Grid extends GridInterface /** * Press 'Add Selected Products' button + * + * @return void */ public function addProducts() { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ListProduct.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ListProduct.php index d027c9ae4294ce7cf02b78cf24fb858a8098d2d0..4415fec2ac069e006b5cf47e8e3f4b27bc2a4319 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ListProduct.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ListProduct.php @@ -6,10 +6,10 @@ namespace Magento\Catalog\Test\Block\Product; -use Mtf\Block\Block; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Factory\Factory; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Factory\Factory; /** * Product list. @@ -135,7 +135,7 @@ class ListProduct extends Block * This method returns the element representing the product details for the named product. * * @param string $productName String containing the name of the product - * @return Element + * @return SimpleElement */ protected function getProductDetailsElement($productName) { @@ -149,7 +149,7 @@ class ListProduct extends Block * This method returns the element on the page associated with the product name. * * @param string $productName String containing the name of the product - * @return Element + * @return SimpleElement */ protected function getProductNameElement($productName) { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Price.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Price.php index 51d590c9d8c4d9fca190c4dc59f963771dee95ef..52d04a0e4e82a7417462061c32c4793d58e146d8 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Price.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Price.php @@ -5,9 +5,9 @@ */ namespace Magento\Catalog\Test\Block\Product; -use Mtf\Block\Block; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class Price @@ -267,7 +267,7 @@ class Price extends Block * Get specify type price element * * @param string $type - * @return Element + * @return SimpleElement */ protected function getTypePriceElement($type) { @@ -294,21 +294,23 @@ class Price extends Block * Get price excluding tax * * @param string $currency - * @return string + * @return string|null */ public function getPriceExcludingTax($currency = '$') { - return trim($this->_rootElement->find($this->priceExcludingTax)->getText(), $currency); + $priceElement = $this->_rootElement->find($this->priceExcludingTax); + return $priceElement->isVisible() ? trim($priceElement->getText(), $currency) : null; } /** * Get price including tax * * @param string $currency - * @return string + * @return string|null */ public function getPriceIncludingTax($currency = '$') { - return trim($this->_rootElement->find($this->priceIncludingTax)->getText(), $currency); + $priceElement = $this->_rootElement->find($this->priceIncludingTax); + return $priceElement->isVisible() ? trim($priceElement->getText(), $currency) : null; } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/BottomToolbar.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/BottomToolbar.php index e5866a521d3356714806fd22fc39a443488829bd..7bbe9c2d7613cc7dd708a84262dad9f058a8fc64 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/BottomToolbar.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/BottomToolbar.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Block\Product\ProductList; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Class BottomToolbar diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/Crosssell.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/Crosssell.php index 6c4bf4c8f62043485b138876159870983a64c31d..9b5d42d49b9130569596ad016c0d2eb7b754c469 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/Crosssell.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/Crosssell.php @@ -6,11 +6,11 @@ namespace Magento\Catalog\Test\Block\Product\ProductList; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\Element\SimpleElement; use Magento\Catalog\Test\Fixture\Product; -use Mtf\Block\Block; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; /** * Class Crosssell @@ -41,7 +41,7 @@ class Crosssell extends Block * Click on cross-sell product link * * @param Product $product - * @return Element + * @return SimpleElement */ public function clickLink($product) { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/Related.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/Related.php index 6d36de4de97a02a41a281c174f2de7c8b1f33fa9..dd65782e9f253ada489329075282f5ce4f76d7a2 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/Related.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/Related.php @@ -6,9 +6,9 @@ namespace Magento\Catalog\Test\Block\Product\ProductList; -use Mtf\Block\Block; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class Related @@ -73,7 +73,7 @@ class Related extends Block * Get related product element * * @param string $productName - * @return Element + * @return SimpleElement */ private function getProductElement($productName) { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/TopToolbar.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/TopToolbar.php index 4090f15dc3637c48c75d7489f3734eb8f1509bbe..7f53f190bd41710fa6988f628f35227df4c760b6 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/TopToolbar.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/TopToolbar.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Block\Product\ProductList; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Class TopToolbar diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/Upsell.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/Upsell.php index e789535fa0428b2551a299ff77913faa2ea9a86e..ce1ee095156a918fd8fbd2d0e077045fc254aba9 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/Upsell.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/Upsell.php @@ -6,9 +6,9 @@ namespace Magento\Catalog\Test\Block\Product\ProductList; -use Mtf\Block\Block; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class Upsell @@ -48,7 +48,7 @@ class Upsell extends Block * Get a the product * * @param string $productName - * @return Element + * @return SimpleElement */ private function getProductElement($productName) { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View.php index 20da95313d9949902d58e7e176d3c75f2856a623..b658bb823cdfd53903156b7a9aa8580d49ece99e 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View.php @@ -8,9 +8,9 @@ namespace Magento\Catalog\Test\Block\Product; use Magento\Catalog\Test\Block\AbstractConfigureBlock; use Magento\Catalog\Test\Fixture\CatalogProductSimple; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; /** * Product view block on the product page. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View/CustomOptions.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View/CustomOptions.php index 67b43503f752ae135f800c96e215197a039ffb6f..ea07ff104aafa1ea93f96eb3a7b1e0b79f84b35b 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View/CustomOptions.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View/CustomOptions.php @@ -6,11 +6,11 @@ namespace Magento\Catalog\Test\Block\Product\View; -use Mtf\Block\Form; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class CustomOptions @@ -136,7 +136,7 @@ class CustomOptions extends Form throw new \Exception("Can't find option: \"{$title}\""); } - /** @var Element $optionElement */ + /** @var SimpleElement $optionElement */ $optionElement = $listCustomOptions[$title]; $typeMethod = preg_replace('/[^a-zA-Z]/', '', $option['type']); $getTypeData = 'get' . ucfirst(strtolower($typeMethod)) . 'Data'; @@ -178,10 +178,10 @@ class CustomOptions extends Form /** * Get data of "Field" custom option * - * @param Element $option + * @param SimpleElement $option * @return array */ - protected function getFieldData(Element $option) + protected function getFieldData(SimpleElement $option) { $price = $this->getOptionPriceNotice($option); $maxCharacters = $option->find($this->maxCharacters, Locator::SELECTOR_XPATH); @@ -199,10 +199,10 @@ class CustomOptions extends Form /** * Get data of "Area" custom option * - * @param Element $option + * @param SimpleElement $option * @return array */ - protected function getAreaData(Element $option) + protected function getAreaData(SimpleElement $option) { return $this->getFieldData($option); } @@ -210,10 +210,10 @@ class CustomOptions extends Form /** * Get data of "File" custom option * - * @param Element $option + * @param SimpleElement $option * @return array */ - protected function getFileData(Element $option) + protected function getFileData(SimpleElement $option) { $price = $this->getOptionPriceNotice($option); @@ -232,10 +232,10 @@ class CustomOptions extends Form /** * Get data of "Drop-down" custom option * - * @param Element $option + * @param SimpleElement $option * @return array */ - protected function getDropdownData(Element $option) + protected function getDropdownData(SimpleElement $option) { $select = $option->find($this->selectOption, Locator::SELECTOR_XPATH, 'select'); // Skip "Choose option ..."(option #1) @@ -245,10 +245,10 @@ class CustomOptions extends Form /** * Get data of "Multiple Select" custom option * - * @param Element $option + * @param SimpleElement $option * @return array */ - protected function getMultipleSelectData(Element $option) + protected function getMultipleSelectData(SimpleElement $option) { $multiselect = $option->find($this->selectOption, Locator::SELECTOR_XPATH, 'multiselect'); return $this->getSelectOptionsData($multiselect, 1); @@ -257,14 +257,15 @@ class CustomOptions extends Form /** * Get data of "Radio Buttons" custom option * - * @param Element $option + * @param SimpleElement $option * @return array */ - protected function getRadioButtonsData(Element $option) + protected function getRadioButtonsData(SimpleElement $option) { $listOptions = []; $count = 1; + /** @var SimpleElement $option */ $option = $option->find(sprintf($this->optionLabel, $count), Locator::SELECTOR_XPATH); while ($option->isVisible()) { $listOptions[] = $this->parseOptionText($option->getText()); @@ -280,10 +281,10 @@ class CustomOptions extends Form /** * Get data of "Checkbox" custom option * - * @param Element $option + * @param SimpleElement $option * @return array */ - protected function getCheckboxData(Element $option) + protected function getCheckboxData(SimpleElement $option) { return $this->getRadioButtonsData($option); } @@ -291,10 +292,10 @@ class CustomOptions extends Form /** * Get data of "Date" custom option * - * @param Element $option + * @param SimpleElement $option * @return array */ - protected function getDateData(Element $option) + protected function getDateData(SimpleElement $option) { $price = $this->getOptionPriceNotice($option); @@ -310,10 +311,10 @@ class CustomOptions extends Form /** * Get data of "Date & Time" custom option * - * @param Element $option + * @param SimpleElement $option * @return array */ - protected function getDateTimeData(Element $option) + protected function getDateTimeData(SimpleElement $option) { return $this->getDateData($option); } @@ -321,10 +322,10 @@ class CustomOptions extends Form /** * Get data of "Time" custom option * - * @param Element $option + * @param SimpleElement $option * @return array */ - protected function getTimeData(Element $option) + protected function getTimeData(SimpleElement $option) { return $this->getDateData($option); } @@ -332,11 +333,11 @@ class CustomOptions extends Form /** * Get data from option of select and multiselect * - * @param Element $element + * @param SimpleElement $element * @param int $firstOption * @return array */ - protected function getSelectOptionsData(Element $element, $firstOption = 1) + protected function getSelectOptionsData(SimpleElement $element, $firstOption = 1) { $listOptions = []; @@ -356,10 +357,10 @@ class CustomOptions extends Form /** * Get price from price-notice of custom option * - * @param Element $option + * @param SimpleElement $option * @return array */ - protected function getOptionPriceNotice(Element $option) + protected function getOptionPriceNotice(SimpleElement $option) { $priceNotice = $option->find($this->priceNotice, Locator::SELECTOR_XPATH); if (!$priceNotice->isVisible()) { @@ -371,11 +372,11 @@ class CustomOptions extends Form /** * Get notice of option by number * - * @param Element $option + * @param SimpleElement $option * @param int $number * @return mixed */ - protected function getOptionNotice(Element $option, $number) + protected function getOptionNotice(SimpleElement $option, $number) { $note = $option->find(sprintf($this->noteByNumber, $number), Locator::SELECTOR_XPATH); return $note->isVisible() ? $note->getText() : null; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Search.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Search.php index c66390c667a0aea80c3f0db60d7a36a9f0391008..2257512b72f9ea91dba1592cd19a6248fc37801e 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Search.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Search.php @@ -6,8 +6,8 @@ namespace Magento\Catalog\Test\Block; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Search diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAbsenceDeleteAttributeButton.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAbsenceDeleteAttributeButton.php index 4174cb6d23eec32def16c6c84debca60990744a4..3c017e29dabb46fdcf629f3279483a9c49fd1bd2 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAbsenceDeleteAttributeButton.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAbsenceDeleteAttributeButton.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeNew; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertAbsenceDeleteAttributeButton diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddToCartButtonAbsent.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddToCartButtonAbsent.php index 71992451111a951d9d1d62e70788a74e996ac217..4aad21571bd7d4b45d3e40c4b4bffc1fa2cf0b5c 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddToCartButtonAbsent.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddToCartButtonAbsent.php @@ -10,7 +10,7 @@ use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Category\CatalogCategoryView; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertAddToCartButtonAbsent diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddToCartButtonPresent.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddToCartButtonPresent.php index 470580cddbf0d69429fd9aec40fe11190eacc76d..b779f7a8eaaee717b523a6e35f19e2546f7cf881 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddToCartButtonPresent.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddToCartButtonPresent.php @@ -10,7 +10,7 @@ use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Category\CatalogCategoryView; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertAddToCartButtonPresent diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddedProductAttributeOnProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddedProductAttributeOnProductForm.php index 2fa65b17147572e20afeb07d766c34f5ec0aef58..a5ffd6438ac26a03e795ad3881931b492f8d435f 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddedProductAttributeOnProductForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddedProductAttributeOnProductForm.php @@ -8,12 +8,12 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogAttributeSet; use Magento\Catalog\Test\Fixture\CatalogProductSimple; -use Mtf\Fixture\InjectableFixture; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Constraint\AbstractConstraint; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; -use Mtf\ObjectManager; +use Magento\Mtf\ObjectManager; /** * Check attribute on product form. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeForm.php index f6bf41059077ce17bb33c89318cd9238d0da5bfa..d559f1386cdeb188c49f502c482c8e6e50828d7a 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeForm.php @@ -9,7 +9,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeNew; -use Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Constraint\AbstractAssertForm; /** * Assert that displayed attribute data on edit page equals passed from fixture. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeOptionsOnProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeOptionsOnProductForm.php index 7ce9ed37e4622fb772f0d0508e1df21679e26dbf..5d8898934c1a2738ada381c0baa9f6478993b17b 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeOptionsOnProductForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeOptionsOnProductForm.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Constraint; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertAttributeOptionsOnProductForm diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSearchableByLabel.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSearchableByLabel.php index 0497a34073664f5fd56877701dcd60945e50d8b9..f79f14a6689162ce1aa3b36d50ffa1b5ac0eb200 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSearchableByLabel.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSearchableByLabel.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Constraint; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertAttributeSearchableByLabel diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryAbsenceOnBackend.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryAbsenceOnBackend.php index 3668858b2a9f34d2cfcaf0fe00f874aea35accfa..16be1cbf6e00c53f64ec2c4708ea64dde2c2bbbe 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryAbsenceOnBackend.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryAbsenceOnBackend.php @@ -8,7 +8,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Page\Adminhtml\CatalogCategoryIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCategoryAbsenceOnBackend diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryAbsenceOnFrontend.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryAbsenceOnFrontend.php index e7786799d6625aa8a4f4441e8a71ff2070774fe1..f4c2b6530a788f6bbed326bdf08b199f0ebb1847 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryAbsenceOnFrontend.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryAbsenceOnFrontend.php @@ -8,8 +8,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Page\Category\CatalogCategoryView; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCategoryAbsenceOnFrontend @@ -29,13 +29,16 @@ class AssertCategoryAbsenceOnFrontend extends AbstractConstraint /** * Assert that not displayed category in frontend main menu * - * @param Browser $browser + * @param BrowserInterface $browser * @param CatalogCategoryView $categoryView * @param Category $category * @return void */ - public function processAssert(Browser $browser, CatalogCategoryView $categoryView, Category $category) - { + public function processAssert( + BrowserInterface $browser, + CatalogCategoryView $categoryView, + Category $category + ) { $browser->open($_ENV['app_frontend_url'] . $category->getUrlKey() . '.html'); \PHPUnit_Framework_Assert::assertEquals( self::NOT_FOUND_MESSAGE, diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryForAssignedProducts.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryForAssignedProducts.php index c1a7fea183a6aaa992006265ff6c61d701779fb2..f81d4b389d29c8b3134c06bd14d05a11e5e53064 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryForAssignedProducts.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryForAssignedProducts.php @@ -8,8 +8,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Page\Category\CatalogCategoryView; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCategoryForAssignedProducts @@ -26,14 +26,18 @@ class AssertCategoryForAssignedProducts extends AbstractConstraint * * @param Category $category * @param CatalogCategoryView $categoryView - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ - public function processAssert(Category $category, CatalogCategoryView $categoryView, Browser $browser) - { + public function processAssert( + Category $category, + CatalogCategoryView $categoryView, + BrowserInterface $browser + ) { $categoryUrlKey = $category->hasData('url_key') ? strtolower($category->getUrlKey()) : trim(strtolower(preg_replace('#[^0-9a-z%]+#i', '-', $category->getName())), '-'); + $products = $category->getDataFieldConfig('category_products')['source']->getProducts(); $browser->open($_ENV['app_frontend_url'] . $categoryUrlKey . '.html'); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryForm.php index c0bf8c3bb07c7af0f353c2cff5bc06983fded2f8..06d7ce4fe0af9a7e130f0b0678d150d059657ae4 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryForm.php @@ -9,7 +9,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Page\Adminhtml\CatalogCategoryEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogCategoryIndex; -use Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Constraint\AbstractAssertForm; /** * Assert that displayed category data on edit page equals passed from fixture. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryIsNotActive.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryIsNotActive.php index e7a3b603354246e9285b772f9f9c04d1bdbd548e..b83d2fd8599096f58a466fbd350e67eae246d20f 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryIsNotActive.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryIsNotActive.php @@ -8,8 +8,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\Category; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCategoryIsNotActive @@ -28,10 +28,10 @@ class AssertCategoryIsNotActive extends AbstractConstraint * * @param CmsIndex $cmsIndex * @param Category $category - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ - public function processAssert(CmsIndex $cmsIndex, Category $category, Browser $browser) + public function processAssert(CmsIndex $cmsIndex, Category $category, BrowserInterface $browser) { $cmsIndex->open(); \PHPUnit_Framework_Assert::assertFalse( diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryIsNotIncludeInMenu.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryIsNotIncludeInMenu.php index a4738147eae13e074a6e6af1af0e1252c9e2d0dd..07b23794984b7c3851b2c1d10fcb5cfb97085a6f 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryIsNotIncludeInMenu.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryIsNotIncludeInMenu.php @@ -9,8 +9,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Page\Category\CatalogCategoryView; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCategoryIsNotIncludeInMenu @@ -27,14 +27,14 @@ class AssertCategoryIsNotIncludeInMenu extends AbstractConstraint * * @param CmsIndex $cmsIndex * @param Category $category - * @param Browser $browser + * @param BrowserInterface $browser * @param CatalogCategoryView $categoryView * @return void */ public function processAssert( CmsIndex $cmsIndex, Category $category, - Browser $browser, + BrowserInterface $browser, CatalogCategoryView $categoryView ) { $cmsIndex->open(); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryPage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryPage.php index 59c7ba41e59302442e5e64b777535a622de50943..3197b59c3d55c54550f2dbfaa8dd952db5938ec4 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryPage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryPage.php @@ -9,9 +9,9 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Fixture\Category\LandingPage; use Magento\Catalog\Test\Page\Category\CatalogCategoryView; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureFactory; /** * Assert that displayed category data on category page equals to passed from fixture. @@ -53,7 +53,7 @@ class AssertCategoryPage extends AbstractConstraint * @param Category $initialCategory * @param FixtureFactory $fixtureFactory * @param CatalogCategoryView $categoryView - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ public function processAssert( @@ -61,7 +61,7 @@ class AssertCategoryPage extends AbstractConstraint Category $initialCategory, FixtureFactory $fixtureFactory, CatalogCategoryView $categoryView, - Browser $browser + BrowserInterface $browser ) { $this->browser = $browser; $this->categoryViewPage = $categoryView; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryRedirect.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryRedirect.php index e7dcaac9ba593f0e0aaeb83822439e1ac9d73145..3c72fa66599ca92c9a28fc8be1c38dd80a07dadb 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryRedirect.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryRedirect.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\Category; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCategoryRedirect @@ -24,12 +24,15 @@ class AssertCategoryRedirect extends AbstractConstraint * Assert that old Category URL lead to appropriate Category in frontend * * @param Category $category - * @param Browser $browser + * @param BrowserInterface $browser * @param Category $initialCategory * @return void */ - public function processAssert(Category $category, Browser $browser, Category $initialCategory) - { + public function processAssert( + Category $category, + BrowserInterface $browser, + Category $initialCategory + ) { $browser->open($_ENV['app_frontend_url'] . $initialCategory->getUrlKey() . '.html'); \PHPUnit_Framework_Assert::assertEquals( diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategorySaveMessage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategorySaveMessage.php index 37150e69985c4c98a3c07238c12d45911a9d36b1..95552645afe7e149e7ba2f9c366e1f558c961db3 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategorySaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategorySaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogCategoryEdit; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCategorySaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategorySuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategorySuccessDeleteMessage.php index 898a92ea6d2b0c0f70b6d87dd065b9085d19c241..2f0348ef51d09b87ea04220c51ac93dda48fe21f 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategorySuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategorySuccessDeleteMessage.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogCategoryEdit; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCategorySuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCrossSellsProductsSection.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCrossSellsProductsSection.php index 7f785f4e19a22337783d39ac25f4e08c8b01a6ab..b6a8c8c559ffa911229abef13587bd3fe72e5b6f 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCrossSellsProductsSection.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCrossSellsProductsSection.php @@ -9,9 +9,9 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Checkout\Test\Page\CheckoutCart; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class AssertCrossSellsProductsSection @@ -26,7 +26,7 @@ class AssertCrossSellsProductsSection extends AbstractConstraint /** * Assert that product is displayed in cross-sell section * - * @param Browser $browser + * @param BrowserInterface $browser * @param CheckoutCart $checkoutCart * @param CatalogProductSimple $product * @param CatalogProductView $catalogProductView @@ -34,7 +34,7 @@ class AssertCrossSellsProductsSection extends AbstractConstraint * @return void */ public function processAssert( - Browser $browser, + BrowserInterface $browser, CheckoutCart $checkoutCart, CatalogProductSimple $product, CatalogProductView $catalogProductView, diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertNoCrossSellsProductsSection.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertNoCrossSellsProductsSection.php index 794fe66e908c6a9ce9c83903bb89e28e579c54a7..9ba318c3a3f9fb95519fa954e0116ef48507dc5e 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertNoCrossSellsProductsSection.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertNoCrossSellsProductsSection.php @@ -9,9 +9,9 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Checkout\Test\Page\CheckoutCart; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class AssertNoCrossSellsProductsSection @@ -26,7 +26,7 @@ class AssertNoCrossSellsProductsSection extends AbstractConstraint /** * Assert that product is not displayed in cross-sell section * - * @param Browser $browser + * @param BrowserInterface $browser * @param CatalogProductSimple $product * @param InjectableFixture[] $relatedProducts * @param CatalogProductView $catalogProductView @@ -34,7 +34,7 @@ class AssertNoCrossSellsProductsSection extends AbstractConstraint * @return void */ public function processAssert( - Browser $browser, + BrowserInterface $browser, CatalogProductSimple $product, array $relatedProducts, CatalogProductView $catalogProductView, diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertNoRelatedProductsSection.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertNoRelatedProductsSection.php index d2edb61f6427fc75f2a15587a0fda7d81c8701dd..77dafc88946df4d8b4f4ac7f264c142faa8abdb5 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertNoRelatedProductsSection.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertNoRelatedProductsSection.php @@ -8,9 +8,9 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class AssertNoRelatedProductsSection @@ -25,14 +25,14 @@ class AssertNoRelatedProductsSection extends AbstractConstraint /** * Assert that product is not displayed in related products section * - * @param Browser $browser + * @param BrowserInterface $browser * @param CatalogProductSimple $product * @param InjectableFixture[] $relatedProducts * @param CatalogProductView $catalogProductView * @return void */ public function processAssert( - Browser $browser, + BrowserInterface $browser, CatalogProductSimple $product, array $relatedProducts, CatalogProductView $catalogProductView diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertNoUpSellsProductsSection.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertNoUpSellsProductsSection.php index e31e2eada172c616c92344f7b2f9517769f097f8..e2ec0224da538306a117d2b13f72d2a58e7daa8a 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertNoUpSellsProductsSection.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertNoUpSellsProductsSection.php @@ -8,9 +8,9 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class AssertNoUpSellsProductsSection @@ -25,14 +25,14 @@ class AssertNoUpSellsProductsSection extends AbstractConstraint /** * Assert that product is not displayed in up-sell section * - * @param Browser $browser + * @param BrowserInterface $browser * @param CatalogProductSimple $product * @param InjectableFixture[] $relatedProducts * @param CatalogProductView $catalogProductView * @return void */ public function processAssert( - Browser $browser, + BrowserInterface $browser, CatalogProductSimple $product, array $relatedProducts, CatalogProductView $catalogProductView diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertPriceOnProductPageInterface.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertPriceOnProductPageInterface.php index 391b2394ceb1cea61b568cebd94fed2791a49e86..e26cb9d0dfe20fc0bf7c37014a9d9379122a5fff 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertPriceOnProductPageInterface.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertPriceOnProductPageInterface.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Block\Product\View; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Interface AssertPriceOnProductPageInterface diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInGrid.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInGrid.php index f7d97ff7c1b7d3a03f1d2bd6eea404c2c1447f88..1091df6e8b2096bfd80258f64baff2395a2a650c 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertAbsenceProductAttributeInGrid diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInSearchOnProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInSearchOnProductForm.php index a0eb096a1b059c7f737a4926ead8c8a4fefc12ba..3cf4328573e0dcaafdda280c0ac4cc1ac4820391 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInSearchOnProductForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInSearchOnProductForm.php @@ -9,7 +9,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertAbsenceInAddAttributeSearch diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInTemplateGroups.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInTemplateGroups.php index 7393939c7e7cbf1f8056acee99f6445f22ce2326..178bdd4078027dee27ca51c3a48d7d804e4172d1 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInTemplateGroups.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInTemplateGroups.php @@ -9,7 +9,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogAttributeSet; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductAttributeAbsenceInTemplateGroups diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInUnassignedAttributes.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInUnassignedAttributes.php index 517a00547faeb67f6dc9670751e3e8d8f00baa7f..7131b704c9ca6cb9c6c1b2a104c7ddecf2e3301b 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInUnassignedAttributes.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInUnassignedAttributes.php @@ -9,7 +9,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogAttributeSet; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductAttributeAbsenceInUnassignedAttributes diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeDisplayingOnFrontend.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeDisplayingOnFrontend.php index 36f8fe1199d478139399d967dc121999bfd87a3e..a7f562305a04d26c50319014eb0b7a0964be8def 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeDisplayingOnFrontend.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeDisplayingOnFrontend.php @@ -8,9 +8,9 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Client\Driver\Selenium\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; /** * Check whether the attribute is visible on the frontend. @@ -27,14 +27,14 @@ class AssertProductAttributeDisplayingOnFrontend extends AbstractConstraint * @param InjectableFixture $product * @param CatalogProductAttribute $attribute * @param CatalogProductView $catalogProductView - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ public function processAssert( InjectableFixture $product, CatalogProductAttribute $attribute, CatalogProductView $catalogProductView, - Browser $browser + BrowserInterface $browser ) { $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeDisplayingOnSearchForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeDisplayingOnSearchForm.php index 4c1b3d5a125e43e772778ac6ce5ab1886ed57313..1d9a0a73cf089f38aa586a29cf051acee08cd8ce 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeDisplayingOnSearchForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeDisplayingOnSearchForm.php @@ -8,7 +8,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\CatalogSearch\Test\Page\AdvancedSearch; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Check whether attribute is displayed in the advanced search form on the frontend. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeInGrid.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeInGrid.php index 5247acf20d0101a6ccaa5cededa7d6c415531b4b..4f76dc4d50d48565cc23d5c890e52037806c7e03 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductAttributeInGrid diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsComparable.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsComparable.php index df9e49d9972b55afbf1614c0839b20d87d6a03c1..bc4a1c23c9e123193633f8e97da8fb5064fb12e1 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsComparable.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsComparable.php @@ -9,9 +9,9 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Product\CatalogProductCompare; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Client\Driver\Selenium\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; /** * Check whether there is an opportunity to compare products using given attribute. @@ -27,14 +27,14 @@ class AssertProductAttributeIsComparable extends AbstractConstraint * * @param InjectableFixture $product * @param CatalogProductAttribute $attribute - * @param Browser $browser + * @param BrowserInterface $browser * @param CatalogProductView $catalogProductView * @param CatalogProductCompare $catalogProductCompare */ public function processAssert( InjectableFixture $product, CatalogProductAttribute $attribute, - Browser $browser, + BrowserInterface $browser, CatalogProductView $catalogProductView, CatalogProductCompare $catalogProductCompare ) { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsFilterable.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsFilterable.php index 343dce13148e149a3546a53ed27dad7544a18738..bd3c2262147d1fd81f51b1a457cc789a7c90b5e4 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsFilterable.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsFilterable.php @@ -6,10 +6,10 @@ namespace Magento\Catalog\Test\Constraint; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\InjectableFixture; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsFilterableInSearch.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsFilterableInSearch.php index fd0e4173327a4da0404cbf5978c3e96d180f3693..d43006c06f668986c2d7a6ea53c853794efff3db 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsFilterableInSearch.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsFilterableInSearch.php @@ -9,8 +9,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Category\CatalogCategoryView; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; /** * Check out if the attribute in the navigation bar on the search results page in Layered navigation. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsGlobal.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsGlobal.php index 7db85843f974d7259a6273e28ea9cfd6904fafe9..486497d81c9c435426439b70eb302a5fe1b4adec 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsGlobal.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsGlobal.php @@ -8,7 +8,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Look on the scope of product attribute in the grid. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsHtmlAllowed.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsHtmlAllowed.php index 1b9ab866988fbfa012f43c239fe2ccd17339759d..33b93ac4f1effdfcbd18d99729eb92e1daefd7bb 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsHtmlAllowed.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsHtmlAllowed.php @@ -8,9 +8,9 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Client\Driver\Selenium\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; /** * Check whether html tags are using in an attribute value. @@ -28,7 +28,7 @@ class AssertProductAttributeIsHtmlAllowed extends AbstractConstraint * @param InjectableFixture $product * @param CatalogProductAttribute $attribute * @param CatalogProductView $catalogProductView - * @param Browser $browser + * @param BrowserInterface $browser * @throws \Exception * @return void */ @@ -36,7 +36,7 @@ class AssertProductAttributeIsHtmlAllowed extends AbstractConstraint InjectableFixture $product, CatalogProductAttribute $attribute, CatalogProductView $catalogProductView, - Browser $browser + BrowserInterface $browser ) { $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsRequired.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsRequired.php index fcd98a85b6d3ee2ebbefc5086819b6f20d6d8366..d563b8966aa1c3fd1d41bca3f86ff3fea7764141 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsRequired.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsRequired.php @@ -9,8 +9,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; /** * Check whether the attribute is mandatory. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsUnique.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsUnique.php index 9d33cbdf8f9992605a401e2b2c0a065674090ac5..ca35c959794d9775f823ca133adcea15e930da1b 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsUnique.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsUnique.php @@ -10,8 +10,8 @@ use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureFactory; /** * Check whether the attribute is unique. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsUsedInSortOnFrontend.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsUsedInSortOnFrontend.php index 4af9bd95be936601c61fdea7c8f1da2384126083..73d9c93fdf2dc336c9509a6ef56c59aa164e4cde 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsUsedInSortOnFrontend.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsUsedInSortOnFrontend.php @@ -9,8 +9,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\CatalogSearch\Test\Page\CatalogsearchResult; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; /** * Assert that attribute present in sort dropdown on search results page on frontend. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsUsedPromoRules.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsUsedPromoRules.php index 3dca6021de3704a36dd7efeb103179aaa2e05452..cda2dbe885ccf547520a745fb38c9f9fefc78e61 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsUsedPromoRules.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsUsedPromoRules.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Constraint; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductAttributeIsUsedPromoRules diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeSaveMessage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeSaveMessage.php index b6c11594ab6f798ffe90839e71b1c34df52851ae..f58f02ad1f4fe848237c37f4286a277123dabfbf 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductAttributeSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeSuccessDeleteMessage.php index ea2adf5025f7ae88df5f3060204b9464f8330306..60b68f622cb549aec8a3ecbb0f9772cc0e9a11d1 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeSuccessDeleteMessage.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSuccessDeletedAttribute diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareBlockOnCmsPage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareBlockOnCmsPage.php index e7362c6e7255c84de480154e90983bb650df739c..5388bf823b46bbb61151164646e6c4238452483a 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareBlockOnCmsPage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareBlockOnCmsPage.php @@ -7,9 +7,9 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureFactory; /** * Class AssertProductCompareBlockOnCmsPage @@ -27,11 +27,15 @@ class AssertProductCompareBlockOnCmsPage extends AbstractConstraint * @param array $products * @param CmsIndex $cmsIndex * @param FixtureFactory $fixtureFactory - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ - public function processAssert(array $products, CmsIndex $cmsIndex, FixtureFactory $fixtureFactory, Browser $browser) - { + public function processAssert( + array $products, + CmsIndex $cmsIndex, + FixtureFactory $fixtureFactory, + BrowserInterface $browser + ) { $newCmsPage = $fixtureFactory->createByCode('cmsPage', ['dataSet' => '3_column_template']); $newCmsPage->persist(); $browser->open($_ENV['app_frontend_url'] . $newCmsPage->getIdentifier()); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareItemsLink.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareItemsLink.php index d54776b16eea3263982c488efe7c8ef76579f83d..716bb8c00933c195aae9ce93ddc0568181d7f75a 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareItemsLink.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareItemsLink.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductCompareItemsLink diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareItemsLinkIsAbsent.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareItemsLinkIsAbsent.php index 1deb79c236d7dbf0498a37772c0fdeae6acce5b8..3455b8dad453c53d35e9bad044a4b78728f8c783 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareItemsLinkIsAbsent.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareItemsLinkIsAbsent.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductCompareItemsLinkIsAbsent diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductComparePage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductComparePage.php index bd023344378c8d8a1f9e66e0dd44adb87a318ad4..c08c1850494e96d27341e2e5eddfbfbc1efee0ef 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductComparePage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductComparePage.php @@ -8,7 +8,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductCompare; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductComparePage diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareRemoveLastProductMessage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareRemoveLastProductMessage.php index 3a6fb000b077eeb347569eafd4806bf4c8f9392b..0ede4a57e7b3638ccb496a372113fb21328db7b7 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareRemoveLastProductMessage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareRemoveLastProductMessage.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductCompare; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductCompareRemoveLastProductMessage diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareSuccessAddMessage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareSuccessAddMessage.php index 38875701b974ff83173ce4e872d1e84abc30dfc0..733c8b726597606c1a79be502085fb1eebafe0d7 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareSuccessAddMessage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareSuccessAddMessage.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductCompareSuccessAddMessage diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareSuccessRemoveAllProductsMessage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareSuccessRemoveAllProductsMessage.php index 5f0f8266ff3d0d3a86c532d13b87162ca123ce04..4c878871b76740d909d4d3b8d46ab6bb3512cf8f 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareSuccessRemoveAllProductsMessage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareSuccessRemoveAllProductsMessage.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductCompareSuccessRemoveAllProductsMessage diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareSuccessRemoveMessage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareSuccessRemoveMessage.php index f78b2770a0425659eb21d826e060e43c23ca1b75..434daafcee86ed1944cf6147dd9a45f8e4b9aa00 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareSuccessRemoveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareSuccessRemoveMessage.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductCompare; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductCompareSuccessRemoveMessage diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCustomOptionsOnProductPage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCustomOptionsOnProductPage.php index 44303d263e78a3404bed6fc00aa6216a28bb3df3..7150626d7dcb9b47535fa5180916358774d67ea4 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCustomOptionsOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCustomOptionsOnProductPage.php @@ -7,9 +7,9 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractAssertForm; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductCustomOptionsOnProductPage @@ -80,11 +80,14 @@ class AssertProductCustomOptionsOnProductPage extends AbstractAssertForm * * @param CatalogProductView $catalogProductView * @param FixtureInterface $product - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ - public function processAssert(CatalogProductView $catalogProductView, FixtureInterface $product, Browser $browser) - { + public function processAssert( + CatalogProductView $catalogProductView, + FixtureInterface $product, + BrowserInterface $browser + ) { $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); $actualPrice = null; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicateForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicateForm.php index a26e9b5d4f3767f6e764940f5f40a83046b4d6a8..51da2a9c5d3f12877db54ed03600829c8acbcb74 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicateForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicateForm.php @@ -8,7 +8,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Assert form data equals fixture data. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicateIsNotDisplayingOnFrontend.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicateIsNotDisplayingOnFrontend.php index c27dcb389304c160e3989dc2e20178f0a2d29abe..89f7eaae399374329847ad25565a30ebc1547f01 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicateIsNotDisplayingOnFrontend.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicateIsNotDisplayingOnFrontend.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Constraint; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductDuplicateIsNotDisplayingOnFrontend diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicateMessage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicateMessage.php index 3abcce7a6003df88406a448d2d5acb1e6b32bf68..837fb1ebdb26c10845171557630eadeba81fa681 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicateMessage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicateMessage.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductDuplicateMessage diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicatedInGrid.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicatedInGrid.php index 278786c42b5ed624f06fdfc369673f75ae85da51..4adca9c9b7bb9de7e1c8192461919b863d09ee20 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicatedInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicatedInGrid.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductDuplicatedInGrid diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductForm.php index efbdc1f4aa15298431915760038bb9ceca6860b6..e10767e1eb658b9a46686ab2de613957bb39853f 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductForm.php @@ -8,8 +8,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; -use Mtf\Constraint\AbstractAssertForm; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductForm diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductGroupedPriceOnProductPage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductGroupedPriceOnProductPage.php index 05e86b8e8dedc4f972a8533f3cf392d77335bd18..bfd4ea2306d84640cb05b1492ea750eb11887adf 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductGroupedPriceOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductGroupedPriceOnProductPage.php @@ -8,9 +8,9 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Block\Product\View; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductGroupedPriceOnProductPage @@ -40,11 +40,14 @@ class AssertProductGroupedPriceOnProductPage extends AbstractConstraint implemen * * @param CatalogProductView $catalogProductView * @param FixtureInterface $product - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ - public function processAssert(CatalogProductView $catalogProductView, FixtureInterface $product, Browser $browser) - { + public function processAssert( + CatalogProductView $catalogProductView, + FixtureInterface $product, + BrowserInterface $browser + ) { $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); //Process assertions diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInCart.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInCart.php index 6750c8cc4c5cd49f96834313f7ec2d8bd998bf98..c231814db8b4dd819aa71921a7fe72d12b470199 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInCart.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInCart.php @@ -9,9 +9,9 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Checkout\Test\Page\CheckoutCart; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductInCart @@ -28,14 +28,14 @@ class AssertProductInCart extends AbstractConstraint * * @param CatalogProductView $catalogProductView * @param FixtureInterface $product - * @param Browser $browser + * @param BrowserInterface $browser * @param CheckoutCart $checkoutCart * @return void */ public function processAssert( CatalogProductView $catalogProductView, FixtureInterface $product, - Browser $browser, + BrowserInterface $browser, CheckoutCart $checkoutCart ) { // Add product to cart diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInCategory.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInCategory.php index 63fcbcf80075b3ba42851c9838d3bdcb214e8789..ea20ef12903b25b6d5de16197fde477032f69ec8 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInCategory.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInCategory.php @@ -9,8 +9,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Page\Category\CatalogCategoryView; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductInCategory diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInGrid.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInGrid.php index 7f12ecab2f3a47f9cee00651f02890334230c382..b2a87f0ee3e5e9a28ddbc1aafbf8e499a07a4824 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInGrid.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductInGrid diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInStock.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInStock.php index 15dec662a9a774d18c788925d882a1f912ee8bcf..b00dc4d171301fb86fbeab9358acee18a5eaded2 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInStock.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInStock.php @@ -7,9 +7,9 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductInStock @@ -29,12 +29,15 @@ class AssertProductInStock extends AbstractConstraint * Assert that In Stock status is displayed on product page * * @param CatalogProductView $catalogProductView - * @param Browser $browser + * @param BrowserInterface $browser * @param FixtureInterface $product * @return void */ - public function processAssert(CatalogProductView $catalogProductView, Browser $browser, FixtureInterface $product) - { + public function processAssert( + CatalogProductView $catalogProductView, + BrowserInterface $browser, + FixtureInterface $product + ) { // TODO fix initialization url for frontend page $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); \PHPUnit_Framework_Assert::assertEquals( diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotDisplayingOnFrontend.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotDisplayingOnFrontend.php index c4382c7be411bfa9ac1bafb12552897a2ca8133f..f53f723ebc2ee2229904eb6a0d0e893b9cf61b87 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotDisplayingOnFrontend.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotDisplayingOnFrontend.php @@ -11,9 +11,9 @@ use Magento\Catalog\Test\Page\Category\CatalogCategoryView; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\CatalogSearch\Test\Page\CatalogsearchResult; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductIsNotDisplayingOnFrontend @@ -60,7 +60,7 @@ class AssertProductIsNotDisplayingOnFrontend extends AbstractConstraint /** * Browser * - * @var Browser + * @var BrowserInterface */ protected $browser; @@ -79,7 +79,7 @@ class AssertProductIsNotDisplayingOnFrontend extends AbstractConstraint * @param CatalogCategoryView $catalogCategoryView * @param CmsIndex $cmsIndex * @param FixtureInterface|FixtureInterface[] $product - * @param Browser $browser + * @param BrowserInterface $browser * @param Category|null $category */ public function processAssert( @@ -88,7 +88,7 @@ class AssertProductIsNotDisplayingOnFrontend extends AbstractConstraint CatalogCategoryView $catalogCategoryView, CmsIndex $cmsIndex, $product, - Browser $browser, + BrowserInterface $browser, Category $category = null ) { $this->browser = $browser; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotVisibleInCompareBlock.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotVisibleInCompareBlock.php index 8785c154add925f67d746eab74790bf6350f2fe1..e0cd14a071e484fbc72f31415b39b55f9461aa7e 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotVisibleInCompareBlock.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotVisibleInCompareBlock.php @@ -8,8 +8,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Cms\Test\Page\CmsIndex; use Magento\Customer\Test\Page\CustomerAccountIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductIsNotVisibleInCompareBlock diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotVisibleInComparePage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotVisibleInComparePage.php index ddbba15320bfd5b720c40fec6fe119e4376c12ee..65205e252f79be15d59bd1578b7f4f56f91eac24 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotVisibleInComparePage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotVisibleInComparePage.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductCompare; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductIsNotVisibleInComparePage diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductNotInGrid.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductNotInGrid.php index 342c61139676287ff077f3b20d165e0b0b0377b5..d973f1ae0bcddd641baa51d35306df2ae401bbbb 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductNotInGrid.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductNotSearchableBySku.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductNotSearchableBySku.php index e3963b136f130a1f243a0d788fa0d42846d543c2..bf5fe7db22701082126475a724ce582755e756f8 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductNotSearchableBySku.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductNotSearchableBySku.php @@ -8,8 +8,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\CatalogSearch\Test\Page\CatalogsearchResult; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductNotSearchableBySku diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductNotVisibleInCategory.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductNotVisibleInCategory.php index a96967889aae6b05b962b4bb787638b6e971e8e8..cb885fcee6f3d46b47a64979e0fcae0f06147fd1 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductNotVisibleInCategory.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductNotVisibleInCategory.php @@ -9,8 +9,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Page\Category\CatalogCategoryView; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductNotVisibleInCategory diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductOutOfStock.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductOutOfStock.php index 3e978d962f43293bfb5ac76d98d2757583d495bc..9aeec7495e10bb1f7a561e7e02c7570de336fb44 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductOutOfStock.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductOutOfStock.php @@ -7,9 +7,9 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductOutOfStock @@ -29,12 +29,15 @@ class AssertProductOutOfStock extends AbstractConstraint * Assert that Out of Stock status is displayed on product page * * @param CatalogProductView $catalogProductView - * @param Browser $browser + * @param BrowserInterface $browser * @param FixtureInterface $product * @return void */ - public function processAssert(CatalogProductView $catalogProductView, Browser $browser, FixtureInterface $product) - { + public function processAssert( + CatalogProductView $catalogProductView, + BrowserInterface $browser, + FixtureInterface $product + ) { $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); \PHPUnit_Framework_Assert::assertEquals( self::STOCK_AVAILABILITY, diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductPage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductPage.php index dd9c77a6a8ac612d314db49b7cd48cbf0c3278e0..23e31de68caf9b5bf0ea3263bd82a8fa5c006cbc 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductPage.php @@ -8,9 +8,9 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractAssertForm; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductPage @@ -45,13 +45,16 @@ class AssertProductPage extends AbstractAssertForm * 5. Description * 6. Short Description * - * @param Browser $browser + * @param BrowserInterface $browser * @param CatalogProductView $catalogProductView * @param FixtureInterface $product * @return void */ - public function processAssert(Browser $browser, CatalogProductView $catalogProductView, FixtureInterface $product) - { + public function processAssert( + BrowserInterface $browser, + CatalogProductView $catalogProductView, + FixtureInterface $product + ) { $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); $this->product = $product; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSaveMessage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSaveMessage.php index 2d2e0ff69f5b4841dc9a168fea6fcd10902717b2..7f972607e954b858c40973d39df825d9dce5a667 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSearchableBySku.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSearchableBySku.php index 118a0aedf71c71723c5a685d850858093d751a28..337aec58a57aad4aeebd121d61fa05e405ff6f3c 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSearchableBySku.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSearchableBySku.php @@ -8,8 +8,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\CatalogSearch\Test\Page\CatalogsearchResult; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductSearchableBySku diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSkuAutoGenerated.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSkuAutoGenerated.php index 985b0e30d2307066b7eef90c50cfba96643e1836..cfeed99f470d0fec53e7271e857a47330a306e9d 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSkuAutoGenerated.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSkuAutoGenerated.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductSkuAutoGenerated diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSpecialPriceOnProductPage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSpecialPriceOnProductPage.php index 5425ac797955931d890952a6b4ce4b965b9fad2c..4a4df8f12a0c51a0889ebd3a7c0fde0a268a72be 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSpecialPriceOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSpecialPriceOnProductPage.php @@ -8,9 +8,9 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Block\Product\View; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Assert that displayed special price on product page equals passed from fixture. @@ -32,12 +32,15 @@ class AssertProductSpecialPriceOnProductPage extends AbstractConstraint implemen * Assert that displayed special price on product page equals passed from fixture * * @param CatalogProductView $catalogProductView - * @param Browser $browser + * @param BrowserInterface $browser * @param FixtureInterface $product * @return void */ - public function processAssert(CatalogProductView $catalogProductView, Browser $browser, FixtureInterface $product) - { + public function processAssert( + CatalogProductView $catalogProductView, + BrowserInterface $browser, + FixtureInterface $product + ) { $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); //Process assertions diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSuccessDeleteMessage.php index 408d2aea57d7d6fe6936535e9b178311f3b5658d..0be5aaf2f66e79736bd95bc8946d854d0c4193ab 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSuccessDeleteMessage.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductSuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateForm.php index d5d4beaf5bad44e4238e7c1b7bf47e2b8b847efd..af751de70b60cc696534344711d1ef293b4feb49 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateForm.php @@ -10,7 +10,7 @@ use Magento\Catalog\Test\Fixture\CatalogAttributeSet; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductTemplateForm diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php index 87d0c9105986e40c4a98906b4d5bd8ce82efbc9f..d207b3b1a3517253dc2e055ab2b92016316869be 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php @@ -6,9 +6,9 @@ namespace Magento\Catalog\Test\Constraint; -use Mtf\ObjectManager; -use Mtf\Fixture\FixtureFactory; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\ObjectManager; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Constraint\AbstractConstraint; use Magento\Catalog\Test\Fixture\CatalogAttributeSet; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateInGrid.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateInGrid.php index 1a616f41bc693b5b57b1085b4ef6a5f0da05b0e5..6c5f5a361f89e9f94b12de20aaa217511c81280e 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogAttributeSet; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductTemplateInGrid diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateNotInGrid.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateNotInGrid.php index 870fa371f979d95dc20351d31a80a85881240ef3..6169fe31598de123aae474096bae79fa584ccfab 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogAttributeSet; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductTemplateNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateOnProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateOnProductForm.php index 378370a452436425f33cc2f27a1b927d195cae61..34dbf3c2914794a494276eb630b21b79acdc253b 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateOnProductForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateOnProductForm.php @@ -12,8 +12,8 @@ use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureFactory; /** * Class AssertProductTemplateOnProductForm diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateSuccessDeleteMessage.php index 1308b188bc02227a2e2cb1003deffc15935b09f2..8fe292c2423163f67a8067940a96320ea35a55bb 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateSuccessDeleteMessage.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductTemplateSuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateSuccessSaveMessage.php index cc06f1cce7c3d51a5dae2bb9919cf893a66319a3..e19ff6274563410a4ab1f83e9a9deb419e02675b 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateSuccessSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductTemplateSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTierPriceOnProductPage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTierPriceOnProductPage.php index d4acd06cab22213e3835917b69d727b89209b619..94702a94536d06599378ecdc9eb852cb52c26957 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTierPriceOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTierPriceOnProductPage.php @@ -8,9 +8,9 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Block\Product\View; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Assert that displayed tier price on product page equals passed from fixture. @@ -38,13 +38,13 @@ class AssertProductTierPriceOnProductPage extends AbstractConstraint implements /** * Assertion that tier prices are displayed correctly * - * @param Browser $browser + * @param BrowserInterface $browser * @param CatalogProductView $catalogProductView * @param FixtureInterface $product * @return void */ public function processAssert( - Browser $browser, + BrowserInterface $browser, CatalogProductView $catalogProductView, FixtureInterface $product ) { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductView.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductView.php index 64ec170af0c26b2e2f722bd6d07a56a1e8564eec..52bfc9299be638851b14775a7fe7556a50ab346f 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductView.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductView.php @@ -8,13 +8,11 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductView - * - * @package Magento\Catalog\Test\Constraint */ class AssertProductView extends AbstractConstraint { @@ -24,13 +22,13 @@ class AssertProductView extends AbstractConstraint /** * @param CatalogProductView $catalogProductView - * @param Browser $browser + * @param BrowserInterface $browser * @param CatalogProductSimple $product * @return void */ public function processAssert( CatalogProductView $catalogProductView, - Browser $browser, + BrowserInterface $browser, CatalogProductSimple $product ) { //Open product view page diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductVisibleInCategory.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductVisibleInCategory.php index a58ede703595901123e09606e5adf22bcb7c6500..c8167af1480bf44bf031425fcb6c43aab7224f45 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductVisibleInCategory.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductVisibleInCategory.php @@ -9,8 +9,8 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Page\Category\CatalogCategoryView; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductVisibleInCategory diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertRelatedProductsSection.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertRelatedProductsSection.php index c6070ec805612c46c0fdd86ec6175b0ddc2a2827..c2279cf6a7325723e29fa2a3a1b9eb401b5f22cc 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertRelatedProductsSection.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertRelatedProductsSection.php @@ -8,9 +8,9 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class AssertRelatedProductsSection @@ -25,14 +25,14 @@ class AssertRelatedProductsSection extends AbstractConstraint /** * Assert that product is displayed in related products section * - * @param Browser $browser + * @param BrowserInterface $browser * @param CatalogProductSimple $product * @param InjectableFixture[] $relatedProducts * @param CatalogProductView $catalogProductView * @return void */ public function processAssert( - Browser $browser, + BrowserInterface $browser, CatalogProductSimple $product, array $relatedProducts, CatalogProductView $catalogProductView diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertUpSellsProductsSection.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertUpSellsProductsSection.php index ffb916a70b0513439dcb0b53fcedc9f95ed29391..0dae93dd6d207f8182c8fdb110ddaab03cffd567 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertUpSellsProductsSection.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertUpSellsProductsSection.php @@ -7,10 +7,10 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class AssertUpSellsProductsSection @@ -25,14 +25,14 @@ class AssertUpSellsProductsSection extends AbstractConstraint /** * Assert that product is displayed in up-sell section * - * @param Browser $browser + * @param BrowserInterface $browser * @param FixtureInterface $product * @param InjectableFixture[] $relatedProducts, * @param CatalogProductView $catalogProductView * @return void */ public function processAssert( - Browser $browser, + BrowserInterface $browser, FixtureInterface $product, array $relatedProducts, CatalogProductView $catalogProductView diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertUsedSuperAttributeImpossibleDeleteMessages.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertUsedSuperAttributeImpossibleDeleteMessages.php index 133d2e28910ae183d985365515281a73347c7181..8bb9e4122149bc2d464237ad9ec24bdfeaf5c001 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertUsedSuperAttributeImpossibleDeleteMessages.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertUsedSuperAttributeImpossibleDeleteMessages.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeNew; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUsedSuperAttributeImpossibilityDeleteMessages diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/AssignProducts.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/AssignProducts.php index e1c04547aa337be2d35ab960b1bc9d24302ef3c4..47ba4a555e512c028ca969c15967671604081e12 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/AssignProducts.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/AssignProducts.php @@ -6,8 +6,8 @@ namespace Magento\Catalog\Test\Fixture; -use Mtf\Factory\Factory; -use Mtf\System\Config; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\System\Config; class AssignProducts extends Product { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Cart/Item.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Cart/Item.php index 1d977962b2e6a9b57b4389ef01e4f4c23f9a8fbc..9e8d1996b13a22dda3e97df67182435f16caaf66 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Cart/Item.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Cart/Item.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Fixture\Cart; use Magento\Catalog\Test\Fixture\CatalogProductSimple; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Item diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet.php index 4a3c8f5da9ce7d55913e29ee6c1b69fa5e835c9c..21cf68bc8a85d21f6ffdf6f6812a1127cb20cc69 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class CatalogAttributeSet diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet/AssignedAttributes.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet/AssignedAttributes.php index fe38371d7ab0e4a86f37b154fe4d2ff5e72868fc..3cab12364140258fe29475db5ca95c8c651c8109 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet/AssignedAttributes.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet/AssignedAttributes.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Fixture\CatalogAttributeSet; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssignedAttributes diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet/SkeletonSet.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet/SkeletonSet.php index 4d70dd528ea8e9fceee1f73b1a25e70320923748..27f86800767f536908ea62c0a07b6d158469d4ee 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet/SkeletonSet.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet/SkeletonSet.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Fixture\CatalogAttributeSet; use Magento\Catalog\Test\Fixture\CatalogAttributeSet; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class SkeletonSet diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.php index db403b73608038373b39c85e28d59825efb9cca9..4d645477ec25da207433607e6ea83a4017955735 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class CatalogAttributeEntity diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute/Options.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute/Options.php index fce3250d3d7c793705984cc56c578fcdce7b1582..f05c63c30d733d50222ec830df0c9a2d788f090c 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute/Options.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute/Options.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Fixture\CatalogProductAttribute; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Options diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.php index 4c988324e04effde4da42dec520734cc4309212e..ffaa24098d39f1baa35d523eea93af8aa0c3a74a 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.php @@ -6,12 +6,12 @@ namespace Magento\Catalog\Test\Fixture; -use Mtf\System\Config; -use Mtf\Handler\HandlerFactory; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\InjectableFixture; -use Mtf\Repository\RepositoryFactory; -use Mtf\System\Event\EventManagerInterface; +use Magento\Mtf\System\Config; +use Magento\Mtf\Handler\HandlerFactory; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Repository\RepositoryFactory; +use Magento\Mtf\System\Event\EventManagerInterface; /** * Class CatalogProductSimple diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/AbstractRelatedProducts.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/AbstractRelatedProducts.php index 7d041eb90f1bbca29d0d78c4c4154ec65f55e768..b1ffd0322195e019c3efd2a08546a4a0d172ca30 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/AbstractRelatedProducts.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/AbstractRelatedProducts.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Fixture\CatalogProductSimple; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AbstractRelatedProducts diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/AttributeSetId.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/AttributeSetId.php index 17faa3b5b062b9b828f2385a894c1033c48c6dbd..28b6e17750ad223d7af61835de5aa7faf8a4b58c 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/AttributeSetId.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/AttributeSetId.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Fixture\CatalogAttributeSet; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AttributeSetId diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CategoryIds.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CategoryIds.php index 9453ec0828e7e3912c0cdf485db9081f6d4093d1..cf59c0bc7a19ceebdfe5f5467105e3db465f588a 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CategoryIds.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CategoryIds.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Fixture\Category; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class CategoryIds diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php index ac5d179809542ee24f5d4ea4e6fd03e9a4ab2cb1..6cabd44b50ec6e5609ccf12d09f1fa4eb0056ae6 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Fixture\CatalogProductSimple; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class CheckoutData diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CustomAttribute.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CustomAttribute.php index 49d6a01d0c0c4c1d066679fb22557995c043a3f6..024e8bc7680694502a7f39ae8763803cafc34843 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CustomAttribute.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CustomAttribute.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Source for attribute field. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CustomOptions.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CustomOptions.php index 733a611b3cb224ca2d9a9e267881812e73625b7d..82d498b27c0346dc6cbce7ba70361a1a8ee81ddc 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CustomOptions.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CustomOptions.php @@ -6,8 +6,8 @@ namespace Magento\Catalog\Test\Fixture\CatalogProductSimple; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class CustomOptions diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/Fpt.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/Fpt.php index 5e84f8822e591a5c45515feca5a7f6002e774d11..8d29bd7bd8bf13d7e76cd74e233d633f356c74c9 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/Fpt.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/Fpt.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Fixture\CatalogProductSimple; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Fpt diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/GroupPriceOptions.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/GroupPriceOptions.php index 256bb41cb82cbf41e1c53067f5e3ce420dff02c3..ae26f43149b3066bdf054197fe2c08626be6b4cc 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/GroupPriceOptions.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/GroupPriceOptions.php @@ -6,8 +6,8 @@ namespace Magento\Catalog\Test\Fixture\CatalogProductSimple; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class GroupPriceOptions @@ -19,7 +19,7 @@ use Mtf\Fixture\FixtureInterface; class GroupPriceOptions implements FixtureInterface { /** - * @var \Mtf\Fixture\FixtureFactory + * @var \Magento\Mtf\Fixture\FixtureFactory */ protected $fixtureFactory; @@ -69,6 +69,8 @@ class GroupPriceOptions implements FixtureInterface } /** + * Get preset array + * * @param string $name * @return mixed|null */ diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/Price.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/Price.php index 9c68b4060f26d33f2ee43fefa0008c427c8beed4..470558b5d4d0ba8c8f8e26f410b894fea1ed6696 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/Price.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/Price.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Fixture\CatalogProductSimple; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Price @@ -33,7 +33,7 @@ class Price implements FixtureInterface protected $params; /** - * @var \Mtf\Fixture\FixtureFactory + * @var \Magento\Mtf\Fixture\FixtureFactory */ protected $fixtureFactory; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TaxClass.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TaxClass.php index 0d5b1c9981aa1c22f54a59580b0f5271cf209778..bfec8539bb6b38b69a254a992b46bc5a9761d424 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TaxClass.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TaxClass.php @@ -7,12 +7,12 @@ namespace Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Tax\Test\Fixture\TaxClass as FixtureTaxClass; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class TaxClass diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TierPriceOptions.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TierPriceOptions.php index 4dbc4be608dfbd41421b035708b4230bd94940c6..1d2c292ec6e6392fa304cf14697b10598df989a7 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TierPriceOptions.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TierPriceOptions.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Fixture\CatalogProductSimple; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class TierPriceOptions diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.php index 997b81fbbda03dbc7f6816c438afde366def8d2d..c7102655fe9b4a61018c2cc1f135a61455305295 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.php @@ -6,12 +6,12 @@ namespace Magento\Catalog\Test\Fixture; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\InjectableFixture; -use Mtf\Handler\HandlerFactory; -use Mtf\Repository\RepositoryFactory; -use Mtf\System\Config; -use Mtf\System\Event\EventManagerInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Handler\HandlerFactory; +use Magento\Mtf\Repository\RepositoryFactory; +use Magento\Mtf\System\Config; +use Magento\Mtf\System\Event\EventManagerInterface; /** * Class CatalogProductVirtual diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category.php index d27ae4c345b8158aac78de18e33de5c9750352ba..c159bb8f7398187223e6456a3eb7645250eec54e 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class CatalogCategory diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/CategoryProducts.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/CategoryProducts.php index c84d694e909cbf337ee23df9758c166c22530c7d..1230c6c96549b1afe27bd09808dbed64eec56270 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/CategoryProducts.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/CategoryProducts.php @@ -6,8 +6,8 @@ namespace Magento\Catalog\Test\Fixture\Category; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class CategoryProducts diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/LandingPage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/LandingPage.php index b8110cfe17445e65b07b1331ab3f81a35fc3673a..add0a7c40e1bcae69191eeeab91173c2d8e497f2 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/LandingPage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/LandingPage.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Fixture\Category; use Magento\Cms\Test\Fixture\CmsBlock; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Prepare landing page. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/ParentId.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/ParentId.php index 57c0c0e49ee6163b7352704b38326435e506167d..7075706983b99a89b14a29a36617d980df17ec62 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/ParentId.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/ParentId.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Fixture\Category; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class ParentId diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CrosssellProducts.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CrosssellProducts.php index 9f8bfc8925444bfcdca7059601035281a116aed3..6314c21b52cf8f48e2fe4d1bbecefd1207a27b29 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CrosssellProducts.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CrosssellProducts.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Fixture; use Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\Crosssell; -use Mtf\Factory\Factory; +use Magento\Mtf\Factory\Factory; class CrosssellProducts extends AssignProducts { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product.php index ba65b0bb50ca874e3808b959c394509f2da3e5be..ca49dbcb8743d913ae7bd93a6b60fafe3c26dd17 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product.php @@ -5,10 +5,10 @@ */ namespace Magento\Catalog\Test\Fixture; -use Mtf\Factory\Factory; -use Mtf\Fixture\DataFixture; -use Mtf\ObjectManager; -use Mtf\System\Config; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Fixture\DataFixture; +use Magento\Mtf\ObjectManager; +use Magento\Mtf\System\Config; class Product extends DataFixture { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/ProductAttribute.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/ProductAttribute.php index c69da4e83af86d7726472a1adfac1d33a09567cc..e0bcf99fe4058771c685d3a6ab15fb8170124f9f 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/ProductAttribute.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/ProductAttribute.php @@ -6,9 +6,9 @@ namespace Magento\Catalog\Test\Fixture; -use Mtf\Client\Element\Locator; -use Mtf\Factory\Factory; -use Mtf\Fixture\DataFixture; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Fixture\DataFixture; /** * Class Attribute diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/SimpleProduct.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/SimpleProduct.php index 43a32cb5864c130917db8ab868a84627406cd6c1..29ce1edf9252fba739e1da8d624f89a3a884d688 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/SimpleProduct.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/SimpleProduct.php @@ -5,8 +5,8 @@ */ namespace Magento\Catalog\Test\Fixture; -use Mtf\Factory\Factory; -use Mtf\System\Config; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\System\Config; /** * Class SimpleProduct diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/VirtualProduct.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/VirtualProduct.php index 35057a1f722657128f6a19cede105a1824634357..be101be7e2874fc3598eca60db9900adc834075f 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/VirtualProduct.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/VirtualProduct.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Fixture; -use Mtf\Factory\Factory; +use Magento\Mtf\Factory\Factory; class VirtualProduct extends Product { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogAttributeSet/CatalogAttributeSetInterface.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogAttributeSet/CatalogAttributeSetInterface.php index fb00c52d4d9b4be4e4fee613daf8067ba1caabb9..da04410ef232c0fc24e9a4050662c71d5876c010 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogAttributeSet/CatalogAttributeSetInterface.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogAttributeSet/CatalogAttributeSetInterface.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Handler\CatalogAttributeSet; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface CatalogCategoryEntityInterface diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogAttributeSet/Curl.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogAttributeSet/Curl.php index 6e33e1ee8ac5de4114683eca784d47b267f59d18..869c7507cda01de635b16f22a3e646086d30b037 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogAttributeSet/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogAttributeSet/Curl.php @@ -7,12 +7,12 @@ namespace Magento\Catalog\Test\Handler\CatalogAttributeSet; use Magento\Catalog\Test\Fixture\CatalogAttributeSet; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/CatalogProductAttributeInterface.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/CatalogProductAttributeInterface.php index 1a5221e0501e857d59e0deef9a23a3ab79e5206d..de29b27f9458c6fa6e8836f8fd2204085cac071c 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/CatalogProductAttributeInterface.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/CatalogProductAttributeInterface.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Handler\CatalogProductAttribute; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface CatalogCategoryEntityInterface diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/Curl.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/Curl.php index 9d3652fe978811fc7089f5ab37fa1975778e85e1..fb0e7437711b58072d333f864432e446f0f0653d 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/Curl.php @@ -6,12 +6,12 @@ namespace Magento\Catalog\Test\Handler\CatalogProductAttribute; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/CatalogProductSimpleInterface.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/CatalogProductSimpleInterface.php index f4df1f9289680083d46d5655a31a8263f1351ff8..f705cfd88f2542c631147ae73ad638d21ea77ebf 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/CatalogProductSimpleInterface.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/CatalogProductSimpleInterface.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Handler\CatalogProductSimple; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface CatalogProductSimpleInterface diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php index 0f7a8b1dd6b25ea64caf6f69879dd2671795bcb3..c6ee44d2d0c533b3bd462e1a95da6ec93a8e6560 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php @@ -6,12 +6,12 @@ namespace Magento\Catalog\Test\Handler\CatalogProductSimple; -use Mtf\System\Config; -use Mtf\Fixture\FixtureInterface; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\System\Config; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Create new simple product via curl. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Ui.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Ui.php index e3b8421cc3ed15d1208877be2f1d92b5509cb483..1e3631bc057ca280944ccd063e34d39419a06296 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Ui.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Ui.php @@ -6,9 +6,9 @@ namespace Magento\Catalog\Test\Handler\CatalogProductSimple; -use Mtf\Factory\Factory; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Ui as AbstractUi; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Ui as AbstractUi; /** * Class CreateProduct diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductVirtual/CatalogProductVirtualInterface.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductVirtual/CatalogProductVirtualInterface.php index 67a4bf6cfff78baf34d88e620ac344a0d7aa2da6..d9cc8dff4dfd99e19f6a9ac9868579e6faad503c 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductVirtual/CatalogProductVirtualInterface.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductVirtual/CatalogProductVirtualInterface.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Handler\CatalogProductVirtual; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface CatalogProductVirtualInterface diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Category/CategoryInterface.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Category/CategoryInterface.php index adfdcb62c0a74ae441e83f7c884bc7b62470ae9e..d63688100a2f6024e9c3bb9abc461a44f81b4010 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Category/CategoryInterface.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Category/CategoryInterface.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Handler\Category; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface CategoryInterface diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Category/Curl.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Category/Curl.php index 030d3bbae3b838146a98cbe5ab103d4df0f61a17..0e8c6e7fd420731794c380ba4bbc9f141827ae89 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Category/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Category/Curl.php @@ -6,12 +6,12 @@ namespace Magento\Catalog\Test\Handler\Category; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProduct.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProduct.php index 6f3040413d8b2828a14ba6b59bbede44ace2758f..1205d69fa11a7dcb6717de0dc14256aa62b8c8b4 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProduct.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProduct.php @@ -7,13 +7,13 @@ namespace Magento\Catalog\Test\Handler\Curl; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; -use Mtf\Handler\Curl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Handler\Curl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class CreateProduct diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProductAttribute.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProductAttribute.php index f2873e71543a4324bcfc5dd814f5bfa3bbda963b..18a8f3598f0dc6e51c80d7a03a32620833e9a317 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProductAttribute.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProductAttribute.php @@ -8,12 +8,12 @@ namespace Magento\Catalog\Test\Handler\Curl; use Magento\Catalog\Test\Fixture\ProductAttribute; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class CreateProductAttribute diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Ui/CreateProduct.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Ui/CreateProduct.php index 1533bae18f6a5ba3d3a3731bc34b91e13df0a4c6..acabe4b5e64f481a8621d91187b3598e0e769b7f 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Ui/CreateProduct.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Ui/CreateProduct.php @@ -6,9 +6,9 @@ namespace Magento\Catalog\Test\Handler\Ui; -use Mtf\Factory\Factory; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Ui; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Ui; /** * Class CreateProduct diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Category/CatalogCategory.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Category/CatalogCategory.php index 85b7c74d02e426948ef12dd8f4b99ca90fafcc48..43666299a1ab36c41ed8a986498c032cb0de8859 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Category/CatalogCategory.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Category/CatalogCategory.php @@ -6,9 +6,9 @@ namespace Magento\Catalog\Test\Page\Category; -use Mtf\Client\Element\Locator; -use Mtf\Factory\Factory; -use Mtf\Page\Page; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Page\Page; /** * Class CatalogCategory diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Category/CatalogCategoryEdit.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Category/CatalogCategoryEdit.php index a8ee76b6665eefa6e64cc7185cad62019dbc7915..f7bcf562cd9a529a41ec6dece9afaa3732654f76 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Category/CatalogCategoryEdit.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Category/CatalogCategoryEdit.php @@ -7,9 +7,9 @@ namespace Magento\Catalog\Test\Page\Category; use Magento\Backend\Test\Block\FormPageActions; -use Mtf\Client\Element\Locator; -use Mtf\Factory\Factory; -use Mtf\Page\Page; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Page\Page; /** * Class CatalogCategoryEdit diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductActionAttributeEdit.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductActionAttributeEdit.php index dc40f0d8e28c4c050bc7071b152fdba24862b487..96ffb35c54577179c009d9efe371eb6368fd6700 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductActionAttributeEdit.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductActionAttributeEdit.php @@ -6,9 +6,9 @@ namespace Magento\Catalog\Test\Page\Product; -use Mtf\Client\Element\Locator; -use Mtf\Factory\Factory; -use Mtf\Page\Page; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Page\Page; /** * Class CatalogProductActionAttributeEdit diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/AssignProducts.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/AssignProducts.php index cfe500f811cb3bbac30ca0fb4e1b6a4dc0e203e4..9d31fe311d9f3921cd904b4221fdf1c77450606c 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/AssignProducts.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/AssignProducts.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class Product Repository diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogAttributeSet.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogAttributeSet.php index 87da5eb4b6f4b6bbda088e34eddf89a3a0c0ff26..1bba2984d00560d84daa61fcf4c9d548d13eae6b 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogAttributeSet.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogAttributeSet.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class CatalogProductTemplate diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductAttribute.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductAttribute.php index fc5aacdd8e4f3703ae7808336be7a9ce36f6dba0..0c2747857573b4d4703f21345cad1e4fa5d00bf5 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductAttribute.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductAttribute.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class CatalogProductAttribute diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.php index 43ee2aadb8f46eb0e2e764da540f0d8da4018e57..de287058e44a5b1d3d7889dc07624aa787eb3464 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Data for creation Catalog Product Simple. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductVirtual.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductVirtual.php index fd43d3c3aa3c8a0a24bb36e94d47bf4289560c7e..d62d7b3ddb5aa433dcfb2b39dfe3dcefad1be7de 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductVirtual.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductVirtual.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class CatalogProductVirtual diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Category.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Category.php index ecb9febd09a028a3876349d480620d0163bdb7be..61b458e067e50467545ee51b64a9f2c9945cc32a 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Category.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Category.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class CatalogCategory diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product.php index 7e83c80ef2015ccd2266384a3752bef27ffa83a3..4c9b8591ac0165fc4fb650583516c6d02405ffe6 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\Repository; use Magento\Catalog\Test\Fixture; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class Product Repository diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/ProductAttribute.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/ProductAttribute.php index 500c30275b08effd58294ac79e6d1bf6ff41532d..607a80eea4e09c3a8585952309f7264d1aa0ab63 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/ProductAttribute.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/ProductAttribute.php @@ -6,7 +6,7 @@ namespace Magento\Catalog\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class Product Attribute Repository diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateCategoryEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateCategoryEntityTest.php index 232fd29cfc8ca8f7e8b584cddc5ddcb8ec1c820a..ed8172c2fe9aec8101f659fc9b62255c7beb4c57 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateCategoryEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateCategoryEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Catalog\Test\TestCase\Category; use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Page\Adminhtml\CatalogCategoryEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogCategoryIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for CreateCategoryEntity diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/DeleteCategoryEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/DeleteCategoryEntityTest.php index 4148746b6e2c7dd0f362f30b7e92d49368a15e28..85496befeb3a330d1f42756ff6ab4faa830acdef 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/DeleteCategoryEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/DeleteCategoryEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Catalog\Test\TestCase\Category; use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Page\Adminhtml\CatalogCategoryEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogCategoryIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for DeleteCategoryEntity diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/UpdateCategoryEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/UpdateCategoryEntityTest.php index 8362d31c4fb4b0b0812909c4ee83906acb0a45bb..7b43b0189048d7e4a46ea540b10f0cd111809d72 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/UpdateCategoryEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/UpdateCategoryEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Catalog\Test\TestCase\Category; use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Page\Adminhtml\CatalogCategoryEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogCategoryIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for UpdateCategoryEntity diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AbstractAddRelatedProductsEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AbstractAddRelatedProductsEntityTest.php index 6865d2fad806209ac27e876932a44484fd0550e5..c0200a2ccb2a6773d15e45d75116b0316bd8e412 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AbstractAddRelatedProductsEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AbstractAddRelatedProductsEntityTest.php @@ -8,9 +8,9 @@ namespace Magento\Catalog\Test\TestCase\Product; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\TestCase\Injectable; /** * Class AbstractAddRelatedProductsEntityTest diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AbstractCompareProductsTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AbstractCompareProductsTest.php index 4fc5578dc456e7a3c583c76e575285d87e6367b0..b8bcce9c6c744a0e7981e26493ace658e3dd72a9 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AbstractCompareProductsTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AbstractCompareProductsTest.php @@ -11,11 +11,11 @@ use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Cms\Test\Page\CmsIndex; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\CustomerAccountLogin; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\InjectableFixture; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\TestCase\Injectable; /** * Abstract class for compare products class. @@ -41,7 +41,7 @@ abstract class AbstractCompareProductsTest extends Injectable /** * Browser. * - * @var Browser + * @var BrowserInterface */ protected $browser; @@ -99,14 +99,14 @@ abstract class AbstractCompareProductsTest extends Injectable * * @param CmsIndex $cmsIndex * @param CatalogProductView $catalogProductView - * @param Browser $browser + * @param BrowserInterface $browser * @param CustomerAccountLogin $customerAccountLogin * @return void */ public function __inject( CmsIndex $cmsIndex, CatalogProductView $catalogProductView, - Browser $browser, + BrowserInterface $browser, CustomerAccountLogin $customerAccountLogin ) { $this->cmsIndex = $cmsIndex; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateProductTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateProductTest.php index 209fb3f589ca64e82a2b810b19f612c2318164cb..251ff8c60d3c5c455c8b6a7de51b649f6cc62ff6 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateProductTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateProductTest.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\TestCase\Product; use Magento\Catalog\Test\Fixture\SimpleProduct; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; /** * Class CreateProductTest diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.php index 19bb0fa8f7b7680f7eadd268f79b5763ec300c41..02044246737b11def87d8f48b06884e10a9b530d 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.php @@ -10,7 +10,7 @@ use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for CreateSimpleProductEntity diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleWithCategoryTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleWithCategoryTest.php index bef726b3adb837e566ad44bdad1d4b29c1a20a86..01f3fecddcaa5c606a7309b25ebf200c27f7dc36 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleWithCategoryTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleWithCategoryTest.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\TestCase\Product; use Magento\Catalog\Test\Fixture\SimpleProduct; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; /** * Class CreateSimpleWithCategoryTest diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleWithCustomOptionsAndCategoryTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleWithCustomOptionsAndCategoryTest.php index 9cc4424bf05d4eb69ce3a46e41b9324de975d3c8..1f6c1e41b6ffb48ec3f605e4065a4cab3ad00855 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleWithCustomOptionsAndCategoryTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleWithCustomOptionsAndCategoryTest.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\TestCase\Product; use Magento\Catalog\Test\Fixture\Product; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; /** * Class CreateSimpleWithCustomOptionsAndCategoryTest diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateTest.php index 5eba66335092deb81db91270c38903f89267a628..b168b568d242026fc0b4ae7d1ccc39cc72fa899c 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateTest.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\TestCase\Product; use Magento\Catalog\Test\Fixture\SimpleProduct; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; /** * Class CreateTest diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest.php index c3662e3f685d9a68fa0ec215dd397c3d4280ca4f..b7e1955b146b5c24e9352f18b09f542078e14b58 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest.php @@ -10,7 +10,7 @@ use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Fixture\CatalogProductVirtual; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for CreateVirtualProductEntity diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualTest.php index 473a7a2599ae167d81d7c923150be5ffa60c2fcd..7e966ab4371dd040ad09d17b12a1a7c1c31d6af6 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualTest.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\TestCase\Product; use Magento\Catalog\Test\Fixture\VirtualProduct; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; /** * Class CreateTest diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CrosssellTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CrosssellTest.php index 0a454ded8bccb06bc2a51515d0065a16af29ed0d..2f71f814a2ac3147f8e3036edeff71f42cbf0540 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CrosssellTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CrosssellTest.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\TestCase\Product; use Magento\Catalog\Test\Fixture\Product; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; /** * Class CrosssellTest diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/EditSimpleProductTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/EditSimpleProductTest.php index b03a0cf4e53bd729a48e66079961fd7cdcfd6aac..75898fccf9a975810410b55fbab83354f9e426a6 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/EditSimpleProductTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/EditSimpleProductTest.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\TestCase\Product; use Magento\Catalog\Test\Fixture\SimpleProduct; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; /** * Edit products diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.php index 9b35f9081b3d9dce08beaed7a7b68b198c53ad3d..1cdff9dbf0ed156e55ea0d5bbc657f7628f7e02d 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.php @@ -8,8 +8,8 @@ namespace Magento\Catalog\Test\TestCase\Product; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for ProductTypeSwitchingOnCreation diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnUpdateTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnUpdateTest.php index c1b821dedefc439a15c28e204a2ef7ccc270189b..7448eb5eb32818475cdf0dad72b76306af6a9048 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnUpdateTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnUpdateTest.php @@ -10,8 +10,8 @@ use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; use Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Edit\Tab\Super\Config; use Magento\Downloadable\Test\Block\Adminhtml\Catalog\Product\Edit\Tab\Downloadable; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for ProductTypeSwitchingOnUpdating diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/RelatedProductTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/RelatedProductTest.php index 448e534fdab4046657878953020a29113798d018..2dce365a7bcfa61fc268ede139217b4f90b677f5 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/RelatedProductTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/RelatedProductTest.php @@ -8,8 +8,8 @@ namespace Magento\Catalog\Test\TestCase\Product; use Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\Related; use Magento\Catalog\Test\Fixture\Product; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; /** * Class RelatedProductTest diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UnassignCategoryTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UnassignCategoryTest.php index 69ca4b005decbb389f24876974686bb6a36be4cd..bf024a2a2a4b9c649e127c7c0498b9542a8503c8 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UnassignCategoryTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UnassignCategoryTest.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\TestCase\Product; use Magento\Catalog\Test\Fixture\Product; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; /** * Class UnassignCategoryTest diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.php index 248bd5a6a712ccf2ff6c7500fb361b1bfa61435e..33125f9bdffa3d735b8180e65108966a996380e0 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.php @@ -10,8 +10,8 @@ use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for UpdateProductSimpleEntity diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateVirtualProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateVirtualProductEntityTest.php index f3bfd46975fd77e31e4a3e8a9ca212d4c211e7b8..0868765d7b590ed722dcbf6cb943b594df8ce68a 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateVirtualProductEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateVirtualProductEntityTest.php @@ -10,8 +10,8 @@ use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Fixture\CatalogProductVirtual; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for UpdateVirtualProductEntity diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpsellTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpsellTest.php index b8e7bb4e70b4b1e69cd5cd7c1815dc7b26797ac3..23d3a2a581361685e00e55dc66d45ae2bc33fdc3 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpsellTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpsellTest.php @@ -8,8 +8,8 @@ namespace Magento\Catalog\Test\TestCase\Product; use Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\Upsell; use Magento\Catalog\Test\Fixture\Product; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; /** * Class UpsellTest diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.php index aca4fb8a4fc5a31de0459b8cfbaed9ad8a26122b..7ddb966ed99a38aed91201c7cb802a182f26d2b3 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.php @@ -11,7 +11,7 @@ use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetAdd; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for CreateAttributeSetEntity diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityFromProductPageTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityFromProductPageTest.php index 0dfee0e266d3da56efcafb11ce9d40ff64350ae6..d17441b09b1fce6815ac4fa4f70771fa8918b335 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityFromProductPageTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityFromProductPageTest.php @@ -8,9 +8,9 @@ namespace Magento\Catalog\Test\TestCase\ProductAttribute; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Fixture\CatalogProductSimple; -use Mtf\Fixture\FixtureFactory; -use Mtf\ObjectManager; -use Mtf\TestCase\Scenario; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\ObjectManager; +use Magento\Mtf\TestCase\Scenario; /** * Test Flow: diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityTest.php index c863602bbcdafa43834fdf311cf76fc758fb4b29..aa04e94af83eb8ef90a1c381fec6231479fe15ce 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityTest.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\TestCase\ProductAttribute; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; -use Mtf\ObjectManager; -use Mtf\TestCase\Scenario; +use Magento\Mtf\ObjectManager; +use Magento\Mtf\TestCase\Scenario; /** * Test Creation for CreateProductAttributeEntity diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.php index ef01e486b83364f32b474a9802aaa7dffecca5f0..5a717e86f09e5b88e9d815fcf1376a11d6d18914 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.php @@ -9,7 +9,7 @@ namespace Magento\Catalog\Test\TestCase\ProductAttribute; use Magento\Catalog\Test\Fixture\CatalogAttributeSet; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeNew; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Delete Attribute Set (Product Template) diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.php index 86b4b2db53f6747ed8afb5ee525dccc35ae1bb57..5e88db04c3ca11e84164274eddcee87cd8d0e789 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.php @@ -9,8 +9,8 @@ namespace Magento\Catalog\Test\TestCase\ProductAttribute; use Magento\Catalog\Test\Fixture\CatalogAttributeSet; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Delete Attribute Set (Product Template) diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteProductAttributeEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteProductAttributeEntityTest.php index 0375978ad724d64a69b4bf80c8e59df0fd5c0d9b..7303aaf305c9708988254098508e4eba3ebc58a0 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteProductAttributeEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteProductAttributeEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Catalog\Test\TestCase\ProductAttribute; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeNew; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for UpdateProductAttributeEntity diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteSystemProductAttributeTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteSystemProductAttributeTest.php index ccb1ccadf1b6d231301ab8109d08ae5c933e423f..5bf2a74ee1e93d2db12999e18d9e8743c6dabe5f 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteSystemProductAttributeTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteSystemProductAttributeTest.php @@ -8,7 +8,7 @@ namespace Magento\Catalog\Test\TestCase\ProductAttribute; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Cover DeleteSystemProductAttribute with functional tests designed for automation diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteUsedInConfigurableProductAttributeTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteUsedInConfigurableProductAttributeTest.php index 7437d0e488df961761f7f2053b8cf43e83e6554a..9485ebe8e0841755111898351c5b0d8fb3fb8f93 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteUsedInConfigurableProductAttributeTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteUsedInConfigurableProductAttributeTest.php @@ -10,7 +10,7 @@ use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeNew; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Delete Used in Configurable ProductAttribute diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.php index dc1e25e7703f551d871355d400100602a43d1789..0939c76aadbe4c131169f2cbb7bed5ffc2d95a65 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.php @@ -10,7 +10,7 @@ use Magento\Catalog\Test\Fixture\CatalogAttributeSet; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for UpdateAttributeSetTest diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.php index a8f77b33c44a2922e625ecbd8547ff32def3314d..b9e8ed962b3f0f1fd0e3e94ebe5d3b44d8f8726c 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.php @@ -10,7 +10,7 @@ use Magento\Catalog\Test\Fixture\CatalogAttributeSet; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeNew; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for UpdateProductAttributeEntity diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddAttributeToProductTemplateStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddAttributeToProductTemplateStep.php index 2224e63068c1cfe785d57c443c79b85a791fdbd1..ef52d2a94f01577856eab8de4218e28c68bb6520 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddAttributeToProductTemplateStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddAttributeToProductTemplateStep.php @@ -10,8 +10,8 @@ use Magento\Catalog\Test\Fixture\CatalogAttributeSet; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestStep\TestStepInterface; /** * Move attribute To attribute set. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddNewAttributeFromProductPageStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddNewAttributeFromProductPageStep.php index 5c220ce185db9719130bc497942a8314d454e32e..58d29f12e4d67eedbaf2ebfc01549fd8b2a2a95d 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddNewAttributeFromProductPageStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddNewAttributeFromProductPageStep.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\TestStep; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Add custom attribute to product from product page. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddNewAttributeStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddNewAttributeStep.php index 84d3f05f7adec5cc2697e0b536fbf129e21eddd0..4b446c35fabfa27b399bf7ceda19e67d0e7f59b7 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddNewAttributeStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddNewAttributeStep.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\TestStep; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeIndex; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Add New Attribute from Attribute index page. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductStep.php index 299dc6d37bf276cf3ddce9a8999994ec7709d22d..28bc0fc4eb20698a7b8f0a4f90209be03f9cea48 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductStep.php @@ -6,9 +6,9 @@ namespace Magento\Catalog\Test\TestStep; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Create product using handler. @@ -55,7 +55,6 @@ class CreateProductStep implements TestStepInterface if ($product->hasData('id') === false) { $product->persist(); } - - return ['product' => $product]; + return ['product' => $product]; } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductTemplateStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductTemplateStep.php index 7464f5c1d19b9218370833e91055ffa89586fc5b..e8b106042af164484fbc0f73c6ad92deba48eafc 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductTemplateStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductTemplateStep.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\TestStep; use Magento\Catalog\Test\Fixture\CatalogAttributeSet; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Create product attribute template using handler. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductsStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductsStep.php index 914c92bd68d082288e22ea28523fef7f1244664c..74adfb27e1075d828970ffbc81df67f9dffe087e 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductsStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductsStep.php @@ -6,9 +6,9 @@ namespace Magento\Catalog\Test\TestStep; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class CreateProductsStep diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/DeleteAttributeStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/DeleteAttributeStep.php index b485cf5956b5936b91127cdc1caa2e6e1cd338f0..0c028ca6a4802f79f8efc2d5eb2c7cd040086758 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/DeleteAttributeStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/DeleteAttributeStep.php @@ -9,7 +9,7 @@ namespace Magento\Catalog\Test\TestStep; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeNew; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Delete product attribute. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/FillAttributeFormOnProductPageStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/FillAttributeFormOnProductPageStep.php index 63b6c188f1a9677427c6afdef9ac2f110b9882a2..2d867c8aaa5d114d958081f59ec7e5808dd7ad73 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/FillAttributeFormOnProductPageStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/FillAttributeFormOnProductPageStep.php @@ -8,7 +8,7 @@ namespace Magento\Catalog\Test\TestStep; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Fill custom attribute form on product page. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/FillAttributeFormStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/FillAttributeFormStep.php index b00e58a291fb366adeb93894f057302b202a9440..265871d80b6dc1cc52d25a2306778988fe06c2a1 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/FillAttributeFormStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/FillAttributeFormStep.php @@ -8,7 +8,7 @@ namespace Magento\Catalog\Test\TestStep; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeNew; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Fill attribute form on attribute page. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/OpenProductAttributesPageStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/OpenProductAttributesPageStep.php index a357b802340b2a68281654a6803f25b09c3e7624..39f35eef6a528ddf8c0b8fb5a95a24a0b4d89f4b 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/OpenProductAttributesPageStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/OpenProductAttributesPageStep.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\TestStep; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeIndex; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Open Product Attribute Index Page. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/OpenProductOnBackendStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/OpenProductOnBackendStep.php index 99cacb3269eeed8da9637bb8191c1f25e1821327..d6f6f73cd5b5bf924223a1f7bdabdd550e371b3f 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/OpenProductOnBackendStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/OpenProductOnBackendStep.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\TestStep; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; -use Mtf\Fixture\InjectableFixture; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\TestStep\TestStepInterface; /** * Open product on backend. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/OpenProductsOnFrontendStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/OpenProductsOnFrontendStep.php index 8be5acf25e0492728e2c867fb8c7f8cb80a67be6..cae7f71355dac55e11b51f7a4b842d38829853bc 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/OpenProductsOnFrontendStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/OpenProductsOnFrontendStep.php @@ -6,8 +6,8 @@ namespace Magento\Catalog\Test\TestStep; -use Mtf\Client\Browser; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Open products on frontend via url. @@ -24,7 +24,7 @@ class OpenProductsOnFrontendStep implements TestStepInterface /** * Browser. * - * @var Browser + * @var BrowserInterface */ protected $browser; @@ -33,9 +33,9 @@ class OpenProductsOnFrontendStep implements TestStepInterface * * @constructor * @param array $products - * @param Browser $browser + * @param BrowserInterface $browser */ - public function __construct(array $products, Browser $browser) + public function __construct(array $products, BrowserInterface $browser) { $this->products = $products; $this->browser = $browser; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeOnProductPageStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeOnProductPageStep.php index 5cccb4c6a340cb8e6b5b84855ebb47adccded100..38d6ebdf1b59da446da19ab4b4ac4d083e3f6aa9 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeOnProductPageStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeOnProductPageStep.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\TestStep; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Click "Save" button on attribute form on product page. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeStep.php index 60b9acf32ac9d4e7122a0ccee11b50f016b95940..0651b72bc377fa796d0bf16a66e806237f45c105 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeStep.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\TestStep; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeNew; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Save attribute on attribute page. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveProductStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveProductStep.php index d592470490cd7380c930eef9d73636b04bc59cd1..9d1e5d899686bb23387b1f0cbf08f9156582ff48 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveProductStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveProductStep.php @@ -7,8 +7,8 @@ namespace Magento\Catalog\Test\TestStep; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; -use Mtf\Fixture\InjectableFixture; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\TestStep\TestStepInterface; /** * Save product step. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveProductTemplateStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveProductTemplateStep.php index 09f466651040e94623c518b356431378758f0737..759f036f3f818a5e024b9ae80253c4d0895737eb 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveProductTemplateStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveProductTemplateStep.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Test\TestStep; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetEdit; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Save attributeSet on attribute set page. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SetDefaultAttributeValueStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SetDefaultAttributeValueStep.php index 1f1c6a2b71bcb0ad5914a3b0ce6d1f7fd865ebaa..7ab1e215e9c16093e06160a2e1532763120de18a 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SetDefaultAttributeValueStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SetDefaultAttributeValueStep.php @@ -8,8 +8,8 @@ namespace Magento\Catalog\Test\TestStep; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestStep\TestStepInterface; /** * Set default attribute value. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/constraint.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/constraint.xml index 07d18daff56793e2cdd7bd2dbc7b65abcf886065..9ad414f26cb118f39e76886717e9c656a9767a81 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/constraint.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/constraint.xml @@ -10,7 +10,7 @@ <severity>high</severity> <require> <productGrid class="Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> </require> </assertProductInGrid> <assertProductSaveMessage module="Magento_Catalog"> @@ -23,14 +23,14 @@ <severity>low</severity> <require> <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> </require> </assertProductOutOfStock> <assertProductInStock module="Magento_Catalog"> <severity>low</severity> <require> <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> </require> </assertProductInStock> <assertProductVisibleInCategory module="Magento_Catalog"> @@ -39,7 +39,7 @@ <catalogCategoryView class="Magento\Catalog\Test\Page\Category\CatalogCategoryView" /> <cmsIndex class="Magento\Cms\Test\Page\CmsIndex" /> <category class="Magento\Catalog\Test\Fixture\Category" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> </require> </assertProductVisibleInCategory> <assertProductNotVisibleInCategory module="Magento_Catalog"> @@ -48,7 +48,7 @@ <catalogCategoryView class="Magento\Catalog\Test\Page\Category\CatalogCategoryView" /> <cmsIndex class="Magento\Cms\Test\Page\CmsIndex" /> <category class="Magento\Catalog\Test\Fixture\Category" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> </require> </assertProductNotVisibleInCategory> <assertProductSearchableBySku module="Magento_Catalog"> @@ -56,7 +56,7 @@ <require> <catalogSearchResult class="Magento\CatalogSearch\Test\Page\CatalogsearchResult" /> <cmsIndex class="Magento\Cms\Test\Page\CmsIndex" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> </require> </assertProductSearchableBySku> <assertProductInCategory module="Magento_Catalog"> @@ -64,7 +64,7 @@ <require> <catalogCategoryView class="Magento\Catalog\Test\Page\Category\CatalogCategoryView" /> <cmsIndex class="Magento\Cms\Test\Page\CmsIndex" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> <category class="Magento\Catalog\Test\Fixture\Category" /> </require> </assertProductInCategory> @@ -72,7 +72,7 @@ <severity>low</severity> <require> <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> <checkoutCart class="Magento\Checkout\Test\Page\CheckoutCart" /> </require> </assertProductInCart> @@ -80,42 +80,42 @@ <severity>middle</severity> <require> <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> </require> </assertProductPage> <assertProductGroupedPriceOnProductPage module="Magento_Catalog"> <severity>low</severity> <require> <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> </require> </assertProductGroupedPriceOnProductPage> <assertProductSpecialPriceOnProductPage module="Magento_Catalog"> <severity>low</severity> <require> <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> </require> </assertProductSpecialPriceOnProductPage> <assertProductTierPriceOnProductPage module="Magento_Catalog"> <severity>low</severity> <require> <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> </require> </assertProductTierPriceOnProductPage> <assertProductCustomOptionsOnProductPage module="Magento_Catalog"> <severity>low</severity> <require> <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> </require> </assertProductCustomOptionsOnProductPage> <assertProductForm module="Magento_Catalog"> <severity>low</severity> <require> <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> </require> </assertProductForm> <assertAddToCartButtonAbsent module="Magento_Catalog"> @@ -129,7 +129,7 @@ <require> <catalogCategoryView class="Magento\Catalog\Test\Page\Category\CatalogCategoryView" /> <cmsIndex class="Magento\Cms\Test\Page\CmsIndex" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> <category class="Magento\Catalog\Test\Fixture\Category" /> <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> <catalogSearchResult class="Magento\CatalogSearch\Test\Page\CatalogsearchResult" /> @@ -139,14 +139,14 @@ <severity>low</severity> <require> <productGrid class="Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> </require> </assertProductSkuAutoGenerated> <assertProductGroupedPriceOnProductPage module="Magento_Catalog"> <severity>low</severity> <require> <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> </require> </assertProductGroupedPriceOnProductPage> <assertProductAttributeSaveMessage module="Magento_Catalog"> @@ -171,7 +171,7 @@ <productGrid class="Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex" /> <productSetEdit class="Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetEdit" /> <productSet class="Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex" /> - <fixtureFactory class="Mtf\Fixture\FixtureFactory" /> + <fixtureFactory class="Magento\Mtf\Fixture\FixtureFactory" /> </require> </assertAddedProductAttributeOnProductForm> <assertProductAttributeIsRequired module="Magento_Catalog"> @@ -289,7 +289,7 @@ <assertCategoryAbsenceOnFrontend module="Magento_Catalog"> <severity>low</severity> <require> - <browser class="Mtf\Client\Browser" /> + <browser class="Magento\Mtf\Client\Browser" /> <categoryView class="Magento\Catalog\Test\Page\Category\CatalogCategoryView" /> <category class="Magento\Catalog\Test\Fixture\Category" /> </require> @@ -326,7 +326,7 @@ <assertProductTemplateOnProductForm module="Magento_Catalog"> <severity>high</severity> <require> - <fixtureFactory class="Mtf\Fixture\FixtureFactory" /> + <fixtureFactory class="Magento\Mtf\Fixture\FixtureFactory" /> <attributeSet class="Magento\Catalog\Test\Fixture\CatalogAttributeSet" /> <productEdit class="Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit" /> <productGrid class="Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex" /> @@ -394,7 +394,7 @@ <assertProductDuplicatedInGrid module="Magento_Catalog"> <severity>low</severity> <require> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> <productGrid class="Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex" /> </require> </assertProductDuplicatedInGrid> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/scenario.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/scenario.xml index 34945296329446a75a68357b60f381cbd8514909..fadb2635416f42381372ceccab06118447115b80 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/scenario.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/scenario.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<scenarios xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/Mtf/Config/etc/scenario.xsd"> +<scenarios xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/Magento/Mtf/Config/etc/scenario.xsd"> <scenario name="CreateProductAttributeEntityFromProductPageTest" module="Magento_Catalog"> <methods> <method name="test"> diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog.php index 8c8c18e6039b4e169076cd68a83c02023ab40b70..e667956e1f8867e4f94faad6e9962feb634c7b7a 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog.php @@ -6,9 +6,9 @@ namespace Magento\CatalogRule\Test\Block\Adminhtml\Promo; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\SimpleElement; use Magento\Backend\Test\Block\Widget\Grid; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; /** * Backend catalog price rule grid. @@ -61,7 +61,7 @@ class Catalog extends Grid * Return row with given catalog price rule name. * * @param string $ruleName - * @return Element + * @return SimpleElement */ public function getGridRow($ruleName) { diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog/Edit/PromoForm.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog/Edit/PromoForm.php index 143227ba2c967a00c959b381f010ce4c338480bc..ed6797e5656997827bc7dda19f5dcd1af66874cd 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog/Edit/PromoForm.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog/Edit/PromoForm.php @@ -7,8 +7,9 @@ namespace Magento\CatalogRule\Test\Block\Adminhtml\Promo\Catalog\Edit; use Magento\Backend\Test\Block\Widget\FormTabs; -use Mtf\Client\Element; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Client\Element; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class PromoForm @@ -20,11 +21,11 @@ class PromoForm extends FormTabs * Fill form with tabs * * @param FixtureInterface $fixture - * @param Element $element + * @param SimpleElement $element * @param array $replace * @return $this|FormTabs */ - public function fill(FixtureInterface $fixture, Element $element = null, array $replace = null) + public function fill(FixtureInterface $fixture, SimpleElement $element = null, array $replace = null) { $tabs = $this->getFieldsByTabs($fixture); if ($replace) { diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog/Edit/Tab/Conditions.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog/Edit/Tab/Conditions.php index 3d4cc6d56726cdc26730562d91e5f6d1aa6ae402..2ad3ea93baad5a58d2bac8b5abe954c3e26c6046 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog/Edit/Tab/Conditions.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog/Edit/Tab/Conditions.php @@ -6,9 +6,9 @@ namespace Magento\CatalogRule\Test\Block\Adminhtml\Promo\Catalog\Edit\Tab; +use Magento\Mtf\Factory\Factory; use Magento\Backend\Test\Block\Widget\Tab; -use Mtf\Client\Element; -use Mtf\Factory\Factory; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class Conditions @@ -28,10 +28,10 @@ class Conditions extends Tab * Fill condition options * * @param array $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return void */ - public function fillFormTab(array $fields, Element $element = null) + public function fillFormTab(array $fields, SimpleElement $element = null) { $data = $this->dataMapping($fields); diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Conditions.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Conditions.php index 6bc6032c2c407400f53cb2d497e1865977a6986f..a66e4e04959b60d95b2da5156842a7fe3fbd9b36 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Conditions.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Conditions.php @@ -5,8 +5,8 @@ */ namespace Magento\CatalogRule\Test\Block; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Conditions diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleAppliedCatalogPage.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleAppliedCatalogPage.php index 7de205897b22e31782387ef60837455959b23902..7b5c27f818e076576269bc132900d85e30849baa 100755 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleAppliedCatalogPage.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleAppliedCatalogPage.php @@ -9,7 +9,7 @@ namespace Magento\CatalogRule\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Category\CatalogCategoryView; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCatalogPriceRuleAppliedCatalogPage diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleAppliedProductPage.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleAppliedProductPage.php index f5cf729f3b3836fb9458f2165ebaefd86a3ed92b..fb49621cc044cc1fbdcdc978cb5b20430ac5ab90 100755 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleAppliedProductPage.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleAppliedProductPage.php @@ -10,7 +10,7 @@ use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Category\CatalogCategoryView; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCatalogPriceRuleAppliedProductPage diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleAppliedShoppingCart.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleAppliedShoppingCart.php index 3ff64a39e77bb871a70b694b8459565788c21d22..e1a3b8bccf34d058010bb54f1633164b42403de1 100755 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleAppliedShoppingCart.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleAppliedShoppingCart.php @@ -11,7 +11,7 @@ use Magento\Catalog\Test\Page\Category\CatalogCategoryView; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Checkout\Test\Page\CheckoutCart; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCatalogPriceRuleAppliedShoppingCart diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleForm.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleForm.php index 1247ca4e175bb0b79aab785f52a236eeff209b79..5fc6a6d7bb73487dc826bfb80cb0a21cdb89e18f 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleForm.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleForm.php @@ -9,7 +9,7 @@ namespace Magento\CatalogRule\Test\Constraint; use Magento\CatalogRule\Test\Fixture\CatalogRule; use Magento\CatalogRule\Test\Page\Adminhtml\CatalogRuleIndex; use Magento\CatalogRule\Test\Page\Adminhtml\CatalogRuleNew; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCatalogPriceRuleForm diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleInGrid.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleInGrid.php index bf157e0a4bc6f9109a132ccbc17dd464e39a0747..88ffb1308f2b4aa8c7e5aea4d2240c6391b1c188 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleInGrid.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleInGrid.php @@ -8,7 +8,7 @@ namespace Magento\CatalogRule\Test\Constraint; use Magento\CatalogRule\Test\Fixture\CatalogRule; use Magento\CatalogRule\Test\Page\Adminhtml\CatalogRuleIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCatalogPriceRuleInGrid diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleNotInGrid.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleNotInGrid.php index 0a8c3522d38792fbdc447d72fe06a60c5aec85f6..c38cab63849357632c624c3a6d0ac7336c2f0629 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\CatalogRule\Test\Constraint; use Magento\CatalogRule\Test\Fixture\CatalogRule; use Magento\CatalogRule\Test\Page\Adminhtml\CatalogRuleIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCatalogPriceRuleNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleNoticeMessage.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleNoticeMessage.php index 0c1e8c41d7ed7444d268babb22b4a1a490880a78..8106e0062b1edef06a431bbc0ee66186d58af4bb 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleNoticeMessage.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleNoticeMessage.php @@ -7,7 +7,7 @@ namespace Magento\CatalogRule\Test\Constraint; use Magento\CatalogRule\Test\Page\Adminhtml\CatalogRuleIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCatalogPriceRuleNoticeMessage diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleSuccessDeleteMessage.php index da703e0b1e6f15935aba738054043493d07aa94f..30729236399d7e4781cd101599a894dc4251c9a6 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleSuccessDeleteMessage.php @@ -7,7 +7,7 @@ namespace Magento\CatalogRule\Test\Constraint; use Magento\CatalogRule\Test\Page\Adminhtml\CatalogRuleIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCatalogPriceRuleSuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleSuccessSaveMessage.php index 46fa4556486e017db7cb6278764ea8c26d4bde8b..95e32ec3bd7e04a2c219f715bbc803c11c7dbd1a 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleSuccessSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\CatalogRule\Test\Constraint; use Magento\CatalogRule\Test\Page\Adminhtml\CatalogRuleIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCatalogPriceRuleSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogPriceRule.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogPriceRule.php index d14ef23b1bfd00f81aeee848c75386f07575bd77..ff33ac103f3b04906254cafb8c32cc7ba888897d 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogPriceRule.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogPriceRule.php @@ -7,8 +7,8 @@ namespace Magento\CatalogRule\Test\Fixture; use Magento\CatalogRule\Test\Repository\CatalogPriceRule as Repository; -use Mtf\Factory\Factory; -use Mtf\Fixture\DataFixture; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Fixture\DataFixture; /** * Class CatalogPriceRule diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule.php index 910c5a91f0bedc0a8108eb4e1dc49f276efe2647..087f07330c5c8f64492e3882035e83e353617275 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule.php @@ -6,7 +6,7 @@ namespace Magento\CatalogRule\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class CatalogRule diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule/Conditions.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule/Conditions.php index 714f7069486cb9a3d919975c95b98ab99d6b2aac..548477e346f9a2c75ac305ce9a912ef7c8409cd5 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule/Conditions.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule/Conditions.php @@ -6,8 +6,8 @@ namespace Magento\CatalogRule\Test\Fixture\CatalogRule; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Conditions @@ -23,7 +23,7 @@ class Conditions implements FixtureInterface protected $data = []; /** - * @var \Mtf\Fixture\FixtureFactory + * @var \Magento\Mtf\Fixture\FixtureFactory */ protected $fixtureFactory; diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/Conditions.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/Conditions.php index 9b66a1bdd3be052aa1c3d5156cf815e23c772d12..10b7388a42aaf1e2badf0f77d18ca735fd31a304 100755 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/Conditions.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/Conditions.php @@ -8,8 +8,8 @@ namespace Magento\CatalogRule\Test\Fixture; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Fixture\CatalogProductSimple\CategoryIds; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Conditions diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/Product/Category.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/Product/Category.php index c92ec7fe231f97c0fb6748a1b411d8e72a1f7e79..ed8f775509728edac53ffaf3b3fd68fbea7a0c01 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/Product/Category.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/Product/Category.php @@ -6,8 +6,8 @@ namespace Magento\CatalogRule\Test\Fixture\Product; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Category @@ -18,7 +18,7 @@ use Mtf\Fixture\FixtureInterface; class Category implements FixtureInterface { /** - * @var \Mtf\Fixture\FixtureFactory + * @var \Magento\Mtf\Fixture\FixtureFactory */ protected $fixtureFactory; diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Handler/CatalogRule/CatalogRuleInterface.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Handler/CatalogRule/CatalogRuleInterface.php index 7e94d6c9874c35bfca976f6d10b8d429a3950d62..5ea223b692be3f162461c482298b3e1e13b2d3a0 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Handler/CatalogRule/CatalogRuleInterface.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Handler/CatalogRule/CatalogRuleInterface.php @@ -5,7 +5,7 @@ */ namespace Magento\CatalogRule\Test\Handler\CatalogRule; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface CatalogRuleInterface diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Handler/CatalogRule/Curl.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Handler/CatalogRule/Curl.php index 8225dc55dcb4851a31546629b51c49e574a36a0a..d1b01f2b89aa9294251b7519383697c0ade5ca0d 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Handler/CatalogRule/Curl.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Handler/CatalogRule/Curl.php @@ -8,11 +8,11 @@ namespace Magento\CatalogRule\Test\Handler\CatalogRule; use Magento\Backend\Test\Handler\Conditions; use Magento\CatalogRule\Test\Handler\CatalogRule; -use Mtf\Fixture\FixtureInterface; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Repository/CatalogPriceRule.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Repository/CatalogPriceRule.php index 3aad355402c9f601609b2ce8001a51ceac403a76..1a9b4268b9ffb8271c56725944d648ff7894a5c6 100755 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Repository/CatalogPriceRule.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Repository/CatalogPriceRule.php @@ -6,7 +6,7 @@ namespace Magento\CatalogRule\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class CatalogPriceRule Repository diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Repository/CatalogRule.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Repository/CatalogRule.php index a2d1254e13cff783ed6580f618c5ddc0ac7b246a..5e67cddc6eb11062f4bd52a18f11f607d40f6e75 100755 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Repository/CatalogRule.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Repository/CatalogRule.php @@ -6,7 +6,7 @@ namespace Magento\CatalogRule\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class CatalogRule @@ -88,5 +88,16 @@ class CatalogRule extends AbstractRepository 'simple_action' => 'By Fixed Amount', 'discount_amount' => '10', ]; + + $this->_data['catalog_price_rule_all_groups'] = [ + 'name' => 'catalog_price_rule_all_groups_%isolation%', + 'description' => '-50% of price, Priority = 0', + 'is_active' => 'Active', + 'website_ids' => ['Main Website'], + 'customer_group_ids' => ['NOT LOGGED IN', 'General', 'Wholesale', 'Retailer'], + 'sort_order' => '0', + 'simple_action' => 'By Percentage of the Original Price', + 'discount_amount' => '50', + ]; } } diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/AbstractCatalogRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/AbstractCatalogRuleEntityTest.php index 83535be670a8e0c9cb62b9c6624fac3655b11cd2..5602c65632c81c6728e499ad361aaddc3d86e382 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/AbstractCatalogRuleEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/AbstractCatalogRuleEntityTest.php @@ -10,8 +10,8 @@ use Magento\Backend\Test\Page\Adminhtml\AdminCache; use Magento\CatalogRule\Test\Fixture\CatalogRule; use Magento\CatalogRule\Test\Page\Adminhtml\CatalogRuleIndex; use Magento\CatalogRule\Test\Page\Adminhtml\CatalogRuleNew; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Parent class for CatalogRule tests diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/DeleteCatalogPriceRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/DeleteCatalogPriceRuleEntityTest.php index 13fb5e1a6c3b72543c05394574268a3f67c14242..959edfcf46434fe1522a305970123c5c28509582 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/DeleteCatalogPriceRuleEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/DeleteCatalogPriceRuleEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\CatalogRule\Test\TestCase; use Magento\CatalogRule\Test\Fixture\CatalogRule; use Magento\CatalogRule\Test\Page\Adminhtml\CatalogRuleIndex; use Magento\CatalogRule\Test\Page\Adminhtml\CatalogRuleNew; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Delete CatalogPriceRuleEntity diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestStep/CreateCatalogRuleStep.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestStep/CreateCatalogRuleStep.php new file mode 100644 index 0000000000000000000000000000000000000000..f17c6b396216012c6824e9f216131643944a1eeb --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestStep/CreateCatalogRuleStep.php @@ -0,0 +1,62 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\CatalogRule\Test\TestStep; + +use Mtf\Fixture\FixtureFactory; +use Mtf\TestStep\TestStepInterface; + +/** + * Creating catalog rule + */ +class CreateCatalogRuleStep implements TestStepInterface +{ + /** + * Catalog Rule dataset name + * + * @var string + */ + protected $catalogRule; + + /** + * Factory for Fixture + * + * @var FixtureFactory + */ + protected $fixtureFactory; + + /** + * Preparing step properties + * + * @constructor + * @param FixtureFactory $fixtureFactory + * @param string $catalogRule + */ + public function __construct(FixtureFactory $fixtureFactory, $catalogRule) + { + $this->fixtureFactory = $fixtureFactory; + $this->catalogRule = $catalogRule; + } + + /** + * Create catalog rule + * + * @return array + */ + public function run() + { + $result['catalogRule'] = null; + if ($this->catalogRule != '-') { + $catalogRule = $this->fixtureFactory->createByCode( + 'catalogRule', + ['dataSet' => $this->catalogRule] + ); + $catalogRule->persist(); + $result['catalogRule'] = $catalogRule; + } + return $result; + } +} diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestStep/DeleteAllCatalogRulesStep.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestStep/DeleteAllCatalogRulesStep.php index 9bffed37d4ee1a69abef9631df5fae450b6cf1d4..fd52826d9bc8181412dd2979f4147ffd91ececed 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestStep/DeleteAllCatalogRulesStep.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestStep/DeleteAllCatalogRulesStep.php @@ -8,7 +8,7 @@ namespace Magento\CatalogRule\Test\TestStep; use Magento\CatalogRule\Test\Page\Adminhtml\CatalogRuleIndex; use Magento\CatalogRule\Test\Page\Adminhtml\CatalogRuleNew; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class DeleteAllCatalogRulesStep diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Block/Advanced/Form.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Block/Advanced/Form.php index e632e6c1e0856aa0329c75df7bf36000f76b60d9..c98608a606314a018beb1b4baeb7c173dfd4e5d1 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Block/Advanced/Form.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Block/Advanced/Form.php @@ -6,10 +6,11 @@ namespace Magento\CatalogSearch\Test\Block\Advanced; -use Mtf\Block\Form as ParentForm; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Block\Form as ParentForm; +use Magento\Mtf\Client\Element; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\Element\SimpleElement; /** * Advanced search form. @@ -58,10 +59,10 @@ class Form extends ParentForm * Fill the root form. * * @param FixtureInterface $fixture - * @param Element|null $element + * @param SimpleElement|null $element * @return $this */ - public function fill(FixtureInterface $fixture, Element $element = null) + public function fill(FixtureInterface $fixture, SimpleElement $element = null) { // Prepare price data $data = $fixture->getData(); @@ -83,9 +84,9 @@ class Form extends ParentForm * * @param FixtureInterface $fixture * @param array $fields - * @param Element $element + * @param SimpleElement $element */ - public function fillCustom(FixtureInterface $fixture, array $fields, Element $element = null) + public function fillCustom(FixtureInterface $fixture, array $fields, SimpleElement $element = null) { $data = $fixture->getData('fields'); $dataForMapping = array_intersect_key($data, array_flip($fields)); @@ -101,7 +102,7 @@ class Form extends ParentForm public function getFormLabels() { $labels = []; - $elements = $this->_rootElement->find($this->fieldSelector, Locator::SELECTOR_XPATH)->getElements(); + $elements = $this->_rootElement->getElements($this->fieldSelector, Locator::SELECTOR_XPATH); foreach ($elements as $element) { $labels[] = $element->find($this->labelSelector)->getText(); } diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Block/Advanced/Result.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Block/Advanced/Result.php index ad9cbccc73aa182db94f93928636792ab8449e59..f62cc2ddfb1801dd39fa2b704fcb65574db6f4c1 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Block/Advanced/Result.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Block/Advanced/Result.php @@ -6,8 +6,8 @@ namespace Magento\CatalogSearch\Test\Block\Advanced; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Result diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertAdvancedSearchProductsResult.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertAdvancedSearchProductsResult.php index 93246a5256eb577ed31f046305993fb5c0ccd9e0..3eb7492a8f74683ea7146473d2aeab0fc1892cc3 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertAdvancedSearchProductsResult.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertAdvancedSearchProductsResult.php @@ -8,7 +8,7 @@ namespace Magento\CatalogSearch\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\CatalogSearch\Test\Page\AdvancedResult; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertAdvancedSearchProductsResult diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertCatalogSearchResult.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertCatalogSearchResult.php index df52f62ce4f5d9f34597e12d7d40b86e825d06c9..410a7134bae6ef66ba0a2e60acb2b7ae677e6aa0 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertCatalogSearchResult.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertCatalogSearchResult.php @@ -8,7 +8,7 @@ namespace Magento\CatalogSearch\Test\Constraint; use Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; use Magento\CatalogSearch\Test\Page\AdvancedResult; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Assert search results. diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertProductCanBeOpenedFromSearchResult.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertProductCanBeOpenedFromSearchResult.php index 444b6ffba31091fd53eeb736ce08b61936faec29..337398e208c1697da9ec5a19a631c7b1f82c8cce 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertProductCanBeOpenedFromSearchResult.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertProductCanBeOpenedFromSearchResult.php @@ -6,7 +6,7 @@ namespace Magento\CatalogSearch\Test\Constraint; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; use Magento\CatalogSearch\Test\Page\AdvancedResult; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchSynonymMassActionNotOnFrontend.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchSynonymMassActionNotOnFrontend.php index 928e62035bc77f2fb08505ab7a198521e89bab2f..1f1eeb86e3d69f3bc2371f42a45658c3c5693c4f 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchSynonymMassActionNotOnFrontend.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchSynonymMassActionNotOnFrontend.php @@ -7,8 +7,8 @@ namespace Magento\CatalogSearch\Test\Constraint; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSearchSynonymMassActionNotOnFrontend @@ -25,14 +25,14 @@ class AssertSearchSynonymMassActionNotOnFrontend extends AbstractConstraint * * @param array $searchTerms * @param CmsIndex $cmsIndex - * @param Browser $browser + * @param BrowserInterface $browser * @param AssertSearchSynonymNotOnFrontend $assertSearchSynonymNotOnFrontend * @return void */ public function processAssert( array $searchTerms, CmsIndex $cmsIndex, - Browser $browser, + BrowserInterface $browser, AssertSearchSynonymNotOnFrontend $assertSearchSynonymNotOnFrontend ) { foreach ($searchTerms as $term) { diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchSynonymNotOnFrontend.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchSynonymNotOnFrontend.php index b345274b34b46e16a3ea52848f5546b61906f4b8..63d60cf7c53f8f168ccbb2049fec3d0e8c9de2da 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchSynonymNotOnFrontend.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchSynonymNotOnFrontend.php @@ -8,8 +8,8 @@ namespace Magento\CatalogSearch\Test\Constraint; use Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSearchSynonymNotOnFrontend @@ -26,10 +26,10 @@ class AssertSearchSynonymNotOnFrontend extends AbstractConstraint * * @param CmsIndex $cmsIndex * @param CatalogSearchQuery $searchTerm - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ - public function processAssert(CmsIndex $cmsIndex, Browser $browser, CatalogSearchQuery $searchTerm) + public function processAssert(CmsIndex $cmsIndex, BrowserInterface $browser, CatalogSearchQuery $searchTerm) { $cmsIndex->open()->getSearchBlock()->search($searchTerm->getSynonymFor()); \PHPUnit_Framework_Assert::assertNotEquals( diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermForm.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermForm.php index bdde33a21d92dcc7079a18fc5c17b3b6586b60bb..1a9dd4b4b7ea742635fa99b4a3061998970e8783 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermForm.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermForm.php @@ -9,7 +9,7 @@ namespace Magento\CatalogSearch\Test\Constraint; use Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; use Magento\CatalogSearch\Test\Page\Adminhtml\CatalogSearchEdit; use Magento\CatalogSearch\Test\Page\Adminhtml\CatalogSearchIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSearchTermForm diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermInGrid.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermInGrid.php index bb03c1a485b19ff5ae6815436db6ec022e01e94a..9307dfff97a03b7dbd389b841707ae1bc5a367e0 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermInGrid.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermInGrid.php @@ -8,7 +8,7 @@ namespace Magento\CatalogSearch\Test\Constraint; use Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; use Magento\CatalogSearch\Test\Page\Adminhtml\CatalogSearchIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSearchTermInGrid diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermMassActionNotOnFrontend.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermMassActionNotOnFrontend.php index e21a404fff85d855dacaa3a947347931ce2e8a8d..9e6fc9299631fce7694178636dd6dba658e27d9b 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermMassActionNotOnFrontend.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermMassActionNotOnFrontend.php @@ -8,8 +8,8 @@ namespace Magento\CatalogSearch\Test\Constraint; use Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSearchTermMassActionNotOnFrontend @@ -26,14 +26,14 @@ class AssertSearchTermMassActionNotOnFrontend extends AbstractConstraint * * @param array $searchTerms * @param CmsIndex $cmsIndex - * @param Browser $browser + * @param BrowserInterface $browser * @param AssertSearchTermNotOnFrontend $assertSearchTermNotOnFrontend * @return void */ public function processAssert( array $searchTerms, CmsIndex $cmsIndex, - Browser $browser, + BrowserInterface $browser, AssertSearchTermNotOnFrontend $assertSearchTermNotOnFrontend ) { foreach ($searchTerms as $term) { diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermMassActionsNotInGrid.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermMassActionsNotInGrid.php index ba31e19ee048fff234109c732f7eeb0c4c43b544..4480b8795a9c61dd44378d9d0d316bb86dc7e796 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermMassActionsNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermMassActionsNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\CatalogSearch\Test\Constraint; use Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; use Magento\CatalogSearch\Test\Page\Adminhtml\CatalogSearchIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSearchTermMassActionsNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermNotInGrid.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermNotInGrid.php index 986c39c669cfd83fff8038adf0d1de074218dfbc..e1ddef02322fb71986944af0cec68bf125489efc 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\CatalogSearch\Test\Constraint; use Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; use Magento\CatalogSearch\Test\Page\Adminhtml\CatalogSearchIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSearchTermNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermNotOnFrontend.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermNotOnFrontend.php index 5c5fa68b5ffc83dd10001563831e3f7d35dff47d..07016ce22975c193fe65cb4681554255fa395eb3 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermNotOnFrontend.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermNotOnFrontend.php @@ -8,8 +8,8 @@ namespace Magento\CatalogSearch\Test\Constraint; use Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSearchTermNotOnFrontend @@ -26,10 +26,10 @@ class AssertSearchTermNotOnFrontend extends AbstractConstraint * * @param CmsIndex $cmsIndex * @param CatalogSearchQuery $searchTerm - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ - public function processAssert(CmsIndex $cmsIndex, Browser $browser, CatalogSearchQuery $searchTerm) + public function processAssert(CmsIndex $cmsIndex, BrowserInterface $browser, CatalogSearchQuery $searchTerm) { $queryText = $searchTerm->getQueryText(); $cmsIndex->open()->getSearchBlock()->search($queryText); diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermOnFrontend.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermOnFrontend.php index 04f2f3f35ec29913bc6c83ffbdc043b058cc2fa1..58e1aa3ab135aeb39bc4608bcc5eb170ae9fa129 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermOnFrontend.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermOnFrontend.php @@ -9,8 +9,8 @@ namespace Magento\CatalogSearch\Test\Constraint; use Magento\Catalog\Test\Block\Search; use Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSearchTermOnFrontend @@ -38,10 +38,10 @@ class AssertSearchTermOnFrontend extends AbstractConstraint * * @param CmsIndex $cmsIndex * @param CatalogSearchQuery $searchTerm - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ - public function processAssert(CmsIndex $cmsIndex, CatalogSearchQuery $searchTerm, Browser $browser) + public function processAssert(CmsIndex $cmsIndex, CatalogSearchQuery $searchTerm, BrowserInterface $browser) { $errors = []; $this->searchBlock = $cmsIndex->open()->getSearchBlock(); diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermSuccessDeleteMessage.php index 16ff4f13f1c1a2c5dd56d531221e7171bd14ce42..0177e5d8860f9307eb70b795272d727d3ec36c6b 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermSuccessDeleteMessage.php @@ -7,7 +7,7 @@ namespace Magento\CatalogSearch\Test\Constraint; use Magento\CatalogSearch\Test\Page\Adminhtml\CatalogSearchIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSearchTermSuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermSuccessMassDeleteMessage.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermSuccessMassDeleteMessage.php index c71093f642e4a4cb0d6b7e9819977f4f8caf7762..f05a61e2d0fa8ed9c104d56dc257bc1d9d33c6b5 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermSuccessMassDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermSuccessMassDeleteMessage.php @@ -7,7 +7,7 @@ namespace Magento\CatalogSearch\Test\Constraint; use Magento\CatalogSearch\Test\Page\Adminhtml\CatalogSearchIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSearchTermSuccessMassDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermSuccessSaveMessage.php index 8eb589cc1332f412ee257f51a6da1bf80648dd7e..96d9df392e9537c40e7696f7e4b6434c8a863f1d 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermSuccessSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\CatalogSearch\Test\Constraint; use Magento\CatalogSearch\Test\Page\Adminhtml\CatalogSearchIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSearchTermSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermSynonymOnFrontend.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermSynonymOnFrontend.php index cb1cc34b772220ed14432cfca639530b835131ed..01379f373a4c3029c7807e72e29d6401039eff30 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermSynonymOnFrontend.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermSynonymOnFrontend.php @@ -8,8 +8,8 @@ namespace Magento\CatalogSearch\Test\Constraint; use Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSearchTermSynonymOnFrontend @@ -25,11 +25,11 @@ class AssertSearchTermSynonymOnFrontend extends AbstractConstraint * Assert that you will be redirected to url from dataset * * @param CmsIndex $cmsIndex - * @param Browser $browser + * @param BrowserInterface $browser * @param CatalogSearchQuery $searchTerm * @return void */ - public function processAssert(CmsIndex $cmsIndex, Browser $browser, CatalogSearchQuery $searchTerm) + public function processAssert(CmsIndex $cmsIndex, BrowserInterface $browser, CatalogSearchQuery $searchTerm) { $cmsIndex->open()->getSearchBlock()->search($searchTerm->getSynonymFor()); $windowUrl = $browser->getUrl(); diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSuggestSearchingResult.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSuggestSearchingResult.php index ff6bc79e1a8bc475046c5f5677b432a45ce20da0..388806e1f3a8e18d55da75712f113d5e50154b30 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSuggestSearchingResult.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSuggestSearchingResult.php @@ -8,7 +8,7 @@ namespace Magento\CatalogSearch\Test\Constraint; use Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSuggestSearchingResult diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery.php index ce372d1c8ad58440887924b4d6cf8b335196f2b1..82858efa74fbeb2dd6c27328ec38e482de457c75 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery.php @@ -6,7 +6,7 @@ namespace Magento\CatalogSearch\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class CatalogSearchQuery diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery/QueryText.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery/QueryText.php index 172d79054d9b981d252f6752c9d5eeed7b894d8b..b2bf945cc675cb44e701f778786c6743b1757306 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery/QueryText.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery/QueryText.php @@ -6,9 +6,9 @@ namespace Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; /** * Data to search for. diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Handler/CatalogSearchQuery/CatalogSearchQueryInterface.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Handler/CatalogSearchQuery/CatalogSearchQueryInterface.php index 431ad8860dd8b03192ed00d5f4f099e403948a2a..cc6f02816f129edf45d7b02546bbffccbeb11ef1 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Handler/CatalogSearchQuery/CatalogSearchQueryInterface.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Handler/CatalogSearchQuery/CatalogSearchQueryInterface.php @@ -6,7 +6,7 @@ namespace Magento\CatalogSearch\Test\Handler\CatalogSearchQuery; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface CatalogSearchQueryInterface diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Handler/CatalogSearchQuery/Curl.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Handler/CatalogSearchQuery/Curl.php index ac1f7447596479e2d1cd55c870709ab972c45ddf..d570d3653db7c94a61c94010c2e409e543e1e792 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Handler/CatalogSearchQuery/Curl.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Handler/CatalogSearchQuery/Curl.php @@ -6,12 +6,12 @@ namespace Magento\CatalogSearch\Test\Handler\CatalogSearchQuery; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Create new search term via curl. diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Repository/CatalogSearchQuery.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Repository/CatalogSearchQuery.php index 789e3312ad1972cb2c613a7681fa47cb30acb664..60eea1265c76ac2463eaf411294dde8c149900d4 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Repository/CatalogSearchQuery.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Repository/CatalogSearchQuery.php @@ -6,7 +6,7 @@ namespace Magento\CatalogSearch\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class CatalogSearchQuery diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.php index 98eaf67aad609444e5d606ce2b672f83900f8607..2bd73f161a8028441ef459a631e1bfa211d9df97 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.php @@ -9,8 +9,8 @@ namespace Magento\CatalogSearch\Test\TestCase; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\CatalogSearch\Test\Page\AdvancedSearch; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Preconditions: diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/CreateSearchTermEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/CreateSearchTermEntityTest.php index 02dc9a6038cd533bf8071473e5b408ef0ac44b93..106070b62ec4e474126a1966f8461f0cd96a80b0 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/CreateSearchTermEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/CreateSearchTermEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\CatalogSearch\Test\TestCase; use Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; use Magento\CatalogSearch\Test\Page\Adminhtml\CatalogSearchEdit; use Magento\CatalogSearch\Test\Page\Adminhtml\CatalogSearchIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for CreateSearchTermEntity diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/DeleteSearchTermEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/DeleteSearchTermEntityTest.php index d9f55fe374461ca78db7693681e914ef69fba30a..b8400504d031aeda63c0d132b266d69aa55e7c46 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/DeleteSearchTermEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/DeleteSearchTermEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\CatalogSearch\Test\TestCase; use Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; use Magento\CatalogSearch\Test\Page\Adminhtml\CatalogSearchEdit; use Magento\CatalogSearch\Test\Page\Adminhtml\CatalogSearchIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for DeleteSearchTermEntity diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/EditSearchTermEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/EditSearchTermEntityTest.php index 4c6c542abae9d4429d07413ce59ee6b3be166d50..a2b143d4786f03bd5e0b64f381c0c01231d5ae3b 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/EditSearchTermEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/EditSearchTermEntityTest.php @@ -10,7 +10,7 @@ use Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; use Magento\CatalogSearch\Test\Page\Adminhtml\CatalogSearchEdit; use Magento\CatalogSearch\Test\Page\Adminhtml\CatalogSearchIndex; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for EditSearchTermEntity diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/MassDeleteSearchTermEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/MassDeleteSearchTermEntityTest.php index 306ea03431d4c5e2ba1c072451b34049a5e2bb36..4f35edd4150c5e5d8daa234e290eb5318465bf0d 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/MassDeleteSearchTermEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/MassDeleteSearchTermEntityTest.php @@ -8,8 +8,8 @@ namespace Magento\CatalogSearch\Test\TestCase; use Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; use Magento\CatalogSearch\Test\Page\Adminhtml\CatalogSearchIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for MassDeleteSearchTermEntity diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/SearchEntityResultsTest.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/SearchEntityResultsTest.php index a965f34e0fa996531d92e214c3cd9058cb5f9715..30a54eda01b5b919ec9770e6a601c3f4678d3f2f 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/SearchEntityResultsTest.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/SearchEntityResultsTest.php @@ -8,7 +8,7 @@ namespace Magento\CatalogSearch\Test\TestCase; use Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Preconditions: diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/SuggestSearchingResultEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/SuggestSearchingResultEntityTest.php index dda437f4e48f3a87b7ef753958e8541675f249f8..d4ce912e61386c4a79a50b99f4c6c64b24510f45 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/SuggestSearchingResultEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/SuggestSearchingResultEntityTest.php @@ -8,7 +8,7 @@ namespace Magento\CatalogSearch\Test\TestCase; use Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Cover Suggest Searching Result (SearchEntity) diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/etc/constraint.xml b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/etc/constraint.xml index 7a061c80ad16bc44cbc6ec1b7261f4649571dd72..9a215cf30c095aead61ef10a573a6bf52e92f1cb 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/etc/constraint.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/etc/constraint.xml @@ -48,7 +48,7 @@ <require> <searchTerm class="Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery" /> <cmsIndex class="Magento\Cms\Test\Page\CmsIndex" /> - <browser class="Mtf\Client\Browser" /> + <browser class="Magento\Mtf\Client\Browser" /> </require> </assertSearchTermOnFrontend> <assertSearchTermSuccessSaveMessage module="Magento_CatalogSearch"> @@ -62,7 +62,7 @@ <require> <searchTerm class="Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery" /> <cmsIndex class="Magento\Cms\Test\Page\CmsIndex" /> - <browser class="Mtf\Client\Browser" /> + <browser class="Magento\Mtf\Client\Browser" /> </require> </assertSearchTermSynonymOnFrontend> <assertSearchTermSuccessDeleteMessage module="Magento_CatalogSearch"> @@ -83,7 +83,7 @@ <require> <searchTerm class="Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery" /> <cmsIndex class="Magento\Cms\Test\Page\CmsIndex" /> - <browser class="Mtf\Client\Browser" /> + <browser class="Magento\Mtf\Client\Browser" /> </require> </assertSearchTermNotOnFrontend> <assertSearchSynonymNotOnFrontend module="Magento_CatalogSearch"> @@ -91,7 +91,7 @@ <require> <searchTerm class="Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery" /> <cmsIndex class="Magento\Cms\Test\Page\CmsIndex" /> - <browser class="Mtf\Client\Browser" /> + <browser class="Magento\Mtf\Client\Browser" /> </require> </assertSearchSynonymNotOnFrontend> <assertSearchTermSuccessMassDeleteMessage module="Magento_CatalogSearch"> @@ -110,14 +110,14 @@ <severity>high</severity> <require> <cmsIndex class="Magento\Cms\Test\Page\CmsIndex" /> - <browser class="Mtf\Client\Browser" /> + <browser class="Magento\Mtf\Client\Browser" /> </require> </assertSearchTermMassActionNotOnFrontend> <assertSearchSynonymMassActionNotOnFrontend module="Magento_CatalogSearch"> <severity>high</severity> <require> <cmsIndex class="Magento\Cms\Test\Page\CmsIndex" /> - <browser class="Mtf\Client\Browser" /> + <browser class="Magento\Mtf\Client\Browser" /> </require> </assertSearchSynonymMassActionNotOnFrontend> <assertProductCanBeOpenedFromSearchResult module="Magento_CatalogSearch"> diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart.php index 0ab77e4f68f5d1c611e9f319c9e4b85c197c6d76..2802929c1069c518f00fbb12bee0d8715daa0a96 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart.php @@ -9,10 +9,10 @@ namespace Magento\Checkout\Test\Block; use Exception; use Magento\Checkout\Test\Block\Cart\CartItem; use Magento\Checkout\Test\Block\Onepage\Link; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; -use Mtf\Factory\Factory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Cart diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php index 9bb23fb9ef151a0a43fab0a042d0e8566a288b86..c2c64fd6903d8b877c8cf18dc0fc922e2970c98f 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php @@ -6,7 +6,7 @@ namespace Magento\Checkout\Test\Block\Cart; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Class AbstractCartItem diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartEmpty.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartEmpty.php index c3a24adb6cde7d3f02901f156896e20adbb362b4..0df5fe46b9e4afff7d3e4281c3a0c3e150ae512d 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartEmpty.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartEmpty.php @@ -6,8 +6,8 @@ namespace Magento\Checkout\Test\Block\Cart; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class CartEmpty diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php index 622542c132b6391dd52e2244577fe310f5cae293..44de73078781de9aefbe259e80523cd9f2d1379c 100755 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php @@ -6,7 +6,7 @@ namespace Magento\Checkout\Test\Block\Cart; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class CartItem @@ -69,23 +69,27 @@ class CartItem extends AbstractCartItem /** * Get product price * - * @return string + * @return string|null */ public function getPrice() { - $cartProductPrice = $this->_rootElement->find($this->price, Locator::SELECTOR_XPATH)->getText(); - return str_replace(',', '', $this->escapeCurrency($cartProductPrice)); + $cartProductPrice = $this->_rootElement->find($this->price, Locator::SELECTOR_XPATH); + return $cartProductPrice->isVisible() + ? str_replace(',', '', $this->escapeCurrency($cartProductPrice->getText())) + : null; } /** * Get product price including tax * - * @return string + * @return string|null */ public function getPriceInclTax() { - $cartProductPrice = $this->_rootElement->find($this->priceInclTax, Locator::SELECTOR_XPATH)->getText(); - return str_replace(',', '', $this->escapeCurrency($cartProductPrice)); + $cartProductPrice = $this->_rootElement->find($this->priceInclTax, Locator::SELECTOR_XPATH); + return $cartProductPrice->isVisible() + ? str_replace(',', '', $this->escapeCurrency($cartProductPrice->getText())) + : null; } /** @@ -112,29 +116,33 @@ class CartItem extends AbstractCartItem /** * Get sub-total for the specified item in the cart * - * @return string + * @return string|null */ public function getSubtotalPrice() { - $price = $this->_rootElement->find($this->subtotalPrice, Locator::SELECTOR_XPATH)->getText(); - return str_replace(',', '', $this->escapeCurrency($price)); + $cartProductPrice = $this->_rootElement->find($this->subtotalPrice, Locator::SELECTOR_XPATH); + return $cartProductPrice->isVisible() + ? str_replace(',', '', $this->escapeCurrency($cartProductPrice->getText())) + : null; } /** * Get sub-total including tax for the specified item in the cart * - * @return string + * @return string|null */ public function getSubtotalPriceInclTax() { - $price = $this->_rootElement->find($this->subTotalPriceInclTax, Locator::SELECTOR_XPATH)->getText(); - return str_replace(',', '', $this->escapeCurrency($price)); + $cartProductPrice = $this->_rootElement->find($this->subTotalPriceInclTax, Locator::SELECTOR_XPATH); + return $cartProductPrice->isVisible() + ? str_replace(',', '', $this->escapeCurrency($cartProductPrice->getText())) + : null; } /** * Get product options in the cart * - * @return string + * @return array */ public function getOptions() { @@ -142,8 +150,8 @@ class CartItem extends AbstractCartItem $options = []; if ($optionsBlock->isVisible()) { - $titles = $optionsBlock->find('./dt', Locator::SELECTOR_XPATH)->getElements(); - $values = $optionsBlock->find('./dd', Locator::SELECTOR_XPATH)->getElements(); + $titles = $optionsBlock->getElements('./dt', Locator::SELECTOR_XPATH); + $values = $optionsBlock->getElements('./dd', Locator::SELECTOR_XPATH); foreach ($titles as $key => $title) { $value = $values[$key]->getText(); diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/DiscountCodes.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/DiscountCodes.php index a5faa27be3a174eb6da4936622b4ea612ef722ea..58637651153864cfb996da1bf05ce9260c1f73c9 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/DiscountCodes.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/DiscountCodes.php @@ -6,8 +6,8 @@ namespace Magento\Checkout\Test\Block\Cart; -use Mtf\Block\Form; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; /** * Class DiscountCodes diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Shipping.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Shipping.php index 2388dbee076c19f4dacaef84ddba2e6b368edbbf..b6fde4920b1d0c5d27b215117356ad172626e96e 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Shipping.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Shipping.php @@ -7,8 +7,8 @@ namespace Magento\Checkout\Test\Block\Cart; use Magento\Customer\Test\Fixture\AddressInjectable; -use Mtf\Block\Form; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; /** * Class Shipping @@ -125,6 +125,7 @@ class Shipping extends Form } ); $selector = sprintf($this->shippingMethod, $carrier, $method); + return $this->_rootElement->find($selector, Locator::SELECTOR_XPATH)->isVisible(); } } diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Sidebar.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Sidebar.php index b7df995b3c9695c921d89246eeb50761fc21f06c..f909e97086b5a2f2bf5dc3a84e15994d526d55d3 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Sidebar.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Sidebar.php @@ -6,9 +6,9 @@ namespace Magento\Checkout\Test\Block\Cart; use Magento\Checkout\Test\Block\Cart\Sidebar\Item; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Sidebar diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Sidebar/Item.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Sidebar/Item.php index 43e9110ecda721e861cbc430428b6ed57b20c9cc..7d0966f153598dcdd97c018ecf89f3cf5b0ae4d1 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Sidebar/Item.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Sidebar/Item.php @@ -36,7 +36,7 @@ class Item extends Sidebar public function removeItemFromMiniCart() { $this->_rootElement->find($this->removeItem)->click(); - $this->_rootElement->acceptAlert(); + $this->browser->acceptAlert(); } /** diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Totals.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Totals.php index 78921b17470923e785d5f2ec898875aa147acacf..fb47e4560253e2ec8d7d1e8e245f6853940b0f4f 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Totals.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Totals.php @@ -6,8 +6,8 @@ namespace Magento\Checkout\Test\Block\Cart; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Totals @@ -76,7 +76,7 @@ class Totals extends Block * * @var string */ - protected $discount = '//tr[normalize-space(th)="Discount"]//span'; + protected $discount = '[class=totals] .amount .price'; /** * Get shipping price including tax selector @@ -95,45 +95,45 @@ class Totals extends Block /** * Get Grand Total Text * - * @return array|string + * @return string */ public function getGrandTotal() { - $grandTotal = $this->_rootElement->find($this->grandTotal)->getText(); + $grandTotal = $this->_rootElement->find($this->grandTotal, Locator::SELECTOR_CSS)->getText(); return $this->escapeCurrency($grandTotal); } /** * Get Grand Total Text * - * @return string + * @return string|null */ public function getGrandTotalIncludingTax() { - $grandTotal = $this->_rootElement->find($this->grandTotalInclTax, Locator::SELECTOR_CSS)->getText(); - return $this->escapeCurrency($grandTotal); + $priceElement = $this->_rootElement->find($this->grandTotalInclTax, Locator::SELECTOR_CSS); + return $priceElement->isVisible() ? $this->escapeCurrency($priceElement->getText()) : null; } /** * Get Grand Total Text * - * @return string + * @return string|null */ public function getGrandTotalExcludingTax() { - $grandTotal = $this->_rootElement->find($this->grandTotalExclTax, Locator::SELECTOR_CSS)->getText(); - return $this->escapeCurrency($grandTotal); + $priceElement = $this->_rootElement->find($this->grandTotalExclTax, Locator::SELECTOR_CSS); + return $priceElement->isVisible() ? $this->escapeCurrency($priceElement->getText()) : null; } /** * Get Tax text from Order Totals * - * @return array|string + * @return string|null */ public function getTax() { - $taxPrice = $this->_rootElement->find($this->tax, Locator::SELECTOR_CSS)->getText(); - return $this->escapeCurrency($taxPrice); + $priceElement = $this->_rootElement->find($this->tax, Locator::SELECTOR_CSS); + return $priceElement->isVisible() ? $this->escapeCurrency($priceElement->getText()) : null; } /** @@ -153,37 +153,37 @@ class Totals extends Block */ public function getSubtotal() { - $subTotal = $this->_rootElement->find($this->subtotal)->getText(); + $subTotal = $this->_rootElement->find($this->subtotal, Locator::SELECTOR_CSS)->getText(); return $this->escapeCurrency($subTotal); } /** * Get Subtotal text * - * @return string + * @return string|null */ public function getSubtotalIncludingTax() { - $subTotal = $this->_rootElement->find($this->subtotalInclTax, Locator::SELECTOR_CSS)->getText(); - return $this->escapeCurrency($subTotal); + $priceElement = $this->_rootElement->find($this->subtotalInclTax, Locator::SELECTOR_CSS); + return $priceElement->isVisible() ? $this->escapeCurrency($priceElement->getText()) : null; } /** * Get Subtotal text * - * @return string + * @return string|null */ public function getSubtotalExcludingTax() { - $subTotal = $this->_rootElement->find($this->subtotalExclTax, Locator::SELECTOR_CSS)->getText(); - return $this->escapeCurrency($subTotal); + $priceElement = $this->_rootElement->find($this->subtotalExclTax, Locator::SELECTOR_CSS); + return $priceElement->isVisible() ? $this->escapeCurrency($priceElement->getText()) : null; } /** * Method that escapes currency symbols * * @param string $price - * @return string + * @return string|null */ protected function escapeCurrency($price) { @@ -194,35 +194,34 @@ class Totals extends Block /** * Get discount * - * @return string + * @return string|null */ public function getDiscount() { - $discount = $this->_rootElement->find($this->discount, Locator::SELECTOR_XPATH)->getText(); - return $this->escapeCurrency($discount); + $priceElement = $this->_rootElement->find($this->discount, Locator::SELECTOR_CSS); + return $priceElement->isVisible() ? $this->escapeCurrency($priceElement->getText()) : null; } /** * Get shipping price * - * @return string + * @return string|null */ public function getShippingPrice() { - $shippingPrice = $this->_rootElement->find($this->shippingPriceSelector, Locator::SELECTOR_CSS)->getText(); - return $this->escapeCurrency($shippingPrice); + $priceElement = $this->_rootElement->find($this->shippingPriceSelector, Locator::SELECTOR_CSS); + return $priceElement->isVisible() ? $this->escapeCurrency($priceElement->getText()) : null; } /** * Get shipping price * - * @return string + * @return string|null */ public function getShippingPriceInclTax() { - $shippingPrice = $this->_rootElement - ->find($this->shippingPriceInclTaxSelector, Locator::SELECTOR_CSS)->getText(); - return $this->escapeCurrency($shippingPrice); + $priceElement = $this->_rootElement->find($this->shippingPriceInclTaxSelector, Locator::SELECTOR_CSS); + return $priceElement->isVisible() ? $this->escapeCurrency($priceElement->getText()) : null; } /** diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Link.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Link.php index db25444ba3b5ce8e7d8efa201b9c3c77d4d7a4ea..cd1310aa639968bfc0f5dd54977c37a947c7d39d 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Link.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Link.php @@ -6,7 +6,7 @@ namespace Magento\Checkout\Test\Block\Onepage; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Class Link diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertAddedProductToCartSuccessMessage.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertAddedProductToCartSuccessMessage.php index fcfbe4fa3cfdf7758da3a16a8fe49aa697098e40..e45449de86fd3d5db18d779ead7d58574b36abaa 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertAddedProductToCartSuccessMessage.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertAddedProductToCartSuccessMessage.php @@ -7,8 +7,8 @@ namespace Magento\Checkout\Test\Constraint; use Magento\Checkout\Test\Page\CheckoutCart; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertAddedProductToCartSuccessMessage diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertCartIsEmpty.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertCartIsEmpty.php index 5e9008fe85be9df695e842969b5129b2f5e0caab..884ade85b09646eb0fffead05613f3f585ab741c 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertCartIsEmpty.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertCartIsEmpty.php @@ -8,8 +8,8 @@ namespace Magento\Checkout\Test\Constraint; use Magento\Checkout\Test\Fixture\Cart; use Magento\Checkout\Test\Page\CheckoutCart; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCartIsEmpty @@ -31,10 +31,10 @@ class AssertCartIsEmpty extends AbstractConstraint * Click here to continue shopping." where 'here' is link that leads to index page * * @param CheckoutCart $checkoutCart - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ - public function processAssert(CheckoutCart $checkoutCart, Browser $browser) + public function processAssert(CheckoutCart $checkoutCart, BrowserInterface $browser) { $checkoutCart->open(); $cartEmptyBlock = $checkoutCart->getCartEmptyBlock(); diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertCartItemsOptions.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertCartItemsOptions.php index 1daf7be9ffe79edd7585022eec2624d428addc3a..c2dc2534f436b3f8bc252f0cc1840fd3229a742b 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertCartItemsOptions.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertCartItemsOptions.php @@ -10,8 +10,8 @@ use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Checkout\Test\Fixture\Cart; use Magento\Checkout\Test\Fixture\Cart\Items; use Magento\Checkout\Test\Page\CheckoutCart; -use Mtf\Constraint\AbstractAssertForm; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Fixture\FixtureInterface; /** * Assert that cart item options for product(s) display with correct information block. diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertGrandTotalInShoppingCart.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertGrandTotalInShoppingCart.php index cc6b3b6d8c0c986cab60b714c56db5c3c1cb603c..ae6092c120fba3391d9cba2473d5add9e3c8d632 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertGrandTotalInShoppingCart.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertGrandTotalInShoppingCart.php @@ -8,7 +8,7 @@ namespace Magento\Checkout\Test\Constraint; use Magento\Checkout\Test\Fixture\Cart; use Magento\Checkout\Test\Page\CheckoutCart; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertGrandTotalInShoppingCart diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertOrderSuccessPlacedMessage.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertOrderSuccessPlacedMessage.php index cb4befc85d13c11d21012f6aa55ee743ae6605a9..752aaf9c871abeb1850d3a18c9d9a6a8130bf4e9 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertOrderSuccessPlacedMessage.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertOrderSuccessPlacedMessage.php @@ -7,7 +7,7 @@ namespace Magento\Checkout\Test\Constraint; use Magento\Checkout\Test\Page\CheckoutOnepageSuccess; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderSuccessPlacedMessage diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertOrderTotalOnReviewPage.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertOrderTotalOnReviewPage.php index 5639da766adf1b41e8d0aa72d6b96085972657f4..aefa6c7410fc279379592157ba91c170649fca72 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertOrderTotalOnReviewPage.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertOrderTotalOnReviewPage.php @@ -7,7 +7,7 @@ namespace Magento\Checkout\Test\Constraint; use Magento\Checkout\Test\Page\CheckoutOnepage; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderTotalOnReviewPage diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertPriceInShoppingCart.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertPriceInShoppingCart.php index b010de8e5dc8d2862a8d8e886590dd3adde43c89..3e45f83a879685dad3eda958b1a9c8dd3010cd0b 100755 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertPriceInShoppingCart.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertPriceInShoppingCart.php @@ -10,8 +10,8 @@ use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Checkout\Test\Fixture\Cart; use Magento\Checkout\Test\Fixture\Cart\Items; use Magento\Checkout\Test\Page\CheckoutCart; -use Mtf\Constraint\AbstractAssertForm; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertPriceInShoppingCart diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductAbsentInMiniShoppingCart.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductAbsentInMiniShoppingCart.php index 64ee8bb3a267f199d15f0dc7c0f767df5679ea47..db61bb670866a1632beeebbb3f6ce2505a76a625 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductAbsentInMiniShoppingCart.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductAbsentInMiniShoppingCart.php @@ -7,8 +7,8 @@ namespace Magento\Checkout\Test\Constraint; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductAbsentInMiniShoppingCart diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductIsNotEditable.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductIsNotEditable.php index cfce160ea5990d871cbcea2651100d36a15a00fd..b371ec3fc3a4a0dc4703f54a92a2fe3161693d51 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductIsNotEditable.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductIsNotEditable.php @@ -7,7 +7,7 @@ namespace Magento\Checkout\Test\Constraint; use Magento\Checkout\Test\Page\CheckoutCart; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductIsNotEditable diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductPresentInMiniShoppingCart.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductPresentInMiniShoppingCart.php index 75c3ce9bf039746043c2ee8e0679fe9d6eeb81e6..4a64e5610c29e1db497e7e862ac8a7eacd57ed4b 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductPresentInMiniShoppingCart.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductPresentInMiniShoppingCart.php @@ -7,7 +7,7 @@ namespace Magento\Checkout\Test\Constraint; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductPresentInMiniShoppingCart diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductPresentInShoppingCart.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductPresentInShoppingCart.php index 1fd9499bdba0678799de0604293fc60d808d54f0..f01fb902ebdfa31c09a975b1959feef186f62d3a 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductPresentInShoppingCart.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductPresentInShoppingCart.php @@ -7,7 +7,7 @@ namespace Magento\Checkout\Test\Constraint; use Magento\Checkout\Test\Page\CheckoutCart; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductPresentInShoppingCart diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductQtyInMiniShoppingCart.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductQtyInMiniShoppingCart.php index 23e4a1662f856f432ab299a4ea7089f41cb665ae..8a0dd741d1859c01524b596356c7c5f2f7e02df4 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductQtyInMiniShoppingCart.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductQtyInMiniShoppingCart.php @@ -10,8 +10,8 @@ use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Checkout\Test\Fixture\Cart; use Magento\Checkout\Test\Fixture\Cart\Items; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractAssertForm; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductQtyInMiniShoppingCart diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductQtyInShoppingCart.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductQtyInShoppingCart.php index c104a7172dafe11e7d5d7e53a4225fa6422feb9c..b8c353c3f316f418bf40f6ade30b60130b4b6cc3 100755 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductQtyInShoppingCart.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductQtyInShoppingCart.php @@ -10,8 +10,8 @@ use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Checkout\Test\Fixture\Cart; use Magento\Checkout\Test\Fixture\Cart\Items; use Magento\Checkout\Test\Page\CheckoutCart; -use Mtf\Constraint\AbstractAssertForm; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductQtyInShoppingCart diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductsAbsentInShoppingCart.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductsAbsentInShoppingCart.php index 1486d72d50c903a071297719549d49e290455617..515b7433ede70aec87a9c0ddb6003aaadd09f54c 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductsAbsentInShoppingCart.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductsAbsentInShoppingCart.php @@ -7,7 +7,7 @@ namespace Magento\Checkout\Test\Constraint; use Magento\Checkout\Test\Page\CheckoutCart; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Assert that products are absent in shopping cart. diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertSubtotalInShoppingCart.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertSubtotalInShoppingCart.php index 81d8c95bef265a443a0394c244eef4f6a4e878da..770595ed2bd3bac943902bbbdc15075301a0eace 100755 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertSubtotalInShoppingCart.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertSubtotalInShoppingCart.php @@ -10,8 +10,8 @@ use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Checkout\Test\Fixture\Cart; use Magento\Checkout\Test\Fixture\Cart\Items; use Magento\Checkout\Test\Page\CheckoutCart; -use Mtf\Constraint\AbstractAssertForm; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertSubtotalInShoppingCart diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart.php index 4a2db34cc9c1301044ce55c8c095e1d901b28d32..aab39fa9e4e6d47ddb5c91854a98be4d97e590b5 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart.php @@ -6,7 +6,7 @@ namespace Magento\Checkout\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class Cart diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart/Items.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart/Items.php index de23b4c2811bdc8f8d1605e0a97eca67c5bf1881..6ca6c12cc218cfbbb0d6a65ecef8e99c40b8dfd2 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart/Items.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart/Items.php @@ -6,8 +6,8 @@ namespace Magento\Checkout\Test\Fixture\Cart; -use Mtf\Fixture\FixtureInterface; -use Mtf\ObjectManager; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\ObjectManager; /** * Class Item diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.php index ed545771b6579d4c1076deaef0fad213f76e686a..8bfa4789d0ef329d869850606da31d13e302bb09 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.php @@ -8,10 +8,10 @@ namespace Magento\Checkout\Test\TestCase; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Checkout\Test\Page\CheckoutCart; -use Mtf\Client\Browser; -use Mtf\Fixture\FixtureFactory; -use Mtf\ObjectManager; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\ObjectManager; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for AddProductsToShoppingCartEntity @@ -40,7 +40,7 @@ class AddProductsToShoppingCartEntityTest extends Injectable /** * Browser interface * - * @var Browser + * @var BrowserInterface */ protected $browser; @@ -68,14 +68,14 @@ class AddProductsToShoppingCartEntityTest extends Injectable /** * Prepare test data * - * @param Browser $browser + * @param BrowserInterface $browser * @param FixtureFactory $fixtureFactory * @param CatalogProductView $catalogProductView * @param CheckoutCart $cartPage * @return void */ public function __prepare( - Browser $browser, + BrowserInterface $browser, FixtureFactory $fixtureFactory, CatalogProductView $catalogProductView, CheckoutCart $cartPage diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.php index fe869f8eb6002e721ad85c76782ae3033dfedcac..b3ae8fdbd934efe933c2ad70b9c945d2da272c02 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.php @@ -8,10 +8,10 @@ namespace Magento\Checkout\Test\TestCase; use Magento\Checkout\Test\Page\CheckoutCart; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; -use Mtf\ObjectManager; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\ObjectManager; +use Magento\Mtf\TestCase\Injectable; /** * Class DeleteProductFromMiniShoppingCartTest diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductsFromShoppingCartTest.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductsFromShoppingCartTest.php index da8ca1bba79e8bbbdbafe3f9ee34840274f2eb67..87b1cd5997332bd938d6a5bd7fe4c7a95863fb6d 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductsFromShoppingCartTest.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductsFromShoppingCartTest.php @@ -8,11 +8,11 @@ namespace Magento\Checkout\Test\TestCase; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Checkout\Test\Page\CheckoutCart; -use Mtf\Client\Browser; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\InjectableFixture; -use Mtf\ObjectManager; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\ObjectManager; +use Magento\Mtf\TestCase\Injectable; /** * Class DeleteProductsFromShoppingCartTest @@ -39,7 +39,7 @@ class DeleteProductsFromShoppingCartTest extends Injectable /** * Browser interface * - * @var Browser + * @var BrowserInterface */ protected $browser; @@ -67,14 +67,14 @@ class DeleteProductsFromShoppingCartTest extends Injectable /** * Prepare test data * - * @param Browser $browser + * @param BrowserInterface $browser * @param FixtureFactory $fixtureFactory * @param CatalogProductView $catalogProductView * @param CheckoutCart $cartPage * @return void */ public function __prepare( - Browser $browser, + BrowserInterface $browser, FixtureFactory $fixtureFactory, CatalogProductView $catalogProductView, CheckoutCart $cartPage diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.php index a4a01f195a57eb68e746079b5d62d100d798bcc9..f5d30d2f9bdc2f376563ee8964537b6758553fb2 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.php @@ -8,9 +8,9 @@ namespace Magento\Checkout\Test\TestCase; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\TestCase\Injectable; /** * Test Flow: diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateShoppingCartTest.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateShoppingCartTest.php index 2c15007d11119a5f5c5dd762389eab51fa593a0c..bd3f7381fb4ad87b90eb55fec967c9dccef684ee 100755 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateShoppingCartTest.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateShoppingCartTest.php @@ -10,9 +10,9 @@ use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Checkout\Test\Fixture\Cart; use Magento\Checkout\Test\Page\CheckoutCart; -use Mtf\Client\Browser; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Update ShoppingCart @@ -42,7 +42,7 @@ class UpdateShoppingCartTest extends Injectable /** * Browser interface * - * @var Browser + * @var BrowserInterface */ protected $browser; @@ -70,11 +70,11 @@ class UpdateShoppingCartTest extends Injectable /** * Prepare test data * - * @param Browser $browser + * @param BrowserInterface $browser * @param FixtureFactory $fixtureFactory * @return void */ - public function __prepare(Browser $browser, FixtureFactory $fixtureFactory) + public function __prepare(BrowserInterface $browser, FixtureFactory $fixtureFactory) { $this->browser = $browser; $this->fixtureFactory = $fixtureFactory; diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/AddProductsToTheCartStep.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/AddProductsToTheCartStep.php index 2b4528b8253221ba12939a105534ecf6ea94fd82..bc314698d1fe275333ca9843f2eb538f52e66f42 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/AddProductsToTheCartStep.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/AddProductsToTheCartStep.php @@ -9,8 +9,8 @@ namespace Magento\Checkout\Test\TestStep; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Checkout\Test\Page\CheckoutCart; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Client\Browser; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class AddProductsToTheCartStep @@ -49,7 +49,7 @@ class AddProductsToTheCartStep implements TestStepInterface /** * Interface Browser * - * @var Browser + * @var BrowserInterface */ protected $browser; @@ -58,14 +58,14 @@ class AddProductsToTheCartStep implements TestStepInterface * @param CatalogProductView $catalogProductView * @param CheckoutCart $checkoutCart * @param CmsIndex $cmsIndex - * @param Browser $browser + * @param BrowserInterface $browser * @param array $products */ public function __construct( CatalogProductView $catalogProductView, CheckoutCart $checkoutCart, CmsIndex $cmsIndex, - Browser $browser, + BrowserInterface $browser, array $products ) { $this->products = $products; diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/FillBillingInformationStep.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/FillBillingInformationStep.php index 40deeb5db847456359624cb6f6811f9390e1082f..1c0ce87c6880e0dd9b298e487d12973e63d2a338 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/FillBillingInformationStep.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/FillBillingInformationStep.php @@ -9,7 +9,7 @@ namespace Magento\Checkout\Test\TestStep; use Magento\Checkout\Test\Page\CheckoutOnepage; use Magento\Customer\Test\Fixture\AddressInjectable; use Magento\Customer\Test\Fixture\CustomerInjectable; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class FillBillingInformationStep diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/FillShippingMethodStep.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/FillShippingMethodStep.php index 0d051665e6efb4694123bc192b757166ed179029..df510f1e2e80cee8c1e4efd7f77f42089fc1486c 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/FillShippingMethodStep.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/FillShippingMethodStep.php @@ -7,7 +7,7 @@ namespace Magento\Checkout\Test\TestStep; use Magento\Checkout\Test\Page\CheckoutOnepage; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class FillShippingMethodStep diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/PlaceOrderStep.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/PlaceOrderStep.php index 3b72746e08c1518a7d7696647dcf8c6279bb72e0..7adfc7fc1ac63ea36b5a5eb242356dc80690ac82 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/PlaceOrderStep.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/PlaceOrderStep.php @@ -9,7 +9,7 @@ namespace Magento\Checkout\Test\TestStep; use Magento\Checkout\Test\Constraint\AssertOrderTotalOnReviewPage; use Magento\Checkout\Test\Page\CheckoutOnepage; use Magento\Checkout\Test\Page\CheckoutOnepageSuccess; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class PlaceOrderStep diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/ProceedToCheckoutStep.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/ProceedToCheckoutStep.php index 2776d137891760976c25488190243c5840c839a8..6fdee3ab31755a96be9776bac991c2c1a40f4729 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/ProceedToCheckoutStep.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/ProceedToCheckoutStep.php @@ -7,7 +7,7 @@ namespace Magento\Checkout\Test\TestStep; use Magento\Checkout\Test\Page\CheckoutCart; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class ProceedToCheckoutStep diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/SelectCheckoutMethodStep.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/SelectCheckoutMethodStep.php index 154ccf108102f1ca984f8ad41e9ca78e305a7707..3d37267a82e6213597df1323b717503bb205a011 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/SelectCheckoutMethodStep.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/SelectCheckoutMethodStep.php @@ -8,7 +8,7 @@ namespace Magento\Checkout\Test\TestStep; use Magento\Checkout\Test\Page\CheckoutOnepage; use Magento\Customer\Test\Fixture\CustomerInjectable; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class SelectCheckoutMethodStep diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/SelectPaymentMethodStep.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/SelectPaymentMethodStep.php index ba5eee6cc936ffd2317c14e07afd61d5d525ec36..f17bc063c16bf56c06b74c663f7620888b6720f1 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/SelectPaymentMethodStep.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/SelectPaymentMethodStep.php @@ -7,7 +7,7 @@ namespace Magento\Checkout\Test\TestStep; use Magento\Checkout\Test\Page\CheckoutOnepage; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class SelectPaymentMethodStep diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/etc/scenario.xml b/dev/tests/functional/tests/app/Magento/Checkout/Test/etc/scenario.xml index ab0fe4da4e6d0fa88e35671641be4ce4c2e8b5de..bef12be128cdf135313f5438de2a29774c26417e 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/etc/scenario.xml +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/etc/scenario.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<scenarios xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/Mtf/Config/etc/scenario.xsd"> +<scenarios xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/Magento/Mtf/Config/etc/scenario.xsd"> <scenario name="OnePageCheckoutTest" module="Magento_Checkout"> <methods> <method name="test"> diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/CmsBlockInterface.php b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/CmsBlockInterface.php index 128aee14bafe44dbef6870ebfb8ce7f086585ad7..20685db1cdedc533a0dc078f0aa6813d13304580 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/CmsBlockInterface.php +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/CmsBlockInterface.php @@ -6,7 +6,7 @@ namespace Magento\Cms\Test\Handler\CmsBlock; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface CmsBlockInterface diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/Curl.php b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/Curl.php index 2c716b8c99374efb63363f65155096bc11a50529..49f62f95f8582fe9532503d2ed9fcb223f817a8a 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/Curl.php @@ -6,12 +6,12 @@ namespace Magento\Cms\Test\Handler\CmsBlock; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/CmsPageInterface.php b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/CmsPageInterface.php index 5c3ce1b3c1788801ae678a0eae8d71da0ac6e88f..35f8db75513c5c86dc503cad6080ff3d90a0bcd9 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/CmsPageInterface.php +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/CmsPageInterface.php @@ -6,7 +6,7 @@ namespace Magento\Cms\Test\Handler\CmsPage; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface CmsPageInterface diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/Curl.php b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/Curl.php index 012448057df9a7e549100d7a5ce410c32d4e2db3..85e033bcf4a4d95331c4159e5103b330de770bfc 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/Curl.php @@ -7,11 +7,11 @@ namespace Magento\Cms\Test\Handler\CmsPage; use Magento\Backend\Test\Handler\Conditions; -use Mtf\Fixture\FixtureInterface; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/AffectedAttributeSet.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/AffectedAttributeSet.php index a2c0e6923bd39d474063b361e074e375bfabaa0b..1385164d592ac0608f057730e41b2897938ae55f 100755 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/AffectedAttributeSet.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/AffectedAttributeSet.php @@ -6,10 +6,11 @@ namespace Magento\ConfigurableProduct\Test\Block\Adminhtml\Product; +use Magento\Mtf\Client\Element; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\Element\SimpleElement; use Magento\Backend\Test\Block\Widget\Form as ParentForm; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; /** * Class AffectedAttributeSet @@ -35,10 +36,10 @@ class AffectedAttributeSet extends ParentForm * Fill popup form * * @param FixtureInterface $product - * @param Element|null $element [optional] + * @param SimpleElement|null $element [optional] * @return $this */ - public function fill(FixtureInterface $product, Element $element = null) + public function fill(FixtureInterface $product, SimpleElement $element = null) { $affectedAttributeSet = $product->getData('affected_attribute_set'); diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Composite/Configure.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Composite/Configure.php index fd89c189a2f5d167325618b19ae0a226d9ac4ee9..8470504b7f254583d16945c893389afc3a259fa8 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Composite/Configure.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Composite/Configure.php @@ -7,7 +7,7 @@ namespace Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Composite; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Configure diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config.php index 60295a147a7ea83bcac921a8883ad8d43d114e79..c402668ebfe6925e27c7796150ab4beb5ca4efc7 100755 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config.php @@ -8,8 +8,10 @@ namespace Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Edit\Tab\Supe use Magento\Backend\Test\Block\Template; use Magento\Backend\Test\Block\Widget\Tab; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Catalog\Test\Fixture\CatalogCategory; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Client\Element; +use Magento\Mtf\Client\Locator; /** * Class Config @@ -84,10 +86,10 @@ class Config extends Tab * Fill variations fieldset * * @param array $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return $this */ - public function fillFormTab(array $fields, Element $element = null) + public function fillFormTab(array $fields, SimpleElement $element = null) { $attributes = isset($fields['configurable_attributes_data']['value']) ? $fields['configurable_attributes_data']['value'] @@ -175,10 +177,10 @@ class Config extends Tab * Get data of tab * * @param array|null $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return array */ - public function getDataFormTab($fields = null, Element $element = null) + public function getDataFormTab($fields = null, SimpleElement $element = null) { $data = []; @@ -196,9 +198,9 @@ class Config extends Tab */ public function deleteAttributes() { - $attributeElements = $this->_rootElement->find($this->attributeElement)->getElements(); + $attributeElements = $this->_rootElement->getElements($this->attributeElement); $this->_rootElement->find($this->variationsContent)->click(); - foreach ($attributeElements as $element) { + foreach (array_reverse($attributeElements) as $element) { $element->find($this->deleteVariationButton)->click(); } } diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Attribute.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Attribute.php index 4aa8b5f1803350cdd5d4a874d98e78b7c253fe8b..eecdf4f31ddbf1743f6db9cd71a4c49783810111 100755 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Attribute.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Attribute.php @@ -6,10 +6,10 @@ namespace Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Edit\Tab\Super\Config; +use Magento\Mtf\Client\Locator; use Magento\Backend\Test\Block\Widget\Form; +use Magento\Mtf\Client\Element\SimpleElement; use Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Edit\Tab\Super\Config\Attribute\AttributeSelector; -use Mtf\Client\Driver\Selenium\Element; -use Mtf\Client\Element\Locator; /** * Attribute block in Variation section. @@ -253,11 +253,11 @@ class Attribute extends Form /** * Check is visible option * - * @param Element $attributeBlock + * @param SimpleElement $attributeBlock * @param int $number * @return bool */ - protected function isVisibleOption(Element $attributeBlock, $number) + protected function isVisibleOption(SimpleElement $attributeBlock, $number) { return $attributeBlock->find( sprintf($this->optionContainerByNumber, $number), @@ -303,7 +303,7 @@ class Attribute extends Form $optionMapping = $this->dataMapping(); $count = 1; - /** @var Element $attributeBlock */ + /** @var SimpleElement $attributeBlock */ $attributeBlock = $this->_rootElement->find(sprintf($this->attributeBlock, $count), Locator::SELECTOR_XPATH); while ($attributeBlock->isVisible()) { $this->showAttributeContent($attributeBlock); @@ -312,9 +312,9 @@ class Attribute extends Form 'label' => $attributeBlock->find($this->attributeLabel)->getValue(), 'options' => [], ]; - $options = $attributeBlock->find($this->optionContainer, Locator::SELECTOR_XPATH)->getElements(); + $options = $attributeBlock->getElements($this->optionContainer, Locator::SELECTOR_XPATH); foreach ($options as $optionKey => $option) { - /** @var Element $option */ + /** @var SimpleElement $option */ if ($option->isVisible()) { $attribute['options'][$optionKey] = $this->_getData($optionMapping, $option); $attribute['options'][$optionKey] += $this->getOptionalFields($option); @@ -335,10 +335,10 @@ class Attribute extends Form /** * Show attribute content * - * @param Element $attribute + * @param SimpleElement $attribute * @return void */ - protected function showAttributeContent(Element $attribute) + protected function showAttributeContent(SimpleElement $attribute) { if (!$attribute->find($this->attributeContent)->isVisible()) { $this->_rootElement->find($this->configContent)->click(); @@ -371,11 +371,11 @@ class Attribute extends Form /** * Get optional fields * - * @param Element $context + * @param SimpleElement $context * @param array $fields * @return array */ - protected function getOptionalFields(Element $context, array $fields = []) + protected function getOptionalFields(SimpleElement $context, array $fields = []) { $data = []; @@ -383,6 +383,7 @@ class Attribute extends Form foreach ($fields as $name => $params) { $data[$name] = $context->find($params['selector'], $params['strategy'])->getText(); } + return $data; } } diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Attribute/AttributeSelector.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Attribute/AttributeSelector.php index 650d09f119544c2be712c7005f113793357df901..7fac90081181236c028ba2a8af2c5c103a820fa9 100755 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Attribute/AttributeSelector.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Attribute/AttributeSelector.php @@ -6,8 +6,8 @@ namespace Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Edit\Tab\Super\Config\Attribute; +use Magento\Mtf\Client\Element\SuggestElement; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; -use Mtf\Client\Driver\Selenium\Element\SuggestElement; /** * Class AttributeSelector diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Attribute/ToggleDropdown.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Attribute/ToggleDropdown.php index 7c84a33b13dbe4925e41972323d48e71b00e07b2..fffb5b80c8e24be658218a67237811ef690bd942 100755 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Attribute/ToggleDropdown.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Attribute/ToggleDropdown.php @@ -6,14 +6,14 @@ namespace Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Edit\Tab\Super\Config\Attribute; -use Mtf\Client\Driver\Selenium\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Client\Locator; /** * Class ToggleDropdown * Class for toggle dropdown elements. */ -class ToggleDropdown extends Element +class ToggleDropdown extends SimpleElement { /** * Selector for field value @@ -44,7 +44,7 @@ class ToggleDropdown extends Element */ public function setValue($value) { - $this->_eventManager->dispatchEvent(['set_value'], [__METHOD__, $this->getAbsoluteSelector()]); + $this->eventManager->dispatchEvent(['set_value'], [__METHOD__, $this->getAbsoluteSelector()]); if ($value != $this->getValue()) { $value = ('Yes' == $value) ? '%' : '$'; @@ -62,7 +62,7 @@ class ToggleDropdown extends Element */ public function getValue() { - $this->_eventManager->dispatchEvent(['get_value'], [(string)$this->_locator]); + $this->eventManager->dispatchEvent(['get_value'], [__METHOD__, $this->getAbsoluteSelector()]); $value = $this->find($this->field, Locator::SELECTOR_XPATH)->getText(); return ('%' == $value) ? 'Yes' : 'No'; diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php index e04457ba67c9a1095cb7067927ae1f5cc06e1376..11db5ed304636b2e2f25019e3c7b08bc5d8ac1f5 100755 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php @@ -6,10 +6,10 @@ namespace Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Edit\Tab\Super\Config; +use Magento\Mtf\Client\Locator; use Magento\Backend\Test\Block\Template; use Magento\Backend\Test\Block\Widget\Form; -use Mtf\Client\Driver\Selenium\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class Matrix @@ -120,11 +120,11 @@ class Matrix extends Form /** * Assign product to variation matrix * - * @param Element $variationRow + * @param SimpleElement $variationRow * @param int $productId * @return void */ - protected function assignProduct(Element $variationRow, $productId) + protected function assignProduct(SimpleElement $variationRow, $productId) { $variationRow->find($this->configurableAttribute)->click(); $this->getTemplateBlock()->waitLoader(); @@ -142,10 +142,10 @@ class Matrix extends Form public function getVariationsData() { $data = []; - $variationRows = $this->_rootElement->find($this->variationRow, Locator::SELECTOR_XPATH)->getElements(); + $variationRows = $this->_rootElement->getElements($this->variationRow, Locator::SELECTOR_XPATH); foreach ($variationRows as $key => $variationRow) { - /** @var Element $variationRow */ + /** @var SimpleElement $variationRow */ if ($variationRow->isVisible()) { $data[$key] = $this->_getData($this->dataMapping(), $variationRow); $data[$key] += $this->getOptionalFields($variationRow, $this->mappingGetFields); @@ -158,11 +158,11 @@ class Matrix extends Form /** * Get optional fields * - * @param Element $context + * @param SimpleElement $context * @param array $fields * @return array */ - protected function getOptionalFields(Element $context, array $fields) + protected function getOptionalFields(SimpleElement $context, array $fields) { $data = []; diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/FormPageActions.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/FormPageActions.php index e6793ccdc1bc04d1194034afdcd504a433ca78d8..b1822f54f0eb8d131c2cca45748f240a9b0c026e 100755 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/FormPageActions.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/FormPageActions.php @@ -6,8 +6,8 @@ namespace Magento\ConfigurableProduct\Test\Block\Adminhtml\Product; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class FormPageActions diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/ProductForm.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/ProductForm.php index b3b9946ebf78e1c93c253d1922b2d641717adbf4..7a666e370751ac9aaa7e7fed02aecffefd86e524 100755 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/ProductForm.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/ProductForm.php @@ -6,11 +6,12 @@ namespace Magento\ConfigurableProduct\Test\Block\Adminhtml\Product; +use Magento\Mtf\Client\Element; +use Magento\Mtf\Fixture\DataFixture; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; use Magento\Backend\Test\Block\Widget\FormTabs; -use Mtf\Client\Element; -use Mtf\Fixture\DataFixture; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class ProductForm @@ -22,11 +23,11 @@ class ProductForm extends \Magento\Catalog\Test\Block\Adminhtml\Product\ProductF * Fill the product form * * @param FixtureInterface $product - * @param Element|null $element [optional] + * @param SimpleElement|null $element [optional] * @param FixtureInterface|null $category [optional] * @return FormTabs */ - public function fill(FixtureInterface $product, Element $element = null, FixtureInterface $category = null) + public function fill(FixtureInterface $product, SimpleElement $element = null, FixtureInterface $category = null) { $tabs = $this->getFieldsByTabs($product); ksort($tabs); @@ -101,6 +102,7 @@ class ProductForm extends \Magento\Catalog\Test\Block\Adminhtml\Product\ProductF ], ]; unset($tabs['variations']['variations-matrix']); + return $tabs; } } diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Product/View.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Product/View.php index 99d42204d7c3bd92d0a9e07c87e0c77aab8066f8..f7b417ba6583d09a0cbd058a5f36fb56a89d35d7 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Product/View.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Product/View.php @@ -9,8 +9,8 @@ namespace Magento\ConfigurableProduct\Test\Block\Product; use Magento\ConfigurableProduct\Test\Block\Product\View\ConfigurableOptions; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProduct; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class View diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Product/View/ConfigurableOptions.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Product/View/ConfigurableOptions.php index 216e2a645230e67cfc01a40b7a42553e3321ad7e..c191f1397062d4c7f8c89dc009f821eb17b74eb9 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Product/View/ConfigurableOptions.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Product/View/ConfigurableOptions.php @@ -9,10 +9,11 @@ namespace Magento\ConfigurableProduct\Test\Block\Product\View; use Magento\Catalog\Test\Block\Product\View\CustomOptions; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProduct; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\Element; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class ConfigurableOptions @@ -61,7 +62,7 @@ class ConfigurableOptions extends CustomOptions throw new \Exception("Can't find option: \"{$title}\""); } - /** @var Element $optionElement */ + /** @var SimpleElement $optionElement */ $optionElement = $listOptions[$title]; $typeMethod = preg_replace('/[^a-zA-Z]/', '', $option['frontend_input']); $getTypeData = 'get' . ucfirst(strtolower($typeMethod)) . 'Data'; diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertChildProductIsNotDisplayedSeparately.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertChildProductIsNotDisplayedSeparately.php index 6ba16adff2697032d2af502f6fe844aff65d1cba..49ed7543a012207c03a8cf3d336c52a984fa122e 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertChildProductIsNotDisplayedSeparately.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertChildProductIsNotDisplayedSeparately.php @@ -9,7 +9,7 @@ namespace Magento\ConfigurableProduct\Test\Constraint; use Magento\CatalogSearch\Test\Page\CatalogsearchResult; use Magento\Cms\Test\Page\CmsIndex; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertChildProductIsNotDisplayedSeparately diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertChildProductsInGrid.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertChildProductsInGrid.php index 3cb601b648536e8e13fa70768d4bad9f35cb0f09..80446fef978798ea9f7d1b3ea7a9a3757124cabe 100755 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertChildProductsInGrid.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertChildProductsInGrid.php @@ -8,7 +8,7 @@ namespace Magento\ConfigurableProduct\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertChildProductsInGrid diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableAttributesAbsentOnProductPage.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableAttributesAbsentOnProductPage.php index a2ba3b8d62c3236c78321a1b6ef73aed6f254afa..22695040b347c80306492fe414bfa939a0edd640 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableAttributesAbsentOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableAttributesAbsentOnProductPage.php @@ -9,8 +9,8 @@ namespace Magento\ConfigurableProduct\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Assert that deleted configurable attributes are absent on product page on frontend. @@ -25,14 +25,14 @@ class AssertConfigurableAttributesAbsentOnProductPage extends AbstractConstraint * Assert that deleted configurable attributes are absent on product page on frontend. * * @param CatalogProductAttribute[] $deletedProductAttributes - * @param Browser $browser + * @param BrowserInterface $browser * @param CatalogProductView $catalogProductView * @param ConfigurableProductInjectable $product * @return void */ public function processAssert( array $deletedProductAttributes, - Browser $browser, + BrowserInterface $browser, CatalogProductView $catalogProductView, ConfigurableProductInjectable $product ) { diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableAttributesBlockIsAbsentOnProductPage.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableAttributesBlockIsAbsentOnProductPage.php index 6844bf30090e91c143cbfc4351eb6c8d965fd474..e43779622b8f1b96ea1dd16881d2b9a849becf8a 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableAttributesBlockIsAbsentOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableAttributesBlockIsAbsentOnProductPage.php @@ -8,8 +8,8 @@ namespace Magento\ConfigurableProduct\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Assert that all configurable attributes is absent on product page on frontend. @@ -23,13 +23,13 @@ class AssertConfigurableAttributesBlockIsAbsentOnProductPage extends AbstractCon /** * Assert that all configurable attributes is absent on product page on frontend. * - * @param Browser $browser + * @param BrowserInterface $browser * @param CatalogProductView $catalogProductView * @param ConfigurableProductInjectable $product * @return void */ public function processAssert( - Browser $browser, + BrowserInterface $browser, CatalogProductView $catalogProductView, ConfigurableProductInjectable $product ) { diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductDuplicateForm.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductDuplicateForm.php index 7e8a9bce0120ccd116b3b0b859d2beac33cbadb0..7bc07b5c9907c3cae720dea19f65fb6cdbe9e9c3 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductDuplicateForm.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductDuplicateForm.php @@ -8,7 +8,7 @@ namespace Magento\ConfigurableProduct\Test\Constraint; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Assert form data equals duplicate product configurable data. diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductInCart.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductInCart.php index bded697687312df48a1e1c679c33e6cc0f0fcc2d..0cf25ed3ed81e063db68b3078d000ce6ff3e1540 100755 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductInCart.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductInCart.php @@ -9,8 +9,8 @@ namespace Magento\ConfigurableProduct\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Checkout\Test\Page\CheckoutCart; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertConfigurableProductInCart @@ -21,14 +21,14 @@ class AssertConfigurableProductInCart extends AbstractConstraint /** * Assertion that the product is correctly displayed in cart * - * @param Browser $browser + * @param BrowserInterface $browser * @param CatalogProductView $catalogProductView * @param CheckoutCart $checkoutCart * @param ConfigurableProductInjectable $product * @return void */ public function processAssert( - Browser $browser, + BrowserInterface $browser, CatalogProductView $catalogProductView, CheckoutCart $checkoutCart, ConfigurableProductInjectable $product diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductInCustomerWishlistOnBackendGrid.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductInCustomerWishlistOnBackendGrid.php index d96b2f6eb8cccd4e658fd73b8cf09344ec07e0c4..2b27a259c1eb58a0b45ae59be382ce34646e8936 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductInCustomerWishlistOnBackendGrid.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductInCustomerWishlistOnBackendGrid.php @@ -8,7 +8,7 @@ namespace Magento\ConfigurableProduct\Test\Constraint; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable; use Magento\Wishlist\Test\Constraint\AssertProductInCustomerWishlistOnBackendGrid; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertConfigurableProductInCustomerWishlistOnBackendGrid diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductInItemsOrderedGrid.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductInItemsOrderedGrid.php index 729f19f2a7655abb1a273c0e54eee74333094d3d..5b7a08c049a62b29896147eed4d8165639acf0cb 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductInItemsOrderedGrid.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductInItemsOrderedGrid.php @@ -8,7 +8,7 @@ namespace Magento\ConfigurableProduct\Test\Constraint; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable; use Magento\Sales\Test\Constraint\AssertProductInItemsOrderedGrid; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertConfigurableProductInItemsOrderedGrid diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeAbsenceInVariationsSearch.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeAbsenceInVariationsSearch.php index 0b45b5dbed3c36b7e18e88ae352fbef849425838..5a3965dca39c254463b4929455a83091cdda9dde 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeAbsenceInVariationsSearch.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeAbsenceInVariationsSearch.php @@ -11,7 +11,7 @@ use Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Edit\Tab\Super\Conf use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductAttributeAbsenceInVariationsSearch diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeIsConfigurable.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeIsConfigurable.php index a8c49f6f1774506f8d070ae630575d8c64daa669..402b06c7ab2477c2bafa5be345e37f6b116ad302 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeIsConfigurable.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeIsConfigurable.php @@ -10,7 +10,7 @@ use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew; use Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Edit\Tab\Super\Config as TabVariation; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Assert check whether the attribute is used to create a configurable products. diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/Cart/Item.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/Cart/Item.php index 29b62650fa427983e91c464c426c89e1702bff95..80aa5bd293b9fb53aff50688e9673e0502e1e474 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/Cart/Item.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/Cart/Item.php @@ -7,7 +7,7 @@ namespace Magento\ConfigurableProduct\Test\Fixture\Cart; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Item diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct.php index 1be0737898bb5d918f84c70ed2c363a60dd53d67..8dedc818972413912ac5370d92228d8b1b65113a 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct.php @@ -9,8 +9,8 @@ namespace Magento\ConfigurableProduct\Test\Fixture; use Magento\Catalog\Test\Fixture\Product; use Magento\Catalog\Test\Fixture\ProductAttribute; use Magento\ConfigurableProduct\Test\Repository\ConfigurableProduct as Repository; -use Mtf\Factory\Factory; -use Mtf\System\Config; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\System\Config; /** * Class ConfigurableProduct diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable.php index b2db8a8a3d851da5fd1d4da69c9782d5c2e7c0e2..99f2309d0d8f327ff1cd770cdbf7f15dc6ff3ef6 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable.php @@ -6,12 +6,12 @@ namespace Magento\ConfigurableProduct\Test\Fixture; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\InjectableFixture; -use Mtf\Handler\HandlerFactory; -use Mtf\Repository\RepositoryFactory; -use Mtf\System\Config; -use Mtf\System\Event\EventManagerInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Handler\HandlerFactory; +use Magento\Mtf\Repository\RepositoryFactory; +use Magento\Mtf\System\Config; +use Magento\Mtf\System\Event\EventManagerInterface; /** * Configurable product fixture. diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/ConfigurableAttributesData.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/ConfigurableAttributesData.php index 4a9959eaec9284fd96eadf22455c403819172b26..17e00b49ce77aee73143db957bcf2d738ef85f9d 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/ConfigurableAttributesData.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/ConfigurableAttributesData.php @@ -8,9 +8,9 @@ namespace Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Fixture\CatalogProductSimple; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class ConfigurableAttributesData diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Handler/ConfigurableProductInjectable/ConfigurableProductInjectableInterface.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Handler/ConfigurableProductInjectable/ConfigurableProductInjectableInterface.php index df17a44e65f01a34f28675342af76dee5140d21d..ac4eed63d169f6a81bbc01261cd9b0471f3a2d9e 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Handler/ConfigurableProductInjectable/ConfigurableProductInjectableInterface.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Handler/ConfigurableProductInjectable/ConfigurableProductInjectableInterface.php @@ -6,7 +6,7 @@ namespace Magento\ConfigurableProduct\Test\Handler\ConfigurableProductInjectable; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface ConfigurableProductInjectableInterface diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Handler/ConfigurableProductInjectable/Curl.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Handler/ConfigurableProductInjectable/Curl.php index 9532613a3425cd0f3e50a91ed7446aa55323b5d8..2a354d1e6d4ae9e06afa006bedea92886dec227a 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Handler/ConfigurableProductInjectable/Curl.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Handler/ConfigurableProductInjectable/Curl.php @@ -9,8 +9,8 @@ namespace Magento\ConfigurableProduct\Test\Handler\ConfigurableProductInjectable use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Handler\CatalogProductSimple\Curl as ProductCurl; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable\ConfigurableAttributesData; -use Mtf\Fixture\FixtureInterface; -use Mtf\System\Config; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\System\Config; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Handler/Curl/CreateConfigurable.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Handler/Curl/CreateConfigurable.php index 4f96c8c35f7ce3700811456040f05b9f05a0cb4e..8b584d3b549605b51b9bf3569654436cfaac18cf 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Handler/Curl/CreateConfigurable.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Handler/Curl/CreateConfigurable.php @@ -8,12 +8,12 @@ namespace Magento\ConfigurableProduct\Test\Handler\Curl; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProduct; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Create Configurable Product diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProductInjectable.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProductInjectable.php index 6de4962e9911a9f6da59bce1ef6e8bf5dfc9a312..aab0344ffb6dc28688290afcd20fd59f228624a7 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProductInjectable.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProductInjectable.php @@ -6,7 +6,7 @@ namespace Magento\ConfigurableProduct\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class ConfigurableProductInjectable diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.php index 20dc365fb548b1aadd0936e0e5170597b8131e5e..95a0ed331c176aceaa5f51c7c5eb21eee69e8f03 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\ConfigurableProduct\Test\TestCase; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Coverage for CreateConfigurableProductEntity diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableTest.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableTest.php index 971ca6fc17d2c1672bae8764d54bba1393a98d71..d2b92908b86e7d2a7258a2be8af7c11fc8331dc1 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableTest.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableTest.php @@ -7,8 +7,8 @@ namespace Magento\ConfigurableProduct\Test\TestCase; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProduct; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; /** * Class CreateConfigurableTest diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateWithAttributeTest.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateWithAttributeTest.php index c273b8db9f6bfa8e7d9b8af22a6558ada6f52d13..6d3a0ebdd9db086512900404c3d9fd8e625964e5 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateWithAttributeTest.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateWithAttributeTest.php @@ -9,8 +9,8 @@ namespace Magento\ConfigurableProduct\Test\TestCase; use Magento\Catalog\Test\Fixture\Product; use Magento\Catalog\Test\Fixture\ProductAttribute; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProduct; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; /** * Class CreateWithAttributeTest diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/EditConfigurableTest.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/EditConfigurableTest.php index 3cf47fcf6e0305f365071b5b7113168cf80b5717..568fce2a32a3a329018b95586c7f4e5b61378b0d 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/EditConfigurableTest.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/EditConfigurableTest.php @@ -6,7 +6,7 @@ namespace Magento\ConfigurableProduct\Test\TestCase; -use Mtf\Factory\Factory; +use Magento\Mtf\Factory\Factory; /** * Class EditConfigurableTest diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.php index 707dca5ee811644ba2d5f7b5ecec1d1b6ad2a53d..e42c08cd992d2053585932d3020313b5a3f5048d 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.php @@ -6,7 +6,7 @@ namespace Magento\ConfigurableProduct\Test\TestCase; -use Mtf\TestCase\Scenario; +use Magento\Mtf\TestCase\Scenario; /** * Test Flow: diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestStep/UpdateConfigurableProductStep.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestStep/UpdateConfigurableProductStep.php index 46edf7236034ec4cfb6ceb24e3e31a134c7c35aa..d750752c960473b18f70910b70ff29589bb505be 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestStep/UpdateConfigurableProductStep.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestStep/UpdateConfigurableProductStep.php @@ -9,8 +9,8 @@ namespace Magento\ConfigurableProduct\Test\TestStep; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestStep\TestStepInterface; /** * Update configurable product step. diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/scenario.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/scenario.xml index 5736b9ae666a14e74ad854a7a65e1a2d95aece0b..b53a78e864b816ff2689db034097a86c73975368 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/scenario.xml +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/scenario.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<scenarios xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/Mtf/Config/etc/scenario.xsd"> +<scenarios xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/Magento/Mtf/Config/etc/scenario.xsd"> <scenario name="UpdateConfigurableProductEntityTest" module="Magento_ConfigurableProduct"> <methods> <method name="test"> diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Block/Adminhtml/System/Variable/FormPageActions.php b/dev/tests/functional/tests/app/Magento/Core/Test/Block/Adminhtml/System/Variable/FormPageActions.php index 2a674959d152c954a32a56996c54b12415da4eb6..719bbdc16f03f16378ff08938e13ed34cd02de79 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Block/Adminhtml/System/Variable/FormPageActions.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Block/Adminhtml/System/Variable/FormPageActions.php @@ -7,7 +7,7 @@ namespace Magento\Core\Test\Block\Adminhtml\System\Variable; use Magento\Backend\Test\Block\FormPageActions as AbstractFormPageActions; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class FormPageActions @@ -41,7 +41,7 @@ class FormPageActions extends AbstractFormPageActions * * @param string $storeName * @throws \Exception - * @return void|bool + * @return null|bool */ public function selectStoreView($storeName) { @@ -57,6 +57,8 @@ class FormPageActions extends AbstractFormPageActions } else { throw new \Exception('Store View with name \'' . $storeName . '\' is not visible!'); } - $this->_rootElement->acceptAlert(); + $this->browser->acceptAlert(); + + return null; } } diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Block/Messages.php b/dev/tests/functional/tests/app/Magento/Core/Test/Block/Messages.php index c92ef1060d8604452f5363faa8bf6be5c7385984..c90426413c9254fe321c1ef6adb43ce78cb6b946 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Block/Messages.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Block/Messages.php @@ -6,8 +6,8 @@ namespace Magento\Core\Test\Block; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Global messages block @@ -68,7 +68,7 @@ class Messages extends Block public function getSuccessMessages() { $this->waitForElementVisible($this->successMessage); - $elements = $this->_rootElement->find($this->successMessage)->getElements(); + $elements = $this->_rootElement->getElements($this->successMessage); $messages = []; foreach ($elements as $key => $element) { diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableForm.php b/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableForm.php index b8fe842e0753b289ab1f252de99edb6a2e785f75..331d1d315840e294ee5bec85a8bc8b9a6ffd6700 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableForm.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableForm.php @@ -10,7 +10,7 @@ use Magento\Core\Test\Fixture\SystemVariable; use Magento\Core\Test\Page\Adminhtml\SystemVariableIndex; use Magento\Core\Test\Page\Adminhtml\SystemVariableNew; use Magento\Store\Test\Fixture\Store; -use Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Constraint\AbstractAssertForm; /** * Class AssertCustomVariableForm diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableInGrid.php b/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableInGrid.php index 4a1ea3bf6f16549cf72c26e6c7b37e00c412ad2f..399d1cf657923db16ec3becb8a128ffbb2dfaf2a 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Core\Test\Constraint; use Magento\Core\Test\Fixture\SystemVariable; use Magento\Core\Test\Page\Adminhtml\SystemVariableIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomVariableInGrid diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableInPage.php b/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableInPage.php index 787d76fe15b2d6e2aa1868ca9f9bd76ef0605fa7..ea924d0c9bbb653a6a5ff736b2bb416d009e61f6 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableInPage.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableInPage.php @@ -9,9 +9,9 @@ namespace Magento\Core\Test\Constraint; use Magento\Cms\Test\Page\CmsIndex; use Magento\Core\Test\Fixture\SystemVariable; use Magento\Store\Test\Fixture\Store; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureFactory; /** * Class AssertCustomVariableInPage @@ -30,7 +30,7 @@ class AssertCustomVariableInPage extends AbstractConstraint * @param CmsIndex $cmsIndex * @param SystemVariable $variable * @param FixtureFactory $fixtureFactory - * @param Browser $browser + * @param BrowserInterface $browser * @param Store $storeOrigin * @param SystemVariable $customVariableOrigin * @return void @@ -40,7 +40,7 @@ class AssertCustomVariableInPage extends AbstractConstraint CmsIndex $cmsIndex, SystemVariable $variable, FixtureFactory $fixtureFactory, - Browser $browser, + BrowserInterface $browser, Store $storeOrigin = null, SystemVariable $customVariableOrigin = null ) { diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableNotInCmsPageForm.php b/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableNotInCmsPageForm.php index e3909d23062cbc465de2a8a8341dcfc580b78fac..ba47a15cbc34d81dc85837eb1ea3fe337aa6148d 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableNotInCmsPageForm.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableNotInCmsPageForm.php @@ -8,7 +8,7 @@ namespace Magento\Core\Test\Constraint; use Magento\Cms\Test\Page\Adminhtml\CmsNew; use Magento\Core\Test\Fixture\SystemVariable; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomVariableNotInCmsPageForm diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableNotInGrid.php b/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableNotInGrid.php index ba1bf51c401e1f5e1d6b15394d550c6ecf886e6e..1f7b0a5f6e936f5cddc96bb1a589ab588e87a7aa 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Core\Test\Constraint; use Magento\Core\Test\Fixture\SystemVariable; use Magento\Core\Test\Page\Adminhtml\SystemVariableIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomVariableNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableSuccessDeleteMessage.php index ea8310074348001ab0779f14b730da3b93c2740f..f25ff181eb14ab712a860775463ac6765aed7053 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableSuccessDeleteMessage.php @@ -7,7 +7,7 @@ namespace Magento\Core\Test\Constraint; use Magento\Core\Test\Page\Adminhtml\SystemVariableIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomVariableSuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableSuccessSaveMessage.php index 56ca2bf06616c37dca694201266a5b753271f1e0..a6107f10dd3cb1b03b906cd0e9fb6470fea13ac2 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Constraint/AssertCustomVariableSuccessSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\Core\Test\Constraint; use Magento\Core\Test\Page\Adminhtml\SystemVariableIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomVariableSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/ConfigData.php b/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/ConfigData.php index ef5afdf6641f29284d6c840d64f82a3dda540f59..0dd119e2d360536ac7e540ccb2f1d6822ebe9b11 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/ConfigData.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/ConfigData.php @@ -6,7 +6,7 @@ namespace Magento\Core\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class ConfigData diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/SystemVariable.php b/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/SystemVariable.php index 8671a384d5ff1cb011f7b9ec4838e68053545f2f..5dc92e19efbd6b0001e37691c8cbc4655337f256 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/SystemVariable.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/SystemVariable.php @@ -6,7 +6,7 @@ namespace Magento\Core\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class SystemVariable diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Handler/ConfigData/ConfigDataInterface.php b/dev/tests/functional/tests/app/Magento/Core/Test/Handler/ConfigData/ConfigDataInterface.php index 46e280e3a7bfb8a4acaf6ca648b7d485e1f339ad..7189e812293c5c57bc88b57a542b68f4157ab533 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Handler/ConfigData/ConfigDataInterface.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Handler/ConfigData/ConfigDataInterface.php @@ -6,7 +6,7 @@ namespace Magento\Core\Test\Handler\ConfigData; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface ConfigDataInterface diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Handler/ConfigData/Curl.php b/dev/tests/functional/tests/app/Magento/Core/Test/Handler/ConfigData/Curl.php index 3f17403f0c09bb7bf556bcca994c6f15aaef9dc6..f2168174fcc827aa57ea68c77f01ca1fe21d7444 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Handler/ConfigData/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Handler/ConfigData/Curl.php @@ -6,12 +6,12 @@ namespace Magento\Core\Test\Handler\ConfigData; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Handler/SystemVariable/Curl.php b/dev/tests/functional/tests/app/Magento/Core/Test/Handler/SystemVariable/Curl.php index 43eaa3b5902aec02954857135255e6d5fcbfe188..696d8aca6f0a0cef69d8df72e1de101f1436ed7c 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Handler/SystemVariable/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Handler/SystemVariable/Curl.php @@ -6,12 +6,12 @@ namespace Magento\Core\Test\Handler\SystemVariable; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Handler/SystemVariable/SystemVariableInterface.php b/dev/tests/functional/tests/app/Magento/Core/Test/Handler/SystemVariable/SystemVariableInterface.php index 03b49763dd3fdf79644101256726169f81a37ad4..342213d9c6141b6082aaf07bbc8f35101186b0ac 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Handler/SystemVariable/SystemVariableInterface.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Handler/SystemVariable/SystemVariableInterface.php @@ -6,7 +6,7 @@ namespace Magento\Core\Test\Handler\SystemVariable; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface SystemVariableInterface diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Repository/SystemVariable.php b/dev/tests/functional/tests/app/Magento/Core/Test/Repository/SystemVariable.php index 330590dcb95a49a210cdb1eb81a8d936f3cb5112..4135d0431d54d8786026f075280b0fe88a69e653 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Repository/SystemVariable.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Repository/SystemVariable.php @@ -6,7 +6,7 @@ namespace Magento\Core\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class SystemVariable diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/AddressesAdditional.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/AddressesAdditional.php index 809b7ad1d5eef36221a27a6e822e0866d7514c5c..36c96877890735d281c7ecc87b8204ebdf628b76 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/AddressesAdditional.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/AddressesAdditional.php @@ -7,8 +7,8 @@ namespace Magento\Customer\Test\Block\Account; use Magento\Customer\Test\Fixture\AddressInjectable; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class AddressesAdditional @@ -47,7 +47,7 @@ class AddressesAdditional extends Block { $this->_rootElement->find(sprintf($this->addressSelector, $address->getStreet()), Locator::SELECTOR_XPATH) ->find($this->deleteAddressLink)->click(); - $this->_rootElement->acceptAlert(); + $this->browser->acceptAlert(); } /** diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/AddressesDefault.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/AddressesDefault.php index 4995ec61087063241e915b6c273231a34efd4707..61b9e79d94d1fe9bfc187083cfdc74f22a772f4a 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/AddressesDefault.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/AddressesDefault.php @@ -6,8 +6,8 @@ */ namespace Magento\Customer\Test\Block\Account; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Addresses default block diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/Dashboard/Address.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/Dashboard/Address.php index d64bd7ec75bf9590054a96a057ad19f18de2bc84..d9210fe4c9dd462cc702a58a3ed2920c0cf09a1b 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/Dashboard/Address.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/Dashboard/Address.php @@ -6,7 +6,7 @@ namespace Magento\Customer\Test\Block\Account\Dashboard; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Class Address diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/Dashboard/Info.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/Dashboard/Info.php index 80775eacd6055e83cc3eebaa150423eed0450540..752cf03df70ab1684767459e1cfca477cf3fd6f8 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/Dashboard/Info.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/Dashboard/Info.php @@ -6,7 +6,7 @@ namespace Magento\Customer\Test\Block\Account\Dashboard; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Class Info diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/Links.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/Links.php index 3cd43f6a338e64b79516b86d2efce39dea26cace..2f3745944d452571bc1c8081623033d35c38bdd2 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/Links.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Account/Links.php @@ -6,8 +6,8 @@ namespace Magento\Customer\Test\Block\Account; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Links diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Address/Edit.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Address/Edit.php index 121323247c3544889c34d4d25f02b96d192b27c1..d5278db123f9a5d6306b4ed916e3446ff63162f4 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Address/Edit.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Address/Edit.php @@ -7,8 +7,8 @@ namespace Magento\Customer\Test\Block\Address; use Magento\Customer\Test\Fixture\Address; -use Mtf\Block\Form; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; /** * Class Edit diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/CustomerForm.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/CustomerForm.php index 0be09cdef87b3d694b4959fdd133da76c6702508..cdf70642bbd4a707fb358cd5ccb08de1ee8d2045 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/CustomerForm.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/CustomerForm.php @@ -7,8 +7,8 @@ namespace Magento\Customer\Test\Block\Adminhtml\Edit; use Magento\Backend\Test\Block\Widget\FormTabs; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class CustomerForm diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses.php index be673d63459615fabeb22b2b567b10faafdecd08..864fbb11f815d45dbb2247475908e2c6f466e254 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses.php @@ -8,9 +8,10 @@ namespace Magento\Customer\Test\Block\Adminhtml\Edit\Tab; use Magento\Backend\Test\Block\Widget\Tab; use Magento\Customer\Test\Fixture\AddressInjectable; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Client\Element; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Addresses @@ -146,12 +147,12 @@ class Addresses extends Tab * Get data to fields on tab * * @param array|null $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return array * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getDataFormTab($fields = null, Element $element = null) + public function getDataFormTab($fields = null, SimpleElement $element = null) { /* Skip get data for standard method. Use getDataAddresses. */ return []; @@ -196,6 +197,7 @@ class Addresses extends Tab sprintf($this->customerAddress, $addressNumber), Locator::SELECTOR_XPATH ); + return $addressTab->isVisible(); } } diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/CustomerForm.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/CustomerForm.php index 4e5506983371786cf705d4cba494cdceb930b2d4..21b2410a61593fc8829bc3c81ffb77b331ba148f 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/CustomerForm.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/CustomerForm.php @@ -6,9 +6,9 @@ namespace Magento\Customer\Test\Block\Form; -use Mtf\Block\Form; -use Mtf\Client\Element; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Fixture\FixtureInterface; use Magento\Customer\Test\Fixture\CustomerInjectable; /** @@ -51,10 +51,10 @@ class CustomerForm extends Form * Fill the customer data * * @param FixtureInterface $customer - * @param Element|null $element + * @param SimpleElement|null $element * @return $this */ - public function fill(FixtureInterface $customer, Element $element = null) + public function fill(FixtureInterface $customer, SimpleElement $element = null) { /** @var CustomerInjectable $customer */ if ($customer->hasData()) { diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/ForgotPassword.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/ForgotPassword.php index 3e871afd22a50a3755657a5e72546e29f5775979..b8a9dc7afbdaf6038c2dd52e534931b86db627c4 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/ForgotPassword.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/ForgotPassword.php @@ -7,8 +7,8 @@ namespace Magento\Customer\Test\Block\Form; use Magento\Customer\Test\Fixture\Customer; -use Mtf\Block\Form; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; /** */ diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/Login.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/Login.php index a2b5b5a6e357fb68c1cc2e3cc64a39d59aeef3ce..2b009be57196041cf519be1179ac42721123c99f 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/Login.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/Login.php @@ -6,9 +6,9 @@ namespace Magento\Customer\Test\Block\Form; -use Mtf\Block\Form; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Login diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/Register.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/Register.php index a3afdead31092538d9ca58478345fdffbb27eb1d..d5de5868dba76339fe1fc00741d348f9bf65c3d1 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/Register.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/Register.php @@ -6,9 +6,9 @@ namespace Magento\Customer\Test\Block\Form; -use Mtf\Block\Form; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Register diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertAddressDeletedBackend.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertAddressDeletedBackend.php index ab8cdd7a09d54667b8ba15358664a75fe60cdc5f..6259e116b41a252db5720f27971fa4287dcb241d 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertAddressDeletedBackend.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertAddressDeletedBackend.php @@ -10,7 +10,7 @@ use Magento\Customer\Test\Fixture\AddressInjectable; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Sales\Test\Page\Adminhtml\OrderCreateIndex; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertAddressDeletedBackend diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertAddressDeletedFrontend.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertAddressDeletedFrontend.php index 59d7c65a957b095ee012479b716feae80270597f..c6cbb07fb13f853d72adc88afe35ae7b53b60128 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertAddressDeletedFrontend.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertAddressDeletedFrontend.php @@ -7,7 +7,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Page\CustomerAccountIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertAddressDeletedFrontend diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertChangePasswordFailMessage.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertChangePasswordFailMessage.php index 78d026849c1c65e5248c77c9dd702438db6d5bf6..8c27d596f972de51eea470cfe2a896a674884ba8 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertChangePasswordFailMessage.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertChangePasswordFailMessage.php @@ -7,7 +7,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Page\CustomerAccountEdit; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertChangePasswordFailMessage diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerAddressSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerAddressSuccessSaveMessage.php index 1c20d0279f4f6930ef7b59b7980e90070b9030eb..ab7ac43f7956c3ce63a90deb354fda0552e03f4d 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerAddressSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerAddressSuccessSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Page\CustomerAccountIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerAddressSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerDefaultAddresses.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerDefaultAddresses.php index e57976560066a9d62db95ad20839ef77890764d0..3fb0c59976d8e2fdb7d0f8faff7211b8c0dfa7a3 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerDefaultAddresses.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerDefaultAddresses.php @@ -8,7 +8,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Fixture\AddressInjectable; use Magento\Customer\Test\Page\CustomerAccountIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerDefaultAddresses diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerFailRegisterMessage.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerFailRegisterMessage.php index c628151dc7688bdedfd97aaa3d6292a5f3b34fd8..36fe9c355c17b72fdf9fd69446753ab5987b9e39 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerFailRegisterMessage.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerFailRegisterMessage.php @@ -7,7 +7,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Page\CustomerAccountCreate; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerFailRegisterMessage diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerForm.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerForm.php index de31e2f323f2db4386134c74c487c43b2c9c9d08..0c55f3cd04a0641c3a4e1df340a73ebc3b155fb4 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerForm.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerForm.php @@ -10,7 +10,7 @@ use Magento\Customer\Test\Fixture\AddressInjectable; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerForm diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupAlreadyExists.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupAlreadyExists.php index 16c8aae67ba77c90f4ea313cca5755d89d580896..8307c220fe220799e7c5ec9286f6506fbef8a4c5 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupAlreadyExists.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupAlreadyExists.php @@ -7,7 +7,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Page\Adminhtml\CustomerGroupNew; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerGroupAlreadyExists diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupForm.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupForm.php index f868758d3ecb0da9408339dac49d486b25dd1d66..6cc186ea9e5e6782970f7839250e3fc148a0e0bd 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupForm.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupForm.php @@ -9,7 +9,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Fixture\CustomerGroupInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerGroupIndex; use Magento\Customer\Test\Page\Adminhtml\CustomerGroupNew; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerGroupForm diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupInGrid.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupInGrid.php index 6d51e076e3805a8e307d11c2db20bb0bd5b38ead..1d938173f9ec89dd7a84cc69b8a42746721da49c 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Fixture\CustomerGroupInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerGroupIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerGroupInGrid diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupNotInGrid.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupNotInGrid.php index 93e5357f6f90bfa204fe00b529d5d58fda1a83b1..cabf657058a48bbd89c09f448d23b086a48b7460 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Fixture\CustomerGroupInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerGroupIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerGroupNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupOnCustomerForm.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupOnCustomerForm.php index 784167e2aeafa4d87f37ef7d507a1e7a895ec134..10d3c750d07e3d1d4093cadc8ffcc9c8232cbcf9 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupOnCustomerForm.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupOnCustomerForm.php @@ -10,8 +10,8 @@ use Magento\Customer\Test\Fixture\CustomerGroupInjectable; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; use Magento\Customer\Test\Page\Adminhtml\CustomerIndexNew; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureFactory; /** * Class AssertCustomerGroupOnCustomerForm diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupSuccessDeleteMessage.php index 469bb37c53fd159bf266e56e22b47a3dccb17fdc..311a8e0bafbc7cccaa36a0b8c5132d359cb59f7e 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupSuccessDeleteMessage.php @@ -7,7 +7,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Page\Adminhtml\CustomerGroupIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerGroupSuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupSuccessSaveMessage.php index 4876b0d1bd3285c64476a76f4f4a6de7d016c650..6c32ceb281dc2c2c16084ca2cce279066432bd78 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupSuccessSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Page\Adminhtml\CustomerGroupIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerGroupSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerInGrid.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerInGrid.php index 56c20f0a97eb2387ec8dcac5bd3397c915d992fa..569e949e9170a2b086008fb3a84053ba171ae7d0 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerInGrid diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerInfoSuccessSavedMessage.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerInfoSuccessSavedMessage.php index 068def78da9ff50bf2e0d6196aa76f6ae2e6cdc1..6f9d6d9c144ef294d321bbc1e42b06847710e4e6 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerInfoSuccessSavedMessage.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerInfoSuccessSavedMessage.php @@ -7,7 +7,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Page\CustomerAccountIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerInfoSuccessSavedMessage diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerInvalidEmail.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerInvalidEmail.php index 83cc134fe2ab0eeae84d23576109871c319b4b6f..63c178507c63c7601f39fb59a995019acb6199be 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerInvalidEmail.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerInvalidEmail.php @@ -8,7 +8,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerIndexNew; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerInvalidEmail diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerMassDeleteInGrid.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerMassDeleteInGrid.php index 9e8c1e10099cf2f9cc57032978204ae69ee3f8be..f309e6ac9db5c67187fa266e7664253ec8dc3676 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerMassDeleteInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerMassDeleteInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerMassDeleteInGrid diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerMassDeleteNotInGrid.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerMassDeleteNotInGrid.php index 163ffab9417b3828dc7d6126cf16ae72a7219985..c2bbd18879b42b3aa8003d93a4f0abff6821da00 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerMassDeleteNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerMassDeleteNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerMassDeleteNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerMassDeleteSuccessMessage.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerMassDeleteSuccessMessage.php index 0ca2636625327a3832c0973f9001360936afbe3f..77e7ada00429e917fc98e2b59df09d123f154ed8 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerMassDeleteSuccessMessage.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerMassDeleteSuccessMessage.php @@ -7,7 +7,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerMassDeleteSuccessMessage diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerNotInGrid.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerNotInGrid.php index 42ed108c63b9365c8a0427e0bc9d5965219ff9b1..69104a54536b321bcfe7cf0d284d88d8cbf28c46 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerPasswordChanged.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerPasswordChanged.php index 07ce3870907eb698d0359e1b3dcf6c1efae6fbe1..67e2021c36e6a69dc7657c28274d1dbeb5a1361c 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerPasswordChanged.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerPasswordChanged.php @@ -8,8 +8,8 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\CustomerAccountIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureFactory; /** * Check that login again to frontend with new password was success. diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerRedirectToDashboard.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerRedirectToDashboard.php index c77502129d65e2d114503b457fd044cd7a18e671..80a41da9d27a05f19a04ff9736bdac0074f1afe6 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerRedirectToDashboard.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerRedirectToDashboard.php @@ -7,7 +7,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Page\CustomerAccountIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Check that after clicking to "Create account" button customer redirected to Dashboard. diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerSuccessDeleteMessage.php index 4bc212dc9c1f250250be60befad1d4b9db0df4a2..c18809771870908fcbfb48953945c42451cf6028 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerSuccessDeleteMessage.php @@ -7,7 +7,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerSuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerSuccessRegisterMessage.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerSuccessRegisterMessage.php index 4f3646e6d4a34393b4c249a359abd19d07f3bcc9..3ad80d98d85ed5a89459b2868d2e045dae98576f 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerSuccessRegisterMessage.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerSuccessRegisterMessage.php @@ -7,7 +7,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Page\CustomerAccountCreate; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerSuccessRegisterMessage diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerSuccessSaveMessage.php index c6939cb4d1a6271ebaf685e10d41f2d1f2a1ec97..198d824e70570e78d35ec2f3effd849af10ce03d 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerSuccessSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertMassActionSuccessUpdateMessage.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertMassActionSuccessUpdateMessage.php index 9ac88c66c5486f2821a65e4fe2c978da256dcd3b..cdd9c6c2cd2064fe13d79d6d24c99e3135533481 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertMassActionSuccessUpdateMessage.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertMassActionSuccessUpdateMessage.php @@ -8,7 +8,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertMassActionSuccessUpdateMessage diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertWrongPassConfirmationMessage.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertWrongPassConfirmationMessage.php index 3deee0d1f818774d3c574ff9c368da77f159a1b0..341c4befe32eb46bc877358129a3f1986ee81f4f 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertWrongPassConfirmationMessage.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertWrongPassConfirmationMessage.php @@ -8,7 +8,7 @@ namespace Magento\Customer\Test\Constraint; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\CustomerAccountEdit; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Check that conformation message is present. diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Address.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Address.php index 4d141c5eb60ff9dbf3eb3e606fec5f90facbc88c..3419fc5b42e85dbc05a56747275d8533b9f2c261 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Address.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Address.php @@ -6,9 +6,9 @@ namespace Magento\Customer\Test\Fixture; -use Mtf\Factory\Factory; -use Mtf\Fixture\DataFixture; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Fixture\DataFixture; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Address diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/AddressBook.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/AddressBook.php index f1e15852d1ccb9583a21a277d0df1ed386a62b19..9ef1a4ea240bb4892f10c2bcab72d77d3c420d49 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/AddressBook.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/AddressBook.php @@ -9,10 +9,10 @@ namespace Magento\Customer\Test\Fixture; /** * Address of registered customer */ -class AddressBook extends \Mtf\Fixture\DataFixture +class AddressBook extends \Magento\Mtf\Fixture\DataFixture { /** - * @var \Mtf\Fixture\DataFixture + * @var \Magento\Mtf\Fixture\DataFixture */ protected $_addressFixture; @@ -26,9 +26,9 @@ class AddressBook extends \Mtf\Fixture\DataFixture /** * Set address fixture * - * @param \Mtf\Fixture\DataFixture $address + * @param \Magento\Mtf\Fixture\DataFixture $address */ - public function setAddress(\Mtf\Fixture\DataFixture $address) + public function setAddress(\Magento\Mtf\Fixture\DataFixture $address) { $this->_addressFixture = $address; } diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/AddressInjectable.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/AddressInjectable.php index c021f8acfa48fc8ba50cfa4325c9e2e7914c2cfc..be272903ddeae9dc588845121e7303e2e172c542 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/AddressInjectable.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/AddressInjectable.php @@ -6,7 +6,7 @@ namespace Magento\Customer\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class AddressInjectable diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer.php index 01e4950e494ed91e13857db5d13643173187e836..52bd27ee085e32cbbf70fa3d2c3477920d0c504b 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer.php @@ -6,8 +6,8 @@ namespace Magento\Customer\Test\Fixture; -use Mtf\Factory\Factory; -use Mtf\Fixture\DataFixture; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Fixture\DataFixture; /** * Class Customer diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerBackend.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerBackend.php index 1d51c93d08a4eff949b9e6adfd81827f81090c2a..274b3d8c81f96260826437580159a3917573d7a1 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerBackend.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerBackend.php @@ -6,7 +6,7 @@ namespace Magento\Customer\Test\Fixture; -use Mtf\Factory\Factory; +use Magento\Mtf\Factory\Factory; /** * Customer in Backend diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroup.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroup.php index 5b461b44136be2fb19049a7f3b2a9676f67d067a..f905b2dca67956e704059cbf9988fbeca84f70fd 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroup.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroup.php @@ -6,8 +6,8 @@ namespace Magento\Customer\Test\Fixture; -use Mtf\Factory\Factory; -use Mtf\Fixture\DataFixture; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Fixture\DataFixture; /** * Class Customer Group Fixture diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroup/TaxClassIds.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroup/TaxClassIds.php index 08b310d5c17476366927faf98ff8e24c5c80f028..db297d43bb3bbe9165cacff046042e5ea5489fa7 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroup/TaxClassIds.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroup/TaxClassIds.php @@ -7,8 +7,8 @@ namespace Magento\Customer\Test\Fixture\CustomerGroup; use Magento\Tax\Test\Fixture\TaxClass; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class TaxClassIds diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroupInjectable.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroupInjectable.php index 8367374caf1c035219b8a99fbab6aac6ed8984e7..067628370b1dd00edae62668116500699128ae03 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroupInjectable.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroupInjectable.php @@ -6,7 +6,7 @@ namespace Magento\Customer\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class CustomerGroupInjectable diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerInjectable.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerInjectable.php index 6a662d177f22821f3ccbc12b7a86ba77461cc201..aa935e1a85c450d16e057eac136fe7eb854bbd02 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerInjectable.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerInjectable.php @@ -6,7 +6,7 @@ namespace Magento\Customer\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class CustomerInjectable diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerInjectable/Address.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerInjectable/Address.php index e1157be1a9fa051385ea910f3770c1e3bd6a029d..7a5d580c6b4b933c43fa867fa09ba8fce70975e3 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerInjectable/Address.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerInjectable/Address.php @@ -7,8 +7,8 @@ namespace Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Fixture\AddressInjectable; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Address diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerInjectable/GroupId.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerInjectable/GroupId.php index 91b7c0bdb737d861556eee2d5cea83348f55b88b..1c728b16ec4240b04c7dbbe57e50411116d6f754 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerInjectable/GroupId.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerInjectable/GroupId.php @@ -7,8 +7,8 @@ namespace Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Fixture\CustomerGroupInjectable; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class GroupId diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomer.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomer.php index b51d232c2e63394096261d69cc2b0cc244dfbe56..03e09cebf8e4176843959e8a5b908cdeb3888c5c 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomer.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomer.php @@ -7,10 +7,10 @@ namespace Magento\Customer\Test\Handler\Curl; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; /** * Class CreateCustomer. diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerBackend.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerBackend.php index 8c9535e677a5ab5176a1c2d34cb1fc0ab0e3173e..f2ef96f3636633c2b0b8fdff2cfbc59fac76ed87 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerBackend.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerBackend.php @@ -7,12 +7,12 @@ namespace Magento\Customer\Test\Handler\Curl; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Curl handler for creating customer in admin diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerGroup.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerGroup.php index 02140bcc66178cfd2761ac18f873381bfa78e63e..4c14cc431138a0934ee3fa327ba8b4513d4b16a6 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerGroup.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerGroup.php @@ -6,12 +6,12 @@ namespace Magento\Customer\Test\Handler\Curl; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Curl handler for creating customer group in admin diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/SaveCustomerWithAddress.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/SaveCustomerWithAddress.php index 5e2662520ba4a5b0f19c4d6db882ff9d5aa36607..945abc71934629a461bffd58a534e925ca405305 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/SaveCustomerWithAddress.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/SaveCustomerWithAddress.php @@ -6,10 +6,10 @@ namespace Magento\Customer\Test\Handler\Curl; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; /** * Curl handler for saving customer address in admin diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroupInjectable/Curl.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroupInjectable/Curl.php index 83b7d6086ad21924e5e10f62bf5dd482e24562fa..bcc05fc52095ef748e54218399dd8b8a60bbcb34 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroupInjectable/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroupInjectable/Curl.php @@ -7,12 +7,12 @@ namespace Magento\Customer\Test\Handler\CustomerGroupInjectable; use Magento\Backend\Test\Handler\Extractor; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroupInjectable/CustomerGroupInjectableInterface.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroupInjectable/CustomerGroupInjectableInterface.php index a21630e2009ab5730d4eff2da062f3ac88df3c3e..c9388a4daf98ca307b62ea8ec4030db1d52e2d03 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroupInjectable/CustomerGroupInjectableInterface.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroupInjectable/CustomerGroupInjectableInterface.php @@ -6,7 +6,7 @@ namespace Magento\Customer\Test\Handler\CustomerGroupInjectable; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface CustomerGroupInjectableInterface diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerInjectable/Curl.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerInjectable/Curl.php index c102f9aac7eedf6de39b497c7e8d848a311d53a8..52b1c48dfbf9eeb96f7a86c67e9a987bb48ee637 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerInjectable/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerInjectable/Curl.php @@ -7,12 +7,12 @@ namespace Magento\Customer\Test\Handler\CustomerInjectable; use Magento\Customer\Test\Fixture\CustomerInjectable; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerInjectable/CustomerInjectableInterface.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerInjectable/CustomerInjectableInterface.php index 9c0215484c9c0006c89aacbdac7ba7dfe212679c..a97cbe97367ae6ff0d1d23c08d28507b7c36ae9f 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerInjectable/CustomerInjectableInterface.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerInjectable/CustomerInjectableInterface.php @@ -6,7 +6,7 @@ namespace Magento\Customer\Test\Handler\CustomerInjectable; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface CustomerInjectableInterface diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Ui/CreateAddress.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Ui/CreateAddress.php index 24a066b4d3ac079030934e5b7a323ff1004cbfff..adc3d2d273153cccee4431f945e09d1790811ee9 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Ui/CreateAddress.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Ui/CreateAddress.php @@ -7,13 +7,13 @@ namespace Magento\Customer\Test\Handler\Ui; -use Mtf\Factory\Factory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Fixture\FixtureInterface; /** * UI handler for creating customer address. */ -class CreateAddress extends \Mtf\Handler\Ui +class CreateAddress extends \Magento\Mtf\Handler\Ui { /** * Execute handler diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Webapi/CreateCustomer.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Webapi/CreateCustomer.php index 64444bdfa342b927502fa29e94250820a895a401..5d3e2251705e98469dedffe63a03bd5fceb5bdce 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Webapi/CreateCustomer.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Webapi/CreateCustomer.php @@ -7,9 +7,9 @@ namespace Magento\Customer\Test\Handler\Webapi; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Webapi; -use Mtf\Util\Protocol\SoapTransport; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Webapi; +use Magento\Mtf\Util\Protocol\SoapTransport; /** * Class CreateCustomer diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Page/Address/DefaultAddress.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Page/Address/DefaultAddress.php index fb623d168658295e60793b42ce4941a0ed5d2cbe..54b9775dbecbe8d35daf7fd4dae8be061df9d893 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Page/Address/DefaultAddress.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Page/Address/DefaultAddress.php @@ -7,9 +7,9 @@ namespace Magento\Customer\Test\Page\Address; -use Mtf\Client\Element\Locator; -use Mtf\Factory\Factory; -use Mtf\Page\Page; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Page\Page; /** * Class DefaultAddress diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Page/CustomerAccountForgotPassword.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Page/CustomerAccountForgotPassword.php index a56696efc09dcd6629217ab86a64e4518f6d0c87..ff129b94eb17217dfd85f29dadac635191f7e87c 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Page/CustomerAccountForgotPassword.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Page/CustomerAccountForgotPassword.php @@ -6,9 +6,9 @@ namespace Magento\Customer\Test\Page; -use Mtf\Client\Element\Locator; -use Mtf\Factory\Factory; -use Mtf\Page\Page; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Page\Page; /** */ diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Page/CustomerAccountLogout.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Page/CustomerAccountLogout.php index 0bf0bea1b74cb8bb19e0bde9d2442f5376493247..9c34d17af3cd8e4eddac3d3357118ded860902ab 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Page/CustomerAccountLogout.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Page/CustomerAccountLogout.php @@ -7,7 +7,7 @@ namespace Magento\Customer\Test\Page; -use Mtf\Page\Page; +use Magento\Mtf\Page\Page; /** * Class CustomerAccountLogout diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Page/CustomerAddressEdit.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Page/CustomerAddressEdit.php index 096beeca4a7eb9149d04559408b6f564de0b9840..91fbd97193bbd96f61e384c6adc4f3b952601e6b 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Page/CustomerAddressEdit.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Page/CustomerAddressEdit.php @@ -7,9 +7,9 @@ namespace Magento\Customer\Test\Page; -use Mtf\Client\Element\Locator; -use Mtf\Factory\Factory; -use Mtf\Page\Page; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Page\Page; /** * Customer Address Edit page. diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Address.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Address.php index 17560e76c41c89a9171cae815e57fbaf53d550fc..6012db8cdd17d501e64154dfe8892b8c14dcc2f3 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Address.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Address.php @@ -6,7 +6,7 @@ namespace Magento\Customer\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class Address Repository diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/AddressInjectable.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/AddressInjectable.php index ea198cb5e265bd984bbf59efd74e61342cef807d..e980970452aeaec19f1f353dda59ebf15a449f20 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/AddressInjectable.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/AddressInjectable.php @@ -6,7 +6,7 @@ namespace Magento\Customer\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class AddressInjectable diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Customer.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Customer.php index a65111b1185dccc056101453bd2ee9cc43747406..c0d1a73894069fa223618bb90540662338706398 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Customer.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Customer.php @@ -6,7 +6,7 @@ namespace Magento\Customer\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class Customer Repository diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerGroup.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerGroup.php index 08199c67c04f49a8b53c9971a7c48affb62bba72..a54e62a838b7c31ab4cee723e1f1b39453bc931d 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerGroup.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerGroup.php @@ -6,7 +6,7 @@ namespace Magento\Customer\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class Customer Group Repository diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerGroupInjectable.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerGroupInjectable.php index 6b50700abd593b936616f11f1f51ca876f1661f7..f9ef35f9a952b9f81ecb75d87fad74dad223ffc3 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerGroupInjectable.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerGroupInjectable.php @@ -6,7 +6,7 @@ namespace Magento\Customer\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class CustomerGroupInjectable 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 13fcff343ea83b6aa7371ea9b1843003a86b6d93..8154cf0f2186fa1755228078d7b1a21458e99e5e 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 @@ -6,7 +6,7 @@ namespace Magento\Customer\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class CustomerInjectable diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/BackendCustomerCreateTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/BackendCustomerCreateTest.php index e3733a3423fb7e035e2abb95fa835325b2566b2a..c979cd41c25bb5f14320658cf8b9b4d80958f914 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/BackendCustomerCreateTest.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/BackendCustomerCreateTest.php @@ -6,8 +6,8 @@ namespace Magento\Customer\Test\TestCase; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; class BackendCustomerCreateTest extends Functional { diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.php index 617ee04eaf95e345efcf6a6361ff21080744ddf3..ec75d23b1047effcd32d0281454ee96f88759c25 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.php @@ -10,7 +10,7 @@ use Magento\Customer\Test\Fixture\AddressInjectable; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; use Magento\Customer\Test\Page\Adminhtml\CustomerIndexNew; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Coverage for CreateCustomerBackendEntityTest diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerGroupEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerGroupEntityTest.php index 82d2fa120f65b3da3f55a638aef5cdd5820b0c8f..8ba1a89d841e71f50afa76ee752b859dfe359f1a 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerGroupEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerGroupEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Customer\Test\TestCase; use Magento\Customer\Test\Fixture\CustomerGroupInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerGroupIndex; use Magento\Customer\Test\Page\Adminhtml\CustomerGroupNew; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for CreateCustomerGroupEntity diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateExistingCustomerFrontendEntity.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateExistingCustomerFrontendEntity.php index 56253f8b97fce65f692af214ecd3433975145f69..6ab2dd30c72d30f936d730d848b497c9aafceb7d 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateExistingCustomerFrontendEntity.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateExistingCustomerFrontendEntity.php @@ -10,7 +10,7 @@ use Magento\Cms\Test\Page\CmsIndex; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\CustomerAccountCreate; use Magento\Customer\Test\Page\CustomerAccountLogout; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for CreateExistingCustomerFrontendEntity diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerAddressTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerAddressTest.php index 42ff1a7f39d6ac18db91e2eaa40a24c5bd365521..22d2be27760f60955b12b35e13e6a42224480f26 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerAddressTest.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerAddressTest.php @@ -10,7 +10,7 @@ use Magento\Cms\Test\Page\CmsIndex; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\CustomerAccountIndex; use Magento\Customer\Test\Page\CustomerAccountLogin; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for DeleteCustomerAddress diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerBackendEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerBackendEntityTest.php index f847ee0f4be5db37b337de410da04b35d53dbecb..d6fe3981534da79cca3b0746a0378839a6235e92 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerBackendEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerBackendEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Customer\Test\TestCase; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test creation for DeleteCustomerBackendEntity diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerGroupEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerGroupEntityTest.php index 1946240cdd9d4248c22d1a2175b4947d5e1bdd32..dda7cbc0c85ec1f6c29d57e8e8f1992e350a4efd 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerGroupEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerGroupEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Customer\Test\TestCase; use Magento\Customer\Test\Fixture\CustomerGroupInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerGroupIndex; use Magento\Customer\Test\Page\Adminhtml\CustomerGroupNew; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for DeleteCustomerGroupEntity diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ForgotPasswordOnFrontendTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ForgotPasswordOnFrontendTest.php index 9294155fe0b5c0c659c9768f65853a2cc4c4a2f3..b07f1dd1a0388ead172b762f8fb9fd3c3515d26d 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ForgotPasswordOnFrontendTest.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ForgotPasswordOnFrontendTest.php @@ -6,8 +6,8 @@ namespace Magento\Customer\Test\TestCase; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; /** * Reset password on frontend diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassAssignCustomerGroupTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassAssignCustomerGroupTest.php index eee60e547ff936f9c39a754b05e1fd51e12305f6..fa1782e8a4dd8482386f6d0dcabb8e4e656e3b55 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassAssignCustomerGroupTest.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassAssignCustomerGroupTest.php @@ -9,7 +9,7 @@ namespace Magento\Customer\Test\TestCase; use Magento\Customer\Test\Fixture\CustomerGroupInjectable; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test creation for MassAssignCustomerGroup diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassDeleteCustomerBackendEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassDeleteCustomerBackendEntityTest.php index cb0213e5e54b473acbd99365daeb8bd18fc1bf3e..99efcb8300d9fcc46d855fa3adfae58f27062199 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassDeleteCustomerBackendEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassDeleteCustomerBackendEntityTest.php @@ -9,8 +9,8 @@ namespace Magento\Customer\Test\TestCase; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test creation for MassDeleteCustomerBackendEntityTest diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/RegisterCustomerFrontendEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/RegisterCustomerFrontendEntityTest.php index 377641038f2b0215fd11d96b6d7b45d432eb7d2a..586084a5fa7311d3e26bb68ed24b2c39ddf54981 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/RegisterCustomerFrontendEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/RegisterCustomerFrontendEntityTest.php @@ -10,7 +10,7 @@ use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\CustomerAccountCreate; use Magento\Cms\Test\Page\CmsIndex; use Magento\Customer\Test\Page\CustomerAccountLogout; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Flow: diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerBackendEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerBackendEntityTest.php index f3a9a814d187710b3fa0a0382b289fe8788bd7dd..ed3e94fc950aa82507abe5220ab1d31f4147d44b 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerBackendEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerBackendEntityTest.php @@ -10,7 +10,7 @@ use Magento\Customer\Test\Fixture\AddressInjectable; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for UpdateCustomerBackendEntity diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerFrontendEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerFrontendEntityTest.php index e95db553f49d85e1bebf722894e5b2a8a6656d3a..9c1822ed88b7c6e980d717983a4156fc08eff4d6 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerFrontendEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerFrontendEntityTest.php @@ -14,8 +14,8 @@ use Magento\Customer\Test\Page\CustomerAccountEdit; use Magento\Customer\Test\Page\CustomerAccountIndex; use Magento\Customer\Test\Page\CustomerAccountLogin; use Magento\Customer\Test\Page\CustomerAddressEdit; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Flow: diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerGroupEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerGroupEntityTest.php index ded609bad23a96a02a53f3648da509c9498ddf9c..1b544914dce25ec287a23798a134ebb4d29a8f40 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerGroupEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerGroupEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Customer\Test\TestCase; use Magento\Customer\Test\Fixture\CustomerGroupInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerGroupIndex; use Magento\Customer\Test\Page\Adminhtml\CustomerGroupNew; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Update Customer Group Entity diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/CreateCustomerStep.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/CreateCustomerStep.php index 75564372ab8a1851187d35fcc83df1a4af9f9e4d..e3c28182eef964d949f248610151d533b9016fba 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/CreateCustomerStep.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/CreateCustomerStep.php @@ -7,7 +7,7 @@ namespace Magento\Customer\Test\TestStep; use Magento\Customer\Test\Fixture\CustomerInjectable; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class CreateCustomerStep diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/CreateOrderFromCustomerAccountStep.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/CreateOrderFromCustomerAccountStep.php index b226fbfbf71bd93f1f9ed88ed7601f55036a0c0f..21d3291f6498a53e1dcbd6ea645e7881cdddaba1 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/CreateOrderFromCustomerAccountStep.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/CreateOrderFromCustomerAccountStep.php @@ -7,7 +7,7 @@ namespace Magento\Customer\Test\TestStep; use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class CreateOrderFromCustomerAccountStep diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LoginCustomerOnFrontendStep.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LoginCustomerOnFrontendStep.php index 12902e16cf98db3d9b63449c4bd021e499811d69..4cc77cfa414dd1b3a7d8550c9938c707b692bb4e 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LoginCustomerOnFrontendStep.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LoginCustomerOnFrontendStep.php @@ -9,7 +9,7 @@ namespace Magento\Customer\Test\TestStep; use Magento\Cms\Test\Page\CmsIndex; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\CustomerAccountLogin; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Login customer on frontend. diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php index b49ea09db7bd665c196669f7687cec5eb9cb6b5d..57fb8c5d9527d6aef60e7d82d67b317bea811a58 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php @@ -7,7 +7,7 @@ namespace Magento\Customer\Test\TestStep; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class LogoutCustomerOnFrontendStep diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/OpenCustomerOnBackendStep.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/OpenCustomerOnBackendStep.php index d63e0ba60d96acb7030a79e4d07d234ab67bf514..5182c34ee7cb1f96525f5d882ae21de178059763 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/OpenCustomerOnBackendStep.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/OpenCustomerOnBackendStep.php @@ -8,7 +8,7 @@ namespace Magento\Customer\Test\TestStep; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class OpenCustomerOnBackendStep diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/etc/scenario.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/etc/scenario.xml index 1d0c77e04beea4b66604335a0367e990e2b365e9..1ffe25557c9650a4d7af52d4d1da65238208f844 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/etc/scenario.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/etc/scenario.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<scenarios xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/Mtf/Config/etc/scenario.xsd"> +<scenarios xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/Magento/Mtf/Config/etc/scenario.xsd"> <scenario name="CreateOrderFromCustomerPageTest" module="Magento_Customer"> <methods> <method name="test"> diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php index ae20f760c1fcaf3091766e008cad476a1df8ec48..9bb1f70601cd3e2330df8e9dd023e65cafed9713 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php @@ -6,9 +6,10 @@ namespace Magento\Downloadable\Test\Block\Adminhtml\Catalog\Product\Edit\Tab; +use Magento\Mtf\Client\Element; +use Magento\Mtf\Client\Locator; use Magento\Backend\Test\Block\Widget\Tab; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class Downloadable @@ -35,11 +36,11 @@ class Downloadable extends Tab * Get Downloadable block * * @param string $type - * @param Element $element + * @param SimpleElement $element * @return \Magento\Downloadable\Test\Block\Adminhtml\Catalog\Product\Edit\Tab\Downloadable\Samples | * \Magento\Downloadable\Test\Block\Adminhtml\Catalog\Product\Edit\Tab\Downloadable\Links */ - public function getDownloadableBlock($type, Element $element = null) + public function getDownloadableBlock($type, SimpleElement $element = null) { $element = $element ?: $this->_rootElement; return $this->blockFactory->create( @@ -52,10 +53,10 @@ class Downloadable extends Tab * Get data to fields on downloadable tab * * @param array|null $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return array */ - public function getDataFormTab($fields = null, Element $element = null) + public function getDataFormTab($fields = null, SimpleElement $element = null) { $newFields = []; if (isset($fields['downloadable_sample']['value'])) { @@ -76,10 +77,10 @@ class Downloadable extends Tab * Fill downloadable information * * @param array $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return $this */ - public function fillFormTab(array $fields, Element $element = null) + public function fillFormTab(array $fields, SimpleElement $element = null) { if (isset($fields['downloadable_sample']['value'])) { $this->getDownloadableBlock('Samples')->fillSamples($fields['downloadable_sample']['value']); diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinkRow.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinkRow.php index aeae55fd0ecd4cff9b614a88c65c2bca20f10359..3cdd191ec083013eb612085cf0002bbd86fd71a1 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinkRow.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinkRow.php @@ -5,7 +5,7 @@ */ namespace Magento\Downloadable\Test\Block\Adminhtml\Catalog\Product\Edit\Tab\Downloadable; -use Mtf\Block\Form; +use Magento\Mtf\Block\Form; /** * Class LinkRow diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php index e6ae647e0ec2104157c532b8c6e85a3d9785a78c..cd799e849f69eb2f382ca4bf674bf588c845696d 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php @@ -5,9 +5,9 @@ */ namespace Magento\Downloadable\Test\Block\Adminhtml\Catalog\Product\Edit\Tab\Downloadable; -use Mtf\Block\Form; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class Links @@ -55,10 +55,10 @@ class Links extends Form * Get Downloadable link item block * * @param int $index - * @param Element $element + * @param SimpleElement $element * @return LinkRow */ - public function getRowBlock($index, Element $element = null) + public function getRowBlock($index, SimpleElement $element = null) { $element = $element ?: $this->_rootElement; return $this->blockFactory->create( @@ -71,10 +71,10 @@ class Links extends Form * Fill links block * * @param array $fields - * @param Element $element + * @param SimpleElement $element * @return void */ - public function fillLinks(array $fields, Element $element = null) + public function fillLinks(array $fields, SimpleElement $element = null) { $element = $element ?: $this->_rootElement; if (!$element->find($this->title, Locator::SELECTOR_XPATH)->isVisible()) { @@ -98,10 +98,10 @@ class Links extends Form * Get data links block * * @param array|null $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return array */ - public function getDataLinks(array $fields = null, Element $element = null) + public function getDataLinks(array $fields = null, SimpleElement $element = null) { $element = $element ?: $this->_rootElement; if (!$element->find($this->title, Locator::SELECTOR_XPATH)->isVisible()) { diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/SampleRow.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/SampleRow.php index 6574b462fe22f582f8fa3b2d0e2fb70af539900e..32e504efe5a40ea22017bf9f1e204e8710873a4e 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/SampleRow.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/SampleRow.php @@ -5,7 +5,7 @@ */ namespace Magento\Downloadable\Test\Block\Adminhtml\Catalog\Product\Edit\Tab\Downloadable; -use Mtf\Block\Form; +use Magento\Mtf\Block\Form; /** * Class SampleRow diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php index 4a20cda2b606e11b233b66bba468bdaf0101d80e..5678ebd679fbbc179ba717b14214246c368e7730 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php @@ -5,9 +5,9 @@ */ namespace Magento\Downloadable\Test\Block\Adminhtml\Catalog\Product\Edit\Tab\Downloadable; -use Mtf\Block\Form; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class SampleRow @@ -48,10 +48,10 @@ class Samples extends Form * Get Downloadable sample item block * * @param int $index - * @param Element $element + * @param SimpleElement $element * @return SampleRow */ - public function getRowBlock($index, Element $element = null) + public function getRowBlock($index, SimpleElement $element = null) { $element = $element ?: $this->_rootElement; return $this->blockFactory->create( @@ -64,10 +64,10 @@ class Samples extends Form * Fill samples block * * @param array|null $fields - * @param Element $element + * @param SimpleElement $element * @return void */ - public function fillSamples(array $fields = null, Element $element = null) + public function fillSamples(array $fields = null, SimpleElement $element = null) { $element = $element ?: $this->_rootElement; if (!$element->find($this->samplesTitle, Locator::SELECTOR_XPATH)->isVisible()) { @@ -85,10 +85,10 @@ class Samples extends Form * Get data samples block * * @param array|null $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return array */ - public function getDataSamples(array $fields = null, Element $element = null) + public function getDataSamples(array $fields = null, SimpleElement $element = null) { $element = $element ?: $this->_rootElement; if (!$element->find($this->samplesTitle, Locator::SELECTOR_XPATH)->isVisible()) { diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Product/Composite/Configure.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Product/Composite/Configure.php index ec98b6311bc4819d11a4bb27743928dfe09ac89f..db10ef66ce1de8bde5e3d07449c1e89421d559b6 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Product/Composite/Configure.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Product/Composite/Configure.php @@ -7,7 +7,7 @@ namespace Magento\Downloadable\Test\Block\Adminhtml\Product\Composite; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Configure diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Catalog/Product/View.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Catalog/Product/View.php index 9ca97192dd1a76aa3bd890408d1bd6fc8b6e0bbd..c15b0acc3ee5db6504a17bcf122b4006c72a8373 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Catalog/Product/View.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Catalog/Product/View.php @@ -7,8 +7,8 @@ namespace Magento\Downloadable\Test\Block\Catalog\Product; use Magento\Downloadable\Test\Fixture\DownloadableProductInjectable; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class View diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Catalog/Product/View/Links.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Catalog/Product/View/Links.php index 1526fce0ebe52f8a163810b4c7f27257c0d9f5b5..fdd0aee5c6c0030f98767b541ad188682d1d5b5a 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Catalog/Product/View/Links.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Catalog/Product/View/Links.php @@ -6,8 +6,8 @@ namespace Magento\Downloadable\Test\Block\Catalog\Product\View; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Links @@ -110,7 +110,7 @@ class Links extends Block { $linksData = []; - $choiceLinks = $this->_rootElement->find($this->choiceLink, Locator::SELECTOR_XPATH)->getElements(); + $choiceLinks = $this->_rootElement->getElements($this->choiceLink, Locator::SELECTOR_XPATH); foreach ($choiceLinks as $choiceLink) { $link = $choiceLink->find($this->linkForChoice); $sample = $choiceLink->find($this->sampleLinkForChoice); diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Catalog/Product/View/Samples.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Catalog/Product/View/Samples.php index 8c73611925ee5c27bd4da353729d81430ea5f61d..2adfcbf438299ae42bc189a02473101cf004fe9a 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Catalog/Product/View/Samples.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Catalog/Product/View/Samples.php @@ -6,7 +6,7 @@ namespace Magento\Downloadable\Test\Block\Catalog\Product\View; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Class Samples @@ -46,7 +46,7 @@ class Samples extends Block */ public function getLinks() { - $links = $this->_rootElement->find($this->linkTitle)->getElements(); + $links = $this->_rootElement->getElements($this->linkTitle); $linksData = []; foreach ($links as $link) { diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Customer/Products/ListProducts.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Customer/Products/ListProducts.php index bc1222135b3d4a55a2184aac60a8560ff8507502..ae55ff3b18fbe3a65bb4013b22eaf06b4ebf0ccb 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Customer/Products/ListProducts.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Customer/Products/ListProducts.php @@ -7,8 +7,8 @@ namespace Magento\Downloadable\Test\Block\Customer\Products; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class ListProducts diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxCalculationAfterCheckoutDownloadable.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxCalculationAfterCheckoutDownloadable.php new file mode 100644 index 0000000000000000000000000000000000000000..f8bf3012cfa96847b662a9800f28357f909dc510 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxCalculationAfterCheckoutDownloadable.php @@ -0,0 +1,74 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Downloadable\Test\Constraint; + +use Magento\Checkout\Test\Page\CheckoutCart; +use Magento\Checkout\Test\Page\CheckoutOnepage; +use Magento\Checkout\Test\Page\CheckoutOnepageSuccess; +use Magento\Customer\Test\Fixture\CustomerInjectable; +use Magento\Sales\Test\Page\OrderView; +use Mtf\Fixture\InjectableFixture; +use Magento\Tax\Test\Constraint\AbstractAssertTaxCalculationAfterCheckout; + +/** + * Checks that prices excl tax on order review and customer order pages are equal to specified in dataset. + */ +abstract class AbstractAssertTaxCalculationAfterCheckoutDownloadable extends AbstractAssertTaxCalculationAfterCheckout +{ + /** + * Constraint severeness + * + * @var string + */ + protected $severeness = 'high'; + + /** + * Assert that prices on order review and customer order pages are equal to specified in dataset. + * + * @param array $prices + * @param InjectableFixture $product + * @param CheckoutCart $checkoutCart + * @param CheckoutOnepage $checkoutOnepage + * @param CheckoutOnepageSuccess $checkoutOnepageSuccess + * @param OrderView $orderView + * @return void + */ + public function processAssert( + array $prices, + InjectableFixture $product, + CheckoutCart $checkoutCart, + CheckoutOnepage $checkoutOnepage, + CheckoutOnepageSuccess $checkoutOnepageSuccess, + OrderView $orderView + ) { + $this->checkoutOnepage = $checkoutOnepage; + $this->orderView = $orderView; + + $checkoutCart->getProceedToCheckoutBlock()->proceedToCheckout(); + $checkoutOnepage->getBillingBlock()->clickContinue(); + $checkoutOnepage->getPaymentMethodsBlock()->selectPaymentMethod(['method' => 'check_money_order']); + $checkoutOnepage->getPaymentMethodsBlock()->clickContinue(); + $actualPrices = []; + $actualPrices = $this->getReviewPrices($actualPrices, $product); + $actualPrices = $this->getReviewTotals($actualPrices); + $prices = $this->preparePrices($prices); + //Order review prices verification + $message = 'Prices on order review should be equal to defined in dataset.'; + \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message); + + $checkoutOnepage->getReviewBlock()->placeOrder(); + $checkoutOnepageSuccess->getSuccessBlock()->getGuestOrderId(); + $checkoutOnepageSuccess->getSuccessBlock()->openOrder(); + $actualPrices = []; + $actualPrices = $this->getOrderPrices($actualPrices, $product); + $actualPrices = $this->getOrderTotals($actualPrices); + + //Frontend order prices verification + $message = 'Prices on order view page should be equal to defined in dataset.'; + \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPricesDownloadable.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPricesDownloadable.php new file mode 100644 index 0000000000000000000000000000000000000000..bd74cdb32ae3b5fc98fccaf33b388ede9db87917 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPricesDownloadable.php @@ -0,0 +1,72 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Downloadable\Test\Constraint; + +use Magento\Cms\Test\Page\CmsIndex; +use Magento\Catalog\Test\Page\Category\CatalogCategoryView; +use Magento\Catalog\Test\Page\Product\CatalogProductView; +use Magento\Checkout\Test\Page\CheckoutCart; +use Magento\Tax\Test\Constraint\AbstractAssertTaxRuleIsAppliedToAllPrices; +use Mtf\Fixture\FixtureFactory; +use Mtf\Fixture\InjectableFixture; + +/** + * Checks that product prices excl tax on category, product and cart pages are equal to specified in dataset. + */ +abstract class AbstractAssertTaxRuleIsAppliedToAllPricesDownloadable extends AbstractAssertTaxRuleIsAppliedToAllPrices +{ + /** + * Constraint severeness. + * + * @var string + */ + protected $severeness = 'high'; + + /** + * Assert that specified prices are actual on category, product and cart pages. + * + * @param InjectableFixture $product + * @param array $prices + * @param int $qty + * @param CmsIndex $cmsIndex + * @param CatalogCategoryView $catalogCategoryView + * @param CatalogProductView $catalogProductView + * @param CheckoutCart $checkoutCart + * @param FixtureFactory $fixtureFactory + * @return void + */ + public function processAssert( + InjectableFixture $product, + array $prices, + $qty, + CmsIndex $cmsIndex, + CatalogCategoryView $catalogCategoryView, + CatalogProductView $catalogProductView, + CheckoutCart $checkoutCart, + FixtureFactory $fixtureFactory + ) { + $this->cmsIndex = $cmsIndex; + $this->catalogCategoryView = $catalogCategoryView; + $this->catalogProductView = $catalogProductView; + $this->checkoutCart = $checkoutCart; + $actualPrices = []; + //Assertion steps + $productName = $product->getName(); + $productCategory = $product->getCategoryIds()[0]; + $this->openCategory($productCategory); + $actualPrices = $this->getCategoryPrices($productName, $actualPrices); + $catalogCategoryView->getListProductBlock()->openProductViewPage($productName); + $catalogProductView->getViewBlock()->fillOptions($product); + $actualPrices = $this->getProductPagePrices($actualPrices); + $catalogProductView->getViewBlock()->clickAddToCart(); + $actualPrices = $this->getCartPrices($product, $actualPrices); + $actualPrices = $this->getTotals($actualPrices); + //Prices verification + $message = 'Prices from dataset should be equal to prices on frontend'; + \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableDuplicateForm.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableDuplicateForm.php index 75093a3f6a19df2fbebfe6129f85f486f7c949a8..4fc2eadf8a97259729a5fe8e051edcd6bbd84114 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableDuplicateForm.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableDuplicateForm.php @@ -9,7 +9,7 @@ namespace Magento\Downloadable\Test\Constraint; use Magento\Catalog\Test\Constraint\AssertProductDuplicateForm; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertDownloadableDuplicateForm diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableLinksData.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableLinksData.php index ac485a722142ed98b3c3b712535134eafa3ee6c6..376b7af496f5101ac670b59933ea0a57e6f84b8a 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableLinksData.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableLinksData.php @@ -8,8 +8,8 @@ namespace Magento\Downloadable\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Downloadable\Test\Fixture\DownloadableProductInjectable; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractAssertForm; /** * Class AssertDownloadableLinksData @@ -48,13 +48,13 @@ class AssertDownloadableLinksData extends AbstractAssertForm * * @param CatalogProductView $catalogProductView * @param DownloadableProductInjectable $product - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ public function processAssert( CatalogProductView $catalogProductView, DownloadableProductInjectable $product, - Browser $browser + BrowserInterface $browser ) { $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableProductInCustomerWishlistOnBackendGrid.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableProductInCustomerWishlistOnBackendGrid.php index 3b2d61a5554791d118a851645495ccbdd2a13c8d..e1be5aba24be859a48670d5c650a723c9a528f2c 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableProductInCustomerWishlistOnBackendGrid.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableProductInCustomerWishlistOnBackendGrid.php @@ -8,7 +8,7 @@ namespace Magento\Downloadable\Test\Constraint; use Magento\Downloadable\Test\Fixture\DownloadableProductInjectable; use Magento\Wishlist\Test\Constraint\AssertProductInCustomerWishlistOnBackendGrid; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertDownloadableProductInCustomerWishlistOnBackendGrid diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableSamplesData.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableSamplesData.php index 42321469ce3f556fdc50e9ea8f0811152b20e280..17c1132ce710915a1cd3131ca2056f3184e2895d 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableSamplesData.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableSamplesData.php @@ -8,8 +8,8 @@ namespace Magento\Downloadable\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Downloadable\Test\Fixture\DownloadableProductInjectable; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractAssertForm; /** * Class AssertDownloadableSamplesData @@ -46,13 +46,13 @@ class AssertDownloadableSamplesData extends AbstractAssertForm * * @param CatalogProductView $productView * @param DownloadableProductInjectable $product - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ public function processAssert( CatalogProductView $productView, DownloadableProductInjectable $product, - Browser $browser + BrowserInterface $browser ) { $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxCalculationAfterCheckoutDownloadableExcludingIncludingTax.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxCalculationAfterCheckoutDownloadableExcludingIncludingTax.php new file mode 100644 index 0000000000000000000000000000000000000000..64896843ae68b3b461a90ccd060d8b9d42dc186d --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxCalculationAfterCheckoutDownloadableExcludingIncludingTax.php @@ -0,0 +1,63 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Downloadable\Test\Constraint; + +/** + * Checks that prices excl and incl tax on order review and customer order pages are equal to specified in dataset. + */ +class AssertTaxCalculationAfterCheckoutDownloadableExcludingIncludingTax extends + AbstractAssertTaxCalculationAfterCheckoutDownloadable +{ + /** + * Constraint severeness + * + * @var string + */ + protected $severeness = 'high'; + + /** + * Get review totals. + * + * @param $actualPrices + * @return array + */ + public function getReviewTotals($actualPrices) + { + $reviewBlock = $this->checkoutOnepage->getReviewBlock(); + $actualPrices['subtotal_excl_tax'] = $reviewBlock->getSubtotalExclTax(); + $actualPrices['subtotal_incl_tax'] = $reviewBlock->getSubtotalInclTax(); + $actualPrices['discount'] = $reviewBlock->getDiscount(); + $actualPrices['shipping_excl_tax'] = $reviewBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $reviewBlock->getShippingInclTax(); + $actualPrices['tax'] = $reviewBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $reviewBlock->getGrandTotalExclTax(); + $actualPrices['grand_total_incl_tax'] = $reviewBlock->getGrandTotalInclTax(); + + return $actualPrices; + } + + /** + * Get order totals. + * + * @param $actualPrices + * @return array + */ + public function getOrderTotals($actualPrices) + { + $viewBlock = $this->orderView->getOrderViewBlock(); + $actualPrices['subtotal_excl_tax'] = $viewBlock->getSubtotalExclTax(); + $actualPrices['subtotal_incl_tax'] = $viewBlock->getSubtotalInclTax(); + $actualPrices['discount'] = $viewBlock->getDiscount(); + $actualPrices['shipping_excl_tax'] = $viewBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $viewBlock->getShippingInclTax(); + $actualPrices['tax'] = $viewBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $viewBlock->getGrandTotal(); + $actualPrices['grand_total_incl_tax'] = $viewBlock->getGrandTotalInclTax(); + + return $actualPrices; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxCalculationAfterCheckoutDownloadableExcludingTax.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxCalculationAfterCheckoutDownloadableExcludingTax.php new file mode 100644 index 0000000000000000000000000000000000000000..60a4e36293d08ae72d3b49153029ee4ff6fc8cb9 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxCalculationAfterCheckoutDownloadableExcludingTax.php @@ -0,0 +1,66 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Downloadable\Test\Constraint; + +use Magento\Customer\Test\Fixture\CustomerInjectable; + +/** + * Checks that prices excl tax on order review and customer order pages are equal to specified in dataset. + */ +class AssertTaxCalculationAfterCheckoutDownloadableExcludingTax extends + AbstractAssertTaxCalculationAfterCheckoutDownloadable +{ + /** + * Constraint severeness + * + * @var string + */ + protected $severeness = 'high'; + + /** + * Get review totals. + * + * @param $actualPrices + * @return array + */ + public function getReviewTotals($actualPrices) + { + $reviewBlock = $this->checkoutOnepage->getReviewBlock(); + $actualPrices['subtotal_excl_tax'] = $reviewBlock->getSubtotal(); + $actualPrices['subtotal_incl_tax'] = null; + $actualPrices['discount'] = $reviewBlock->getDiscount(); + $actualPrices['shipping_excl_tax'] = $reviewBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $reviewBlock->getShippingInclTax(); + $actualPrices['tax'] = $reviewBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $reviewBlock->getGrandTotal(); + $actualPrices['grand_total_incl_tax'] = null; + + return $actualPrices; + } + + /** + * Get order totals. + * + * @param $actualPrices + * @return array + */ + public function getOrderTotals($actualPrices) + { + $viewBlock = $this->orderView->getOrderViewBlock(); + $actualPrices['subtotal_excl_tax'] = $viewBlock->getSubtotal(); + $actualPrices['subtotal_incl_tax'] = null; + + $actualPrices['discount'] = $viewBlock->getDiscount(); + $actualPrices['shipping_excl_tax'] = $viewBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $viewBlock->getShippingInclTax(); + $actualPrices['tax'] = $viewBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $viewBlock->getGrandTotal(); + $actualPrices['grand_total_incl_tax'] = null; + + return $actualPrices; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxCalculationAfterCheckoutDownloadableIncludingTax.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxCalculationAfterCheckoutDownloadableIncludingTax.php new file mode 100644 index 0000000000000000000000000000000000000000..653b30217dbb1d9fc5c4652b93e1863e7aca336f --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxCalculationAfterCheckoutDownloadableIncludingTax.php @@ -0,0 +1,63 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Downloadable\Test\Constraint; + +/** + * Checks that prices incl tax on order review and customer order pages are equal to specified in dataset. + */ +class AssertTaxCalculationAfterCheckoutDownloadableIncludingTax extends + AbstractAssertTaxCalculationAfterCheckoutDownloadable +{ + /** + * Constraint severeness. + * + * @var string + */ + protected $severeness = 'high'; + + /** + * Get review totals. + * + * @param $actualPrices + * @return array + */ + public function getReviewTotals($actualPrices) + { + $reviewBlock = $this->checkoutOnepage->getReviewBlock(); + $actualPrices['subtotal_excl_tax'] = null; + $actualPrices['subtotal_incl_tax'] = $reviewBlock->getSubtotal(); + $actualPrices['discount'] = $reviewBlock->getDiscount(); + $actualPrices['shipping_excl_tax'] = $reviewBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $reviewBlock->getShippingInclTax(); + $actualPrices['tax'] = $reviewBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $reviewBlock->getGrandTotalExclTax(); + $actualPrices['grand_total_incl_tax'] = $reviewBlock->getGrandTotalInclTax(); + + return $actualPrices; + } + + /** + * Get order totals. + * + * @param $actualPrices + * @return array + */ + public function getOrderTotals($actualPrices) + { + $viewBlock = $this->orderView->getOrderViewBlock(); + $actualPrices['subtotal_excl_tax'] = null; + $actualPrices['subtotal_incl_tax'] = $viewBlock->getSubtotal(); + $actualPrices['discount'] = $viewBlock->getDiscount(); + $actualPrices['shipping_excl_tax'] = $viewBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $viewBlock->getShippingInclTax(); + $actualPrices['tax'] = $viewBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $viewBlock->getGrandTotal(); + $actualPrices['grand_total_incl_tax'] = $viewBlock->getGrandTotalInclTax(); + + return $actualPrices; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableExcludingIncludingTax.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableExcludingIncludingTax.php new file mode 100644 index 0000000000000000000000000000000000000000..2ea9f0bc5bd24c4244a5a80e510bf907f67d3907 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableExcludingIncludingTax.php @@ -0,0 +1,73 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Downloadable\Test\Constraint; + +/** + * Checks that prices excl tax on category, product and cart pages are equal to specified in dataset. + */ +class AssertTaxRuleIsAppliedToAllPricesDownloadableExcludingIncludingTax extends + AbstractAssertTaxRuleIsAppliedToAllPricesDownloadable +{ + /** + * Constraint severeness. + * + * @var string + */ + protected $severeness = 'high'; + + /** + * Get prices on category page. + * + * @param $productName + * @param array $actualPrices + * @return array + */ + public function getCategoryPrices($productName, $actualPrices) + { + $priceBlock = $this->catalogCategoryView->getListProductBlock()->getProductPriceBlock($productName); + $actualPrices['category_price_excl_tax'] = $priceBlock->getPriceExcludingTax(); + $actualPrices['category_price_incl_tax'] = $priceBlock->getPriceIncludingTax(); + + return $actualPrices; + } + + /** + * Get product view prices. + * + * @param array $actualPrices + * @return array + */ + public function getProductPagePrices($actualPrices) + { + $viewBlock = $this->catalogProductView->getViewBlock(); + $actualPrices['product_view_price_excl_tax'] = $viewBlock->getProductPriceExcludingTax(); + $actualPrices['product_view_price_incl_tax'] = $viewBlock->getProductPriceIncludingTax(); + + return $actualPrices; + } + + /** + * Get totals. + * + * @param $actualPrices + * @return array + */ + public function getTotals($actualPrices) + { + $totalsBlock = $this->checkoutCart->getTotalsBlock(); + $actualPrices['subtotal_excl_tax'] = $totalsBlock->getSubtotalExcludingTax(); + $actualPrices['subtotal_incl_tax'] = $totalsBlock->getSubtotalIncludingTax(); + $actualPrices['discount'] = $totalsBlock->getDiscount(); + $actualPrices['shipping_excl_tax'] = $totalsBlock->getShippingPrice(); + $actualPrices['shipping_incl_tax'] = $totalsBlock->getShippingPriceInclTax(); + $actualPrices['tax'] = $totalsBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $totalsBlock->getGrandTotalExcludingTax(); + $actualPrices['grand_total_incl_tax'] = $totalsBlock->getGrandTotalIncludingTax(); + + return $actualPrices; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableExcludingTax.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableExcludingTax.php new file mode 100644 index 0000000000000000000000000000000000000000..eaa5d5e115f5908ac9449ee4ed5a05e14d30383a --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableExcludingTax.php @@ -0,0 +1,74 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Downloadable\Test\Constraint; + +/** + * Checks that product prices excl tax on category, product and cart pages are equal to specified in dataset. + */ +class AssertTaxRuleIsAppliedToAllPricesDownloadableExcludingTax extends + AbstractAssertTaxRuleIsAppliedToAllPricesDownloadable +{ + /** + * Constraint severeness. + * + * @var string + */ + protected $severeness = 'high'; + + + /** + * Get prices on category page. + * + * @param $productName + * @param array $actualPrices + * @return array + */ + public function getCategoryPrices($productName, $actualPrices) + { + $priceBlock = $this->catalogCategoryView->getListProductBlock()->getProductPriceBlock($productName); + $actualPrices['category_price_excl_tax'] = $priceBlock->getEffectivePrice(); + $actualPrices['category_price_incl_tax'] = null; + + return $actualPrices; + } + + /** + * Get product view prices. + * + * @param array $actualPrices + * @return array + */ + public function getProductPagePrices($actualPrices) + { + $viewBlock = $this->catalogProductView->getViewBlock(); + $actualPrices['product_view_price_excl_tax'] = $viewBlock->getPriceBlock()->getEffectivePrice(); + $actualPrices['product_view_price_incl_tax'] = null; + + return $actualPrices; + } + + /** + * Get totals. + * + * @param array $actualPrices + * @return array + */ + public function getTotals($actualPrices) + { + $totalsBlock = $this->checkoutCart->getTotalsBlock(); + $actualPrices['subtotal_excl_tax'] = $totalsBlock->getSubtotal(); + $actualPrices['subtotal_incl_tax'] = null; + $actualPrices['discount'] = $totalsBlock->getDiscount(); + $actualPrices['shipping_excl_tax'] = $totalsBlock->getShippingPrice(); + $actualPrices['shipping_incl_tax'] = $totalsBlock->getShippingPriceInclTax(); + $actualPrices['tax'] = $totalsBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $totalsBlock->getGrandTotal(); + $actualPrices['grand_total_incl_tax'] = null; + + return $actualPrices; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableIncludingTax.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableIncludingTax.php new file mode 100644 index 0000000000000000000000000000000000000000..31fc3a1154b3d669e5e9e406251adda9953b3fd4 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableIncludingTax.php @@ -0,0 +1,73 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Downloadable\Test\Constraint; + +/** + * Checks that prices incl tax on category, product and cart pages are equal to specified in dataset. + */ +class AssertTaxRuleIsAppliedToAllPricesDownloadableIncludingTax extends + AbstractAssertTaxRuleIsAppliedToAllPricesDownloadable +{ + /** + * Constraint severeness. + * + * @var string + */ + protected $severeness = 'high'; + + /** + * Get prices on category page. + * + * @param string $productName + * @param array $actualPrices + * @return array + */ + public function getCategoryPrices($productName, $actualPrices) + { + $priceBlock = $this->catalogCategoryView->getListProductBlock()->getProductPriceBlock($productName); + $actualPrices['category_price_excl_tax'] = null; + $actualPrices['category_price_incl_tax'] = $priceBlock->getEffectivePrice(); + + return $actualPrices; + } + + /** + * Get product view prices. + * + * @param array $actualPrices + * @return array + */ + public function getProductPagePrices($actualPrices) + { + $viewBlock = $this->catalogProductView->getViewBlock(); + $actualPrices['product_view_price_excl_tax'] = null; + $actualPrices['product_view_price_incl_tax'] = $viewBlock->getPriceBlock()->getEffectivePrice(); + + return $actualPrices; + } + + /** + * Get totals. + * + * @param $actualPrices + * @return array + */ + public function getTotals($actualPrices) + { + $totalsBlock = $this->checkoutCart->getTotalsBlock(); + $actualPrices['subtotal_excl_tax'] = null; + $actualPrices['subtotal_incl_tax'] = $totalsBlock->getSubtotal(); + $actualPrices['discount'] = $totalsBlock->getDiscount(); + $actualPrices['shipping_excl_tax'] = $totalsBlock->getShippingPrice(); + $actualPrices['shipping_incl_tax'] = $totalsBlock->getShippingPriceInclTax(); + $actualPrices['tax'] = $totalsBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $totalsBlock->getGrandTotalExcludingTax(); + $actualPrices['grand_total_incl_tax'] = $totalsBlock->getGrandTotalIncludingTax(); + + return $actualPrices; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/Cart/Item.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/Cart/Item.php index c33a55a4e2d45465da9bba4828ff358746f16ed6..6962509496d831b195563ef0c6d7b31dd68b6c1e 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/Cart/Item.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/Cart/Item.php @@ -7,7 +7,7 @@ namespace Magento\Downloadable\Test\Fixture\Cart; use Magento\Downloadable\Test\Fixture\DownloadableProductInjectable; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Item diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.php index f4d380731114ad060640bb68bdaaa216b17af516..96407f349a198b4ad375ae801f34981ca95bd8b9 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.php @@ -6,7 +6,7 @@ namespace Magento\Downloadable\Test\Fixture; use Magento\Catalog\Test\Fixture\Product; -use Mtf\Factory\Factory; +use Magento\Mtf\Factory\Factory; /** * Class DownloadableProduct diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/LinksNotPurchasedSeparately.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/LinksNotPurchasedSeparately.php index c51edf7d793837221d5046c67c2027bdaaf45130..cc71d919ab80285dae4f793a59d493f6ab78d354 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/LinksNotPurchasedSeparately.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/LinksNotPurchasedSeparately.php @@ -5,7 +5,7 @@ */ namespace Magento\Downloadable\Test\Fixture\DownloadableProduct; -use Mtf\Factory\Factory; +use Magento\Mtf\Factory\Factory; /** * Class LinksNotPurchasedSeparately diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/LinksPurchasedSeparately.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/LinksPurchasedSeparately.php index c9013f0375e3147e0ff45dd03b2511147b1525a8..0151c23348f831c92dd29d8d6c81e08f24e81d37 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/LinksPurchasedSeparately.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/LinksPurchasedSeparately.php @@ -6,7 +6,7 @@ namespace Magento\Downloadable\Test\Fixture\DownloadableProduct; use Magento\Downloadable\Test\Fixture\DownloadableProduct; -use Mtf\Factory\Factory; +use Magento\Mtf\Factory\Factory; /** * Class LinksPurchasedSeparately diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.php index ae72fdb25a22df5ec2f4d12ca3362c4f96c4277b..b7c127fee461f3c8ef3b68e2a69ec48448167515 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.php @@ -6,7 +6,7 @@ namespace Magento\Downloadable\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class DownloadableProductInjectable @@ -144,7 +144,7 @@ class DownloadableProductInjectable extends InjectableFixture 'default_value' => '', 'input' => 'text', 'group' => 'advanced-pricing', - 'source' => 'Magento\Catalog\Test\Fixture\CatalogProductSimple\GroupPriceOptions', + 'source' => '\Magento\Downloadable\Test\Fixture\DownloadableProductInjectable\GroupPriceOptions' ]; protected $has_options = [ diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/CheckoutData.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/CheckoutData.php index 3607174b0c716bd3e070b285b329e8ecd8394680..6273955c5ba95a1b40d661c01e8192d4de22bcfe 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/CheckoutData.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/CheckoutData.php @@ -80,6 +80,23 @@ class CheckoutData extends \Magento\Catalog\Test\Fixture\CatalogProductSimple\Ch ], ], ], + + 'one_custom_option_and_downloadable_link' => [ + 'options' => [ + 'custom_options' => [ + [ + 'title' => 'attribute_key_0', + 'value' => 'option_key_0' + ], + ], + 'links' => [ + [ + 'label' => 'link_1', + 'value' => 'Yes' + ] + ], + ] + ], ]; return isset($presets[$name]) ? $presets[$name] : []; } diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/GroupPriceOptions.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/GroupPriceOptions.php new file mode 100644 index 0000000000000000000000000000000000000000..2d0b2c8f339dfa6a6f6c3bc64fe96af88a37f836 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/GroupPriceOptions.php @@ -0,0 +1,43 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Downloadable\Test\Fixture\DownloadableProductInjectable; + +/** + * Group price options fixture for downloadable product + */ +class GroupPriceOptions extends \Magento\Catalog\Test\Fixture\CatalogProductSimple\GroupPriceOptions +{ + /** + * Get preset array + * + * @param string $name + * @return mixed|null + */ + protected function getPreset($name) + { + $presets = [ + 'default' => [ + [ + 'price' => 20, + 'website' => 'All Websites [USD]', + 'customer_group' => 'NOT LOGGED IN', + ], + ], + 'downloadable_with_tax' => [ + [ + 'price' => 20.00, + 'website' => 'All Websites [USD]', + 'customer_group' => 'General', + ], + ], + ]; + if (!isset($presets[$name])) { + return null; + } + return $presets[$name]; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/Links.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/Links.php index 54db055d0c8f9bb66e80cc0e4984c44dc5bf4109..89189d993b23508e58b742bd4a369e5d5278fee0 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/Links.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/Links.php @@ -6,7 +6,7 @@ namespace Magento\Downloadable\Test\Fixture\DownloadableProductInjectable; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Links diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/Samples.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/Samples.php index 31ace5f042906e2a03b188625b4dccde669714c7..e7e7a3a1bc878b48d2898f577a9364049f617e2e 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/Samples.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/Samples.php @@ -6,7 +6,7 @@ namespace Magento\Downloadable\Test\Fixture\DownloadableProductInjectable; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Samples diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/Curl/CreateDownloadable.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/Curl/CreateDownloadable.php index 36c4d0570d1898b6c53411f4833ac0d06b272849..34466591d866524a628a65465b7cc584c83c8179 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/Curl/CreateDownloadable.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/Curl/CreateDownloadable.php @@ -5,12 +5,12 @@ */ namespace Magento\Downloadable\Test\Handler\Curl; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; class CreateDownloadable extends Curl { diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProductInjectable/Curl.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProductInjectable/Curl.php index 2c34a5381e8591295a1f866a933ca7f330ed87d3..fc45d141f131b0fb31aa272322b9d2f8341c90ef 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProductInjectable/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProductInjectable/Curl.php @@ -7,11 +7,11 @@ namespace Magento\Downloadable\Test\Handler\DownloadableProductInjectable; use Magento\Catalog\Test\Handler\CatalogProductSimple\Curl as ProductCurl; -use Mtf\Fixture\FixtureInterface; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProductInjectable/DownloadableProductInjectableInterface.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProductInjectable/DownloadableProductInjectableInterface.php index af455199b7d0ca9d145bb9320fa93506f4e83edd..04c50ffa5bed5602d181ab6e2b43f8a0964a6b79 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProductInjectable/DownloadableProductInjectableInterface.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProductInjectable/DownloadableProductInjectableInterface.php @@ -5,7 +5,7 @@ */ namespace Magento\Downloadable\Test\Handler\DownloadableProductInjectable; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface DownloadableProductInjectableInterface diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProductInjectable.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProductInjectable.php index de7dda22fc1d3b40c3f2a9d1a3c0189ec1f40149..462ff906b32dc9c18db4c1540f7bc9a5357f3d92 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProductInjectable.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProductInjectable.php @@ -6,7 +6,7 @@ namespace Magento\Downloadable\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class DownloadableProductInjectable @@ -21,6 +21,7 @@ class DownloadableProductInjectable extends AbstractRepository * @param array $defaultData [optional] * * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function __construct(array $defaultConfig = [], array $defaultData = []) { @@ -74,5 +75,65 @@ class DownloadableProductInjectable extends AbstractRepository 'downloadable_links' => ['preset' => 'with_two_separately_links'], 'checkout_data' => ['preset' => 'with_two_bought_links'], ]; + $this->_data['with_two_separately_links_special_price_and_category'] = [ + 'name' => 'Downloadable product %isolation%', + 'sku' => 'downloadable_product_%isolation%', + 'type_id' => 'downloadable', + 'url_key' => 'downloadable-product-%isolation%', + 'price' => ['value' => '30'], + 'special_price' => '20', + 'tax_class_id' => ['dataSet' => 'Taxable Goods'], + 'quantity_and_stock_status' => [ + 'qty' => 1111, + 'is_in_stock' => 'In Stock' + ], + 'status' => 'Product online', + 'category_ids' => ['presets' => 'default'], + 'visibility' => 'Catalog, Search', + 'is_virtual' => 'Yes', + 'website_ids' => ['Main Website'], + 'downloadable_links' => ['preset' => 'with_two_separately_links'], + 'checkout_data' => ['preset' => 'with_two_separately_links'] + ]; + $this->_data['with_two_separately_links_group_price_and_category'] = [ + 'name' => 'Downloadable product %isolation%', + 'sku' => 'downloadable_product_%isolation%', + 'type_id' => 'downloadable', + 'url_key' => 'downloadable-product-%isolation%', + 'price' => ['value' => '30'], + 'group_price' => ['preset' => 'downloadable_with_tax'], + 'tax_class_id' => ['dataSet' => 'Taxable Goods'], + 'quantity_and_stock_status' => [ + 'qty' => 1111, + 'is_in_stock' => 'In Stock' + ], + 'status' => 'Product online', + 'category_ids' => ['presets' => 'default'], + 'visibility' => 'Catalog, Search', + 'is_virtual' => 'Yes', + 'website_ids' => ['Main Website'], + 'downloadable_links' => ['preset' => 'with_two_separately_links'], + 'checkout_data' => ['preset' => 'with_two_separately_links'] + ]; + $this->_data['with_two_separately_links_custom_options_and_category'] = [ + 'name' => 'Downloadable product %isolation%', + 'sku' => 'downloadable_product_%isolation%', + 'type_id' => 'downloadable', + 'url_key' => 'downloadable-product-%isolation%', + 'price' => ['value' => '20'], + 'tax_class_id' => ['dataSet' => 'Taxable Goods'], + 'quantity_and_stock_status' => [ + 'qty' => 1111, + 'is_in_stock' => 'In Stock' + ], + 'status' => 'Product online', + 'category_ids' => ['presets' => 'default'], + 'visibility' => 'Catalog, Search', + 'is_virtual' => 'Yes', + 'website_ids' => ['Main Website'], + 'custom_options' => ['preset' => 'drop_down_with_one_option_percent_price'], + 'downloadable_links' => ['preset' => 'with_two_separately_links'], + 'checkout_data' => ['preset' => 'one_custom_option_and_downloadable_link'] + ]; } } diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/Create/LinksPurchasedSeparatelyTest.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/Create/LinksPurchasedSeparatelyTest.php index d32fc67d1402151f0b8f4a556f3cf6b26b85f7cc..3d92e2ab47b2bb8a98b4c34afaefb901250ba142 100755 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/Create/LinksPurchasedSeparatelyTest.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/Create/LinksPurchasedSeparatelyTest.php @@ -7,8 +7,8 @@ namespace Magento\Downloadable\Test\TestCase\Create; use Magento\Downloadable\Test\Fixture\DownloadableProduct; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; /** * Class LinksPurchasedSeparatelyTest diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest.php index 8f7fa66882f69521a10b0fdded17c5889e820c53..5256ad90ced946d63a7e1b951f3b40bdfb876a15 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest.php @@ -10,7 +10,7 @@ use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew; use Magento\Downloadable\Test\Fixture\DownloadableProductInjectable; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Create DownloadableProductEntity diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest.php index e53607eecbce7fca0a3009e50f54b9991eaa501d..cdc9b9946008acf1930b2a8c296e885024dc36fa 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest.php @@ -10,8 +10,8 @@ use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; use Magento\Downloadable\Test\Fixture\DownloadableProductInjectable; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Update DownloadableProductEntity diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/constraint.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/constraint.xml index 61e5435814dbc77d02cc7553390f97ef10f2b0be..6ada223124d4b220e4447a899d99b036ea926ded 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/constraint.xml +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/constraint.xml @@ -20,10 +20,37 @@ <require> <productGrid class="Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex" /> <productPage class="Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <product class="Magento\Mtf\Fixture\FixtureInterface" /> </require> </assertDownloadableDuplicateForm> <assertDownloadableProductInCustomerWishlistOnBackendGrid module="Magento_Downloadable"> <severity>low</severity> </assertDownloadableProductInCustomerWishlistOnBackendGrid> + <assertTaxRuleIsAppliedToAllPricesDownloadableExcludingTax module="Magento_Downloadable"> + <severeness>high</severeness> + </assertTaxRuleIsAppliedToAllPricesDownloadableExcludingTax> + <assertTaxRuleIsAppliedToAllPricesDownloadableIncludingTax module="Magento_Downloadable"> + <severeness>high</severeness> + </assertTaxRuleIsAppliedToAllPricesDownloadableIncludingTax> + <assertTaxRuleIsAppliedToAllPricesDownloadableExcludingIncludingTax module="Magento_Downloadable"> + <severeness>high</severeness> + </assertTaxRuleIsAppliedToAllPricesDownloadableExcludingIncludingTax> + <assertTaxCalculationAfterCheckoutDownloadableExcludingTax module="Magento_Downloadable"> + <severeness>high</severeness> + </assertTaxCalculationAfterCheckoutDownloadableExcludingTax> + <assertTaxCalculationAfterCheckoutDownloadableIncludingTax module="Magento_Downloadable"> + <severeness>high</severeness> + </assertTaxCalculationAfterCheckoutDownloadableIncludingTax> + <assertTaxCalculationAfterCheckoutDownloadableExcludingIncludingTax module="Magento_Downloadable"> + <severeness>high</severeness> + </assertTaxCalculationAfterCheckoutDownloadableExcludingIncludingTax> + <assertOrderTaxOnBackendDownloadableExcludingTax module="Magento_Downloadable"> + <severeness>high</severeness> + </assertOrderTaxOnBackendDownloadableExcludingTax> + <assertOrderTaxOnBackendDownloadableIncludingTax module="Magento_Downloadable"> + <severeness>high</severeness> + </assertOrderTaxOnBackendDownloadableIncludingTax> + <assertOrderTaxOnBackendDownloadableExcludingIncludingTax module="Magento_Downloadable"> + <severeness>high</severeness> + </assertOrderTaxOnBackendDownloadableExcludingIncludingTax> </constraint> diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/Form.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/Form.php index 773ec98686742dee1211699c591dba7d3c7aa501..874fcf8b3aac0e930f0ea130f640eb1bcab53bdb 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/Form.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/Form.php @@ -6,9 +6,9 @@ namespace Magento\GiftMessage\Test\Block\Adminhtml\Order\Create; -use Mtf\Block\Form as ParentForm; -use Mtf\Client\Element; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Block\Form as ParentForm; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Form @@ -27,10 +27,10 @@ class Form extends ParentForm * Fill backend GiftMessage item form. * * @param FixtureInterface $fixture - * @param Element|null $element + * @param SimpleElement|null $element * @return $this */ - public function fill(FixtureInterface $fixture, Element $element = null) + public function fill(FixtureInterface $fixture, SimpleElement $element = null) { parent::fill($fixture, $element); $this->_rootElement->find($this->okButton)->click(); diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/GiftOptions.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/GiftOptions.php index 18c8184ddcc0713f4e6842feec78deb04150001c..dc4cd18309225b15af820330550275f99bd0efb3 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/GiftOptions.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/GiftOptions.php @@ -10,7 +10,7 @@ namespace Magento\GiftMessage\Test\Block\Adminhtml\Order\Create; * Class GiftOptions * Backend GiftMessage for order form. */ -class GiftOptions extends \Mtf\Block\Form +class GiftOptions extends \Magento\Mtf\Block\Form { // } diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/Items.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/Items.php index f106ed84f56577b6fef24fba9f670e198d3ad400..8a607e2a3657aa55a4d71c939714fcc580f8575d 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/Items.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/Items.php @@ -7,8 +7,8 @@ namespace Magento\GiftMessage\Test\Block\Adminhtml\Order\Create; use Magento\GiftMessage\Test\Block\Adminhtml\Order\Create\Items\ItemProduct; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class Items diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/Items/ItemProduct.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/Items/ItemProduct.php index 4a68cb3ca9b903e2d5d92254b39ffe18731f523b..3627d161b35ab583e5f5c7ab4a1c919d473c2c6c 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/Items/ItemProduct.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/Items/ItemProduct.php @@ -6,9 +6,8 @@ namespace Magento\GiftMessage\Test\Block\Adminhtml\Order\Create\Items; +use Magento\Mtf\Client\Locator; use Magento\GiftMessage\Test\Fixture\GiftMessage; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; /** * Item product block on backend create order page. diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/View/Form.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/View/Form.php index da81852927de79840cc83868d37cbd62c77bf643..48ce7e6ad176174e30a437bae186fb57b5ee46d1 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/View/Form.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/View/Form.php @@ -6,7 +6,7 @@ namespace Magento\GiftMessage\Test\Block\Adminhtml\Order\View; -use Mtf\Block\Form as ParentForm; +use Magento\Mtf\Block\Form as ParentForm; /** * Class Form diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/View/GiftOptions.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/View/GiftOptions.php index f2343fe5361c6db112b15ee252339df3c9cb2306..79e0184c7d51f992bfe181eb826111a9aee425a1 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/View/GiftOptions.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/View/GiftOptions.php @@ -10,7 +10,7 @@ namespace Magento\GiftMessage\Test\Block\Adminhtml\Order\View; * Class GiftOptions * Backend GiftMessage for order from. */ -class GiftOptions extends \Mtf\Block\Form +class GiftOptions extends \Magento\Mtf\Block\Form { // } diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/View/Items.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/View/Items.php index 6db86ef354ca9dd20c1a48c47e6d34c7ff41c4f8..f6df838ca03bfb52db0485a3ed49f826474adbee 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/View/Items.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/View/Items.php @@ -7,8 +7,8 @@ namespace Magento\GiftMessage\Test\Block\Adminhtml\Order\View; use Magento\GiftMessage\Test\Block\Adminhtml\Order\View\Items\ItemProduct; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class Items diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/View/Items/ItemProduct.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/View/Items/ItemProduct.php index 4495f3a04c98b137fa6f30178cf56e583d422a29..46440c49f3c407bfb6d0040af66457f01357d475 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/View/Items/ItemProduct.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/View/Items/ItemProduct.php @@ -6,9 +6,8 @@ namespace Magento\GiftMessage\Test\Block\Adminhtml\Order\View\Items; +use Magento\Mtf\Client\Locator; use Magento\GiftMessage\Test\Fixture\GiftMessage; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; /** * Class ItemProduct diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Message/Inline.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Message/Inline.php index b067cfe9f51e595d9e165ed90e9b2fe209f62ce1..0c41872447b7796c0ee47861fa32e44403797dbf 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Message/Inline.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Message/Inline.php @@ -7,8 +7,8 @@ namespace Magento\GiftMessage\Test\Block\Message; use Magento\GiftMessage\Test\Fixture\GiftMessage; -use Mtf\Block\Form; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; /** * Class Inline diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Message/Inline/GiftMessageForm.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Message/Inline/GiftMessageForm.php index 704799a725d8df411530483daf640c9f9108b5fe..2c1a696e6929dc5c6bec4daa66abe309ccb4432a 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Message/Inline/GiftMessageForm.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Message/Inline/GiftMessageForm.php @@ -6,7 +6,7 @@ namespace Magento\GiftMessage\Test\Block\Message\Inline; -use Mtf\Block\Form; +use Magento\Mtf\Block\Form; /** * Class GiftMessageForm diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Message/Order/Items/View.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Message/Order/Items/View.php index cf13507fe464284c01c3cb20645bee3744dd6436..b3c29e2252085a4470eaeb586d78fe42b8d8109a 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Message/Order/Items/View.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Message/Order/Items/View.php @@ -6,8 +6,8 @@ namespace Magento\GiftMessage\Test\Block\Message\Order\Items; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Gift message block for order's items on order view page. diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInBackendOrder.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInBackendOrder.php index bd5d809d0af4df54c97ba7145dab0d67140933a9..fe543f8c3bdeb468ee24e25d1c1532c31f38d4a7 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInBackendOrder.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInBackendOrder.php @@ -9,7 +9,7 @@ namespace Magento\GiftMessage\Test\Constraint; use Magento\GiftMessage\Test\Fixture\GiftMessage; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Constraint\AbstractAssertForm; /** * Class AssertGiftMessageInBackendOrder diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrder.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrder.php index 9e4204a5e4e304da90ca74d95c87f5780ad9ae9b..9a2946618d87a876f28cecf4326c2d5fe90e9dd1 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrder.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrder.php @@ -11,7 +11,7 @@ use Magento\Customer\Test\Page\CustomerAccountLogout; use Magento\GiftMessage\Test\Fixture\GiftMessage; use Magento\Sales\Test\Page\OrderHistory; use Magento\Sales\Test\Page\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertGiftMessageInFrontendOrder diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrderItems.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrderItems.php index 693e0fa892463ce2116532647b7d943a280fccc7..09c931ac7a31d4c762cd4f48924b4c242417e7a7 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrderItems.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrderItems.php @@ -11,7 +11,7 @@ use Magento\Customer\Test\Page\CustomerAccountLogout; use Magento\GiftMessage\Test\Fixture\GiftMessage; use Magento\Sales\Test\Page\OrderHistory; use Magento\Sales\Test\Page\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertGiftMessageInFrontendOrderItems diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage.php index 6e65e3ae4fe7b058b00500d1695c1e9269ea02d7..d5857c0b99c216753009c80645559d79ee63fbc8 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage.php @@ -6,7 +6,7 @@ namespace Magento\GiftMessage\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class GiftMessage diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage/Items.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage/Items.php index bff6852923d24f4bc0f2e22f49ff85265da751ef..d53cc71937440951f1334e325d5fb514b1c504ab 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage/Items.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage/Items.php @@ -6,8 +6,8 @@ namespace Magento\GiftMessage\Test\Fixture\GiftMessage; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Items diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Repository/GiftMessage.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Repository/GiftMessage.php index 436fee4c6bcd0817dddcb6c00379603573a1765a..c0aae33db525f0b1a690d436859bea25ffc476bd 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Repository/GiftMessage.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Repository/GiftMessage.php @@ -6,7 +6,7 @@ namespace Magento\GiftMessage\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class GiftMessage diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestStep/AddGiftMessageBackendStep.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestStep/AddGiftMessageBackendStep.php index 793ac9f616e832f05d6446ff9ce64fc3ff9ebb8e..18848d9e75d2cb6c1974f15e874aec73599f12a6 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestStep/AddGiftMessageBackendStep.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestStep/AddGiftMessageBackendStep.php @@ -8,7 +8,7 @@ namespace Magento\GiftMessage\Test\TestStep; use Magento\GiftMessage\Test\Fixture\GiftMessage; use Magento\Sales\Test\Page\Adminhtml\OrderCreateIndex; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class AddGiftMessageBackendStep diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestStep/AddGiftMessageStep.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestStep/AddGiftMessageStep.php index 2e1cabbb6545067b901cc7f459c5a1c3eb138ee7..190de05c9eecdf1d89c29a6aeea3cc18416de37e 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestStep/AddGiftMessageStep.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestStep/AddGiftMessageStep.php @@ -8,7 +8,7 @@ namespace Magento\GiftMessage\Test\TestStep; use Magento\Checkout\Test\Page\CheckoutOnepage; use Magento\GiftMessage\Test\Fixture\GiftMessage; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class AddGiftMessageStep diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/etc/scenario.xml b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/etc/scenario.xml index 27b48d7e39f72cb612b8cf04ada12d0894bac281..71282278e78b01ffea89c26e43056ecb8d6bc1c5 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/etc/scenario.xml +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/etc/scenario.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<scenarios xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/Mtf/Config/etc/scenario.xsd"> +<scenarios xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/Magento/Mtf/Config/etc/scenario.xsd"> <scenario name="CheckoutWithGiftMessagesTest" module="Magento_GiftMessage"> <methods> <method name="test"> diff --git a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Block/Adminhtml/Types/Edit/GoogleShoppingForm.php b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Block/Adminhtml/Types/Edit/GoogleShoppingForm.php index fb13e2063d0ad701189597bbec4e5ac2cefca501..dcf5ad4f512e480c9a79567d526e05003a46d170 100644 --- a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Block/Adminhtml/Types/Edit/GoogleShoppingForm.php +++ b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Block/Adminhtml/Types/Edit/GoogleShoppingForm.php @@ -6,9 +6,9 @@ namespace Magento\GoogleShopping\Test\Block\Adminhtml\Types\Edit; -use Mtf\Block\Form; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class GoogleShoppingForm @@ -34,10 +34,10 @@ class GoogleShoppingForm extends Form * Fill specified form data * * @param array $fields - * @param Element $element + * @param SimpleElement $element * @return void */ - protected function _fill(array $fields, Element $element = null) + protected function _fill(array $fields, SimpleElement $element = null) { $context = ($element === null) ? $this->_rootElement : $element; foreach ($fields as $field) { @@ -87,7 +87,7 @@ class GoogleShoppingForm extends Form */ protected function getOptions() { - $elements = $this->_rootElement->find($this->attributeOptions, Locator::SELECTOR_XPATH)->getElements(); + $elements = $this->_rootElement->getElements($this->attributeOptions, Locator::SELECTOR_XPATH); $options = []; foreach ($elements as $key => $element) { diff --git a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Constraint/AssertProductAttributeAbsenceForAttributeMapping.php b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Constraint/AssertProductAttributeAbsenceForAttributeMapping.php index 37ce5a91a8c578d396ebec640460e9fba19fa174..7177cd74856af71e12a52bc5ac80992869a41e2f 100644 --- a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Constraint/AssertProductAttributeAbsenceForAttributeMapping.php +++ b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Constraint/AssertProductAttributeAbsenceForAttributeMapping.php @@ -9,8 +9,8 @@ namespace Magento\GoogleShopping\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogAttributeSet; use Magento\GoogleShopping\Test\Page\Adminhtml\GoogleShoppingTypesIndex; use Magento\GoogleShopping\Test\Page\Adminhtml\GoogleShoppingTypesNew; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureFactory; /** * Class AssertProductAttributeAbsenceForAttributeMapping diff --git a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute.php b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute.php index dcfa2ffe5ff364a5e25ea2a2fccc4439965e0dcf..88734fe6eb2ef2d48054e8b29e24fef7b77eb1c6 100644 --- a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute.php +++ b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute.php @@ -6,7 +6,7 @@ namespace Magento\GoogleShopping\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class GoogleShoppingAttribute diff --git a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute/AttributeSetId.php b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute/AttributeSetId.php index 2cb95ff70ccd41f790b37eab92a6b1f294b9688e..cfaf1d46249e040ed7ce1632d72addfd245ee75c 100644 --- a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute/AttributeSetId.php +++ b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute/AttributeSetId.php @@ -7,8 +7,8 @@ namespace Magento\GoogleShopping\Test\Fixture\GoogleShoppingAttribute; use Magento\Catalog\Test\Fixture\CatalogAttributeSet; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AttributeSetId diff --git a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Repository/GoogleShoppingAttribute.php b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Repository/GoogleShoppingAttribute.php index a7977ac9b2c197bbd9e7e8ee193c3ebb24fd91be..cbf687a07409e6f3abe18bdff066d386796bdd30 100644 --- a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Repository/GoogleShoppingAttribute.php +++ b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Repository/GoogleShoppingAttribute.php @@ -6,7 +6,7 @@ namespace Magento\GoogleShopping\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class GoogleShoppingAttribute diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Composite/Configure.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Composite/Configure.php index df8cf85c629de6dcfb03a38b5ca6f035a5b6997b..11da495aceed0a9a2b98bb4e9e0f1ecee6a68ef3 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Composite/Configure.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Composite/Configure.php @@ -7,7 +7,7 @@ namespace Magento\GroupedProduct\Test\Block\Adminhtml\Product\Composite; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Configure diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts.php index 06f553e19358648bdbe5e4a99d97d2e1ef41eef1..037331074bd67e80d91100360b4381f7dfb3c200 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts.php @@ -7,8 +7,9 @@ namespace Magento\GroupedProduct\Test\Block\Adminhtml\Product\Grouped; use Magento\Backend\Test\Block\Widget\Tab; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Client\Element; +use Magento\Mtf\Client\Locator; /** * Class AssociatedProducts @@ -74,15 +75,15 @@ class AssociatedProducts extends Tab * Fill data to fields on tab * * @param array $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return $this */ - public function fillFormTab(array $fields, Element $element = null) + public function fillFormTab(array $fields, SimpleElement $element = null) { if (isset($fields['associated'])) { - $options = $this->_rootElement->find($this->deleteButton)->getElements(); + $options = $this->_rootElement->getElements($this->deleteButton); if (count($options)) { - foreach ($options as $option) { + foreach (array_reverse($options) as $option) { $option->click(); } } @@ -101,10 +102,10 @@ class AssociatedProducts extends Tab * Get data to fields on group tab * * @param array|null $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return array */ - public function getDataFormTab($fields = null, Element $element = null) + public function getDataFormTab($fields = null, SimpleElement $element = null) { $newFields = []; if (isset($fields['associated'])) { diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts/ListAssociatedProducts.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts/ListAssociatedProducts.php index e5d4641eca230f9724a8385f366698f0d61855eb..1151e76c0324da4b3f05a6683a4f127b4a751893 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts/ListAssociatedProducts.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts/ListAssociatedProducts.php @@ -6,9 +6,8 @@ namespace Magento\GroupedProduct\Test\Block\Adminhtml\Product\Grouped\AssociatedProducts; -use Mtf\Block\Form; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; /** * Class ListAssociatedProducts diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts/ListAssociatedProducts/Product.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts/ListAssociatedProducts/Product.php index 34dd3ac6333e8907293f2c4327cd25f0d0b7efe0..f7a644f9d9386db21ecaadf47a222815a2b9ab96 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts/ListAssociatedProducts/Product.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts/ListAssociatedProducts/Product.php @@ -6,7 +6,7 @@ namespace Magento\GroupedProduct\Test\Block\Adminhtml\Product\Grouped\AssociatedProducts\ListAssociatedProducts; -use Mtf\Block\Form; +use Magento\Mtf\Block\Form; /** * Class Product diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts/Search/Grid.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts/Search/Grid.php index 86a0e3a5a0e2283d5fe89c5946a10644cd1479a0..f40ea0ad580ae254ceebc9423bddbaefe1c593a9 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts/Search/Grid.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts/Search/Grid.php @@ -7,7 +7,6 @@ namespace Magento\GroupedProduct\Test\Block\Adminhtml\Product\Grouped\AssociatedProducts\Search; use Magento\Backend\Test\Block\Widget\Grid as GridInterface; -use Mtf\Client\Element; /** * Class Grid diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Catalog/Product/View.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Catalog/Product/View.php index 710eb38c9e7b3ea0209a3edd2f6b6bc8dcb5187f..fd8184a473a931c9b2504de28c5226000842ffd9 100755 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Catalog/Product/View.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Catalog/Product/View.php @@ -7,7 +7,7 @@ namespace Magento\GroupedProduct\Test\Block\Catalog\Product; use Magento\Catalog\Test\Block\Product\View as ParentView; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class View diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Catalog/Product/View/Type/Grouped.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Catalog/Product/View/Type/Grouped.php index e32363960d5001b713f43cd5f8933ba58f0e58b2..0cacb9adcf16618694af9a0f559d7430c34943c8 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Catalog/Product/View/Type/Grouped.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Catalog/Product/View/Type/Grouped.php @@ -9,10 +9,10 @@ namespace Magento\GroupedProduct\Test\Block\Catalog\Product\View\Type; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\GroupedProduct\Test\Fixture\GroupedProduct; use Magento\GroupedProduct\Test\Fixture\GroupedProductInjectable; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class Grouped diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Checkout/Cart.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Checkout/Cart.php index 3a6e060af8075b5fec918493612d1e06553eea7b..3826d9a341e5d45c3c36545e8f5fd5450bee6aa9 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Checkout/Cart.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Checkout/Cart.php @@ -7,7 +7,7 @@ namespace Magento\GroupedProduct\Test\Block\Checkout; use Magento\GroupedProduct\Test\Fixture\GroupedProductInjectable; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Cart diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Checkout/Cart/CartItem.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Checkout/Cart/CartItem.php index 010a45b9aaaa90aef81abc2058d67061fb09ec8d..72674513efd9ab4e5341f989d970d98ff306bdb5 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Checkout/Cart/CartItem.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Checkout/Cart/CartItem.php @@ -116,7 +116,6 @@ class CartItem extends AbstractCartItem { foreach ($this->config['associated_cart_items'] as $cartItem) { /** @var CheckoutCartItem $cartItem */ - $cartItem->reinitRootElement(); $cartItem->removeItem(); } } diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AbstractAssertPriceOnGroupedProductPage.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AbstractAssertPriceOnGroupedProductPage.php index eaa50598d87bb1bf40dd23f6634cc0775e90da99..5627b7785a3be4f37aa9c721a545d8403c10a35d 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AbstractAssertPriceOnGroupedProductPage.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AbstractAssertPriceOnGroupedProductPage.php @@ -10,8 +10,8 @@ use Magento\Catalog\Test\Constraint\AssertPriceOnProductPageInterface; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\GroupedProduct\Test\Fixture\GroupedProductInjectable; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Assert that displayed grouped price on product page equals passed from fixture. @@ -38,7 +38,7 @@ abstract class AbstractAssertPriceOnGroupedProductPage extends AbstractConstrain * @param GroupedProductInjectable $product * @param CatalogProductView $catalogProductView * @param AssertPriceOnProductPageInterface $object - * @param Browser $browser + * @param BrowserInterface $browser * @param string $typePrice [optional] * @return bool|string */ @@ -46,7 +46,7 @@ abstract class AbstractAssertPriceOnGroupedProductPage extends AbstractConstrain GroupedProductInjectable $product, CatalogProductView $catalogProductView, AssertPriceOnProductPageInterface $object, - Browser $browser, + BrowserInterface $browser, $typePrice = '' ) { $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedPriceOnGroupedProductPage.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedPriceOnGroupedProductPage.php index 3e1072cf877414b1f7751475b926bf838570d065..d471c60f1eed2871a60357f153d3735fb685a9a2 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedPriceOnGroupedProductPage.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedPriceOnGroupedProductPage.php @@ -9,7 +9,7 @@ namespace Magento\GroupedProduct\Test\Constraint; use Magento\Catalog\Test\Constraint\AssertProductGroupedPriceOnProductPage; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\GroupedProduct\Test\Fixture\GroupedProductInjectable; -use Mtf\Client\Browser; +use Magento\Mtf\Client\BrowserInterface; /** * Class AssertGroupedPriceOnGroupedProductPage @@ -41,14 +41,14 @@ class AssertGroupedPriceOnGroupedProductPage extends AbstractAssertPriceOnGroupe * @param CatalogProductView $catalogProductView * @param GroupedProductInjectable $product * @param AssertProductGroupedPriceOnProductPage $groupedPrice - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ public function processAssert( CatalogProductView $catalogProductView, GroupedProductInjectable $product, AssertProductGroupedPriceOnProductPage $groupedPrice, - Browser $browser + BrowserInterface $browser ) { $this->processAssertPrice($product, $catalogProductView, $groupedPrice, $browser); } diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductForm.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductForm.php index 974ba950e37f1756063454c4827e2db360a627f0..fe78ef841ca38bac22f7c4897240da6b7b6a875a 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductForm.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductForm.php @@ -9,7 +9,7 @@ namespace Magento\GroupedProduct\Test\Constraint; use Magento\Catalog\Test\Constraint\AssertProductForm; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertGroupedProductForm diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductInCustomerWishlistOnBackendGrid.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductInCustomerWishlistOnBackendGrid.php index 44be1c0072b5bb12aa5fceaf703c72c02f2c959c..4128f39dede6b63814f80c4fff5fd57aee08ca52 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductInCustomerWishlistOnBackendGrid.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductInCustomerWishlistOnBackendGrid.php @@ -8,7 +8,7 @@ namespace Magento\GroupedProduct\Test\Constraint; use Magento\GroupedProduct\Test\Fixture\GroupedProductInjectable; use Magento\Wishlist\Test\Constraint\AssertProductInCustomerWishlistOnBackendGrid; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertGroupedProductInCustomerWishlistOnBackendGrid diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductInItemsOrderedGrid.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductInItemsOrderedGrid.php index 122ee4e04d1be2234df1540a5d051dc1d9d5ac0c..c91d1af7add20f758ed1867ecd5957c46c91a4d3 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductInItemsOrderedGrid.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductInItemsOrderedGrid.php @@ -8,7 +8,7 @@ namespace Magento\GroupedProduct\Test\Constraint; use Magento\Sales\Test\Block\Adminhtml\Order\Create\Items; use Magento\Sales\Test\Page\Adminhtml\OrderCreateIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertGroupedProductInItemsOrderedGrid diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductsDefaultQty.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductsDefaultQty.php index 48e97bb209f6917fa39a08c3d18222e0292c7e63..0ec0c06eff5b80b56e0b9446f645dfa954651c15 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductsDefaultQty.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductsDefaultQty.php @@ -8,8 +8,8 @@ namespace Magento\GroupedProduct\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\GroupedProduct\Test\Fixture\GroupedProductInjectable; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractAssertForm; /** * Class AssertGroupedProductsDefaultQty @@ -26,13 +26,13 @@ class AssertGroupedProductsDefaultQty extends AbstractAssertForm * * @param CatalogProductView $groupedProductView * @param GroupedProductInjectable $product - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ public function processAssert( CatalogProductView $groupedProductView, GroupedProductInjectable $product, - Browser $browser + BrowserInterface $browser ) { $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); $associatedProducts = $product->getAssociated(); diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertSpecialPriceOnGroupedProductPage.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertSpecialPriceOnGroupedProductPage.php index f68082aef3d42e5d9254a27c5714543bd26092da..0fd5cdd5b924ac567da439a7740e7745e022d853 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertSpecialPriceOnGroupedProductPage.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertSpecialPriceOnGroupedProductPage.php @@ -9,7 +9,7 @@ namespace Magento\GroupedProduct\Test\Constraint; use Magento\Catalog\Test\Constraint\AssertProductSpecialPriceOnProductPage; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\GroupedProduct\Test\Fixture\GroupedProductInjectable; -use Mtf\Client\Browser; +use Magento\Mtf\Client\BrowserInterface; /** * Class AssertSpecialPriceOnGroupedProductPage @@ -40,14 +40,14 @@ class AssertSpecialPriceOnGroupedProductPage extends AbstractAssertPriceOnGroupe * @param CatalogProductView $catalogProductView * @param GroupedProductInjectable $product * @param AssertProductSpecialPriceOnProductPage $specialPrice - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ public function processAssert( CatalogProductView $catalogProductView, GroupedProductInjectable $product, AssertProductSpecialPriceOnProductPage $specialPrice, - Browser $browser + BrowserInterface $browser ) { $this->processAssertPrice($product, $catalogProductView, $specialPrice, $browser); } diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertTierPriceOnGroupedProductPage.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertTierPriceOnGroupedProductPage.php index 86f1d5af2813213d96309ee1c10df690522d4f6e..c640d5b6aa25babf59f75d463715ea0851f499b5 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertTierPriceOnGroupedProductPage.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertTierPriceOnGroupedProductPage.php @@ -9,7 +9,7 @@ namespace Magento\GroupedProduct\Test\Constraint; use Magento\Catalog\Test\Constraint\AssertProductTierPriceOnProductPage; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\GroupedProduct\Test\Fixture\GroupedProductInjectable; -use Mtf\Client\Browser; +use Magento\Mtf\Client\BrowserInterface; /** * Class AssertTierPriceOnGroupedProductPage @@ -41,14 +41,14 @@ class AssertTierPriceOnGroupedProductPage extends AbstractAssertPriceOnGroupedPr * @param CatalogProductView $catalogProductView * @param GroupedProductInjectable $product * @param AssertProductTierPriceOnProductPage $tierPrice - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ public function processAssert( CatalogProductView $catalogProductView, GroupedProductInjectable $product, AssertProductTierPriceOnProductPage $tierPrice, - Browser $browser + BrowserInterface $browser ) { $this->processAssertPrice($product, $catalogProductView, $tierPrice, $browser, 'Tier'); } diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/Cart/Item.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/Cart/Item.php index 5b6988cfa0efd11c53842e4cf38334a035186d99..3e91ccb257870bb4a156f51c5094df152599c373 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/Cart/Item.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/Cart/Item.php @@ -7,7 +7,7 @@ namespace Magento\GroupedProduct\Test\Fixture\Cart; use Magento\GroupedProduct\Test\Fixture\GroupedProductInjectable; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Item diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.php index e53b8efd41061261cb786e6160c82fdd90b07e69..1a9779e60448d82d05da3b17bf4a21bbf38cc6e7 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.php @@ -7,8 +7,8 @@ namespace Magento\GroupedProduct\Test\Fixture; use Magento\Catalog\Test\Fixture\Product; -use Mtf\Factory\Factory; -use Mtf\System\Config; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\System\Config; /** * Class GroupedProduct diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable.php index 8cdbacd0153c4fe686185709b1b006ce6afa1256..3f1d1d5f4dc73d984ce79814c023ca5fd1d60c83 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable.php @@ -6,12 +6,12 @@ namespace Magento\GroupedProduct\Test\Fixture; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\InjectableFixture; -use Mtf\Handler\HandlerFactory; -use Mtf\Repository\RepositoryFactory; -use Mtf\System\Config; -use Mtf\System\Event\EventManagerInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Handler\HandlerFactory; +use Magento\Mtf\Repository\RepositoryFactory; +use Magento\Mtf\System\Config; +use Magento\Mtf\System\Event\EventManagerInterface; /** * Class GroupedProductInjectable diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable/Associated.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable/Associated.php index 416c89c7287aa26fa366ac99354a3b622f2fcfe5..4065bfa0221ab4455b515fe7eee31efd33891a00 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable/Associated.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable/Associated.php @@ -6,9 +6,9 @@ namespace Magento\GroupedProduct\Test\Fixture\GroupedProductInjectable; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class Associated diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable/Price.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable/Price.php index 017b60e5a8d04bb41c60c45dcabc332fb142e658..b6811384f498b87a05949632188875636d57d284 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable/Price.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable/Price.php @@ -7,7 +7,7 @@ namespace Magento\GroupedProduct\Test\Fixture\GroupedProductInjectable; use Magento\Catalog\Test\Fixture\CatalogProductSimple\Price as ParentPrice; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Price diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Handler/GroupedProductInjectable/Curl.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Handler/GroupedProductInjectable/Curl.php index fe470516ed1ce6c10cbffec3054fb832ef6b128c..1880721ab7e36c20818cfb94ace4f403634bceeb 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Handler/GroupedProductInjectable/Curl.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Handler/GroupedProductInjectable/Curl.php @@ -7,7 +7,7 @@ namespace Magento\GroupedProduct\Test\Handler\GroupedProductInjectable; use Magento\Catalog\Test\Handler\CatalogProductSimple\Curl as AbstractCurl; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Handler/GroupedProductInjectable/GroupedProductInjectableInterface.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Handler/GroupedProductInjectable/GroupedProductInjectableInterface.php index a3fdc3388de8f20ab5fc756954f399c4f41ca96f..59a19e47ffd54a00dd67f5d670f8ccf0607c93f4 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Handler/GroupedProductInjectable/GroupedProductInjectableInterface.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Handler/GroupedProductInjectable/GroupedProductInjectableInterface.php @@ -6,7 +6,7 @@ namespace Magento\GroupedProduct\Test\Handler\GroupedProductInjectable; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface GroupedProductInjectableInterface diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProductInjectable.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProductInjectable.php index 4d70d99c53e2bd58171d51d5348b51838d09311f..54f00cd5e1f89875ba671e043ec7ac6d9f26211e 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProductInjectable.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProductInjectable.php @@ -6,7 +6,7 @@ namespace Magento\GroupedProduct\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class GroupedProductInjectable diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedProductEntityTest.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedProductEntityTest.php index 7644612df2db1a0905f7682e32528523cf9d2286..722034257409954a952dac5d5dae17214608a5aa 100755 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedProductEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedProductEntityTest.php @@ -10,7 +10,7 @@ use Magento\Catalog\Test\Fixture\Category; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew; use Magento\GroupedProduct\Test\Fixture\GroupedProductInjectable; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for CreateGroupedProductEntity diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedTest.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedTest.php index 4acbf23ba517e9a6f3fae1b4723ba95fe7ecd7b8..0c59909268d2bb1b5ca84d121ace20acf7794769 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedTest.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedTest.php @@ -7,8 +7,8 @@ namespace Magento\GroupedProduct\Test\TestCase; use Magento\GroupedProduct\Test\Fixture\GroupedProduct; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; /** * Class CreateGroupedTest diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/UpdateGroupedProductEntityTest.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/UpdateGroupedProductEntityTest.php index 5628179fcbc7c29ca581d4a9ad8d9596375c9bed..a437d49447bf087889e782e0b82d06d888466a56 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/UpdateGroupedProductEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/UpdateGroupedProductEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\GroupedProduct\Test\TestCase; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; use Magento\GroupedProduct\Test\Fixture\GroupedProductInjectable; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Update GroupedProductEntity diff --git a/dev/tests/functional/tests/app/Magento/ImportExport/Test/Block/Adminhtml/Export/Edit/Form.php b/dev/tests/functional/tests/app/Magento/ImportExport/Test/Block/Adminhtml/Export/Edit/Form.php index 3a6c6f623ff881dad308f1b53581b7a8eca354ec..7073a781039ea74f438d5db43c9d0cdd3cdc0d2e 100644 --- a/dev/tests/functional/tests/app/Magento/ImportExport/Test/Block/Adminhtml/Export/Edit/Form.php +++ b/dev/tests/functional/tests/app/Magento/ImportExport/Test/Block/Adminhtml/Export/Edit/Form.php @@ -6,7 +6,7 @@ namespace Magento\ImportExport\Test\Block\Adminhtml\Export\Edit; -use Mtf\Block\Form as AbstractForm; +use Magento\Mtf\Block\Form as AbstractForm; /** * Class Form diff --git a/dev/tests/functional/tests/app/Magento/ImportExport/Test/Constraint/AssertProductAttributeAbsenceForExport.php b/dev/tests/functional/tests/app/Magento/ImportExport/Test/Constraint/AssertProductAttributeAbsenceForExport.php index 2ad78d38fe59470fa34b7d6c541e75653a2a779c..db5002a395008cb6b75a2d9c55e669c643e4e0ce 100644 --- a/dev/tests/functional/tests/app/Magento/ImportExport/Test/Constraint/AssertProductAttributeAbsenceForExport.php +++ b/dev/tests/functional/tests/app/Magento/ImportExport/Test/Constraint/AssertProductAttributeAbsenceForExport.php @@ -9,7 +9,7 @@ namespace Magento\ImportExport\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\ImportExport\Test\Fixture\ImportExport; use Magento\ImportExport\Test\Page\Adminhtml\AdminExportIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertAbsenceProductAttributeForExport diff --git a/dev/tests/functional/tests/app/Magento/ImportExport/Test/Fixture/ImportExport.php b/dev/tests/functional/tests/app/Magento/ImportExport/Test/Fixture/ImportExport.php index c825aff87c6b4bd4047ce98c3444c282c6c51ee7..e45bd649867d2f49d666f7a2438e22ca30be4641 100644 --- a/dev/tests/functional/tests/app/Magento/ImportExport/Test/Fixture/ImportExport.php +++ b/dev/tests/functional/tests/app/Magento/ImportExport/Test/Fixture/ImportExport.php @@ -6,7 +6,7 @@ namespace Magento\ImportExport\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class ImportExport diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Block/CreateAdmin.php b/dev/tests/functional/tests/app/Magento/Install/Test/Block/CreateAdmin.php index ac62896eea14910aac7d042d26ecbe6ddf7c821d..549d7d2b9b3a6899dae252096b1d232307588f9e 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Block/CreateAdmin.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Block/CreateAdmin.php @@ -6,8 +6,10 @@ namespace Magento\Install\Test\Block; -use Mtf\Block\Form; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; /** * Create Admin Account block. @@ -21,6 +23,13 @@ class CreateAdmin extends Form */ protected $next = "[ng-click*='next']"; + /** + * First field selector + * + * @var string + */ + protected $firstField = '[name="adminUsername"]'; + /** * Click on 'Next' button. * @@ -30,4 +39,17 @@ class CreateAdmin extends Form { $this->_rootElement->find($this->next, Locator::SELECTOR_CSS)->click(); } + + /** + * Ensure the form is loaded and fill the root form + * + * @param FixtureInterface $fixture + * @param SimpleElement|null $element + * @return $this + */ + public function fill(FixtureInterface $fixture, SimpleElement $element = null) + { + $this->waitForElementVisible($this->firstField); + return parent::fill($fixture, $element); + } } diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Block/CustomizeStore.php b/dev/tests/functional/tests/app/Magento/Install/Test/Block/CustomizeStore.php index 220775d9ec536cc84aa755db8ed4ef809a8f803e..c6f992c5dfba1aebdff011d121d380e04c6b28c1 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Block/CustomizeStore.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Block/CustomizeStore.php @@ -6,8 +6,10 @@ namespace Magento\Install\Test\Block; -use Mtf\Block\Form; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; /** * Customize Your Store block. @@ -21,6 +23,13 @@ class CustomizeStore extends Form */ protected $next = "[ng-click*='next']"; + /** + * First field selector + * + * @var string + */ + protected $firstField = '[ng-model*="language"]'; + /** * Click on 'Next' button. * @@ -30,4 +39,17 @@ class CustomizeStore extends Form { $this->_rootElement->find($this->next, Locator::SELECTOR_CSS)->click(); } + + /** + * Ensure the form is loaded and fill the root form + * + * @param FixtureInterface $fixture + * @param SimpleElement|null $element + * @return $this + */ + public function fill(FixtureInterface $fixture, SimpleElement $element = null) + { + $this->waitForElementVisible($this->firstField); + return parent::fill($fixture, $element); + } } diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Block/Database.php b/dev/tests/functional/tests/app/Magento/Install/Test/Block/Database.php index 3db7157b6f5f3446fe0d7d3774cbf9ea0fd54199..e1efe0955d55b1affbec3bd5ecce0045617dad7a 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Block/Database.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Block/Database.php @@ -6,8 +6,8 @@ namespace Magento\Install\Test\Block; -use Mtf\Block\Form; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; /** * Database form. diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Block/Install.php b/dev/tests/functional/tests/app/Magento/Install/Test/Block/Install.php index ae12c3c6f16c40de6a369b20679545ce9def5da9..40ae967bfd54c2625a437282902df31fefc8c057 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Block/Install.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Block/Install.php @@ -6,8 +6,8 @@ namespace Magento\Install\Test\Block; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Install block. @@ -61,9 +61,9 @@ class Install extends Block public function getAdminInfo() { $adminData = []; - $rows = $this->_rootElement->find('#admin-info .row')->getElements(); + $rows = $this->_rootElement->getElements('#admin-info .row'); foreach ($rows as $row) { - $dataRow = $row->find('div')->getElements(); + $dataRow = $row->getElements('div'); $key = strtolower(str_replace(' ', '_', str_replace(':', '', $dataRow[0]->getText()))); $adminData[$key] = $dataRow[1]->getText(); } @@ -79,9 +79,9 @@ class Install extends Block public function getDbInfo() { $dbData = []; - $rows = $this->_rootElement->find('#db-info .row')->getElements(); + $rows = $this->_rootElement->getElements('#db-info .row'); foreach ($rows as $row) { - $dataRow = $row->find('div')->getElements(); + $dataRow = $row->getElements('div'); $key = strtolower(str_replace(' ', '_', str_replace(':', '', $dataRow[0]->getText()))); $dbData[$key] = $dataRow[1]->getText(); } diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Block/Landing.php b/dev/tests/functional/tests/app/Magento/Install/Test/Block/Landing.php index 583d3f71de93007724f750164b788ed1b7b57621..8f3ddadef7e8d49b309de7069fd5e0c4071f1b41 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Block/Landing.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Block/Landing.php @@ -6,8 +6,8 @@ namespace Magento\Install\Test\Block; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Landing block. diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Block/License.php b/dev/tests/functional/tests/app/Magento/Install/Test/Block/License.php index a8d396a67826672945c51be72a44efaaeeae14f4..08f7f40dbffbf9d436989ba3ddb007ab5f3fcbd6 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Block/License.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Block/License.php @@ -6,8 +6,8 @@ namespace Magento\Install\Test\Block; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * License block. diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Block/Readiness.php b/dev/tests/functional/tests/app/Magento/Install/Test/Block/Readiness.php index 76f21eadcac00851a298586d98e1e860a19d3dd6..0e9a566b0d2108f451f66a3a35840a6034033fa0 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Block/Readiness.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Block/Readiness.php @@ -6,8 +6,8 @@ namespace Magento\Install\Test\Block; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Readiness block. diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Block/WebConfiguration.php b/dev/tests/functional/tests/app/Magento/Install/Test/Block/WebConfiguration.php index 865917e1212aca86e76a98669705dcd56364b648..654dd1ffc8fe3ad117cf1db3a7bb24ee7da00594 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Block/WebConfiguration.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Block/WebConfiguration.php @@ -6,7 +6,7 @@ namespace Magento\Install\Test\Block; -use Mtf\Block\Form; +use Magento\Mtf\Block\Form; /** * Web configuration block. diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertAgreementTextPresent.php b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertAgreementTextPresent.php index 31fdded30b058f4c006e05a75643e9347d6cefb6..1b19c8a0ade9a2f89267e3e481ad409c604f15d1 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertAgreementTextPresent.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertAgreementTextPresent.php @@ -7,7 +7,7 @@ namespace Magento\Install\Test\Constraint; use Magento\Install\Test\Page\Install; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Check that agreement text present on Terms & Agreement page during install. diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertCurrencySelected.php b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertCurrencySelected.php index a7cea54acdc1c4d7ce76d5d5e3199bba676c9837..01f6a6e83417cdc0bd98d84bddd96bfed8358e9b 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertCurrencySelected.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertCurrencySelected.php @@ -7,7 +7,7 @@ namespace Magento\Install\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\Dashboard; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Assert that selected currency symbol displays in admin. diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertKeyCreated.php b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertKeyCreated.php index a18bfb1e9a98b8b70ce5b10e2e67bee052df5c37..45805d80ab396982026547d059175a1b88e4d194 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertKeyCreated.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertKeyCreated.php @@ -6,7 +6,7 @@ namespace Magento\Install\Test\Constraint; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; use Magento\Install\Test\Page\Install; use Magento\Install\Test\Fixture\Install as InstallConfig; diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertLanguageSelected.php b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertLanguageSelected.php index 99225403378673d7fded2e941766ba282589fa17..06a8eacf21b0fff576bf62eba8f04f39e561e46e 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertLanguageSelected.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertLanguageSelected.php @@ -7,7 +7,7 @@ namespace Magento\Install\Test\Constraint; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Assert that selected language currently displays on frontend. diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertRewritesEnabled.php b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertRewritesEnabled.php index 665a6a4d83ab758508ed884d00a3cc5019c39136..3248e930e920d293b2a1936e0f3b02d6cfdbc5dc 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertRewritesEnabled.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertRewritesEnabled.php @@ -7,8 +7,8 @@ namespace Magento\Install\Test\Constraint; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Client\Driver\Selenium\Browser; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; use Magento\Catalog\Test\Fixture\Category; /** @@ -25,9 +25,9 @@ class AssertRewritesEnabled extends AbstractConstraint * * @param Category $category * @param CmsIndex $homePage - * @param Browser $browser + * @param BrowserInterface $browser */ - public function processAssert(Category $category, CmsIndex $homePage, Browser $browser) + public function processAssert(Category $category, CmsIndex $homePage, BrowserInterface $browser) { $category->persist(); $homePage->open(); diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSecureUrlEnabled.php b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSecureUrlEnabled.php index d756b22583e2cda43ee2d6afe6c1b4179dae543c..d42cc5a9fb574a515fd8c64e90b542568cfef232 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSecureUrlEnabled.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSecureUrlEnabled.php @@ -6,8 +6,8 @@ namespace Magento\Install\Test\Constraint; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; use Magento\Backend\Test\Page\Adminhtml\Dashboard; use Magento\Customer\Test\Page\CustomerAccountLogin; @@ -23,13 +23,13 @@ class AssertSecureUrlEnabled extends AbstractConstraint /** * Assert that Secure Urls Enabled. * - * @param Browser $browser + * @param BrowserInterface $browser * @param Dashboard $dashboard * @param CustomerAccountLogin $customerAccountLogin * @return void */ public function processAssert( - Browser $browser, + BrowserInterface $browser, Dashboard $dashboard, CustomerAccountLogin $customerAccountLogin ) { diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSuccessInstall.php b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSuccessInstall.php index 3a10bdc4cc19a26f7f11638077298e4587902412..9c8df14af250e3a8f783c9797d238b4572b9a72f 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSuccessInstall.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSuccessInstall.php @@ -8,7 +8,7 @@ namespace Magento\Install\Test\Constraint; use Magento\User\Test\Fixture\User; use Magento\Install\Test\Page\Install; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; use Magento\Install\Test\Fixture\Install as InstallConfig; /** diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSuccessfulReadinessCheck.php b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSuccessfulReadinessCheck.php index 32d69a4f44337302b745eccaa8aa7d14368cf6c1..ef42ae9ac9fdc60da320b3d4031bd46ea64826ea 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSuccessfulReadinessCheck.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSuccessfulReadinessCheck.php @@ -7,7 +7,7 @@ namespace Magento\Install\Test\Constraint; use Magento\Install\Test\Page\Install; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Check that PHP Version, PHP Extensions and File Permission are ok. diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Fixture/Install.php b/dev/tests/functional/tests/app/Magento/Install/Test/Fixture/Install.php index fe297aeb0d966ce9b0ceca184ed2e661d059e329..6a436e82d54a1998891764ec0f1c5c3ffd686742 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Fixture/Install.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Fixture/Install.php @@ -6,7 +6,7 @@ namespace Magento\Install\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class Install diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.php b/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.php index 943943cf5e9d5b64fbc1702c7a49909f573ba6ad..9231f84c67975da52b0a62328df5b83ec58f667d 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.php @@ -10,9 +10,9 @@ use Magento\Cms\Test\Page\CmsIndex; use Magento\Install\Test\Page\Install; use Magento\Install\Test\Fixture\Install as InstallConfig; use Magento\User\Test\Fixture\User; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; -use Mtf\System\Config; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; +use Magento\Mtf\System\Config; use Magento\Install\Test\Constraint\AssertAgreementTextPresent; use Magento\Install\Test\Constraint\AssertSuccessfulReadinessCheck; diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Block/Adminhtml/Integration/IntegrationGrid.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Block/Adminhtml/Integration/IntegrationGrid.php index b206797f1b20ff2f3482ce3365537352eff5ba95..734d91c42648b33370d85b2de7cd79af782ef19b 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Block/Adminhtml/Integration/IntegrationGrid.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Block/Adminhtml/Integration/IntegrationGrid.php @@ -9,7 +9,7 @@ namespace Magento\Integration\Test\Block\Adminhtml\Integration; use Magento\Backend\Test\Block\Widget\Grid; use Magento\Integration\Test\Block\Adminhtml\Integration\IntegrationGrid\ResourcesPopup; use Magento\Integration\Test\Block\Adminhtml\Integration\IntegrationGrid\TokensPopup; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class IntegrationGrid diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Block/Adminhtml/Integration/IntegrationGrid/DeleteDialog.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Block/Adminhtml/Integration/IntegrationGrid/DeleteDialog.php index d13efbf55153dc75f2eb9b8e14fb065a4c530998..c3ef042b1c1f1e939677e7e9cfee9b6cdbb448cf 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Block/Adminhtml/Integration/IntegrationGrid/DeleteDialog.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Block/Adminhtml/Integration/IntegrationGrid/DeleteDialog.php @@ -6,8 +6,8 @@ namespace Magento\Integration\Test\Block\Adminhtml\Integration\IntegrationGrid; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class DeleteDialog diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Block/Adminhtml/Integration/IntegrationGrid/ResourcesPopup.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Block/Adminhtml/Integration/IntegrationGrid/ResourcesPopup.php index d4b21f3362ad04e0cb728ddde1864261896d22ff..6720168dc4f81385cae0b3095a22404193f30463 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Block/Adminhtml/Integration/IntegrationGrid/ResourcesPopup.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Block/Adminhtml/Integration/IntegrationGrid/ResourcesPopup.php @@ -6,7 +6,7 @@ namespace Magento\Integration\Test\Block\Adminhtml\Integration\IntegrationGrid; -use Mtf\Block\Form; +use Magento\Mtf\Block\Form; /** * Class ResourcesPopup diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Block/Adminhtml/Integration/IntegrationGrid/TokensPopup.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Block/Adminhtml/Integration/IntegrationGrid/TokensPopup.php index 43651e1d78be0e73751cce96257c66072d712960..2c7c33b1db84c6183d34c7fd6783fccb25015f12 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Block/Adminhtml/Integration/IntegrationGrid/TokensPopup.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Block/Adminhtml/Integration/IntegrationGrid/TokensPopup.php @@ -6,7 +6,7 @@ namespace Magento\Integration\Test\Block\Adminhtml\Integration\IntegrationGrid; -use Mtf\Block\Form; +use Magento\Mtf\Block\Form; /** * Class TokensPopup diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationForm.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationForm.php index af2f985126162740ce6bcc264ff7431602a69d4c..d32789af9ba8005ba14fa86e61e64dc76e4f1968 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationForm.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationForm.php @@ -9,7 +9,7 @@ namespace Magento\Integration\Test\Constraint; use Magento\Integration\Test\Fixture\Integration; use Magento\Integration\Test\Page\Adminhtml\IntegrationIndex; use Magento\Integration\Test\Page\Adminhtml\IntegrationNew; -use Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Constraint\AbstractAssertForm; /** * Class AssertIntegrationForm diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationInGrid.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationInGrid.php index b770b325e65359dab7e98ad7708db1252318c936..81c5c22bab0324dfdcea88d5b9a5531e6d5f47e7 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Integration\Test\Constraint; use Magento\Integration\Test\Fixture\Integration; use Magento\Integration\Test\Page\Adminhtml\IntegrationIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertIntegrationInGrid diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationNotInGrid.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationNotInGrid.php index 78468647fd0108c901a37c77c435cdad3395939d..3b2705ee7994d7bd5babdfa5a1ef8233db4e1cef 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Integration\Test\Constraint; use Magento\Integration\Test\Fixture\Integration; use Magento\Integration\Test\Page\Adminhtml\IntegrationIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertIntegrationNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationResourcesPopup.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationResourcesPopup.php index 7613e5c9728e74becea6d2adefd9b6020d741c36..f301fc6c00ff26e189c06d948e0b7e81fcd8dcc5 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationResourcesPopup.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationResourcesPopup.php @@ -8,7 +8,7 @@ namespace Magento\Integration\Test\Constraint; use Magento\Integration\Test\Fixture\Integration; use Magento\Integration\Test\Page\Adminhtml\IntegrationIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertIntegrationResourcesPopup diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationSuccessActivationMessage.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationSuccessActivationMessage.php index 7bc79c61f2e98ffe9418d80c99d63e5b87c5a573..fa8edc4ae44886f7d23e6a399115dea3f393cde6 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationSuccessActivationMessage.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationSuccessActivationMessage.php @@ -8,7 +8,7 @@ namespace Magento\Integration\Test\Constraint; use Magento\Integration\Test\Fixture\Integration; use Magento\Integration\Test\Page\Adminhtml\IntegrationIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertIntegrationSuccessActivationMessage diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationSuccessDeleteMessage.php index 044e26d231eb5f43757f927839837b6b67dcb9f3..6ee3320e396b9aa9fb5436f590eb97f2d2cda411 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationSuccessDeleteMessage.php @@ -8,7 +8,7 @@ namespace Magento\Integration\Test\Constraint; use Magento\Integration\Test\Fixture\Integration; use Magento\Integration\Test\Page\Adminhtml\IntegrationIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertIntegrationSuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationSuccessReauthorizeMessage.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationSuccessReauthorizeMessage.php index fc5543afdc28d470ae5d7503688e79513dd8f272..7abfeb28dac4b90dd73b46d644d90e123cf43ffc 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationSuccessReauthorizeMessage.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationSuccessReauthorizeMessage.php @@ -8,7 +8,7 @@ namespace Magento\Integration\Test\Constraint; use Magento\Integration\Test\Fixture\Integration; use Magento\Integration\Test\Page\Adminhtml\IntegrationIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertIntegrationSuccessReauthorizeMessage diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationSuccessSaveMessage.php index bfbf57ef093499e03856b4ac3a93c027ef98aeec..c143ae8f0f29a033f235850a642e26b8ad86b7e0 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationSuccessSaveMessage.php @@ -8,7 +8,7 @@ namespace Magento\Integration\Test\Constraint; use Magento\Integration\Test\Fixture\Integration; use Magento\Integration\Test\Page\Adminhtml\IntegrationIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertIntegrationSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationTokensAfterReauthorize.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationTokensAfterReauthorize.php index d3643f0a469e4273153f1bdc58c549a507ba1e97..f0d6b8506720c0e87c027de513f60a3f3088d588 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationTokensAfterReauthorize.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationTokensAfterReauthorize.php @@ -9,7 +9,7 @@ namespace Magento\Integration\Test\Constraint; use Magento\Integration\Test\Fixture\Integration; use Magento\Integration\Test\Page\Adminhtml\IntegrationIndex; use Magento\Integration\Test\Page\Adminhtml\IntegrationNew; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertIntegrationTokensAfterReauthorize diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationTokensPopup.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationTokensPopup.php index 2bc2fe80c513769b86fc247d4750d82ab8b4587a..79af964f4ecff561e3e7a75144bffdffc880c8d5 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationTokensPopup.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationTokensPopup.php @@ -7,7 +7,7 @@ namespace Magento\Integration\Test\Constraint; use Magento\Integration\Test\Page\Adminhtml\IntegrationIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertIntegrationTokensPopup diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Fixture/Integration.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Fixture/Integration.php index f914c3d507dff8f6210edf00b0490f5ddb65f586..71a9b860f2fffa60d7b68ddf5ac0ab0502f9d7b6 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Fixture/Integration.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Fixture/Integration.php @@ -6,7 +6,7 @@ namespace Magento\Integration\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class Integration diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Handler/Integration/Curl.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Handler/Integration/Curl.php index a96f9123ac2734579aa37c80433e8d92c981f82e..0550185ae18df253833fc0cb1e4c15c761cd8f43 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Handler/Integration/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Handler/Integration/Curl.php @@ -6,12 +6,12 @@ namespace Magento\Integration\Test\Handler\Integration; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Handler/Integration/IntegrationInterface.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Handler/Integration/IntegrationInterface.php index f5abf4c7f2c1eb2cd685a10d31bf4fe5bfe941c8..4bfdf4efe2df26f5200250a7ff837680af2e6994 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Handler/Integration/IntegrationInterface.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Handler/Integration/IntegrationInterface.php @@ -6,7 +6,7 @@ namespace Magento\Integration\Test\Handler\Integration; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface IntegrationInterface diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Repository/Integration.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Repository/Integration.php index af4e955fca7c8cbb9d9190d7147d2c07d4f2158c..78c01f185fc2f224effb56cb11c86a2e65a7c812 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Repository/Integration.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Repository/Integration.php @@ -6,7 +6,7 @@ namespace Magento\Integration\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class Integration Repository diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ActivateIntegrationEntityTest.php b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ActivateIntegrationEntityTest.php index 43db84b40c5da25e67c299b01108584123f0eb5f..caf67686a3604ff01447238c7ed9fab3a68e3b60 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ActivateIntegrationEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ActivateIntegrationEntityTest.php @@ -8,7 +8,7 @@ namespace Magento\Integration\Test\TestCase; use Magento\Integration\Test\Fixture\Integration; use Magento\Integration\Test\Page\Adminhtml\IntegrationIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Activate Integration Entity diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/CreateIntegrationEntityTest.php b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/CreateIntegrationEntityTest.php index 31c234c3c045d7ecc71795ad371791a1b95c6c1e..2056ea6a9c7bb1e957ae4e3d5cab0bd14271a2d1 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/CreateIntegrationEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/CreateIntegrationEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Integration\Test\TestCase; use Magento\Integration\Test\Fixture\Integration; use Magento\Integration\Test\Page\Adminhtml\IntegrationIndex; use Magento\Integration\Test\Page\Adminhtml\IntegrationNew; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Create Integration Entity diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/DeleteIntegrationEntityTest.php b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/DeleteIntegrationEntityTest.php index efdef5324b6c1a2f1a0a9c0d830c2591bdd88ec0..d1cbf03eaecd41730831dad4dcd4df1f56b947d0 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/DeleteIntegrationEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/DeleteIntegrationEntityTest.php @@ -8,7 +8,7 @@ namespace Magento\Integration\Test\TestCase; use Magento\Integration\Test\Fixture\Integration; use Magento\Integration\Test\Page\Adminhtml\IntegrationIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Delete Integration Entity diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ReAuthorizeTokensIntegrationEntityTest.php b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ReAuthorizeTokensIntegrationEntityTest.php index 36c1743dccd3e32d50e616c463340e0db2cdc9b7..8519bb70812d705619e41be29766e9ff871dac38 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ReAuthorizeTokensIntegrationEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ReAuthorizeTokensIntegrationEntityTest.php @@ -8,8 +8,8 @@ namespace Magento\Integration\Test\TestCase; use Magento\Integration\Test\Fixture\Integration; use Magento\Integration\Test\Page\Adminhtml\IntegrationIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Reauthorize tokens for the Integration Entity. diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/UpdateIntegrationEntityTest.php b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/UpdateIntegrationEntityTest.php index 6fd90e31c2c42888f999c9c1a3432b0279f7d485..987c3c68b52dbcc4d35cd230a4dac4f9b6e6dd92 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/UpdateIntegrationEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/UpdateIntegrationEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Integration\Test\TestCase; use Magento\Integration\Test\Fixture\Integration; use Magento\Integration\Test\Page\Adminhtml\IntegrationIndex; use Magento\Integration\Test\Page\Adminhtml\IntegrationNew; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Update Integration Entity diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Block/Adminhtml/Template/Grid.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Block/Adminhtml/Template/Grid.php index 2d52f6004069f379da0320853f2c78aaca10b5ed..972317cb5c7a2c7383d1de89d37baf02082245bb 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Block/Adminhtml/Template/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Block/Adminhtml/Template/Grid.php @@ -6,7 +6,7 @@ namespace Magento\Newsletter\Test\Block\Adminhtml\Template; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class Grid diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Block/Adminhtml/Template/Preview.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Block/Adminhtml/Template/Preview.php index cb5536668301d38f70e0b2f02a04bc82d081e3ba..3de754dffa925d1f920b77c079b0df95a6cf63c7 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Block/Adminhtml/Template/Preview.php +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Block/Adminhtml/Template/Preview.php @@ -6,9 +6,8 @@ namespace Magento\Newsletter\Test\Block\Adminhtml\Template; -use Mtf\Block\Block; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Newsletter template preview. @@ -45,6 +44,7 @@ class Preview extends Block } ); $this->browser->switchToFrame(new Locator($this->iFrame)); + return $this->_rootElement->getText(); } } diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertCustomerIsSubscribedToNewsletter.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertCustomerIsSubscribedToNewsletter.php index a6fcb89baaf4db70b633d5fe66a476c0b9e6251d..7e41b346d1d2a5b4b85f15329218802c42aa4f58 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertCustomerIsSubscribedToNewsletter.php +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertCustomerIsSubscribedToNewsletter.php @@ -8,7 +8,7 @@ namespace Magento\Newsletter\Test\Constraint; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Newsletter\Test\Page\Adminhtml\SubscriberIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCustomerIsSubscribedToNewsletter diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterForm.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterForm.php index eee0651315b79759a805b645558b8a279a6bb638..fe8a56af636a8e9de0da03a45204673dda1d31b2 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterForm.php +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterForm.php @@ -9,7 +9,7 @@ namespace Magento\Newsletter\Test\Constraint; use Magento\Newsletter\Test\Fixture\Template; use Magento\Newsletter\Test\Page\Adminhtml\TemplateEdit; use Magento\Newsletter\Test\Page\Adminhtml\TemplateIndex; -use Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Constraint\AbstractAssertForm; /** * Class AssertNewsletterForm diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterInGrid.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterInGrid.php index 182f10bc13c05e99ea8c479ddb0a7742c287eeb1..b5d1a1c72b4445aed56b6aeb7dd8bb37bd1a8ad5 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Newsletter\Test\Constraint; use Magento\Newsletter\Test\Fixture\Template; use Magento\Newsletter\Test\Page\Adminhtml\TemplateIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertNewsletterInGrid diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterPreview.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterPreview.php index c3ffe3e95d2e58269a45175298fda4f3454875a1..aa0946c684dc1ec09ee7bf9b23d12c8a5e3e70df 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterPreview.php +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterPreview.php @@ -8,8 +8,8 @@ namespace Magento\Newsletter\Test\Constraint; use Magento\Newsletter\Test\Fixture\Template; use Magento\Newsletter\Test\Page\Adminhtml\TemplatePreview; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertNewsletterPreview @@ -24,13 +24,16 @@ class AssertNewsletterPreview extends AbstractConstraint /** * Assert that newsletter preview opened in new window and template content correct * - * @param Browser $browser + * @param BrowserInterface $browser * @param TemplatePreview $templatePreview * @param Template $newsletter * @return void */ - public function processAssert(Browser $browser, TemplatePreview $templatePreview, Template $newsletter) - { + public function processAssert( + BrowserInterface $browser, + TemplatePreview $templatePreview, + Template $newsletter + ) { $browser->selectWindow(); $content = $templatePreview->getContent()->getPageContent(); $browser->closeWindow(); diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterQueue.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterQueue.php index e1903f8ccc52abfe19132514633ba2c293b7d8a6..b9dbcdceb67d5f018a8f90a4300de9002c25e593 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterQueue.php +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterQueue.php @@ -8,7 +8,7 @@ namespace Magento\Newsletter\Test\Constraint; use Magento\Newsletter\Test\Fixture\Template; use Magento\Newsletter\Test\Page\Adminhtml\TemplateQueue; -use Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Constraint\AbstractAssertForm; /** * Class AssertNewsletterQueue diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterSuccessCreateMessage.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterSuccessCreateMessage.php index 21c32980f81a79bd85aa0fd0df8276fa8ac57e8d..0a71b2cc8ae57f78277e7df3e469c1f44bd9f3f2 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterSuccessCreateMessage.php +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Constraint/AssertNewsletterSuccessCreateMessage.php @@ -7,7 +7,7 @@ namespace Magento\Newsletter\Test\Constraint; use Magento\Newsletter\Test\Page\Adminhtml\TemplateIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertNewsletterSuccessCreateMessage diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Fixture/Template.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Fixture/Template.php index 44f92cc2b6fc4a8fa8a430ef6ff6fd79ea794008..da668a8e4a747f8eff3808836a7181f002a52ea6 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Fixture/Template.php +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Fixture/Template.php @@ -6,7 +6,7 @@ namespace Magento\Newsletter\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class Template diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Handler/Template/Curl.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Handler/Template/Curl.php index 759a6177fb28122ad210cb1d8a86646cfc426022..0cb1f61c7459f14c41ee6a4e372ceec8208b8fcd 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Handler/Template/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Handler/Template/Curl.php @@ -6,12 +6,12 @@ namespace Magento\Newsletter\Test\Handler\Template; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Handler/Template/TemplateInterface.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Handler/Template/TemplateInterface.php index cc4848f0dbe76bc6f4099321eecd009d0e47f73e..9b2628398266e0e39dae6d7a966b9b923348c721 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Handler/Template/TemplateInterface.php +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Handler/Template/TemplateInterface.php @@ -6,7 +6,7 @@ namespace Magento\Newsletter\Test\Handler\Template; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface TemplateInterface diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Repository/Template.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Repository/Template.php index 00f90b9ced37cf087c0a85bace9d067467424dfa..83669e31b8486c6b2cd15dc8e31f91aa963d454f 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Repository/Template.php +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Repository/Template.php @@ -6,7 +6,7 @@ namespace Magento\Newsletter\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class UrlRewrite diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/ActionNewsletterTemplateEntityTest.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/ActionNewsletterTemplateEntityTest.php index 7f761fb67ab1ed15f629b498c433353015b813ce..1bffdfc6e1ae3211531fbedb405cb07e87ee9caf 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/ActionNewsletterTemplateEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/ActionNewsletterTemplateEntityTest.php @@ -8,7 +8,7 @@ namespace Magento\Newsletter\Test\TestCase; use Magento\Newsletter\Test\Fixture\Template; use Magento\Newsletter\Test\Page\Adminhtml\TemplateIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Action for Newsletter Template (Preview and Queue) diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/CreateNewsletterTemplateEntityTest.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/CreateNewsletterTemplateEntityTest.php index b2c733f77bc6bf0f050742e4899ffc0960fbdd5c..81a7e1a994942bf3e9255d539056d064a0db8eea 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/CreateNewsletterTemplateEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/CreateNewsletterTemplateEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Newsletter\Test\TestCase; use Magento\Newsletter\Test\Fixture\Template; use Magento\Newsletter\Test\Page\Adminhtml\TemplateIndex; use Magento\Newsletter\Test\Page\Adminhtml\TemplateNewIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Create Newsletter Template diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/UpdateNewsletterTemplateTest.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/UpdateNewsletterTemplateTest.php index c639664114124252a2ac4d581bfef3adb3b1e614..9442ee96d8edb9b4d46b83b359c94010a9ac3d98 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/UpdateNewsletterTemplateTest.php +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/UpdateNewsletterTemplateTest.php @@ -9,7 +9,7 @@ namespace Magento\Newsletter\Test\TestCase; use Magento\Newsletter\Test\Fixture\Template; use Magento\Newsletter\Test\Page\Adminhtml\TemplateEdit; use Magento\Newsletter\Test\Page\Adminhtml\TemplateIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for UpdateNewsletterTemplate diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/AbstractFilter.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/AbstractFilter.php index 10965d8e33013271d4c0381b2e0773d47d880c7a..90eebe23e89a0b816abfc7ea7bfbad6308de09e9 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/AbstractFilter.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/AbstractFilter.php @@ -6,8 +6,8 @@ namespace Magento\Reports\Test\Block\Adminhtml; -use Mtf\Block\Form; -use Mtf\ObjectManager; +use Magento\Mtf\Block\Form; +use Magento\Mtf\ObjectManager; /** * Abstract Class Filter diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Customer/AccountsGrid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Customer/AccountsGrid.php index 52677cffebd985d14f8b1c2802d49d2681339836..0780cf35898c8a883dd4e5dd321723c362c4a431 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Customer/AccountsGrid.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Customer/AccountsGrid.php @@ -6,8 +6,8 @@ namespace Magento\Reports\Test\Block\Adminhtml\Customer; -use Mtf\Client\Element\Locator; -use Mtf\ObjectManager; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\ObjectManager; /** * Class AccountsGrid diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Customer/Totals/Grid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Customer/Totals/Grid.php index a7057bb927450800f5977d5ce2b06a32d308d6ab..3bf9e419499f8acb0d6610032cde8d7e3099aeda 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Customer/Totals/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Customer/Totals/Grid.php @@ -6,8 +6,8 @@ namespace Magento\Reports\Test\Block\Adminhtml\Customer\Totals; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class Grid @@ -62,7 +62,7 @@ class Grid extends \Magento\Backend\Test\Block\Widget\Grid * @param array $filter * @param bool $isSearchable * @param bool $isStrict - * @return Element + * @return SimpleElement */ protected function getRow(array $filter, $isSearchable = true, $isStrict = true) { diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Refresh/Statistics/Grid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Refresh/Statistics/Grid.php index 10c49b57b7a21c5fbbc05e23b25d37c5a6a16e80..b36221e8fe0d6596b82ec0d81e77f0ba441bae37 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Refresh/Statistics/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Refresh/Statistics/Grid.php @@ -7,7 +7,7 @@ namespace Magento\Reports\Test\Block\Adminhtml\Refresh\Statistics; use Magento\Backend\Test\Block\Widget\Grid as AbstractGrid; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class Grid diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Review/Customer/Grid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Review/Customer/Grid.php index 81381f65adbbb4eae062e500dcbb73409e62df0f..3eaae41b7e2bd327eb92e3af85bb9d56c1aca24e 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Review/Customer/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Review/Customer/Grid.php @@ -8,7 +8,7 @@ namespace Magento\Reports\Test\Block\Adminhtml\Review\Customer; use Magento\Backend\Test\Block\Widget\Grid as AbstractGrid; use Magento\Customer\Test\Fixture\CustomerInjectable; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class Grid diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Review/Products/Grid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Review/Products/Grid.php index cf97a199d6a75c13ba745e1646ca0c0701d3dc91..7c253b7b2f2874fa6ba1e8bfa4374ca792f13c82 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Review/Products/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Review/Products/Grid.php @@ -7,7 +7,7 @@ namespace Magento\Reports\Test\Block\Adminhtml\Review\Products; use Magento\Backend\Test\Block\Widget\Grid as AbstractGrid; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class Grid diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Review/Products/Viewed/ProductGrid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Review/Products/Viewed/ProductGrid.php index 8128e9cd6e825b82caf38075858cce3e6e8dd92e..e8f44efdbaa0c9f85fa2e0bf99a4a1cf18715651 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Review/Products/Viewed/ProductGrid.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Review/Products/Viewed/ProductGrid.php @@ -7,7 +7,7 @@ namespace Magento\Reports\Test\Block\Adminhtml\Review\Products\Viewed; use Magento\Backend\Test\Block\Widget\Grid; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class ProductGrid diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Sales/Orders/Viewed/FilterGrid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Sales/Orders/Viewed/FilterGrid.php index 92a22e656ea528a1a17b20ddf12a390109ccdd56..e3a36a9553e4502aa2788be8c955242beeaf4ad0 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Sales/Orders/Viewed/FilterGrid.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Sales/Orders/Viewed/FilterGrid.php @@ -7,7 +7,7 @@ namespace Magento\Reports\Test\Block\Adminhtml\Sales\Orders\Viewed; use Magento\Backend\Test\Block\Widget\Grid; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class FilterGrid diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Shopcart/Product/Grid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Shopcart/Product/Grid.php index 9831a4a710694ec60fa1a4354e4bc5490b6030c7..2186b442e7486ee8b79410d0bb1fbfaea49076d6 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Shopcart/Product/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Block/Adminhtml/Shopcart/Product/Grid.php @@ -7,7 +7,7 @@ namespace Magento\Reports\Test\Block\Adminhtml\Shopcart\Product; use Magento\Catalog\Test\Fixture\CatalogProductSimple; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class Grid diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AbstractAssertCustomerOrderReportResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AbstractAssertCustomerOrderReportResult.php index deecca39c4321205ebb016d5fb35ff289b617f6f..82e4fe1f4b0a998e1603463ddcf74bdec7c424ad 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AbstractAssertCustomerOrderReportResult.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AbstractAssertCustomerOrderReportResult.php @@ -7,7 +7,7 @@ namespace Magento\Reports\Test\Constraint; use Magento\Customer\Test\Fixture\CustomerInjectable; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AbstractAssertCustomerOrderReportResult diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AbstractAssertInvoiceReportResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AbstractAssertInvoiceReportResult.php index 16c1fbcf29dc6b3cd88d98d5ac434c3bea42567a..df6e3fb9662d455e69f22dbe3b8238b743c143eb 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AbstractAssertInvoiceReportResult.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AbstractAssertInvoiceReportResult.php @@ -8,8 +8,8 @@ namespace Magento\Reports\Test\Constraint; use Magento\Reports\Test\Page\Adminhtml\SalesInvoiceReport; use Magento\Sales\Test\Fixture\OrderInjectable; -use Mtf\Constraint\AbstractConstraint; -use Mtf\ObjectManager; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\ObjectManager; /** * Class AbstractAssertInvoiceReportResult diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AbstractAssertSalesReportResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AbstractAssertSalesReportResult.php index 55fa321d281a96588e355fca53e65e7ff72702ce..16af632c450ab59a2e803b609454d6d832064d32 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AbstractAssertSalesReportResult.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AbstractAssertSalesReportResult.php @@ -7,8 +7,8 @@ namespace Magento\Reports\Test\Constraint; use Magento\Sales\Test\Fixture\OrderInjectable; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Page\BackendPage; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Page\BackendPage; /** * Class AbstractAssertSalesReportResult diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertAbandonedCartCustomerInfoResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertAbandonedCartCustomerInfoResult.php index 7c38e4dfaa37fbc8847bad6e26e6f668dec24a3b..346f78a1c747a2ccede20e72264613c27067ac52 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertAbandonedCartCustomerInfoResult.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertAbandonedCartCustomerInfoResult.php @@ -8,7 +8,7 @@ namespace Magento\Reports\Test\Constraint; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Reports\Test\Page\Adminhtml\AbandonedCarts; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertAbandonedCartCustomerInfoResult diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertBestsellerReportResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertBestsellerReportResult.php index 726d18a3aadacd379bb789e46bf2ce8bc53f09d4..350a81904f4e379d7a0d2207c10c551408c71d06 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertBestsellerReportResult.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertBestsellerReportResult.php @@ -9,7 +9,7 @@ namespace Magento\Reports\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Reports\Test\Page\Adminhtml\Bestsellers; use Magento\Sales\Test\Fixture\OrderInjectable; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Assert bestseller info in report: date, product name and qty. diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertCouponReportResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertCouponReportResult.php index 685624924c9aaf9acf6e08d4cfc26da5810951c2..da229325e70c0b49298db2695385903961c97298 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertCouponReportResult.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertCouponReportResult.php @@ -8,7 +8,7 @@ namespace Magento\Reports\Test\Constraint; use Magento\Reports\Test\Page\Adminhtml\SalesCouponReportView; use Magento\Sales\Test\Fixture\OrderInjectable; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCouponReportResult diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertDownloadsReportResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertDownloadsReportResult.php index 97f486de8c0a290ecddc6679cb9e10e654e8b722..c77ecc0cfb61c683b1b69ef92e947c4f285dd9fc 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertDownloadsReportResult.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertDownloadsReportResult.php @@ -8,7 +8,7 @@ namespace Magento\Reports\Test\Constraint; use Magento\Reports\Test\Page\Adminhtml\DownloadsReport; use Magento\Sales\Test\Fixture\OrderInjectable; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertDownloadsReportResult diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertLowStockProductInGrid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertLowStockProductInGrid.php index 8b1b7e8a7773305eda1faa02d61244a99c89d38f..bbdee1a27dab6400df685bec811108308a6d962c 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertLowStockProductInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertLowStockProductInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Reports\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Reports\Test\Page\Adminhtml\ProductLowStock; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertLowStockProductInGrid diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertNewAccountsReportTotalResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertNewAccountsReportTotalResult.php index 8baf8d23c27650592d5d8cd98e7c7586b027a693..c3c051545097af9e227596356ad7745b17036e36 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertNewAccountsReportTotalResult.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertNewAccountsReportTotalResult.php @@ -7,7 +7,7 @@ namespace Magento\Reports\Test\Constraint; use Magento\Reports\Test\Page\Adminhtml\CustomerAccounts; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertNewAccountsReportTotalResult diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertOrderedProductResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertOrderedProductResult.php index 1cb398a2d6d599c32448a92aea5dc9d0a9a28214..dc72afc3bd70b224e9ade7160ea9d7531d58d851 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertOrderedProductResult.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertOrderedProductResult.php @@ -9,7 +9,7 @@ namespace Magento\Reports\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Reports\Test\Page\Adminhtml\OrderedProductsReport; use Magento\Sales\Test\Fixture\OrderInjectable; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderedProductResult diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductInCartResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductInCartResult.php index 37a3af3ddaf77f12849f63449420530351729714..5bf977eb479c2ccf44374ceac560182e68114b00 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductInCartResult.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductInCartResult.php @@ -8,7 +8,7 @@ namespace Magento\Reports\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Reports\Test\Page\Adminhtml\ShopCartProductReport; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductInCartResult diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReportByCustomerInGrid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReportByCustomerInGrid.php index 53f509fd4656ec92e3f8601e5cfa754b55c2d308..d537838adef6cd7795bcea1da0a8f2ae387cea9e 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReportByCustomerInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReportByCustomerInGrid.php @@ -12,7 +12,7 @@ use Magento\Reports\Test\Page\Adminhtml\CustomerReportReview; use Magento\Review\Test\Constraint\AssertProductReviewInGrid; use Magento\Review\Test\Fixture\Review; use Magento\Review\Test\Page\Adminhtml\ReviewIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductReportByCustomerInGrid diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReportByCustomerNotInGrid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReportByCustomerNotInGrid.php index 0a3d13e4d0a75cd0d708b8ca4ac5b4265c2b975d..76116fee9c8e8bbf2f8f2746e1f4a8c273f4090b 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReportByCustomerNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReportByCustomerNotInGrid.php @@ -12,7 +12,7 @@ use Magento\Reports\Test\Page\Adminhtml\CustomerReportReview; use Magento\Review\Test\Constraint\AssertProductReviewNotInGrid; use Magento\Review\Test\Fixture\Review; use Magento\Review\Test\Page\Adminhtml\ReviewIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductReportByCustomerNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReviewIsAvailableForProduct.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReviewIsAvailableForProduct.php index 20e1610df69c149fc3fa14d9870c61f5211558c7..f3ce68ad8d140681942da4c5ac6f5657bd4ba943 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReviewIsAvailableForProduct.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReviewIsAvailableForProduct.php @@ -10,7 +10,7 @@ use Magento\Reports\Test\Page\Adminhtml\ProductReportReview; use Magento\Review\Test\Constraint\AssertProductReviewInGrid; use Magento\Review\Test\Fixture\Review; use Magento\Review\Test\Page\Adminhtml\ReviewIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductReviewIsVisibleInGrid diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReviewReportIsVisibleInGrid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReviewReportIsVisibleInGrid.php index 61b45d29f0d38f639476dbe9b9233a17a93ea2ec..0d4604ec4400055dd45a4e3df8ce8c02a8c81b4a 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReviewReportIsVisibleInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReviewReportIsVisibleInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Reports\Test\Constraint; use Magento\Reports\Test\Page\Adminhtml\ProductReportReview; use Magento\Review\Test\Fixture\Review; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductReviewReportIsVisibleInGrid diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReviewsQtyByCustomer.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReviewsQtyByCustomer.php index d0d9400cf79c9243315dfc878f6fb53828315bd6..1ae6670b974ddd27fccefa888c02c28a51d054d5 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReviewsQtyByCustomer.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductReviewsQtyByCustomer.php @@ -8,7 +8,7 @@ namespace Magento\Reports\Test\Constraint; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Reports\Test\Page\Adminhtml\CustomerReportReview; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductReviewsQtyByCustomer diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductViewsReportTotalResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductViewsReportTotalResult.php index 0afd5c6c6009f2a8ec0b66bc1d7dd952af6d49ca..152cd5aa4ee62ca4ff91bc5df3fb6e4d32fc98fd 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductViewsReportTotalResult.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductViewsReportTotalResult.php @@ -7,7 +7,7 @@ namespace Magento\Reports\Test\Constraint; use Magento\Reports\Test\Page\Adminhtml\ProductReportView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductViewsReportTotalResult diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertSearchTermReportForm.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertSearchTermReportForm.php index 004c3ad4f5811a7bc2013cefd6b4eb334c60a919..d1e75cff6ac8e97c330439ab6f7396ed12ac0585 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertSearchTermReportForm.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertSearchTermReportForm.php @@ -8,7 +8,7 @@ namespace Magento\Reports\Test\Constraint; use Magento\CatalogSearch\Test\Page\Adminhtml\CatalogSearchEdit; use Magento\Reports\Test\Page\Adminhtml\SearchIndex; -use Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Constraint\AbstractAssertForm; /** * Class AssertSearchTermReportForm diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertSearchTermsInGrid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertSearchTermsInGrid.php index ac622368edafc0c89bbb66bd2eeab7f6a43cc128..cbb20b5cb97f315ba0f14c910981db9d8176ed89 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertSearchTermsInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertSearchTermsInGrid.php @@ -7,7 +7,7 @@ namespace Magento\Reports\Test\Constraint; use Magento\Reports\Test\Page\Adminhtml\SearchIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSearchTermsInGrid diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertTaxReportInGrid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertTaxReportInGrid.php index 2443521f269ab786376f99c0c9160a8a3728a155..bf5d8478e6a7bddf3d7f9409e8ddbe0004da8ace 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertTaxReportInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertTaxReportInGrid.php @@ -9,7 +9,7 @@ namespace Magento\Reports\Test\Constraint; use Magento\Reports\Test\Page\Adminhtml\SalesTaxReport; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Tax\Test\Fixture\TaxRule; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertTaxReportInGrid diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertTaxReportNotInGrid.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertTaxReportNotInGrid.php index 2e429dc13cdf2f32dff5f26f02c4ff36ce4da775..b7090947f14d8c7ca9a429cc74033b4ed382cc61 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertTaxReportNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertTaxReportNotInGrid.php @@ -9,7 +9,7 @@ namespace Magento\Reports\Test\Constraint; use Magento\Reports\Test\Page\Adminhtml\SalesTaxReport; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Tax\Test\Fixture\TaxRule; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertTaxReportNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/AbandonedCartsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/AbandonedCartsReportEntityTest.php index e8350b5091736411c08f1eddd09f8923d9eb4368..bc27cf23ec8c3843b1b61b502862fd87fc252b20 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/AbandonedCartsReportEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/AbandonedCartsReportEntityTest.php @@ -6,11 +6,11 @@ namespace Magento\Reports\Test\TestCase; -use Magento\Catalog\Test\Page\Product\CatalogProductView; +use Magento\Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Client\BrowserInterface; use Magento\Customer\Test\Fixture\CustomerInjectable; -use Mtf\Client\Browser; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Catalog\Test\Page\Product\CatalogProductView; /** * Test Flow: @@ -48,7 +48,7 @@ class AbandonedCartsReportEntityTest extends Injectable /** * Browser interface. * - * @var Browser + * @var BrowserInterface */ protected $browser; @@ -62,13 +62,13 @@ class AbandonedCartsReportEntityTest extends Injectable /** * Inject pages. * - * @param Browser $browser + * @param BrowserInterface $browser * @param FixtureFactory $fixtureFactory * @param CatalogProductView $catalogProductView * @return void */ public function __inject( - Browser $browser, + BrowserInterface $browser, FixtureFactory $fixtureFactory, CatalogProductView $catalogProductView ) { diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomerReviewReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomerReviewReportEntityTest.php index d116c2c492319592e3e9568da061834d17f443ac..28a4f7204b41d4ba7f3548e634da23b7a61eb59e 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomerReviewReportEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomerReviewReportEntityTest.php @@ -15,9 +15,9 @@ use Magento\Customer\Test\Page\CustomerAccountLogin; use Magento\Customer\Test\Page\CustomerAccountLogout; use Magento\Reports\Test\Page\Adminhtml\ProductReportReview; use Magento\Review\Test\Fixture\Review; -use Mtf\Client\Browser; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for CustomerReviewReportEntity @@ -136,7 +136,7 @@ class CustomerReviewReportEntityTest extends Injectable * @param CustomerInjectable $customer * @param $customerLogin * @param CatalogProductSimple $product - * @param Browser $browser + * @param BrowserInterface $browser * @return array * * @SuppressWarnings(PHPMD.ConstructorWithNameAsEnclosingClass) @@ -145,7 +145,7 @@ class CustomerReviewReportEntityTest extends Injectable Review $review, CustomerInjectable $customer, CatalogProductSimple $product, - Browser $browser, + BrowserInterface $browser, $customerLogin ) { // Preconditions diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/LowStockProductsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/LowStockProductsReportEntityTest.php index 557482ee2252be6a1a5d6834443e2e51bc53fba3..a81da13dd13add8b8e706c50379a0626e96e9183 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/LowStockProductsReportEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/LowStockProductsReportEntityTest.php @@ -7,7 +7,7 @@ namespace Magento\Reports\Test\TestCase; use Magento\Catalog\Test\Fixture\CatalogProductSimple; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for LowStockProductsReportEntityTest diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/NewAccountsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/NewAccountsReportEntityTest.php index 5a75c804d4b0475cd5ebb3d7966b31ecd591ddeb..62a4231bca01c1f55fbab71275e8578ddeea0425 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/NewAccountsReportEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/NewAccountsReportEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Reports\Test\TestCase; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; use Magento\Reports\Test\Page\Adminhtml\CustomerAccounts; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Flow: diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductReviewReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductReviewReportEntityTest.php index a26acb68c4ebe4d59231daa1dc3a220c39d363c9..92b8ee33316e41343bacb0287a85088b48312488 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductReviewReportEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductReviewReportEntityTest.php @@ -7,7 +7,7 @@ namespace Magento\Reports\Test\TestCase; use Magento\Review\Test\Fixture\Review; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for ProductReviewReportEntity diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntity.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntity.php index 09031687aa4bcd6cd88e8844286838a6ab199d18..59fcbb7b335fe2b3dbe3dbf1d2607d3111d6de1f 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntity.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntity.php @@ -12,8 +12,8 @@ use Magento\Cms\Test\Page\CmsIndex; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\CustomerAccountLogin; use Magento\Customer\Test\Page\CustomerAccountLogout; -use Mtf\Client\Browser; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for ProductsInCartReportEntity @@ -109,14 +109,14 @@ class ProductsInCartReportEntity extends Injectable * @param CustomerInjectable $customer * @param CatalogProductSimple $product * @param string $isGuest - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ public function test( CustomerInjectable $customer, CatalogProductSimple $product, $isGuest, - Browser $browser + BrowserInterface $browser ) { // Preconditions $product->persist(); diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SearchTermsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SearchTermsReportEntityTest.php index b670f8024b218058f263cba0377b2cf9d906bf66..eba901312b7964fc68c1520c885529aee0c6297b 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SearchTermsReportEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SearchTermsReportEntityTest.php @@ -8,8 +8,8 @@ namespace Magento\Reports\Test\TestCase; use Magento\Cms\Test\Page\CmsIndex; use Magento\Reports\Test\Page\Adminhtml\SearchIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Flow: diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.php index 13d029eaf34a8695c2f3dc229ec2979391e2bdf3..7ed40fc54cd1642bef310b41bde40e3e23caa320 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.php @@ -6,9 +6,9 @@ namespace Magento\Reports\Test\TestCase; -use Mtf\Client\Browser; -use Mtf\TestCase\Injectable; -use Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; use Magento\Reports\Test\Page\Adminhtml\ProductReportView; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; @@ -55,7 +55,7 @@ class ViewedProductsReportEntityTest extends Injectable /** * Browser interface * - * @var Browser + * @var BrowserInterface */ protected $browser; @@ -76,13 +76,13 @@ class ViewedProductsReportEntityTest extends Injectable * * @param ProductReportView $productReportView * @param FixtureFactory $fixtureFactory - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ public function __inject( ProductReportView $productReportView, FixtureFactory $fixtureFactory, - Browser $browser + BrowserInterface $browser ) { $this->productReportView = $productReportView; $this->fixtureFactory = $fixtureFactory; diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Block/Adminhtml/Edit/RatingElement.php b/dev/tests/functional/tests/app/Magento/Review/Test/Block/Adminhtml/Edit/RatingElement.php index 49873ce0828ceae2cb426666dceed4285f57b310..4d51eea65d24a7fb218d73a3197683803e5fed53 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Block/Adminhtml/Edit/RatingElement.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Block/Adminhtml/Edit/RatingElement.php @@ -6,14 +6,14 @@ namespace Magento\Review\Test\Block\Adminhtml\Edit; -use Mtf\Client\Driver\Selenium\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class RatingElement * Rating typified element */ -class RatingElement extends Element +class RatingElement extends SimpleElement { /** * Rating selector @@ -53,10 +53,10 @@ class RatingElement extends Element /** * Get rating vote * - * @param Element $rating + * @param SimpleElement $rating * @return int */ - protected function getRatingVote(Element $rating) + protected function getRatingVote(SimpleElement $rating) { $ratingVote = 5; $ratingVoteElement = $rating->find(sprintf($this->checkedRating, $ratingVote)); diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Block/Adminhtml/ReviewForm.php b/dev/tests/functional/tests/app/Magento/Review/Test/Block/Adminhtml/ReviewForm.php index 862a28a895e4854001f8b28955c524f53f6a02d2..76f821b010e92c37c3042141383c3fd895a3ed6d 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Block/Adminhtml/ReviewForm.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Block/Adminhtml/ReviewForm.php @@ -7,7 +7,8 @@ namespace Magento\Review\Test\Block\Adminhtml; use Magento\Backend\Test\Block\Widget\Form; -use Mtf\Client\Element\Locator; +use Magento\Review\Test\Fixture\ReviewInjectable; +use Magento\Mtf\Client\Locator; /** * Class Edit diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Block/Form.php b/dev/tests/functional/tests/app/Magento/Review/Test/Block/Form.php index d4627c25263afeb25285dcecc2334dbc4de41f8e..449bc91419bbdd368b4451d28887e03ed3661e56 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Block/Form.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Block/Form.php @@ -6,12 +6,12 @@ namespace Magento\Review\Test\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\Element\SimpleElement; use Magento\Review\Test\Fixture\Rating; use Magento\Review\Test\Fixture\Review; -use Mtf\Block\Form as AbstractForm; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Block\Form as AbstractForm; /** * Review form on frontend. @@ -59,7 +59,7 @@ class Form extends AbstractForm /** * Get legend. * - * @return Element + * @return SimpleElement */ public function getLegend() { @@ -81,7 +81,7 @@ class Form extends AbstractForm * Get single product rating. * * @param Rating $rating - * @return Element + * @return SimpleElement */ protected function getRating(Rating $rating) { @@ -92,10 +92,10 @@ class Form extends AbstractForm * Fill the review form. * * @param FixtureInterface $review - * @param Element|null $element + * @param SimpleElement|null $element * @return $this */ - public function fill(FixtureInterface $review, Element $element = null) + public function fill(FixtureInterface $review, SimpleElement $element = null) { if ($review->hasData('ratings')) { $this->fillRatings($review->getRatings()); diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Block/Product/View.php b/dev/tests/functional/tests/app/Magento/Review/Test/Block/Product/View.php index 802a9be45927811f05a51904c6ee7b05e27145f3..ca08c912deca7eed4d5b87b963a5410708bcabb8 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Block/Product/View.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Block/Product/View.php @@ -7,7 +7,7 @@ namespace Magento\Review\Test\Block\Product; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Class View diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Block/Product/View/Summary.php b/dev/tests/functional/tests/app/Magento/Review/Test/Block/Product/View/Summary.php index 2793d96e52b98457c6dff62f8471ed0e5e827c32..c193a6af97ac82605499d556d50259df476922a4 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Block/Product/View/Summary.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Block/Product/View/Summary.php @@ -7,8 +7,8 @@ namespace Magento\Review\Test\Block\Product\View; -use Mtf\Block\Block; -use Mtf\Client\Element; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\ElementInterface; /** * Reviews frontend block. @@ -32,7 +32,7 @@ class Summary extends Block /** * Get add review link. * - * @return Element + * @return ElementInterface */ public function getAddReviewLink() { @@ -53,9 +53,9 @@ class Summary extends Block } /** - * Get view review link. + * Get view review link * - * @return Element + * @return ElementInterface */ public function getViewReviewLink() { diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingInGrid.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingInGrid.php index 9f0d60cf1a08a5b965ebb817c168af0159c5e33d..ffc1ab0c766c5c49462ca21b7469a40938a939ef 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Review\Test\Constraint; use Magento\Review\Test\Fixture\Rating; use Magento\Review\Test\Page\Adminhtml\RatingIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductRatingInGrid diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingInProductPage.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingInProductPage.php index aa365cbc8dceeef29fc840e2d6fc8d684b1a1edc..2f1ab78b298c197e26f29afbb24304b10762cda6 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingInProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingInProductPage.php @@ -10,8 +10,8 @@ use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Review\Test\Fixture\Rating; use Magento\Review\Test\Fixture\Review; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductRatingInProductPage @@ -27,7 +27,7 @@ class AssertProductRatingInProductPage extends AbstractConstraint * Assert that product rating is displayed on product review(frontend) * * @param CatalogProductView $catalogProductView - * @param Browser $browser + * @param BrowserInterface $browser * @param CatalogProductSimple $product * @param Review|null $review [optional] * @param Rating|null $productRating [optional] @@ -35,7 +35,7 @@ class AssertProductRatingInProductPage extends AbstractConstraint */ public function processAssert( CatalogProductView $catalogProductView, - Browser $browser, + BrowserInterface $browser, CatalogProductSimple $product, Review $review = null, Rating $productRating = null diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingNotInGrid.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingNotInGrid.php index db3fdb0c528d1cbe21be04e38259a41304387606..9ec15f8d1444793edefca786175761f3ce7fd9ca 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Review\Test\Constraint; use Magento\Review\Test\Fixture\Rating; use Magento\Review\Test\Page\Adminhtml\RatingIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductRatingNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingNotInProductPage.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingNotInProductPage.php index e5fefcc26717c3eeb37044d64995a2716c8145e3..11a01165df1c8ce649628bfa563ab458fc7f2aef 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingNotInProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingNotInProductPage.php @@ -9,8 +9,8 @@ namespace Magento\Review\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Review\Test\Fixture\Rating; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductRatingNotInProductPage @@ -27,14 +27,14 @@ class AssertProductRatingNotInProductPage extends AbstractConstraint * @param CatalogProductView $catalogProductView * @param CatalogProductSimple $product * @param Rating $productRating - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ public function processAssert( CatalogProductView $catalogProductView, CatalogProductSimple $product, Rating $productRating, - Browser $browser + BrowserInterface $browser ) { $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); $catalogProductView->getReviewSummary()->getAddReviewLink()->click(); diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingOnReviewPage.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingOnReviewPage.php index 0c2568845893db95b82e481f25b40b61af28a979..a5db756a503b4a8f78db89d98279589109e94498 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingOnReviewPage.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingOnReviewPage.php @@ -9,7 +9,7 @@ namespace Magento\Review\Test\Constraint; use Magento\Review\Test\Fixture\Review; use Magento\Review\Test\Page\Adminhtml\ReviewEdit; use Magento\Review\Test\Page\Adminhtml\ReviewIndex; -use Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Constraint\AbstractAssertForm; /** * Class AssertProductRatingOnReviewPage diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingSuccessDeleteMessage.php index 95da16862d974f9a6d02608ca7e5d83512204611..4c9e6e5aab25303e4fe466719352e59cf84ef6b1 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingSuccessDeleteMessage.php @@ -7,7 +7,7 @@ namespace Magento\Review\Test\Constraint; use Magento\Review\Test\Page\Adminhtml\RatingIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductRatingSuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingSuccessSaveMessage.php index 6168f31cbe824dba783ea61a49289aceb8374f04..36987feabff02e999f437cb00e526e21e364e3db 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductRatingSuccessSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\Review\Test\Constraint; use Magento\Review\Test\Page\Adminhtml\RatingIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductRatingSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewBackendSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewBackendSuccessSaveMessage.php index 8d1752909c02a740c09e009f125863106bcbe3bb..a7f527e20dd6bbf9b740e4505291af84ff1520d9 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewBackendSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewBackendSuccessSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\Review\Test\Constraint; use Magento\Review\Test\Page\Adminhtml\ReviewIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductReviewBackendSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewForm.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewForm.php index 2b8ce7fe0fe1e14abb534ec55c63b73f74127777..eb6cb92c40c0f270b3fab671135d6f00bcc364a2 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewForm.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewForm.php @@ -6,7 +6,7 @@ namespace Magento\Review\Test\Constraint; -use Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Constraint\AbstractAssertForm; use Magento\Review\Test\Fixture\Review; use Magento\Review\Test\Page\Adminhtml\ReviewIndex; use Magento\Review\Test\Page\Adminhtml\ReviewEdit; diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewInGrid.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewInGrid.php index 90485e15850fc0a42ec804e825605f2cd7f438e4..355bcd41faeb5ea088dac007164272f63e5d4ada 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewInGrid.php @@ -8,8 +8,8 @@ namespace Magento\Review\Test\Constraint; use Magento\Review\Test\Fixture\Review; use Magento\Review\Test\Page\Adminhtml\ReviewIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductReviewInGrid diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewInGridOnCustomerPage.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewInGridOnCustomerPage.php index 07071d976371ed7abff98f730bd7bb1e95bdffe3..1208bd72e4d808a975e6f4af00777ca168e33af8 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewInGridOnCustomerPage.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewInGridOnCustomerPage.php @@ -11,7 +11,7 @@ use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit; use Magento\Review\Test\Block\Adminhtml\Product\Grid as ReviewsGrid; use Magento\Review\Test\Fixture\Review; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductReviewInGridOnCustomerPage diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewIsAbsentOnProductPage.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewIsAbsentOnProductPage.php index 14eddfbb268782060cbab4269cdfdd16a38f4419..b4852e19d6ee4d207bae45089a41041f25dc492f 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewIsAbsentOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewIsAbsentOnProductPage.php @@ -6,7 +6,7 @@ namespace Magento\Review\Test\Constraint; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; use Magento\Catalog\Test\Page\Product\CatalogProductView; /** diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewMassActionSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewMassActionSuccessDeleteMessage.php index a20ebe47231a8ba3ee9c7ad1bf0cff631607ab6e..cf57f87ba429c9e5774e75163ce75c5403ab5da9 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewMassActionSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewMassActionSuccessDeleteMessage.php @@ -8,7 +8,7 @@ namespace Magento\Review\Test\Constraint; use Magento\Review\Test\Fixture\Review; use Magento\Review\Test\Page\Adminhtml\ReviewIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductReviewMassActionSuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewMassActionSuccessMessage.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewMassActionSuccessMessage.php index 67d9c66a3ed9946bfb0919b7a1ddbee6f321d376..3f8d9c4c43c8e245c9cd8a6d6fe605c0bb636e54 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewMassActionSuccessMessage.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewMassActionSuccessMessage.php @@ -8,7 +8,7 @@ namespace Magento\Review\Test\Constraint; use Magento\Review\Test\Fixture\Review; use Magento\Review\Test\Page\Adminhtml\ReviewIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductReviewMassActionSuccessMessage diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewNotInGrid.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewNotInGrid.php index 70f0a5fa4a269f3290f15f1682ff7fcbada113e1..6776c3a651dc5533b9836052e1d084c61fff2c07 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewNotInGrid.php @@ -8,8 +8,8 @@ namespace Magento\Review\Test\Constraint; use Magento\Review\Test\Fixture\Review; use Magento\Review\Test\Page\Adminhtml\ReviewIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductReviewNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewNotOnProductPage.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewNotOnProductPage.php index 8b792568aa224fcdf367d5b364fefe210cc072fe..4146c9519cc3110c23351d8614f48969c267f72d 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewNotOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewNotOnProductPage.php @@ -9,8 +9,8 @@ namespace Magento\Review\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Review\Test\Fixture\Review; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductReviewNotOnProductPage @@ -27,13 +27,13 @@ class AssertProductReviewNotOnProductPage extends AbstractConstraint * * @param CatalogProductView $catalogProductView * @param Review $reviewInitial - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ public function processAssert( CatalogProductView $catalogProductView, Review $reviewInitial, - Browser $browser + BrowserInterface $browser ) { /** @var CatalogProductSimple $product */ $product = $reviewInitial->getDataFieldConfig('entity_id')['source']->getEntity(); diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewOnProductPage.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewOnProductPage.php index eb50b1a4340d9b2fddddbbbfeb8e795ef8df4e9a..2e15e5145665945743a65965cc6ab1604c2e1366 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewOnProductPage.php @@ -9,9 +9,9 @@ namespace Magento\Review\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\AdminCache; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Review\Test\Fixture\Review; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Assert that product review available on product page. @@ -28,7 +28,7 @@ class AssertProductReviewOnProductPage extends AbstractConstraint * @param CatalogProductView $catalogProductView * @param Review $review * @param FixtureInterface $product - * @param Browser $browser + * @param BrowserInterface $browser * @param AdminCache $cachePage * @return void */ @@ -36,7 +36,7 @@ class AssertProductReviewOnProductPage extends AbstractConstraint CatalogProductView $catalogProductView, Review $review, FixtureInterface $product, - Browser $browser, + BrowserInterface $browser, AdminCache $cachePage ) { $errors = []; diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertReviewCreationSuccessMessage.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertReviewCreationSuccessMessage.php index d421c2af7afc4ccc21c77ba645c27fa7a316f0f6..7ecf84f3dc1db0c990afa117ba4322e2d89bfcdc 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertReviewCreationSuccessMessage.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertReviewCreationSuccessMessage.php @@ -7,7 +7,7 @@ namespace Magento\Review\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertReviewCreationSuccessMessage diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertReviewLinksIsPresentOnProductPage.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertReviewLinksIsPresentOnProductPage.php index 6feba8a2740e03438da51ee5440957ffb0d25ac7..e2aa568ff99d1d2a5ecaabc7e64a90b63f3aaf6c 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertReviewLinksIsPresentOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertReviewLinksIsPresentOnProductPage.php @@ -6,10 +6,10 @@ namespace Magento\Review\Test\Constraint; -use Mtf\Client\Browser; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\Browser; +use Magento\Mtf\Fixture\InjectableFixture; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Assert that add and view review links are present on product page. diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertReviewSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertReviewSuccessSaveMessage.php index 947790e85ec4acf49dabc057de92ed6e96c2abfb..3c41e413e459332718a0263ab731cba35fee74c9 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertReviewSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertReviewSuccessSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\Review\Test\Constraint; use Magento\Review\Test\Page\Adminhtml\ReviewIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertReviewSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertSetApprovedProductReview.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertSetApprovedProductReview.php index e30f73582091ec5ba013ad6746928f07c3ec391d..1e627941bd767bda72fe440332592e03926229a6 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertSetApprovedProductReview.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertSetApprovedProductReview.php @@ -6,7 +6,7 @@ namespace Magento\Review\Test\Constraint; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; use Magento\Review\Test\Fixture\Review; use Magento\Review\Test\Page\Adminhtml\ReviewIndex; use Magento\Backend\Test\Page\Adminhtml\AdminCache; diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Rating.php b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Rating.php index efa7bb2458aa9381ba4162857670df280ef3d51c..6991179a3702efb7601b585d50fd6d1f37cf3cb4 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Rating.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Rating.php @@ -6,7 +6,7 @@ namespace Magento\Review\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class Rating diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review.php b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review.php index 84226b39f9d626120399f9cccacbb539122d5d77..9c7c3175936d78b38d85b8edd6c865b793ede566 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review.php @@ -6,7 +6,7 @@ namespace Magento\Review\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Product review fixture. diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review/EntityId.php b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review/EntityId.php index 9cc4e25754dbbf0b7ae6f790adc8608806042d07..6dd94f98ea9058931abac6c1bf9168e3219a5dfb 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review/EntityId.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review/EntityId.php @@ -6,9 +6,9 @@ namespace Magento\Review\Test\Fixture\Review; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class EntityId diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review/Ratings.php b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review/Ratings.php index 473bcb90ad32b07f262d9579f0a1509973dfde63..c19487164c89538afe84d304cf024eada95ae6f4 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review/Ratings.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review/Ratings.php @@ -6,8 +6,8 @@ namespace Magento\Review\Test\Fixture\Review; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; use Magento\Review\Test\Fixture\Rating; /** diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Rating/Curl.php b/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Rating/Curl.php index d5f15eee9ff2e54ad431f3cb0073f05533d99e3c..8d81761803ba374e0a12c526ee75df22c7610792 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Rating/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Rating/Curl.php @@ -7,12 +7,12 @@ namespace Magento\Review\Test\Handler\Rating; use Magento\Backend\Test\Handler\Extractor; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Rating/RatingInterface.php b/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Rating/RatingInterface.php index 68b0397aaebfe7f280b244d9403b2ba297ffbb75..b39248c7a5c4a9968bc9bbb05143a140cd475427 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Rating/RatingInterface.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Rating/RatingInterface.php @@ -6,7 +6,7 @@ namespace Magento\Review\Test\Handler\Rating; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface RatingInterface diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Review/Curl.php b/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Review/Curl.php index 398258443501d7831cf7c1c75478079a0dc9f139..c99cac15199ddd5da9a745797ff37e8fb7f6d7fa 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Review/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Review/Curl.php @@ -6,15 +6,15 @@ namespace Magento\Review\Test\Handler\Review; -use Mtf\System\Config; -use Mtf\Fixture\FixtureInterface; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\System\Config; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Review\Test\Fixture\Rating; use Magento\Backend\Test\Handler\Extractor; use Magento\Review\Test\Fixture\Review; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; -use Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Handler\Curl as AbstractCurl; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Review/ReviewInterface.php b/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Review/ReviewInterface.php index 7b5d19a59901536451d194552f42713554ee77d4..e8fadacfe34392e0e24589ae4646c4430819e010 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Review/ReviewInterface.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Review/ReviewInterface.php @@ -6,7 +6,7 @@ namespace Magento\Review\Test\Handler\Review; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface ReviewInterface diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Repository/Rating.php b/dev/tests/functional/tests/app/Magento/Review/Test/Repository/Rating.php index e3422aa73d4c528741e01e8604a46f7063dd0d9b..218bf96d0fb5a3f1fa28eba3096ab89fa9115600 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Repository/Rating.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Repository/Rating.php @@ -6,7 +6,7 @@ namespace Magento\Review\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class Rating diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Repository/Review.php b/dev/tests/functional/tests/app/Magento/Review/Test/Repository/Review.php index bd4fc2a8bbd6610c69a34479baec0816f9f6c73e..537245718b6494350a66442f09d19dd2fa8e8d61 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Repository/Review.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Repository/Review.php @@ -6,7 +6,7 @@ namespace Magento\Review\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class Review diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductRatingEntityTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductRatingEntityTest.php index d3e7a3cefcad9bf3e8a259fa7a79a0b4eb4629f4..aff4c995ddb807f1fa395feb7ad0feea5c6ffe59 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductRatingEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductRatingEntityTest.php @@ -10,8 +10,8 @@ use Magento\Review\Test\Fixture\Rating; use Magento\Review\Test\Page\Adminhtml\RatingEdit; use Magento\Review\Test\Page\Adminhtml\RatingIndex; use Magento\Review\Test\Page\Adminhtml\RatingNew; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Create Backend Product Rating diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewBackendEntityTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewBackendEntityTest.php index 81c648ac66cd558b327c8cbd60e875116c8f7012..d2042d8a8370e0c044c87d0a688e3e16e8a70ef2 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewBackendEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewBackendEntityTest.php @@ -12,7 +12,7 @@ use Magento\Review\Test\Page\Adminhtml\RatingEdit; use Magento\Review\Test\Page\Adminhtml\RatingIndex; use Magento\Review\Test\Page\Adminhtml\ReviewEdit; use Magento\Review\Test\Page\Adminhtml\ReviewIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Create ProductReviewEntity Backend diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewFrontendEntityTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewFrontendEntityTest.php index 663824c91133b381ff707a2bbf49788b77f1834e..4345551308dc988c5c2e5258fd701978707ec504 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewFrontendEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewFrontendEntityTest.php @@ -11,8 +11,8 @@ use Magento\Review\Test\Constraint\AssertProductReviewIsAbsentOnProductPage; use Magento\Review\Test\Fixture\Review; use Magento\Review\Test\Page\Adminhtml\RatingEdit; use Magento\Review\Test\Page\Adminhtml\RatingIndex; -use Mtf\Client\Browser; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\TestCase\Injectable; /** * Test Flow: @@ -90,13 +90,13 @@ class CreateProductReviewFrontendEntityTest extends Injectable * Run create frontend product rating test. * * @param Review $review - * @param Browser $browser + * @param BrowserInterface $browser * @param AssertProductReviewIsAbsentOnProductPage $assertProductReviewIsAbsentOnProductPage * @return array */ public function test( Review $review, - Browser $browser, + BrowserInterface $browser, AssertProductReviewIsAbsentOnProductPage $assertProductReviewIsAbsentOnProductPage ) { // Prepare for tear down diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/DeleteProductRatingEntityTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/DeleteProductRatingEntityTest.php index 9a7495de2912b8fea60f4bb35bdc62e3781fb441..129b383ffe285a0684b215c2718e5acb9ed73a73 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/DeleteProductRatingEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/DeleteProductRatingEntityTest.php @@ -8,8 +8,8 @@ namespace Magento\Review\Test\TestCase; use Magento\Review\Test\Fixture\Rating; use Magento\Review\Test\Page\Adminhtml\RatingEdit; use Magento\Review\Test\Page\Adminhtml\RatingIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for DeleteProductRatingEntity diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ManageProductReviewFromCustomerPageTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ManageProductReviewFromCustomerPageTest.php index d9cce2e96703e4d62fb8e645958217dafc5ccf09..52f5bbe692b4ef9739de9bb3b14bf5a16d1c38b6 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ManageProductReviewFromCustomerPageTest.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ManageProductReviewFromCustomerPageTest.php @@ -17,8 +17,8 @@ use Magento\Review\Test\Fixture\Review; use Magento\Review\Test\Page\Adminhtml\RatingEdit; use Magento\Review\Test\Page\Adminhtml\RatingIndex; use Magento\Review\Test\Page\Adminhtml\ReviewEdit; -use Mtf\Client\Browser; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for ManageProductReviewFromCustomerPage @@ -83,7 +83,7 @@ class ManageProductReviewFromCustomerPageTest extends Injectable /** * Browser * - * @var Browser + * @var BrowserInterface */ protected $browser; @@ -142,7 +142,7 @@ class ManageProductReviewFromCustomerPageTest extends Injectable * @param CmsIndex $cmsIndex * @param CustomerAccountLogin $customerAccountLogin * @param CatalogProductView $catalogProductView - * @param Browser $browser + * @param BrowserInterface $browser * @param RatingIndex $ratingIndex * @param RatingEdit $ratingEdit * @param ReviewEdit $reviewEdit @@ -154,7 +154,7 @@ class ManageProductReviewFromCustomerPageTest extends Injectable CmsIndex $cmsIndex, CustomerAccountLogin $customerAccountLogin, CatalogProductView $catalogProductView, - Browser $browser, + BrowserInterface $browser, RatingIndex $ratingIndex, RatingEdit $ratingEdit, ReviewEdit $reviewEdit diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/MassActionsProductReviewEntityTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/MassActionsProductReviewEntityTest.php index b0e43e961e4019166776089038186703cc487fcc..9152f68dcf0e278104d32181f9d5b79b6e9f02aa 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/MassActionsProductReviewEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/MassActionsProductReviewEntityTest.php @@ -10,7 +10,7 @@ use Magento\Review\Test\Fixture\Review; use Magento\Review\Test\Page\Adminhtml\RatingEdit; use Magento\Review\Test\Page\Adminhtml\RatingIndex; use Magento\Review\Test\Page\Adminhtml\ReviewIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test creation for MassActions ProductReviewEntity diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ModerateProductReviewEntityTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ModerateProductReviewEntityTest.php index 58a3a59ff25682ea1737a141707d4ac1966f14b0..a37ab005cfe5c5ecd591e2c74c713774ec018ba9 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ModerateProductReviewEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ModerateProductReviewEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Review\Test\TestCase; use Magento\Review\Test\Fixture\Review; use Magento\Review\Test\Page\Adminhtml\ReviewEdit; use Magento\Review\Test\Page\Adminhtml\ReviewIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Moderate ProductReview Entity diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php index f92480f74c746c695a4ca0f8f3da6464bea18b52..08f69793f6f88c23e9d367ac6ae26726af94dbf9 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php @@ -13,8 +13,8 @@ use Magento\Review\Test\Fixture\Review; use Magento\Review\Test\Page\Adminhtml\RatingEdit; use Magento\Review\Test\Page\Adminhtml\RatingIndex; use Magento\Review\Test\Page\Adminhtml\ReviewEdit; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for UpdateProductReviewEntity on product page diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityTest.php index a204a9db0165b85357e18a2eddaf83c5952febd9..9d422a2a49a6eba014f8017ff25b8be326e2a2e5 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityTest.php @@ -11,7 +11,7 @@ use Magento\Review\Test\Page\Adminhtml\RatingEdit; use Magento\Review\Test\Page\Adminhtml\RatingIndex; use Magento\Review\Test\Page\Adminhtml\ReviewEdit; use Magento\Review\Test\Page\Adminhtml\ReviewIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Update Frontend Product Review diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/AbstractForm.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/AbstractForm.php index fa48a0a91000fcfdaf58973c0c86a95fcb06a022..5e703ad9afd035e4e0a634469258df2037cde16d 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/AbstractForm.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/AbstractForm.php @@ -6,7 +6,7 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order; -use Mtf\Block\Form; +use Magento\Mtf\Block\Form; /** * Class Form @@ -81,7 +81,6 @@ abstract class AbstractForm extends Form return $element->isVisible() == false ? true : null; } ); - $this->reinitRootElement(); $this->_rootElement->find($this->send)->click(); } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/AbstractForm/Product.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/AbstractForm/Product.php index 9c0993bfbe16a7c0d8ec38040e593d09dd3c2053..901ee9bba2b69cab6e55cedc29f906e223908aef 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/AbstractForm/Product.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/AbstractForm/Product.php @@ -6,7 +6,8 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\AbstractForm; -use Mtf\Block\Form; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; /** * Class Product @@ -14,6 +15,91 @@ use Mtf\Block\Form; */ class Product extends Form { + /** + * Product price excluding tax search mask + * + * @var string + */ + protected $itemExclTax = '//td[@class="col-price"]/div[@class="price-excl-tax"]/span[@class="price"]'; + + /** + * Product price including tax search mask + * + * @var string + */ + protected $itemInclTax = '//td[@class="col-price"]/div[@class="price-incl-tax"]/span[@class="price"]'; + + /** + * Product price subtotal excluding tax search mask + * + * @var string + */ + protected $itemSubExclTax = '//td[@class="col-subtotal"]/div[@class="price-excl-tax"]/span[@class="price"]'; + + /** + * Product price subtotal including tax search mask + * + * @var string + */ + protected $itemSubInclTax = '//td[@class="col-subtotal"]/div[@class="price-incl-tax"]/span[@class="price"]'; + + /** + * Get Item price excluding tax + * + * @return string|null + */ + public function getItemPriceExclTax() + { + $price = $this->_rootElement->find($this->itemExclTax, Locator::SELECTOR_XPATH); + return $price->isVisible() ? $this->escapeCurrency($price->getText()) : null; + } + + /** + * Get Item price including tax + * + * @return string|null + */ + public function getItemPriceInclTax() + { + $price = $this->_rootElement->find($this->itemInclTax, Locator::SELECTOR_XPATH); + return $price->isVisible() ? $this->escapeCurrency($price->getText()) : null; + } + + /** + * Get Item price excluding tax + * + * @return string|null + */ + public function getItemSubExclTax() + { + $price = $this->_rootElement->find($this->itemSubExclTax, Locator::SELECTOR_XPATH); + return $price->isVisible() ? $this->escapeCurrency($price->getText()) : null; + } + + /** + * Get Item price excluding tax + * + * @return string|null + */ + + public function getItemSubInclTax() + { + $price = $this->_rootElement->find($this->itemSubInclTax, Locator::SELECTOR_XPATH); + return $price->isVisible() ? $this->escapeCurrency($price->getText()) : null; + } + + /** + * Method that escapes currency symbols + * + * @param string $price + * @return string|null + */ + protected function escapeCurrency($price) + { + preg_match("/^\\D*\\s*([\\d,\\.]+)\\s*\\D*$/", $price, $matches); + return (isset($matches[1])) ? $matches[1] : null; + } + /** * Fill item product data * diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/AbstractItems.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/AbstractItems.php index b0496115c9c2090386a35e58a3000b81f166d3c0..88af288c29ce656cc6a8e8a2c77672c4da77f72c 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/AbstractItems.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/AbstractItems.php @@ -6,7 +6,7 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Class AbstractItems @@ -77,7 +77,7 @@ class AbstractItems extends Block */ public function getData() { - $items = $this->_rootElement->find($this->rowItem)->getElements(); + $items = $this->_rootElement->getElements($this->rowItem); $data = []; foreach ($items as $item) { diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/AbstractItemsNewBlock.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/AbstractItemsNewBlock.php index dfa7aecce9a7faf4b5adc9520f7301afa89e158b..907992a7e2c54f7793f272aff8962caca90e6dda 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/AbstractItemsNewBlock.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/AbstractItemsNewBlock.php @@ -7,8 +7,8 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order; use Magento\Sales\Test\Block\Adminhtml\Order\AbstractForm\Product; -use Mtf\Block\Block; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AbstractItemsNewBlock diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Actions.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Actions.php index aa6a4c1740da31bb9ef66f0851a43c3e40c3e3c9..4d5bf937f8f114d8b7aecfc572af2e91f6ddaff6 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Actions.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Actions.php @@ -6,8 +6,8 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Actions @@ -171,7 +171,7 @@ class Actions extends Block public function cancel() { $this->_rootElement->find($this->cancel)->click(); - $this->_rootElement->acceptAlert(); + $this->browser->acceptAlert(); } /** diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php index 12ea727d10d320360fa1b05a763c46fbf94248c6..cfeedc7b3262168584cd68cd24870b1310a5a7f5 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php @@ -6,10 +6,10 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; -use Mtf\Factory\Factory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Create diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Billing/Address.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Billing/Address.php index a5084d3347c292b4e7f5bd6e322fa7616b6ffa8b..2b5688f592c83bb40a8e3e4f6e67e41d48ebc24d 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Billing/Address.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Billing/Address.php @@ -6,7 +6,7 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\Create\Billing; -use Mtf\Block\Form; +use Magento\Mtf\Block\Form; /** * Class BillingAddress @@ -29,7 +29,6 @@ class Address extends Form */ public function getExistingAddresses() { - $this->reinitRootElement(); return explode("\n", $this->_rootElement->find($this->existingAddressSelector)->getText()); } } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Billing/Method.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Billing/Method.php index da0f65be72ee3d04ea835f4d56157f11ce0a03a4..6397d53754a38dd58e0913853b4b65b09c23e9c4 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Billing/Method.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Billing/Method.php @@ -6,7 +6,7 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\Create\Billing; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Class Method diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Customer.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Customer.php index f077e90672c2ee13dde8b537f1fa683085625354..ba5f99b4e704c5277511aac30c9e56b6b7b11c38 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Customer.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Customer.php @@ -8,7 +8,7 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\Create; use Magento\Backend\Test\Block\Widget\Grid; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Customer diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities.php index 007f33ad32cef3b817f1f9cb5c2aa86913bad1eb..d475f5d0e9799413ae9e59c74d4910fd46ebab17 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities.php @@ -12,8 +12,8 @@ use Magento\Sales\Test\Block\Adminhtml\Order\Create\CustomerActivities\Sidebar\R use Magento\Sales\Test\Block\Adminhtml\Order\Create\CustomerActivities\Sidebar\RecentlyViewedItems; use Magento\Sales\Test\Block\Adminhtml\Order\Create\CustomerActivities\Sidebar\RecentlyViewedProducts; use Magento\Sales\Test\Block\Adminhtml\Order\Create\CustomerActivities\Sidebar\ShoppingCartItems; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class CustomerActivities diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities/Sidebar.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities/Sidebar.php index 27af3bd6ee3670b9e879911bcb35008d4f652841..f9c089f1a25d99465df54d38fdc02023c7916d3f 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities/Sidebar.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities/Sidebar.php @@ -6,8 +6,8 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\Create\CustomerActivities; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Sidebar block. diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities/Sidebar/RecentlyViewedProducts.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities/Sidebar/RecentlyViewedProducts.php index bd51355a2acddbbb2a55b4b74eb35aee211caf7a..81c03a862259e8230eba8af8e16331bfebb2eac0 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities/Sidebar/RecentlyViewedProducts.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities/Sidebar/RecentlyViewedProducts.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\Create\CustomerActivities\Sidebar; use Magento\Sales\Test\Block\Adminhtml\Order\Create\CustomerActivities\Sidebar; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class RecentlyViewedProducts @@ -30,8 +30,7 @@ class RecentlyViewedProducts extends Sidebar public function getProducts() { $products = []; - $productNames = $this->_rootElement->find($this->recentlyViewedProducts, Locator::SELECTOR_XPATH) - ->getElements(); + $productNames = $this->_rootElement->getElements($this->recentlyViewedProducts, Locator::SELECTOR_XPATH); foreach ($productNames as $productName) { $products[] = $productName->getText(); } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Items.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Items.php index abe41f6b5499d6d3d04d37de06f19593455998f9..7d2aec9dd17a3a28781cb7bdaeedffc277252f1b 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Items.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Items.php @@ -7,8 +7,8 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\Create; use Magento\Backend\Test\Block\Template; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Items @@ -86,7 +86,7 @@ class Items extends Block { $this->getTemplateBlock()->waitLoader(); $this->_rootElement->click(); - $products = $this->_rootElement->find($this->productNames, Locator::SELECTOR_XPATH)->getElements(); + $products = $this->_rootElement->getElements($this->productNames, Locator::SELECTOR_XPATH); $pageData = []; foreach ($products as $product) { $pageData[] = $this->getItemProductByName($product->getText())->getCheckoutData($fields); diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Items/ItemProduct.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Items/ItemProduct.php index ad197576e6bf263180b5b59c6bb3e18ecdbda8d2..03ec6f8187c16a1a697a93f64e6a8d861a0130fe 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Items/ItemProduct.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Items/ItemProduct.php @@ -6,8 +6,8 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\Create\Items; -use Mtf\Block\Form; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; /** * Class ItemProduct diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Shipping/Address.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Shipping/Address.php index a7bef1c77da3fc36c6384760c613c662691524d3..73e951594ff3368af589ee6be154d0b5e91a87dc 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Shipping/Address.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Shipping/Address.php @@ -7,8 +7,8 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\Create\Shipping; -use Mtf\Block\Form; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; /** * Class ShippingAddress diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Shipping/Method.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Shipping/Method.php index a2bdd1e649c848564bbbb929dad1cf4c74a9558b..4f9877eeca53a150ebaac49adbfb908f9366ac64 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Shipping/Method.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Shipping/Method.php @@ -6,8 +6,8 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\Create\Shipping; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Method diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Store.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Store.php index e2adf9500ecda3443efeb0d67dc8c0754a52524e..f48f0cbd9e3674a7a5c3485082bc7b4d60a9c86a 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Store.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Store.php @@ -8,9 +8,9 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\Create; use Magento\Store\Test\Fixture\Store as StoreFixture; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; -use Mtf\Factory\Factory; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Factory\Factory; /** * Class Store diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Totals.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Totals.php index fe25005b4c4e94504c0ecefa5382a13b7e403563..39adad4c9f1f3ca2393ffba15fedbf1ec8c65abd 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Totals.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Totals.php @@ -6,7 +6,7 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\Create; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Class Totals diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Grid.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Grid.php index 5f5ad0669dc4dd6e82f14936fb30bd569db060d6..09919efbd1dba62122652d3e52e1317cd4005028 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Grid.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order; use Magento\Backend\Test\Block\Widget\Grid as GridInterface; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class Grid @@ -43,6 +43,13 @@ class Grid extends GridInterface */ protected $editLink = 'td[class*=col-action] a'; + /** + * First row selector + * + * @var string + */ + protected $firstRowSelector = '//tbody/tr[1]//a'; + /** * {@inheritdoc} */ diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/History.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/History.php index fbc98583eed061430693a8552560a6a6a43f2053..17d1dd67238c0b4f00531ed5c604ab8ab416c393 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/History.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/History.php @@ -6,8 +6,8 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Totals diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Invoice/Form.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Invoice/Form.php index 83f8ab5d76e9cb4ae98a7757c35e69051fa7c99b..d6578371062e9a8112127a854007724d6e7e818a 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Invoice/Form.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Invoice/Form.php @@ -27,7 +27,7 @@ class Form extends AbstractForm * * @return Items */ - protected function getItemsBlock() + public function getItemsBlock() { return $this->blockFactory->create( 'Magento\Sales\Test\Block\Adminhtml\Order\Invoice\Form\Items', diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Invoice/Form/Items.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Invoice/Form/Items.php index 73114c21845f1807e7cf1b63c91329289fab0484..ed9f86ca74fa6a144a352f9f9e16efc69c0bd308 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Invoice/Form/Items.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Invoice/Form/Items.php @@ -8,8 +8,8 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\Invoice\Form; use Magento\Sales\Test\Block\Adminhtml\Order\AbstractItemsNewBlock; use Magento\Sales\Test\Block\Adminhtml\Order\Invoice\Form\Items\Product; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Items diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Invoice/Grid.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Invoice/Grid.php index 218fa8ee64181e9f3482ce5b43acec21d9a0edbf..8b43fc9c27ba44de78336999a4abb55aa4278999 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Invoice/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Invoice/Grid.php @@ -60,7 +60,7 @@ class Grid extends GridInterface } /** - * @return mixed|\Mtf\Client\Element + * @return mixed|\Magento\Mtf\Client\Element */ private function getInvoiceAmountElement() { diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Invoice/Totals.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Invoice/Totals.php index bd93e1b5bec55284236db2b6445e9691ef6e34ce..0d6ea9e35f77a10539f27bb3bf58a91d52ba324d 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Invoice/Totals.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Invoice/Totals.php @@ -6,14 +6,14 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\Invoice; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Totals * Invoice totals block */ -class Totals extends Block +class Totals extends \Magento\Sales\Test\Block\Adminhtml\Order\Totals { /** * Submit invoice button selector @@ -45,7 +45,6 @@ class Totals extends Block return $element->isVisible() == false ? true : null; } ); - $this->reinitRootElement(); $this->_rootElement->find($this->submit)->click(); } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Shipment/Totals.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Shipment/Totals.php index 802c0fd06e65f0e7829ae05243d4c5d2597f741c..b2ae1df8954b5f54206fa90e6af28af8a528f4ee 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Shipment/Totals.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Shipment/Totals.php @@ -6,7 +6,7 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\Shipment; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Class Totals diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Shipment/View/Items.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Shipment/View/Items.php index d94630f31ed88ef8d8915fcdf6c516203eeaca12..55d5b3794342c6a12e21bb7a722a128e6ffab7a9 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Shipment/View/Items.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Shipment/View/Items.php @@ -21,7 +21,7 @@ class Items extends AbstractItems */ public function getData() { - $items = $this->_rootElement->find($this->rowItem)->getElements(); + $items = $this->_rootElement->getElements($this->rowItem); $data = []; foreach ($items as $item) { diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Status/Assign/AssignForm.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Status/Assign/AssignForm.php index abd4fe06e23edc960d5be7448dc157593642ab7a..aa776f8bb3051d2ad292dfe3566cea8d035ed050 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Status/Assign/AssignForm.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Status/Assign/AssignForm.php @@ -6,7 +6,7 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\Status\Assign; -use Mtf\Block\Form; +use Magento\Mtf\Block\Form; /** * Class AssignForm diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Totals.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Totals.php index 7359618a265c04c95d55525840f209b9f7a6057a..9cec6a2dcc33a7a1e87cd0177895b154f47b6b81 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Totals.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Totals.php @@ -6,27 +6,88 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** - * Class Totals - * Order totals block - * + * Invoice totals block */ class Totals extends Block { /** - * Grand total search mask + * Grand total search mask. * * @var string */ protected $grandTotal = '//tr[normalize-space(td)="Grand Total"]//span'; /** - * Get Grand Total Text + * Grand total excluding tax search mask. * - * @return array|string + * @var string + */ + protected $grandTotalExclTax = '//tr[normalize-space(td)="Grand Total (Excl.Tax)"]//span'; + + /** + * Grand total including tax search mask. + * + * @var string + */ + protected $grandTotalInclTax = '//tr[normalize-space(td)="Grand Total (Incl.Tax)"]//span'; + + /** + * Subtotal search mask. + * + * @var string + */ + protected $subtotal = '//tr[normalize-space(td)="Subtotal"]//span'; + + /** + * Subtotal excluding tax search mask. + * + * @var string + */ + protected $subtotalExclTax = '//tr[normalize-space(td)="Subtotal (Excl.Tax)"]//span'; + + /** + * Subtotal including tax search mask. + * + * @var string + */ + protected $subtotalInclTax = '//tr[normalize-space(td)="Subtotal (Incl.Tax)"]//span'; + + /** + * Tax search mask. + * + * @var string + */ + protected $tax = '//tr[normalize-space(td)="Tax"]//span'; + + /** + * Discount search mask. + * + * @var string + */ + protected $discount = '//tr[normalize-space(td)="Discount"]//span'; + + /** + * Shipping excluding tax search mask. + * + * @var string + */ + protected $shippingExclTax = '//tr[contains (.,"Shipping") and contains (.,"(Excl.Tax)")]//span'; + + /** + * Shipping including tax search mask. + * + * @var string + */ + protected $shippingInclTax = '//tr[contains (.,"Shipping") and contains (.,"(Incl.Tax)")]//span'; + + /** + * Get Grand Total Text. + * + * @return string */ public function getGrandTotal() { @@ -35,7 +96,106 @@ class Totals extends Block } /** - * Method that escapes currency symbols + * Get Grand Total Excluding Tax Text. + * + * @return string + */ + public function getGrandTotalExclTax() + { + $grandTotal = $this->_rootElement->find($this->grandTotalExclTax, Locator::SELECTOR_XPATH)->getText(); + return $this->escapeCurrency($grandTotal); + } + + /** + * Get Grand Total Including Tax Text. + * + * @return string + */ + public function getGrandTotalInclTax() + { + $grandTotal = $this->_rootElement->find($this->grandTotalInclTax, Locator::SELECTOR_XPATH)->getText(); + return $this->escapeCurrency($grandTotal); + } + + /** + * Get Tax text from Order Totals. + * + * @return string + */ + public function getTax() + { + $tax = $this->_rootElement->find($this->tax, Locator::SELECTOR_XPATH)->getText(); + return $this->escapeCurrency($tax); + } + + /** + * Get Tax text from Order Totals. + * + * @return string|null + */ + public function getDiscount() + { + $discount = $this->_rootElement->find($this->discount, Locator::SELECTOR_XPATH); + return $discount->isVisible() ? $this->escapeCurrency($discount->getText()) : null; + } + + /** + * Get Subtotal text. + * + * @return string + */ + public function getSubtotal() + { + $subTotal = $this->_rootElement->find($this->subtotal, Locator::SELECTOR_XPATH)->getText(); + return $this->escapeCurrency($subTotal); + } + + /** + * Get Subtotal text. + * + * @return string + */ + public function getSubtotalExclTax() + { + $subTotal = $this->_rootElement->find($this->subtotalExclTax, Locator::SELECTOR_XPATH)->getText(); + return $this->escapeCurrency($subTotal); + } + + /** + * Get Subtotal text. + * + * @return string + */ + public function getSubtotalInclTax() + { + $subTotal = $this->_rootElement->find($this->subtotalInclTax, Locator::SELECTOR_XPATH)->getText(); + return $this->escapeCurrency($subTotal); + } + + /** + * Get Shipping Excluding tax price text. + * + * @return string|null + */ + public function getShippingInclTax() + { + $subTotal = $this->_rootElement->find($this->shippingInclTax, Locator::SELECTOR_XPATH); + return $subTotal->isVisible() ? $this->escapeCurrency($subTotal->getText()) : null; + } + + /** + * Get Shipping Including tax price text. + * + * @return string|null + */ + public function getShippingExclTax() + { + $subTotal = $this->_rootElement->find($this->shippingExclTax, Locator::SELECTOR_XPATH); + return $subTotal->isVisible() ? $this->escapeCurrency($subTotal->getText()) : null; + } + + /** + * Method that escapes currency symbols. * * @param string $price * @return string|null diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Info.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Info.php index dd2f976734d011f0601a3a8a64feacccaf9dde67..cf49d099f2ade9778ab8f5f78cff88e6e837e876 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Info.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Info.php @@ -6,8 +6,8 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\View; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Block for information about customer on order page diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Items.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Items.php index 2ff583eeb4d8268244019eb716e75ee567481f7b..00da4a3db47cf4426ef78e5a3b35f68cec8e9b65 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Items.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Items.php @@ -8,8 +8,8 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\View; use Magento\Catalog\Test\Fixture\Product; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProduct; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Items @@ -24,6 +24,36 @@ class Items extends Block */ protected $priceSelector = '//div[@class="price-excl-tax"]//span[@class="price"]'; + // @codingStandardsIgnoreStart + /** + * Product price excluding tax search mask + * + * @var string + */ + protected $itemExclTax = '//tr[contains (.,"%s")]/td[@class="col-price"]/div[@class="price-excl-tax"]/span[@class="price"]'; + + /** + * Product price including tax search mask + * + * @var string + */ + protected $itemInclTax = '//tr[contains (.,"%s")]/td[@class="col-price"]/div[@class="price-incl-tax"]/span[@class="price"]'; + + /** + * Product price subtotal excluding tax search mask + * + * @var string + */ + protected $itemSubExclTax = '//tr[contains (.,"%s")]/td[@class="col-subtotal"]/div[@class="price-excl-tax"]/span[@class="price"]'; + + /** + * Product price subtotal including tax search mask + * + * @var string + */ + protected $itemSubInclTax = '//tr[contains (.,"%s")]/td[@class="col-subtotal"]/div[@class="price-incl-tax"]/span[@class="price"]'; + // @codingStandardsIgnoreEnd + /** * Returns the item price for the specified product. * @@ -53,4 +83,68 @@ class Items extends Block return $this->_rootElement->find($selector, Locator::SELECTOR_XPATH)->getText(); } + + /** + * Get Item price excluding tax + * + * @param string $productName + * @return string|null + */ + public function getItemPriceExclTax($productName) + { + $locator = sprintf($this->itemExclTax, $productName); + $price = $this->_rootElement->find($locator, Locator::SELECTOR_XPATH); + return $price->isVisible() ? $this->escapeCurrency($price->getText()) : null; + } + + /** + * Get Item price including tax + * + * @param string $productName + * @return string|null + */ + public function getItemPriceInclTax($productName) + { + $locator = sprintf($this->itemInclTax, $productName); + $price = $this->_rootElement->find($locator, Locator::SELECTOR_XPATH); + return $price->isVisible() ? $this->escapeCurrency($price->getText()) : null; + } + + /** + * Get Item price excluding tax + * + * @param string $productName + * @return string|null + */ + public function getItemSubExclTax($productName) + { + $locator = sprintf($this->itemSubExclTax, $productName); + $price = $this->_rootElement->find($locator, Locator::SELECTOR_XPATH); + return $price->isVisible() ? $this->escapeCurrency($price->getText()) : null; + } + + /** + * Get Item price excluding tax + * + * @param string $productName + * @return string|null + */ + public function getItemSubInclTax($productName) + { + $locator = sprintf($this->itemSubInclTax, $productName); + $price = $this->_rootElement->find($locator, Locator::SELECTOR_XPATH); + return $price->isVisible() ? $this->escapeCurrency($price->getText()) : null; + } + + /** + * Method that escapes currency symbols + * + * @param string $price + * @return string|null + */ + protected function escapeCurrency($price) + { + preg_match("/^\\D*\\s*([\\d,\\.]+)\\s*\\D*$/", $price, $matches); + return (isset($matches[1])) ? $matches[1] : null; + } } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Tab/CreditMemos/Grid.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Tab/CreditMemos/Grid.php index ffe386848bd6fe0aedba5dc2cfb1d5026a9fca09..741eeaabdab3c3ffba0af6ea372d3900d462e81b 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Tab/CreditMemos/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Tab/CreditMemos/Grid.php @@ -58,7 +58,7 @@ class Grid extends \Magento\Backend\Test\Block\Widget\Grid public function getIds() { $result = []; - $creditMemoIds = $this->_rootElement->find($this->editLink)->getElements(); + $creditMemoIds = $this->_rootElement->getElements($this->editLink); foreach ($creditMemoIds as $creditMemoId) { $result[] = trim($creditMemoId->getText()); } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Tab/Info.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Tab/Info.php index bbd19f9474c45116d71e5c9ddd0488983db9ddd6..aac809e587dc15dec3869fd4730c4313dedb74b0 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Tab/Info.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Tab/Info.php @@ -6,8 +6,8 @@ namespace Magento\Sales\Test\Block\Adminhtml\Order\View\Tab; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Info diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Tab/Invoices/Grid.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Tab/Invoices/Grid.php index e329aa3cef34f86c5546fadd7dbb6ffac8a45422..4e22f9ce2dfb8e53f486ee7df7e32627dc37745b 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Tab/Invoices/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Tab/Invoices/Grid.php @@ -55,7 +55,7 @@ class Grid extends \Magento\Backend\Test\Block\Widget\Grid public function getIds() { $result = []; - $invoiceIds = $this->_rootElement->find($this->invoiceId)->getElements(); + $invoiceIds = $this->_rootElement->getElements($this->invoiceId); foreach ($invoiceIds as $invoiceId) { $result[] = trim($invoiceId->getText()); } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Tab/Shipments/Grid.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Tab/Shipments/Grid.php index 20a5d98d797c341140ed59645b958c15af34c871..5fa33144c2fd055f995be9495100629b6e226f4b 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Tab/Shipments/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Tab/Shipments/Grid.php @@ -51,7 +51,7 @@ class Grid extends \Magento\Backend\Test\Block\Widget\Grid public function getIds() { $result = []; - $shipmentIds = $this->_rootElement->find($this->shipmentId)->getElements(); + $shipmentIds = $this->_rootElement->getElements($this->shipmentId); foreach ($shipmentIds as $shipmentId) { $result[] = trim($shipmentId->getText()); } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/History.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/History.php index 040609465d2e6804ee9636f1a39e2e0e9e320025..b93056743ecc3f1b1ab802b55b748400e98deeff 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/History.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/History.php @@ -6,9 +6,9 @@ namespace Magento\Sales\Test\Block\Order; -use Mtf\Block\Block; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class History @@ -73,7 +73,7 @@ class History extends Block * Get item order block * * @param string $id - * @return Element + * @return SimpleElement */ protected function searchOrderById($id) { diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/Info.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/Info.php index 09736394f69de97f2cbfb238b5808b3688f8dd36..9b7fc95983636154ea053e249872e8662a001fcb 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/Info.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/Info.php @@ -6,8 +6,8 @@ namespace Magento\Sales\Test\Block\Order; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Info block on order's view page. diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/Items.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/Items.php index 25b0e963b1d3df4fc04380731afe18b9de35047c..d044f994ac56efe9453b22eec126a87067ef4bca 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/Items.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/Items.php @@ -6,8 +6,8 @@ namespace Magento\Sales\Test\Block\Order; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Items block on order's view page @@ -31,7 +31,7 @@ class Items extends Block /** * Check if item is visible in print order page. * - * @param \Mtf\Fixture\InjectableFixture $product + * @param \Magento\Mtf\Fixture\InjectableFixture $product * @return bool */ public function isItemVisible($product) diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/View.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/View.php index 9829f417cff81ce12f09f21d52c79e23cc65eebe..c8cb4a49db99ea30bfb4df35c1188ab72cef5c2f 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/View.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/View.php @@ -6,12 +6,14 @@ namespace Magento\Sales\Test\Block\Order; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class View * View block on order's view page + * + * @SuppressWarnings(PHPMD.TooManyFields) */ class View extends Block { @@ -36,6 +38,99 @@ class View extends Block */ protected $link = '//*[contains(@class,"order-links")]//a[normalize-space(.)="%s"]'; + /** + * Grand total search mask + * + * @var string + */ + protected $grandTotal = '.grand_total span'; + + /** + * Grand total including tax search mask + * + * @var string + */ + protected $grandTotalInclTax = '.grand_total_incl span'; + + /** + * Subtotal search mask + * + * @var string + */ + protected $subtotal = '.subtotal .amount span'; + + /** + * Subtotal excluding tax search mask + * + * @var string + */ + protected $subtotalExclTax = '.subtotal_excl span'; + + /** + * Subtotal including tax search mask + * + * @var string + */ + protected $subtotalInclTax = '.subtotal_incl span'; + + /** + * Tax search mask + * + * @var string + */ + protected $tax = '.totals-tax span'; + + /** + * Discount search mask + * + * @var string + */ + protected $discount = '.discount span'; + + /** + * Shipping search mask + * + * @var string + */ + protected $shippingExclTax = '.shipping span'; + + /** + * Shipping search mask + * + * @var string + */ + protected $shippingInclTax = '.shipping_incl span'; + + /** + * Product price excluding tax search mask + * + * @var string + */ + protected $itemExclTax = '//tr[contains (.,"%s")]/td[@class="col price"]/span[@class="price-excluding-tax"]/span'; + + /** + * Product price including tax search mask + * + * @var string + */ + protected $itemInclTax = '//tr[contains (.,"%s")]/td[@class="col price"]/span[@class="price-including-tax"]/span'; + + // @codingStandardsIgnoreStart + /** + * Product price subtotal excluding tax search mask + * + * @var string + */ + protected $itemSubExclTax = '//tr[contains (.,"%s")]/td[@class="col subtotal"]/span[@class="price-excluding-tax"]/span'; + + /** + * Product price subtotal including tax search mask + * + * @var string + */ + protected $itemSubInclTax = '//tr[contains (.,"%s")]/td[@class="col subtotal"]/span[@class="price-including-tax"]/span'; + // @codingStandardsIgnoreEnd + /** * Get item block * @@ -61,4 +156,167 @@ class View extends Block { $this->_rootElement->find(sprintf($this->link, $name), Locator::SELECTOR_XPATH)->click(); } + + /** + * Get Grand Total Text + * + * @return string + */ + public function getGrandTotal() + { + $grandTotal = $this->_rootElement->find($this->grandTotal, Locator::SELECTOR_CSS)->getText(); + return $this->escapeCurrency($grandTotal); + } + + /** + * Get Item price excluding tax + * + * @param string $productName + * @return string|null + */ + public function getItemPriceExclTax($productName) + { + $locator = sprintf($this->itemExclTax, $productName); + $price = $this->_rootElement->find($locator, Locator::SELECTOR_XPATH); + return $price->isVisible() ? $this->escapeCurrency($price->getText()) : null; + } + + /** + * Get Item price excluding tax + * + * @param string $productName + * @return string|null + */ + public function getItemPriceInclTax($productName) + { + $locator = sprintf($this->itemInclTax, $productName); + $price = $this->_rootElement->find($locator, Locator::SELECTOR_XPATH); + return $price->isVisible() ? $this->escapeCurrency($price->getText()) : null; + } + + /** + * Get Item price excluding tax + * + * @param string $productName + * @return string|null + */ + public function getItemSubExclTax($productName) + { + $locator = sprintf($this->itemSubExclTax, $productName); + $price = $this->_rootElement->find($locator, Locator::SELECTOR_XPATH); + return $price->isVisible() ? $this->escapeCurrency($price->getText()) : null; + } + + /** + * Get Item price excluding tax + * + * @param string $productName + * @return string|null + */ + public function getItemSubInclTax($productName) + { + $locator = sprintf($this->itemSubInclTax, $productName); + $price = $this->_rootElement->find($locator, Locator::SELECTOR_XPATH); + return $price->isVisible() ? $this->escapeCurrency($price->getText()) : null; + } + + /** + * Get Grand Total Text + * + * @return string|null + */ + public function getGrandTotalInclTax() + { + $grandTotal = $this->_rootElement->find($this->grandTotalInclTax, Locator::SELECTOR_CSS)->getText(); + return $this->escapeCurrency($grandTotal); + } + + /** + * Get Tax text from Order Totals + * + * @return string + */ + public function getTax() + { + $tax = $this->_rootElement->find($this->tax, Locator::SELECTOR_CSS)->getText(); + return $this->escapeCurrency($tax); + } + + /** + * Get Tax text from Order Totals + * + * @return string|null + */ + public function getDiscount() + { + $discount = $this->_rootElement->find($this->discount, Locator::SELECTOR_CSS); + return $discount->isVisible() ? $this->escapeCurrency($discount->getText()) : null; + } + + /** + * Get Subtotal text + * + * @return string + */ + public function getSubtotal() + { + $subTotal = $this->_rootElement->find($this->subtotal, Locator::SELECTOR_CSS)->getText(); + return $this->escapeCurrency($subTotal); + } + + /** + * Get Subtotal text + * + * @return string + */ + public function getSubtotalExclTax() + { + $subTotal = $this->_rootElement->find($this->subtotalExclTax, Locator::SELECTOR_CSS)->getText(); + return $this->escapeCurrency($subTotal); + } + + /** + * Get Subtotal text + * + * @return string + */ + public function getSubtotalInclTax() + { + $subTotal = $this->_rootElement->find($this->subtotalInclTax, Locator::SELECTOR_CSS)->getText(); + return $this->escapeCurrency($subTotal); + } + + /** + * Get Shipping Excluding tax price text + * + * @return string|null + */ + public function getShippingInclTax() + { + $subTotal = $this->_rootElement->find($this->shippingInclTax, Locator::SELECTOR_CSS); + return $subTotal->isVisible() ? $this->escapeCurrency($subTotal->getText()) : null; + } + + /** + * Get Shipping Including tax price text + * + * @return string|null + */ + public function getShippingExclTax() + { + $subTotal = $this->_rootElement->find($this->shippingExclTax, Locator::SELECTOR_CSS); + return $subTotal->isVisible() ? $this->escapeCurrency($subTotal->getText()) : null; + } + + /** + * Method that escapes currency symbols + * + * @param string $price + * @return string|null + */ + protected function escapeCurrency($price) + { + preg_match("/^\\D*\\s*([\\d,\\.]+)\\s*\\D*$/", $price, $matches); + return (isset($matches[1])) ? $matches[1] : null; + } } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/View/ActionsToolbar.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/View/ActionsToolbar.php index bd613531c7b68fa5717e1a38ed51e37efa55982e..4c5756fecffd692f2951fa4f406f36b5de2ce106 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/View/ActionsToolbar.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Order/View/ActionsToolbar.php @@ -6,8 +6,8 @@ namespace Magento\Sales\Test\Block\Order\View; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Order view block. diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AbstractAssertItems.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AbstractAssertItems.php index e40173a7ed11e62ed4fd4a22df6b563d620a59dd..041e7d7d5865eb3d4d62a64d32a3eafa2b5cabce 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AbstractAssertItems.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AbstractAssertItems.php @@ -8,7 +8,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Sales\Test\Fixture\OrderInjectable; -use Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Constraint\AbstractAssertForm; /** * Class AbstractAssertArchiveItems diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AbstractAssertOrderOnFrontend.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AbstractAssertOrderOnFrontend.php index cd09e9e27e1311297fc2262b719b516a67d1193b..3ebe97e8f48a83691c99350d88dae914e00409c3 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AbstractAssertOrderOnFrontend.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AbstractAssertOrderOnFrontend.php @@ -9,8 +9,8 @@ namespace Magento\Sales\Test\Constraint; use Magento\Customer\Test\Page\CustomerAccountIndex; use Magento\Cms\Test\Page\CmsIndex; use Magento\Customer\Test\Fixture\CustomerInjectable; -use Mtf\Constraint\AbstractConstraint; -use Mtf\ObjectManager; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\ObjectManager; /** * Abstract Class AbstractAssertOrderOnFrontend diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertCreditMemoButton.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertCreditMemoButton.php index 73cd390792abe1108866d22ea5246f7d8c1b2363..16edae0465421bcf9ac4110b5854bf0401955d30 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertCreditMemoButton.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertCreditMemoButton.php @@ -9,7 +9,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertCreditMemoButton diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceInInvoicesGrid.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceInInvoicesGrid.php index 6232e4c36988f56df2ba501398929a29e696d426..8c5e6da90764aa78f63ff87c4fb319b71997b3b3 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceInInvoicesGrid.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceInInvoicesGrid.php @@ -8,7 +8,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Sales\Test\Page\Adminhtml\InvoiceIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertInvoiceInInvoicesGrid diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceInInvoicesTab.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceInInvoicesTab.php index 9aa105083f39b6d758b87c39e78ddee1a68bb8d1..bee911273739c4d59b28be62b2a19a26bb857328 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceInInvoicesTab.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceInInvoicesTab.php @@ -10,7 +10,7 @@ use Magento\Sales\Test\Block\Adminhtml\Order\View\Tab\Invoices\Grid; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertInvoiceInInvoicesTab diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceSuccessCreateMessage.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceSuccessCreateMessage.php index ab9529606e3edef41da743760a64475338aeb98c..9faaaece512319d6b4dd5f33c014f917c47cfd43 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceSuccessCreateMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceSuccessCreateMessage.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertInvoiceSuccessCreateMessage diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceWithShipmentSuccessMessage.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceWithShipmentSuccessMessage.php index dee20ee6e3f931d9ec59cf129ab4048cabcc4824..15582ebab753641fa97d9e21fec6af17a38cc93d 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceWithShipmentSuccessMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceWithShipmentSuccessMessage.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertInvoiceWithShipmentSuccessMessage diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertNoCreditMemoButton.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertNoCreditMemoButton.php index 1830982dc35b5aa410a2f3f90c35c4af93631f04..27168972b067265f5064f06edd8674a5524eaf72 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertNoCreditMemoButton.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertNoCreditMemoButton.php @@ -9,7 +9,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertNoCreditMemoButton diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertNoInvoiceButton.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertNoInvoiceButton.php index faf9c3848f7fba07399aba4f65a35a3836be8a42..448ec5ef79605fdb8801b869f6c849850727739a 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertNoInvoiceButton.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertNoInvoiceButton.php @@ -9,7 +9,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertNoInvoiceButton diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderButtonsAvailable.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderButtonsAvailable.php index f4fea87c5ea42d3c94425856c40026eed6dd0ac3..4e28fce3ab6084a9628b9e1c0d572a76003b334d 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderButtonsAvailable.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderButtonsAvailable.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\SalesOrder; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderButtonsAvailable diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderButtonsUnavailable.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderButtonsUnavailable.php index 2642586da0bb2af63ac85294fc30ec068de7af8b..1a2171ee10c930de1968fda06587dcc64d851bb5 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderButtonsUnavailable.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderButtonsUnavailable.php @@ -9,7 +9,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderButtonsUnavailable diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderCancelMassActionFailMessage.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderCancelMassActionFailMessage.php index c466e7bb75c9ed5f8e63da3b75748ba52cd1802d..890c0724d7d3a8d80c7c94737c73ad65bc1b1c15 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderCancelMassActionFailMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderCancelMassActionFailMessage.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderCancelMassActionFailMessage diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderCancelMassActionSuccessMessage.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderCancelMassActionSuccessMessage.php index 3471a9bc34922c8e99b9a09e504aea246e1eec3d..2714f10fbb2081083b2226219039d20fcd59a2eb 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderCancelMassActionSuccessMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderCancelMassActionSuccessMessage.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderCancelMassActionSuccessMessage diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderCancelSuccessMessage.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderCancelSuccessMessage.php index b8859fad542f39d0e47d648ba85e739d5fea6336..5c164d1aee7ca5f4d98158bd4fbabf50097e6bc6 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderCancelSuccessMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderCancelSuccessMessage.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderCancelSuccessMessage diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderGrandTotal.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderGrandTotal.php index 002ae82bde4e83c30ec55165b3e857a269554587..317e93fbb00161b74eda8cff1e20681abab1559f 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderGrandTotal.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderGrandTotal.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderGrandTotal diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderInOrdersGrid.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderInOrdersGrid.php index a02eacd05f20fe2217d660ab0ea71c46a1870b4f..691173f3cc28d44be7af94ed9bf87f7cb9aaf726 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderInOrdersGrid.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderInOrdersGrid.php @@ -8,7 +8,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderInOrdersGrid diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderInOrdersGridOnFrontend.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderInOrdersGridOnFrontend.php index be39a398072ec2b96e5f59175dd9f7a602569b19..8b4dd2454da918f594c65a8643636c53d2fe94b0 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderInOrdersGridOnFrontend.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderInOrdersGridOnFrontend.php @@ -10,8 +10,8 @@ use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\CustomerAccountIndex; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Sales\Test\Page\OrderHistory; -use Mtf\Constraint\AbstractConstraint; -use Mtf\ObjectManager; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\ObjectManager; /** * Class AssertOrderInOrdersGridOnFrontend diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderMassOnHoldSuccessMessage.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderMassOnHoldSuccessMessage.php index 57cf7ce184fe299cfc15601dd2a2680fb546298c..1f1508c0c422ae9e061dfcc4cd6f005bbd1a914b 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderMassOnHoldSuccessMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderMassOnHoldSuccessMessage.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderMassOnHoldSuccessMessage diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderNotInOrdersGrid.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderNotInOrdersGrid.php index 7960d579a4f2d4c8e3cd055bd79dfd1500562ab5..c89d729ef6e6b5518028288119b1af33adf4f952 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderNotInOrdersGrid.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderNotInOrdersGrid.php @@ -8,7 +8,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderNotInOrdersGrid diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderNotVisibleOnMyAccount.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderNotVisibleOnMyAccount.php index 3ea3556f69db105a36ef21b94a7c54b3c322d93f..595a9428edaf972135a32ff0e08d040a4b643a53 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderNotVisibleOnMyAccount.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderNotVisibleOnMyAccount.php @@ -10,8 +10,8 @@ use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\CustomerAccountIndex; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Sales\Test\Page\OrderHistory; -use Mtf\Constraint\AbstractConstraint; -use Mtf\ObjectManager; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\ObjectManager; /** * Class AssertOrderNotVisibleOnMyAccount diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderOnHoldFailMessage.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderOnHoldFailMessage.php index 828155468a5a8355e3c705ea8c9a8e0bf995d0e8..2c7a6342539be30df9851e4af463a0b2877a46ed 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderOnHoldFailMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderOnHoldFailMessage.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderOnHoldFailMessage diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderOnHoldSuccessMessage.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderOnHoldSuccessMessage.php index 0ac614fd93545076c2d6f5de2fe51a57ba4f9945..38d9ff38c11a4c93434c20511d5361444194daca 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderOnHoldSuccessMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderOnHoldSuccessMessage.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderOnHoldSuccessMessage diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderReleaseFailMessage.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderReleaseFailMessage.php index 425e708fea9d68ea1c47de7694f5f179f6167a99..a672710661db1d8f5fe9514c3d3c684af945aaea 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderReleaseFailMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderReleaseFailMessage.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderReleaseFailMessage diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderReleaseSuccessMessage.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderReleaseSuccessMessage.php index 6844fa76977758dbb6fa4bf0c04ac92073e83595..2fd559d9a3c2d325195b66246df1d40dfd8a5e55 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderReleaseSuccessMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderReleaseSuccessMessage.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderReleaseSuccessMessage diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusDuplicateStatus.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusDuplicateStatus.php index 401787f33474e491137d02dcbda7b7ebccfd355c..4e6788febec0d855e43c6e12668f3e92a2b45b8f 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusDuplicateStatus.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusDuplicateStatus.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderStatusNew; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderStatusDuplicateStatus diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusInGrid.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusInGrid.php index c9cab376d3b1603d1964d01d4f43eaad35a4e4f8..de3cd7e0311f96e6004204601aa782fdba97c83f 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Fixture\OrderStatus; use Magento\Sales\Test\Page\Adminhtml\OrderStatusIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderStatusInGrid diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusIsCorrect.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusIsCorrect.php index 9c9179d99497d5890dae9f4ae250caca964b6200..dc5d15ca4eb5c6c98be66465bb34eb17252e69d4 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusIsCorrect.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusIsCorrect.php @@ -8,7 +8,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderStatusIsCorrect diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusNotAssigned.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusNotAssigned.php index 494b6f7fa8a32b026acd422b7616daa06f9b13b5..5fa8631ae83b566d57b2bedd44c578b9e7a5e8ea 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusNotAssigned.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusNotAssigned.php @@ -8,7 +8,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Fixture\OrderStatus; use Magento\Sales\Test\Page\Adminhtml\OrderStatusIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderStatusNotAssigned diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusSuccessAssignMessage.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusSuccessAssignMessage.php index a68f4baa55859435925cbb10b75054e0c084e5c7..e75979c48235c5c7dc8ff8b3b2f9f8a169c9feef 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusSuccessAssignMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusSuccessAssignMessage.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderStatusIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderStatusSuccessAssignMessage diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusSuccessCreateMessage.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusSuccessCreateMessage.php index 760d8e0bae3b71b22b7a19457091dd3584739af0..486b801dbed5c02e07b08753d1b2f256003a523e 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusSuccessCreateMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusSuccessCreateMessage.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderStatusIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderStatusSuccessCreateMessage diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusSuccessUnassignMessage.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusSuccessUnassignMessage.php index 1f6465ab0ae160bdd62438da9c4a59357080bb12..bc30beb1c1e3a3749329a3463bee4a31262f547a 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusSuccessUnassignMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderStatusSuccessUnassignMessage.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderStatusIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderStatusSuccessUnassignMessage diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderSuccessCreateMessage.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderSuccessCreateMessage.php index d5a501662a8326200157f9f0a5e91bb7822210bd..11582827fd8b014d63729cf89c91f9c1ef8b7dee 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderSuccessCreateMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderSuccessCreateMessage.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrderSuccessCreateMessage diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrdersInOrdersGrid.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrdersInOrdersGrid.php index 36067368dd885bbda02462f9f0907c75835a3e6e..5f6e0e6dc22586b80229a082ad93c50d68c689c3 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrdersInOrdersGrid.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrdersInOrdersGrid.php @@ -8,7 +8,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertOrdersInOrdersGrid diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertProductInItemsOrderedGrid.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertProductInItemsOrderedGrid.php index 078aaaac15334f302788557d05f240e4260d328c..ac10f70210745182a3233081c3b773b797a26aed 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertProductInItemsOrderedGrid.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertProductInItemsOrderedGrid.php @@ -8,8 +8,8 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Block\Adminhtml\Order\Create\Items; use Magento\Sales\Test\Page\Adminhtml\OrderCreateIndex; -use Mtf\Constraint\AbstractAssertForm; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Fixture\FixtureInterface; /** * Assert product was added to Items Ordered grid in customer account on Order creation page backend. diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertRefundInCreditMemoTab.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertRefundInCreditMemoTab.php index a821193e2b1e22ee1d90dd79869b4cbff92aa86c..21e33cea1ef6b1080165d62c4112b1db2f67c75b 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertRefundInCreditMemoTab.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertRefundInCreditMemoTab.php @@ -10,7 +10,7 @@ use Magento\Sales\Test\Block\Adminhtml\Order\View\Tab\CreditMemos\Grid; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertRefundInCreditMemoTab diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertRefundInRefundsGrid.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertRefundInRefundsGrid.php index ffdaf05743f28f18a0b53e6d59bbdf973490aac5..9583a712adee58939be76ca8113397c8b465bfce 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertRefundInRefundsGrid.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertRefundInRefundsGrid.php @@ -8,7 +8,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Sales\Test\Page\Adminhtml\CreditMemoIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertRefundInRefundsGrid diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertRefundSuccessCreateMessage.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertRefundSuccessCreateMessage.php index fd74aa59a15e4cda88c9726173ec90569297a139..d619f949f4e83331471b0847c3b6d7095ee833e4 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertRefundSuccessCreateMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertRefundSuccessCreateMessage.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertRefundSuccessCreateMessage diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertReorderStatusIsCorrect.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertReorderStatusIsCorrect.php index 0d3aad30ad1a1f219b2d002e2153ae88e0de44f2..46e188fe74d2015442300d98382dfff20cd3f3a3 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertReorderStatusIsCorrect.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertReorderStatusIsCorrect.php @@ -9,7 +9,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertReorderStatusIsCorrect diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertSalesPrintOrderBillingAddress.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertSalesPrintOrderBillingAddress.php index 01e8c1ca9084aea131900ded0082b65baf15f345..8c6c78230ea1781b1d80f91512359e6c28e3f812 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertSalesPrintOrderBillingAddress.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertSalesPrintOrderBillingAddress.php @@ -8,7 +8,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Customer\Test\Fixture\AddressInjectable; use Magento\Sales\Test\Page\SalesGuestPrint; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Assert that BillingAddress printed correctly on sales guest print page. diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertSalesPrintOrderGrandTotal.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertSalesPrintOrderGrandTotal.php index 362a43cd644723dc6c22ce4d9f3685c62ac00c48..586d9925e8ac9e9b74cd01fe6e69dddedc396c7d 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertSalesPrintOrderGrandTotal.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertSalesPrintOrderGrandTotal.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\SalesGuestPrint; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Assert that Grand Total price was printed correctly on sales guest print page. diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertSalesPrintOrderPaymentMethod.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertSalesPrintOrderPaymentMethod.php index f50ada3b1719e5215ba65bde5204e4e22c1b9e05..dab302d4283218b50693ed2794d51c14496e4966 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertSalesPrintOrderPaymentMethod.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertSalesPrintOrderPaymentMethod.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\SalesGuestPrint; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Assert that payment method was printed correctly on sales guest print page. diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertSalesPrintOrderProducts.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertSalesPrintOrderProducts.php index bc359b7f343b92fad52beeda1f4fa92aa9b1e430..05940cb7bc5ce5975adf34f151ca7a8cc0eea4b1 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertSalesPrintOrderProducts.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertSalesPrintOrderProducts.php @@ -7,8 +7,8 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Page\SalesGuestPrint; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; /** * Assert that products printed correctly on sales guest print page. diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertUnholdButton.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertUnholdButton.php index fa07944b9ed11747d414a43d26b3487d800cda85..dc9aab4a6a6da420a44788c3734c1c0ef5633405 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertUnholdButton.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertUnholdButton.php @@ -9,7 +9,7 @@ namespace Magento\Sales\Test\Constraint; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUnholdButton diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/OrderCreditMemoNew.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/OrderCreditMemoNew.xml index f7c762432c4d70b557badfc7bd57c5047ea75f76..08bab6e84bf9809b1b24344753cebad4db51af8b 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/OrderCreditMemoNew.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/OrderCreditMemoNew.xml @@ -17,5 +17,10 @@ <locator>#edit_form</locator> <strategy>css selector</strategy> </formBlock> + <totalsBlock> + <class>Magento\Sales\Test\Block\Adminhtml\Order\Creditmemo\Totals</class> + <locator>.creditmemo-totals</locator> + <strategy>css selector</strategy> + </totalsBlock> </blocks> </page> diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Page/SalesOrderShipmentNew.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Page/SalesOrderShipmentNew.php index 70fd8a828474ad11e9e24c368a556d22a5bfd059..352f752784045a12c0f3549332fbf48832a82844 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Page/SalesOrderShipmentNew.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Page/SalesOrderShipmentNew.php @@ -6,9 +6,9 @@ namespace Magento\Sales\Test\Page; -use Mtf\Client\Element\Locator; -use Mtf\Factory\Factory; -use Mtf\Page\Page; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Page\Page; /** * Class SalesOrder diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/AddProductsStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/AddProductsStep.php index 7106416ff98e5b53ce36a69edc5d9f2266e5d656..ed71060eb94032aae9d31f875bac42634fd6efdf 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/AddProductsStep.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/AddProductsStep.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\TestStep; use Magento\Sales\Test\Page\Adminhtml\OrderCreateIndex; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class AddProductsStep diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/AddRecentlyViewedProductsToCartStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/AddRecentlyViewedProductsToCartStep.php index 3955d13be0037958089135b297068403451ead57..d995a2c78298b4d2932cf9836377407933f321eb 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/AddRecentlyViewedProductsToCartStep.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/AddRecentlyViewedProductsToCartStep.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\TestStep; use Magento\Sales\Test\Page\Adminhtml\OrderCreateIndex; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Add Recently Viewed Products to cart. diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/ConfigureProductsStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/ConfigureProductsStep.php index 887a578b2167de6fcfaf24f70d3d881ed189dde7..af0c71dbfcdfe76e2fc6e85a8cb68dc126a4c5c4 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/ConfigureProductsStep.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/ConfigureProductsStep.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\TestStep; use Magento\Sales\Test\Page\Adminhtml\OrderCreateIndex; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Configure products options on backend order. diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateNewOrderStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateNewOrderStep.php index c0c320d6257c47553dbd176762080dd1908c939b..72b6789e700658faded052aaa929ff870dc8e32b 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateNewOrderStep.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateNewOrderStep.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\TestStep; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class CreateNewOrderStep diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/FillBillingAddressStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/FillBillingAddressStep.php index 21519711065fef9d75ff044126b2c215efe7c7af..a5931b05e83d8b5418f6c128ccbb4f25ce307ff2 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/FillBillingAddressStep.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/FillBillingAddressStep.php @@ -8,7 +8,7 @@ namespace Magento\Sales\Test\TestStep; use Magento\Customer\Test\Fixture\AddressInjectable; use Magento\Sales\Test\Page\Adminhtml\OrderCreateIndex; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Fill Sales Data. diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/OpenSalesOrdersStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/OpenSalesOrdersStep.php index 6deab5e8fe9b93d95c3f3727d0df1ec107c31794..1be4db9517179c5e3815217234e2c296534ed5b6 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/OpenSalesOrdersStep.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/OpenSalesOrdersStep.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\TestStep; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class OpenSalesOrdersStep diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/PrintOrderOnFrontendStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/PrintOrderOnFrontendStep.php index af8be31ec7c7e49fddbb9f6eaf656e9ab1e62470..a810a3ca608a2cd7927e12316d731b3b4ce47d4a 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/PrintOrderOnFrontendStep.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/PrintOrderOnFrontendStep.php @@ -7,8 +7,8 @@ namespace Magento\Sales\Test\TestStep; use Magento\Sales\Test\Page\SalesGuestView; -use Mtf\Client\Browser; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Click on "Print Order" button. @@ -25,16 +25,16 @@ class PrintOrderOnFrontendStep implements TestStepInterface /** * Browser. * - * @var Browser + * @var BrowserInterface */ protected $browser; /** * @constructor * @param SalesGuestView $salesGuestView - * @param Browser $browser + * @param BrowserInterface $browser */ - public function __construct(SalesGuestView $salesGuestView, Browser $browser) + public function __construct(SalesGuestView $salesGuestView, BrowserInterface $browser) { $this->salesGuestView = $salesGuestView; $this->browser = $browser; diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/ReorderStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/ReorderStep.php index b3f7eaa7a0d3dbe9baef052159e003d61d60cf59..8485a0831ba0aaef8bfb49b81e610d30ea09d45c 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/ReorderStep.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/ReorderStep.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\TestStep; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class ReorderStep diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SelectCustomerOrderStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SelectCustomerOrderStep.php index a88e41d3bfb99b4a53b787a4264ef65c1b431c67..8c1d84dd8ea81053acd4a03ae53d691ae4b593a3 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SelectCustomerOrderStep.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SelectCustomerOrderStep.php @@ -8,7 +8,7 @@ namespace Magento\Sales\Test\TestStep; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Sales\Test\Page\Adminhtml\OrderCreateIndex; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class SelectCustomerOrderStep diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SelectPaymentMethodForOrderStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SelectPaymentMethodForOrderStep.php index 9c523d6db89c6c84349004bf717183280dd40ad9..73b774cb7c3d761780cd58e6e82c74f19f872252 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SelectPaymentMethodForOrderStep.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SelectPaymentMethodForOrderStep.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\TestStep; use Magento\Sales\Test\Page\Adminhtml\OrderCreateIndex; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class SelectPaymentMethodForOrderStep diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SelectShippingMethodForOrderStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SelectShippingMethodForOrderStep.php index 96dffd305c8c278bafaa78797f5ddbf23807a786..8b9a8d370cf501eefd82252cb275dc5e52863fcd 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SelectShippingMethodForOrderStep.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SelectShippingMethodForOrderStep.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\TestStep; use Magento\Sales\Test\Page\Adminhtml\OrderCreateIndex; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class SelectShippingMethodForOrderStep diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SelectStoreStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SelectStoreStep.php index d3945c15ad7e03e90da1e9065ca243e54c7d7468..d8e82f4e2bc7177c97bb14d0f8f33959679d3a61 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SelectStoreStep.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SelectStoreStep.php @@ -8,7 +8,7 @@ namespace Magento\Sales\Test\TestStep; use Magento\Sales\Test\Page\Adminhtml\OrderCreateIndex; use Magento\Store\Test\Fixture\Store; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class SelectStoreStep diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SubmitOrderStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SubmitOrderStep.php index 0623946e4c2e3e7ddbe5e6c973a491eb0d255b72..f9195c378758104fbc27cdc72e155dc59e21d6e3 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SubmitOrderStep.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SubmitOrderStep.php @@ -10,8 +10,8 @@ use Magento\Customer\Test\Fixture\AddressInjectable; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Sales\Test\Page\Adminhtml\OrderCreateIndex; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestStep\TestStepInterface; /** * Submit Order step. @@ -46,7 +46,7 @@ class SubmitOrderStep implements TestStepInterface * @param FixtureFactory $fixtureFactory * @param CustomerInjectable $customer * @param AddressInjectable $billingAddress - * @param \Mtf\Fixture\FixtureInterface[] $products + * @param \Magento\Mtf\Fixture\FixtureInterface[] $products */ public function __construct( OrderCreateIndex $orderCreateIndex, diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/UpdateProductsDataStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/UpdateProductsDataStep.php index 8302240bdd7441a8c7f7b6cdfea76b59b9ad1b5e..525b5b430edf93d2f0c9894676edd0d6f9276069 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/UpdateProductsDataStep.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/UpdateProductsDataStep.php @@ -7,7 +7,7 @@ namespace Magento\Sales\Test\TestStep; use Magento\Sales\Test\Page\Adminhtml\OrderCreateIndex; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class UpdateProductsDataStep diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/etc/scenario.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/etc/scenario.xml index a6d5580a48132d15f6fa6d6f4e6d5e63fb8d8782..fb2d6e3eb72468d481f27e77883cc4d8190584c2 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/etc/scenario.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/etc/scenario.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<scenarios xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/Mtf/Config/etc/scenario.xsd"> +<scenarios xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/Magento/Mtf/Config/etc/scenario.xsd"> <scenario name="ReorderOrderEntityTest" module="Magento_Sales"> <methods> <method name="test"> diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Adminhtml/Order/Tracking.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Adminhtml/Order/Tracking.php index b55425200e73c09adcb8d047ea03405d5bdc81cb..9b4b3aa98aca839fa3ab0aa60bf89db68e41a21a 100644 --- a/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Adminhtml/Order/Tracking.php +++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Adminhtml/Order/Tracking.php @@ -7,8 +7,8 @@ namespace Magento\Shipping\Test\Block\Adminhtml\Order; use Magento\Shipping\Test\Block\Adminhtml\Order\Tracking\Item; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Tracking diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Adminhtml/Order/Tracking/Item.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Adminhtml/Order/Tracking/Item.php index dd3d4c017035b77a09cdf5b46d5ab284ba9906dc..df2c3cc1a8eb1a6377bf83531aa344f142ce153a 100644 --- a/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Adminhtml/Order/Tracking/Item.php +++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Adminhtml/Order/Tracking/Item.php @@ -6,7 +6,7 @@ namespace Magento\Shipping\Test\Block\Adminhtml\Order\Tracking; -use Mtf\Block\Form; +use Magento\Mtf\Block\Form; /** * Class Item diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Order/Info.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Order/Info.php index 79414714d808b9eb3abfcd08ea1d6df747220165..b5ca395ff72ed92a89231aba8714b6484d53ed00 100644 --- a/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Order/Info.php +++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Order/Info.php @@ -6,7 +6,7 @@ namespace Magento\Shipping\Test\Block\Order; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Info block on order's view page. diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Order/Shipment.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Order/Shipment.php index a27dfcb6c3c6e786c4ec50298e62daed01e39e7b..496229684077ae0d0ea0a8afd378cd4cde195559 100644 --- a/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Order/Shipment.php +++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Order/Shipment.php @@ -7,8 +7,8 @@ namespace Magento\Shipping\Test\Block\Order; use Magento\Shipping\Test\Block\Order\Shipment\Items; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Shipment diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Order/Shipment/Items.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Order/Shipment/Items.php index 69b2eb4e618578ce25c4d0a31d1ce67d471b006e..463f84b7f87437413255d0027f6231810ee7d129 100644 --- a/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Order/Shipment/Items.php +++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/Block/Order/Shipment/Items.php @@ -6,7 +6,7 @@ namespace Magento\Shipping\Test\Block\Order\Shipment; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Class Items diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertNoShipButton.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertNoShipButton.php index 8a0b406fee8c0f69837d7db06772de313915617b..ae61d24ecd11359c52df316824c27d0d19a03fcc 100644 --- a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertNoShipButton.php +++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertNoShipButton.php @@ -9,7 +9,7 @@ namespace Magento\Shipping\Test\Constraint; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertNoShipButton diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentInShipmentsGrid.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentInShipmentsGrid.php index ee51687746f49b540099c10a00cf9784418fda13..144fab6e4b9d4780bd550c8e0193250d36aa985a 100644 --- a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentInShipmentsGrid.php +++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentInShipmentsGrid.php @@ -8,7 +8,7 @@ namespace Magento\Shipping\Test\Constraint; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Shipping\Test\Page\Adminhtml\ShipmentIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertShipmentInShipmentsGrid diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentInShipmentsTab.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentInShipmentsTab.php index abb101e24fa1fe9d7c87d1381c46c3874efc194b..76997e744f74c9b07317f87f40df400a56857b39 100644 --- a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentInShipmentsTab.php +++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentInShipmentsTab.php @@ -9,7 +9,7 @@ namespace Magento\Shipping\Test\Constraint; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertShipmentInShipmentsTab diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentItems.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentItems.php index 68a79182af9f399d37297d4733e88a81c60fcd69..84d5d5ff797e3835c48f1277ed1e41a887cda428 100644 --- a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentItems.php +++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentItems.php @@ -10,7 +10,7 @@ use Magento\Sales\Test\Constraint\AbstractAssertItems; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Shipping\Test\Page\Adminhtml\SalesShipmentView; use Magento\Shipping\Test\Page\Adminhtml\ShipmentIndex; -use Mtf\ObjectManager; +use Magento\Mtf\ObjectManager; /** * Class AssertShipmentItems diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentSuccessCreateMessage.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentSuccessCreateMessage.php index adffababcc307c81f825f513a6e05f37a8d21949..ce32f38f424c4b3433c2186ddcc989d3548f1f2f 100644 --- a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentSuccessCreateMessage.php +++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentSuccessCreateMessage.php @@ -7,7 +7,7 @@ namespace Magento\Shipping\Test\Constraint; use Magento\Sales\Test\Page\Adminhtml\OrderView; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertShipmentSuccessCreateMessage diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShippingMethodOnPrintOrder.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShippingMethodOnPrintOrder.php index ca2bce698bb7036ad24c53a39863324717300f3b..2caba99cd140e11be67618957f371b8090b4eb62 100644 --- a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShippingMethodOnPrintOrder.php +++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShippingMethodOnPrintOrder.php @@ -7,7 +7,7 @@ namespace Magento\Shipping\Test\Constraint; use Magento\Sales\Test\Page\SalesGuestPrint; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Assert that shipping method was printed correctly on sales guest print page. diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/Fixture/Method.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/Fixture/Method.php index 00d76e6901332fcc689d83115d8e1110edb823ee..9c4d03783129221cee78452ef37d551b41448b86 100644 --- a/dev/tests/functional/tests/app/Magento/Shipping/Test/Fixture/Method.php +++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/Fixture/Method.php @@ -6,8 +6,8 @@ namespace Magento\Shipping\Test\Fixture; -use Mtf\Factory\Factory; -use Mtf\Fixture\DataFixture; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Fixture\DataFixture; /** * Class Method diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/Repository/Method.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/Repository/Method.php index 7bb948e124ed12683ad14cc83a9dc9da48237813..6f13fc81e55b5b61db5ba169d6f32f203162c7ec 100644 --- a/dev/tests/functional/tests/app/Magento/Shipping/Test/Repository/Method.php +++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/Repository/Method.php @@ -6,7 +6,7 @@ namespace Magento\Shipping\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class Method Repository diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Block/Adminhtml/SitemapGrid.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Block/Adminhtml/SitemapGrid.php index 31b9f7ab48759e7470cb25c62b8fb43ac83c9691..2781dec51ad6bdea3d7dd1f3aa2cfd8f279e85a3 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Block/Adminhtml/SitemapGrid.php +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Block/Adminhtml/SitemapGrid.php @@ -7,7 +7,7 @@ namespace Magento\Sitemap\Test\Block\Adminhtml; use Magento\Backend\Test\Block\Widget\Grid; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; /** * Class SitemapGrid diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapContent.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapContent.php index a193569f961026dc814c454586f344e1bff65128..d476d23c66ca418fef38814ce6121377c042aa29 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapContent.php +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapContent.php @@ -11,7 +11,7 @@ use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Cms\Test\Fixture\CmsPage; use Magento\Sitemap\Test\Fixture\Sitemap; use Magento\Sitemap\Test\Page\Adminhtml\SitemapIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSitemapContent diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapFailFolderSaveMessage.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapFailFolderSaveMessage.php index 96efcf67f95d6eac0313227755074b3bc7650fe0..3dbdc67069c21762708a9993ad5ba15bf11173dd 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapFailFolderSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapFailFolderSaveMessage.php @@ -8,7 +8,7 @@ namespace Magento\Sitemap\Test\Constraint; use Magento\Sitemap\Test\Fixture\Sitemap; use Magento\Sitemap\Test\Page\Adminhtml\SitemapIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSitemapFailFolderSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapFailPathSaveMessage.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapFailPathSaveMessage.php index 75aadae7fedbb54b86d13fd2824bd60895479905..62beed7801a351d75444924ae31427bd3d3c0220 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapFailPathSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapFailPathSaveMessage.php @@ -8,7 +8,7 @@ namespace Magento\Sitemap\Test\Constraint; use Magento\Sitemap\Test\Fixture\Sitemap; use Magento\Sitemap\Test\Page\Adminhtml\SitemapIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSitemapFailPathSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapInGrid.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapInGrid.php index c39dfeb0baaa7e87cb07b777140e0f7446f3a62b..4e0ed7081b8057e1bb962f42da8ca958199d8783 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Sitemap\Test\Constraint; use Magento\Sitemap\Test\Fixture\Sitemap; use Magento\Sitemap\Test\Page\Adminhtml\SitemapIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSitemapInGrid diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapNotInGrid.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapNotInGrid.php index 8aa3253d7695e90adf2163a7670ad737877c7532..3b9c67aba378594a4b5b947126e290ba99758b3b 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Sitemap\Test\Constraint; use Magento\Sitemap\Test\Fixture\Sitemap; use Magento\Sitemap\Test\Page\Adminhtml\SitemapIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSitemapNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapSuccessDeleteMessage.php index d3665d2124bb871ff4d42eecd8d38cd0cbe20874..ea5001caa1f668c7b7fff3b708e23c01289ca166 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapSuccessDeleteMessage.php @@ -7,7 +7,7 @@ namespace Magento\Sitemap\Test\Constraint; use Magento\Sitemap\Test\Page\Adminhtml\SitemapIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSitemapSuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapSuccessGenerateMessage.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapSuccessGenerateMessage.php index c9939c74e8dff6cd2196f7f4e47c97f87d003c71..77e58ce48e148638de09e08d987d87efd097bc31 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapSuccessGenerateMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapSuccessGenerateMessage.php @@ -8,7 +8,7 @@ namespace Magento\Sitemap\Test\Constraint; use Magento\Sitemap\Test\Fixture\Sitemap; use Magento\Sitemap\Test\Page\Adminhtml\SitemapIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSitemapSuccessGenerateMessage diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapSuccessSaveAndGenerateMessages.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapSuccessSaveAndGenerateMessages.php index cd540c0045e28aa071ac5c14aa98e34e37b6183f..4cd76f6839c316cb1fb479366769c9699aeda828 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapSuccessSaveAndGenerateMessages.php +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapSuccessSaveAndGenerateMessages.php @@ -8,7 +8,7 @@ namespace Magento\Sitemap\Test\Constraint; use Magento\Sitemap\Test\Fixture\Sitemap; use Magento\Sitemap\Test\Page\Adminhtml\SitemapIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSitemapSuccessSaveAndGenerateMessages diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapSuccessSaveMessage.php index 0d78b7b7b58dfb3cdb5ee8a2737af1a2669f11a0..d2c8eec17934df79d407fca570c30e00cbd1923b 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Constraint/AssertSitemapSuccessSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\Sitemap\Test\Constraint; use Magento\Sitemap\Test\Page\Adminhtml\SitemapIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSitemapSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Fixture/Sitemap.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Fixture/Sitemap.php index 2984eaf84361ce08bcbeda0085c89ce125123fa8..d2d40bd3713e8d00dfc5991b7334ecd6559192eb 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Fixture/Sitemap.php +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Fixture/Sitemap.php @@ -6,7 +6,7 @@ namespace Magento\Sitemap\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class Sitemap diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Handler/Sitemap/Curl.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Handler/Sitemap/Curl.php index 839745e0da0cd241cee6bea9b19fe9681b3cf4cc..103986e35d013561db85c4097663eeceb90f4fd7 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Handler/Sitemap/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Handler/Sitemap/Curl.php @@ -8,12 +8,12 @@ namespace Magento\Sitemap\Test\Handler\Sitemap; use Magento\Backend\Test\Handler\Extractor; use Magento\Sitemap\Test\Handler\Sitemap; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Handler/Sitemap/SitemapInterface.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Handler/Sitemap/SitemapInterface.php index 87c9938c46f66bdcd10f1f29c0040d5895355652..97246710c6ee357ced2f91b3dd19f74f2b3c9443 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Handler/Sitemap/SitemapInterface.php +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Handler/Sitemap/SitemapInterface.php @@ -6,7 +6,7 @@ namespace Magento\Sitemap\Test\Handler\Sitemap; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface SitemapInterface diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Repository/Sitemap.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Repository/Sitemap.php index 80077b4fead7f813ee2064d55e4dc015d1a72ecf..a2f28611e98efef01be6be312eacd5ea029ce699 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Repository/Sitemap.php +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Repository/Sitemap.php @@ -6,7 +6,7 @@ namespace Magento\Sitemap\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class Sitemap diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/CreateSitemapEntityTest.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/CreateSitemapEntityTest.php index 0f0ffb725bfa08fb5a1c9d745a45bcc74852f3b4..9a6cec214f08147a37c1932359b65e8ec1a7f7d4 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/CreateSitemapEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/CreateSitemapEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Sitemap\Test\TestCase; use Magento\Sitemap\Test\Fixture\Sitemap; use Magento\Sitemap\Test\Page\Adminhtml\SitemapIndex; use Magento\Sitemap\Test\Page\Adminhtml\SitemapNew; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Cover creating SitemapEntity diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/DeleteSitemapEntityTest.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/DeleteSitemapEntityTest.php index b2532e34c27e289af1ef23dfab7e96af808ba4f3..56371fb69ad3d0420eaade513e0efd1594a34b0a 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/DeleteSitemapEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/DeleteSitemapEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Sitemap\Test\TestCase; use Magento\Sitemap\Test\Fixture\Sitemap; use Magento\Sitemap\Test\Page\Adminhtml\SitemapEdit; use Magento\Sitemap\Test\Page\Adminhtml\SitemapIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Cover deleting Sitemap Entity diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Block/Switcher.php b/dev/tests/functional/tests/app/Magento/Store/Test/Block/Switcher.php index ae64c8dbf0a3f24f765413671748a11a54ad8334..5883250551f492346b34c53a1ed856809f5570f2 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Block/Switcher.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Block/Switcher.php @@ -8,8 +8,8 @@ namespace Magento\Store\Test\Block; use Magento\Store\Test\Fixture\Store; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Switcher diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreBackend.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreBackend.php index b23de9b65c68d7e22d90eea4b110f11f36e6b06e..feb77c84296540d05cadad89066a7c5186f20e93 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreBackend.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreBackend.php @@ -8,7 +8,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\SystemConfig; use Magento\Store\Test\Fixture\Store; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertStoreBackend diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreForm.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreForm.php index 07ab89295c4282e80d90685f92491fad472fcd6a..be32892ca3d349564ded7e385818b0a8ae8d57b9 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreForm.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreForm.php @@ -9,7 +9,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Backend\Test\Page\Adminhtml\StoreNew; use Magento\Store\Test\Fixture\Store; -use Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Constraint\AbstractAssertForm; /** * Class AssertStoreForm diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreFrontend.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreFrontend.php index 1c3fba6f7b4bbb2bfaa2713bc6d6f10d8f8b7b9d..3691c6d21e194664cfbb101b6faba9e7f67354ed 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreFrontend.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreFrontend.php @@ -8,7 +8,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Cms\Test\Page\CmsIndex; use Magento\Store\Test\Fixture\Store; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertStoreFrontend diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupForm.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupForm.php index 969adc59fa1de2a9aa6bef6403472e1599e6c950..59c77b4e2beff68d95c9a2f91fe5ad6b335b6988 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupForm.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupForm.php @@ -9,7 +9,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\EditGroup; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Store\Test\Fixture\StoreGroup; -use Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Constraint\AbstractAssertForm; /** * Class AssertStoreGroupForm diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupInGrid.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupInGrid.php index d402b84f8a7fdce5235b933e04ce880885eb9c02..51e0cd19cf59e0297792a23414873f6beb5c7a2b 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Store\Test\Fixture\StoreGroup; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertStoreGroupInGrid diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupNotInGrid.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupNotInGrid.php index 1e7a5cbc7d066a2a59950aab4f4f47aeb32944eb..c17267d296e1d9f42d2697a178938fd34ccb2fb0 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Store\Test\Fixture\StoreGroup; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertStoreGroupNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupOnStoreViewForm.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupOnStoreViewForm.php index d82b5c9636ec77d8b82e20bbb448ff7db3740505..e36072fade0cb7de8ad7ff6152c5c015612324c8 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupOnStoreViewForm.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupOnStoreViewForm.php @@ -9,7 +9,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Backend\Test\Page\Adminhtml\StoreNew; use Magento\Store\Test\Fixture\StoreGroup; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertStoreGroupOnStoreViewForm diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupSuccessDeleteAndBackupMessages.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupSuccessDeleteAndBackupMessages.php index 2dd989863208ad310f1f874930e80b1576483fb6..b68b514a232c47cc2f2cda3412e3be2277fb7b61 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupSuccessDeleteAndBackupMessages.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupSuccessDeleteAndBackupMessages.php @@ -7,7 +7,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertStoreGroupSuccessDeleteAndBackupMessages diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupSuccessDeleteMessage.php index 899edb2064a14c4c9e64cddb7ba22e474f9e2f7d..b69285e49ba7cc0dfa9204001a4c99d4db2ce366 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupSuccessDeleteMessage.php @@ -7,7 +7,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertStoreGroupSuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupSuccessSaveMessage.php index 73cf65fd967efa2bfa5d114c5c281a14a66bca53..1f78d946c067ecffe2800bdf5e2f51a926ca7a9e 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreGroupSuccessSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertStoreGroupSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreInGrid.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreInGrid.php index f1532c19a5d1787d879faac40c468340b99a6b6b..b5078cc68bb9597d55575ba29435ee050c95ba40 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Store\Test\Fixture\Store; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertStoreInGrid diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreNotInGrid.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreNotInGrid.php index 8868f0e5a2f66628121b6a23d79452c194b2d95b..a83a6a1954c6dc00e6c723e2d5a10e0b0c603e6d 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Store\Test\Fixture\Store; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertStoreNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreNotOnFrontend.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreNotOnFrontend.php index df68a3e6765d6ac23766d7203aca7c2dd5bbeafb..ab89a1a07bfca3f420014d9cbb0ed58627a8e59c 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreNotOnFrontend.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreNotOnFrontend.php @@ -8,7 +8,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Cms\Test\Page\CmsIndex; use Magento\Store\Test\Fixture\Store; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertStoreNotOnFrontend diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreSuccessDeleteAndBackupMessages.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreSuccessDeleteAndBackupMessages.php index 4301b9f84ad757d75c2599a64be9f28a9c297939..c91f10875d00783314fd0a46c43791893c867ba9 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreSuccessDeleteAndBackupMessages.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreSuccessDeleteAndBackupMessages.php @@ -7,7 +7,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertStoreSuccessDeleteAndBackupMessages diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreSuccessDeleteMessage.php index 69f628c67bac3ce0a40cacfb597287b2bf056cbc..4f5f9edf2136fe1969c253dead321a5ca28d612b 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreSuccessDeleteMessage.php @@ -7,7 +7,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertStoreSuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreSuccessSaveMessage.php index 5ab2242d983675198874ca598d626260c63a3c7b..9d12f21870842d6a467dfc9a3f462f8d54b6e48b 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertStoreSuccessSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertStoreSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteForm.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteForm.php index c3f541646f3d2ac9de957d38594fa198e23b882d..757658db8bfe6bc29ccfaf2e75a5d84abe706151 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteForm.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteForm.php @@ -9,7 +9,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\EditWebsite; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Store\Test\Fixture\Website; -use Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Constraint\AbstractAssertForm; /** * Class AssertWebsiteForm diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteInGrid.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteInGrid.php index 157d0630bc07527cbc8c69f7dcc4bca85d905d2a..0656425f75ed92b3becb16e68b3782a935d21fb7 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Store\Test\Fixture\Website; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertWebsiteInGrid diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteNotInGrid.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteNotInGrid.php index 721b12c5b91560ee0f9d08d0e8b561374c7b77be..9c5dd627e30f893c335cfd9e2a1208f80126365d 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Store\Test\Fixture\Website; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertWebsiteNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteOnStoreForm.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteOnStoreForm.php index 8db25588f26482254c9f51fcaa3a89daaee35682..c7d76580c265beef4ca796aea466ab0a2f89e7c9 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteOnStoreForm.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteOnStoreForm.php @@ -9,7 +9,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\NewGroupIndex; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Store\Test\Fixture\Website; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertWebsiteOnStoreForm diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteSuccessDeleteAndBackupMessages.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteSuccessDeleteAndBackupMessages.php index 5e925097b06bfc4a0289694e32d703eef707b1af..eee0dd61344acd072e19ea60d1672f941e1775ed 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteSuccessDeleteAndBackupMessages.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteSuccessDeleteAndBackupMessages.php @@ -7,7 +7,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertWebsiteSuccessDeleteAndBackupMessages diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteSuccessDeleteMessage.php index 8f8dd74ea799c946d20ba02a548c31a793a6c9e0..c0e0f791c683db52889dbf626a6928988ab2f9e4 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteSuccessDeleteMessage.php @@ -7,7 +7,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertWebsiteSuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteSuccessSaveMessage.php index eb1f08c36405515d4e53010708632cfc9cfad6af..11bc68e2fc241c23232167ae341b7eefe938c3af 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Constraint/AssertWebsiteSuccessSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\Store\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertWebsiteSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.php b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.php index 081711218f0b41dd88f02076e6345529a578cb79..5762f119fe32eebea29cd55972b7a43231965782 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.php @@ -6,7 +6,7 @@ namespace Magento\Store\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class Store diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store/GroupId.php b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store/GroupId.php index da70439f612af89b907c0f9845cd9bf9561ec72b..9ec18c42b26f24c545930874d1c8bee6f100469c 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store/GroupId.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store/GroupId.php @@ -7,8 +7,8 @@ namespace Magento\Store\Test\Fixture\Store; use Magento\Store\Test\Fixture\StoreGroup; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class GroupId diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup.php b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup.php index b19288b37e0ccb4317187f80e8a1a8dcb2ea4575..04dd14411c319574f10750eda3864102cf71de4e 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup.php @@ -6,7 +6,7 @@ namespace Magento\Store\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class StoreGroup diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup/CategoryId.php b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup/CategoryId.php index 7b3c07070f1630b8de7fbf9b0c6708763cfa7220..ca4f11663f342c31e17e4a34188a980fd3c6cb59 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup/CategoryId.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup/CategoryId.php @@ -7,8 +7,8 @@ namespace Magento\Store\Test\Fixture\StoreGroup; use Magento\Catalog\Test\Fixture\Category; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class CategoryId diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup/WebsiteId.php b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup/WebsiteId.php index 47d8dabac75852500abcf3c2c94dbb7e060a67bf..36e20106ce00ee2eec6ab81e5d5150a5df11d2ae 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup/WebsiteId.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup/WebsiteId.php @@ -7,8 +7,8 @@ namespace Magento\Store\Test\Fixture\StoreGroup; use Magento\Store\Test\Fixture\Website; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class WebsiteId diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Website.php b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Website.php index 0dc41b477a6a5789e34381b5a01deae62a758b9c..c680e52135caffa8deac2f3776a66da2d44a7b96 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Website.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Website.php @@ -6,7 +6,7 @@ namespace Magento\Store\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class Website diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Store/Curl.php b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Store/Curl.php index 421b937acd41bb6ba6af6f8a1873ea1f0faec858..7e21102b92fa77317a00c6675f4f5dd9cf5505d8 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Store/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Store/Curl.php @@ -6,12 +6,12 @@ namespace Magento\Store\Test\Handler\Store; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Store/StoreInterface.php b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Store/StoreInterface.php index 034b22d0ba952209e79d3aeddb2b06ae392f2c1d..87670c64cc8e0f98999594770c83d6a0090405f7 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Store/StoreInterface.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Store/StoreInterface.php @@ -6,7 +6,7 @@ namespace Magento\Store\Test\Handler\Store; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface StoreInterface diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/StoreGroup/Curl.php b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/StoreGroup/Curl.php index 3aa9a6ce92009119dd1498895fa7848110f6c13a..2b0c1abbdde4f47a3eabc7ead74ba06cf2d6bfcd 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/StoreGroup/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/StoreGroup/Curl.php @@ -6,12 +6,12 @@ namespace Magento\Store\Test\Handler\StoreGroup; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/StoreGroup/StoreGroupInterface.php b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/StoreGroup/StoreGroupInterface.php index 6b57419e518bf3ce727daf2b8e2e45a1959f7268..9af46f18ae9988ffd6168e13ee75bf13a7cc8b78 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/StoreGroup/StoreGroupInterface.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/StoreGroup/StoreGroupInterface.php @@ -6,7 +6,7 @@ namespace Magento\Store\Test\Handler\StoreGroup; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface StoreGroupInterface diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Website/Curl.php b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Website/Curl.php index 671d46f4a8d5d7448bd100b5fa1c90cdfa79b51f..9eb58a1be2668ea40c9b458edb3224316baa5c12 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Website/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Website/Curl.php @@ -6,12 +6,12 @@ namespace Magento\Store\Test\Handler\Website; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Website/WebsiteInterface.php b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Website/WebsiteInterface.php index c3f167b26d4e3f1642d488cda004147e1712186b..2f808d7607779aebffa6e31c2acbe9fc8e2cc4cb 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Website/WebsiteInterface.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Website/WebsiteInterface.php @@ -6,7 +6,7 @@ namespace Magento\Store\Test\Handler\Website; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface WebsiteInterface diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Store.php b/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Store.php index b839bb08082e958aaf00ef0e9cd51b8ca6725624..472aa3028cb23a8dd1a3c00195cf5f29796060ab 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Store.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Store.php @@ -6,7 +6,7 @@ namespace Magento\Store\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class Store diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Repository/StoreGroup.php b/dev/tests/functional/tests/app/Magento/Store/Test/Repository/StoreGroup.php index a51aaba9dafee4277fd4fbe748cf95e37edd9d1f..fa01d8b222c6137d215e6cb9f1f8b054a2b0d947 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Repository/StoreGroup.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Repository/StoreGroup.php @@ -6,7 +6,7 @@ namespace Magento\Store\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class StoreGroup diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Website.php b/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Website.php index 97cef07a17e393072f3125f4044ba108cf2b9a48..7e0fce6fd06b01fee591cd7396c87a53e61c7618 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Website.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Website.php @@ -6,7 +6,7 @@ namespace Magento\Store\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class Website diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreEntityTest.php index 599af73acabf8162df97892d90bbe2d1c9286580..3e796d62655d43403e8ed8ecf069def881c6b1a2 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Store\Test\TestCase; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Backend\Test\Page\Adminhtml\StoreNew; use Magento\Store\Test\Fixture\Store; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for CreateStoreEntity (Store Management) diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreGroupEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreGroupEntityTest.php index 1e6bd58ef9e73794fa2c85b2d53ce9bf3e3f0bb1..6edc800dfeabbb9e096f7da9ea24772aa78bdec3 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreGroupEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreGroupEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Store\Test\TestCase; use Magento\Backend\Test\Page\Adminhtml\NewGroupIndex; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Store\Test\Fixture\StoreGroup; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Create New StoreGroup (Store Management) diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateWebsiteEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateWebsiteEntityTest.php index 3a38433e0894e81cd2b90677316e930b4d9a3234..59b40358b13031b2d20ddbdd5b4ee0115136ed17 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateWebsiteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateWebsiteEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Store\Test\TestCase; use Magento\Backend\Test\Page\Adminhtml\NewWebsiteIndex; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Store\Test\Fixture\Website; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Create Website (Store Management) diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest.php index 27a058334a5dd8e03c26c39f92aae1b59816fa10..debf3cb6b6ea0e48cfd7c35629d4daee1b899eec 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest.php @@ -11,7 +11,7 @@ use Magento\Backend\Test\Page\Adminhtml\StoreDelete; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Backup\Test\Page\Adminhtml\BackupIndex; use Magento\Store\Test\Fixture\Store; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for DeleteStoreEntity diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreGroupEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreGroupEntityTest.php index b6eab430a1f81773f6e09fd32b8f93819ceb1f00..94f044c26e0c3ab00ed1a7298e0cce5acafc2d2b 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreGroupEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreGroupEntityTest.php @@ -11,7 +11,7 @@ use Magento\Backend\Test\Page\Adminhtml\EditGroup; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Backup\Test\Page\Adminhtml\BackupIndex; use Magento\Store\Test\Fixture\StoreGroup; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Delete StoreGroup (Store Management) diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteWebsiteEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteWebsiteEntityTest.php index 0fc93a94ef473d3013831c12e8d86b154f2c4eb5..b540e04277f11e19a2e9e57b227994572384ff85 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteWebsiteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteWebsiteEntityTest.php @@ -11,7 +11,7 @@ use Magento\Backend\Test\Page\Adminhtml\EditWebsite; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Backup\Test\Page\Adminhtml\BackupIndex; use Magento\Store\Test\Fixture\Website; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Delete Website (Store Management) diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/StoreTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/StoreTest.php index 5f316bdd79356ce86185d09f672e19e91a6b58f3..ab189ce353019e5e821f66713b8491f63bb87aaf 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/StoreTest.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/StoreTest.php @@ -8,8 +8,8 @@ namespace Magento\Store\Test\TestCase; -use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\TestCase\Functional; class StoreTest extends Functional { diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreEntityTest.php index 9ac015f936d6beaf8ed2f6eb31c014a5d254f97c..9ead46a3f63cd8d26551fe3e7e851d3af779bcc8 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Store\Test\TestCase; use Magento\Backend\Test\Page\Adminhtml\EditStore; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Store\Test\Fixture\Store; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for UpdateStoreEntity (Store Management) diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreGroupEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreGroupEntityTest.php index 555e6a7a054bf63144f59f2bc40f9434b5bb0409..5ec7ac7473b68fdb031ac71f273bdf63b2a98ae6 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreGroupEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreGroupEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Store\Test\TestCase; use Magento\Backend\Test\Page\Adminhtml\EditGroup; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Store\Test\Fixture\StoreGroup; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Update StoreGroup (Store Management) diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateWebsiteEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateWebsiteEntityTest.php index 7feb6fa8811c789e85e37bf4a08d41a29554c113..d1760123b0aef7c6bac03e8c20158b1a635f50ae 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateWebsiteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateWebsiteEntityTest.php @@ -9,8 +9,8 @@ namespace Magento\Store\Test\TestCase; use Magento\Backend\Test\Page\Adminhtml\EditWebsite; use Magento\Backend\Test\Page\Adminhtml\StoreIndex; use Magento\Store\Test\Fixture\Website; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Update Website (Store Management) diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rate/Edit/Form.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rate/Edit/Form.php index 8dfbf12c72c0fe3154359565c897033002102266..e488aa8dc201dfca4378e2c6cba362f4296f05ac 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rate/Edit/Form.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rate/Edit/Form.php @@ -6,7 +6,7 @@ namespace Magento\Tax\Test\Block\Adminhtml\Rate\Edit; -use Mtf\Block\Form as ParentForm; +use Magento\Mtf\Block\Form as ParentForm; /** * Class Form diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Edit/Form.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Edit/Form.php index 380fb956a24e63200a4bca27877d5d125e90d24d..41e9135fcad075d3f78cca15ece858e284c6e160 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Edit/Form.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Edit/Form.php @@ -6,11 +6,11 @@ namespace Magento\Tax\Test\Block\Adminhtml\Rule\Edit; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; use Magento\Tax\Test\Fixture\TaxRule; -use Mtf\Block\Form as FormInterface; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Block\Form as FormInterface; /** * Form for tax rule creation. @@ -112,12 +112,12 @@ class Form extends FormInterface * Fill the root form. * * @param FixtureInterface $fixture - * @param Element $element + * @param SimpleElement $element * @return $this|void * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function fill(FixtureInterface $fixture, Element $element = null) + public function fill(FixtureInterface $fixture, SimpleElement $element = null) { $this->openAdditionalSettings(); $this->_rootElement->click(); @@ -162,14 +162,12 @@ class Form extends FormInterface $taxRateDefaultMultiSelect = $this->taxRateDefaultMultiSelect; $this->browser->waitUntil( function () use ($rootForm, $taxRateDefaultMultiSelect) { - $rootForm->reinitRootElement(); $element = $rootForm->browser->find($taxRateDefaultMultiSelect); return $element->isVisible() ? null : true; } ); $this->browser->waitUntil( function () use ($rootForm, $taxRateMultiSelectList) { - $rootForm->reinitRootElement(); $element = $rootForm->browser->find($taxRateMultiSelectList); return $element->isVisible() ? true : null; } @@ -206,10 +204,10 @@ class Form extends FormInterface * Method to add new tax classes. * * @param array $taxClasses - * @param Element $element + * @param SimpleElement $element * @return void */ - protected function addNewTaxClass(array $taxClasses, Element $element) + protected function addNewTaxClass(array $taxClasses, SimpleElement $element) { foreach ($taxClasses as $taxClass) { $option = $element->find(sprintf($this->optionMaskElement, $taxClass), Locator::SELECTOR_XPATH); @@ -232,7 +230,7 @@ class Form extends FormInterface /** * Waiting until option in list is visible. * - * @param Element $element + * @param SimpleElement $element * @param string $value * @return void */ @@ -278,18 +276,19 @@ class Form extends FormInterface return $element->isVisible() ? true : null; } ); - /** @var \Mtf\Client\Driver\Selenium\Element\MultiselectlistElement $taxRates */ + /** @var \Magento\Mtf\Client\Element\MultiselectlistElement $taxRates */ $taxRates = $this->_rootElement->find($this->taxRateBlock, Locator::SELECTOR_CSS, 'multiselectlist'); + return $taxRates->getAllValues(); } /** * Click 'Add New' button. * - * @param Element $element + * @param SimpleElement $element * @return void */ - protected function clickAddNewButton(Element $element) + protected function clickAddNewButton(SimpleElement $element) { $addNewButton = $this->addNewButton; $element->waitUntil( diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Edit/TaxRate.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Edit/TaxRate.php index ea3b07e2e79f334116d04353c3a11294a5c0bf4f..30ee53017146c24b9afebd9546848862a80fa03b 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Edit/TaxRate.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Edit/TaxRate.php @@ -6,7 +6,7 @@ namespace Magento\Tax\Test\Block\Adminhtml\Rule\Edit; -use Mtf\Block\Form as FormInterface; +use Magento\Mtf\Block\Form as FormInterface; /** * Class TaxRate diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Grid.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Grid.php index db8dcd100c2b468e87e3ba07945c09d175e5bfe7..8923aa8d311fb4bcc3d01eff43c783aeab449bcc 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Grid.php @@ -7,7 +7,6 @@ namespace Magento\Tax\Test\Block\Adminhtml\Rule; use Magento\Backend\Test\Block\Widget\Grid as GridInterface; -use Mtf\Client\Element\Locator; /** * Class Grid diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertOrderTaxOnBackend.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertOrderTaxOnBackend.php new file mode 100644 index 0000000000000000000000000000000000000000..aa63949e9de9dc7777e015e4cb5b76a6febe3305 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertOrderTaxOnBackend.php @@ -0,0 +1,231 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Tax\Test\Constraint; + +use Mtf\Constraint\AbstractConstraint; +use Magento\Sales\Test\Page\Adminhtml\OrderView; +use Magento\Sales\Test\Page\Adminhtml\OrderIndex; +use Magento\Sales\Test\Page\Adminhtml\OrderInvoiceNew; +use Magento\Sales\Test\Page\Adminhtml\OrderCreditMemoNew; +use Mtf\Fixture\InjectableFixture; + +/** + * Checks that prices displayed excluding tax in order are correct on backend. + */ +abstract class AbstractAssertOrderTaxOnBackend extends AbstractConstraint +{ + /** + * Order View Page. + * + * @var OrderView + */ + protected $orderView; + + /** + * Order View Page. + * + * @var OrderInvoiceNew + */ + protected $orderInvoiceNew; + + /** + * Order View Page. + * + * @var OrderCreditMemoNew + */ + protected $orderCreditMemoNew; + + /** + * Constraint severeness. + * + * @var string + */ + protected $severeness = 'high'; + + /** + * Implementation for get order total prices function + * + * @param array $actualPrices + * @return array + */ + abstract protected function getOrderTotals($actualPrices); + + /** + * Implementation for get invoice creation page total prices function + * + * @param array $actualPrices + * @return array + */ + abstract protected function getInvoiceNewTotals($actualPrices); + + /** + * Implementation for get credit memo creation page total prices function + * + * @param array $actualPrices + * @return array + */ + abstract protected function getCreditMemoNewTotals($actualPrices); + + /** + * Assert that specified prices are actual on order, invoice and refund pages. + * + * @param array $prices + * @param InjectableFixture $product + * @param OrderIndex $orderIndex + * @param OrderView $orderView + * @param OrderInvoiceNew $orderInvoiceNew + * @param OrderCreditMemoNew $orderCreditMemoNew + * @return void + */ + public function processAssert( + array $prices, + InjectableFixture $product, + OrderIndex $orderIndex, + OrderView $orderView, + OrderInvoiceNew $orderInvoiceNew, + OrderCreditMemoNew $orderCreditMemoNew + ) { + $this->orderView = $orderView; + $this->orderInvoiceNew = $orderInvoiceNew; + $this->orderCreditMemoNew = $orderCreditMemoNew; + $orderIndex->open(); + $orderIndex->getSalesOrderGrid()->openFirstRow(); + //Check prices on order page + $actualPrices = []; + $actualPrices = $this->getOrderPrices($actualPrices, $product); + $actualPrices = $this->getOrderTotals($actualPrices); + $prices = $this->preparePrices($prices); + $message = 'Prices on order view page should be equal to defined in dataset.'; + \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message); + $orderView->getPageActions()->invoice(); + //Check prices on invoice creation page + $actualPrices = []; + $actualPrices = $this->getInvoiceNewPrices($actualPrices, $product); + $actualPrices = $this->getInvoiceNewTotals($actualPrices); + $message = 'Prices on invoice new page should be equal to defined in dataset.'; + \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message); + $orderInvoiceNew->getTotalsBlock()->submit(); + //Check prices after invoice on order page + $actualPrices = []; + $actualPrices = $this->getOrderPrices($actualPrices, $product); + $actualPrices = $this->getOrderTotals($actualPrices); + $message = 'Prices on invoice page should be equal to defined in dataset.'; + \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message); + $orderView->getPageActions()->orderCreditMemo(); + //Check prices on credit memo creation page + $pricesCreditMemo = $this->preparePricesCreditMemo($prices); + $actualPrices = []; + $actualPrices = $this->getCreditMemoNewPrices($actualPrices, $product); + $actualPrices = $this->getCreditMemoNewTotals($actualPrices); + $message = 'Prices on credit memo new page should be equal to defined in dataset.'; + \PHPUnit_Framework_Assert::assertEquals($pricesCreditMemo, $actualPrices, $message); + $orderCreditMemoNew->getFormBlock()->submit(); + //Check prices after refund on order page + $actualPrices = []; + $actualPrices = $this->getOrderPrices($actualPrices, $product); + $actualPrices = $this->getOrderTotals($actualPrices); + $message = 'Prices on credit memo page should be equal to defined in dataset.'; + \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message); + } + + /** + * Unset category and product page expected prices. + * + * @param array $prices + * @return array + */ + protected function preparePrices($prices) + { + $deletePrices = [ + 'category_price_excl_tax', + 'category_price_incl_tax', + 'product_view_price_excl_tax', + 'product_view_price_incl_tax' + ]; + foreach ($deletePrices as $key) { + if (array_key_exists($key, $prices)) { + unset($prices[$key]); + } + } + + return $prices; + } + + /** + * Unset category and product page expected prices. + * + * @param array $prices + * @return array + */ + protected function preparePricesCreditMemo($prices) + { + $prices['shipping_excl_tax'] = null; + $prices['shipping_incl_tax'] = null; + return $prices; + } + + /** + * Get order product prices. + * + * @param InjectableFixture $product + * @param array $actualPrices + * @return array + */ + public function getOrderPrices($actualPrices, InjectableFixture $product) + { + $viewBlock = $this->orderView->getItemsOrderedBlock(); + $actualPrices['cart_item_price_excl_tax'] = $viewBlock->getItemPriceExclTax($product->getName()); + $actualPrices['cart_item_price_incl_tax'] = $viewBlock->getItemPriceInclTax($product->getName()); + $actualPrices['cart_item_subtotal_excl_tax'] = $viewBlock->getItemSubExclTax($product->getName()); + $actualPrices['cart_item_subtotal_incl_tax'] = $viewBlock->getItemSubInclTax($product->getName()); + return $actualPrices; + } + + /** + * Get invoice new product prices. + * + * @param InjectableFixture $product + * @param array $actualPrices + * @return array + */ + public function getInvoiceNewPrices($actualPrices, InjectableFixture $product) + { + $productBlock = $this->orderInvoiceNew->getFormBlock()->getItemsBlock()->getItemProductBlock($product); + $actualPrices['cart_item_price_excl_tax'] = $productBlock->getItemPriceExclTax(); + $actualPrices['cart_item_price_incl_tax'] = $productBlock->getItemPriceInclTax(); + $actualPrices['cart_item_subtotal_excl_tax'] = $productBlock->getItemSubExclTax(); + $actualPrices['cart_item_subtotal_incl_tax'] = $productBlock->getItemSubInclTax(); + return $actualPrices; + } + + /** + * Get Credit Memo new product prices. + * + * @param InjectableFixture $product + * @param array $actualPrices + * @return array + */ + public function getCreditMemoNewPrices($actualPrices, InjectableFixture $product) + { + $productBlock = $this->orderCreditMemoNew->getFormBlock()->getItemsBlock()->getItemProductBlock($product); + $actualPrices['cart_item_price_excl_tax'] = $productBlock->getItemPriceExclTax(); + $actualPrices['cart_item_price_incl_tax'] = $productBlock->getItemPriceInclTax(); + $actualPrices['cart_item_subtotal_excl_tax'] = $productBlock->getItemSubExclTax(); + $actualPrices['cart_item_subtotal_incl_tax'] = $productBlock->getItemSubInclTax(); + return $actualPrices; + } + + /** + * Text of price verification after order creation. + * + * @return string + */ + public function toString() + { + return 'Prices on backend after order creation is correct.'; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php new file mode 100644 index 0000000000000000000000000000000000000000..debc24c79bb650f9b08ff699c02f4c47d7880835 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php @@ -0,0 +1,174 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Tax\Test\Constraint; + +use Mtf\Constraint\AbstractConstraint; +use Magento\Checkout\Test\Page\CheckoutCart; +use Magento\Checkout\Test\Page\CheckoutOnepage; +use Magento\Checkout\Test\Page\CheckoutOnepageSuccess; +use Magento\Customer\Test\Fixture\CustomerInjectable; +use Magento\Sales\Test\Page\OrderView; +use Mtf\Fixture\InjectableFixture; + +/** + * Checks that prices excluding tax on order review and customer order pages are equal to specified in dataset. + */ +abstract class AbstractAssertTaxCalculationAfterCheckout extends AbstractConstraint +{ + /** + * Checkout page. + * + * @var CheckoutOnepage + */ + protected $checkoutOnepage; + + /** + * Order view page. + * + * @var OrderView + */ + protected $orderView; + + /** + * Constraint severeness. + * + * @var string + */ + protected $severeness = 'high'; + + /** + * Implementation for get order review total prices function + * + * @param array $actualPrices + * @return array + */ + abstract protected function getReviewTotals($actualPrices); + + /** + * Implementation for get order total prices from customer account function + * + * @param array $actualPrices + * @return array + */ + abstract protected function getOrderTotals($actualPrices); + + /** + * Assert that prices on order review and customer order pages are equal to specified in dataset. + * + * @param array $prices + * @param InjectableFixture $product + * @param CheckoutCart $checkoutCart + * @param CheckoutOnepage $checkoutOnepage + * @param CheckoutOnepageSuccess $checkoutOnepageSuccess + * @param OrderView $orderView + * @return void + */ + public function processAssert( + array $prices, + InjectableFixture $product, + CheckoutCart $checkoutCart, + CheckoutOnepage $checkoutOnepage, + CheckoutOnepageSuccess $checkoutOnepageSuccess, + OrderView $orderView + ) { + $this->checkoutOnepage = $checkoutOnepage; + $this->orderView = $orderView; + + $checkoutCart->getProceedToCheckoutBlock()->proceedToCheckout(); + $checkoutOnepage->getBillingBlock()->clickContinue(); + $shippingMethod = ['shipping_service' => 'Flat Rate', 'shipping_method' => 'Fixed']; + $checkoutOnepage->getShippingMethodBlock()->selectShippingMethod($shippingMethod); + $checkoutOnepage->getShippingMethodBlock()->clickContinue(); + $checkoutOnepage->getPaymentMethodsBlock()->selectPaymentMethod(['method' => 'check_money_order']); + $checkoutOnepage->getPaymentMethodsBlock()->clickContinue(); + $actualPrices = []; + $actualPrices = $this->getReviewPrices($actualPrices, $product); + $actualPrices = $this->getReviewTotals($actualPrices); + $prices = $this->preparePrices($prices); + //Order review prices verification + $message = 'Prices on order review should be equal to defined in dataset.'; + \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message); + + $checkoutOnepage->getReviewBlock()->placeOrder(); + $checkoutOnepageSuccess->getSuccessBlock()->getGuestOrderId(); + $checkoutOnepageSuccess->getSuccessBlock()->openOrder(); + $actualPrices = []; + $actualPrices = $this->getOrderPrices($actualPrices, $product); + $actualPrices = $this->getOrderTotals($actualPrices); + + //Frontend order prices verification + $message = 'Prices on order view page should be equal to defined in dataset.'; + \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message); + } + + /** + * Prepare expected prices prices. + * + * @param array $prices + * @return array $prices + */ + protected function preparePrices($prices) + { + if (isset($prices['category_price_excl_tax'])) { + unset($prices['category_price_excl_tax']); + } + if (isset($prices['category_price_incl_tax'])) { + unset($prices['category_price_incl_tax']); + } + if (isset($prices['product_view_price_excl_tax'])) { + unset($prices['product_view_price_excl_tax']); + } + if (isset($prices['product_view_price_incl_tax'])) { + unset($prices['product_view_price_incl_tax']); + } + return $prices; + } + + /** + * Get review product prices. + * + * @param InjectableFixture $product + * @param $actualPrices + * @return array + */ + public function getReviewPrices($actualPrices, InjectableFixture $product) + { + $reviewBlock = $this->checkoutOnepage->getReviewBlock(); + $actualPrices['cart_item_price_excl_tax'] = $reviewBlock->getItemPriceExclTax($product->getName()); + $actualPrices['cart_item_price_incl_tax'] = $reviewBlock->getItemPriceInclTax($product->getName()); + $actualPrices['cart_item_subtotal_excl_tax'] = $reviewBlock->getItemSubExclTax($product->getName()); + $actualPrices['cart_item_subtotal_incl_tax'] = $reviewBlock->getItemSubInclTax($product->getName()); + return $actualPrices; + } + + /** + * Get order product prices. + * + * @param InjectableFixture $product + * @param $actualPrices + * @return array + */ + public function getOrderPrices($actualPrices, InjectableFixture $product) + { + $viewBlock = $this->orderView->getOrderViewBlock(); + $actualPrices['cart_item_price_excl_tax'] = $viewBlock->getItemPriceExclTax($product->getName()); + $actualPrices['cart_item_price_incl_tax'] = $viewBlock->getItemPriceInclTax($product->getName()); + $actualPrices['cart_item_subtotal_excl_tax'] = $viewBlock->getItemSubExclTax($product->getName()); + $actualPrices['cart_item_subtotal_incl_tax'] = $viewBlock->getItemSubInclTax($product->getName()); + return $actualPrices; + } + + /** + * Text of price verification after order creation + * + * @return string + */ + public function toString() + { + return 'Prices on front after order creation is correct.'; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleIsAppliedToAllPrices.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPrices.php similarity index 55% rename from dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleIsAppliedToAllPrices.php rename to dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPrices.php index 55704a8de1ebecef5fd4906594e8b4b3b28ed0d1..558a37ed5ba7efae9c850e288e110957f4b7558a 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleIsAppliedToAllPrices.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPrices.php @@ -6,58 +6,86 @@ namespace Magento\Tax\Test\Constraint; -use Magento\Catalog\Test\Fixture\CatalogProductSimple; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Cms\Test\Page\CmsIndex; use Magento\Catalog\Test\Page\Category\CatalogCategoryView; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Checkout\Test\Page\CheckoutCart; -use Magento\Cms\Test\Page\CmsIndex; use Magento\Customer\Test\Fixture\AddressInjectable; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\InjectableFixture; /** - * Class AssertTaxRuleIsAppliedToAllPrice - * Checks that prices on category, product and cart pages are equal to specified in dataset + * Checks that prices excl tax on category, product and cart pages are equal to specified in dataset. */ -class AssertTaxRuleIsAppliedToAllPrices extends AbstractConstraint +abstract class AbstractAssertTaxRuleIsAppliedToAllPrices extends AbstractConstraint { - /* tags */ - const SEVERITY = 'high'; - /* end tags */ - /** - * Cms index page + * Cms index page. * * @var CmsIndex */ protected $cmsIndex; /** - * Catalog product page + * Catalog product page. * * @var catalogCategoryView */ protected $catalogCategoryView; /** - * Catalog product page + * Catalog product page. * * @var CatalogProductView */ protected $catalogProductView; /** - * Catalog product page + * Catalog product page. * * @var CheckoutCart */ protected $checkoutCart; /** - * Assert that specified prices are actual on category, product and cart pages + * Constraint severeness. * - * @param CatalogProductSimple $product + * @var string + */ + protected $severeness = 'high'; + + /** + * Implementation for get category prices function + * + * @param string $productName + * @param array $actualPrices + * @return array + */ + abstract protected function getCategoryPrices($productName, $actualPrices); + + /** + * Implementation for get product page prices function + * + * @param array $actualPrices + * @return array + */ + abstract protected function getProductPagePrices($actualPrices); + + /** + * Implementation for get totals in cart function + * + * @param array $actualPrices + * @return array + */ + abstract protected function getTotals($actualPrices); + + /** + * Assert that specified prices are actual on category, product and cart pages. + * + * @param InjectableFixture $product * @param array $prices + * @param int $qty * @param CmsIndex $cmsIndex * @param CatalogCategoryView $catalogCategoryView * @param CatalogProductView $catalogProductView @@ -66,8 +94,9 @@ class AssertTaxRuleIsAppliedToAllPrices extends AbstractConstraint * @return void */ public function processAssert( - CatalogProductSimple $product, + InjectableFixture $product, array $prices, + $qty, CmsIndex $cmsIndex, CatalogCategoryView $catalogCategoryView, CatalogProductView $catalogProductView, @@ -81,98 +110,60 @@ class AssertTaxRuleIsAppliedToAllPrices extends AbstractConstraint //Preconditions $address = $fixtureFactory->createByCode('addressInjectable', ['dataSet' => 'US_address_NY']); $shipping = ['carrier' => 'Flat Rate', 'method' => 'Fixed']; - + $actualPrices = []; //Assertion steps $productName = $product->getName(); - $this->openCategory($product); - $actualPrices = []; + $productCategory = $product->getCategoryIds()[0]; + $this->openCategory($productCategory); $actualPrices = $this->getCategoryPrices($productName, $actualPrices); $catalogCategoryView->getListProductBlock()->openProductViewPage($productName); + $catalogProductView->getViewBlock()->fillOptions($product); $actualPrices = $this->getProductPagePrices($actualPrices); - $catalogProductView->getViewBlock()->setQtyAndClickAddToCart(3); - $actualPrices = $this->getCartPrices($product, $actualPrices); + $catalogProductView->getViewBlock()->setQtyAndClickAddToCart($qty); $this->fillEstimateBlock($address, $shipping); + $actualPrices = $this->getCartPrices($product, $actualPrices); $actualPrices = $this->getTotals($actualPrices); - //Prices verification - \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, 'Arrays should be equal'); + $message = 'Prices from dataset should be equal to prices on frontend.'; + \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message); } /** - * Open product category + * Open product category. * - * @param CatalogProductSimple $product + * @param string $productCategory * @return void */ - public function openCategory(CatalogProductSimple $product) + public function openCategory($productCategory) { $this->cmsIndex->open(); - $this->cmsIndex->getTopmenu()->selectCategoryByName($product->getCategoryIds()[0]); - } - - /** - * Get prices on category page - * - * @param $productName - * @param array $actualPrices - * @return array - */ - public function getCategoryPrices($productName, $actualPrices) - { - $actualPrices['category_price_excl_tax'] = - $this->catalogCategoryView - ->getListProductBlock() - ->getProductPriceBlock($productName) - ->getPriceExcludingTax(); - $actualPrices['category_price_incl_tax'] = - $this->catalogCategoryView - ->getListProductBlock() - ->getProductPriceBlock($productName) - ->getPriceIncludingTax(); - return $actualPrices; + $this->cmsIndex->getTopmenu()->selectCategoryByName($productCategory); } - /** - * Get product view prices - * - * @param $actualPrices - * @return array - */ - public function getProductPagePrices($actualPrices) - { - $actualPrices['product_view_price_excl_tax'] = - $this->catalogProductView - ->getViewBlock() - ->getProductPriceExcludingTax(); - $actualPrices['product_view_price_incl_tax'] = - $this->catalogProductView - ->getViewBlock() - ->getProductPriceIncludingTax(); - return $actualPrices; - } /** - * Get cart prices + * Get cart prices. * - * @param CatalogProductSimple $product + * @param InjectableFixture $product * @param $actualPrices * @return array */ - public function getCartPrices(CatalogProductSimple $product, $actualPrices) + public function getCartPrices(InjectableFixture $product, $actualPrices) { - $actualPrices['cart_item_subtotal_excl_tax'] = - $this->checkoutCart->getCartBlock()->getCartItem($product)->getSubtotalPrice(); - $actualPrices['cart_item_subtotal_incl_tax'] = - $this->checkoutCart->getCartBlock()->getCartItem($product)->getSubtotalPriceInclTax(); $actualPrices['cart_item_price_excl_tax'] = $this->checkoutCart->getCartBlock()->getCartItem($product)->getPrice(); $actualPrices['cart_item_price_incl_tax'] = $this->checkoutCart->getCartBlock()->getCartItem($product)->getPriceInclTax(); + $actualPrices['cart_item_subtotal_excl_tax'] = + $this->checkoutCart->getCartBlock()->getCartItem($product)->getSubtotalPrice(); + $actualPrices['cart_item_subtotal_incl_tax'] = + $this->checkoutCart->getCartBlock()->getCartItem($product)->getSubtotalPriceInclTax(); + return $actualPrices; } /** - * Fill estimate block + * Fill estimate block. * * @param AddressInjectable $address * @param array $shipping @@ -184,27 +175,6 @@ class AssertTaxRuleIsAppliedToAllPrices extends AbstractConstraint $this->checkoutCart->getShippingBlock()->selectShippingMethod($shipping); } - /** - * Get totals - * - * @param $actualPrices - * @return array - */ - public function getTotals($actualPrices) - { - $actualPrices['subtotal_excl_tax'] = $this->checkoutCart->getTotalsBlock()->getSubtotalExcludingTax(); - $actualPrices['subtotal_incl_tax'] = $this->checkoutCart->getTotalsBlock()->getSubtotalIncludingTax(); - $actualPrices['discount'] = $this->checkoutCart->getTotalsBlock()->getDiscount(); - $actualPrices['shipping_excl_tax'] = $this->checkoutCart->getTotalsBlock()->getShippingPrice(); - $actualPrices['shipping_incl_tax'] = $this->checkoutCart->getTotalsBlock()->getShippingPriceInclTax(); - $actualPrices['tax'] = $this->checkoutCart->getTotalsBlock()->getTax(); - $actualPrices['grand_total_excl_tax'] = - $this->checkoutCart->getTotalsBlock()->getGrandTotalExcludingTax(); - $actualPrices['grand_total_incl_tax'] = - $this->checkoutCart->getTotalsBlock()->getGrandTotalIncludingTax(); - return $actualPrices; - } - /** * Text of Tax Rule is applied * @@ -212,6 +182,6 @@ class AssertTaxRuleIsAppliedToAllPrices extends AbstractConstraint */ public function toString() { - return 'Prices on front is correct'; + return 'Prices on front is correct.'; } } diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxWithCrossBorderApplying.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxWithCrossBorderApplying.php index 03aeedefc594d176eba9a4a767dfb3326dfd1b70..b249079cbac7799d5bf815a874eccd53691cbd1e 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxWithCrossBorderApplying.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxWithCrossBorderApplying.php @@ -11,7 +11,7 @@ use Magento\Catalog\Test\Page\Category\CatalogCategoryView; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Checkout\Test\Page\CheckoutCart; use Magento\Cms\Test\Page\CmsIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AbstractAssertTaxWithCrossBorderApplying @@ -167,7 +167,7 @@ abstract class AbstractAssertTaxWithCrossBorderApplying extends AbstractConstrai $actualPrices['cart_item_subtotal_incl_tax'] = $this->checkoutCart->getCartBlock()->getCartItem($product)->getSubtotalPriceInclTax(); $actualPrices['grand_total'] = - $this->checkoutCart->getTotalsBlock()->getGrandTotal(); + $this->checkoutCart->getTotalsBlock()->getGrandTotalIncludingTax(); return $actualPrices; } diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertOrderTaxOnBackendExcludingIncludingTax.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertOrderTaxOnBackendExcludingIncludingTax.php new file mode 100644 index 0000000000000000000000000000000000000000..1851caffdb0c7b1138beacc2731ac48463e8f4e3 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertOrderTaxOnBackendExcludingIncludingTax.php @@ -0,0 +1,90 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Tax\Test\Constraint; + +/** + * Checks that prices displayed excluding and including tax in order are correct on backend. + */ +class AssertOrderTaxOnBackendExcludingIncludingTax extends AbstractAssertOrderTaxOnBackend +{ + /** + * Constraint severeness. + * + * @var string + */ + protected $severeness = 'high'; + + /** + * Get order totals. + * + * @param array $actualPrices + * @return array + */ + public function getOrderTotals($actualPrices) + { + $viewBlock = $this->orderView->getOrderTotalsBlock(); + $actualPrices['subtotal_excl_tax'] = $viewBlock->getSubtotalExclTax(); + $actualPrices['subtotal_incl_tax'] = $viewBlock->getSubtotalInclTax(); + + $actualPrices['discount'] = $viewBlock->getDiscount(); + + $actualPrices['shipping_excl_tax'] = $viewBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $viewBlock->getShippingInclTax(); + $actualPrices['tax'] = $viewBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $viewBlock->getGrandTotalExclTax(); + $actualPrices['grand_total_incl_tax'] = $viewBlock->getGrandTotalInclTax(); + + return $actualPrices; + } + + /** + * Get invoice new totals. + * + * @param array $actualPrices + * @return array + */ + public function getInvoiceNewTotals($actualPrices) + { + $totalsBlock = $this->orderInvoiceNew->getTotalsBlock(); + $actualPrices['subtotal_excl_tax'] = $totalsBlock->getSubtotalExclTax(); + $actualPrices['subtotal_incl_tax'] = $totalsBlock->getSubtotalInclTax(); + + $actualPrices['discount'] = $totalsBlock->getDiscount(); + + $actualPrices['shipping_excl_tax'] = $totalsBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $totalsBlock->getShippingInclTax(); + $actualPrices['tax'] = $totalsBlock->getTax(); + + $actualPrices['grand_total_excl_tax'] = $totalsBlock->getGrandTotalExclTax(); + $actualPrices['grand_total_incl_tax'] = $totalsBlock->getGrandTotalInclTax(); + + return $actualPrices; + } + + /** + * Get Credit Memo new totals. + * + * @param array $actualPrices + * @return array + */ + public function getCreditMemoNewTotals($actualPrices) + { + $totalsBlock = $this->orderCreditMemoNew->getTotalsBlock(); + $actualPrices['subtotal_excl_tax'] = $totalsBlock->getSubtotalExclTax(); + $actualPrices['subtotal_incl_tax'] = $totalsBlock->getSubtotalInclTax(); + + $actualPrices['discount'] = $totalsBlock->getDiscount(); + + $actualPrices['shipping_excl_tax'] = $totalsBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $totalsBlock->getShippingInclTax(); + $actualPrices['tax'] = $totalsBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $totalsBlock->getGrandTotalExclTax(); + $actualPrices['grand_total_incl_tax'] = $totalsBlock->getGrandTotalInclTax(); + + return $actualPrices; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertOrderTaxOnBackendExcludingTax.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertOrderTaxOnBackendExcludingTax.php new file mode 100644 index 0000000000000000000000000000000000000000..9b0c4846f271151fd7fbee879f6ad00f7041341a --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertOrderTaxOnBackendExcludingTax.php @@ -0,0 +1,92 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Tax\Test\Constraint; + +/** + * Checks that prices including tax in order are correct on backend. + */ +class AssertOrderTaxOnBackendExcludingTax extends AbstractAssertOrderTaxOnBackend +{ + /** + * Constraint severeness. + * + * @var string + */ + protected $severeness = 'high'; + + + /** + * Get order totals. + * + * @param $actualPrices + * @return array + */ + public function getOrderTotals($actualPrices) + { + $viewBlock = $this->orderView->getOrderTotalsBlock(); + $actualPrices['subtotal_excl_tax'] = $viewBlock->getSubtotal(); + $actualPrices['subtotal_incl_tax'] = null; + + $actualPrices['discount'] = $viewBlock->getDiscount(); + + $actualPrices['shipping_excl_tax'] = $viewBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $viewBlock->getShippingInclTax(); + $actualPrices['tax'] = $viewBlock->getTax(); + + $actualPrices['grand_total_excl_tax'] = $viewBlock->getGrandTotal(); + $actualPrices['grand_total_incl_tax'] = null; + return $actualPrices; + } + + /** + * Get invoice new totals. + * + * @param $actualPrices + * @return array + */ + public function getInvoiceNewTotals($actualPrices) + { + $totalsBlock = $this->orderInvoiceNew->getTotalsBlock(); + $actualPrices['subtotal_excl_tax'] = $totalsBlock->getSubtotal(); + $actualPrices['subtotal_incl_tax'] = null; + + $actualPrices['discount'] = $totalsBlock->getDiscount(); + + $actualPrices['shipping_excl_tax'] = $totalsBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $totalsBlock->getShippingInclTax(); + $actualPrices['tax'] = $totalsBlock->getTax(); + + $actualPrices['grand_total_excl_tax'] = $totalsBlock->getGrandTotal(); + $actualPrices['grand_total_incl_tax'] = null; + + return $actualPrices; + } + + /** + * Get Credit Memo new totals. + * + * @param $actualPrices + * @return array + */ + public function getCreditMemoNewTotals($actualPrices) + { + $totalsBlock = $this->orderCreditMemoNew->getTotalsBlock(); + $actualPrices['subtotal_excl_tax'] = $totalsBlock->getSubtotal(); + $actualPrices['subtotal_incl_tax'] = null; + + $actualPrices['discount'] = $totalsBlock->getDiscount(); + + $actualPrices['shipping_excl_tax'] = $totalsBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $totalsBlock->getShippingInclTax(); + $actualPrices['tax'] = $totalsBlock->getTax(); + + $actualPrices['grand_total_excl_tax'] = $totalsBlock->getGrandTotal(); + $actualPrices['grand_total_incl_tax'] = null; + + return $actualPrices; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertOrderTaxOnBackendIncludingTax.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertOrderTaxOnBackendIncludingTax.php new file mode 100644 index 0000000000000000000000000000000000000000..8843f04669a884132ff8e07a6c6ca98913ef57cd --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertOrderTaxOnBackendIncludingTax.php @@ -0,0 +1,90 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Tax\Test\Constraint; + +/** + * Checks that prices including tax in order are correct on backend. + */ +class AssertOrderTaxOnBackendIncludingTax extends AbstractAssertOrderTaxOnBackend +{ + /** + * Constraint severeness. + * + * @var string + */ + protected $severeness = 'high'; + + /** + * Get order totals. + * + * @param $actualPrices + * @return array + */ + public function getOrderTotals($actualPrices) + { + $viewBlock = $this->orderView->getOrderTotalsBlock(); + $actualPrices['subtotal_excl_tax'] = null; + $actualPrices['subtotal_incl_tax'] = $viewBlock->getSubtotal(); + + $actualPrices['discount'] = $viewBlock->getDiscount(); + + $actualPrices['shipping_excl_tax'] = $viewBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $viewBlock->getShippingInclTax(); + $actualPrices['tax'] = $viewBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $viewBlock->getGrandTotalExclTax(); + $actualPrices['grand_total_incl_tax'] = $viewBlock->getGrandTotalInclTax(); + + return $actualPrices; + } + + /** + * Get invoice new totals. + * + * @param $actualPrices + * @return array + */ + public function getInvoiceNewTotals($actualPrices) + { + $totalsBlock = $this->orderInvoiceNew->getTotalsBlock(); + $actualPrices['subtotal_excl_tax'] = null; + $actualPrices['subtotal_incl_tax'] = $totalsBlock->getSubtotal(); + + $actualPrices['discount'] = $totalsBlock->getDiscount(); + + $actualPrices['shipping_excl_tax'] = $totalsBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $totalsBlock->getShippingInclTax(); + $actualPrices['tax'] = $totalsBlock->getTax(); + + $actualPrices['grand_total_excl_tax'] = $totalsBlock->getGrandTotalExclTax(); + $actualPrices['grand_total_incl_tax'] = $totalsBlock->getGrandTotalInclTax(); + + return $actualPrices; + } + + /** + * Get Credit Memo new totals. + * + * @param $actualPrices + * @return array + */ + public function getCreditMemoNewTotals($actualPrices) + { + $totalsBlock = $this->orderCreditMemoNew->getTotalsBlock(); + $actualPrices['subtotal_excl_tax'] = null; + $actualPrices['subtotal_incl_tax'] = $totalsBlock->getSubtotal(); + + $actualPrices['discount'] = $totalsBlock->getDiscount(); + + $actualPrices['shipping_excl_tax'] = $totalsBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $totalsBlock->getShippingInclTax(); + $actualPrices['tax'] = $totalsBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $totalsBlock->getGrandTotalExclTax(); + $actualPrices['grand_total_incl_tax'] = $totalsBlock->getGrandTotalInclTax(); + + return $actualPrices; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxCalculationAfterCheckoutExcludingIncludingTax.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxCalculationAfterCheckoutExcludingIncludingTax.php new file mode 100644 index 0000000000000000000000000000000000000000..7d65c80e0aee4df44aab43c081850d101835e957 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxCalculationAfterCheckoutExcludingIncludingTax.php @@ -0,0 +1,63 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Tax\Test\Constraint; + +/** + * Checks that prices excl and incl tax on order review and customer order pages are equal to specified in dataset. + */ +class AssertTaxCalculationAfterCheckoutExcludingIncludingTax extends + AbstractAssertTaxCalculationAfterCheckout +{ + /** + * Constraint severeness. + * + * @var string + */ + protected $severeness = 'high'; + + /** + * Get review totals. + * + * @param $actualPrices + * @return array + */ + public function getReviewTotals($actualPrices) + { + $reviewBlock = $this->checkoutOnepage->getReviewBlock(); + $actualPrices['subtotal_excl_tax'] = $reviewBlock->getSubtotalExclTax(); + $actualPrices['subtotal_incl_tax'] = $reviewBlock->getSubtotalInclTax(); + $actualPrices['discount'] = $reviewBlock->getDiscount(); + $actualPrices['shipping_excl_tax'] = $reviewBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $reviewBlock->getShippingInclTax(); + $actualPrices['tax'] = $reviewBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $reviewBlock->getGrandTotalExclTax(); + $actualPrices['grand_total_incl_tax'] = $reviewBlock->getGrandTotalInclTax(); + + return $actualPrices; + } + + /** + * Get order totals. + * + * @param $actualPrices + * @return array + */ + public function getOrderTotals($actualPrices) + { + $viewBlock = $this->orderView->getOrderViewBlock(); + $actualPrices['subtotal_excl_tax'] = $viewBlock->getSubtotalExclTax(); + $actualPrices['subtotal_incl_tax'] = $viewBlock->getSubtotalInclTax(); + $actualPrices['discount'] = $viewBlock->getDiscount(); + $actualPrices['shipping_excl_tax'] = $viewBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $viewBlock->getShippingInclTax(); + $actualPrices['tax'] = $viewBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $viewBlock->getGrandTotal(); + $actualPrices['grand_total_incl_tax'] = $viewBlock->getGrandTotalInclTax(); + + return $actualPrices; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxCalculationAfterCheckoutExcludingTax.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxCalculationAfterCheckoutExcludingTax.php new file mode 100644 index 0000000000000000000000000000000000000000..eecf9cc8c87400dbda9a83ab463e462a920ba97f --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxCalculationAfterCheckoutExcludingTax.php @@ -0,0 +1,62 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Tax\Test\Constraint; + +/** + * Checks that prices including tax on order review and customer order pages are equal to specified in dataset. + */ +class AssertTaxCalculationAfterCheckoutExcludingTax extends AbstractAssertTaxCalculationAfterCheckout +{ + /** + * Constraint severeness. + * + * @var string + */ + protected $severeness = 'high'; + + /** + * Get review totals. + * + * @param $actualPrices + * @return array + */ + public function getReviewTotals($actualPrices) + { + $reviewBlock = $this->checkoutOnepage->getReviewBlock(); + $actualPrices['subtotal_excl_tax'] = $reviewBlock->getSubtotal(); + $actualPrices['subtotal_incl_tax'] = null; + $actualPrices['discount'] = $reviewBlock->getDiscount(); + $actualPrices['shipping_excl_tax'] = $reviewBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $reviewBlock->getShippingInclTax(); + $actualPrices['tax'] = $reviewBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $reviewBlock->getGrandTotal(); + $actualPrices['grand_total_incl_tax'] = null; + + return $actualPrices; + } + + /** + * Get order totals. + * + * @param $actualPrices + * @return array + */ + public function getOrderTotals($actualPrices) + { + $viewBlock = $this->orderView->getOrderViewBlock(); + $actualPrices['subtotal_excl_tax'] = $viewBlock->getSubtotal(); + $actualPrices['subtotal_incl_tax'] = null; + + $actualPrices['discount'] = $viewBlock->getDiscount(); + $actualPrices['shipping_excl_tax'] = $viewBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $viewBlock->getShippingInclTax(); + $actualPrices['tax'] = $viewBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $viewBlock->getGrandTotal(); + $actualPrices['grand_total_incl_tax'] = null; + + return $actualPrices; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxCalculationAfterCheckoutIncludingTax.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxCalculationAfterCheckoutIncludingTax.php new file mode 100644 index 0000000000000000000000000000000000000000..59869e99eaa92097d16a93000285df72072d4010 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxCalculationAfterCheckoutIncludingTax.php @@ -0,0 +1,62 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Tax\Test\Constraint; + +/** + * Checks that prices including tax on order review and customer order pages are equal to specified in dataset. + */ +class AssertTaxCalculationAfterCheckoutIncludingTax extends AbstractAssertTaxCalculationAfterCheckout +{ + /** + * Constraint severeness. + * + * @var string + */ + protected $severeness = 'high'; + + /** + * Get review totals. + * + * @param $actualPrices + * @return array + */ + public function getReviewTotals($actualPrices) + { + $reviewBlock = $this->checkoutOnepage->getReviewBlock(); + $actualPrices['subtotal_excl_tax'] = null; + $actualPrices['subtotal_incl_tax'] = $reviewBlock->getSubtotal(); + $actualPrices['discount'] = $reviewBlock->getDiscount(); + $actualPrices['shipping_excl_tax'] = $reviewBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $reviewBlock->getShippingInclTax(); + $actualPrices['tax'] = $reviewBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $reviewBlock->getGrandTotalExclTax(); + $actualPrices['grand_total_incl_tax'] = $reviewBlock->getGrandTotalInclTax(); + + return $actualPrices; + } + + /** + * Get order totals. + * + * @param $actualPrices + * @return array + */ + public function getOrderTotals($actualPrices) + { + $viewBlock = $this->orderView->getOrderViewBlock(); + $actualPrices['subtotal_excl_tax'] = null; + $actualPrices['subtotal_incl_tax'] = $viewBlock->getSubtotal(); + $actualPrices['discount'] = $viewBlock->getDiscount(); + $actualPrices['shipping_excl_tax'] = $viewBlock->getShippingExclTax(); + $actualPrices['shipping_incl_tax'] = $viewBlock->getShippingInclTax(); + $actualPrices['tax'] = $viewBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $viewBlock->getGrandTotal(); + $actualPrices['grand_total_incl_tax'] = $viewBlock->getGrandTotalInclTax(); + + return $actualPrices; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateForm.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateForm.php index b2cc6ea218b1438aefce9170af80434964f44f6b..9be4aa155fab35d0ddd6a6c8dcb7e75a22358547 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateForm.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateForm.php @@ -9,7 +9,7 @@ namespace Magento\Tax\Test\Constraint; use Magento\Tax\Test\Fixture\TaxRate; use Magento\Tax\Test\Page\Adminhtml\TaxRateIndex; use Magento\Tax\Test\Page\Adminhtml\TaxRateNew; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertTaxRateForm diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateInGrid.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateInGrid.php index ab8fb7c249a9f0f78da2daefb2eac4b2a53eba47..b29f483f1ed231e9de98e9e452d0bfff0a5383eb 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Tax\Test\Constraint; use Magento\Tax\Test\Fixture\TaxRate; use Magento\Tax\Test\Page\Adminhtml\TaxRateIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertTaxRateInGrid diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateInTaxRule.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateInTaxRule.php index 68698ac0e0ef9a532ff6c0a8ed11d5c918c6a8ac..c7e8b1e65fbededdd60870c5ee14e7c518cf15d9 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateInTaxRule.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateInTaxRule.php @@ -6,7 +6,7 @@ namespace Magento\Tax\Test\Constraint; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertTaxRateInTaxRule diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateIsInCorrectRange.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateIsInCorrectRange.php index 1dee8e8332681b94b2f7df971a2f080e6fba66af..e8b8e96f9c19dc762a8c0db8fcbedf06fcd735d0 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateIsInCorrectRange.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateIsInCorrectRange.php @@ -6,7 +6,7 @@ namespace Magento\Tax\Test\Constraint; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertTaxRateIsInCorrectRange diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateNotInGrid.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateNotInGrid.php index 6e2b75e92dbfb33ae3322a28f17cd16d5e9611b1..27269fc071aaaafb465e2b344c4e9beab5d03cde 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Tax\Test\Constraint; use Magento\Tax\Test\Fixture\TaxRate; use Magento\Tax\Test\Page\Adminhtml\TaxRateIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertTaxRateNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateNotInTaxRule.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateNotInTaxRule.php index cec93f5e32d9e4a4096f8bad14507027b4f22c47..40a294d79d3b56334fd4451a5629900e4d7ea311 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateNotInTaxRule.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateNotInTaxRule.php @@ -8,7 +8,7 @@ namespace Magento\Tax\Test\Constraint; use Magento\Tax\Test\Fixture\TaxRate; use Magento\Tax\Test\Page\Adminhtml\TaxRuleNew; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertTaxRateNotInTaxRule diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateSuccessDeleteMessage.php index e986b9afc8ad05af30077033c69c38f9059585e2..5a2eeb5608e584a46bf72de31a52ef324e27cd22 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateSuccessDeleteMessage.php @@ -7,7 +7,7 @@ namespace Magento\Tax\Test\Constraint; use Magento\Tax\Test\Page\Adminhtml\TaxRateIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertTaxRateSuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateSuccessSaveMessage.php index c463dd61c071cc90b43368cd6755d05bf24562e7..daa156986bba7643d156b9cbfc9bf4fe63a2c330 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRateSuccessSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\Tax\Test\Constraint; use Magento\Tax\Test\Page\Adminhtml\TaxRateIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertTaxRateSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleApplying.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleApplying.php index 489029400eb8a379b97eeb42ce89974c25b94694..d8000e08d4a2b56392b8efa868b7289dc02ed230 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleApplying.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleApplying.php @@ -14,9 +14,9 @@ use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\CustomerAccountLogin; use Magento\Customer\Test\Page\CustomerAccountLogout; use Magento\Tax\Test\Fixture\TaxRule; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureFactory; /** * Class AssertTaxRuleApplying @@ -89,7 +89,7 @@ abstract class AssertTaxRuleApplying extends AbstractConstraint * @param CheckoutCart $checkoutCart * @param AddressInjectable $address * @param array $shipping - * @param Browser $browser + * @param BrowserInterface $browser * @param TaxRule $initialTaxRule * @return void * @@ -105,7 +105,7 @@ abstract class AssertTaxRuleApplying extends AbstractConstraint CheckoutCart $checkoutCart, AddressInjectable $address, array $shipping, - Browser $browser, + BrowserInterface $browser, TaxRule $initialTaxRule = null ) { $this->initialTaxRule = $initialTaxRule; diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleForm.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleForm.php index 06364e1cad8d9bd02174de21b7fb5db6dd2973ad..2ec54cbe497a1655d6552569a941c1a1426720ed 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleForm.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleForm.php @@ -9,7 +9,7 @@ namespace Magento\Tax\Test\Constraint; use Magento\Tax\Test\Fixture\TaxRule; use Magento\Tax\Test\Page\Adminhtml\TaxRuleIndex; use Magento\Tax\Test\Page\Adminhtml\TaxRuleNew; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertTaxRuleForm diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleInGrid.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleInGrid.php index 257db7b916a41f314899fa099b7dadd4a10c61e8..fea8557379275bbd4be59814a6f99abbf4b7a2f7 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Tax\Test\Constraint; use Magento\Tax\Test\Fixture\TaxRule; use Magento\Tax\Test\Page\Adminhtml\TaxRuleIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertTaxRuleInGrid diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesExcludingIncludingTax.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesExcludingIncludingTax.php new file mode 100644 index 0000000000000000000000000000000000000000..b685b18e9608d4e40c42ed24f802d3cb4380892f --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesExcludingIncludingTax.php @@ -0,0 +1,75 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Tax\Test\Constraint; + +use Magento\Catalog\Test\Fixture\CatalogProductSimple; + +/** + * Checks that prices excl and incl tax on category, product and cart pages are equal to specified in dataset + */ +class AssertTaxRuleIsAppliedToAllPricesExcludingIncludingTax extends + AbstractAssertTaxRuleIsAppliedToAllPrices +{ + /** + * Constraint severeness. + * + * @var string + */ + protected $severeness = 'high'; + + /** + * Get prices on category page. + * + * @param $productName + * @param array $actualPrices + * @return array + */ + public function getCategoryPrices($productName, $actualPrices) + { + $priceBlock = $this->catalogCategoryView->getListProductBlock()->getProductPriceBlock($productName); + $actualPrices['category_price_excl_tax'] = $priceBlock->getPriceExcludingTax(); + $actualPrices['category_price_incl_tax'] = $priceBlock->getPriceIncludingTax(); + + return $actualPrices; + } + + /** + * Get product view prices. + * + * @param array $actualPrices + * @return array + */ + public function getProductPagePrices($actualPrices) + { + $viewBlock = $this->catalogProductView->getViewBlock(); + $actualPrices['product_view_price_excl_tax'] = $viewBlock->getProductPriceExcludingTax(); + $actualPrices['product_view_price_incl_tax'] = $viewBlock->getProductPriceIncludingTax(); + + return $actualPrices; + } + + /** + * Get totals. + * + * @param $actualPrices + * @return array + */ + public function getTotals($actualPrices) + { + $totalsBlock = $this->checkoutCart->getTotalsBlock(); + $actualPrices['subtotal_excl_tax'] = $totalsBlock->getSubtotalExcludingTax(); + $actualPrices['subtotal_incl_tax'] = $totalsBlock->getSubtotalIncludingTax(); + $actualPrices['discount'] = $totalsBlock->getDiscount(); + $actualPrices['shipping_excl_tax'] = $totalsBlock->getShippingPrice(); + $actualPrices['shipping_incl_tax'] = $totalsBlock->getShippingPriceInclTax(); + $actualPrices['tax'] = $totalsBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $totalsBlock->getGrandTotalExcludingTax(); + $actualPrices['grand_total_incl_tax'] = $totalsBlock->getGrandTotalIncludingTax(); + + return $actualPrices; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesExcludingTax.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesExcludingTax.php new file mode 100644 index 0000000000000000000000000000000000000000..8088fe6e3da3a3154c6ed54a015258b5682e0c29 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesExcludingTax.php @@ -0,0 +1,74 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Tax\Test\Constraint; + +use Magento\Catalog\Test\Fixture\CatalogProductSimple; + +/** + * Checks that prices incl tax on category, product and cart pages are equal to specified in dataset. + */ +class AssertTaxRuleIsAppliedToAllPricesExcludingTax extends AbstractAssertTaxRuleIsAppliedToAllPrices +{ + /** + * Constraint severeness. + * + * @var string + */ + protected $severeness = 'high'; + + /** + * Get prices on category page. + * + * @param $productName + * @param array $actualPrices + * @return array + */ + public function getCategoryPrices($productName, $actualPrices) + { + $priceBlock = $this->catalogCategoryView->getListProductBlock()->getProductPriceBlock($productName); + $actualPrices['category_price_excl_tax'] = $priceBlock->getEffectivePrice(); + $actualPrices['category_price_incl_tax'] = null; + + return $actualPrices; + } + + /** + * Get product view prices. + * + * @param array $actualPrices + * @return array + */ + public function getProductPagePrices($actualPrices) + { + $viewBlock = $this->catalogProductView->getViewBlock(); + $actualPrices['product_view_price_excl_tax'] = $viewBlock->getPriceBlock()->getEffectivePrice(); + $actualPrices['product_view_price_incl_tax'] = null; + + return $actualPrices; + } + + /** + * Get totals. + * + * @param $actualPrices + * @return array + */ + public function getTotals($actualPrices) + { + $totalsBlock = $this->checkoutCart->getTotalsBlock(); + $actualPrices['subtotal_excl_tax'] = $totalsBlock->getSubtotal(); + $actualPrices['subtotal_incl_tax'] = null; + $actualPrices['discount'] = $totalsBlock->getDiscount(); + $actualPrices['shipping_excl_tax'] = $totalsBlock->getShippingPrice(); + $actualPrices['shipping_incl_tax'] = $totalsBlock->getShippingPriceInclTax(); + $actualPrices['tax'] = $totalsBlock->getTax(); + $actualPrices['grand_total_excl_tax'] = $totalsBlock->getGrandTotal(); + $actualPrices['grand_total_incl_tax'] = null; + + return $actualPrices; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesIncludingTax.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesIncludingTax.php new file mode 100644 index 0000000000000000000000000000000000000000..9e7fbe7ef376fa91c137f71c50632362fee00993 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesIncludingTax.php @@ -0,0 +1,74 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Tax\Test\Constraint; + +use Magento\Catalog\Test\Fixture\CatalogProductSimple; + +/** + * Checks that prices incl tax on category, product and cart pages are equal to specified in dataset. + */ +class AssertTaxRuleIsAppliedToAllPricesIncludingTax extends AbstractAssertTaxRuleIsAppliedToAllPrices +{ + /** + * Constraint severeness. + * + * @var string + */ + protected $severeness = 'high'; + + /** + * Get prices on category page. + * + * @param $productName + * @param array $actualPrices + * @return array + */ + public function getCategoryPrices($productName, $actualPrices) + { + $priceBlock = $this->catalogCategoryView->getListProductBlock()->getProductPriceBlock($productName); + $actualPrices['category_price_excl_tax'] = null; + $actualPrices['category_price_incl_tax'] = $priceBlock->getEffectivePrice(); + + return $actualPrices; + } + + /** + * Get product view prices. + * + * @param array $actualPrices + * @return array + */ + public function getProductPagePrices($actualPrices) + { + $viewBlock = $this->catalogProductView->getViewBlock(); + $actualPrices['product_view_price_excl_tax'] = null; + $actualPrices['product_view_price_incl_tax'] = $viewBlock->getPriceBlock()->getEffectivePrice(); + + return $actualPrices; + } + + /** + * Get totals. + * + * @param $actualPrices + * @return array + */ + public function getTotals($actualPrices) + { + $totalsBlock = $this->checkoutCart->getTotalsBlock(); + $actualPrices['subtotal_excl_tax'] = null; + $actualPrices['subtotal_incl_tax'] = $totalsBlock->getSubtotal(); + $actualPrices['discount'] = $totalsBlock->getDiscount(); + $actualPrices['shipping_excl_tax'] = $totalsBlock->getShippingPrice(); + $actualPrices['shipping_incl_tax'] = $totalsBlock->getShippingPriceInclTax(); + $actualPrices['tax'] = $totalsBlock->getTax(); + $actualPrices['subtotal_excl_tax'] = $totalsBlock->getSubtotalExcludingTax(); + $actualPrices['subtotal_incl_tax'] = $totalsBlock->getSubtotalIncludingTax(); + + return $actualPrices; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleNotInGrid.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleNotInGrid.php index b7cb74fc33b2a26c9c69658dc54fcbf8618e9a0b..0d5d85d1bcc7656178bc26fbeb66e5b3ce39c742 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\Tax\Test\Constraint; use Magento\Tax\Test\Fixture\TaxRule; use Magento\Tax\Test\Page\Adminhtml\TaxRuleIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertTaxRuleNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleSuccessDeleteMessage.php index 590f9a435e074517af2c931c0a9fb213c4be693d..6649a25316ed9a7ae5e2f4e2c315a66a1fa5059d 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleSuccessDeleteMessage.php @@ -7,7 +7,7 @@ namespace Magento\Tax\Test\Constraint; use Magento\Tax\Test\Page\Adminhtml\TaxRuleIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertTaxRuleSuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleSuccessSaveMessage.php index 9dec5c65b37ca3a3a03821ac2bff3c4e1bf84933..1507e373dc21f00f56ebf5db4dbbc5b923237fc0 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleSuccessSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\Tax\Test\Constraint; use Magento\Tax\Test\Page\Adminhtml\TaxRuleIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertSuccessSavedMessageTaxRule diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxClass.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxClass.php index 8f161b790ab2538ddbcc5bb261e1ca5921c2a0ac..1c81488b1fccac907d551f996604d5ea03065bb0 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxClass.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxClass.php @@ -6,7 +6,7 @@ namespace Magento\Tax\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class TaxClass diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRate.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRate.php index e61fc1352cfdf314869fc27a0096f9be089038bc..daea91ae3039607aa3668ad3ccf965c97bee7277 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRate.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRate.php @@ -6,7 +6,7 @@ namespace Magento\Tax\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class TaxRate diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule.php index e14f3fb7b548e3312ab3f551d092da3b125a05d9..9655754d1fa5b0f36de0970e6bd871fb4df003e0 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule.php @@ -6,7 +6,7 @@ namespace Magento\Tax\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class TaxRule diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule/TaxClass.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule/TaxClass.php index a6c807c364a162821860eb0717421c9f39704c03..997d0600cc759907a4e86346d420b53e61bb3a3c 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule/TaxClass.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule/TaxClass.php @@ -6,8 +6,8 @@ namespace Magento\Tax\Test\Fixture\TaxRule; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class TaxClass diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule/TaxRate.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule/TaxRate.php index 0bda05d9e923739c3896175630253d59b2850c15..aacc3a65e7ab91f8292fc0461f9ed0de4b4e826d 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule/TaxRate.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule/TaxRate.php @@ -6,8 +6,8 @@ namespace Magento\Tax\Test\Fixture\TaxRule; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class TaxRate diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/Curl/RemoveTaxRule.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/Curl/RemoveTaxRule.php index f55a0fe687dc6ca36e6a7b6fcf23de296f7fe2bb..4493f800006d0809f1601e9b1b2048c459e1e531 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/Curl/RemoveTaxRule.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/Curl/RemoveTaxRule.php @@ -6,12 +6,12 @@ namespace Magento\Tax\Test\Handler\Curl; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Curl handler remove all tax rules diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxClass/Curl.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxClass/Curl.php index e9cb9e4883d39f2b95db188d39fd0b9ab7ba520d..636a0e8a686ce0c7def5080225913ece8e1bb9de 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxClass/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxClass/Curl.php @@ -6,12 +6,12 @@ namespace Magento\Tax\Test\Handler\TaxClass; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxClass/TaxClassInterface.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxClass/TaxClassInterface.php index 21f7342dd3a7bfa32099f449622f9e69b5217df0..499654912d749a8567c08279a9ef38ce06cacddb 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxClass/TaxClassInterface.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxClass/TaxClassInterface.php @@ -6,7 +6,7 @@ namespace Magento\Tax\Test\Handler\TaxClass; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface TaxClassInterface diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/Curl.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/Curl.php index 2c820b1c6df2afc7d63265a4eddbdfc20faa5f21..99287a4979567cd69b66eaf2410902bf8ad02808 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/Curl.php @@ -6,12 +6,12 @@ namespace Magento\Tax\Test\Handler\TaxRate; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/TaxRateInterface.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/TaxRateInterface.php index 3c39b84398b461a9a7825002db57c3c7be007cb4..470de7e57faf6448e6abb8ecb09870a64e823459 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/TaxRateInterface.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/TaxRateInterface.php @@ -6,7 +6,7 @@ namespace Magento\Tax\Test\Handler\TaxRate; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface TaxRateInterface diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRule/Curl.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRule/Curl.php index 97f9abc6dbc07bbb892e207d7aed2a62b9219ef9..e14120345ebbc2ead5d4830b2238a8063464dc9c 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRule/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRule/Curl.php @@ -6,12 +6,12 @@ namespace Magento\Tax\Test\Handler\TaxRule; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRule/TaxRuleInterface.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRule/TaxRuleInterface.php index b48837992af54c199512457116d047ab15ce6dda..417b74b1cf7478a35e39a362d61df3adb3a2fa5d 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRule/TaxRuleInterface.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRule/TaxRuleInterface.php @@ -6,7 +6,7 @@ namespace Magento\Tax\Test\Handler\TaxRule; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface TaxRuleInterface diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxClass.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxClass.php index 6c09d879535fd89c6bbdd277d9d0d891bfb542b6..071b74555d17bf1af67339de8572e3a6b3f4f69b 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxClass.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxClass.php @@ -6,7 +6,7 @@ namespace Magento\Tax\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class TaxClass Repository diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRate.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRate.php index 4303c1aaa7da79ce4797e4b9a3d3945c13b52b83..e5a571dc1d582048586c00fa42fe8564418ab4c4 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRate.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRate.php @@ -6,7 +6,7 @@ namespace Magento\Tax\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class TaxRate Repository diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRule.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRule.php index 7da39b35c7df00e7b755c077900b80a62ea5cb0d..782ec7e2406b96a14ef33dfd30853c671eb69fa2 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRule.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRule.php @@ -6,7 +6,7 @@ namespace Magento\Tax\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class TaxRule Repository diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRateEntityTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRateEntityTest.php index 733572d4fe3f4c74ff89eeb25c5c2a7331a250e9..ae00c783d685bb61330e4b1eba2708d3400627ff 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRateEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRateEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Tax\Test\TestCase; use Magento\Tax\Test\Fixture\TaxRate; use Magento\Tax\Test\Page\Adminhtml\TaxRateIndex; use Magento\Tax\Test\Page\Adminhtml\TaxRateNew; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Flow: diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest.php index 5749a77717345c974ba0c3bc149a06125fb40922..b4faef417a77acaff74c450dc864f3d348cf2d5f 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest.php @@ -9,8 +9,8 @@ namespace Magento\Tax\Test\TestCase; use Magento\Tax\Test\Fixture\TaxRule; use Magento\Tax\Test\Page\Adminhtml\TaxRuleIndex; use Magento\Tax\Test\Page\Adminhtml\TaxRuleNew; -use Mtf\ObjectManager; -use Mtf\TestCase\Injectable; +use Magento\Mtf\ObjectManager; +use Magento\Mtf\TestCase\Injectable; /** * Test Flow: diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRateEntityTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRateEntityTest.php index fb4cc703df236f9aeb9603a73030371a05966a16..4bbdfbe520493e9ce5e1eafb98f0598a2edf5f06 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRateEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRateEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Tax\Test\TestCase; use Magento\Tax\Test\Fixture\TaxRate; use Magento\Tax\Test\Page\Adminhtml\TaxRateIndex; use Magento\Tax\Test\Page\Adminhtml\TaxRateNew; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Flow: diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRuleEntityTest.php index 1cb87a55275753c1c86fd7b3e05975ff7079c611..aa0fac22b2b436a3036a1879d76fa827df2651ae 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRuleEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRuleEntityTest.php @@ -10,8 +10,8 @@ use Magento\Customer\Test\Fixture\AddressInjectable; use Magento\Tax\Test\Fixture\TaxRule; use Magento\Tax\Test\Page\Adminhtml\TaxRuleIndex; use Magento\Tax\Test\Page\Adminhtml\TaxRuleNew; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Delete TaxRuleEntity diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRateEntityTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRateEntityTest.php index bed89060ce1b7443c948dc45ac04a838cbeec04f..c11e2e5ae853f217cd1b8c3c601d7e847db24923 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRateEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRateEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\Tax\Test\TestCase; use Magento\Tax\Test\Fixture\TaxRate; use Magento\Tax\Test\Page\Adminhtml\TaxRateIndex; use Magento\Tax\Test\Page\Adminhtml\TaxRateNew; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Flow: diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest.php index 053dd03da67808b04f800f09d43b1b564d36ff2c..8cd7b7abe08bf60ad0dcfb08219bbe612a1e1049 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest.php @@ -9,9 +9,9 @@ namespace Magento\Tax\Test\TestCase; use Magento\Tax\Test\Fixture\TaxRule; use Magento\Tax\Test\Page\Adminhtml\TaxRuleIndex; use Magento\Tax\Test\Page\Adminhtml\TaxRuleNew; -use Mtf\Fixture\FixtureFactory; -use Mtf\ObjectManager; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\ObjectManager; +use Magento\Mtf\TestCase\Injectable; /** * Test Flow: diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestStep/CreateTaxRuleStep.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestStep/CreateTaxRuleStep.php new file mode 100644 index 0000000000000000000000000000000000000000..e90c0be6bc439383e4c016b3b49b611e6e1fac26 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestStep/CreateTaxRuleStep.php @@ -0,0 +1,63 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Tax\Test\TestStep; + +use Mtf\Fixture\FixtureFactory; +use Mtf\TestStep\TestStepInterface; + +/** + * Creating tax rule + */ +class CreateTaxRuleStep implements TestStepInterface +{ + /** + * Tax Rule + * + * @var string + */ + protected $taxRule; + + /** + * Factory for Fixture + * + * @var FixtureFactory + */ + protected $fixtureFactory; + + /** + * Preparing step properties + * + * @constructor + * @param FixtureFactory $fixtureFactory + * @param string $taxRule + */ + public function __construct(FixtureFactory $fixtureFactory, $taxRule) + { + $this->fixtureFactory = $fixtureFactory; + $this->taxRule = $taxRule; + } + + /** + * Create tax rule + * + * @return array + */ + public function run() + { + $result['taxRule'] = null; + if ($this->taxRule != '-') { + $taxRule = $this->fixtureFactory->createByCode( + 'taxRule', + ['dataSet' => $this->taxRule] + ); + $taxRule->persist(); + $result['taxRule'] = $taxRule; + } + + return $result; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestStep/DeleteAllTaxRulesStep.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestStep/DeleteAllTaxRulesStep.php index 1fe46431402cfe0b7267d90662d37fe662b12c85..69b0cb8e48754397a8a3d56873fcc721f7e6269a 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestStep/DeleteAllTaxRulesStep.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestStep/DeleteAllTaxRulesStep.php @@ -8,7 +8,7 @@ namespace Magento\Tax\Test\TestStep; use Magento\Tax\Test\Page\Adminhtml\TaxRuleIndex; use Magento\Tax\Test\Page\Adminhtml\TaxRuleNew; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class DeleteAllTaxRulesStep diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/etc/constraint.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/etc/constraint.xml index cdc24d17ed0778c62d79ec44e5ab1962c8ea323d..6776506ada7ba3b03d55a9a6a0c7296b2e2568c3 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/etc/constraint.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/etc/constraint.xml @@ -57,6 +57,33 @@ <assertTaxRuleIsApplied module="Magento_Tax"> <severity>high</severity> </assertTaxRuleIsApplied> + <assertTaxRuleIsAppliedToAllPricesExcludingTax module="Magento_Tax"> + <severeness>high</severeness> + </assertTaxRuleIsAppliedToAllPricesExcludingTax> + <assertTaxRuleIsAppliedToAllPricesIncludingTax module="Magento_Tax"> + <severeness>high</severeness> + </assertTaxRuleIsAppliedToAllPricesIncludingTax> + <assertTaxRuleIsAppliedToAllPricesExcludingIncludingTax module="Magento_Tax"> + <severeness>high</severeness> + </assertTaxRuleIsAppliedToAllPricesExcludingIncludingTax> + <assertTaxCalculationAfterCheckoutExcludingIncludingTax module="Magento_Tax"> + <severeness>high</severeness> + </assertTaxCalculationAfterCheckoutExcludingIncludingTax> + <assertTaxCalculationAfterCheckoutExcludingTax module="Magento_Tax"> + <severeness>high</severeness> + </assertTaxCalculationAfterCheckoutExcludingTax> + <assertTaxCalculationAfterCheckoutIncludingTax module="Magento_Tax"> + <severeness>high</severeness> + </assertTaxCalculationAfterCheckoutIncludingTax> + <assertOrderTaxOnBackendExcludingIncludingTax module="Magento_Tax"> + <severeness>high</severeness> + </assertOrderTaxOnBackendExcludingIncludingTax> + <assertOrderTaxOnBackendIncludingTax module="Magento_Tax"> + <severeness>high</severeness> + </assertOrderTaxOnBackendIncludingTax> + <assertOrderTaxOnBackendExcludingTax module="Magento_Tax"> + <severeness>high</severeness> + </assertOrderTaxOnBackendExcludingTax> <assertTaxRuleIsAppliedToAllPrices module="Magento_Tax"> <severity>high</severity> </assertTaxRuleIsAppliedToAllPrices> diff --git a/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Footer.php b/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Footer.php index 391b1fed24904f74add81180e2f316e1175355a8..f670da230ee3d91d2077f69f5a9f63fdd4198aba 100644 --- a/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Footer.php +++ b/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Footer.php @@ -7,9 +7,9 @@ namespace Magento\Theme\Test\Block\Html; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; use Magento\Store\Test\Fixture\Store; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; /** * Footer block @@ -56,7 +56,7 @@ class Footer extends Block * Click on link by name * * @param string $linkName - * @return \Mtf\Client\Element + * @return void * @throws \Exception */ public function clickLink($linkName) diff --git a/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Title.php b/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Title.php index 0bf70a50cb0bc730bcb75cc7ce732db1e6911b6a..2217609ad80bcc7ab161067d31a340235c1ab1c4 100644 --- a/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Title.php +++ b/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Title.php @@ -7,7 +7,7 @@ namespace Magento\Theme\Test\Block\Html; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Page title block diff --git a/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Topmenu.php b/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Topmenu.php index 1983b20e3e16ea6617f9729910180ef09e08d33c..0326a8150a647a0a576ab959e10ed4951f85a988 100644 --- a/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Topmenu.php +++ b/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Topmenu.php @@ -7,8 +7,8 @@ namespace Magento\Theme\Test\Block\Html; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Topmenu diff --git a/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Links.php b/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Links.php index 54a22cb06c5831b9e056952f5123c73e7abd6128..0fd091a16ce67261109b9868daea06a474f78943 100644 --- a/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Links.php +++ b/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Links.php @@ -7,8 +7,8 @@ namespace Magento\Theme\Test\Block; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Page Top Links block. @@ -79,7 +79,10 @@ class Links extends Block */ public function getLinkUrl($linkTitle) { - return trim($this->_rootElement->find(sprintf($this->link, $linkTitle), Locator::SELECTOR_XPATH)->getUrl()); + $link = $this->_rootElement->find(sprintf($this->link, $linkTitle), Locator::SELECTOR_XPATH) + ->getAttribute('href'); + + return trim($link); } /** diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Category/Tree.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Category/Tree.php index 6afb69641cedca5c947b479f72aa8e4a587d5760..b5e8f775ea0b1b1d54f85b60f23e1e1533769af8 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Category/Tree.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Category/Tree.php @@ -6,8 +6,9 @@ namespace Magento\UrlRewrite\Test\Block\Adminhtml\Catalog\Category; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; + +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; use Magento\Catalog\Test\Fixture\Category; /** diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.php index 5b6a5c51f9b22f850aeac82dcd81776bda7b91e2..dcae5848887be99e10b707cbebb4c9bb35788b5b 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.php @@ -7,8 +7,9 @@ namespace Magento\UrlRewrite\Test\Block\Adminhtml\Catalog\Edit; use Magento\Backend\Test\Block\Widget\Form; -use Mtf\Client\Element; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\Element\SimpleElement; +use Magento\Mtf\Client\Element; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class UrlRewriteForm @@ -20,13 +21,13 @@ class UrlRewriteForm extends Form * Fill the root form * * @param FixtureInterface $fixture - * @param Element|null $element + * @param SimpleElement|null $element * @param array $replace [optional] * @return $this */ public function fill( FixtureInterface $fixture, - Element $element = null, + SimpleElement $element = null, array $replace = [] ) { $data = $fixture->getData(); diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Selector.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Selector.php index e763fc709d8265ace7428a040a4d4c772aa796be..f46e09fdf49dd903911b37cc04b3bea081d287d6 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Selector.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Selector.php @@ -7,8 +7,8 @@ namespace Magento\UrlRewrite\Test\Block\Adminhtml; -use Mtf\Block\Block; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; /** * Class Selector diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertPageByUrlRewriteIsNotFound.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertPageByUrlRewriteIsNotFound.php index 5f9a5ff1286045c88e9e300850abb0f1165e7310..389f511e37955ebf024c5dcae6ac9606b54c6fbf 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertPageByUrlRewriteIsNotFound.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertPageByUrlRewriteIsNotFound.php @@ -8,8 +8,8 @@ namespace Magento\UrlRewrite\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\UrlRewrite\Test\Fixture\UrlRewrite; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertPageByUrlRewriteIsNotFound @@ -29,13 +29,13 @@ class AssertPageByUrlRewriteIsNotFound extends AbstractConstraint /** * Checking the server response 404 page on frontend * - * @param Browser $browser + * @param BrowserInterface $browser * @param CatalogProductView $catalogProductView * @param UrlRewrite $productRedirect * @return void */ public function processAssert( - Browser $browser, + BrowserInterface $browser, CatalogProductView $catalogProductView, UrlRewrite $productRedirect ) { diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryInGrid.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryInGrid.php index 1bfbe4ee65e771b93143a694157c358a8108be2c..c1ce42c3f3f7de60b90c26e0dd8058ee44e37d39 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryInGrid.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryInGrid.php @@ -8,7 +8,7 @@ namespace Magento\UrlRewrite\Test\Constraint; use Magento\Catalog\Test\Fixture\Category; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUrlRewriteCategoryInGrid diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryNotInGrid.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryNotInGrid.php index 0eb7cfed02dabe6d07d60804932eaa9b51b4bb4d..18184d03e7c76d9154d1f18a7326649e8925a66c 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\UrlRewrite\Test\Constraint; use Magento\Catalog\Test\Fixture\Category; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUrlRewriteCategoryNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryRedirect.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryRedirect.php index ca4aaa0b533d5ad8884f6e3e8f4157e0b10792b2..ea1f0370eef8aeaeca19f4753be11d512e2bbf58 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryRedirect.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryRedirect.php @@ -8,8 +8,8 @@ namespace Magento\UrlRewrite\Test\Constraint; use Magento\Catalog\Test\Fixture\Category; use Magento\UrlRewrite\Test\Fixture\UrlRewrite; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUrlRewriteCategoryRedirect @@ -26,13 +26,13 @@ class AssertUrlRewriteCategoryRedirect extends AbstractConstraint * * @param UrlRewrite $urlRewrite * @param Category $category - * @param Browser $browser + * @param BrowserInterface $browser * @return void */ public function processAssert( UrlRewrite $urlRewrite, Category $category, - Browser $browser + BrowserInterface $browser ) { $browser->open($_ENV['app_frontend_url'] . $urlRewrite->getRequestPath()); $url = $urlRewrite->getRedirectType() == 'No' diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCustomRedirect.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCustomRedirect.php index 6fd56fcf941150f65dc182b23b8685eec0aa5007..2241c4fe128a81dab71023e57ec0de8bd194a56c 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCustomRedirect.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCustomRedirect.php @@ -8,8 +8,8 @@ namespace Magento\UrlRewrite\Test\Constraint; use Magento\Cms\Test\Page\CmsIndex; use Magento\UrlRewrite\Test\Fixture\UrlRewrite; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUrlRewriteCustomRedirect @@ -25,11 +25,11 @@ class AssertUrlRewriteCustomRedirect extends AbstractConstraint * Assert check URL rewrite custom redirect * * @param UrlRewrite $urlRewrite - * @param Browser $browser + * @param BrowserInterface $browser * @param CmsIndex $cmsIndex * @return void */ - public function processAssert(UrlRewrite $urlRewrite, Browser $browser, CmsIndex $cmsIndex) + public function processAssert(UrlRewrite $urlRewrite, BrowserInterface $browser, CmsIndex $cmsIndex) { $browser->open($_ENV['app_frontend_url'] . $urlRewrite->getRequestPath()); $entity = $urlRewrite->getDataFieldConfig('target_path')['source']->getEntity(); diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCustomSearchRedirect.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCustomSearchRedirect.php index d4eb1c137d877d160c4a48fd8c13f466becd75c2..c00e367145d2c3a0a36ea8a0cb0e898b46a4aa13 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCustomSearchRedirect.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCustomSearchRedirect.php @@ -8,8 +8,8 @@ namespace Magento\UrlRewrite\Test\Constraint; use Magento\Catalog\Test\Page\Category\CatalogCategoryView; use Magento\UrlRewrite\Test\Fixture\UrlRewrite; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUrlRewriteCustomSearchRedirect @@ -26,14 +26,14 @@ class AssertUrlRewriteCustomSearchRedirect extends AbstractConstraint * * @param UrlRewrite $initialRewrite * @param UrlRewrite $urlRewrite - * @param Browser $browser + * @param BrowserInterface $browser * @param CatalogCategoryView $categoryView * @return void */ public function processAssert( UrlRewrite $initialRewrite, UrlRewrite $urlRewrite, - Browser $browser, + BrowserInterface $browser, CatalogCategoryView $categoryView ) { $urlRequestPath = $urlRewrite->hasData('request_path') diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteDeletedMessage.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteDeletedMessage.php index b10cb73dff2eaf9198a9bb33fb9badfc4635f616..6b0d9e838dd021e4ebbded56b24ff7f41120fa81 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteDeletedMessage.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteDeletedMessage.php @@ -7,7 +7,7 @@ namespace Magento\UrlRewrite\Test\Constraint; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUrlRewriteDeletedMessage diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteInGrid.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteInGrid.php index 4b346f2be4f40a4ba496feddefe80e212756eed8..8235b95575105435d7a85eeb685b11a1866d0b7c 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteInGrid.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteInGrid.php @@ -8,7 +8,7 @@ namespace Magento\UrlRewrite\Test\Constraint; use Magento\UrlRewrite\Test\Fixture\UrlRewrite; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUrlRewriteInGrid diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteNotInGrid.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteNotInGrid.php index c8b3fbce3185d80200de45661a63022bb7af0940..7f2431c04621a77899cf7564b7981fb92675f06e 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\UrlRewrite\Test\Constraint; use Magento\UrlRewrite\Test\Fixture\UrlRewrite; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUrlRewriteNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteProductRedirect.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteProductRedirect.php index 0c7e40ba98311cb80b8fe8e9a2e131d1a2e4cf62..720dc2915b97449437e1f1418b0293a57669d6cb 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteProductRedirect.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteProductRedirect.php @@ -8,9 +8,9 @@ namespace Magento\UrlRewrite\Test\Constraint; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\UrlRewrite\Test\Fixture\UrlRewrite; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class AssertUrlRewriteProductRedirect @@ -27,14 +27,14 @@ class AssertUrlRewriteProductRedirect extends AbstractConstraint * * @param UrlRewrite $urlRewrite * @param CatalogProductView $catalogProductView - * @param Browser $browser + * @param BrowserInterface $browser * @param InjectableFixture $product * @return void */ public function processAssert( UrlRewrite $urlRewrite, CatalogProductView $catalogProductView, - Browser $browser, + BrowserInterface $browser, InjectableFixture $product = null ) { $browser->open($_ENV['app_frontend_url'] . $urlRewrite->getRequestPath()); diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteSaveMessage.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteSaveMessage.php index ee74a710c227ddd9d092e9fc9d2df189e971c4e3..6507dd11cdf04cc8e45c3511d2c557407bbfa5f9 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\UrlRewrite\Test\Constraint; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUrlRewriteSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteSuccessOutsideRedirect.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteSuccessOutsideRedirect.php index 62006f617930ae4c110a44ea3e839bde35c7500e..60d1fdfc8fa188e92aae03a48fe8fa1e685c970e 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteSuccessOutsideRedirect.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteSuccessOutsideRedirect.php @@ -7,8 +7,8 @@ namespace Magento\UrlRewrite\Test\Constraint; use Magento\UrlRewrite\Test\Fixture\UrlRewrite; -use Mtf\Client\Browser; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUrlRewriteSuccessOutsideRedirect @@ -24,11 +24,11 @@ class AssertUrlRewriteSuccessOutsideRedirect extends AbstractConstraint * Assert that outside redirect was success * * @param UrlRewrite $urlRewrite - * @param Browser $browser + * @param BrowserInterface $browser * @param UrlRewrite|null $initialRewrite [optional] * @return void */ - public function processAssert(UrlRewrite $urlRewrite, Browser $browser, UrlRewrite $initialRewrite = null) + public function processAssert(UrlRewrite $urlRewrite, BrowserInterface $browser, UrlRewrite $initialRewrite = null) { $urlRequestPath = $urlRewrite->hasData('request_path') ? $urlRewrite->getRequestPath() diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteUpdatedProductInGrid.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteUpdatedProductInGrid.php index 2f7fec91332131002bce522a782d058a922be4d2..a54513d48cf5e9e0f11b0f23f49c87ebf0ae307b 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteUpdatedProductInGrid.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteUpdatedProductInGrid.php @@ -8,7 +8,7 @@ namespace Magento\UrlRewrite\Test\Constraint; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUrlRewriteUpdatedProductInGrid diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php index 8d8459e15baad0f5d35218ffb62d27ed37280d3c..ace141782b55077996b11965fe80423eade146a4 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php @@ -6,7 +6,7 @@ namespace Magento\UrlRewrite\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class UrlRewrite diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/StoreId.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/StoreId.php index 8d4cfb7965d72a84e45b3648e1a9becbf39b9cbd..5d234bfab7156b4bc26890eebd0f2c1202b75493 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/StoreId.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/StoreId.php @@ -7,8 +7,8 @@ namespace Magento\UrlRewrite\Test\Fixture\UrlRewrite; use Magento\Store\Test\Fixture\Store; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class StoreId diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/TargetPath.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/TargetPath.php index af5e022660cbfc8aca8e71b0ff9a4d716020b8dc..44614ad58326163a61320b149af2b5510566ad53 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/TargetPath.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/TargetPath.php @@ -6,8 +6,8 @@ namespace Magento\UrlRewrite\Test\Fixture\UrlRewrite; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class TargetPath diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/Curl.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/Curl.php index b556d3cf36a7be10594d2302c60513dac51d78cb..d99f658b73cc2850ed2e88d6d99272f43fdf2d3a 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/Curl.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/Curl.php @@ -6,12 +6,12 @@ namespace Magento\UrlRewrite\Test\Handler\UrlRewrite; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/UrlRewriteInterface.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/UrlRewriteInterface.php index a566d766b43d7b090b907dfc23315f92bd520d4d..0651b1c0430f65be62d9bdd62682f69244f7c9ec 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/UrlRewriteInterface.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/UrlRewriteInterface.php @@ -6,7 +6,7 @@ namespace Magento\UrlRewrite\Test\Handler\UrlRewrite; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface UrlRewriteInterface diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Repository/UrlRewrite.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Repository/UrlRewrite.php index 4c830610af11fc611dc2a19ac4dabd89b06d727b..0e1b7a3421d54ab75349ac7e25e349bde385300a 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Repository/UrlRewrite.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Repository/UrlRewrite.php @@ -6,7 +6,7 @@ namespace Magento\UrlRewrite\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class UrlRewrite diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest.php index 6041d62ee5838b5210ad93b3ca7be2a3fc3322ec..636a64f31e559b3586a72f06737c8a3e131cdd03 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest.php @@ -10,8 +10,8 @@ use Magento\Catalog\Test\Fixture\Category; use Magento\UrlRewrite\Test\Fixture\UrlRewrite; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteEdit; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Create Category Rewrites Entity diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.php index 093391036ecee562a963b6c3d2430ac125dc3912..f4e8d5d46f848a73405e94dffff40288884e720f 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.php @@ -10,7 +10,7 @@ use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\UrlRewrite\Test\Fixture\UrlRewrite; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteEdit; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Product URL Rewrites Entity diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest.php index 7462cf0db538aea46d428eba71b2ed36ad83b537..75365689598a48d2b2d548a4cc9d9c6451b2eab1 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\UrlRewrite\Test\TestCase; use Magento\UrlRewrite\Test\Fixture\UrlRewrite; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteEdit; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Delete Category URL Rewrites Entity diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCustomUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCustomUrlRewriteEntityTest.php index 34b68473758aaab724f6e48faf8cb8d08d91c7ac..f5592e87abef014f261c7d6bcaef3f4a6557972c 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCustomUrlRewriteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCustomUrlRewriteEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\UrlRewrite\Test\TestCase; use Magento\UrlRewrite\Test\Fixture\UrlRewrite; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteEdit; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for DeleteCustomUrlRewriteEntity diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.php index 2fbcc64c07ec5c7b3e36ff7ff70bcc34abbceb92..c668f0512eabda5375eef8fb30e59bc2f203bc1c 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\UrlRewrite\Test\TestCase; use Magento\UrlRewrite\Test\Fixture\UrlRewrite; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteEdit; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for DeleteProductUrlRewritesEntity diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php index f5825167cbba0890ce13e92bc392929fc7309714..25a5f58638c939f967563deab905f2777bf5c47b 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php @@ -10,8 +10,8 @@ use Magento\Catalog\Test\Fixture\Category; use Magento\UrlRewrite\Test\Fixture\UrlRewrite; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteEdit; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for UpdateCategoryUrlRewritesEntity diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest.php index 909577d62f65a98a3b91b6bba81d5c5568021a44..c5652832a328a4d77964282a5ff6306d70d07362 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\UrlRewrite\Test\TestCase; use Magento\UrlRewrite\Test\Fixture\UrlRewrite; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteEdit; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for UpdateCustomUrlRewritesEntity diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php index a6988a459b4aa05193866efc86eed0347d3f2fb7..3b7562540e692afc45f9053932eae6730d0aa8f8 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php @@ -9,8 +9,8 @@ namespace Magento\UrlRewrite\Test\TestCase; use Magento\UrlRewrite\Test\Fixture\UrlRewrite; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteEdit; use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for Update Product URL Rewrites Entity diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/constraint.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/constraint.xml index df293a41289e30370da9f98fe290c08cfd2c7efe..9578f490e7f642f242e7fe065e59708bbe9ffd28 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/constraint.xml +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/constraint.xml @@ -24,8 +24,8 @@ <require> <urlRewrite class="Magento\UrlRewrite\Test\Fixture\UrlRewrite"/> <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView"/> - <product class="Mtf\Fixture\FixtureInterface"/> - <browser class="Mtf\Client\Browser"/> + <product class="Magento\Mtf\Fixture\FixtureInterface"/> + <browser class="Magento\Mtf\Client\Browser"/> </require> </assertUrlRewriteProductRedirect> <assertUrlRewriteDeletedMessage module="Magento_UrlRewrite"> @@ -46,7 +46,7 @@ <require> <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView"/> <productRedirect class="Magento\UrlRewrite\Test\Fixture\UrlRewrite"/> - <browser class="Mtf\Client\Browser"/> + <browser class="Magento\Mtf\Client\Browser"/> </require> </assertPageByUrlRewriteIsNotFound> <assertUrlRewriteCustomRedirect module="Magento_UrlRewrite"> @@ -56,14 +56,14 @@ <severity>low</severity> <require> <urlRewrite class="Magento\UrlRewrite\Test\Fixture\UrlRewrite"/> - <browser class="Mtf\Client\Browser"/> + <browser class="Magento\Mtf\Client\Browser"/> </require> </assertUrlRewriteSuccessOutsideRedirect> <assertUrlRewriteCustomSearchRedirect module="Magento_UrlRewrite"> <severity>low</severity> <require> <urlRewrite class="Magento\UrlRewrite\Test\Fixture\UrlRewrite"/> - <browser class="Mtf\Client\Browser"/> + <browser class="Magento\Mtf\Client\Browser"/> <categoryView class="Magento\Catalog\Test\Page\Category\CatalogCategoryView"/> </require> </assertUrlRewriteCustomSearchRedirect> diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/Role/Tab/Role.php b/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/Role/Tab/Role.php index 8720daea217441fda21f2357b321ef53ff165d4c..dd79a2b7b3c9c815c6e2f7ec8d75935cbcb4c66b 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/Role/Tab/Role.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/Role/Tab/Role.php @@ -7,7 +7,7 @@ namespace Magento\User\Test\Block\Adminhtml\Role\Tab; use Magento\Backend\Test\Block\Widget\Tab; -use Mtf\Client\Element; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class Role @@ -19,10 +19,10 @@ class Role extends Tab * Fills username in user grid * * @param array $fields - * @param Element $element + * @param SimpleElement $element * @return void */ - public function fillFormTab(array $fields, Element $element = null) + public function fillFormTab(array $fields, SimpleElement $element = null) { $users = (is_array($fields['in_role_users']['value'])) ? $fields['in_role_users']['value'] diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/User/Edit/Form.php b/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/User/Edit/Form.php index cc4e2577686563238bae994ae6417271961adc41..6f55faf944b174eca4a330ed686dc16042efd27b 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/User/Edit/Form.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/User/Edit/Form.php @@ -8,8 +8,8 @@ namespace Magento\User\Test\Block\Adminhtml\User\Edit; use Magento\Backend\Test\Block\Widget\FormTabs; use Magento\User\Test\Block\Adminhtml\User\Edit\Tab\Roles; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Element; +use Magento\Mtf\Client\Locator; /** * Class Form diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/User/Edit/PageActions.php b/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/User/Edit/PageActions.php index f184a963d6f53ea333dc3fd4e3da8e0d49bce2ad..c2cf7eaf643955c850940a7b7c78254aa710d881 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/User/Edit/PageActions.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/User/Edit/PageActions.php @@ -29,6 +29,6 @@ class PageActions extends FormPageActions public function forceSignIn() { $this->_rootElement->find($this->forceSignIn)->click(); - $this->_rootElement->acceptAlert(); + $this->browser->acceptAlert(); } } diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/User/Edit/Tab/Roles.php b/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/User/Edit/Tab/Roles.php index 8ab5d10db8f3d45b95e3741254b223001a624066..bcf2bebf558713998dd9bcf6f904835d111a4ab6 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/User/Edit/Tab/Roles.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/User/Edit/Tab/Roles.php @@ -7,7 +7,7 @@ namespace Magento\User\Test\Block\Adminhtml\User\Edit\Tab; use Magento\Backend\Test\Block\Widget\Grid; -use Mtf\Client\Element; +use Magento\Mtf\Client\Element; /** * Class Roles diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/User/Tab/Role.php b/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/User/Tab/Role.php index 263be3d74aae9b63be1dfc853b96e715793caed9..4b05852ef8d751434cdbd554e0e1e58f00bdab6d 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/User/Tab/Role.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/User/Tab/Role.php @@ -6,9 +6,8 @@ namespace Magento\User\Test\Block\Adminhtml\User\Tab; +use Magento\Mtf\Client\Element\SimpleElement; use Magento\Backend\Test\Block\Widget\Tab; -use Magento\User\Test\Block\Adminhtml\User\Tab\Role\Grid; -use Mtf\Client\Element; /** * Class Role @@ -20,10 +19,10 @@ class Role extends Tab * Fill user options * * @param array $fields - * @param Element|null $element + * @param SimpleElement|null $element * @return void */ - public function fillFormTab(array $fields, Element $element = null) + public function fillFormTab(array $fields, SimpleElement $element = null) { $this->getRoleGrid()->searchAndSelect(['rolename' => $fields['role_id']['value']]); } diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertAccessTokensErrorRevokeMessage.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertAccessTokensErrorRevokeMessage.php index 81b5df0b0dc20a1cf103e24df62e9c77740d4dd2..787b7e390d674747f3d270a01ec5b1fd7ab20adf 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertAccessTokensErrorRevokeMessage.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertAccessTokensErrorRevokeMessage.php @@ -7,7 +7,7 @@ namespace Magento\User\Test\Constraint; use Magento\User\Test\Page\Adminhtml\UserEdit; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertAccessTokensErrorRevokeMessage diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertImpossibleDeleteYourOwnAccount.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertImpossibleDeleteYourOwnAccount.php index a9797795c84a9566dbc757d53b50d064353158cd..8f6d0505517bd2c2a09aea41c52dc40894640a0c 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertImpossibleDeleteYourOwnAccount.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertImpossibleDeleteYourOwnAccount.php @@ -7,7 +7,7 @@ namespace Magento\User\Test\Constraint; use Magento\User\Test\Page\Adminhtml\UserEdit; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertImpossibleDeleteYourOwnAccount diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertImpossibleDeleteYourOwnRole.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertImpossibleDeleteYourOwnRole.php index fd69fc3cee73f171d9ae614b6349d70e08dabebf..d44d53f21ca75701a2756aafe06aeb1186dbfbee 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertImpossibleDeleteYourOwnRole.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertImpossibleDeleteYourOwnRole.php @@ -7,7 +7,7 @@ namespace Magento\User\Test\Constraint; use Magento\User\Test\Page\Adminhtml\UserRoleEditRole; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertRoleSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleInGrid.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleInGrid.php index 7e8a3a35e0c7076c560261bd19bf477e4985d609..49e9f3fb36f40a1a519946eaa642b15b5fc8d44b 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleInGrid.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleInGrid.php @@ -8,7 +8,7 @@ namespace Magento\User\Test\Constraint; use Magento\User\Test\Fixture\AdminUserRole; use Magento\User\Test\Page\Adminhtml\UserRoleIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertRoleInGrid diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleNotInGrid.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleNotInGrid.php index ec7b5ba0e72285aa227d83127931f0edddd77c90..cb67bc0a80e732511b3d482c9dcd1cf8004f134c 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\User\Test\Constraint; use Magento\User\Test\Fixture\AdminUserRole; use Magento\User\Test\Page\Adminhtml\UserRoleIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertRoleNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleSuccessDeleteMessage.php index 2033e0c303a9d3d9c8812cc0164eaeefd612082c..38f74ad1ead1db38eb6e7b012fc81f3623fb474b 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleSuccessDeleteMessage.php @@ -7,7 +7,7 @@ namespace Magento\User\Test\Constraint; use Magento\User\Test\Page\Adminhtml\UserRoleIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertRoleSuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleSuccessSaveMessage.php index dc4d32653ab69b08a36e006aa742367e1d51a07b..0436e6c60cfd39b6b845636f0e7773ed19b0a9af 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleSuccessSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\User\Test\Constraint; use Magento\User\Test\Page\Adminhtml\UserRoleIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertRoleSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserDuplicateMessage.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserDuplicateMessage.php index 568cbd551d0f301b1925accd2b24fc7354de644b..c0a9c0c71554a9d38e3a512a8f33ec0ee3fd565a 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserDuplicateMessage.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserDuplicateMessage.php @@ -7,7 +7,7 @@ namespace Magento\User\Test\Constraint; use Magento\User\Test\Page\Adminhtml\UserEdit; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUserDuplicateMessage diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserInGrid.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserInGrid.php index 6f2bf4e896f1c2b98398a502487e7d3bc93f923d..1369fa1591dd32d7101bd65164d19dce7f16f3b8 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserInGrid.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserInGrid.php @@ -8,7 +8,7 @@ namespace Magento\User\Test\Constraint; use Magento\User\Test\Fixture\User; use Magento\User\Test\Page\Adminhtml\UserIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUserInGrid diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserInvalidEmailMessage.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserInvalidEmailMessage.php index aa8877c54bd65c4caabb99c36bbfa73706d478d4..431b9f13c71cc8838efebd393e61f2b311276733 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserInvalidEmailMessage.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserInvalidEmailMessage.php @@ -8,7 +8,7 @@ namespace Magento\User\Test\Constraint; use Magento\User\Test\Fixture\User; use Magento\User\Test\Page\Adminhtml\UserEdit; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUserInvalidEmailMessage diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserNotInGrid.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserNotInGrid.php index 08832e25f67f90c9760b66ce9da37f55ce201251..909f581f7675923c0aa4aa70ccba604e3bdd636e 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserNotInGrid.php @@ -8,7 +8,7 @@ namespace Magento\User\Test\Constraint; use Magento\User\Test\Fixture\User; use Magento\User\Test\Page\Adminhtml\UserIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUserNotInGrid diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserRoleSalesRestrictedAccess.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserRoleSalesRestrictedAccess.php index ebd351e0454c49aaab6af8ccb86863cc4000a926..04f22b59e617eae8f5a0ee0df03b0952c12ad4f0 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserRoleSalesRestrictedAccess.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserRoleSalesRestrictedAccess.php @@ -8,7 +8,7 @@ namespace Magento\User\Test\Constraint; use Magento\Backend\Test\Page\Adminhtml\Dashboard; use Magento\User\Test\Page\Adminhtml\UserIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUserRoleSalesRestrictedAccess diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserSuccessDeleteMessage.php index 72ed5cb755a1fb270c5196bdccd879fa433b46f8..c6f7e9e69495c0d3530e7db93cd670b00490a279 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserSuccessDeleteMessage.php @@ -7,7 +7,7 @@ namespace Magento\User\Test\Constraint; use Magento\User\Test\Page\Adminhtml\UserIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUserSuccessDeleteMessage diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserSuccessLogOut.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserSuccessLogOut.php index 5b46a44f3fb1dd62f7821cdf8f5e0deab4b0c845..9ec6841c6f9885fe772ea9e9f8c2cbcb32196f79 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserSuccessLogOut.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserSuccessLogOut.php @@ -8,7 +8,7 @@ namespace Magento\User\Test\Constraint; use Magento\Backend\Test\Page\AdminAuthLogin; use Magento\Backend\Test\Page\Adminhtml\Dashboard; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUserSuccessLogOut diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserSuccessLogin.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserSuccessLogin.php index aa4862434fdb847fbf560f646faf9bed2eb634e7..4544f7b69dae5feed6804d97dafe170e2921d7db 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserSuccessLogin.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserSuccessLogin.php @@ -9,7 +9,7 @@ namespace Magento\User\Test\Constraint; use Magento\Backend\Test\Page\AdminAuthLogin; use Magento\Backend\Test\Page\Adminhtml\Dashboard; use Magento\User\Test\Fixture\User; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUserSuccessLogin diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserSuccessSaveMessage.php index 9804e38b77bcc40af427563c1cff278c365c38db..d401448522ebf4338de4bcc7108f6f3837989552 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserSuccessSaveMessage.php @@ -7,7 +7,7 @@ namespace Magento\User\Test\Constraint; use Magento\User\Test\Page\Adminhtml\UserIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUserSuccessSaveMessage diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserWrongCredentialsMessage.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserWrongCredentialsMessage.php index 156672a632950198cac67b280d585fe3d80d1d53..7c2be591562841d405f82aeba0b0f56c4aff6036 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserWrongCredentialsMessage.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserWrongCredentialsMessage.php @@ -8,7 +8,7 @@ namespace Magento\User\Test\Constraint; use Magento\Backend\Test\Page\AdminAuthLogin; use Magento\User\Test\Fixture\User; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertUserWrongCredentialsMessage diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUser.php b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUser.php index bd67f84b2def072e1652d20463e72c8ec0537156..a0ee8cf951c0f3146f1f5469fe1fc9edfc2dba17 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUser.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUser.php @@ -6,10 +6,10 @@ namespace Magento\User\Test\Fixture; -use Mtf\Factory\Factory; -use Mtf\Fixture\DataFixture; -use Mtf\ObjectManager; -use Mtf\System\Config; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Fixture\DataFixture; +use Magento\Mtf\ObjectManager; +use Magento\Mtf\System\Config; /** * Fixture with all necessary data for user creation on backend @@ -47,8 +47,8 @@ class AdminUser extends DataFixture */ protected function _initData() { - /** @var \Mtf\System\Config $systemConfig */ - $systemConfig = ObjectManager::getInstance()->create('Mtf\System\Config'); + /** @var \Magento\Mtf\System\Config $systemConfig */ + $systemConfig = ObjectManager::getInstance()->create('Magento\Mtf\System\Config'); $superAdminPassword = $systemConfig->getConfigParam('application/backend_user_credentials/password'); $this->_data = [ 'fields' => [ diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserRole.php b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserRole.php index f88d9fa29c0992811361b885db0c77fbc2f69bcc..88180cf31cb0ad6e3f634d6fab2adf887898f010 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserRole.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserRole.php @@ -6,7 +6,7 @@ namespace Magento\User\Test\Fixture; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class AdminUserRole diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserRole/InRoleUsers.php b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserRole/InRoleUsers.php index 80908c4f372c72153e803fb245760d8a8d1122a9..eb1f27ccdc821d844c57b3607abcf09b43b429a0 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserRole/InRoleUsers.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserRole/InRoleUsers.php @@ -7,8 +7,8 @@ namespace Magento\User\Test\Fixture\AdminUserRole; use Magento\User\Test\Fixture\User; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class InRoleUsers diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Resource.php b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Resource.php index d4cb9f015398fa773295ec0bfff69d38fffa1ee8..d9e1c4638eea02eb4a9bf6458a91e912ca5a71bc 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Resource.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Resource.php @@ -5,7 +5,7 @@ */ namespace Magento\User\Test\Fixture; -use Mtf\Fixture\DataFixture; +use Magento\Mtf\Fixture\DataFixture; /** * ACL resources fixture diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role.php b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role.php index ab50e9843b5fbd15028d7023b6f47dec8d490c61..acb266f5d6c6978f4a7b9ffee53445115d0d2f33 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role.php @@ -6,8 +6,8 @@ namespace Magento\User\Test\Fixture; -use Mtf\Factory\Factory; -use Mtf\Fixture\DataFixture; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Fixture\DataFixture; /** * Class Role diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.php b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.php index 298cac0e65901cdb5f089011817e752eae702ea5..78053ea189cb6a4eb0feec26275b3bfccdf81eac 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.php @@ -6,12 +6,12 @@ namespace Magento\User\Test\Fixture; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\InjectableFixture; -use Mtf\Handler\HandlerFactory; -use Mtf\Repository\RepositoryFactory; -use Mtf\System\Config; -use Mtf\System\Event\EventManagerInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Handler\HandlerFactory; +use Magento\Mtf\Repository\RepositoryFactory; +use Magento\Mtf\System\Config; +use Magento\Mtf\System\Event\EventManagerInterface; /** * Class User diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/RoleId.php b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/RoleId.php index 641f36f34b545775600fa67e93367e60d84f851d..6ee9c5eb5ed81f2379f24ba2c4f3ef69cc3d96d3 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/RoleId.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/RoleId.php @@ -7,8 +7,8 @@ namespace Magento\User\Test\Fixture\User; use Magento\User\Test\Fixture\AdminUserRole; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class RoleId diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUserRole/AdminUserRoleInterface.php b/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUserRole/AdminUserRoleInterface.php index 7e2b3c353efce7a1cf2d7fa575799d942cc44a9d..a7d0408abdba75e672a9131b4d2b45b0ff4cdba9 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUserRole/AdminUserRoleInterface.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUserRole/AdminUserRoleInterface.php @@ -6,7 +6,7 @@ namespace Magento\User\Test\Handler\AdminUserRole; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface AdminUserRoleInterface diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUserRole/Curl.php b/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUserRole/Curl.php index cbad1e0fbbfd392d44075e31c865ba0c6be8daa0..1162d727958f3d04ebe85872fc2bfec934bd7009 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUserRole/Curl.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUserRole/Curl.php @@ -7,12 +7,12 @@ namespace Magento\User\Test\Handler\AdminUserRole; use Magento\Backend\Test\Handler\Extractor; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Handler/Curl/CreateRole.php b/dev/tests/functional/tests/app/Magento/User/Test/Handler/Curl/CreateRole.php index a5d600af5298643b4b2c429a4df4cbfc47438ed3..df5f11c9a29f313670df7bc214995db295741628 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Handler/Curl/CreateRole.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Handler/Curl/CreateRole.php @@ -7,12 +7,12 @@ namespace Magento\User\Test\Handler\Curl; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class CreateCategory. diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Handler/Curl/CreateUser.php b/dev/tests/functional/tests/app/Magento/User/Test/Handler/Curl/CreateUser.php index cfbd54c09a362330dc52eae2916cba606c6b8077..e3598d51730601640e449db524790058689e8226 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Handler/Curl/CreateUser.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Handler/Curl/CreateUser.php @@ -6,12 +6,12 @@ namespace Magento\User\Test\Handler\Curl; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Curl handler for persisting Magento user diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/Curl.php b/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/Curl.php index 703441ca08b3a2a3d128278d07b75f96b5df2436..23e8ae322300f6778065d5e91855df3c411ef203 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/Curl.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/Curl.php @@ -7,12 +7,12 @@ namespace Magento\User\Test\Handler\User; use Magento\Backend\Test\Handler\Extractor; -use Mtf\Fixture\FixtureInterface; -use Mtf\Handler\Curl as AbstractCurl; -use Mtf\System\Config; -use Mtf\Util\Protocol\CurlInterface; -use Mtf\Util\Protocol\CurlTransport; -use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\System\Config; +use Magento\Mtf\Util\Protocol\CurlInterface; +use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** * Class Curl diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/UserInterface.php b/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/UserInterface.php index 887313ad2b925bb20d10c206100942c89edd8a01..b18cd5603c8b6bb5c570e093b1e89390b4267127 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/UserInterface.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/UserInterface.php @@ -6,7 +6,7 @@ namespace Magento\User\Test\Handler\User; -use Mtf\Handler\HandlerInterface; +use Magento\Mtf\Handler\HandlerInterface; /** * Interface UserInterface diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Repository/AdminUser.php b/dev/tests/functional/tests/app/Magento/User/Test/Repository/AdminUser.php index cdb7260a8371be8d62ceee6f47dc6ece10db364b..9046699e1a452f9bb5b7987654c28a62594219e3 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Repository/AdminUser.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Repository/AdminUser.php @@ -6,7 +6,7 @@ namespace Magento\User\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class Admin User Repository diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Repository/AdminUserRole.php b/dev/tests/functional/tests/app/Magento/User/Test/Repository/AdminUserRole.php index 334fda5055bdcb757ab803d78a4ab190580351f8..5a94b249e7255e477a38ca9f359bd702b6fec562 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Repository/AdminUserRole.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Repository/AdminUserRole.php @@ -6,7 +6,7 @@ namespace Magento\User\Test\Repository; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Repository\AbstractRepository; /** * Class AdminUserRole diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Repository/Role.php b/dev/tests/functional/tests/app/Magento/User/Test/Repository/Role.php index 8c53310032984b006360837991a2d8ee1f5517c2..08eb926a06a3e94c0a16ab168b2e50b31a41eb59 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Repository/Role.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Repository/Role.php @@ -6,8 +6,8 @@ namespace Magento\User\Test\Repository; -use Mtf\Factory\Factory; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\Factory\Factory; +use Magento\Mtf\Repository\AbstractRepository; /** * Class Abstract Repository diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Repository/User.php b/dev/tests/functional/tests/app/Magento/User/Test/Repository/User.php index 16ef63904a209d3667f06136498f5991253f5f94..a8098084f2be48edf2b59489af69c85f967a2700 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Repository/User.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Repository/User.php @@ -6,8 +6,8 @@ namespace Magento\User\Test\Repository; -use Mtf\ObjectManager; -use Mtf\Repository\AbstractRepository; +use Magento\Mtf\ObjectManager; +use Magento\Mtf\Repository\AbstractRepository; /** * Class User @@ -24,8 +24,8 @@ class User extends AbstractRepository */ public function __construct(array $defaultConfig = [], array $defaultData = []) { - /** @var \Mtf\System\Config $systemConfig */ - $systemConfig = ObjectManager::getInstance()->create('Mtf\System\Config'); + /** @var \Magento\Mtf\System\Config $systemConfig */ + $systemConfig = ObjectManager::getInstance()->create('Magento\Mtf\System\Config'); $superAdminPassword = $systemConfig->getConfigParam('application/backend_user_credentials/password'); $this->_data['default'] = [ 'username' => 'admin', diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.php index b5ea8fd027ae6748b7cbfef6a17019d0405fb9a6..c77bc0c762a3da7f394ff6d16abdb468114350d5 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.php @@ -9,8 +9,8 @@ namespace Magento\User\Test\TestCase; use Magento\User\Test\Fixture\User; use Magento\User\Test\Page\Adminhtml\UserEdit; use Magento\User\Test\Page\Adminhtml\UserIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for CreateAdminUserEntityTest diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserRoleEntityTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserRoleEntityTest.php index 30918f5c1ca7c2450a853c06dd5036b48be2f142..57ae388e1a34cd35a209afbacee0758a62c99b6b 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserRoleEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserRoleEntityTest.php @@ -9,7 +9,7 @@ namespace Magento\User\Test\TestCase; use Magento\User\Test\Fixture\AdminUserRole; use Magento\User\Test\Page\Adminhtml\UserRoleEditRole; use Magento\User\Test\Page\Adminhtml\UserRoleIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for CreateAdminUserRolesEntity diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteAdminUserEntityTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteAdminUserEntityTest.php index 1d29e314eeedf57f4f9d2887b032d9f1cca67b81..d6d4c9f9debbcf682bb730836658839d0126416f 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteAdminUserEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteAdminUserEntityTest.php @@ -11,8 +11,8 @@ use Magento\Backend\Test\Page\Adminhtml\Dashboard; use Magento\User\Test\Fixture\User; use Magento\User\Test\Page\Adminhtml\UserEdit; use Magento\User\Test\Page\Adminhtml\UserIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for DeleteAdminUserEntity diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteUserRoleEntityTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteUserRoleEntityTest.php index 3e52e0369e7730237debe8bd25145234dbfa36fc..161917c3b546196c4ac0619af2aa9d94a2170da8 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteUserRoleEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteUserRoleEntityTest.php @@ -12,8 +12,8 @@ use Magento\User\Test\Fixture\AdminUserRole; use Magento\User\Test\Fixture\User; use Magento\User\Test\Page\Adminhtml\UserRoleEditRole; use Magento\User\Test\Page\Adminhtml\UserRoleIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for DeleteUserRoleEntity diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/RevokeAllAccessTokensForAdminWithoutTokensTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/RevokeAllAccessTokensForAdminWithoutTokensTest.php index 7de13a4d5027e6b8a32250491d592f0ec5859667..bdac1186edc8c541535c562ee183035336bd4e80 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/RevokeAllAccessTokensForAdminWithoutTokensTest.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/RevokeAllAccessTokensForAdminWithoutTokensTest.php @@ -9,7 +9,7 @@ namespace Magento\User\Test\TestCase; use Magento\User\Test\Fixture\User; use Magento\User\Test\Page\Adminhtml\UserEdit; use Magento\User\Test\Page\Adminhtml\UserIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Revoke all access tokens for admin without tokens. diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserEntityTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserEntityTest.php index 1bbe6addc155efe85bd21134084cd3d3d1a8e467..cad7c857bfb4794f0d5abb76d72e42045a7e8937 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserEntityTest.php @@ -11,8 +11,8 @@ use Magento\Backend\Test\Page\Adminhtml\Dashboard; use Magento\User\Test\Fixture\User; use Magento\User\Test\Page\Adminhtml\UserEdit; use Magento\User\Test\Page\Adminhtml\UserIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for UpdateAdminUserEntity diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserRoleEntityTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserRoleEntityTest.php index 108bafa3026a100837c2ffe00349449cb8156bda..06a396c982cbac2ccd316f69d478f20d0a6b9b00 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserRoleEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserRoleEntityTest.php @@ -12,7 +12,7 @@ use Magento\User\Test\Fixture\AdminUserRole; use Magento\User\Test\Fixture\User; use Magento\User\Test\Page\Adminhtml\UserRoleEditRole; use Magento\User\Test\Page\Adminhtml\UserRoleIndex; -use Mtf\TestCase\Injectable; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for UpdateAdminUserRoleEntity diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UserLoginAfterChangingPermissionsTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UserLoginAfterChangingPermissionsTest.php index cf96f02228fe7cf58e7c9ef01d39ba84d782dbb0..003e6640bdfe763919f694d9115d8a78e3d77ea4 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UserLoginAfterChangingPermissionsTest.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UserLoginAfterChangingPermissionsTest.php @@ -13,8 +13,8 @@ use Magento\User\Test\Page\Adminhtml\UserEdit; use Magento\User\Test\Page\Adminhtml\UserIndex; use Magento\User\Test\Page\Adminhtml\UserRoleEditRole; use Magento\User\Test\Page\Adminhtml\UserRoleIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\TestCase\Injectable; /** * Test that user can login from the first attempt just after his permissions were changed. diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist.php index 4c2bc63d30ead144ad8aa9ebd9d0e633805b7191..e147152e204622e2a7fd90d339ef5f183930bd4a 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist.php @@ -6,9 +6,9 @@ namespace Magento\Wishlist\Test\Block\Adminhtml\Customer\Edit\Tab; +use Magento\Mtf\Client\Element; use Magento\Backend\Test\Block\Widget\Tab; use Magento\Wishlist\Test\Block\Adminhtml\Customer\Edit\Tab\Wishlist\Grid; -use Mtf\Client\Element; /** * Class Wishlist diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php index 42e9203756977dba602c8485114237bc0bbda2fa..fd2a372a444733ab4e232d2314208b5f3a0e4940 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php @@ -6,8 +6,8 @@ namespace Magento\Wishlist\Test\Block\Adminhtml\Customer\Edit\Tab\Wishlist; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class Grid @@ -58,7 +58,7 @@ class Grid extends \Magento\Backend\Test\Block\Widget\Grid protected function delete() { $this->_rootElement->find($this->rowItem . ' ' . $this->deleteLink)->click(); - $this->_rootElement->acceptAlert(); + $this->browser->acceptAlert(); } /** @@ -91,7 +91,7 @@ class Grid extends \Magento\Backend\Test\Block\Widget\Grid * @param array $filter * @param bool $isSearchable [optional] * @param bool $isStrict [optional] - * @return Element + * @return SimpleElement */ protected function getRow(array $filter, $isSearchable = true, $isStrict = true) { @@ -119,7 +119,7 @@ class Grid extends \Magento\Backend\Test\Block\Widget\Grid ); } } - $location = $location . implode(' and ', $rows) . ']'; - return $this->_rootElement->find($location, Locator::SELECTOR_XPATH); + + return $this->_rootElement->find($location . implode(' and ', $rows) . ']', Locator::SELECTOR_XPATH); } } diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Sharing.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Sharing.php index baae27511671a97028086b9c7d7293bbc0578932..a85bd45da9299c3c4f4f4d93c8743bdf4184448f 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Sharing.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Sharing.php @@ -6,7 +6,7 @@ namespace Magento\Wishlist\Test\Block\Customer; -use Mtf\Block\Form; +use Magento\Mtf\Block\Form; /** * Class Sharing diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist.php index f3f8ac49c79c2c3f6d4cbafb257d7466b21b4a11..30e6dcd8dcca85ba922df43b610b552503fe2854 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist.php @@ -6,7 +6,7 @@ namespace Magento\Wishlist\Test\Block\Customer; -use Mtf\Block\Block; +use Magento\Mtf\Block\Block; /** * Class Wishlist diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items.php index 719133ed60643819cf769f9322e7f0fb56ec6a29..153f40522c7601c316545fb72e8a62f3ca361612 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items.php @@ -7,10 +7,9 @@ namespace Magento\Wishlist\Test\Block\Customer\Wishlist; use Magento\Wishlist\Test\Block\Customer\Wishlist\Items\Product; -use Mtf\Block\Block; -use Mtf\Client\Element; -use Mtf\Client\Element\Locator; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Block\Block; +use Magento\Mtf\Client\Locator; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class Items @@ -56,7 +55,6 @@ class Items extends Block { while ($this->_rootElement->find($this->remove)->isVisible()) { $this->_rootElement->find($this->remove)->click(); - $this->reinitRootElement(); } } } diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items/Product.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items/Product.php index bb241e9c6cf0e88debf149794196abdfca130a0e..5f427ca5531f3dabfa6297513defebd191875959 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items/Product.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items/Product.php @@ -6,8 +6,8 @@ namespace Magento\Wishlist\Test\Block\Customer\Wishlist\Items; -use Mtf\Block\Form; -use Mtf\Client\Element\Locator; +use Magento\Mtf\Block\Form; +use Magento\Mtf\Client\Locator; /** * Class Product @@ -114,8 +114,8 @@ class Product extends Form if ($viewDetails->isVisible()) { $this->_rootElement->find($this->footer, Locator::SELECTOR_XPATH)->click(); $viewDetails->click(); - $labels = $this->_rootElement->find($this->optionLabel)->getElements(); - $values = $this->_rootElement->find($this->optionValue)->getElements(); + $labels = $this->_rootElement->getElements($this->optionLabel); + $values = $this->_rootElement->getElements($this->optionValue); $data = []; foreach ($labels as $key => $label) { if (!$label->isVisible()) { diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertAddProductToWishlistSuccessMessage.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertAddProductToWishlistSuccessMessage.php index 05eada0d084a89a402b59a5b10e2c90e022d66e4..0e616a4d881dd06a42562fefb1601286b0ff56be 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertAddProductToWishlistSuccessMessage.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertAddProductToWishlistSuccessMessage.php @@ -7,8 +7,8 @@ namespace Magento\Wishlist\Test\Constraint; use Magento\Wishlist\Test\Page\WishlistIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class AssertAddProductToWishlistSuccessMessage diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertMoveProductToWishlistSuccessMessage.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertMoveProductToWishlistSuccessMessage.php index 371cce58db295d532473d01d34bc6157aa8ef35c..3bfdd344eb6e4296a1604136bf22d2b9391974c1 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertMoveProductToWishlistSuccessMessage.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertMoveProductToWishlistSuccessMessage.php @@ -7,8 +7,8 @@ namespace Magento\Wishlist\Test\Constraint; use Magento\Wishlist\Test\Page\WishlistIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class AssertAddProductToWishlistSuccessMessage diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductDetailsInWishlist.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductDetailsInWishlist.php index accea31efaf7abe037c81b9155b5279756dae0cb..791b72d28a99fba25af93d690d6f4e7015fe2eb1 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductDetailsInWishlist.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductDetailsInWishlist.php @@ -8,9 +8,9 @@ namespace Magento\Wishlist\Test\Constraint; use Magento\Cms\Test\Page\CmsIndex; use Magento\Wishlist\Test\Page\WishlistIndex; -use Mtf\Constraint\AbstractAssertForm; -use Mtf\Fixture\FixtureFactory; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Constraint\AbstractAssertForm; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class AssertBundleProductDetailsInWishlist diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductInCustomerWishlistOnBackendGrid.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductInCustomerWishlistOnBackendGrid.php index d8ed443bf8013861f7a6383fe8f31346b12c8bfa..afa3f5eb3db895b4497e47a60c52350780232bc4 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductInCustomerWishlistOnBackendGrid.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductInCustomerWishlistOnBackendGrid.php @@ -8,8 +8,8 @@ namespace Magento\Wishlist\Test\Constraint; use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit; use Magento\Wishlist\Test\Block\Adminhtml\Customer\Edit\Tab\Wishlist\Grid; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\FixtureInterface; /** * Class AssertProductInCustomerWishlistOnBackendGrid diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductIsPresentInCustomerBackendWishlist.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductIsPresentInCustomerBackendWishlist.php index 6f59d50f1d1d852188916d6b2c229fc6a9d97faf..8370fbd4a307c07f85d2e91ea6d0bdd9a095116d 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductIsPresentInCustomerBackendWishlist.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductIsPresentInCustomerBackendWishlist.php @@ -9,8 +9,8 @@ namespace Magento\Wishlist\Test\Constraint; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class AssertProductIsPresentInCustomerBackendWishlist diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductIsPresentInWishlist.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductIsPresentInWishlist.php index f0fee57f93b6aa1516ecc4fe1e9321cacb22d11a..88f0192ade221c13a8cff1dca8cc50ca34f539ff 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductIsPresentInWishlist.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductIsPresentInWishlist.php @@ -9,8 +9,8 @@ namespace Magento\Wishlist\Test\Constraint; use Magento\Cms\Test\Page\CmsIndex; use Magento\Customer\Test\Page\CustomerAccountIndex; use Magento\Wishlist\Test\Page\WishlistIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class AssertProductIsPresentInWishlist diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductsIsAbsentInWishlist.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductsIsAbsentInWishlist.php index dbd869d0a09931a2fcf6437f982e81de77b5c4a3..661cfac7c9b8da9d1bfc1975e60f0a33169de316 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductsIsAbsentInWishlist.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductsIsAbsentInWishlist.php @@ -12,8 +12,8 @@ use Magento\Customer\Test\Page\CustomerAccountIndex; use Magento\Customer\Test\Page\CustomerAccountLogin; use Magento\Customer\Test\Page\CustomerAccountLogout; use Magento\Wishlist\Test\Page\WishlistIndex; -use Mtf\Constraint\AbstractConstraint; -use Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Fixture\InjectableFixture; /** * Class AssertProductsIsAbsentInWishlist diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertWishlistIsEmpty.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertWishlistIsEmpty.php index 502839a77155d254e6a562962a7f835d7305c6b1..794e8b46076741827fe00005f15ca37850197a97 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertWishlistIsEmpty.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertWishlistIsEmpty.php @@ -8,7 +8,7 @@ namespace Magento\Wishlist\Test\Constraint; use Magento\Cms\Test\Page\CmsIndex; use Magento\Wishlist\Test\Page\WishlistIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertWishlistIsEmpty diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertWishlistShareMessage.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertWishlistShareMessage.php index cd96a7d611791fad5a53f66893f9629d4a842388..302e994568ddd2ab57a7f2a8c0eb7505cd4c19b3 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertWishlistShareMessage.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertWishlistShareMessage.php @@ -7,7 +7,7 @@ namespace Magento\Wishlist\Test\Constraint; use Magento\Wishlist\Test\Page\WishlistIndex; -use Mtf\Constraint\AbstractConstraint; +use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertWishlistShareMessage diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AbstractWishlistTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AbstractWishlistTest.php index 643858b155e9ab07211e9d2856444dadc5e5d7a1..b69fa2218ad10b758cfb53333ff8130514d52ca6 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AbstractWishlistTest.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AbstractWishlistTest.php @@ -10,9 +10,9 @@ use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Cms\Test\Page\CmsIndex; use Magento\Customer\Test\Fixture\CustomerInjectable; use Magento\Wishlist\Test\Page\WishlistIndex; -use Mtf\Fixture\FixtureFactory; -use Mtf\ObjectManager; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Fixture\FixtureFactory; +use Magento\Mtf\ObjectManager; +use Magento\Mtf\TestCase\Injectable; /** * Class AbstractWishlistTest diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ShareWishlistEntityTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ShareWishlistEntityTest.php index e50fb08c76c17d0cb71bf5a8f4d4446fa1ce8209..342066c81cdc0256516f55b60a2eeef650f78ebc 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ShareWishlistEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ShareWishlistEntityTest.php @@ -15,8 +15,8 @@ use Magento\Customer\Test\Page\CustomerAccountLogin; use Magento\Customer\Test\Page\CustomerAccountLogout; use Magento\Wishlist\Test\Page\WishlistIndex; use Magento\Wishlist\Test\Page\WishlistShare; -use Mtf\Client\Browser; -use Mtf\TestCase\Injectable; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\TestCase\Injectable; /** * Test Creation for ShareWishlistEntity @@ -149,14 +149,14 @@ class ShareWishlistEntityTest extends Injectable /** * Share wish list * - * @param Browser $browser + * @param BrowserInterface $browser * @param CustomerInjectable $customer * @param CatalogProductSimple $product * @param array $sharingInfo * @return void */ public function test( - Browser $browser, + BrowserInterface $browser, CustomerInjectable $customer, CatalogProductSimple $product, array $sharingInfo diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestStep/AddProductsToWishlistStep.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestStep/AddProductsToWishlistStep.php index 78e4ec4ed494656868ca8c81bffa10d568b4e2eb..615da8212ef2846f1dc30ceb8945e31b612845ed 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestStep/AddProductsToWishlistStep.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestStep/AddProductsToWishlistStep.php @@ -7,8 +7,8 @@ namespace Magento\Wishlist\Test\TestStep; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Mtf\Client\Browser; -use Mtf\TestStep\TestStepInterface; +use Magento\Mtf\Client\BrowserInterface; +use Magento\Mtf\TestStep\TestStepInterface; /** * Class AddProductsToWishlistStep @@ -33,7 +33,7 @@ class AddProductsToWishlistStep implements TestStepInterface /** * Interface Browser * - * @var Browser + * @var BrowserInterface */ protected $browser; @@ -47,13 +47,13 @@ class AddProductsToWishlistStep implements TestStepInterface /** * @constructor * @param CatalogProductView $catalogProductView - * @param Browser $browser + * @param BrowserInterface $browser * @param array $products * @param bool $configure [optional] */ public function __construct( CatalogProductView $catalogProductView, - Browser $browser, + BrowserInterface $browser, array $products, $configure = false ) { diff --git a/dev/tests/functional/testsuites/Mtf/TestSuite/GithubPublicationTests.php b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/GithubPublicationTests.php similarity index 98% rename from dev/tests/functional/testsuites/Mtf/TestSuite/GithubPublicationTests.php rename to dev/tests/functional/testsuites/Magento/Mtf/TestSuite/GithubPublicationTests.php index 415b2955215140f8299216e7e5cea6e35639586a..69eea437e7eaa09f9471214311a28e7d935b9134 100644 --- a/dev/tests/functional/testsuites/Mtf/TestSuite/GithubPublicationTests.php +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/GithubPublicationTests.php @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ -namespace Mtf\TestSuite; +namespace Magento\Mtf\TestSuite; /** * Test suite prepared for Github Publication diff --git a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests.php b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests.php similarity index 81% rename from dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests.php rename to dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests.php index 30d57ac5a5ff45c74c46f124e94bb19e1520b058..1cc1259d981bdd3c1026079080987996ed57a5b8 100644 --- a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests.php +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests.php @@ -4,11 +4,11 @@ * See COPYING.txt for license details. */ -namespace Mtf\TestSuite; +namespace Magento\Mtf\TestSuite; -use Mtf\ObjectManager; -use Mtf\ObjectManagerFactory; -use Mtf\TestRunner\Configuration; +use Magento\Mtf\ObjectManager; +use Magento\Mtf\ObjectManagerFactory; +use Magento\Mtf\TestRunner\Configuration; /** * Class InjectableTests @@ -70,12 +70,12 @@ class InjectableTests extends \PHPUnit_Framework_TestSuite /** * Prepare test suite and apply application state * - * @return \Mtf\TestSuite\AppState + * @return \Magento\Mtf\TestSuite\AppState */ public function prepareSuite() { $this->init(); - return $this->objectManager->create('Mtf\TestSuite\AppState'); + return $this->objectManager->create('Magento\Mtf\TestSuite\AppState'); } /** @@ -99,12 +99,13 @@ class InjectableTests extends \PHPUnit_Framework_TestSuite $confFilePath = realpath( MTF_BP . '/testsuites/' . $_ENV['testsuite_rule_path'] . '/' . $configurationFileName . '.xml' ); - /** @var \Mtf\TestRunner\Configuration $testRunnerConfiguration */ - $testRunnerConfiguration = $objectManagerFactory->getObjectManager()->get('\Mtf\TestRunner\Configuration'); + /** @var \Magento\Mtf\TestRunner\Configuration $testRunnerConfiguration */ + $testRunnerConfiguration = $objectManagerFactory->getObjectManager() + ->get('\Magento\Mtf\TestRunner\Configuration'); $testRunnerConfiguration->load($confFilePath); $testRunnerConfiguration->loadEnvConfig(); - $shared = ['Mtf\TestRunner\Configuration' => $testRunnerConfiguration]; + $shared = ['Magento\Mtf\TestRunner\Configuration' => $testRunnerConfiguration]; $this->objectManager = $objectManagerFactory->create($shared); } } diff --git a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/acceptance.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/acceptance.xml similarity index 82% rename from dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/acceptance.xml rename to dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/acceptance.xml index 7fc208a5ffe96fb1d757b715ee9bf7205bf77109..1f74e74f5eee2b605c7d3bd120459f829828c21b 100644 --- a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/acceptance.xml +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/acceptance.xml @@ -6,7 +6,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../vendor/magento/mtf/Mtf/TestRunner/etc/testRunner.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/mtf/Magento/Mtf/TestRunner/etc/testRunner.xsd"> <rule scope="testcase"> <allow> <tag group="test_type" value="acceptance_test" /> diff --git a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/basic.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/basic.xml similarity index 75% rename from dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/basic.xml rename to dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/basic.xml index 60f1dab551315da92075c6a49aa3dbed86113e1f..a63d9da454d4d4df30b0996dbe425c2aec99b536 100644 --- a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/basic.xml +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/basic.xml @@ -6,7 +6,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../vendor/magento/mtf/Mtf/TestRunner/etc/testRunner.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/mtf/Magento/Mtf/TestRunner/etc/testRunner.xsd"> <rule scope="testsuite"> <allow> <namespace value="Magento" /> diff --git a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/bat_ce.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/bat_ce.xml similarity index 91% rename from dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/bat_ce.xml rename to dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/bat_ce.xml index 913566809024a2790efc57976a54d39da7c72657..e875401e6e82d7f5237231537d5380f493ffc79d 100644 --- a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/bat_ce.xml +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/bat_ce.xml @@ -6,7 +6,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../vendor/magento/mtf/Mtf/TestRunner/etc/testRunner.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/mtf/Magento/Mtf/TestRunner/etc/testRunner.xsd"> <rule scope="testsuite"> <allow> <!--Products--> diff --git a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/domain_cs.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_cs.xml similarity index 73% rename from dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/domain_cs.xml rename to dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_cs.xml index eb0fd76bdba8aaba9a4e1f8b0cc691c4a07f0fb1..621c5d1e068d6973cc789079741265a1d1e734d0 100644 --- a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/domain_cs.xml +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_cs.xml @@ -6,7 +6,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../vendor/magento/mtf/Mtf/TestRunner/etc/testRunner.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/mtf/Magento/Mtf/TestRunner/etc/testRunner.xsd"> <rule scope="testcase"> <allow> <tag group="domain" value="CS" /> diff --git a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/domain_mx.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_mx.xml similarity index 73% rename from dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/domain_mx.xml rename to dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_mx.xml index c6d1305ff3d7e9ae2cdae76557c21447116599ea..12891acd39b81676cd6585614ba57dd8d1241364 100644 --- a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/domain_mx.xml +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_mx.xml @@ -6,7 +6,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../vendor/magento/mtf/Mtf/TestRunner/etc/testRunner.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/mtf/Magento/Mtf/TestRunner/etc/testRunner.xsd"> <rule scope="testcase"> <allow> <tag group="domain" value="MX" /> diff --git a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/domain_ps.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_ps.xml similarity index 73% rename from dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/domain_ps.xml rename to dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_ps.xml index 2790fcf7ce3fc8fdb8ce3501c8c78479e68c7a4b..fbbe25a921692250aa5df18ad2866ed1527115af 100644 --- a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/domain_ps.xml +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_ps.xml @@ -6,7 +6,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../vendor/magento/mtf/Mtf/TestRunner/etc/testRunner.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/mtf/Magento/Mtf/TestRunner/etc/testRunner.xsd"> <rule scope="testcase"> <allow> <tag group="domain" value="PS" /> diff --git a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/end_to_end_ce.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/end_to_end_ce.xml similarity index 95% rename from dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/end_to_end_ce.xml rename to dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/end_to_end_ce.xml index a4b021b33173f4121db4e328221b77253df2844b..9c14458282a1dd939155541dbbe6de8dcc5fcc6b 100644 --- a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/end_to_end_ce.xml +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/end_to_end_ce.xml @@ -6,7 +6,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../vendor/magento/mtf/Mtf/TestRunner/etc/testRunner.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/mtf/Magento/Mtf/TestRunner/etc/testRunner.xsd"> <rule scope="testsuite"> <allow> <!--Product search--> diff --git a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/installation.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/installation.xml similarity index 73% rename from dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/installation.xml rename to dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/installation.xml index e90f7639de25cc68291fb5feb211819d650916a1..262d254fe4c8c436d56c9f215572b72361b168b2 100644 --- a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/installation.xml +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/installation.xml @@ -6,7 +6,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../vendor/magento/mtf/Mtf/TestRunner/etc/testRunner.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/mtf/Magento/Mtf/TestRunner/etc/testRunner.xsd"> <rule scope="testsuite"> <allow> <module value="Magento_Install"/> diff --git a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/mvp.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/mvp.xml similarity index 73% rename from dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/mvp.xml rename to dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/mvp.xml index c3efd1454f1528182c613161d654bd6b38df00c6..220478d47ef3447ad74a43957fe76201863881c8 100644 --- a/dev/tests/functional/testsuites/Mtf/TestSuite/InjectableTests/mvp.xml +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/mvp.xml @@ -6,7 +6,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../vendor/magento/mtf/Mtf/TestRunner/etc/testRunner.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/mtf/Magento/Mtf/TestRunner/etc/testRunner.xsd"> <rule scope="testcase"> <allow> <tag group="mvp" value="yes" /> diff --git a/dev/tests/functional/utils/bootstrap.php b/dev/tests/functional/utils/bootstrap.php index 2910140e5dabf55153080ece4e8aea618af84c20..b2a8e0792a011d57cbf2873ad65c63e32f3a8144 100644 --- a/dev/tests/functional/utils/bootstrap.php +++ b/dev/tests/functional/utils/bootstrap.php @@ -14,6 +14,5 @@ $appRoot = dirname(dirname(dirname(dirname(__DIR__)))); require $appRoot . '/app/bootstrap.php'; require __DIR__ . '/../vendor/autoload.php'; -$objectManagerFactory = \Magento\Framework\App\Bootstrap::createObjectManagerFactory(BP, $_SERVER); -$objectManager = $objectManagerFactory->create($_SERVER); -\Mtf\ObjectManagerFactory::configure($objectManager); +$objectManager = \Magento\Mtf\ObjectManagerFactory::getObjectManager(); +\Magento\Mtf\ObjectManagerFactory::configure($objectManager); diff --git a/dev/tests/functional/utils/generate.php b/dev/tests/functional/utils/generate.php index 2e63dcb82aad8c2a041aeb60073b34c56637a936..7aa9b91f0f93971fde2dad50802e15c9c45248f3 100644 --- a/dev/tests/functional/utils/generate.php +++ b/dev/tests/functional/utils/generate.php @@ -5,13 +5,13 @@ */ require_once dirname(__FILE__) . '/' . 'bootstrap.php'; -$objectManager->create('Mtf\Util\Generate\TestCase')->launch(); -$objectManager->create('Mtf\Util\Generate\Page')->launch(); -$objectManager->create('Mtf\Util\Generate\Fixture')->launch(); -$objectManager->create('Mtf\Util\Generate\Constraint')->launch(); -$objectManager->create('Mtf\Util\Generate\Handler')->launch(); +$objectManager->create('Magento\Mtf\Util\Generate\TestCase')->launch(); +$objectManager->create('Magento\Mtf\Util\Generate\Page')->launch(); +$objectManager->create('Magento\Mtf\Util\Generate\Fixture')->launch(); +$objectManager->create('Magento\Mtf\Util\Generate\Constraint')->launch(); +$objectManager->create('Magento\Mtf\Util\Generate\Handler')->launch(); $objectManager->get('Magento\Framework\App\State')->setAreaCode('frontend'); -$objectManager->create('Mtf\Util\Generate\Repository')->launch(); +$objectManager->create('Magento\Mtf\Util\Generate\Repository')->launch(); -\Mtf\Util\Generate\GenerateResult::displayResults(); +\Magento\Mtf\Util\Generate\GenerateResult::displayResults(); diff --git a/dev/tests/functional/utils/generate/constraint.php b/dev/tests/functional/utils/generate/constraint.php index 70b6d73d413e0c3959b0aca031c82926dc9f7ca6..5dfd019f6c17046591a153cb136e0245dac581a3 100644 --- a/dev/tests/functional/utils/generate/constraint.php +++ b/dev/tests/functional/utils/generate/constraint.php @@ -5,5 +5,5 @@ */ require_once dirname(__DIR__) . '/' . 'bootstrap.php'; -$objectManager->create('Mtf\Util\Generate\Constraint')->launch(); -\Mtf\Util\Generate\GenerateResult::displayResults(); +$objectManager->create('Magento\Mtf\Util\Generate\Constraint')->launch(); +\Magento\Mtf\Util\Generate\GenerateResult::displayResults(); diff --git a/dev/tests/functional/utils/generate/factory.php b/dev/tests/functional/utils/generate/factory.php index e2bfb6ce2df5c209d3c3ae8022558eb26362233f..05c38495a2d7b9f4cac396ffab2f68bfa1ee7e2b 100644 --- a/dev/tests/functional/utils/generate/factory.php +++ b/dev/tests/functional/utils/generate/factory.php @@ -15,7 +15,7 @@ require MTF_BP . '/vendor/autoload.php'; $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); $om = $bootstrap->getObjectManager(); -/** @var \Mtf\Util\Generate\Factory $generator */ -$generator = $om->create('Mtf\Util\Generate\Factory'); +/** @var \Magento\Mtf\Util\Generate\Factory $generator */ +$generator = $om->create('Magento\Mtf\Util\Generate\Factory'); $generator->launch(); -\Mtf\Util\Generate\GenerateResult::displayResults(); +\Magento\Mtf\Util\Generate\GenerateResult::displayResults(); diff --git a/dev/tests/functional/utils/generate/fixture.php b/dev/tests/functional/utils/generate/fixture.php index 9d1581309cde7409233aa66c73b7b17e55468199..d2e13c07ba65505ed067bba4faf0e8b3516703dc 100644 --- a/dev/tests/functional/utils/generate/fixture.php +++ b/dev/tests/functional/utils/generate/fixture.php @@ -5,5 +5,5 @@ */ require_once dirname(__DIR__) . '/' . 'bootstrap.php'; -$objectManager->create('Mtf\Util\Generate\Fixture')->launch(); -\Mtf\Util\Generate\GenerateResult::displayResults(); +$objectManager->create('Magento\Mtf\Util\Generate\Fixture')->launch(); +\Magento\Mtf\Util\Generate\GenerateResult::displayResults(); diff --git a/dev/tests/functional/utils/generate/handler.php b/dev/tests/functional/utils/generate/handler.php index 147aae10f99b04d0c0033f7844bffa48f1655d9c..2e1b1bc7ef104abc9f6c02a2f6d3e5ead97bd487 100644 --- a/dev/tests/functional/utils/generate/handler.php +++ b/dev/tests/functional/utils/generate/handler.php @@ -5,5 +5,5 @@ */ require_once dirname(__DIR__) . '/' . 'bootstrap.php'; -$objectManager->create('Mtf\Util\Generate\Handler')->launch(); -\Mtf\Util\Generate\GenerateResult::displayResults(); +$objectManager->create('Magento\Mtf\Util\Generate\Handler')->launch(); +\Magento\Mtf\Util\Generate\GenerateResult::displayResults(); diff --git a/dev/tests/functional/utils/generate/page.php b/dev/tests/functional/utils/generate/page.php index c4cc602d289fe793d1dd11d82776b1e6a5010ee1..f15e030c24c4336ca032772a599839efcf234068 100644 --- a/dev/tests/functional/utils/generate/page.php +++ b/dev/tests/functional/utils/generate/page.php @@ -4,5 +4,5 @@ * See COPYING.txt for license details. */ require_once dirname(__DIR__) . '/' . 'bootstrap.php'; -$objectManager->create('Mtf\Util\Generate\Page')->launch(); -\Mtf\Util\Generate\GenerateResult::displayResults(); +$objectManager->create('Magento\Mtf\Util\Generate\Page')->launch(); +\Magento\Mtf\Util\Generate\GenerateResult::displayResults(); diff --git a/dev/tests/functional/utils/generate/repository.php b/dev/tests/functional/utils/generate/repository.php index 0179cab18c43ec616849e5114656e87cb00c3c01..5355cf45e759663ee3667e38182336f62c9bc524 100644 --- a/dev/tests/functional/utils/generate/repository.php +++ b/dev/tests/functional/utils/generate/repository.php @@ -6,5 +6,5 @@ require_once dirname(__DIR__) . '/' . 'bootstrap.php'; $objectManager->get('Magento\Framework\App\State')->setAreaCode('frontend'); -$objectManager->create('Mtf\Util\Generate\Repository')->launch(); -\Mtf\Util\Generate\GenerateResult::displayResults(); +$objectManager->create('Magento\Mtf\Util\Generate\Repository')->launch(); +\Magento\Mtf\Util\Generate\GenerateResult::displayResults(); 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 2309e3dbfa7ea26d396e4cdf55eb69e1ae592558..ec9723704da7ee667efaa7a61ce662caf7d49b04 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Db/Adapter/Mysql.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Db/Adapter/Mysql.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 fd1f83b2b043f93b64aed1232fd68c5e3b808f1c..f823efc6e1b0964f0950d159e59e72e155a421d0 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * MySQL platform database handler */ 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 cbb8303fc6d900d155062fa7d5cb60f1ac31f021..d8b79308b4a2ddd056ec101c48f668d9d96f7c78 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/integration/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php index e39928d690044be7bbf8276afb553b185ddba16d..713b6e42e32ab4462db340588139aebe52b43b1c 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Grid; use Magento\Framework\App\Bootstrap; 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 3aeb7044dc2679ded414c5d34f80a7b599bc64ed..883b43e6ef7c9797c9748ff6784ffc7054375f6c 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/Catalog/Controller/Adminhtml/Product/NewActionTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/NewActionTest.php index 0b6b0aac88e7d8555c508dc91b6eee985dcc1c80..4c5465fa32be618221cd3a835b297436a03265bb 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ded35b42fbbf3ce928ddc2ed427f8277f3436769..e91f71a3dbd3ac9d75ae3bbc81c8fee7d68f1705 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/CompareTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/CompareTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9a69bfb74fa9ed3c5231752a53f6d2fe80443da1..6535205bf7952692884141653d20e29dc43763ea 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9d4adc03375f4a5c4f69d48cc9b03374388ff405..766af41eb77bb545f40bf9eb84c4d3ac0574c7b8 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4d0db7515582db4c64d6bce76138b19a42cd830f..49b3901576e4a72fa22032059564beb5a0ad0c71 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 88041c87154c4a53dd16000cae357f7be8adf325..43e21347809a56f500f6c84c918cd5d100cbd077 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 1abea6b412188475305c07edf78f5e57fbeb2708..127025defec77eeb8bd12e898cd7fec4e24a2d7d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9cd202f4c073b2f099354678240fb9f355872af6..9b3387532ab4dc6a1d31a59c03aa62fe4b1413b0 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/CategoryUrlRewriteGeneratorTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/CategoryUrlRewriteGeneratorTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b012b9bc5ceb9f0483cec05f82cb25f6236717d8..3d410ba47f558b83bcc8d91d93bed5221a22f37c 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + require 'simple_product.php'; /** @var \Magento\Quote\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 bf5f3db33102d397cf5d192c6cd34f5f1c61de3d..f892d8e7abade648085ddb2cb5b6f1cc44d79a48 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ee0fb9721e02fddc2126a5b03170e2a2ee73bd16..69e7ee649b9a3fe42006d772ba3c613c3a4ff23f 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 05b199d588294b1e0da7035464782fc6bc1e56d1..b3c492d07d29ce2d775ca328f070d90ccb5be646 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 65e19b28c8005d2eeaa61eda88a89ae0ebcc2250..b2dd9e25b682027b88aa1a1a940f70c0f1a2556b 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 760bff128035a468a0bacd51eeca00616a882a37..b3961b0edbc99779c7ce31fedc6c06e658b141ba 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Variable/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Variable/ConfigTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ce1f87bae5ca9093b4343f4334431e640262d194..229a899bfe198014a9e128b96a3cad967fd3e262 --- a/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 bed8311b66666ac23891b431f16b5508fe714eed..f05eabf4e646c9159768b9e06f71c764c8a88ecd --- a/dev/tests/integration/testsuite/Magento/Customer/Controller/AjaxLoginTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/AjaxLoginTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 74c601fcbfb89d1c8b1e2f89f5bd2449ed154239..a36d9f9be6991f3c53609968910694053fec1cca 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/CustomerRegistryTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/CustomerRegistryTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 a2c4e2b4330f1e0f63fd578527fbdd7926826792..9409d8607459ff11c9a5edf581677b4600ed1a55 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 b509986ad98edbd14e1d967a729ba83fe716f9f2..73012c62e5cfde76deba26e987bca4e5f12ea609 100644 --- a/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Export/AddressTest.php +++ b/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Export/AddressTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9956a84d8ef08f4cbf591d4904b06690cc9a302f..802d203628aaab984beec52d8200c5f4a23120f4 100644 --- a/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php +++ b/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 143899361816a3dc12348da871128f9cf35bc8d0..018c8b1c71e89679b86a824bafccf0a881dd1dd0 100644 --- a/dev/tests/integration/testsuite/Magento/Directory/Model/ObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/Directory/Model/ObserverTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 2bb8ef0c6f2bf4839fa9c2c866f87b94d245c00f..17b240e156d18cadf0f3ffd403172a3ab3cfb11d 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + $billingAddress = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Sales\Model\Order\Address', [ diff --git a/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php b/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php index 3344852fa45c5412ff7245095c2a19395a99048e..a1f054261ad1d8963c4614e426c90e3874ceefe0 100644 --- a/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php +++ b/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php @@ -34,7 +34,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase $objectManager->get('Magento\Framework\Model\Context'), $objectManager->get('Magento\Framework\View\DesignInterface'), $objectManager->get('Magento\Framework\Registry'), - $objectManager->get('Magento\Core\Model\App\Emulation'), + $objectManager->get('Magento\Store\Model\App\Emulation'), $objectManager->get('Magento\Store\Model\StoreManager'), $objectManager->create('Magento\Framework\Filesystem'), $objectManager->create('Magento\Framework\View\Asset\Repository'), 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 028007540e460e526eb2bb099785ae2bf0b1babb..5ef77c5a35df7a16d73bd6cc1f27f8e236070302 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 de68dad400be59536059db46b66e949b65b38638..8625ff972836b0c3cb949bb4c17e5696e34afbbf 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php @@ -4,48 +4,75 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Interception\Fixture; 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 5df8f6194e21b30ef8833e08cb4ec4baeba28aff..6537af6d81d661675876e1bb7e56794b9526d562 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 @@ -15,6 +15,7 @@ class InterfacePlugin * @param \Closure $next * @param string $param1 * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundC(InterceptedInterface $subject, \Closure $next, $param1) { @@ -32,16 +33,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 a62fba71a142f612d338050acb60402fa43550db..f8ce0abe8d8b9d0c285df20abfaed1c35e176690 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 @@ -15,33 +15,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 753ad18a32d888ba4307a660714b1d41536fe178..4087d96fe7448748b6749e780c5d3ac598572ca9 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedInterface.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedInterface.php @@ -4,11 +4,20 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + 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 243f5ff826bec4c7a1fab96b1db073549f8ed611..976821372a60ac325d2b5c51ff878a00105f66bf 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParent.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParent.php @@ -4,15 +4,24 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + 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 4e5af1f9bfb0cf609e54b89f2f560a735e72a51d..e2b8d95d4be16bf862a6094904b672b1b1fef852 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParentInterface.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParentInterface.php @@ -4,9 +4,15 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Interception\Fixture; interface InterceptedParentInterface { + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function A($param1); } 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 e673471242dc188416746526982d48ed5a8def67..486b24864741b7a6757d1129b5e2b0466d6be708 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 df6d447b8a902f267400143c5c131216d96f2454..8730fa5f88420e71a973474287186f737c8ab161 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e552d9e04e8dbc7a69c6b928ec6ec3e86d081d75..de404bc3b42ae039e77d7f478f371b37a52e3cca 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Stdlib/Cookie/CookieScopeTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Stdlib/Cookie/CookieScopeTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 ae239fdf418860d6a0a7d471800f5fca25dff21e..bd8e0b968f0befb09696951bd0a38c0f631f797a 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Stdlib/Cookie/PhpCookieReaderTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Stdlib/Cookie/PhpCookieReaderTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\Stdlib\Cookie; use Magento\Framework\Stdlib\Cookie\PhpCookieReader; @@ -52,4 +54,4 @@ class PhpCookieReaderTest extends \PHPUnit_Framework_TestCase { $_COOKIE = $this->preTestCookies; } -} \ No newline at end of file +} diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Validator/FactoryTest.php b/dev/tests/integration/testsuite/Magento/Framework/Validator/FactoryTest.php similarity index 81% rename from dev/tests/integration/testsuite/Magento/Core/Model/Validator/FactoryTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Validator/FactoryTest.php index eeaaba1172a8bf836b52d8e4dd4bead5f5645de3..2a25d44f2b656b0d6a08d07b1404b11b1557c224 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Validator/FactoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Validator/FactoryTest.php @@ -1,11 +1,11 @@ <?php /** - * Integration test for \Magento\Core\Model\Validator\Factory + * Integration test for \Magento\Framework\Validator\Factory * * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Core\Model\Validator; +namespace Magento\Framework\Validator; class FactoryTest extends \PHPUnit_Framework_TestCase { @@ -17,8 +17,8 @@ class FactoryTest extends \PHPUnit_Framework_TestCase public function testGetValidatorConfig() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var \Magento\Core\Model\Validator\Factory $factory */ - $factory = $objectManager->get('Magento\Core\Model\Validator\Factory'); + /** @var \Magento\Framework\Validator\Factory $factory */ + $factory = $objectManager->get('Magento\Framework\Validator\Factory'); $this->assertInstanceOf('Magento\Framework\Validator\Config', $factory->getValidatorConfig()); // Check that default translator was set $translator = \Magento\Framework\Validator\AbstractValidator::getDefaultTranslator(); 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 0d41f9bd54d3349ce2f58fbbca5de3b3a05c25ae..3c445575a6fdaff22b07b36ebe0a5bf565769369 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/EntityAbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/EntityAbstractTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 49cadf9818468612d802b504d60ab0a781547290..f8d1592526586595cfc4a0876cd54d1acecfd03f 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 4869f2de7494a0718b2a74b9175c7cb56d640d39..273b2a0de635195f6412854472ff2a065af95ae1 100644 --- a/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php +++ b/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c5eeff1fa5183418b1906a49d1a1f6eadbe8b56e..b5defd098a0dad2727e0a48f30505420586cbb82 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Controller\Adminhtml\Report\Product; /** 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 1ce6751ecb9387907235f454d9ad70b491563c36..64a7aea1d1cb5c1d6da78a4049716fc0b9adef66 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 @@ -47,6 +47,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) { @@ -92,6 +93,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/Reports/_files/viewed_products.php b/dev/tests/integration/testsuite/Magento/Reports/_files/viewed_products.php index c533298f6b35962bc7495ced319bf3330cb2df64..cd856d8ee58d79fc70bf2d3a3b6e7ba0ab5f3894 100644 --- a/dev/tests/integration/testsuite/Magento/Reports/_files/viewed_products.php +++ b/dev/tests/integration/testsuite/Magento/Reports/_files/viewed_products.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 3afe59ef076e030dcff48b6d26d2ea9a2d0fe156..1675b709557b08d840203ce96c40fb85f5d17097 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 1b4d9e68d3019b6efbebd10ca65c9d28adbab2f8..e1d3c2c021b63f5dfa2f37bb24b91ad9d5c95207 100644 --- a/dev/tests/integration/testsuite/Magento/Review/Block/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Review/Block/FormTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c859ec0d9950e81c3ddf69349790b0a8d76e1ce2..cdeb6cc7102516f45a7c4794551fe272d8600ce4 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 a41f51dea23ffc365c3b6de1d7dd8b91a3d9b0d1..dfd4511b37c4b6e3becded198d8ab4f1191f023a 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/_files/order.php +++ b/dev/tests/integration/testsuite/Magento/Sales/_files/order.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 bcd7663b2173482a90399f4796384f865129ea75..6bbd0430c0bfc3f3a637465ea1aa9d5b30ea0d55 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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/Core/Model/App/EmulationTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/App/EmulationTest.php similarity index 75% rename from dev/tests/integration/testsuite/Magento/Core/Model/App/EmulationTest.php rename to dev/tests/integration/testsuite/Magento/Store/Model/App/EmulationTest.php index 6bd0071e9409f9d301de908f5137e8f1e084a735..d374b8cea90345fe3f13f7765fb2d1bf42133327 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/App/EmulationTest.php +++ b/dev/tests/integration/testsuite/Magento/Store/Model/App/EmulationTest.php @@ -3,23 +3,23 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Core\Model\App; +namespace Magento\Store\Model\App; class EmulationTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Core\Model\App\Emulation + * @var \Magento\Store\Model\App\Emulation */ protected $_model; /** - * @covers \Magento\Core\Model\App\Emulation::startEnvironmentEmulation - * @covers \Magento\Core\Model\App\Emulation::stopEnvironmentEmulation + * @covers \Magento\Store\Model\App\Emulation::startEnvironmentEmulation + * @covers \Magento\Store\Model\App\Emulation::stopEnvironmentEmulation */ public function testEnvironmentEmulation() { $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Core\Model\App\Emulation'); + ->create('Magento\Store\Model\App\Emulation'); \Magento\TestFramework\Helper\Bootstrap::getInstance() ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() diff --git a/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php index 50bb1ab77ac2d11ac63ac774967664e8781bb2b7..af24b2b206fb178470dab6329e7e8d18dc1c4b9a 100644 --- a/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php +++ b/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Store\Model; use Magento\Framework\App\Bootstrap; 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 0ff1439b7d6f2295e73f464219b7f6d8a39bbc60..2085012b1f1fe060dd7d4cc825b102ab031c420b 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RateRepositoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RateRepositoryTest.php @@ -12,6 +12,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 { /** @@ -507,6 +510,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/Tax/Model/Sales/Total/Quote/SetupUtil.php b/dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote/SetupUtil.php index 512d07d9fbdc66ecd52ac768af7836c93f0fade4..573cc9d964267c3353c31b73a8bad36e417af5cc 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5163182cd51c5ee16defd8fe5241f2761fcffb30..cd731795215d0bf9f049576684f167634af2e53c 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 e1fa1b0d22374666dcdf207a7172961043972b17..2f1d00c08c99e2b86cc3807e4028d66f8dd49447 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Pricing/AdjustmentTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Pricing/AdjustmentTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Tax\Pricing; class AdjustmentTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/integration/testsuite/Magento/TaxImportExport/Model/Rate/CsvImportHandlerTest.php b/dev/tests/integration/testsuite/Magento/TaxImportExport/Model/Rate/CsvImportHandlerTest.php index de8fa89724500d947fec6e2d01fe3f121863aa40..465309edf17721e36d7caaadbdba747d587f736f 100644 --- a/dev/tests/integration/testsuite/Magento/TaxImportExport/Model/Rate/CsvImportHandlerTest.php +++ b/dev/tests/integration/testsuite/Magento/TaxImportExport/Model/Rate/CsvImportHandlerTest.php @@ -8,7 +8,7 @@ namespace Magento\TaxImportExport\Model\Rate; class CsvImportHandlerTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Tax\Model\Rate\CsvImportHandler + * @var \Magento\TaxImportExport\Model\Rate\CsvImportHandler */ protected $_importHandler; diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php index 0ba4b440cfa637179a911ff82eb1aadb2b5c2a0e..0529cf8577a6f2580ac498424d64e0dab7b60e48 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Test\Integrity; class LayoutTest extends \PHPUnit_Framework_TestCase 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 fa3ba33cdd0783140a9b910971e082bc0c1e3a49..b3a71c7e530fb006c4ef758a74960543c6d79564 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php @@ -43,6 +43,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 7461e380b7967aa5661f522af9dfdb260b309005..af6e3cd1cb7e6271e3cb2cd4d1263b7162ad71aa 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/TemplateFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/TemplateFilesTest.php @@ -62,6 +62,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/integration/testsuite/Magento/User/Controller/Adminhtml/User/InvalidateTokenTest.php b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/User/InvalidateTokenTest.php index 0d80739d9b45725820475fb555b33282b4083a86..65c7948cd5a8ba7157d215373aa30d316f00f011 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 b91b15f6e961e170294cecf76fe0829d055eec6d..08648da473c851fe13211ba5ef7700b9fd1320c9 100644 --- a/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\User\Model; /** diff --git a/dev/tests/integration/testsuite/Magento/Weee/Model/TaxTest.php b/dev/tests/integration/testsuite/Magento/Weee/Model/TaxTest.php index cd38e2d88b7d874829f57f2117119a18dc180a00..bc287e21e45b11b2bee282f38ab70c5250327966 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/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php index 9f15a97686b6233c26e1945a2a79f91b4c3d9d91..60099ca1a352254869aee777fbfea1c2c4b7be51 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2d5cb31d0e4f8deee4f58b2fb431e91f11f0e902..72264a8ccf60d40c0a06515cdfc02b31e26e3297 100644 --- a/dev/tests/integration/testsuite/Magento/Wishlist/Helper/RssTest.php +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Helper/RssTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 new file mode 100644 index 0000000000000000000000000000000000000000..a87c8afb8126863eff1a568451fcadbf941ab1b9 --- /dev/null +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/BlacklistInterface.php @@ -0,0 +1,20 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +// @codingStandardsIgnoreFile + +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); +} 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 ecbc37577bdf99af054153e8d547f4fab884aa1c..ed5c2b33fdb300f95da2efff0e1ceb3835ad1575 100644 --- a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeMessDetector.php +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeMessDetector.php @@ -9,21 +9,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 @@ -33,8 +35,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; } /** @@ -44,35 +46,31 @@ class CodeMessDetector implements \Magento\TestFramework\CodingStandard\ToolInte */ public function canRun() { - return class_exists('PHP_PMD_TextUI_Command'); + return class_exists('PHPMD\TextUI\Command'); } /** - * 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 \PHPMD\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); + $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/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer.php b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer.php index 75807b3d1d84e214cf9edb9565819fe77670b4ea..8fad6ea044f991990631bfc98b90822e7875ff3f 100644 --- a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer.php +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer.php @@ -12,28 +12,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 @@ -50,64 +57,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(); @@ -116,14 +100,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 67b9a1ca31842d22f9a647497f5baf8d2e9fbcd2..7d3b1a991127a5d06c2f8214efc15a283b70bc40 100644 --- a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CopyPasteDetector.php +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CopyPasteDetector.php @@ -4,19 +4,30 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * PHP Copy Paste Detector v1.4.0 tool wrapper */ 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 @@ -25,7 +36,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; } /** @@ -45,17 +64,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; @@ -64,8 +80,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 0000000000000000000000000000000000000000..8d8f8e966f23e65c5d41c8f35a126c10881be467 --- /dev/null +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/ExtensionInterface.php @@ -0,0 +1,19 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +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 43967eac691bc8b917ef606ebee3a32dd79d7e77..41cf691cdf9e240f8894f9d985807db3018d14d0 100644 --- a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/ToolInterface.php +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/ToolInterface.php @@ -19,13 +19,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/Magento/TestFramework/Utility/ChangedFiles.php b/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php index 4ed93a6e9bb3b134566559d12db5101deef36fbe..d513da4dc16777bdb7223e38c8c0068feb58570c 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php +++ b/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php @@ -6,6 +6,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 @@ -22,16 +24,14 @@ class ChangedFiles public static function getPhpFiles($changedFilesList) { $fileHelper = \Magento\Framework\Test\Utility\Files::init(); - $allPhpFiles = $fileHelper->getPhpFiles(); if (isset($_ENV['INCREMENTAL_BUILD'])) { - $phpFiles = file($changedFilesList, FILE_IGNORE_NEW_LINES); - foreach ($phpFiles as $key => $phpFile) { - $phpFiles[$key] = $fileHelper->getPathToSource() . '/' . $phpFile; + $phpFiles = Files::readLists($changedFilesList); + if (!empty($phpFiles)) { + $phpFiles = \Magento\Framework\Test\Utility\Files::composeDataSets($phpFiles); + $phpFiles = array_intersect_key($phpFiles, $fileHelper->getPhpFiles()); } - $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/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 fec684fd4c0cef81ee58855b1d480cb64be43407..8f71637e829994b74f55a926b80e2a68bc3e2789 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,22 +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); - } - - public function testGetReportFile() - { - $this->assertEquals(self::REPORT_FILE, $this->_tool->getReportFile()); + $this->_tool->run($whiteList); } } diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/ComposerTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/ComposerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..97039e891351231f60d6c028e57585596dfd78aa --- /dev/null +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/ComposerTest.php @@ -0,0 +1,439 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Test\Integrity; + +use Magento\Framework\Composer\MagentoComponent; +use Magento\Framework\Test\Utility\Files; +use Magento\Framework\Shell; +use Magento\Framework\Exception; + +/** + * A test that enforces validity of composer.json files and any other conventions in Magento components + */ +class ComposerTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\Shell + */ + private static $shell; + + /** + * @var bool + */ + private static $isComposerAvailable; + + /** + * @var string + */ + private static $root; + + /** + * @var \stdClass + */ + private static $rootJson; + + /** + * @var array + */ + private static $dependencies; + + /** + * @var string + */ + private static $composerPath = 'composer'; + + public static function setUpBeforeClass() + { + if (defined('TESTS_COMPOSER_PATH')) { + self::$composerPath = TESTS_COMPOSER_PATH; + } + self::$shell = self::createShell(); + self::$isComposerAvailable = self::isComposerAvailable(); + self::$root = Files::init()->getPathToSource(); + self::$rootJson = json_decode(file_get_contents(self::$root . '/composer.json'), true); + self::$dependencies = []; + } + + public function testValidComposerJson() + { + $invoker = new \Magento\Framework\Test\Utility\AggregateInvoker($this); + $invoker( + /** + * @param string $dir + * @param string $packageType + */ + function ($dir, $packageType) { + $this->assertComposerAvailable(); + $file = $dir . '/composer.json'; + $this->assertFileExists($file); + self::$shell->execute(self::$composerPath . ' validate --working-dir=%s', [$dir]); + $contents = file_get_contents($file); + $json = json_decode($contents); + $this->assertCodingStyle($contents); + $this->assertMagentoConventions($dir, $packageType, $json); + }, + $this->validateComposerJsonDataProvider() + ); + } + + /** + * @return array + */ + public function validateComposerJsonDataProvider() + { + $root = \Magento\Framework\Test\Utility\Files::init()->getPathToSource(); + $result = []; + foreach (glob("{$root}/app/code/Magento/*", GLOB_ONLYDIR) as $dir) { + $result[$dir] = [$dir, 'magento2-module']; + } + foreach (glob("{$root}/app/i18n/magento/*", GLOB_ONLYDIR) as $dir) { + $result[$dir] = [$dir, 'magento2-language']; + } + foreach (glob("{$root}/app/design/adminhtml/Magento/*", GLOB_ONLYDIR) as $dir) { + $result[$dir] = [$dir, 'magento2-theme']; + } + foreach (glob("{$root}/app/design/frontend/Magento/*", GLOB_ONLYDIR) as $dir) { + $result[$dir] = [$dir, 'magento2-theme']; + } + foreach (glob("{$root}/lib/internal/Magento/*", GLOB_ONLYDIR) as $dir) { + $result[$dir] = [$dir, 'magento2-library']; + } + $result[$root] = [$root, 'project']; + + return $result; + } + + /** + * Some of coding style conventions + * + * @param string $contents + */ + private function assertCodingStyle($contents) + { + $this->assertNotRegExp('/" :\s*["{]/', $contents, 'Coding style: no space before colon.'); + $this->assertNotRegExp('/":["{]/', $contents, 'Coding style: a space is necessary after colon.'); + } + + /** + * Enforce Magento-specific conventions to a composer.json file + * + * @param string $dir + * @param string $packageType + * @param \StdClass $json + * @throws \InvalidArgumentException + */ + private function assertMagentoConventions($dir, $packageType, \StdClass $json) + { + $this->assertObjectHasAttribute('name', $json); + $this->assertObjectHasAttribute('license', $json); + $this->assertObjectHasAttribute('type', $json); + $this->assertObjectHasAttribute('version', $json); + $this->assertVersionInSync($json->name, $json->version); + $this->assertObjectHasAttribute('require', $json); + $this->assertEquals($packageType, $json->type); + if ($packageType !== 'project') { + self::$dependencies[] = $json->name; + $this->assertHasMap($json); + $this->assertMapConsistent($dir, $json); + } + switch ($packageType) { + case 'magento2-module': + $xml = simplexml_load_file("$dir/etc/module.xml"); + $this->assertConsistentModuleName($xml, $json->name); + $this->assertDependsOnPhp($json->require); + $this->assertDependsOnFramework($json->require); + $this->assertDependsOnInstaller($json->require); + $this->assertRequireInSync($json); + break; + case 'magento2-language': + $this->assertRegExp('/^magento\/language\-[a-z]{2}_[a-z]{2}$/', $json->name); + $this->assertDependsOnFramework($json->require); + $this->assertDependsOnInstaller($json->require); + $this->assertRequireInSync($json); + break; + case 'magento2-theme': + $this->assertRegExp('/^magento\/theme-(?:adminhtml|frontend)(\-[a-z0-9_]+)+$/', $json->name); + $this->assertDependsOnPhp($json->require); + $this->assertDependsOnFramework($json->require); + $this->assertDependsOnInstaller($json->require); + $this->assertRequireInSync($json); + break; + case 'magento2-library': + $this->assertDependsOnPhp($json->require); + $this->assertRegExp('/^magento\/framework$/', $json->name); + $this->assertDependsOnInstaller($json->require); + $this->assertRequireInSync($json); + break; + case 'project': + sort(self::$dependencies); + $dependenciesListed = []; + foreach (array_keys((array)self::$rootJson['replace']) as $key) { + if (MagentoComponent::matchMagentoComponent($key)) { + $dependenciesListed[] = $key; + } + } + sort($dependenciesListed); + $nonDeclaredDependencies = array_diff(self::$dependencies, $dependenciesListed); + $nonexistentDependencies = array_diff($dependenciesListed, self::$dependencies); + $this->assertEmpty( + $nonDeclaredDependencies, + 'Following dependencies are not declared in the root composer.json: ' + . join(', ', $nonDeclaredDependencies) + ); + $this->assertEmpty( + $nonexistentDependencies, + 'Following dependencies declared in the root composer.json do not exist: ' + . join(', ', $nonexistentDependencies) + ); + break; + default: + throw new \InvalidArgumentException("Unknown package type {$packageType}"); + } + } + + /** + * Assert that there is map in specified composer json + * + * @param \StdClass $json + */ + private function assertHasMap(\StdClass $json) + { + $error = 'There must be an "extra->map" node in composer.json of each Magento component.'; + $this->assertObjectHasAttribute('extra', $json, $error); + $this->assertObjectHasAttribute('map', $json->extra, $error); + $this->assertInternalType('array', $json->extra->map, $error); + } + + /** + * Assert that component directory name and mapping information are consistent + * + * @param string $dir + * @param \StdClass $json + */ + private function assertMapConsistent($dir, $json) + { + preg_match('/^.+\/(.+)\/(.+)$/', $dir, $matches); + list(, $vendor, $name) = $matches; + $map = $json->extra->map; + $this->assertArrayHasKey(0, $map); + $this->assertArrayHasKey(1, $map[0]); + $this->assertRegExp( + "/{$vendor}\\/{$name}$/", + $map[0][1], + 'Mapping info is inconsistent with the directory structure' + ); + } + + /** + * Enforce package naming conventions for modules + * + * @param \SimpleXMLElement $xml + * @param string $packageName + */ + private function assertConsistentModuleName(\SimpleXMLElement $xml, $packageName) + { + $moduleName = (string)$xml->module->attributes()->name; + $this->assertEquals( + $packageName, + $this->convertModuleToPackageName($moduleName), + "For the module '{$moduleName}', the expected package name is '{$packageName}'" + ); + } + + /** + * Make sure a component depends on php version + * + * @param \StdClass $json + */ + private function assertDependsOnPhp(\StdClass $json) + { + $this->assertObjectHasAttribute('php', $json, 'This component is expected to depend on certain PHP version(s)'); + } + + /** + * Make sure a component depends on magento/framework component + * + * @param \StdClass $json + */ + private function assertDependsOnFramework(\StdClass $json) + { + $this->assertObjectHasAttribute( + 'magento/framework', + $json, + 'This component is expected to depend on magento/framework' + ); + } + + /** + * Make sure a component depends on Magento Composer Installer component + * + * @param \StdClass $json + */ + private function assertDependsOnInstaller(\StdClass $json) + { + $this->assertObjectHasAttribute( + 'magento/magento-composer-installer', + $json, + 'This component is expected to depend on magento/magento-composer-installer' + ); + } + + /** + * Assert that versions in root composer.json and Magento component's composer.json are not out of sync + * + * @param string $name + * @param string $version + */ + private function assertVersionInSync($name, $version) + { + $this->assertEquals( + self::$rootJson['version'], + $version, + "Version {$version} in component {$name} is inconsistent with version " + . self::$rootJson['version'] . ' in root composer.json' + ); + } + + /** + * Make sure requirements of components are reflected in root composer.json + * + * @param \StdClass $json + */ + private function assertRequireInSync(\StdClass $json) + { + $name = $json->name; + if (isset($json->require)) { + $errors = []; + foreach (array_keys((array)$json->require) as $depName) { + if ($depName == 'magento/magento-composer-installer') { + // Magento Composer Installer is not needed for already existing components + continue; + } + if (!isset(self::$rootJson['require-dev'][$depName]) && !isset(self::$rootJson['require'][$depName]) + && !isset(self::$rootJson['replace'][$depName])) { + $errors[] = "'$name' depends on '$depName'"; + } + } + if (!empty($errors)) { + $this->fail( + "The following dependencies are missing in root 'composer.json'," + . " while declared in child components.\n" + . "Consider adding them to 'require-dev' section (if needed for child components only)," + . " to 'replace' section (if they are present in the project)," + . " to 'require' section (if needed for the skeleton).\n" + . join("\n", $errors) + ); + } + } + } + + /** + * Convert a fully qualified module name to a composer package name according to conventions + * + * @param string $moduleName + * @return string + */ + private function convertModuleToPackageName($moduleName) + { + list($vendor, $name) = explode('_', $moduleName, 2); + $package = 'module'; + foreach (preg_split('/([A-Z][a-z\d]+)/', $name, -1, PREG_SPLIT_DELIM_CAPTURE) as $chunk) { + $package .= $chunk ? "-{$chunk}" : ''; + } + return strtolower("{$vendor}/{$package}"); + } + + /** + * Create shell wrapper + * + * @return \Magento\Framework\Shell + */ + private static function createShell() + { + return new Shell(new Shell\CommandRenderer, null); + } + + /** + * Check if composer command is available in the environment + * + * @return bool + */ + private static function isComposerAvailable() + { + try { + self::$shell->execute(self::$composerPath . ' --version'); + } catch (Exception $e) { + return false; + } + return true; + } + + /** + * Skip the test if composer is unavailable + */ + private function assertComposerAvailable() + { + if (!self::$isComposerAvailable) { + $this->markTestSkipped(); + } + } + + public function testComponentPathsInRoot() + { + if (!isset(self::$rootJson['extra']) || !isset(self::$rootJson['extra']['component_paths'])) { + $this->markTestSkipped("The root composer.json file doesn't mention any extra component paths information"); + } + $this->assertArrayHasKey( + 'replace', + self::$rootJson, + "If there are any component paths specified, then they must be reflected in 'replace' section" + ); + $flat = $this->getFlatPathsInfo(self::$rootJson['extra']['component_paths']); + while (list(, list($component, $path)) = each($flat)) { + $this->assertFileExists( + self::$root . '/' . $path, + "Missing or invalid component path: {$component} -> {$path}" + ); + $this->assertArrayHasKey( + $component, + self::$rootJson['replace'], + "The {$component} is specified in 'extra->component_paths', but missing in 'replace' section" + ); + } + foreach (array_keys(self::$rootJson['replace']) as $replace) { + if (!MagentoComponent::matchMagentoComponent($replace)) { + $this->assertArrayHasKey( + $replace, + self::$rootJson['extra']['component_paths'], + "The {$replace} is specified in 'replace', but missing in 'extra->component_paths' section" + ); + } + } + } + + /** + * @param array $info + * @return array + * @throws \Exception + */ + private function getFlatPathsInfo(array $info) + { + $flat = []; + foreach ($info as $key => $element) { + if (is_string($element)) { + $flat[] = [$key, $element]; + } elseif (is_array($element)) { + foreach ($element as $path) { + $flat[] = [$key, $path]; + } + } else { + throw new \Exception("Unexpected element 'in extra->component_paths' section"); + } + } + + return $flat; + } +} diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt index c6bac2ba9f3b3dd5970b717f88acea5427bb38bb..29a6687221a578eec95394ebb2161c46ceba331f 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt @@ -51,3 +51,17 @@ Model3 \Magento\TestModule2\Service\V1\Entity\ItemBuilder \Magento\TestModule4\Service\V1\Entity\DataObjectResponse \Magento\TestModule4\Service\V1\Entity\DataObjectRequest +\Magento\Mtf\ObjectManager\Config\Mapper\Dom +\Magento\Mtf\Data\Argument\Interpreter\Constant +\Magento\Mtf\Data\Argument\Interpreter\Boolean +\Magento\Mtf\Data\Argument\Interpreter\String +\Magento\Mtf\Data\Argument\Interpreter\Number +\Magento\Mtf\Data\Argument\Interpreter\NullType +\Magento\Mtf\Data\Argument\Interpreter\Object +\Magento\Mtf\Data\Argument\Interpreter\Argument +\Magento\Mtf\Data\Argument\Interpreter\ArrayType +\Magento\Mtf\Data\Argument\InterpreterInterface +\Magento\Mtf\Util\Generate\GenerateResult +\Magento\Mtf\Util\Generate\Repository\Resource +\Magento\Mtf\Client\Element +\Magento\Mtf\TestSuite\AppState \ No newline at end of file diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php index 17b1064d56f0893e4a57ad9eeb4c0512871f3467..dcb1b59726ce23c2a6deb25bba29b854908bac19 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php @@ -130,7 +130,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/Legacy/_files/obsolete_classes.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php index 50c4be7bfcaccea0ba7e01ab0070c4c669a2ab84..f12e7d360fea297c329082f978afe83b0d77d3db 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php @@ -1302,6 +1302,7 @@ return [ ['Magento\Core\Controller\Varien\DispatchableInterface'], ['Magento\Core\Controller\Varien\Front', 'Magento\Framework\App\FrontController'], ['Magento\Core\Controller\FrontInterface', 'Magento\Framework\App\FrontControllerInterface'], + ['Magento\Core\Model\App\Emulation', 'Magento\Store\Model\App\Emulation'], ['Magento\Core\Model\App\Handler'], ['Magento\Core\Model\App\Proxy'], ['Magento\Core\Model\Event\Config\SchemaLocator', 'Magento\Framework\Event\Config\SchemaLocator'], @@ -2853,4 +2854,5 @@ return [ ['Magento\Sales\Model\Quote\Address\Total\Nominal\Collector'], ['Magento\Sales\Model\Quote\Address\Total\Nominal\Shipping'], ['Magento\Sales\Model\Quote\Address\Total\Nominal\Subtotal'], + ['Magento\Core\Model\Validator\Factory', 'Magento\Framework\Validator\Factory'], ]; 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 246d4e1aa8a41eefd95ea71cd7c6b7853b28c416..724512ff417f5ce5c635e1c8ba45328e61d11284 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 @@ -7,6 +7,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6297a430b414de2bef3fa76cf7b2ffd81aa8ee6e..a648097786fb8e93016e61b84a4612753a0eab63 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 @@ -7,6 +7,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9ea166fe28d77ae86fe8d5b7b08552fab4606347..d2109ce14c60e1dba38d7630429f04b048a02124 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 @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 87e62ec811f7ec5d7a00c26adb354df8b9f7a616..07abf20721f22a252052d45b745506477b9b3a5b 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 @@ -7,6 +7,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 4ec266905e67125178983f212a4d1ff27cc07690..657908ba8229ca498fb7ab8816843bf783c8ac7f 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,8 +3,11 @@ * Doc block for this file */ +// @codingStandardsIgnoreFile + /** * 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/method_without_scope.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/coding_style/functions/method_without_scope.php index 146fae12ef89eb36dcece820c81f30f315090c77..368e768525ff3b4f4803e99989f77e71b4127b23 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 750b756fa073fc6862255aaf0c32c2f04ecca7b9..f70fe08470a7f4db321ecd41ffb1c67f39de3bbc 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,7 +8,11 @@ * @param int $moreEvenLongerParamForAllThatRoutineStuff * @param float $andThereGoesOneParameter * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ + +// @codingStandardsIgnoreFile + function thereGoesFunc($someLongParam, $anotherLongParam, $moreEvenLongerParamForAllThatRoutineStuff, $andThereGoesOneParameter ) { @@ -27,6 +31,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 +51,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 +71,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 +91,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 acd5360c0f161dc225ef3748c94dd6693d6eaaac..72c8cc4ad1c9fdb81ea4d3b2a61c57dbb317269b 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) { @@ -23,6 +26,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 c32855bbeb647f6bc8dab3d2ba69ba0f6ddbc6ff..b5f9052441eee9687e6e5f2e63d2a1f653b2f1dc 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,7 +6,11 @@ * @param string|null $a * @param bool $b * @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 312abd2e855cabb2556117f24650fb6d442b93c3..1c80b5708e93f60cca4910aaabc8a1351e5b6d65 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 de702f43d38cba8b1ee4347eeed15c95cb7b93d4..15c44b8e07818e1d57b0d8e284aebb7fc716ceaa 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 eaae02799752c6abc612f8fb6f1e0c06cc5be318..ff4ac13b9d000ac7e66839c8856b564184faea6f 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,10 @@ <?php +/** + * @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 977450de7cb1fde2403a98b083c03291f3060b85..2a24060a14dd0a5e99f9bbc5be4783dfc58ddc47 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Test\Php; use Magento\Framework\Test\Utility; @@ -10,7 +13,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; @@ -29,16 +32,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 * @@ -51,22 +44,40 @@ 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/common.txt', FILE_IGNORE_NEW_LINES); + + $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; + } + ); + + 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; } /** @@ -83,15 +94,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, @@ -112,8 +120,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, @@ -139,12 +147,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}" ); } @@ -152,18 +159,11 @@ 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() { - 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,40 +171,15 @@ class LiveCodeTest extends PHPUnit_Framework_TestCase } $this->assertEquals( - PHP_PMD_TextUI_Command::EXIT_SUCCESS, - $codeMessDetector->run($whiteList, self::$blackList), + Command::EXIT_SUCCESS, + $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; } /** @@ -221,14 +196,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 8b0e96b4500ba4c14ddb1afce061f51d3c2f6cfc..0000000000000000000000000000000000000000 --- 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 0e230d6265703550fb3222212211dc0d207d3c99..0000000000000000000000000000000000000000 --- 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 -# Exclude unit, integration, and api-functional tests from PSR-X code style check -dev/tests/api-functional -dev/tests/integration -dev/tests/unit -# 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 bd9a1028a5ede1523e4f9b691a9fdbac68e25b3f..0000000000000000000000000000000000000000 --- 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/phpmd/ruleset.xml b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml index c6cdc91d42f8d4882a2bcbafd5d031684070d780..8252342c83817d451b00a48bb645ca7ed4f2ce93 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 @@ -28,11 +28,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> 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 58699d3f8c545d6e7697a7668de6dff99b53ad07..ef69654a548bdbb4894794ce817bacaf32c88ae5 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/Quote/Model/Quote/Address/*Interface.php -app/code/Magento/Quote/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 diff --git a/dev/tests/unit/testsuite/Magento/AdminNotification/Block/ToolbarEntryTest.php b/dev/tests/unit/testsuite/Magento/AdminNotification/Block/ToolbarEntryTest.php index 683b1dee5850d8c70224d1d654da1d67383291f9..2c408ae1aa635035b8a725adf14327931f56950d 100644 --- a/dev/tests/unit/testsuite/Magento/AdminNotification/Block/ToolbarEntryTest.php +++ b/dev/tests/unit/testsuite/Magento/AdminNotification/Block/ToolbarEntryTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 7da41c293028ecf40bda13b890caf393de5d9cac..7b971cdb97f81cac457f630fd2d91795e9e05b6d 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 a273fb5b3fb41fcaf7af5821fa87fdfd7921a4bf..0a697297a03beedf9c1e86562069235829331f38 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 389f5054d8826b89257b3fd043ee71e71050e510..c6f1264a4bf780a03da397d75119b3b92c1d7aba 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f8dc96754c3c083ae84c93f54413626b54d28dd3..f790cefacb9d61c383d49e970949406b5128baab 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 03f7337a5cf486d20a82f276c5640b6d59834669..628361d81f6a3d89cf320ae43fa1b01e0be1ed88 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Controller\Adminhtml\Dashboard; /** @@ -47,4 +50,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 db0953e5722d085028cfa27646750a0f3f7dfdff..f5e8faa95a9be8a04eb291f52bb80574c848e9de 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Controller\Adminhtml\Dashboard; /** @@ -17,4 +20,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 659cfb0e7eee10e821b8a28f8c8f69ea6e44a3ff..ae26588381e0ffb254c6dd996d0bceee3c22538c 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Controller\Adminhtml\Dashboard; /** @@ -17,4 +20,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 a596b5601e1ad355b992642ca11fd13173f2f4eb..58c718b8e190b1efe189ad7045a5a574811a3819 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Controller\Adminhtml\Dashboard; /** @@ -17,4 +20,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 996b6678266e7b56110ed29738c9e2fafd7c5202..48669c595a16d13b8579d43886cfbdfa34b60648 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 @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 be9207e5c6fe8e3f904fc72d09047eb49c63a6ad..80535bd3a7a8e5750418770dfb53a34352508e73 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 @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 1ce3008588eb202ea59850c5eab1365494038ab7..ea9b0305958526150fa48ff9bb77f539315723e8 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8295bf4373e12a1588d3e0c94b68932179e94fbd..a7b8c95fb8dabfa13773461c44be29de7308b159 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/StructureTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/StructureTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Config; class StructureTest extends \PHPUnit_Framework_TestCase 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 eae156f7039938437c2d22f904e73250fa790eb5..ac801cd35c338ef38ae42c970d6bed179b8b6b8e 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Session/QuoteTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Session/QuoteTest.php @@ -7,6 +7,7 @@ namespace Magento\Backend\Model\Session; /** * Class QuoteTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class QuoteTest extends \PHPUnit_Framework_TestCase { @@ -89,6 +90,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/Backend/Model/UrlTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php index d2fcc6cd2408a2382c939faae45b12bb5e100aec..ab47208132cd1273112c856feb5ed4e045f02873 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 597f5a58b436d33ebbe216f9272a7d0d7e7bc460..c6f2121e63cdc5e47e74b92a47a86e799f6517e5 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 fc0e35d8a2496d6885bb79c83c870efec1bbd560..0ab5f8cd9e8d5fd87f5ff61829d2559c72b4d91d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3d35555c256ffe6b4ba3513012b35e36afa2d676..723814408cadc4b7889116c6403c9e6e4aa2557a 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Model/LinkManagementTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Model/LinkManagementTest.php @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Bundle\Model; use Magento\TestFramework\Helper\ObjectManager; diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Model/OptionRepositoryTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Model/OptionRepositoryTest.php index b8ad6a8a2fb1c345c88291752484bc6e44016552..7bff3de04713e455b38ba66d0e10c9d2f4fa8a11 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Model/OptionRepositoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Model/OptionRepositoryTest.php @@ -339,6 +339,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/Adjustment/CalculatorTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Adjustment/CalculatorTest.php index d50ffb47b6fa24815bb1bfac38987067bbb7df38..e86ce9938c915cbdf8f6e3799369ef15da055fcd 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Adjustment/CalculatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Adjustment/CalculatorTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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/BundleSelectionPriceTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionPriceTest.php index 716dbd625882a45c5b98d346a66b71ca42910681..ff9c9373125981f67ac32d6309ffcd2729c0a59e 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionPriceTest.php @@ -164,6 +164,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/Bundle/Pricing/Price/DiscountCalculatorTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/DiscountCalculatorTest.php index 46abdf85c13bfcda31c12644a64377dacef5747f..90d9ecf56f2387de963e7197590c06a56b0a2645 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/DiscountCalculatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/DiscountCalculatorTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 8a342f55a5c87369dac42a2837a6605af73e9aeb..f57db1fc2ba47beae2a5e6ee1cf8b88b0ae6c43c 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/GroupPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/GroupPriceTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 cd333f1084e3cff0d28d1bdfa84ff1dfd2447265..067a798dec8dc8a001a76435698acf630677bdae 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2dbbedd282848d4a8a1b1bf201c64b63e424b42b..c210938a5655d4b3800c3deb0d34f9eae01005b6 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Layer/ViewTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Layer/ViewTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 bd0a63848a01e8e69c9d7db0a963913724715b5d..8489f90f8d4e53f0dfe818b56f11408101ec5be5 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/AbstractProductTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/AbstractProductTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 07939b4af2997ff94e5426f516d66ceb2f856f72..a24913f94e3f91f9b86f6cff3c5d7ae351358fda 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ViewTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ViewTest.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Block\Product; class ViewTest extends \PHPUnit_Framework_TestCase 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 268dc23b7c20b3f6cf6fa9d28b34307b8f350632..9e484f562bb08123cadec8eddd78dd23d956beaf 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 @@ -7,6 +7,7 @@ namespace Magento\Catalog\Controller\Adminhtml\Category; /** * Class SaveTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class SaveTest extends \PHPUnit_Framework_TestCase { @@ -79,6 +80,7 @@ class SaveTest extends \PHPUnit_Framework_TestCase * Set up * * @return void + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function setUp() { @@ -208,6 +210,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/Adminhtml/Category/Widget/CategoriesJsonTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Widget/CategoriesJsonTest.php index 73cb35cd910c4b8e12cda9294a04807b96547152..13653fcab211b966830e17e652903415833a0c0a 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 @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a9341574976c6e8c2e50929ef21e0bda6479f003..e8fbd0e48984574c4777584a8d6b3e17207ee017 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 @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8651eeddaeee9fd0fffd04af7ed694aec1db03c6..4fbc2520073e6ae996e19915e3867e0054b62aa2 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 @@ -4,10 +4,17 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + 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/App/Action/ContextPluginTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/App/Action/ContextPluginTest.php index 6438e226925a5c989a5fe1e7a3270fe6d6c7a397..0b75edb91339b417287023ed54db3bc08c440e2c 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 f0172f61760bdbe472e76e366d7833d15ad6bd11..d81f994ac651139f5d067f2d1fbecabf0980858b 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b70e8603cf355c52c48265e83084f2054479cccf..2b53761a3e69ba8d4a736ffcce49883ededa169f 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 033aac16b2a35cee51994a18f891353f6cffc1b2..6d732839032ba270ab53d7dfd3199dd5ef86bb9c 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/AttributeRepositoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/AttributeRepositoryTest.php @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 7cd636423f6d8aa2ab36ad1e24fb9d3118733698..8b38af7d56cf11789780bb23e96598f7e90ec2cf 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/TreeTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/TreeTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 f2acac23f6346625626f088664ccc01d72849e7b..b6c02ba81cfe5261b5d83435b7725a0cd186c952 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/CategoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/CategoryTest.php @@ -4,8 +4,14 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + 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/Indexer/Category/AffectCacheTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Category/AffectCacheTest.php index e85a96138433567d9a28323d49efba28d7a646e4..0c429ca3b0d307f134f4c5a1c68383aaf01c45ed 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 b64b75a231673b668b1e4c87b9312edce0b9223e..3cc1ea6c9a7d9406173b79dec63690bca0772c41 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 22356c44c90b82d814a058f18c149ee00399e340..c666bd8fe562aea22d4df06cc205bb1497bea873 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 @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 57639149f1fd15f0eca6354ac51fa7d94d1d3e5a..70146267648875adab1acefe84c4b871c907e9c5 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d986cd69e08306de668d68de552ee619d5343c7f..0789115e201847cc1ea7cb953f864047e81aafad 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a81e075e87ec9499a462aac0f0f449e1c544dae9..9918a2a5aabe6f4fb30215b273836e604432afd0 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 db49b44bf81a2d42993513299c831989f24c2355..cc6bf85af0a54d84390fa245d1b8b0cb15c663f1 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 99311ea2d28f379fc85d332d889edb0aaa6305fa..99ff6566e00ffaad403427189c44837d9ed08f0b 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 f822e76b4069805d76d04a1d9a9e1c780d251ae7..dae378983bc9369da81837fd2e629605034e1494 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Layer\Category; class FilterableAttributeListTest extends \PHPUnit_Framework_TestCase 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 8ffb53ffbd420a855a59b3e21a6e480130990de8..74725687834c145cdc0e3676272f0eed0a8d3364 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 @@ -9,6 +9,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 */ @@ -46,6 +49,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 b131668677b1b0616b3d26d3e85fce0a83a36ec6..387c212cf3808a29c4fcf98c23cdcd4fc30ae665 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 @@ -34,6 +34,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 13e4651c380cebd7f5d0a908c107bf26b30d374b..e3cc7a3095c652a02d953ead43f7d1eba7bbd2f2 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 @@ -11,6 +11,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 { @@ -50,6 +51,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/Layer/FilterListTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/FilterListTest.php index a9597d643e96a3fc419f9a88b80df9c7ca7af935..4da641bc12ab3e75e33bb6b98d0843a74d6754fe 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/FilterListTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/FilterListTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 4c2b9e41b2d6c2d0266ac79524dba406af2bb518..2afb8894af13f6b52dcbd0cb8086abf1e88498d1 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Layer\Search; class FilterableAttributeListTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/LayerTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/LayerTest.php index ed43f9df57fdd64cf2a76584e14d093ef7530007..10a9fad9e999486018759af27d1f192ed99e2795 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/LayerTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/LayerTest.php @@ -10,6 +10,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/Layout/DepersonalizePluginTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layout/DepersonalizePluginTest.php index 402a945b676423da15a45630fd87c93f5f92c8b4..e3785dc0597438b0d723a5cfe4ffe143a504d6c5 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layout/DepersonalizePluginTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layout/DepersonalizePluginTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 9e557abe38c4f133a5533d61f5c3c8e660503d9a..eed3bbd143def33e8f46d8c6968e9f47cf79c233 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 @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e2b722a6467564aeaa678150909faf1f0bb4ab66..8cecb48fe4deead0a9b775ed82ce97377a44cbf3 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 @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 4a0a5f9c58899a16da698bbfd3a3aa2d50a94f07..e60e93c25a433e30b2ddd54ad448f464d9cffdd9 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 c9e3f52e0a5e6315a4cf12188c6222dd9950958d..e8ddde956122fedf3571fc65bdff631f624f332b 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 @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 095253b7ed2dafbd49f0c7757ae02fc1ea21d03a..33f854d885c7bc13e8a4a593bb2ea7ef9bdba848 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/LinkTypeProviderTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/LinkTypeProviderTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Product; class LinkTypeProviderTest extends \PHPUnit_Framework_TestCase @@ -66,6 +69,9 @@ class LinkTypeProviderTest extends \PHPUnit_Framework_TestCase ); } + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ public function testGetItems() { $expectedResult = []; 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 c49f3f2cbbac3600ce57d96efd64ee3887928f40..3474b5c24848e0bf0a3f3fab7c79accfc47ae74d 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 fe291a1c4ca11068d8f9521bbd39110410156233..9feb30c610fea1787ff97aba8e820b24d77b1346 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/PriceModifierTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/PriceModifierTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 9f63916000aeeb4e6cb06aeacaaeb3a5f11fb304..42e114740a7ace570859a3a2b7659ce25c16c62e 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/TierPriceManagementTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/TierPriceManagementTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5706d834dfd2a4cade0a9fcc91a5d2c8ab2ca29f..1dc92b950212b39003fed8943591093a4fd0247c 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; @@ -424,10 +427,16 @@ class ProductTest extends \PHPUnit_Framework_TestCase */ public function testSetQty() { - $this->productTypeInstanceMock->expects($this->once()) + $this->productTypeInstanceMock->expects($this->exactly(2)) ->method('getPriceInfo') ->with($this->equalTo($this->model)) ->will($this->returnValue($this->_priceInfoMock)); + + //initialize the priceInfo field + $this->model->getPriceInfo(); + //Calling setQty will reset the priceInfo field + $this->assertEquals($this->model, $this->model->setQty(1)); + //Call the setQty method with the same qty, getPriceInfo should not be called this time $this->assertEquals($this->model, $this->model->setQty(1)); $this->assertEquals($this->model->getPriceInfo(), $this->_priceInfoMock); } 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 480ffdde0eb181845215de5d3d0c77410fa782c6..a9421ac5ce0cc73ffac53060695692526b654e9d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 7612c2559d051079e60ffc642f21320871d33e62..f0eb9f0193f318c39e16f1c810a0e97f9b2def40 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Resource\Eav; class AttributeTest extends \PHPUnit_Framework_TestCase 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 f71dd5afe0878a1714d0912b9d69b75afd5383f1..77c9104daf06f5653d116d9483a636b96a7c4b8d 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3bdd598dc475c63dbd2b281a7907a0617b2f03e6..8ab0bf35a4b57062def707f55c4af7534902ef0a 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Model\Resource\Product\Option; class CollectionTest extends \PHPUnit_Framework_TestCase 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 5207893b9360ccbcdf6821e4175443699ec82123..1b316834f8c73764001a11ee8a1a791b05085bbc 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Rss/CategoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Rss/CategoryTest.php @@ -87,6 +87,9 @@ class CategoryTest extends \PHPUnit_Framework_TestCase ); } + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function testGetProductCollection() { $storeId = 1; 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 a3b8171283f65251df8d0ba28ef92faac8c65bad..e6b127982df8bf8e440020d8613ff001b022fd1f 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/BasePriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/BasePriceTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5aaf0fb679c0bafcb381db7815915f05ec7aa266..504c34b5318dabdc5f078c3b11b4683b0e4dc3c7 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/GroupPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/GroupPriceTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 5d5065baf36c2de8d2703faa0595a32ebd3d6234..e323dcce39eaeee6758cf2099f9e7c461ce7ed9b 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/TierPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/TierPriceTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Catalog\Pricing\Price; use Magento\Customer\Model\Group; diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/ObserverTest.php index f61d444b46b8ded5c4d7df2df636df8e1d0b3c71..069a87d165de4724a0137efd56900409da28057b 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/ObserverTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/ObserverTest.php @@ -85,6 +85,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 d8ed93ae763d33abf20de459a8894aecf950fabb..e6b3676c654765855eb011bffc39014dc4b98a93 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Spi/StockRegistryProviderTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Spi/StockRegistryProviderTest.php @@ -102,6 +102,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/CatalogRule/Model/CronTest.php b/dev/tests/unit/testsuite/Magento/CatalogRule/Model/CronTest.php index 60006335bf3e89dc2fa7d195c5ce910efe984ff6..03f996e09940ca502279302190f3c7da3125f7cc 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogRule/Model/CronTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogRule/Model/CronTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 9a2c294a8e47ef32eff44e22c75303b6627335c5..0a8fa28cf0e7e823c0934f5268c63fbc3b214173 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/CategoryTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/CategoryTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 46604676dcdf076b98b25085dc8a00f56212ac8a..bf6ac53ee909ac047bfcd28668d9c8719cdaa6e6 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/CustomerGroupTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/CustomerGroupTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 37b5f00dd658cddc089568874bb04f23bc6f2a09..304707fb2204dfd2d3f6a95af188291e71d0524a 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/ImportExportTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/ImportExportTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8a1609efa93fa666a69a0f822619e6ffb59884dc..c5645a8599abc0e9eb8de7dee5994961f91399ee 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/WebsiteTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogRule/Plugin/Indexer/WebsiteTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\CatalogRule\Plugin\Indexer; use Magento\TestFramework\Helper\ObjectManager; 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 870a89f5cec29fbc7affdcb12895378c43f278d1..656d52726e05c40c39f9c989afb93fdecf4b3e62 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/CatalogSearch/Model/Layer/Filter/AttributeTest.php b/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/AttributeTest.php index a07a8f57944171f130c634c5bc89a9c6d9635782..32ee450a8f41c247e4efac52822f14b11bd523cd 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 @@ -9,6 +9,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 { /** @@ -230,6 +233,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 bf6f97d3ba0d5946eb32dbdc7c9ba1d27a350bf0..eec5ad1b215e3e312d31578bf3a31eea6099b84f 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 @@ -227,6 +227,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 a3e127c566488fa300031248b8d47d4bd591924f..8b831e591e0f5658f53dce04611c4735b69bf17c 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 @@ -11,6 +11,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 2984882436fa62301995afc2a538ee7453faee52..2a2886db769f865ebc6bbd98ad2b25684beece55 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogWidget/Block/Product/ProductsListTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogWidget/Block/Product/ProductsListTest.php @@ -11,6 +11,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/Cart/ConfigureTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Controller/Cart/ConfigureTest.php new file mode 100644 index 0000000000000000000000000000000000000000..716661bd022b1c8f81e0fa397bb1bf4f48ae5232 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Checkout/Controller/Cart/ConfigureTest.php @@ -0,0 +1,250 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Checkout\Controller\Cart; + +/** + * Shopping cart edit tests + */ +class ConfigureTest extends \PHPUnit_Framework_TestCase +{ + + /** + * @var \Magento\Framework\ObjectManagerInterface | \PHPUnit_Framework_MockObject_MockObject + */ + protected $objectManagerMock; + + /** + * @var \Magento\Framework\View\Result\PageFactory | \PHPUnit_Framework_MockObject_MockObject + */ + protected $resultPageFactoryMock; + + /** + * @var \Magento\Framework\App\ResponseInterface | \PHPUnit_Framework_MockObject_MockObject + */ + protected $responseMock; + + /** + * @var \Magento\Framework\App\RequestInterface | \PHPUnit_Framework_MockObject_MockObject + */ + protected $requestMock; + + /** + * @var \Magento\Framework\Message\ManagerInterface | \PHPUnit_Framework_MockObject_MockObject + */ + protected $messageManagerMock; + + /** + * @var \Magento\Framework\App\Response\RedirectInterface | \PHPUnit_Framework_MockObject_MockObject + */ + protected $redirectMock; + + /** + * @var \Magento\Checkout\Controller\Cart\Configure | \PHPUnit_Framework_MockObject_MockObject + */ + protected $configureController; + + /** + * @var \Magento\Framework\App\Action\Context | \PHPUnit_Framework_MockObject_MockObject + */ + protected $contextMock; + + /** + * @var \Magento\Checkout\Model\Cart | \PHPUnit_Framework_MockObject_MockObject + */ + protected $cartMock; + + public function setUp() + { + $eventManagerMock = $this->getMockBuilder('Magento\Framework\Event\ManagerInterface') + ->disableOriginalConstructor() + ->setMethods([]) + ->getMockForAbstractClass(); + $urlMock = $this->getMockBuilder('Magento\Framework\UrlInterface') + ->disableOriginalConstructor() + ->setMethods([]) + ->getMockForAbstractClass(); + $actionFlagMock = $this->getMockBuilder('Magento\Framework\App\ActionFlag') + ->disableOriginalConstructor() + ->setMethods([]) + ->getMockForAbstractClass(); + $viewMock = $this->getMockBuilder('Magento\Framework\App\ViewInterface') + ->disableOriginalConstructor() + ->setMethods([]) + ->getMockForAbstractClass(); + $this->objectManagerMock = $this->getMockBuilder('Magento\Framework\ObjectManagerInterface') + ->disableOriginalConstructor() + ->setMethods([]) + ->getMockForAbstractClass(); + $this->responseMock = $this->getMockBuilder('Magento\Framework\App\ResponseInterface') + ->disableOriginalConstructor() + ->setMethods([]) + ->getMockForAbstractClass(); + $this->requestMock = $this->getMockBuilder('Magento\Framework\App\RequestInterface') + ->disableOriginalConstructor() + ->setMethods(['getParam']) + ->getMockForAbstractClass(); + $this->messageManagerMock = $this->getMockBuilder('Magento\Framework\Message\ManagerInterface') + ->disableOriginalConstructor() + ->setMethods([]) + ->getMockForAbstractClass(); + $this->redirectMock = $this->getMockBuilder('Magento\Framework\App\Response\RedirectInterface') + ->disableOriginalConstructor() + ->setMethods([]) + ->getMock(); + + $this->contextMock = $this->getMockBuilder('Magento\Framework\App\Action\Context') + ->setConstructorArgs( + [ + $this->requestMock, + $this->responseMock, + $this->objectManagerMock, + $eventManagerMock, + $urlMock, + $this->redirectMock, + $actionFlagMock, + $viewMock, + $this->messageManagerMock + ] + ) + ->setMethods([]) + ->getMock(); + $this->contextMock->expects($this->any())->method('getObjectManager')->willReturn($this->objectManagerMock); + $this->contextMock->expects($this->any())->method('getRequest')->willReturn($this->requestMock); + $this->contextMock->expects($this->any())->method('getResponse')->willReturn($this->responseMock); + $this->contextMock->expects($this->any())->method('getMessageManager')->willReturn($this->messageManagerMock); + $this->contextMock->expects($this->any())->method('getRedirect')->willReturn($this->redirectMock); + $scopeConfig = $this->getMockBuilder('Magento\Framework\App\Config\ScopeConfigInterface') + ->disableOriginalConstructor() + ->getMock(); + $session = $this->getMockBuilder('Magento\Checkout\Model\Session') + ->disableOriginalConstructor() + ->getMock(); + $storeManager = $this->getMockBuilder('Magento\Store\Model\StoreManagerInterface') + ->disableOriginalConstructor() + ->getMockForAbstractClass(); + $formKeyValidator = $this->getMockBuilder('Magento\Core\App\Action\FormKeyValidator') + ->disableOriginalConstructor() + ->getMockForAbstractClass(); + $this->cartMock = $this->getMockBuilder('Magento\Checkout\Model\Cart') + ->disableOriginalConstructor() + ->getMock(); + $this->resultPageFactoryMock = $this->getMockBuilder('Magento\Framework\View\Result\PageFactory') + ->disableOriginalConstructor() + ->getMock(); + + $this->configureController = new \Magento\Checkout\Controller\Cart\Configure( + $this->contextMock, + $scopeConfig, + $session, + $storeManager, + $formKeyValidator, + $this->cartMock, + $this->resultPageFactoryMock + ); + } + + /** + * Test checks controller call product view and send parameter to it + * + * @return void + */ + public function testPrepareAndRenderCall() + { + $quoteId = 1; + $actualProductId = 1; + $quoteMock = $this->getMockBuilder('Magento\Quote\Model\Quote') + ->disableOriginalConstructor() + ->getMock(); + $quoteItemMock = $this->getMockBuilder('Magento\Quote\Model\Quote\Item') + ->disableOriginalConstructor() + ->getMock(); + $productMock = $this->getMockBuilder('Magento\Catalog\Model\Product') + ->disableOriginalConstructor() + ->getMock(); + $viewMock = $this->getMockBuilder('Magento\Catalog\Helper\Product\View') + ->disableOriginalConstructor() + ->getMock(); + $pageMock = $this->getMockBuilder('Magento\Framework\View\Result\Page') + ->disableOriginalConstructor() + ->getMock(); + $buyRequestMock = $this->getMockBuilder('Magento\Framework\Object') + ->disableOriginalConstructor() + ->getMock(); + //expects + $this->requestMock->expects($this->at(0)) + ->method('getParam') + ->with('id') + ->willReturn($quoteId); + $this->requestMock->expects($this->at(1)) + ->method('getParam') + ->with('product_id') + ->willReturn($actualProductId); + $this->cartMock->expects($this->any())->method('getQuote')->willReturn($quoteMock); + + $quoteItemMock->expects($this->exactly(1))->method('getBuyRequest')->willReturn($buyRequestMock); + + $this->resultPageFactoryMock->expects($this->once())->method('create')->willReturn($pageMock); + $this->objectManagerMock->expects($this->at(0)) + ->method('get') + ->with('Magento\Catalog\Helper\Product\View') + ->willReturn($viewMock); + + $viewMock->expects($this->once())->method('prepareAndRender')->with( + $pageMock, + $actualProductId, + $this->configureController, + $this->callback( + function ($subject) use ($buyRequestMock) { + return $subject->getBuyRequest() === $buyRequestMock; + } + ) + )->willReturn($pageMock); + + $quoteMock->expects($this->once())->method('getItemById')->willReturn($quoteItemMock); + $quoteItemMock->expects($this->exactly(2))->method('getProduct')->willReturn($productMock); + + $productMock->expects($this->exactly(2))->method('getId')->willReturn($actualProductId); + + $this->assertSame($pageMock, $this->configureController->execute()); + } + + /** + * Test checks controller redirect user to cart + * if user request product id in cart edit page is not same as quota product id + * + * @return void + */ + public function testRedirectWithWrongProductId() + { + $quotaId = 1; + $productIdInQuota = 1; + $productIdInRequest = null; + $quoteItemMock = $this->getMockBuilder('Magento\Quote\Model\Quote\Item') + ->disableOriginalConstructor() + ->getMock(); + $quoteMock = $this->getMockBuilder('Magento\Quote\Model\Quote') + ->disableOriginalConstructor() + ->getMock(); + $productMock = $this->getMockBuilder('Magento\Catalog\Model\Product') + ->disableOriginalConstructor() + ->getMock(); + $this->requestMock->expects($this->at(0)) + ->method('getParam') + ->with('id') + ->willReturn($quotaId); + $this->requestMock->expects($this->at(1)) + ->method('getParam') + ->with('product_id') + ->willReturn($productIdInRequest); + $this->cartMock->expects($this->any())->method('getQuote')->willReturn($quoteMock); + $quoteMock->expects($this->once())->method('getItemById')->willReturn($quoteItemMock); + $quoteItemMock->expects($this->exactly(1))->method('getProduct')->willReturn($productMock); + $productMock->expects($this->exactly(1))->method('getId')->willReturn($productIdInQuota); + $this->messageManagerMock->expects($this->once())->method('addError'); + $this->redirectMock->expects($this->once())->method('redirect')->with($this->responseMock, 'checkout/cart', []); + $this->configureController->execute(); + } +} 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 5468c42017381a1a0a79784cfc1e4285908baa56..1fd79006a5b2246281f0eead91c956d616fd6b5a 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Controller/Onepage/IndexTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Controller/Onepage/IndexTest.php @@ -10,6 +10,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 92de0a169a8ac4ec0eb9f0b0a14e86814d82052c..c01449d988414ee12b160f2281910f6a9efed3e6 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Helper/CartTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Helper/CartTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Helper; use Magento\Framework\App\Action\Action; @@ -201,6 +204,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/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Helper/DataTest.php index b37fe984cc8f6c0ef9f971247f066e70633ee82e..9e88e7178acf602aaff791e8baed99a763aa46c0 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Helper/DataTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d01b6aa2d648fdc1143956c3b019333d6967a0b0..b09e0f6a6867208536a7a0b226935a9f86cdb129 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/Layout/DepersonalizePluginTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/Layout/DepersonalizePluginTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 5e47cead68f680c482f40c615bf10f84db701398..4151d9b246801171593acec670da372c0d8d9dc1 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/SessionTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/SessionTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 d9c86e7d48859b32684b4a8b81cdd8c9e6cfbc58..7b46a4a2c8eef0639e6cd0fd6665ed2182fc854d 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Model\Type; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; @@ -97,6 +99,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( @@ -379,6 +384,8 @@ class OnepageTest extends \PHPUnit_Framework_TestCase * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.ExcessiveParameterList) * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function testSaveBilling( $data, 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 3b853623ce4327dc3784047286860d5e6c456333..58e217926cce6342968f95136b76e44728188a43 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 @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 e1cd60d8d334baf5cbcfa03857b3339323d1d06c..3ee1ac05273836fd91952ae922c1d7a9bec9bc7e 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 @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 ec444630c5c72ab93636b42e6b68c01a421b913b..bd1cc59450f48748eb4bd2319461dd3e328328a6 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 @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 2485f8a6e17b44d294a73e70291e1f1772243076..2ba21342fb7c80d51ce612702e64233fb4695444 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 @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 f0fba140b1cad11817dde59bbc6e0d41cceb722c..a8263d45545b8b6c656c07c903baaed588dfa926 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 d1260cc7f48f5a13094ca4d8c374332ecf0d7b4e..f048bcee73581aff98024601c0fbc360cf7cd57d 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 b500f6372972a73a98fac13a01d11c91a0d10a38..f1798271d892555039d2100e4c3173889db2a518 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 64f5cffc6ce0f1d7484e2910a7477d6ec2b40787..88a8d47d4b82f50215e5163008381c14cabc8d36 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 @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 7434e70ad591ee3b927c31341de9a972b2e6d8d5..dbddf607aef71273db4661f10a546ae7f68911c1 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 @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5742b27ae5567a381582637c06d414ae80d8446c..d22275df465db4b253bb51721b22cf8a697e4f8c 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 @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 7c4d64ee12cacda6ddb2e6f69c8d456a2a68fa6c..005ae2f751719b25cee035e1aa72e12ef9e0825c 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 @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 64dcef35521a1eb39858c5213370440b4557e9fa..129fecea0aa042da157ed2a745d3abef24b15a47 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 @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 e20603f39db3d13af4df67614ea2e1e51a1774d2..db797717aca25c8d6f6cca034302c7d174015863 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 1aabf10474cc164f5658110864e92b8d52dac591..c69f3100bb813c29babe09e10ff58d2765439dc0 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 @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 005e01f97370e8ff01372cb36a323cb93d17df69..f512c563edc02f8cdcd32798bd98841ba1b78d64 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 @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 37ef4ab56a8922d11681ab84fc5338f0dc8252e0..b56618360da33ca5a9da58ce56503db33119ef80 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 @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Checkout\Service\V1\PaymentMethod; class WriteServiceTest extends \PHPUnit_Framework_TestCase 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 021506cdbb6349e2f36d92280f51637d0ed6359f..ffd990dfc3bfbc2b084c699cdc090269c08b5ec1 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/dev/tests/unit/testsuite/Magento/ConfigurableImportExport/Model/Export/RowCustomizerTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableImportExport/Model/Export/RowCustomizerTest.php index fe6b17f7b64945a7735936c72a22f623821a4ebe..f0c1ec9543a98ddce7eea519f16d85ab9abb01d6 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableImportExport/Model/Export/RowCustomizerTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableImportExport/Model/Export/RowCustomizerTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 1a66db756cb41875afc40b1a7dd87e9e90befa9c..a311d556f3db678b722e53ad62132a128cec0a77 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Helper/DataTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 afbc22d2ab4fa4eaafafb1f2ad685774e2038ccc..3c42dda177637b1bea20b69162de4b84957d7f50 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 efdb6f3b60ea7e8b6e47cb93d99e3e91d21601b7..252e24e70f3ebca45cf8aa2385cea834615a2e89 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\ConfigurableProduct\Model\Product\Type; /** 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 e53e31a9e71bfbf6d003bb72410a13269f1e5fcf..618adb2c0ec09339a101f0640564de29766c9adf 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 @@ -326,6 +326,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/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 45fa854c4b98a64b8609e4b33b473882bec7b21c..63fe1758344e6d932500f5f342e2146c7ec5f0a8 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b3fced22ce5914c36ee2002b5c7591fa4da34cf9..7d41bd7f67a3918f9b8dc3135e7ccae6eec7ea61 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/SuggestedAttributeListTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/SuggestedAttributeListTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\ConfigurableProduct\Model; class SuggestedAttributeListTest extends \PHPUnit_Framework_TestCase 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 6211a2b8d6d4c5bc3a878831c7a440ea7271591f..5d88d7b9e3158528d6d018c023e34d48c8fae2eb 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Pricing/Price/AttributePriceTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Pricing/Price/AttributePriceTest.php @@ -126,6 +126,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/Contact/Controller/Index/IndexTest.php b/dev/tests/unit/testsuite/Magento/Contact/Controller/Index/IndexTest.php index 9a65b3dc4a24a6ec0555dd69d503e8956bf35585..77f1a5a81b5d889dd8948326df68e4ade00ef482 100644 --- a/dev/tests/unit/testsuite/Magento/Contact/Controller/Index/IndexTest.php +++ b/dev/tests/unit/testsuite/Magento/Contact/Controller/Index/IndexTest.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9ff953a0b0c84a81760bb145986f069b4f75fa06..26e655449859b80fca1855cd426d19c7e0a2db1e 100644 --- a/dev/tests/unit/testsuite/Magento/Contact/Controller/IndexTest.php +++ b/dev/tests/unit/testsuite/Magento/Contact/Controller/IndexTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 3a4d656ce9349701e6ffeedb2199d148f0f01bb6..4fc132525ddb93cea4edb92969785eb3605688f9 100644 --- a/dev/tests/unit/testsuite/Magento/Contact/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Contact/Helper/DataTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 e07bb630bb156116d2b95041e9e17ecc6acd19b5..e8abb1785539627d7bc6a824ba188bdcac9a60fb 100644 --- a/dev/tests/unit/testsuite/Magento/Core/App/Router/NoRouteHandlerTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/App/Router/NoRouteHandlerTest.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f1e3d0e740a013b254136380f0778658f88ee7a3..49618259aed696df8ecfd7d4ed472a15ad294574 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Core\Helper; class ThemeTest 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 ce6b16735417918a11753b6051e71f197a8d6a01..c4d8376d265f93a8d1d95edd2d6f13d2068239fb 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Asset/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Asset/ConfigTest.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a017e16ad47497bcaa5581dc4b9b9ea04143eb43..38bbd0585dab14c286a7b85c543f9cc828a66ae3 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 @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 67d0ba772c37d8fd184a41c21c7e4cf501f74cf9..9f9fa70be441ebce8409c996fbd80078a26ecbee 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/DepersonalizePluginTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/DepersonalizePluginTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 73dd5f28bcb09cf5269ddb8be1827182e5a71016..0946f99a4428673dc048d988e4c9d277119018b5 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 d8e6b26db1304ee971360ad089b24b7369b10578..1d39b20dce769fcb868335b36e1d67250f85bed6 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/View/DesignTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/View/DesignTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 494a059576145e8ea0574974e2113005003081ec..1dff9e68fa72c5c0116b974ba13bdebaaeeff725 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c815cf90e997ef68bedbe9b5b085acba601cce6f..bba967cdbf8d8ebacb85c2b415430493e1708349 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 8a25a5dfab295f43f1460fe7f7f1151a556ea63f..7c491edfbfc483b64455583ab66d7fb9bee88a9d 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/DobTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/DobTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5e5ac45b3f10c2a4731f009feb5960893cece448..5976f3033d9563c4aa83008744ddf1768a6cb4a5 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/GenderTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/GenderTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 cd2be564342facebf3a2ae3d40eb28736845ad48..4986a88c4ab0452cb8dbf920ceaeae6dedbb0ad6 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/NameTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/NameTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Customer\Block\Widget; use Magento\Customer\Api\Data\AttributeMetadataInterface; @@ -409,6 +412,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/Block/Widget/TaxvatTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/TaxvatTest.php index 625a2af8f2a31edb6e811206de61952a5f85eb76..9ec8f85628191dab80c851b05ca82a118a500839 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/TaxvatTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/TaxvatTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 32fb9e96846ec6a16298eeb58ee6961016f9ac67..bd6a6616f385a0f6f13473a854a5cb660c2f3dcf 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/ConfirmTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/ConfirmTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 cfef2f2111e7720a0875907fbf31c374a2e6eb48..326dfd3427c802ef3116a8d3bb9c205804abb746 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreatePostTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreatePostTest.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Customer\Controller\Account; use Magento\Customer\Api\AccountManagementInterface; @@ -117,6 +120,9 @@ class CreatePostTest extends \PHPUnit_Framework_TestCase */ protected $messageManagerMock; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { /** 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 6cf60dea206b516d11f52c634d7dfd3825e92640..202d2a4319c55eb67c7d120beb7c3dfa1b4f33c4 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreateTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreateTest.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6b4df762a7ecd4f7135d33c7d6c566324192fec3..7dd5138256e04848cf3b09f898b9c4a1b4101caa 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 46d43acd309a63d730a58b8c0be7b27985404407..fcbe8fe3c6b2f1d5cf0da15a13524b2d447d0f0f 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Controller/Ajax/LoginTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Controller/Ajax/LoginTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 48425e87cefc42eaeb88abd0577737f734118c43..587ab8ec24e233d80d96870ffdf5a30443b82069 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Helper/Session/CurrentCustomerTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Helper/Session/CurrentCustomerTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f87981471b7ae6cef2451d916fca40edbb119ed4..ec8a8a50763b4690bc405c8403869b560111cb87 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/AddressTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/AddressTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Customer\Model\Resource; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; @@ -230,7 +232,7 @@ class AddressTest extends \PHPUnit_Framework_TestCase /** * Prepare validator mock object * - * @return \Magento\Core\Model\Validator\Factory|\PHPUnit_Framework_MockObject_MockObject + * @return \Magento\Framework\Validator\Factory|\PHPUnit_Framework_MockObject_MockObject */ protected function prepareValidatorFactory() { @@ -240,7 +242,7 @@ class AddressTest extends \PHPUnit_Framework_TestCase ->willReturn(true); $validatorFactory = $this->getMock( - 'Magento\Core\Model\Validator\Factory', + 'Magento\Framework\Validator\Factory', ['createValidator'], [], '', 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 018bd82a1946b219b9bb3e2924017a6d0b8d2a80..496164e7d3e30925c54ba828ba4ddfa13f555d6d 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/GroupTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/GroupTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 77f0be04722cabd12d0fe0e0d737294fc5510cfa..9766f8b4dfb4b8e823af840884910c510549f15e 100644 --- a/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Import/CustomerCompositeTest.php +++ b/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Import/CustomerCompositeTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9a9ebcaf3c39c577af3227008e0962896289c818..8e8cd46c46f7ad1e67de38db515c7a61381b853c 100644 --- a/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php +++ b/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 eb66ffaa0a512b744641e3c1e23c81ab15ac8113..2eb10c274c9b316fe2f959d2b69cd3733b941bc7 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\DesignEditor\Controller\Varien\Router; class StandardTest extends \PHPUnit_Framework_TestCase @@ -72,6 +75,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/Directory/Model/Resource/Country/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Directory/Model/Resource/Country/CollectionTest.php index 5fce71af34260d55fac021ba92acadae7223d565..6ed2d9637585b8ac5f6066de6e7d5a8e8b9311c9 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 dcd0396c8c4075bdac0395c7be4d08b00e4778b5..2be45254f3253432c3be106afce8cc3318b54730 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 cfd756727b44aeaaadfcf9b83ef37dd96d4327e8..861eaad796a58e9fe1fd438d43742dba0eff5ea2 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 062f984267f962f7b186ce8c9a15dc43b2b54703..cee50b4230c7aa6d1e2d60de11b2193a3f212f43 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 fed7d5d977bc3e855a2d4e087f02815d74f203f8..62a1032d5bc738117c0e428bf64b004f9f65cc05 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/AttributeManagementTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/AttributeManagementTest.php @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 f35715418935e9ab835d30b4fab40ad8ed479739..a9a07a925c3708a8b61a1c0e64bc35020d989e3e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8b4d1557541a9f1b8db1b90431573dd1488fe6d0..dcbb61434b3e9db4636cad53128e555319ebac04 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 bb9e4f7e1f4096a567615019ea2a1b7e867b58d1..1b18f8abfaffcf87efa4e7ca17172272782f69d8 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c33f650d7870b2958d8ba96bbe3893d490c87d53..595d38f50566191e9dae58822e12d29dfef27445 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 47cfc50804c01194f1dc8a703831a78ee0c711f1..fe240f2422bde4758f769f8d73f56257fff19446 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Email\Block\Adminhtml\Template; class PreviewTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Email/Model/TemplateTest.php b/dev/tests/unit/testsuite/Magento/Email/Model/TemplateTest.php index 7ff2358c4f2418b84133c905af8d97a756a2532c..f63b91e5ea668c01c7e135ebc1affea073fc133f 100644 --- a/dev/tests/unit/testsuite/Magento/Email/Model/TemplateTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Model/TemplateTest.php @@ -30,7 +30,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase $this->getMock('Magento\Framework\Model\Context', [], [], '', false), $this->getMock('Magento\Core\Model\View\Design', [], [], '', false), $this->getMock('Magento\Framework\Registry', [], [], '', false), - $this->getMock('Magento\Core\Model\App\Emulation', [], [], '', false), + $this->getMock('Magento\Store\Model\App\Emulation', [], [], '', false), $this->getMock('Magento\Store\Model\StoreManager', [], [], '', false), $this->getMock('Magento\Framework\Filesystem', [], [], '', false), $this->getMock('Magento\Framework\View\Asset\Repository', [], [], '', false), 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 fe97c3493894a6a36ad5344231f0d932c9bad783..ff35c7bc3f63f1db13d0dd109e406caa6cd08824 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Action/ActionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Action/ActionTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 4e5fbf432dcdd1bb26af8d69229ccbcd72be9818..7ff04a056c152b287132740763511918b7017a1a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/AreaListTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/AreaListTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 8b6623f6a15e5d24553fb4b96b4fc809cc814a28..e75b7b92ca79545033c66d3ece84f9eeb97cd4b2 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/BootstrapTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/BootstrapTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 7df5ce2fd7fc620d78114555d99ace847470a125..8b0716f74fefc290a6fce2957651c5a76d7a245f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManager/ConfigLoaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManager/ConfigLoaderTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d8c55f972051af092a12da2fabbe918853bb7fc4..06eb42dde552fcc622baab9ef2675604e46cdccd 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Request/HttpTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Request/HttpTest.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3c3b5ee00004a7b49b31e1b1dd573f5b5a1aebdb..a46c8e31ab9fd275a3b3c9f83de46c5f4c72c028 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/ResourceTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/ResourceTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 b00c2f73bbd42acd76fd4a633d45296f520bca15..96f474e92fa55bd016c6ab1866d7ca1d9f10df65 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/StaticResourceTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/StaticResourceTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\App; class StaticResourceTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/View/Asset/PublisherTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/View/Asset/PublisherTest.php index 4b3658be21981a6966f106cddeb526eee19a55ea..6d5c40ea63d013761e9fe36364cee1db4d29c641 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/View/Asset/PublisherTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/View/Asset/PublisherTest.php @@ -7,6 +7,7 @@ namespace Magento\Framework\App\View\Asset; use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\Filesystem\DriverPool; class PublisherTest extends \PHPUnit_Framework_TestCase { @@ -56,8 +57,8 @@ class PublisherTest extends \PHPUnit_Framework_TestCase $this->filesystem->expects($this->any()) ->method('getDirectoryWrite') ->will($this->returnValueMap([ - [DirectoryList::ROOT, $this->rootDirWrite], - [DirectoryList::STATIC_VIEW, $this->staticDirWrite], + [DirectoryList::ROOT, DriverPool::FILE, $this->rootDirWrite], + [DirectoryList::STATIC_VIEW, DriverPool::FILE, $this->staticDirWrite], ])); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/Autoload/ClassLoaderWrapperTest.php b/dev/tests/unit/testsuite/Magento/Framework/Autoload/ClassLoaderWrapperTest.php index 50bd31912845fb71434905f96322cb383c9c4207..bac8e50c417f27cff857ad1cbb694a4c0d0f79ee 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Autoload/ClassLoaderWrapperTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Autoload/ClassLoaderWrapperTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c0aed68861414402364d001cae1ae0e8d6cd79a5..ebf8885193066e14252f630f7150964c7ea23240 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Cache/CoreTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Cache/CoreTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 58c4d4761d89b98ba8b42f3b9b4ffec34d0c9a33..9987087c3d3ee84189eccab7a076f3ec2dc51972 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 @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + class ClassWithAllArgumentTypes { const DEFAULT_VALUE = 'Const Value'; 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 0de3d403d5885e1c0bc2fca674fece3b5b8b069e..090f0e015985c42b63fab89c8632103016e18601 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/Framework/Code/Validator/_files/ClassesForArgumentSequence.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForArgumentSequence.php index 4374a707577e8bc40a0dfb6b934ad2a72b9ae252..2351fea354730611502c147b1e455d956d6ef622 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 @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 0a4e6d30be129e70c0f1973a8d37d7bf4d006da6..a2a0dca965eefa392e9623a658c3667b0696389b 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 @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 40f13a0ae358a99148840327f5d60466df13c336..93cb41d540a7142106392eee6400f587f76769f7 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 @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e6d060cf06419cd9d28e2150e133e3d1a7414df9..ff245498d073626dc411c088b1de05f3a3db82f9 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 @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d03df69dee1d9ec97b85fd9fbc23d58a35e9dab4..f932a3ea151fcfb1635b950782577ac45ad1a69f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Config/Composer/PackageTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/Composer/PackageTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 90be29ca4621e472238cb5f51f03d434aca937f8..ef432cbfd3c7aa374dadbae4ca9884b6e4bf5cca 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Config/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/DataTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e28c03d36106e46bcde357a81c5cf768512fff9d..be23023b85c89a6b5f342c1f73b854c70a2cd7e5 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/DB/AbstractMapperTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/DB/AbstractMapperTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e22d3a334d854ea01de5b7869c472d5b8e03d874..1b1c50685df127ea3859602291c8b4307de93588 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 e4e04f216a07226c21fe1e5e02d83edb11acd764..3bbb57d093b01d4f70463a7de19fd5b335043238 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Collection/DbTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Collection/DbTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 06608c1f43bc22671c3760cd5d6a5eba02ebe997..a65be33f106bd60b7b771e24eba4fb05908c2e3e 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 f013ad13cfb7ce5b4f2a7ef451b46fda5c906d05..80c360d50d854bafd11c2186a53ce3f782761b04 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/File/CsvTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/File/CsvTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Test class for \Magento\Framework\File\Csv. */ diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php index b84c08e9a72c529606b33a3d4fdf4a857700222c..640724c6bb59081771f676b8a4bc27cf35985b90 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php @@ -77,7 +77,7 @@ class ReadTest extends \PHPUnit_Framework_TestCase $this->assertEquals(['some-stat-data'], $this->read->stat('correct-path')); } - public function testReadFileNoProtocol() + public function testReadFile() { $path = 'filepath'; $flag = 'flag'; @@ -95,32 +95,4 @@ class ReadTest extends \PHPUnit_Framework_TestCase $this->assertEquals($contents, $this->read->readFile($path, $flag, $context)); } - - public function testReadFileCustomProtocol() - { - $path = 'filepath'; - $flag = 'flag'; - $context = 'context'; - $protocol = 'ftp'; - $contents = 'contents'; - - $fileMock = $this->getMock('Magento\Framework\Filesystem\File\Read', [], [], '', false); - $fileMock->expects($this->once()) - ->method('readAll') - ->with($flag, $context) - ->will($this->returnValue($contents)); - - $this->driver->expects($this->once()) - ->method('getAbsolutePath') - ->with($this->path, $path, $protocol) - ->will($this->returnValue($path)); - $this->driver->expects($this->never()) - ->method('fileGetContents'); - $this->fileFactory->expects($this->once()) - ->method('create') - ->with($path, $protocol, $this->driver) - ->will($this->returnValue($fileMock)); - - $this->assertEquals($contents, $this->read->readFile($path, $flag, $context, $protocol)); - } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/ReadFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/ReadFactoryTest.php index f41817b6cf3c459859461727f6362df7ece8599c..41f52ea79834c3be4f8369397fb79afebf2e50c5 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/ReadFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/ReadFactoryTest.php @@ -12,45 +12,25 @@ use Magento\Framework\Filesystem\DriverPool; */ class ReadFactoryTest extends \PHPUnit_Framework_TestCase { - /** - * @param string|null $protocol - * @param \PHPUnit_Framework_MockObject_MockObject|null $driver - * @dataProvider createProvider - */ - public function testCreate($protocol, $driver) + public function testCreate() { $driverPool = $this->getMock('Magento\Framework\Filesystem\DriverPool', ['getDriver']); - if ($protocol) { - $driverMock = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface'); - $driverMock->expects($this->any())->method('isExists')->willReturn(true); - $driverPool->expects($this->once())->method('getDriver')->willReturn($driverMock); - } else { - $driverPool->expects($this->never())->method('getDriver'); - } - $factory = new ReadFactory($driverPool); - $result = $factory->create('path', $protocol, $driver); - $this->assertInstanceOf('Magento\Framework\Filesystem\File\Read', $result); - } - - /** - * @return array - */ - public function createProvider() - { + $driverPool->expects($this->never())->method('getDriver'); $driver = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface'); $driver->expects($this->any())->method('isExists')->willReturn(true); - return [ - [null, $driver], - ['custom_protocol', null] - ]; + $factory = new ReadFactory($driverPool); + $result = $factory->create('path', $driver); + $this->assertInstanceOf('Magento\Framework\Filesystem\File\Read', $result); } - /** - * @expectedException \InvalidArgumentException - */ - public function testCreateException() + public function testCreateWithDriverCode() { - $factory = new ReadFactory(new DriverPool()); - $factory->create('path'); + $driverPool = $this->getMock('Magento\Framework\Filesystem\DriverPool', ['getDriver']); + $driverMock = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface'); + $driverMock->expects($this->any())->method('isExists')->willReturn(true); + $driverPool->expects($this->once())->method('getDriver')->willReturn($driverMock); + $factory = new ReadFactory($driverPool); + $result = $factory->create('path', 'driverCode'); + $this->assertInstanceOf('Magento\Framework\Filesystem\File\Read', $result); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/WriteFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/WriteFactoryTest.php index 256dbf1a7c36cafa19e4e23d17d24bc0c32cf341..bd9c483346ecffd4cc09b1a63e7dd55f2c6d9a03 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/WriteFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/WriteFactoryTest.php @@ -5,63 +5,41 @@ */ namespace Magento\Framework\Filesystem\File; -use Magento\Framework\Filesystem\DriverPool; - /** * Class WriteFactoryTest */ class WriteFactoryTest extends \PHPUnit_Framework_TestCase { - /** - * @param string|null $protocol - * @param \PHPUnit_Framework_MockObject_MockObject|null $driver - * @dataProvider createProvider - */ - public function testCreate($protocol, $driver) + public function testCreate() { $driverPool = $this->getMock('Magento\Framework\Filesystem\DriverPool', ['getDriver']); - if ($protocol) { - $driverMock = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface'); - $driverMock->expects($this->any())->method('isExists')->willReturn(true); - $driverPool->expects($this->once())->method('getDriver')->willReturn($driverMock); - } else { - $driverPool->expects($this->never())->method('getDriver'); - } + $driverPool->expects($this->never())->method('getDriver'); $factory = new WriteFactory($driverPool); - $result = $factory->create('path', $protocol, $driver); - $this->assertInstanceOf('Magento\Framework\Filesystem\File\Write', $result); - } - - /** - * @return array - */ - public function createProvider() - { $driver = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface'); $driver->expects($this->any())->method('isExists')->willReturn(true); - return [ - [null, $driver], - ['custom_protocol', null] - ]; + $result = $factory->create('path', $driver); + $this->assertInstanceOf('Magento\Framework\Filesystem\File\Write', $result); } - /** - * @expectedException \InvalidArgumentException - */ - public function testCreateException() + public function testCreateWithDriverCode() { - $factory = new WriteFactory(new DriverPool()); - $factory->create('path'); + $driverPool = $this->getMock('Magento\Framework\Filesystem\DriverPool', ['getDriver']); + $driverMock = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface'); + $driverMock->expects($this->any())->method('isExists')->willReturn(true); + $driverPool->expects($this->once())->method('getDriver')->willReturn($driverMock); + $factory = new WriteFactory($driverPool); + $result = $factory->create('path', 'driverCode'); + $this->assertInstanceOf('Magento\Framework\Filesystem\File\Write', $result); } public function testCreateWithMode() { - $driver = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface'); - $driver->expects($this->any())->method('isExists')->willReturn(false); $driverPool = $this->getMock('Magento\Framework\Filesystem\DriverPool', ['getDriver']); - $driverPool->expects($this->once())->method('getDriver')->with('protocol')->willReturn($driver); + $driverPool->expects($this->never())->method('getDriver'); + $driver = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface'); + $driver->expects($this->any())->method('isExists')->willReturn(true); $factory = new WriteFactory($driverPool); - $result = $factory->create('path', 'protocol', null, 'a+'); + $result = $factory->create('path', $driver, 'a+'); $this->assertInstanceOf('Magento\Framework\Filesystem\File\Write', $result); } } 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 f9684ec960e0cee2284345502c112ac1ec1b4907..5fb90c588b2b03d5671e86bc637225fd8c0e62c8 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 a457e5d6479f666ada1d018553c1d82dfad3a27c..3585187b57c1c04ef22f177839cb719e0ecb2741 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/InterfaceValidatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/InterfaceValidatorTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 199fefa92fcbeff11f9d5ec2e894d18e9e4ff953..6b3aedde8310af79d8a1902c17992eb137dbdab1 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e7f1488d7829e75d2ff36c0c19e468874b3f786f..f6de307fb9c7ee9304679b3c18d1f56db50b4da0 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c4ae623ef39805ccbb06dc582dd43a6cf41e28eb..6b104b2a0b0184896908f9700999a1c76dd1b97b 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a75b305865ce0e4abb4a382e6a9c2dc108a0a3f8..07ed13934f6728a6f577d5257de516fb8fddffbd 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 748f08235968a1994dd6339e98d23ceb7ea6be42..9a51d1a894a17a92b27f79c832b9b77705637939 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; class ValidPlugin diff --git a/dev/tests/unit/testsuite/Magento/Framework/Less/File/Collector/LibraryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Less/File/Collector/LibraryTest.php index f5d9ef63f16d5055d26f70e4a269a641e4f348be..396fad99d70d6ff501dfe7d3b6d6af1718c5de64 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Less/File/Collector/LibraryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Less/File/Collector/LibraryTest.php @@ -72,8 +72,8 @@ class LibraryTest extends \PHPUnit_Framework_TestCase ->will( $this->returnValueMap( [ - [DirectoryList::LIB_WEB, $this->libraryDirectoryMock], - [DirectoryList::THEMES, $this->themesDirectoryMock], + [DirectoryList::LIB_WEB, Filesystem\DriverPool::FILE, $this->libraryDirectoryMock], + [DirectoryList::THEMES, Filesystem\DriverPool::FILE, $this->themesDirectoryMock], ] ) ); diff --git a/dev/tests/unit/testsuite/Magento/Framework/Less/FileGeneratorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Less/FileGeneratorTest.php index 5dd7159b993b6931cee0f8f5826ad99d46ef4a55..cae64ac721c4bd98446e99cb74269463a3e2967a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Less/FileGeneratorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Less/FileGeneratorTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 3c12c8e9d90eaae85a8b41d0b981c876b76a9334..e15630ee028561a826ff21ce60eca12038283369 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 07ad34a5fa1bfc96d74c70ff6f16350db3115acf..c70ac5bd6bdc16dc90107b5440153843f3ba8949 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 166fcc537c0b2f19bc794a0372d795e32da97b1e..9699274f56ead8e25034e5d19edef5393e3454bb 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Locale/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Locale/ConfigTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 c7b313e2e8eb13ac4129ad1be84cebce5036e843..c04b01b2d4f9744692d86f4a597a1aba8b6a9914 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Locale/CurrencyTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Locale/CurrencyTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\Locale; diff --git a/dev/tests/unit/testsuite/Magento/Framework/Message/ManagerTest.php b/dev/tests/unit/testsuite/Magento/Framework/Message/ManagerTest.php index 3b17dcd35592942814d81df0dba8c4ff063d2b19..6fee9007cc8f21b64d48759334bf3a27e99d6186 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Message/ManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Message/ManagerTest.php @@ -168,6 +168,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/Framework/Model/Resource/Db/AbstractDbTest.php b/dev/tests/unit/testsuite/Magento/Framework/Model/Resource/Db/AbstractDbTest.php index e3199a3c30f485ac18ad2d4f89fd002c423c18be..f7c3c49ea5e686b0f59533c352d5940e9ca68ced 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 6127434681775f7433f5231739b24fda6ddbf2c1..3a883fbb7a4caf681fa67fbbc636b0b116849669 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 7e400b5e607938cd3c51362de8e2c97f49259d21..40270d32b8de3aba3d821ffec6677d5bc33b3a86 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 138b0d412f4379aea9c7349c27e0abd2663cd12c..7ba95225f3112f244d16315e33245aac02f6f15a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mview/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/ConfigTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3ce52356f96a5c6844022ea157d56cc21ed264ce..b7e41b0b644f8a592c71e310af1aa774e668d0f3 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mview/View/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/View/CollectionTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 810b0658ea3da389f0314bbea8430533e342cf94..4f0e5c342340f69cc241e88ebf310aa0b9062e78 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mview/View/SubscriptionFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/View/SubscriptionFactoryTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 7534fe8248a776006d1f00a400a9b388d0acb4cf..be2fd374c0650e689414585e2d6eb9bd27b4855c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mview/View/SubscriptionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/View/SubscriptionTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 3fb090231b82439919d76a8d91890d27490961f6..492fbab7633205c23ebd1afb384bbc7492a2af9e 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 5240391806c6923ef2c16d5e365df1b0e747755f..7d7799da50ad76b27c78b1698c0a4fdb432f5f44 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Phrase/Renderer/CompositeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Phrase/Renderer/CompositeTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Phrase\Renderer; class CompositeTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/Pricing/Price/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Price/CollectionTest.php index 4b495ba6e0162a162c2b6ed9998e6603418963af..8c007c762bbfcc065f37562c78849adcfb1bf707 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Pricing/Price/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Price/CollectionTest.php @@ -80,6 +80,8 @@ class CollectionTest extends \PHPUnit_Framework_TestCase ) ->will($this->returnValue($this->priceMock)); $this->assertEquals($this->priceMock, $this->collection->get('regular_price')); + //Calling the get method again with the same code, cached copy should be used + $this->assertEquals($this->priceMock, $this->collection->get('regular_price')); } /** diff --git a/dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php index 7cf2c23ac1f70c3611aa594daf822e8c58c1e6dc..e51b345024e437f48a4fe454538ee3ecc5fdb550 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 fdb1ecc39edb145da37c22ed9b7785ea99def227..d2d5ba75e69097eabd633d796ce0cca4bafaca50 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/ShellTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ShellTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b55e6bedcf03bb8a347d773dc1803fe02047eb54..ea06bde7734e323f8341b3af8e86f5b6d491ab74 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Stdlib/Cookie/CookieScopeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/Cookie/CookieScopeTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 fd54f64bc406f3c571c3955bce7aff5b2733c62a..f731e2c8f2375db109ded7415078054b116e56ab 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Stdlib/Cookie/PhpCookieManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/Cookie/PhpCookieManagerTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + // @codingStandardsIgnoreStart namespace { $mockTranslateSetCookie = false; 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 480dc93a159a7087ffbff3e41cc0009709b58542..9c7dccdfd0e347ccfcd753f8a6ae9e00566c5044 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,21 @@ 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); + } } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/UrlTest.php b/dev/tests/unit/testsuite/Magento/Framework/UrlTest.php index 2270de236ddc972fccd64c11dd8abc2ec33fa95f..916d0154e9f85139bcf00c1c709c1e066d31dae5 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/UrlTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/UrlTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Framework; /** diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Validator/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Validator/FactoryTest.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/Core/Model/Validator/FactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Validator/FactoryTest.php index 2ad8b19d563dcc38632187c3c99975f500d3c70e..649ad967473afc3a7d961029f56eb907e229d66b 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Validator/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/FactoryTest.php @@ -1,11 +1,11 @@ <?php /** - * Unit test for \Magento\Core\Model\Validator\Factory + * Unit test for \Magento\Framework\Validator\Factory * * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Core\Model\Validator; +namespace Magento\Framework\Validator; class FactoryTest extends \PHPUnit_Framework_TestCase { @@ -104,7 +104,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase */ public function testGetValidatorConfig() { - $factory = new \Magento\Core\Model\Validator\Factory( + $factory = new \Magento\Framework\Validator\Factory( $this->_objectManager, $this->_config, $this->_translateAdapter @@ -144,7 +144,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase $objectManager->getObject('Magento\Framework\Validator\Builder', ['constraints' => []]) ) ); - $factory = new \Magento\Core\Model\Validator\Factory( + $factory = new \Magento\Framework\Validator\Factory( $this->_objectManager, $this->_config, $this->_translateAdapter @@ -171,7 +171,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase )->will( $this->returnValue(new \Magento\Framework\Validator()) ); - $factory = new \Magento\Core\Model\Validator\Factory( + $factory = new \Magento\Framework\Validator\Factory( $this->_objectManager, $this->_config, $this->_translateAdapter diff --git a/dev/tests/unit/testsuite/Magento/Framework/ValidatorFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/ValidatorFactoryTest.php index 2f6a092034376adc39dc1bc6c0b924735c7faa73..aa48533df8654bef4834cf990b979775dfd6c763 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/ValidatorFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ValidatorFactoryTest.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d69b1755ea46cd665051c9e23e6a74a75b749de6..63d7fd42fb261a0d44d8405126989eebb57f0fce 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergedTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergedTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\View\Asset; class MergedTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MinifiedTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MinifiedTest.php index 7b501992bca1fcbb3efed587558e9008a53a836b..50e39edc08a4a7a48ac4e7c314ae60a36ff9c492 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MinifiedTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MinifiedTest.php @@ -6,6 +6,7 @@ namespace Magento\Framework\View\Asset; use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\Filesystem\DriverPool; class MinifiedTest extends \PHPUnit_Framework_TestCase { @@ -62,8 +63,8 @@ class MinifiedTest extends \PHPUnit_Framework_TestCase $this->_filesystem->expects($this->any()) ->method('getDirectoryRead') ->will($this->returnValueMap([ - [DirectoryList::STATIC_VIEW, $this->_staticViewDir], - [DirectoryList::ROOT, $this->_rootDir], + [DirectoryList::STATIC_VIEW, DriverPool::FILE, $this->_staticViewDir], + [DirectoryList::ROOT, DriverPool::FILE, $this->_rootDir], ])); $this->_filesystem->expects($this->any()) ->method('getDirectoryWrite') 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 74b7cb4eb897eafe231076df6185d4153c95f45a..fb4cfe1cb1463c1d0977506bad59e11d10c6324d 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 a4ce6ba4138df47399618cd85efd2f0eb313d3be..414d21796ee70394aff0fde22e20091d38d22ca5 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 2b698915516e81e4b7ffe32e9cb7bb3dfbaaf481..b5cd4b03b9994136cd0e841d5be558c0a3a869d0 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/RepositoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/RepositoryTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 09c0ac59216d9d4dd2764a28acc340019e54b4f2..8afbb1a372982dff4b35450415aa29aae4c30580 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/SourceTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/SourceTest.php @@ -4,9 +4,12 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\View\Asset; use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\Filesystem\DriverPool; /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) @@ -245,9 +248,9 @@ class SourceTest extends \PHPUnit_Framework_TestCase $this->varDir = $this->getMockForAbstractClass('Magento\Framework\Filesystem\Directory\WriteInterface'); $readDirMap = [ - [DirectoryList::ROOT, $this->rootDirRead], - [DirectoryList::STATIC_VIEW, $this->staticDirRead], - [DirectoryList::VAR_DIR, $this->varDir], + [DirectoryList::ROOT, DriverPool::FILE, $this->rootDirRead], + [DirectoryList::STATIC_VIEW, DriverPool::FILE, $this->staticDirRead], + [DirectoryList::VAR_DIR, DriverPool::FILE, $this->varDir], ]; $this->filesystem->expects($this->any()) diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/BlockPoolTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/BlockPoolTest.php index daf08c3bdaf40c85d0af1392fc52374ba9463bfc..5146fc9abf73fe2ea6749b5af29fe41d93ce47a7 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/BlockPoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/BlockPoolTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 db8d5747b3abcf0912347cae2ab8f2b604601d64..c7b73cbd2e3eceb7f208b40da8b046841cef555d 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/DataSourcePoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/DataSourcePoolTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 e08eda12a3fe802e209df5073f071b32747430df..be64df60fb07b467d9e1e9c7e888adfab5a222c0 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 d578a5097b544fbca242548926dd39106bc01505..c3bf25cde02a0c4232e9ab91c3a0fee5da1f7b21 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 f9bba6e60a7427ace3be74f7af3c0e5bdebacd92..80441a9e29524b018a95facf41170b6b8cbbd18b 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 d09fc77758cf3303e7fd6411b2a51c9bce7177cd..8d630c2b35f6819ed8b20541b51aa2fd33d86977 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 6997945dfc982a37b04aed6d1dcdbf45ece072c2..fc283081345933b25bf8c224640bcd24bbcacf2b 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Test theme image model */ diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Element/TemplateTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Element/TemplateTest.php index 3a3fd0e8709e7d36305e35aecd68ec313b05a143..59f6568e91e8cb8668b08e1836833d4d6a74758e 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Element/TemplateTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Element/TemplateTest.php @@ -5,6 +5,8 @@ */ namespace Magento\Framework\View\Element; +use Magento\Framework\Filesystem\DriverPool; + class TemplateTest extends \PHPUnit_Framework_TestCase { /** @@ -50,9 +52,9 @@ class TemplateTest extends \PHPUnit_Framework_TestCase $this->_filesystem->expects($this->any()) ->method('getDirectoryRead') ->will($this->returnValueMap([ - [\Magento\Framework\App\Filesystem\DirectoryList::THEMES, $themesDirMock], - [\Magento\Framework\App\Filesystem\DirectoryList::APP, $appDirMock], - [\Magento\Framework\App\Filesystem\DirectoryList::ROOT, $this->rootDirMock], + [\Magento\Framework\App\Filesystem\DirectoryList::THEMES, DriverPool::FILE, $themesDirMock], + [\Magento\Framework\App\Filesystem\DirectoryList::APP, DriverPool::FILE, $appDirMock], + [\Magento\Framework\App\Filesystem\DirectoryList::ROOT, DriverPool::FILE, $this->rootDirMock], ])); $this->_templateEngine = $this->getMock( 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 3d3460610062f0c9104aa91d88cb7fe8494ce18b..ce7742dba428b379712ccded86c4e70b46d3f7c5 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 86f54dbfefaf57dec964a41d8e3a360e717cac14..89fd9fa7429f0c28a1d7bb29acc40faae8ca4c70 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 49fe2c1aaa215194111d9c492cbf1f1754d77d1b..f6d2297afef60b532bbd2179193fffd9a3f9bd8a 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 279077eb85440ccbb55de7458c87ad5811ba8944..01c7e203617bbb10f8e4245836054231bbc54736 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 5a5249cf105f1d403a75107a3aac48047d3b7367..fcab2e2c5bc7ce360827be7775f22450ceb80eea 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/File/FileListTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/FileListTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 6750319c542f3d85681d09d65c8532448699b4f9..a473e5ae8fd0169dd97ef516f7d747dc5a085612 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/FileSystemTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/FileSystemTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 c5703cbde8bb9d5f7572523fa760cef227a9906f..9f85c1d86826bca62c09a8148b6c725337fbfb34 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 b9dc7d0afbf4eb802b4c5123385e61dad1b88b7e..99537b2c7814d0e0a2beba20e12fc34516f726d1 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Result/LayoutTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Result/LayoutTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 2d3052dbfd4cefabec43e63861aa094666e441d7..3747449c2c33a4c3a8f057a4294797ef7fa52e47 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2b616a6b74318aff0b6bc0681bd6d429c9dd430d..0ad00b485f0fc293423874b01525299c875d446b 100644 --- a/dev/tests/unit/testsuite/Magento/GiftMessage/Model/GiftMessageManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/GiftMessage/Model/GiftMessageManagerTest.php @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 f5837c449a2dd44383dd5662a049ad5b8c1beda8..a2d5d278ed302a5a879db95dac9b543409adfec1 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 @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 ac28515811ba34adffbb36cf425bd546eeb39705..5a2d3f90ea095d3e4660d388e0bea277f9879605 100644 --- a/dev/tests/unit/testsuite/Magento/GiftMessage/Service/V1/ReadServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/GiftMessage/Service/V1/ReadServiceTest.php @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\GiftMessage\Service\V1; class ReadServiceTest 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 930c52facbf964cb51021e13ba693a051e2160c4..3ce39e7517b55d79fd0d7e074a3a862550be10b8 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/GroupedProduct/Model/Product/Type/GroupedTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php index 486805b85499162d34c1596e3b2b5a2618c72c46..5e4f8bbeffa32d7e834e3c05abe048e1b7f89576 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 @@ -284,6 +284,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/Indexer/Model/Processor/InvalidateCacheTest.php b/dev/tests/unit/testsuite/Magento/Indexer/Model/Processor/InvalidateCacheTest.php index cdbd873935a3a7a8bff2d348200815516c90d29d..03c205112f2b71d490a98664e9765b583bacca57 100644 --- a/dev/tests/unit/testsuite/Magento/Indexer/Model/Processor/InvalidateCacheTest.php +++ b/dev/tests/unit/testsuite/Magento/Indexer/Model/Processor/InvalidateCacheTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 8c8193f3422c4756658d7e776a6d4f7b946fb2eb..c21cdcf35af3e7e5e94c99dd8eefc88e2fcbf7c8 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 @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6a9471ebc758f0adaa4a18786aade1501bea73cc..f4d5d880d82cf653fc7168ba8c71f9a10f8ac12c 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 @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b988a9ce154d2dc150a3487e4ecc28ea855c9e49..1c734a594f765a57e9716ee87cdbfb1a93726bc2 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 @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 9854d3bc6d28bd63635afd599cb0e6818b6b2820..38bbda5638eec13073d0faca9c8916157e3c17eb 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 @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 32e8b0f5450dddcfc800c40d4b432fb5462b18ea..f737bddb816ca2ae77ae3e40d4100706ed8c3742 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 @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2fd35e1e5925ff2e7fbf9e28bd97b8cf36e08430..1153951fb30b523de4a25bdd5047a7bf32a8fadb 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 @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 82de98bfa27d44d2ad33ac4520c8d1b31a0c5b47..24785d1098a71fe9ed63b514d5dee3aa920c0bb9 100644 --- a/dev/tests/unit/testsuite/Magento/Integration/Oauth/OauthTest.php +++ b/dev/tests/unit/testsuite/Magento/Integration/Oauth/OauthTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d05b834df31109b51546fbc1a75442693a7737ec..322c4fa49c8320183f8b92188aa1315fcc87d876 100644 --- a/dev/tests/unit/testsuite/Magento/Integration/Service/V1/AdminTokenServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Integration/Service/V1/AdminTokenServiceTest.php @@ -6,6 +6,8 @@ * See COPYING.txt for license details. */ +// @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 3100a5bbca24484022afc1c05a3f5a25b99d1623..c7a073466ed0cee9073852f2f22c320e026f6c5b 100644 --- a/dev/tests/unit/testsuite/Magento/Msrp/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Msrp/Helper/DataTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 4f06e8d537f5e280b8a3602ca15d04783d91af47..a9f6fb059d287b7e676a61bf2e11d3e7cb414f5b 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5379e44a2f214a21e9d257edca0be9cb937e509e..6e27ebf3ad9917b963fdc77dba25ccc974bc7c6d 100644 --- a/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php +++ b/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Multishipping\Block\Checkout; use Magento\Quote\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 e3cf18debc0ee4239fc0fe75354e13363fb3be40..83cc63d851dcdf959e5a06e85e305febbf9094d2 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 @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 eefb8443f2dc65697cf66b1758433e57cfba91f4..931c92190cb8d621371c405e7f4c3cdbc053919c 100644 --- a/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/ShippingTest.php +++ b/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/ShippingTest.php @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 0c407b9b6a5346f397cf52034fa2740675fcd066..d07fcdd7fecfb9caaafe4e1f489ed0153a4c8550 100644 --- a/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/StateTest.php +++ b/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/StateTest.php @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 b28feaab72584a1e42daea63dcac17d26e322ed4..411eaaa51d40aabd62361670a293902ec914f7df 100644 --- a/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/SuccessTest.php +++ b/dev/tests/unit/testsuite/Magento/Multishipping/Block/Checkout/SuccessTest.php @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 618ccb352cde31d3fbe2abdd05dc270ee05c8d83..bbe3cfe2425740431f05c1695e4d24964969420f 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f66930101e89a652bee4230d6ac90416a4bcee4a..c178364067e7122e6a4dfa029773ca08dedfd714 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f1430495082550a6251de47ed9e1a4a6e26a1ecc..15dfbd50095bd6ae8213cd65c5deb8eb76e3f9b1 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 cbd350b1c34b6bb5eb8aa00cfcb031d4af36346a..4ea11e167fad8340bd90d770789314811eace7c7 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e860f2c7f25c46a764e590bfbb044f737084fb52..a03519add7ece1f993e182cfb586ba7ec43779c6 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 94d6344cc75021cd3d58cf914e5d4f26b46d07dd..124efe1c353af5af3434cd21a6c271a583f3cd79 100644 --- a/dev/tests/unit/testsuite/Magento/Newsletter/Controller/Manage/SaveTest.php +++ b/dev/tests/unit/testsuite/Magento/Newsletter/Controller/Manage/SaveTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Newsletter\Controller\Manage; use Magento\Framework\Exception\NoSuchEntityException; diff --git a/dev/tests/unit/testsuite/Magento/Newsletter/Model/TemplateTest.php b/dev/tests/unit/testsuite/Magento/Newsletter/Model/TemplateTest.php index ca617c4f218d65db0ae07bc944463333e1724a90..617131882a610b46a53c729557a28741fae9b448 100644 --- a/dev/tests/unit/testsuite/Magento/Newsletter/Model/TemplateTest.php +++ b/dev/tests/unit/testsuite/Magento/Newsletter/Model/TemplateTest.php @@ -40,7 +40,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase } $filter = $this->getMock('Magento\Newsletter\Model\Template\Filter', [], [], '', false); - $appEmulation = $this->getMock('Magento\Core\Model\App\Emulation', [], [], '', false); + $appEmulation = $this->getMock('Magento\Store\Model\App\Emulation', [], [], '', false); $filter->expects($this->once())->method('setStoreId')->with('test_id'); $filter->expects($this->once())->method('setIncludeProcessor')->will($this->returnSelf()); $filter->expects( diff --git a/dev/tests/unit/testsuite/Magento/OfflinePayments/Block/Form/AbstractInstructionTest.php b/dev/tests/unit/testsuite/Magento/OfflinePayments/Block/Form/AbstractInstructionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a6ef83d4f0e1184643c0f34a8cef525b6eaf94e3 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/OfflinePayments/Block/Form/AbstractInstructionTest.php @@ -0,0 +1,40 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\OfflinePayments\Block\Form; + +class AbstractInstructionTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\OfflinePayments\Block\Form\AbstractInstruction + */ + protected $_model; + + protected function setUp() + { + $context = $this->getMock('Magento\Framework\View\Element\Template\Context', [], [], '', false); + $this->_model = $this->getMockForAbstractClass( + 'Magento\OfflinePayments\Block\Form\AbstractInstruction', + ['context' => $context] + ); + } + + public function testGetInstructions() + { + $method = $this->getMock( + 'Magento\Payment\Model\MethodInterface', + ['getInstructions', 'getCode', 'getFormBlockType', 'getTitle'], + [], + '', + false + ); + $method->expects($this->once()) + ->method('getInstructions') + ->willReturn('instructions'); + $this->_model->setData('method', $method); + + $this->assertEquals('instructions', $this->_model->getInstructions()); + } +} diff --git a/dev/tests/unit/testsuite/Magento/OfflinePayments/Block/Info/CheckmoTest.php b/dev/tests/unit/testsuite/Magento/OfflinePayments/Block/Info/CheckmoTest.php new file mode 100644 index 0000000000000000000000000000000000000000..04748038a9c2d60dd98a8f42c8e92db1dfc9f123 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/OfflinePayments/Block/Info/CheckmoTest.php @@ -0,0 +1,85 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\OfflinePayments\Block\Info; + +class CheckmoTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\OfflinePayments\Block\Info\Checkmo + */ + protected $_model; + + protected function setUp() + { + $context = $this->getMock('Magento\Framework\View\Element\Template\Context', [], [], '', false); + $this->_model = new \Magento\OfflinePayments\Block\Info\Checkmo($context); + } + + /** + * @dataProvider getPayableToDataProvider + */ + public function testGetPayableTo($details, $expected) + { + $info = $this->getMock('Magento\Payment\Model\Info', ['getAdditionalData'], [], '', false); + $info->expects($this->once()) + ->method('getAdditionalData') + ->willReturn(serialize($details)); + $this->_model->setData('info', $info); + + $this->assertEquals($expected, $this->_model->getPayableTo()); + } + + /** + * @return array + */ + public function getPayableToDataProvider() + { + return [ + [['payable_to' => 'payable'], 'payable'], + ['', ''] + ]; + } + + /** + * @dataProvider getMailingAddressDataProvider + */ + public function testGetMailingAddress($details, $expected) + { + $info = $this->getMock('Magento\Payment\Model\Info', ['getAdditionalData'], [], '', false); + $info->expects($this->once()) + ->method('getAdditionalData') + ->willReturn(serialize($details)); + $this->_model->setData('info', $info); + + $this->assertEquals($expected, $this->_model->getMailingAddress()); + } + + /** + * @return array + */ + public function getMailingAddressDataProvider() + { + return [ + [['mailing_address' => 'blah@blah.com'], 'blah@blah.com'], + ['', ''] + ]; + } + + public function testConvertAdditionalDataIsNeverCalled() + { + $info = $this->getMock('Magento\Payment\Model\Info', ['getAdditionalData'], [], '', false); + $info->expects($this->once()) + ->method('getAdditionalData') + ->willReturn(serialize(['mailing_address' => 'blah@blah.com'])); + $this->_model->setData('info', $info); + + // First we set the property $this->_mailingAddress + $this->_model->getMailingAddress(); + + // And now we get already setted property $this->_mailingAddress + $this->assertEquals('blah@blah.com', $this->_model->getMailingAddress()); + } +} diff --git a/dev/tests/unit/testsuite/Magento/OfflinePayments/Model/BanktransferTest.php b/dev/tests/unit/testsuite/Magento/OfflinePayments/Model/BanktransferTest.php index 7dbc702c60f2c83658f7e3afc3be1518b1a5228e..18fb24e1ae8e9e67ddb04735302a0eefd64084dc 100644 --- a/dev/tests/unit/testsuite/Magento/OfflinePayments/Model/BanktransferTest.php +++ b/dev/tests/unit/testsuite/Magento/OfflinePayments/Model/BanktransferTest.php @@ -12,18 +12,23 @@ class BanktransferTest extends \PHPUnit_Framework_TestCase */ protected $_object; + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_scopeConfig; + protected function setUp() { $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', [], [], '', false); $paymentDataMock = $this->getMock('Magento\Payment\Helper\Data', [], [], '', false); - $scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); + $this->_scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface', [], [], '', false); $this->_object = $objectManagerHelper->getObject( 'Magento\OfflinePayments\Model\Banktransfer', [ 'eventManager' => $eventManager, 'paymentData' => $paymentDataMock, - 'scopeConfig' => $scopeConfig, + 'scopeConfig' => $this->_scopeConfig, ] ); } diff --git a/dev/tests/unit/testsuite/Magento/OfflinePayments/Model/CashondeliveryTest.php b/dev/tests/unit/testsuite/Magento/OfflinePayments/Model/CashondeliveryTest.php index e0f11d0283bfea5f4c2a8ee5fa3f835f54ea6079..cd4d60d27533e2421f7b68d12d16cc84da178be6 100644 --- a/dev/tests/unit/testsuite/Magento/OfflinePayments/Model/CashondeliveryTest.php +++ b/dev/tests/unit/testsuite/Magento/OfflinePayments/Model/CashondeliveryTest.php @@ -12,6 +12,11 @@ class CashondeliveryTest extends \PHPUnit_Framework_TestCase */ protected $_object; + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_scopeConfig; + protected function setUp() { $helper = new \Magento\TestFramework\Helper\ObjectManager($this); @@ -19,13 +24,13 @@ class CashondeliveryTest extends \PHPUnit_Framework_TestCase $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', [], [], '', false); $paymentDataMock = $this->getMock('Magento\Payment\Helper\Data', [], [], '', false); - $scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); + $this->_scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface', [], [], '', false); $this->_object = $helper->getObject( 'Magento\OfflinePayments\Model\Cashondelivery', [ 'eventManager' => $eventManager, 'paymentData' => $paymentDataMock, - 'scopeConfig' => $scopeConfig, + 'scopeConfig' => $this->_scopeConfig, ] ); } diff --git a/dev/tests/unit/testsuite/Magento/OfflinePayments/Model/CheckmoTest.php b/dev/tests/unit/testsuite/Magento/OfflinePayments/Model/CheckmoTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b6aee65b11e3e53bd8b94f17c304e743108ea89e --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/OfflinePayments/Model/CheckmoTest.php @@ -0,0 +1,80 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\OfflinePayments\Model; + +class CheckmoTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\OfflinePayments\Model\Checkmo + */ + protected $_object; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_scopeConfig; + + protected function setUp() + { + $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', [], [], '', false); + $paymentDataMock = $this->getMock('Magento\Payment\Helper\Data', [], [], '', false); + $this->_scopeConfig = $this->getMock( + 'Magento\Framework\App\Config\ScopeConfigInterface', + ['getValue', 'isSetFlag'], + [], + '', + false + ); + $this->_object = $objectManagerHelper->getObject( + 'Magento\OfflinePayments\Model\Checkmo', + [ + 'eventManager' => $eventManager, + 'paymentData' => $paymentDataMock, + 'scopeConfig' => $this->_scopeConfig, + ] + ); + } + + public function testGetPayableTo() + { + $this->_object->setStore(1); + $this->_scopeConfig->expects($this->once()) + ->method('getValue') + ->with('payment/checkmo/payable_to', 'store', 1) + ->willReturn('payable'); + $this->assertEquals('payable', $this->_object->getPayableTo()); + } + + public function testGetMailingAddress() + { + $this->_object->setStore(1); + $this->_scopeConfig->expects($this->once()) + ->method('getValue') + ->with('payment/checkmo/mailing_address', 'store', 1) + ->willReturn('blah@blah.com'); + $this->assertEquals('blah@blah.com', $this->_object->getMailingAddress()); + } + + public function testAssignData() + { + $details['payable_to'] = 'payable'; + $details['mailing_address'] = 'blah@blah.com'; + $this->_object->setStore(1); + $this->_scopeConfig->expects($this->any()) + ->method('getValue') + ->willReturnMap([ + ['payment/checkmo/payable_to', 'store', 1, 'payable'], + ['payment/checkmo/mailing_address', 'store', 1, 'blah@blah.com'] + ]); + $instance = $this->getMock('Magento\Payment\Model\Info', ['setAdditionalData'], [], '', false); + $instance->expects($this->once()) + ->method('setAdditionalData') + ->with(serialize($details)); + $this->_object->setData('info_instance', $instance); + $this->_object->assignData(''); + } +} diff --git a/dev/tests/unit/testsuite/Magento/OfflinePayments/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/OfflinePayments/Model/ObserverTest.php new file mode 100644 index 0000000000000000000000000000000000000000..708b25093f52be0cb438d79411931480af7ac1c3 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/OfflinePayments/Model/ObserverTest.php @@ -0,0 +1,84 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\OfflinePayments\Model; + +class ObserverTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\OfflinePayments\Model\Observer + */ + protected $_model; + + protected function setUp() + { + $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->_model = $objectManagerHelper->getObject('Magento\OfflinePayments\Model\Observer'); + } + + public function testBeforeOrderPaymentSave() + { + $observer = $this->getMock('Magento\Framework\Event\Observer', ['getEvent'], [], '', false); + $event = $this->getMock('Magento\Framework\Event', ['getPayment'], [], '', false); + $payment = $this->getMock( + 'Magento\Sales\Model\Order\Payment', + ['getMethod', 'setAdditionalInformation', 'getMethodInstance'], + [], + '', + false + ); + $payment->expects($this->once()) + ->method('getMethod') + ->willReturn('banktransfer'); + $payment->expects($this->once()) + ->method('setAdditionalInformation') + ->with('instructions', 'payment configuration'); + $method = $this->getMock( + 'Magento\Payment\Model\MethodInterface', + ['getConfigData', 'getFormBlockType', 'getTitle', 'getCode'], + [], + '', + false + ); + $method->expects($this->once()) + ->method('getConfigData') + ->willReturn('payment configuration'); + $payment->expects($this->once()) + ->method('getMethodInstance') + ->willReturn($method); + $event->expects($this->once()) + ->method('getPayment') + ->willReturn($payment); + $observer->expects($this->once()) + ->method('getEvent') + ->willReturn($event); + $this->_model->beforeOrderPaymentSave($observer); + } + + public function testBeforeOrderPaymentSaveNoBanktransfer() + { + $observer = $this->getMock('Magento\Framework\Event\Observer', ['getEvent'], [], '', false); + $event = $this->getMock('Magento\Framework\Event', ['getPayment'], [], '', false); + $payment = $this->getMock( + 'Magento\Sales\Model\Order\Payment', + ['getMethod', 'setAdditionalInformation', 'getMethodInstance'], + [], + '', + false + ); + $payment->expects($this->once()) + ->method('getMethod') + ->willReturn('somepaymentmethod'); + $payment->expects($this->never()) + ->method('setAdditionalInformation'); + $event->expects($this->once()) + ->method('getPayment') + ->willReturn($payment); + $observer->expects($this->once()) + ->method('getEvent') + ->willReturn($event); + $this->_model->beforeOrderPaymentSave($observer); + } +} diff --git a/dev/tests/unit/testsuite/Magento/OfflinePayments/Model/PurchaseorderTest.php b/dev/tests/unit/testsuite/Magento/OfflinePayments/Model/PurchaseorderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fb08707e9e4b9d44d89c6e5d2dd7488cbe806835 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/OfflinePayments/Model/PurchaseorderTest.php @@ -0,0 +1,52 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\OfflinePayments\Model; + +class PurchaseorderTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\OfflinePayments\Model\Purchaseorder + */ + protected $_object; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_scopeConfig; + + protected function setUp() + { + $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', [], [], '', false); + $paymentDataMock = $this->getMock('Magento\Payment\Helper\Data', [], [], '', false); + $this->_scopeConfig = $this->getMock( + 'Magento\Framework\App\Config\ScopeConfigInterface', + ['getValue', 'isSetFlag'], + [], + '', + false + ); + $this->_object = $objectManagerHelper->getObject( + 'Magento\OfflinePayments\Model\Purchaseorder', + [ + 'eventManager' => $eventManager, + 'paymentData' => $paymentDataMock, + 'scopeConfig' => $this->_scopeConfig, + ] + ); + } + + public function testAssignData() + { + $data = new \Magento\Framework\Object([ + 'po_number' => '12345' + ]); + + $instance = $this->getMock('Magento\Payment\Model\Info', [], [], '', false); + $this->_object->setData('info_instance', $instance); + $this->_object->assignData($data); + } +} diff --git a/dev/tests/unit/testsuite/Magento/OfflineShipping/Block/Adminhtml/Carrier/Tablerate/GridTest.php b/dev/tests/unit/testsuite/Magento/OfflineShipping/Block/Adminhtml/Carrier/Tablerate/GridTest.php new file mode 100644 index 0000000000000000000000000000000000000000..09434687725e98ae388fb66f649e57ed92a31ff8 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/OfflineShipping/Block/Adminhtml/Carrier/Tablerate/GridTest.php @@ -0,0 +1,127 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\OfflineShipping\Block\Adminhtml\Carrier\Tablerate; + +class GridTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\OfflineShipping\Block\Adminhtml\Carrier\Tablerate\Grid + */ + protected $model; + + /** + * @var \Magento\Store\Model\StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $storeManagerMock; + + /** + * @var \Magento\Backend\Helper\Data|\PHPUnit_Framework_MockObject_MockObject + */ + protected $backendHelperMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $tablerateMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $context; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $collectionFactoryMock; + + protected function setUp() + { + $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); + + $this->storeManagerMock = $this->getMockBuilder('Magento\Store\Model\StoreManagerInterface') + ->disableOriginalConstructor() + ->getMock(); + + $this->context = $objectManager->getObject('Magento\Backend\Block\Template\Context', [ + 'storeManager' => $this->storeManagerMock + ]); + + $this->backendHelperMock = $this->getMockBuilder('\Magento\Backend\Helper\Data') + ->disableOriginalConstructor() + ->getMock(); + + $this->collectionFactoryMock = + $this->getMockBuilder('\Magento\OfflineShipping\Model\Resource\Carrier\Tablerate\CollectionFactory') + ->disableOriginalConstructor() + ->getMock(); + + $this->tablerateMock = $this->getMockBuilder('Magento\OfflineShipping\Model\Carrier\Tablerate') + ->disableOriginalConstructor() + ->getMock(); + + $this->model = new \Magento\OfflineShipping\Block\Adminhtml\Carrier\Tablerate\Grid( + $this->context, + $this->backendHelperMock, + $this->collectionFactoryMock, + $this->tablerateMock + ); + } + + public function testSetWebsiteId() + { + $websiteId = 1; + + $websiteMock = $this->getMockBuilder('Magento\Store\Model\Website') + ->setMethods(['getId']) + ->disableOriginalConstructor() + ->getMock(); + + $this->storeManagerMock->expects($this->once()) + ->method('getWebsite') + ->with($websiteId) + ->willReturn($websiteMock); + + $websiteMock->expects($this->once()) + ->method('getId') + ->willReturn($websiteId); + + $this->assertSame($this->model, $this->model->setWebsiteId($websiteId)); + $this->assertEquals($websiteId, $this->model->getWebsiteId()); + } + + public function testGetWebsiteId() + { + $websiteId = 10; + + $websiteMock = $this->getMockBuilder('Magento\Store\Model\Website') + ->disableOriginalConstructor() + ->setMethods(['getId']) + ->getMock(); + + $websiteMock->expects($this->once()) + ->method('getId') + ->willReturn($websiteId); + + $this->storeManagerMock->expects($this->once()) + ->method('getWebsite') + ->willReturn($websiteMock); + + $this->assertEquals($websiteId, $this->model->getWebsiteId()); + + $this->storeManagerMock->expects($this->never()) + ->method('getWebsite') + ->willReturn($websiteMock); + + $this->assertEquals($websiteId, $this->model->getWebsiteId()); + } + + public function testSetAndGetConditionName() + { + $conditionName = 'someName'; + $this->assertEquals($this->model, $this->model->setConditionName($conditionName)); + $this->assertEquals($conditionName, $this->model->getConditionName()); + } +} diff --git a/dev/tests/unit/testsuite/Magento/OfflineShipping/Model/Config/Backend/TablerateTest.php b/dev/tests/unit/testsuite/Magento/OfflineShipping/Model/Config/Backend/TablerateTest.php new file mode 100644 index 0000000000000000000000000000000000000000..16ff0b107650fb8371f8bc90c03ffa4ddbdeb28c --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/OfflineShipping/Model/Config/Backend/TablerateTest.php @@ -0,0 +1,51 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\OfflineShipping\Model\Config\Backend; + +class TablerateTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\OfflineShipping\Model\Config\Backend\Tablerate + */ + protected $model; + + /** + * @var \Magento\OfflineShipping\Model\Resource\Carrier\TablerateFactory|\PHPUnit_Framework_MockObject_MockObject + */ + protected $tableateFactoryMock; + + protected function setUp() + { + $this->tableateFactoryMock = + $this->getMockBuilder('Magento\OfflineShipping\Model\Resource\Carrier\TablerateFactory') + ->disableOriginalConstructor() + ->setMethods(['create']) + ->getMock(); + + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->model = $helper->getObject('\Magento\OfflineShipping\Model\Config\Backend\Tablerate', [ + 'tablerateFactory' => $this->tableateFactoryMock + ]); + } + + public function testAfterSave() + { + $tablerateMock = $this->getMockBuilder('Magento\OfflineShipping\Model\Resource\Carrier\Tablerate') + ->disableOriginalConstructor() + ->setMethods(['uploadAndImport']) + ->getMock(); + + $this->tableateFactoryMock->expects($this->once()) + ->method('create') + ->willReturn($tablerateMock); + + $tablerateMock->expects($this->once()) + ->method('uploadAndImport') + ->with($this->model); + + $this->model->afterSave(); + } +} diff --git a/dev/tests/unit/testsuite/Magento/OfflineShipping/Model/Config/Source/FlatrateTest.php b/dev/tests/unit/testsuite/Magento/OfflineShipping/Model/Config/Source/FlatrateTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c133cd1e07d79ca79ff22e5d5eb0ef8060e76568 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/OfflineShipping/Model/Config/Source/FlatrateTest.php @@ -0,0 +1,30 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\OfflineShipping\Model\Config\Source; + +class FlatrateTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\OfflineShipping\Model\Config\Source\Flatrate + */ + protected $model; + + protected function setUp() + { + $this->model = new Flatrate(); + } + + public function testToOptionArray() + { + $expected = [ + ['value' => '', 'label' => __('None')], + ['value' => 'O', 'label' => __('Per Order')], + ['value' => 'I', 'label' => __('Per Item')] + ]; + + $this->assertEquals($expected, $this->model->toOptionArray()); + } +} diff --git a/dev/tests/unit/testsuite/Magento/OfflineShipping/Model/Config/Source/TablerateTest.php b/dev/tests/unit/testsuite/Magento/OfflineShipping/Model/Config/Source/TablerateTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8eea5073c3f3ecfca6593ad497b5201f83efcc03 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/OfflineShipping/Model/Config/Source/TablerateTest.php @@ -0,0 +1,47 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\OfflineShipping\Model\Config\Source; + +class TablerateTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\OfflineShipping\Model\Config\Source\Tablerate + */ + protected $model; + + /** + * @var \Magento\OfflineShipping\Model\Carrier\Tablerate|\PHPUnit_Framework_MockObject_MockObject + */ + protected $carrierTablerateMock; + + protected function setUp() + { + $this->carrierTablerateMock = $this->getMockBuilder('\Magento\OfflineShipping\Model\Carrier\Tablerate') + ->disableOriginalConstructor() + ->setMethods(['getCode']) + ->getMock(); + + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->model = $helper->getObject('Magento\OfflineShipping\Model\Config\Source\Tablerate', [ + 'carrierTablerate' => $this->carrierTablerateMock + ]); + } + + public function testToOptionArray() + { + $codes = [1, 2, 3, 4, 5]; + $expected = []; + foreach ($codes as $k => $v) { + $expected[] = ['value' => $k, 'label' => $v]; + } + + $this->carrierTablerateMock->expects($this->once()) + ->method('getCode') + ->willReturn($codes); + + $this->assertEquals($expected, $this->model->toOptionArray()); + } +} diff --git a/dev/tests/unit/testsuite/Magento/OfflineShipping/Model/Observer/SalesRule/ActionsTabTest.php b/dev/tests/unit/testsuite/Magento/OfflineShipping/Model/Observer/SalesRule/ActionsTabTest.php new file mode 100644 index 0000000000000000000000000000000000000000..751faf0cf82c8c1c32b78e51918136fc4c943018 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/OfflineShipping/Model/Observer/SalesRule/ActionsTabTest.php @@ -0,0 +1,70 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\OfflineShipping\Model\Observer\SalesRule; + +use Magento\OfflineShipping\Model\SalesRule\Rule; + +class ActionsTabTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\OfflineShipping\Model\Observer\SalesRule\ActionsTab + */ + protected $model; + + protected function setUp() + { + $this->model = new ActionsTab(); + } + + public function testPrepareForm() + { + $observerMock = $this->getMockBuilder('\Magento\Framework\Event\Observer') + ->disableOriginalConstructor() + ->setMethods(['getForm']) + ->getMock(); + + $formMock = $this->getMockBuilder('\Magento\Framework\Data\Form') + ->disableOriginalConstructor() + ->setMethods(['getElements']) + ->getMock(); + + $elementMock = $this->getMockBuilder('\Magento\Framework\Data\Form\Element\AbstractElement') + ->disableOriginalConstructor() + ->setMethods(['getId', 'addField']) + ->getMock(); + + $elementMock->expects($this->once()) + ->method('getId') + ->willReturn('action_fieldset'); + + $elementMock->expects($this->once()) + ->method('addField') + ->with( + 'simple_free_shipping', + 'select', + [ + 'label' => __('Free Shipping'), + 'title' => __('Free Shipping'), + 'name' => 'simple_free_shipping', + 'options' => [ + 0 => __('No'), + Rule::FREE_SHIPPING_ITEM => __('For matching items only'), + Rule::FREE_SHIPPING_ADDRESS => __('For shipment with matching items'), + ] + ] + ); + + $formMock->expects($this->once()) + ->method('getElements') + ->willReturn([$elementMock]); + + $observerMock->expects($this->once()) + ->method('getForm') + ->willReturn($formMock); + + $this->model->prepareForm($observerMock); + } +} diff --git a/dev/tests/unit/testsuite/Magento/OfflineShipping/Model/Plugin/Checkout/Block/Cart/ShippingTest.php b/dev/tests/unit/testsuite/Magento/OfflineShipping/Model/Plugin/Checkout/Block/Cart/ShippingTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0fc0f97fbb760e440c728169b047e2788d04f397 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/OfflineShipping/Model/Plugin/Checkout/Block/Cart/ShippingTest.php @@ -0,0 +1,74 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\OfflineShipping\Model\Plugin\Checkout\Block\Cart; + +class ShippingTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\OfflineShipping\Model\Plugin\Checkout\Block\Cart\Shipping + */ + protected $model; + + /** + * @var \Magento\Framework\App\Config\ScopeConfigInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $scopeConfigMock; + + protected function setUp() + { + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + + $this->scopeConfigMock = $this->getMockBuilder('\Magento\Framework\App\Config\ScopeConfigInterface') + ->disableOriginalConstructor() + ->setMethods([ + 'getValue', + 'isSetFlag' + ]) + ->getMock(); + + $this->model = $helper->getObject('\Magento\OfflineShipping\Model\Plugin\Checkout\Block\Cart\Shipping', [ + 'scopeConfig' => $this->scopeConfigMock + ]); + } + + /** + * @dataProvider afterGetStateActiveDataProvider + */ + public function testAfterGetStateActive($scopeConfigMockReturnValue, $result, $assertResult) + { + /** @var \Magento\Checkout\Block\Cart\Shipping $subjectMock */ + $subjectMock = $this->getMockBuilder('Magento\Checkout\Block\Cart\Shipping') + ->disableOriginalConstructor() + ->getMock(); + + $this->scopeConfigMock->expects($result ? $this->never() : $this->once()) + ->method('getValue') + ->willReturn($scopeConfigMockReturnValue); + + $this->assertEquals($assertResult, $this->model->afterGetStateActive($subjectMock, $result)); + } + + public function afterGetStateActiveDataProvider() + { + return [ + [ + true, + true, + true + ], + [ + true, + false, + true + ], + [ + false, + false, + false + ] + ]; + } +} 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 c07eee4e5a6b19083832f63324172a298f5655a7..fb490f17e4b460575b5ac011879918b801bb32ca 100644 --- a/dev/tests/unit/testsuite/Magento/PageCache/Controller/Block/EsiTest.php +++ b/dev/tests/unit/testsuite/Magento/PageCache/Controller/Block/EsiTest.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ebe45e119033dddaae96f8a915d6db235c1a289a..62071ae2df7394d402986ab91528fba0de579697 100644 --- a/dev/tests/unit/testsuite/Magento/PageCache/Controller/Block/RenderTest.php +++ b/dev/tests/unit/testsuite/Magento/PageCache/Controller/Block/RenderTest.php @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 622c154601a2b8515d3c5cf2d9b6bccbfecc26f1..f1d4b5ce27727172b946fa46c1dd3addc9f2f468 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 7a5e532dc98e0cb2cfa05fbf6a435741386d4214..b5c7e0acd2ac1eda176b8faf8c6da69fd9d548a8 100644 --- a/dev/tests/unit/testsuite/Magento/PageCache/Model/Observer/FlushAllCacheTest.php +++ b/dev/tests/unit/testsuite/Magento/PageCache/Model/Observer/FlushAllCacheTest.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e3a5f10919a5fa605145508d9c39195e7e479108..ebd5665cee7371e32f9fc224dce3dd7d52dc5eab 100644 --- a/dev/tests/unit/testsuite/Magento/PageCache/Model/Observer/FlushCacheByTagsTest.php +++ b/dev/tests/unit/testsuite/Magento/PageCache/Model/Observer/FlushCacheByTagsTest.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 06959e3421356034fc22a08e7bc38d8f8286a680..b307760aad42a7918956541e9ee45c985529ae1c 100644 --- a/dev/tests/unit/testsuite/Magento/PageCache/Model/Observer/ProcessLayoutRenderElementTest.php +++ b/dev/tests/unit/testsuite/Magento/PageCache/Model/Observer/ProcessLayoutRenderElementTest.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c8039c60332dbcb27991bd8e64a2b7a79476ced7..d523a8443e54922e69afae43d97e9ce163ec389c 100644 --- a/dev/tests/unit/testsuite/Magento/Payment/Block/FormTest.php +++ b/dev/tests/unit/testsuite/Magento/Payment/Block/FormTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Payment\Block; use Magento\Framework\Object; diff --git a/dev/tests/unit/testsuite/Magento/Payment/Block/Info/InstructionsTest.php b/dev/tests/unit/testsuite/Magento/Payment/Block/Info/InstructionsTest.php index 43528a3ce3970a9aa067fc1739a2e67bf32196ea..7c035de52c8a1866e0ab4faff8599b8442c9229e 100644 --- a/dev/tests/unit/testsuite/Magento/Payment/Block/Info/InstructionsTest.php +++ b/dev/tests/unit/testsuite/Magento/Payment/Block/Info/InstructionsTest.php @@ -12,12 +12,7 @@ namespace Magento\Payment\Block\Info; class InstructionsTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Framework\Object - */ - protected $_method; - - /** - * @var \Magento\Payment\Model\Info + * @var \Magento\Payment\Model\Info|\PHPUnit_Framework_MockObject_MockObject */ protected $_info; @@ -28,28 +23,44 @@ class InstructionsTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->_method = new \Magento\Framework\Object(); - $this->_info = $objectManagerHelper->getObject('Magento\Payment\Model\Info'); - $this->_instructions = $objectManagerHelper->getObject('Magento\Payment\Block\Info\Instructions'); - - $this->_info->setMethodInstance($this->_method); - $this->_instructions->setInfo($this->_info); + $context = $this->getMock('Magento\Framework\View\Element\Template\Context', [], [], '', false); + $this->_instructions = new \Magento\Payment\Block\Info\Instructions($context); + $this->_info = $this->getMock('Magento\Payment\Model\Info', [], [], '', false); + $this->_instructions->setData('info', $this->_info); } - public function testGetInstructionsSetInstructions() + public function testGetInstructionAdditionalInformation() { - $this->assertNull($this->_instructions->getInstructions()); - $testInstruction = 'first test'; - $this->_method->setInstructions($testInstruction); - $this->assertEquals($testInstruction, $this->_instructions->getInstructions()); + $this->_info->expects($this->once()) + ->method('getAdditionalInformation') + ->with('instructions') + ->willReturn('get the instruction here'); + $this->assertEquals('get the instruction here', $this->_instructions->getInstructions()); + + // And we get the already setted param $this->_instructions + $this->assertEquals('get the instruction here', $this->_instructions->getInstructions()); } - public function testGetInstructionsSetInformation() + public function testGetInstruction() { - $this->assertNull($this->_instructions->getInstructions()); - $testInstruction = 'second test'; - $this->_info->setAdditionalInformation('instructions', $testInstruction); - $this->assertEquals($testInstruction, $this->_instructions->getInstructions()); + $methodInstance = $this->getMock( + 'Magento\Payment\Model\MethodInterface', + ['getConfigData', 'getCode', 'getFormBlockType', 'getTitle'], + [], + '', + false + ); + $methodInstance->expects($this->once()) + ->method('getConfigData') + ->with('instructions') + ->willReturn('get the instruction here'); + $this->_info->expects($this->once()) + ->method('getAdditionalInformation') + ->with('instructions') + ->willReturn(false); + $this->_info->expects($this->once()) + ->method('getMethodInstance') + ->willReturn($methodInstance); + $this->assertEquals('get the instruction here', $this->_instructions->getInstructions()); } } 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 8322174e45ef960f60f95c6e42ff3ed4559f3a4b..82ad3a3460298fb8e902b4c6cd435284ca41ca2f 100644 --- a/dev/tests/unit/testsuite/Magento/Payment/Block/Info/SubstitutionTest.php +++ b/dev/tests/unit/testsuite/Magento/Payment/Block/Info/SubstitutionTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Payment\Block\Info; class SubstitutionTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Payment/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Payment/Helper/DataTest.php index f2ae8359ac89d28e21520d34c8c128bd08db6da0..0c3371787ecc978d2c0ff5b782d136227c27317c 100644 --- a/dev/tests/unit/testsuite/Magento/Payment/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Payment/Helper/DataTest.php @@ -42,7 +42,7 @@ class DataTest extends \PHPUnit_Framework_TestCase $layoutFactoryMock->expects($this->once())->method('create')->willReturn($this->layoutMock); $this->methodFactory = $this->getMock('Magento\Payment\Model\Method\Factory', [], [], '', false); - $this->appEmulation = $this->getMock('Magento\Core\Model\App\Emulation', [], [], '', false); + $this->appEmulation = $this->getMock('Magento\Store\Model\App\Emulation', [], [], '', false); $paymentConfig = $this->getMock('Magento\Payment\Model\Config', [], [], '', false); $this->initialConfig = $this->getMock('Magento\Framework\App\Config\Initial', [], [], '', false); 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 2cd8f13ab78d8c503f461ad4e4f26570bfd41bce..dfcc3b59ee82cdd74f245b8de4c3c76967d10512 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 4bcd1783e086f84b9e62f2a782c65cfb8c672753..d62c4c2b960f6854c0c5861bc54b15b155e548b6 100644 --- a/dev/tests/unit/testsuite/Magento/Payment/Model/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Payment/Model/ConfigTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 d559b415c790889b484c66377f16e0306a29cf57..7442764bd5c7faeafb91a1ed9cb527e376f5dad0 100644 --- a/dev/tests/unit/testsuite/Magento/Payment/Model/MethodListTest.php +++ b/dev/tests/unit/testsuite/Magento/Payment/Model/MethodListTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Payment\Model; class MethodListTest extends \PHPUnit_Framework_TestCase 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 6666c8c0938d6561df24bdf47c5fa9068eb7afc5..2b7241c10ef7bb09d84f5f85a3454156b8009bc5 100644 --- a/dev/tests/unit/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php +++ b/dev/tests/unit/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php @@ -7,6 +7,7 @@ namespace Magento\Persistent\Block\Header; /** * Class AdditionalTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AdditionalTest extends \PHPUnit_Framework_TestCase { @@ -86,6 +87,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/Persistent/Model/Observer/ApplyBlockPersistentDataTest.php b/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/ApplyBlockPersistentDataTest.php index 2284e94e455bddfbda4a9d40c95993f177d9c948..246c8a83cbbded6b27d6fd6d24bcde5a3c7cc743 100644 --- a/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/ApplyBlockPersistentDataTest.php +++ b/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/ApplyBlockPersistentDataTest.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 1f1d3f29960edb6dadbe2224d0b54988a5178ed2..127be1b927955424ebb7b2fd09c5c4cec195ddc0 100644 --- a/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/RemovePersistentCookieTest.php +++ b/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/RemovePersistentCookieTest.php @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @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 e2b4b31f80147d8bab44a1b5d33fb56f8259d529..8602aef31ded170bce40f2b97c873532d2e1ae55 100644 --- a/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/UpdateCustomerCookiesTest.php +++ b/dev/tests/unit/testsuite/Magento/Persistent/Model/Observer/UpdateCustomerCookiesTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e828f3c8d54934a699137f02aaf213fc1b3ae4f5..160b1451b5952424a21940c204f18680e8be2f2b 100644 --- a/dev/tests/unit/testsuite/Magento/Persistent/Model/QuoteManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Persistent/Model/QuoteManagerTest.php @@ -5,6 +5,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Persistent\Model; class QuoteManagerTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/Observer/Backend/CustomerQuoteTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/Observer/Backend/CustomerQuoteTest.php index ac67c2867b42ee4c76d2d030014bd15c5efd7a8b..c1e59dbfd91ce85f9c1bea837717f40fa19583ce 100644 --- a/dev/tests/unit/testsuite/Magento/Quote/Model/Observer/Backend/CustomerQuoteTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/Observer/Backend/CustomerQuoteTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Quote\Model\Observer\Backend; class CustomerQuoteTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php index a852304a03be3eb3cc6f8a62330a1891c33984d1..efdb5bfdb222557169ece9d4aea60df7363c4edb 100644 --- a/dev/tests/unit/testsuite/Magento/Quote/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Quote\Model\Observer\Frontend\Quote\Address; /** @@ -75,6 +78,9 @@ class CollectTotalsTest extends \PHPUnit_Framework_TestCase */ protected $groupInterfaceMock; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); @@ -191,6 +197,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/Quote/Model/Quote/AddressTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/AddressTest.php index d2ce34e3ddd956e435bcf9b86c5d47e24a5fa73f..6d45948f758f97ab288da9546093ae7b1d8eb97c 100644 --- a/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/AddressTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/AddressTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Quote\Model\Quote; use Magento\Store\Model\ScopeInterface; diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/Item/CompareTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/Item/CompareTest.php index 8fd0c411b6319ce450d2080ad0521c0f96a1f449..866f647b8e0e067c3193403fec0384f59868af54 100644 --- a/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/Item/CompareTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/Item/CompareTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Quote\Model\Quote\Item; /** diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/ItemTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/ItemTest.php index 5a829956b522aa2e55ddaa55572ca69c1ffbc983..131ec74296564e732039ca6e4fc3322c048b6021 100644 --- a/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/ItemTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/ItemTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Quote\Model\Quote; class ItemTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteTest.php index 0ccd1c6b100fe73ec238e62a97fc167fee45eb87..4956334694371ba507536dc8c3fe06c499d1e8cb 100644 --- a/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/QuoteTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Quote\Model; use Magento\Quote\Model\Quote\Address; @@ -13,6 +16,7 @@ use Magento\TestFramework\Helper\ObjectManager; * Test class for \Magento\Quote\Model * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.TooManyFields) */ class QuoteTest extends \PHPUnit_Framework_TestCase { @@ -523,6 +527,9 @@ class QuoteTest extends \PHPUnit_Framework_TestCase $this->assertInstanceOf('Magento\Quote\Model\Quote', $result); } + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ public function testSetCustomerAddressData() { $customerId = 1; 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 d4456023c269cca969978f74a5c7a7531af5d4c7..7256703d3c0b5761b807f976783b50880e46025e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Reports\Model\Resource\Report\Collection; class AbstractCollectionTest extends \PHPUnit_Framework_TestCase @@ -49,4 +52,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 10cd08f64b884492f05e9278fa03d387130cf8a3..1dd384080fc18d6f4dd3b9620d7a65178a7b2582 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 7bf84d58692ff0d62aad6c721380516190081abb..c2181d1c2ef39c599a1e01d58500d9596702d9c5 100644 --- a/dev/tests/unit/testsuite/Magento/Rss/Model/RssManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Rss/Model/RssManagerTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 37ca6fa878caa8c1dc50ca9a9339b347ad278c56..d4f72b1f046ffef32b2800c8dc197fce871badad 100644 --- a/dev/tests/unit/testsuite/Magento/Rss/Model/UrlBuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Rss/Model/UrlBuilderTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 a33faf44642cbf3a14ea2a9c33b245356f12b579..04ad345d5a35ccf0b27c057be4f0876c86c0b39a 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Rule\Model\Condition\Product; use ReflectionMethod; @@ -284,6 +286,7 @@ class AbstractProductTest extends \PHPUnit_Framework_TestCase * @param array $expectedValueSelectOptions * @param array $expectedValueOption * @dataProvider prepareValueOptionsDataProvider + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function testPrepareValueOptions( $setData, @@ -364,6 +367,7 @@ class AbstractProductTest extends \PHPUnit_Framework_TestCase /** * @return array + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function prepareValueOptionsDataProvider() { 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 8141a6af4c9ee6aab626a6e5293f3c1458b045c3..7c2a10dfdae997b98d3354504eeef61bf7dc8aff 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 48fa0c73b85977ff2b1d525a8a123fa16c42040c..7e469e1be6214ce0f4ee2015446e3bd74c0e7936 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 2953d3c2702dc7a2e58d28d41708b0a03d5e4f25..84cbd4ac31d7b241afcb7166f422cf97f03a3c3e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 556fcb44b87d8699d5d3db7f0a9a8b55f9c3d78f..409b5029e0da4d76a9ec15233b672d246c95a725 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 16aa530cf3c85295477749571de1690f40f0e347..29c757617b4da4797aaeb9bd795961545c0ed6b7 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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/NewActionTest.php b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/NewActionTest.php index 2e06d59121eafa84e2ce84f633170dc0702817f6..6a97735ce2f02df08d9989bdb70f3e763c7b3491 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 @@ -7,6 +7,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 3c826d716a41b9b032b6d4054318512f8fa0d512..bbbc973d67f1a49bdb9e82c6ad7234b849ed729a 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 @@ -7,6 +7,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/SaveTest.php b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/SaveTest.php index fb76705531a7d636eff714a8bd5eb6f7d43a2b17..5a395357753827ebff92b7cbb2196154ccca72af 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Controller\Adminhtml\Order\Creditmemo; class SaveTest 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 672c8c22abdc69582c586f1b1f300e1233c07c5f..5da711e94fd3eb5977c2bd25e1ecdda324606528 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 @@ -7,6 +7,7 @@ namespace Magento\Sales\Controller\Adminhtml\Order\Creditmemo; /** * Class ViewTest + * @SuppressWarnings(PHPMD.TooManyFields) */ class ViewTest extends \PHPUnit_Framework_TestCase { @@ -90,6 +91,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 e0c5b08a36a4aa73bc9056eccaba08c26cd3df09..8030ee2d527c2ea565db444c97433539f7d95c9c 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\AdminOrder; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; @@ -77,6 +80,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/Grid/Child/CollectionUpdaterTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Grid/Child/CollectionUpdaterTest.php index 352c5fd0faad856a83b5b834bc834d8f024d8ddb..acc4e818fb6582503a003560141ee0477495dd1a 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 4d86a04806fe18268bbbda82c2336c23e7410cb3..f7c1faf7488986cf5a04f26d8c907b1c8463d8d7 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Grid/CollectionUpdaterTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Grid/CollectionUpdaterTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Grid; class CollectionUpdaterTest extends \PHPUnit_Framework_TestCase 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 d26e6a2d943bff106b9f2373ed68cbd8dadf80d1..c4d57221c8bdb833dbde02b5e6a9364e9bfaecd1 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 0cd264330cc613cf7590f1a4f23838cf1743bf8c..7e9d43e006f81036f76a525c1b00a28d5cd23974 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/CreditmemoTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/CreditmemoTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 55d44e69c65b6aa31493ecdb616f88f9dd252224..42830ceaa2f723492c030d85a8ed70dbf6b9241e 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 85a2112ccb2a192441f3d0aad86fbbb2c0dec002..55dd44cad8832a41e18cc3a4249f0ed485dfa4d8 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/InvoiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/InvoiceTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Sales\Model\Order; use Magento\Sales\Model\Resource\OrderFactory; 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 ffc7d9a3bf9626e1552c816dfd2859aa5330bd0a..e05b0644048e65d5a9642812ca213a768e47363e 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Resource/GridPoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Resource/GridPoolTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5e36dd8bfacba70c50249452d248b25013372513..7e4c91295407249a3d22638c97cbc49e9e4d9cd6 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d48db1e2a6ccb7e0502ee03832ad0dc4e16cc592..08e15499e1418cf25f7c56ef44638ba9f99474df 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\SalesRule\Model\Resource\Report; class CollectionTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/ByPercentTest.php b/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/ByPercentTest.php index 3a8f64727c33d0132c3e762bd8a9f810bf6179fb..b770464aa8d2a3008ab37c34ae5b3e9a987ca5db 100644 --- a/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/ByPercentTest.php +++ b/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/ByPercentTest.php @@ -209,7 +209,7 @@ class ByPercentTest extends \PHPUnit_Framework_TestCase 'amount' => 42, 'baseAmount' => 25.5, 'originalAmount' => 51, - 'baseOriginalAmount' => 46.5, + 'baseOriginalAmount' => 34.5, ], ] ]; diff --git a/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/ToPercentTest.php b/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/ToPercentTest.php index 7163d2680c9a3884baad59d89991cd902b20b35d..13bec6ff79e5a34f1369ae363e59c1d63822d8b3 100644 --- a/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/ToPercentTest.php +++ b/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/ToPercentTest.php @@ -209,7 +209,7 @@ class ToPercentTest extends \PHPUnit_Framework_TestCase 'amount' => 98, 'baseAmount' => 59.5, 'originalAmount' => 119, - 'baseOriginalAmount' => 108.5, + 'baseOriginalAmount' => 80.5, ], ] ]; diff --git a/dev/tests/unit/testsuite/Magento/SalesRule/Model/UtilityTest.php b/dev/tests/unit/testsuite/Magento/SalesRule/Model/UtilityTest.php index 4867f781ae19d53b87b246658a5ae0337dfbb742..048bbd7107d3e0473d7e5bce22228ed97d1bbc8f 100644 --- a/dev/tests/unit/testsuite/Magento/SalesRule/Model/UtilityTest.php +++ b/dev/tests/unit/testsuite/Magento/SalesRule/Model/UtilityTest.php @@ -8,6 +8,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 ee296fb5be01747063d1afbfb63e3d2067f58baa..47558f5000221e16f7eec5526b159c4104ad3b46 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Shipping\Controller\Adminhtml\Order\Shipment; use Magento\Backend\App\Action; @@ -156,6 +158,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 b8ee7eb5bad75c22f717180b562bfe2e873eaea0..ca913d99f871183b9c3945addb97600c26c3bf56 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 @@ -86,6 +86,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/SaveTest.php b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/SaveTest.php index 6d5637136adb1a8aa2ae496b3d6dc9cf79b67a4e..49462a66801a8dca454b47dfd510c3484d56ccca 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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/ViewTest.php b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/ViewTest.php index cd0423d4523a157ef8475f0c88cfa015d27f2f6d..d18f836bd35b26fab3d776e0299a035da60cba4a 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 @@ -7,6 +7,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/Shipping/Model/ShipmentTest.php b/dev/tests/unit/testsuite/Magento/Shipping/Model/ShipmentTest.php index 85eb9f1cdf193b80b3de91b80555f79b0366eda0..2b416097f02548757f57ba91ea3a36615bc03cae 100644 --- a/dev/tests/unit/testsuite/Magento/Shipping/Model/ShipmentTest.php +++ b/dev/tests/unit/testsuite/Magento/Shipping/Model/ShipmentTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 4d4eb13bcc9ec17b583e90d76ef724b751d43d02..aa33762fefdb13f1a58b86c5bd6442eaa938a6ca 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 2d5a9822dbbd90a6c9c4fda2460fc6efba647cb2..1d37e60cee1d1ed01c0ef12ab3a7930bf1a6d8f2 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Store\App\Action\Plugin; class StoreCheckTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/App/EmulationTest.php b/dev/tests/unit/testsuite/Magento/Store/Model/App/EmulationTest.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Core/Model/App/EmulationTest.php rename to dev/tests/unit/testsuite/Magento/Store/Model/App/EmulationTest.php index b7e7920042130e43dc3fb50f78284544d391c794..725f6fa510286f295d4d2574aef1e66b6440267b 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/App/EmulationTest.php +++ b/dev/tests/unit/testsuite/Magento/Store/Model/App/EmulationTest.php @@ -1,11 +1,14 @@ <?php /** - * Tests Magento\Core\Model\App\Emulation + * Tests Magento\Store\Model\App\Emulation * * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Core\Model\App; + +// @codingStandardsIgnoreFile + +namespace Magento\Store\Model\App; class EmulationTest extends \PHPUnit_Framework_TestCase { @@ -65,7 +68,7 @@ class EmulationTest extends \PHPUnit_Framework_TestCase const NEW_STORE_ID = 9; /** - * @var \Magento\Core\Model\App\Emulation + * @var \Magento\Store\Model\App\Emulation */ private $model; @@ -105,7 +108,7 @@ class EmulationTest extends \PHPUnit_Framework_TestCase $this->designMock->expects($this->any())->method('getData')->willReturn(false); // Prepare SUT - $this->model = $this->objectManager->getObject('Magento\Core\Model\App\Emulation', + $this->model = $this->objectManager->getObject('Magento\Store\Model\App\Emulation', [ 'storeManager' => $this->storeManagerMock, 'viewDesign' => $this->viewDesignMock, 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 577c58a6f788a12325d45c11ad051142376b3e00..d169e36f832ab5b12a9ae1801e55d345623840f2 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 f33892680122b0581355ea946e658534771b91b7..ac869a0ecaa3fdc69edc7d462517c3ce974d5f84 100644 --- a/dev/tests/unit/testsuite/Magento/Store/Model/Storage/DbTest.php +++ b/dev/tests/unit/testsuite/Magento/Store/Model/Storage/DbTest.php @@ -4,6 +4,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ea561e593e4a51922c1a37a320933d74b52d5b2e..86b2436be1fe13a79581fc56df11d767a8d45a2c 100644 --- a/dev/tests/unit/testsuite/Magento/Store/Model/StoreTest.php +++ b/dev/tests/unit/testsuite/Magento/Store/Model/StoreTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 7b19944d642cef2323cabba046436690a30d640c..f05de539943bd120524d5a2b9e8c165fd10778eb 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 68c8fe6eb6b0eb2124473d8da2d7571bf836328e..eb0e628c4ec162eaecfdbf751212f437143ba917 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Helper/DataTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Tax\Helper; use Magento\Framework\Object as MagentoObject; @@ -122,6 +125,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) { @@ -366,6 +370,74 @@ class DataTest extends \PHPUnit_Framework_TestCase ], ], ], + //Scenario 3: one item, with both shipping and product taxes + // note that 'shipping tax' is listed before 'product tax' + 'one_item_with_both_shipping_and_product_taxes' => [ + 'order' => [ + 'order_id' => 1, + 'shipping_tax_amount' => 2, + 'order_tax_details' => [ + 'items' => [ + 'shippingTax1' => [ + 'item_id' => null, + 'type' => 'shipping', + 'applied_taxes' => [ + [ + 'amount' => 2.0, + 'base_amount' => 2.0, + 'code' => 'US-CA-Ship', + 'title' => 'US-CA-Sales-Tax-Ship', + 'percent' => 10.0, + ], + ], + ], + 'itemTax1' => [ + 'item_id' => 1, + 'applied_taxes' => [ + [ + 'amount' => 5.0, + 'base_amount' => 5.0, + 'code' => 'US-CA', + 'title' => 'US-CA-Sales-Tax', + 'percent' => 20.0, + ], + ], + ], + ], + ], + ], + 'invoice' => [ + 'shipping_tax_amount' => 2, + 'invoice_items' => [ + 'item1' => new MagentoObject( + [ + 'order_item' => new MagentoObject( + [ + 'id' => 1, + 'tax_amount' => 5.00, + ] + ), + 'tax_amount' => 5.00, + ] + ), + ], + ], + // note that 'shipping tax' is now listed after 'product tax' + 'expected_results' => [ + [ + 'title' => 'US-CA-Sales-Tax', + 'percent' => 20.0, + 'tax_amount' => 5.00, + 'base_tax_amount' => 5.00, + ], + [ + 'title' => 'US-CA-Sales-Tax-Ship', + 'percent' => 10.0, + 'tax_amount' => 2.00, + 'base_tax_amount' => 2.00, + ], + ], + ], ]; return $data; 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 fc6e23be50d26f99f4e7d9b10eff6b8f53bcf38b..7e6651d4b474c35aeb0b18e0116b8c1e7b591b6a 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Model/Calculation/RowBaseAndTotalBaseCalculatorTestCase.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Model/Calculation/RowBaseAndTotalBaseCalculatorTestCase.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 87c5922f502ea69231b0d8fe2351b29f4bfd174e..7165f38b0b24984b376191c03f9e2e968ae431df 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Model/Config/TaxClassTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Model/Config/TaxClassTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 ae62bb24f3ccd7ffc3e8f14581953f8b2743e22c..81a26c41c488c2a8332fbbb71a1dc729e506ac4d 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Model/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Model/ConfigTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 9eb797bde35ad40001b3ab997fd846ab2d0537d8..424ceac9bc63f26b06862a4fdb5af7fa8e1e1622 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6aa1ca9aa3461cc4bc59d2e9611de36405d85757..2e90d16eaacf8b05629ce3ffd225782dd09a54fb 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 85eed412a95990d25cbf2d55e476513e760e8fb5..1e7ff2e174f73e922ffc38ff3d4487f678cac7e6 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Tax\Model\Sales\Total\Quote; /** @@ -27,6 +30,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/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 116115af88250c961d82c96751427db239f2c250..c33fae6fb629a28a7562c3fc9889f7dba2916de7 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 fcd11c1539908052d3013241f393c5e3ea5970fe..6a13ea689275577c23e17de44b241d3b8b00353e 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Theme\Model\Url\Plugin; class SignatureTest extends \PHPUnit_Framework_TestCase 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 c15e189b777db4530e0a62c2d69de53a6c03ef3c..359adca36a68a1d9bf117662bf270058d4822926 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 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 b2b9295f91a55b5139e2a53fd5e4b74076c4b31f..a916357b873e6a3649cd33210c2dd7c2ae467bca 100644 --- a/dev/tests/unit/testsuite/Magento/Tools/Di/Compiler/ArgumentsResolverTest.php +++ b/dev/tests/unit/testsuite/Magento/Tools/Di/Compiler/ArgumentsResolverTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Tools\Di\Compiler; class ArgumentsResolverTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tests/unit/testsuite/Magento/Tools/Di/Compiler/Config/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Tools/Di/Compiler/Config/ReaderTest.php index 7ccdb02d2065c65f0ae3a4833b51445dbdc63090..0c2f708332fec2697a4d8bd833bf0b8a874bd5dd 100644 --- a/dev/tests/unit/testsuite/Magento/Tools/Di/Compiler/Config/ReaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Tools/Di/Compiler/Config/ReaderTest.php @@ -5,6 +5,9 @@ */ namespace Magento\Tools\Di\Compiler\Config; +use Magento\Framework\App\Area; +use Magento\Tools\Di\Definition\Collection; + class ReaderTest extends \PHPUnit_Framework_TestCase { /** @@ -54,6 +57,9 @@ class ReaderTest extends \PHPUnit_Framework_TestCase false ); $this->argumentsResolver = $this->getMock('Magento\Tools\Di\Compiler\ArgumentsResolver', [], [], '', false); + $this->argumentsResolverFactory->expects($this->any()) + ->method('create') + ->willReturn($this->argumentsResolver); $this->classReaderDecorator = $this->getMock( 'Magento\Tools\Di\Code\Reader\ClassReaderDecorator', [], @@ -72,71 +78,182 @@ class ReaderTest extends \PHPUnit_Framework_TestCase ); } - public function testGenerateCachePerScopeExtends() + public function testGenerateCachePerScopeGlobal() { - $definitionsCollection = $this->getMock('Magento\Tools\Di\Definition\Collection', [], [], '', false); - $this->diContainerConfig->expects($this->once()) - ->method('extend') - ->with([]); - $this->configLoader->expects($this->once()) - ->method('load') - ->with('areaCode') - ->willReturn([]); - - $this->argumentsResolverFactory->expects($this->once()) - ->method('create') - ->with($this->diContainerConfig) - ->willReturn($this->argumentsResolver); - $definitionsCollection->expects($this->exactly(2)) - ->method('getInstancesNamesList') - ->willReturn(['instanceType1'], ['instanceType2']); - $definitionsCollection->expects($this->once()) - ->method('getInstanceArguments') - ->willReturnMap([ - ['instanceType1', null], - ['instanceType2', ['arg1', 'arg2']], - ]); - $this->typeReader->expects($this->exactly(3)) - ->method('isConcrete') - ->willReturnMap([ - ['instanceType1', true], - ['instanceType2', false], - ['originalType1', true], - ['originalType2', false], - ]); - $this->argumentsResolver->expects($this->exactly(2)) - ->method('getResolvedConstructorArguments') - ->willReturnMap([ - ['instanceType1', 'resolvedConstructor1'], - ['instanceVirtualType1', 'resolvedConstructor2'], - ]); - $this->diContainerConfig->expects($this->exactly(2)) + $definitionCollection = $this->getDefinitionsCollection(); + $this->diContainerConfig->expects($this->any()) ->method('getVirtualTypes') - ->willReturn(['instanceVirtualType1' => 1, 'instanceVirtualType2' => 2]); - $this->diContainerConfig->expects($this->exactly(4)) + ->willReturn($this->getVirtualTypes()); + $this->diContainerConfig->expects($this->any()) + ->method('getPreferences') + ->willReturn($this->getPreferences()); + + $getResolvedConstructorArgumentsMap = $this->getResolvedVirtualConstructorArgumentsMap( + $definitionCollection, + $this->getVirtualTypes() + ); + + $this->diContainerConfig->expects($this->any()) ->method('getInstanceType') - ->willReturnMap([ - ['instanceVirtualType1', 'originalType1'], - ['instanceVirtualType2', 'originalType2'], - ]); - $definitionsCollection->expects($this->exactly(2)) - ->method('hasInstance') - ->willReturn(''); - $this->classReaderDecorator->expects($this->once()) - ->method('getConstructor') - ->willReturn('constructor'); - $this->diContainerConfig->expects($this->once()) + ->willReturnMap($this->getInstanceTypeMap($this->getVirtualTypes())); + + $this->diContainerConfig->expects($this->any()) ->method('isShared') - ->willReturnMap([ - ['instanceType1', true], - ['instanceType2', false], - ]); - $this->diContainerConfig->expects($this->once()) + ->willReturnMap($this->getExpectedNonShared()); + + $this->diContainerConfig->expects($this->any()) ->method('getPreference') - ->willReturnMap([ - ['instanceType1', 'instanceType1ss'], - ['instanceType2', 'instanceType2'], - ]); - $this->model->generateCachePerScope($definitionsCollection, 'areaCode'); + ->willReturnMap($this->getPreferencesMap()); + + $isConcreteMap = []; + foreach ($definitionCollection->getInstancesNamesList() as $instanceType) { + $isConcreteMap[] = [$instanceType, strpos($instanceType, 'Interface') === false]; + + $getResolvedConstructorArgumentsMap[] = [ + $instanceType, + $definitionCollection->getInstanceArguments($instanceType), + $this->getResolvedArguments( + $definitionCollection->getInstanceArguments($instanceType) + ) + ]; + } + + $this->typeReader->expects($this->any()) + ->method('isConcrete') + ->willReturnMap($isConcreteMap); + $this->argumentsResolver->expects($this->any()) + ->method('getResolvedConstructorArguments') + ->willReturnMap($getResolvedConstructorArgumentsMap); + + $this->assertEquals( + $this->getExpectedGlobalConfig(), + $this->model->generateCachePerScope($definitionCollection, Area::AREA_GLOBAL) + ); + } + + /** + * @return array + */ + private function getExpectedGlobalConfig() + { + return [ + 'arguments' => [ + 'ConcreteType1' => serialize(['resolved_argument1', 'resolved_argument2']), + 'ConcreteType2' => serialize(['resolved_argument1', 'resolved_argument2']), + 'virtualType1' => serialize(['resolved_argument1', 'resolved_argument2']) + ], + 'nonShared' => [ + 'ConcreteType2' => true, + 'ThirdPartyInterface' => true + ], + 'preferences' => $this->getPreferences(), + 'instanceTypes' => $this->getVirtualTypes(), + ]; + } + + /** + * @return Collection + */ + private function getDefinitionsCollection() + { + $definitionCollection = new Collection(); + $definitionCollection->addDefinition('ConcreteType1', ['argument1', 'argument2']); + $definitionCollection->addDefinition('ConcreteType2', ['argument1', 'argument2']); + $definitionCollection->addDefinition('Interface1', [null]); + + return $definitionCollection; + } + + /** + * @return array + */ + private function getVirtualTypes() + { + return ['virtualType1' => 'ConcreteType1']; + } + + /** + * @return array + */ + private function getExpectedNonShared() + { + return [ + ['ConcreteType1', true], + ['ConcreteType2', false], + ['Interface1', true], + ['ThirdPartyInterface', false] + ]; + } + + /** + * @return array + */ + private function getPreferences() + { + return [ + 'Interface1' => 'ConcreteType1', + 'ThirdPartyInterface' => 'ConcreteType2' + ]; + } + + /** + * @return array + */ + private function getPreferencesMap() + { + return [ + ['ConcreteType1', 'ConcreteType1'], + ['ConcreteType2', 'ConcreteType2'], + ['Interface1', 'ConcreteType1'], + ['ThirdPartyInterface', 'ConcreteType2'] + ]; + } + + /** + * @param array $arguments + * @return array|null + */ + private function getResolvedArguments($arguments) + { + return empty($arguments) ? null : array_map( + function ($argument) { + return 'resolved_' . $argument; + }, + $arguments + ); + } + + /** + * @param array $virtualTypes + * @return array + */ + private function getInstanceTypeMap($virtualTypes) + { + $getInstanceTypeMap = []; + foreach ($virtualTypes as $virtualType => $concreteType) { + $getInstanceTypeMap[] = [$virtualType, $concreteType]; + } + + return $getInstanceTypeMap; + } + + /** + * @param Collection $definitionCollection + * @param array $virtualTypes + * @return array + */ + private function getResolvedVirtualConstructorArgumentsMap(Collection $definitionCollection, array $virtualTypes) + { + $getResolvedConstructorArgumentsMap = []; + foreach ($virtualTypes as $virtualType => $concreteType) { + $getResolvedConstructorArgumentsMap[] = [ + $virtualType, + $definitionCollection->getInstanceArguments($concreteType), + $this->getResolvedArguments( + $definitionCollection->getInstanceArguments($concreteType) + ) + ]; + } + return $getResolvedConstructorArgumentsMap; } } 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 21b2b5cca11dec72309d8dbd3718c40c83b8110f..b41a11b6c1e234e71f8dfbf2773fc4b423c58b0c 100644 --- a/dev/tests/unit/testsuite/Magento/Tools/Di/Definition/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Tools/Di/Definition/CollectionTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5c9ba57c3a13809713b8597b7a7d75e4495023ef..1371b705ecf8ed406176f37b1c9e9282a250945c 100644 --- a/dev/tests/unit/testsuite/Magento/Tools/I18n/Parser/ParserTest.php +++ b/dev/tests/unit/testsuite/Magento/Tools/I18n/Parser/ParserTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Tools\I18n\Parser; use Magento\Tools\I18n\Parser as Parser; diff --git a/dev/tests/unit/testsuite/Magento/Ui/Component/FilterPoolTest.php b/dev/tests/unit/testsuite/Magento/Ui/Component/FilterPoolTest.php index 2f1b6f707abb51bc28b07ca4e51b90be96cc433a..1873f02eec1b06b13ae90797e56ce0f21d2c5a01 100644 --- a/dev/tests/unit/testsuite/Magento/Ui/Component/FilterPoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Ui/Component/FilterPoolTest.php @@ -148,6 +148,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 2baffadf113c2c25835ded43879f37a2b7fe1d07..92819b91a1f6b9a10737af8f000c4d150a07b8aa 100644 --- a/dev/tests/unit/testsuite/Magento/Ui/Component/ListingTest.php +++ b/dev/tests/unit/testsuite/Magento/Ui/Component/ListingTest.php @@ -12,6 +12,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/UrlRewrite/Block/Catalog/Edit/FormTest.php b/dev/tests/unit/testsuite/Magento/UrlRewrite/Block/Catalog/Edit/FormTest.php index 5b2cb6669e0f2cfad181df24411f5faccd7b15cd..ac2af1521f01ad2ec3abaa475a9933d40bf58aa6 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 15495e3e0c19e597add31475134055b917b57966..0d0df18749c3fb0fd5898cbfb85b54f887088d62 100644 --- a/dev/tests/unit/testsuite/Magento/UrlRewrite/Model/Storage/DbStorageTest.php +++ b/dev/tests/unit/testsuite/Magento/UrlRewrite/Model/Storage/DbStorageTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6d3a0178846b8d3ddcd7ed0af0039e6dce3da220..bad175a1d6b75c69e1a83780c5fccff8991e037b 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Controller/RestTest.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Controller/RestTest.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a4c62ceab731c5efffb24a10d8aca786b2a88232..227db3f99c278383b328dbf6171975d0b9b0561b 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d0d312be691d5e84b02d4056085db3fe9c91c459..b777c141eb81bf658fef378712093f40e271f240 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/_files/test_interfaces.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/_files/test_interfaces.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6a2ad785605f313bf87af84a2e32255ddd0d9676..71e38fd6b8813d491b2d6f1c2a127661137ca543 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 @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Test class for \Magento\Weee\Model\Attribute\Backend\Weee\Tax */ diff --git a/dev/tests/unit/testsuite/Magento/Weee/Model/Total/Quote/WeeeTaxTest.php b/dev/tests/unit/testsuite/Magento/Weee/Model/Total/Quote/WeeeTaxTest.php index f42bcdd7808be82e9f02f96d8270df72266a3187..b1be049dd0c5081adbcdb09888e2a6f5067b3098 100644 --- a/dev/tests/unit/testsuite/Magento/Weee/Model/Total/Quote/WeeeTaxTest.php +++ b/dev/tests/unit/testsuite/Magento/Weee/Model/Total/Quote/WeeeTaxTest.php @@ -279,7 +279,7 @@ class WeeeTaxTest extends \PHPUnit_Framework_TestCase $data['price_incl_tax_weee_taxable_unit_included_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => true, - 'getCalculationAgorithm' => Calculation::CALC_UNIT_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_UNIT_BASE, ], 'weee_config' => [ 'isEnabled' => true, @@ -323,7 +323,7 @@ class WeeeTaxTest extends \PHPUnit_Framework_TestCase $data['price_incl_tax_weee_taxable_unit_not_included_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => true, - 'getCalculationAgorithm' => Calculation::CALC_UNIT_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_UNIT_BASE, ], 'weee_config' => [ 'isEnabled' => true, @@ -367,7 +367,7 @@ class WeeeTaxTest extends \PHPUnit_Framework_TestCase $data['price_excl_tax_weee_taxable_unit_included_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => false, - 'getCalculationAgorithm' => Calculation::CALC_UNIT_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_UNIT_BASE, ], 'weee_config' => [ 'isEnabled' => true, @@ -411,7 +411,7 @@ class WeeeTaxTest extends \PHPUnit_Framework_TestCase $data['price_incl_tax_weee_non_taxable_unit_included_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => true, - 'getCalculationAgorithm' => Calculation::CALC_UNIT_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_UNIT_BASE, ], 'weee_config' => [ 'isEnabled' => true, @@ -449,7 +449,7 @@ class WeeeTaxTest extends \PHPUnit_Framework_TestCase $data['price_excl_tax_weee_non_taxable_unit_include_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => false, - 'getCalculationAgorithm' => Calculation::CALC_UNIT_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_UNIT_BASE, ], 'weee_config' => [ 'isEnabled' => true, @@ -487,7 +487,7 @@ class WeeeTaxTest extends \PHPUnit_Framework_TestCase $data['price_incl_tax_weee_taxable_row_include_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => true, - 'getCalculationAgorithm' => Calculation::CALC_ROW_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_ROW_BASE, ], 'weee_config' => [ 'isEnabled' => true, @@ -531,7 +531,7 @@ class WeeeTaxTest extends \PHPUnit_Framework_TestCase $data['price_excl_tax_weee_taxable_row_include_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => false, - 'getCalculationAgorithm' => Calculation::CALC_ROW_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_ROW_BASE, ], 'weee_config' => [ 'isEnabled' => true, @@ -575,7 +575,7 @@ class WeeeTaxTest extends \PHPUnit_Framework_TestCase $data['price_incl_tax_weee_non_taxable_row_include_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => true, - 'getCalculationAgorithm' => Calculation::CALC_ROW_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_ROW_BASE, ], 'weee_config' => [ 'isEnabled' => true, @@ -613,7 +613,7 @@ class WeeeTaxTest extends \PHPUnit_Framework_TestCase $data['price_excl_tax_weee_non_taxable_row_not_included_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => false, - 'getCalculationAgorithm' => Calculation::CALC_ROW_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_ROW_BASE, ], 'weee_config' => [ 'isEnabled' => true, diff --git a/dev/tests/unit/testsuite/Magento/Weee/Model/Total/Quote/WeeeTest.php b/dev/tests/unit/testsuite/Magento/Weee/Model/Total/Quote/WeeeTest.php index a13403e3ad8c186c6ff203846d25f88cc0a2d5c6..4ddcc5d6296da7875c3b5fd16b30077efd311d19 100644 --- a/dev/tests/unit/testsuite/Magento/Weee/Model/Total/Quote/WeeeTest.php +++ b/dev/tests/unit/testsuite/Magento/Weee/Model/Total/Quote/WeeeTest.php @@ -221,7 +221,7 @@ class WeeeTest extends \PHPUnit_Framework_TestCase $data['price_incl_tax_weee_taxable_unit_included_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => true, - 'getCalculationAgorithm' => Calculation::CALC_UNIT_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_UNIT_BASE, ], 'weee_config' => [ 'isEnabled' => true, @@ -261,7 +261,7 @@ class WeeeTest extends \PHPUnit_Framework_TestCase $data['price_incl_tax_weee_taxable_unit_not_included_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => true, - 'getCalculationAgorithm' => Calculation::CALC_UNIT_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_UNIT_BASE, ], 'weee_config' => [ 'isEnabled' => true, @@ -301,7 +301,7 @@ class WeeeTest extends \PHPUnit_Framework_TestCase $data['price_excl_tax_weee_taxable_unit_included_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => false, - 'getCalculationAgorithm' => Calculation::CALC_UNIT_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_UNIT_BASE, ], 'weee_config' => [ 'isEnabled' => true, @@ -341,7 +341,7 @@ class WeeeTest extends \PHPUnit_Framework_TestCase $data['price_incl_tax_weee_non_taxable_unit_included_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => true, - 'getCalculationAgorithm' => Calculation::CALC_UNIT_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_UNIT_BASE, ], 'weee_config' => [ 'isEnabled' => true, @@ -383,7 +383,7 @@ class WeeeTest extends \PHPUnit_Framework_TestCase $data['price_excl_tax_weee_non_taxable_unit_included_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => false, - 'getCalculationAgorithm' => Calculation::CALC_UNIT_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_UNIT_BASE, ], 'weee_config' => [ 'isEnabled' => true, @@ -425,7 +425,7 @@ class WeeeTest extends \PHPUnit_Framework_TestCase $data['price_incl_tax_weee_taxable_row_included_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => true, - 'getCalculationAgorithm' => Calculation::CALC_ROW_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_ROW_BASE, ], 'weee_config' => [ 'isEnabled' => true, @@ -465,7 +465,7 @@ class WeeeTest extends \PHPUnit_Framework_TestCase $data['price_excl_tax_weee_taxable_row_included_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => false, - 'getCalculationAgorithm' => Calculation::CALC_ROW_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_ROW_BASE, ], 'weee_config' => [ 'isEnabled' => true, @@ -505,7 +505,7 @@ class WeeeTest extends \PHPUnit_Framework_TestCase $data['price_incl_tax_weee_non_taxable_row_included_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => true, - 'getCalculationAgorithm' => Calculation::CALC_ROW_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_ROW_BASE, ], 'weee_config' => [ 'isEnabled' => true, @@ -547,7 +547,7 @@ class WeeeTest extends \PHPUnit_Framework_TestCase $data['price_excl_tax_weee_non_taxable_row_included_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => false, - 'getCalculationAgorithm' => Calculation::CALC_ROW_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_ROW_BASE, ], 'weee_config' => [ 'isEnabled' => true, @@ -589,7 +589,7 @@ class WeeeTest extends \PHPUnit_Framework_TestCase $data['price_excl_tax_weee_non_taxable_row_not_included_in_subtotal'] = [ 'tax_config' => [ 'priceIncludesTax' => false, - 'getCalculationAgorithm' => Calculation::CALC_ROW_BASE, + 'getCalculationAlgorithm' => Calculation::CALC_ROW_BASE, ], 'weee_config' => [ 'isEnabled' => true, diff --git a/dev/tests/unit/testsuite/Magento/Weee/Pricing/AdjustmentTest.php b/dev/tests/unit/testsuite/Magento/Weee/Pricing/AdjustmentTest.php index 4b0abf2d783cc09023cf1940bb103b7a88528986..118703306cd1760075b0879c7302fb28babd34c2 100644 --- a/dev/tests/unit/testsuite/Magento/Weee/Pricing/AdjustmentTest.php +++ b/dev/tests/unit/testsuite/Magento/Weee/Pricing/AdjustmentTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Weee\Pricing; use Magento\Framework\Pricing\Object\SaleableInterface; 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 7120d0bfedc9331b03dc33dbcabd15ae63ccf2c0..e5b2e125e866bb7d4267cda5e019ea533bb168d5 100644 --- a/dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/CartTest.php +++ b/dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/CartTest.php @@ -6,6 +6,10 @@ namespace Magento\Wishlist\Controller\Index; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class CartTest extends \PHPUnit_Framework_TestCase { /** @@ -88,6 +92,9 @@ class CartTest extends \PHPUnit_Framework_TestCase */ protected $urlMock; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { $this->wishlistProviderMock = $this->getMockBuilder('Magento\Wishlist\Controller\WishlistProviderInterface') @@ -263,6 +270,9 @@ class CartTest extends \PHPUnit_Framework_TestCase $this->assertEquals($this->responseMock, $this->model->execute()); } + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function testExecuteWithQuantityArray() { $itemId = 2; @@ -473,6 +483,9 @@ class CartTest extends \PHPUnit_Framework_TestCase $this->assertEquals($this->responseMock, $this->model->execute()); } + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function testExecuteWithoutQuantityArrayAndOutOfStock() { $itemId = 2; @@ -633,6 +646,9 @@ class CartTest extends \PHPUnit_Framework_TestCase $this->assertEquals($this->responseMock, $this->model->execute()); } + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function testExecuteWithoutQuantityArrayAndConfigurable() { $itemId = 2; 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 25835867f17d0663ac0951e047a499e9839a5f10..5ab6017080d670befceb66456d0b08439cbd9c70 100644 --- a/dev/tests/unit/testsuite/Magento/Wishlist/Model/Rss/WishlistTest.php +++ b/dev/tests/unit/testsuite/Magento/Wishlist/Model/Rss/WishlistTest.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Wishlist\Model\Rss; class WishlistTest extends \PHPUnit_Framework_TestCase diff --git a/dev/tools/Magento/Tools/Di/Code/Reader/ClassesScanner.php b/dev/tools/Magento/Tools/Di/Code/Reader/ClassesScanner.php index 42076377419a344728227c49cf927d167ccb7135..97063a236a2f9543ebb4ab503ced1a75b059d0b2 100644 --- a/dev/tools/Magento/Tools/Di/Code/Reader/ClassesScanner.php +++ b/dev/tools/Magento/Tools/Di/Code/Reader/ClassesScanner.php @@ -41,7 +41,7 @@ class ClassesScanner } $classes = []; $recursiveIterator = new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($realPath), + new \RecursiveDirectoryIterator($realPath, \FilesystemIterator::FOLLOW_SYMLINKS), \RecursiveIteratorIterator::SELF_FIRST ); /** @var $fileItem \SplFileInfo */ diff --git a/dev/tools/Magento/Tools/Di/Compiler/Config/Reader.php b/dev/tools/Magento/Tools/Di/Compiler/Config/Reader.php index 8dca09ef4e27dacae6fbf977937939595c9b0851..f885f6fd12cd39318664c508c9d80c7c9a426a96 100644 --- a/dev/tools/Magento/Tools/Di/Compiler/Config/Reader.php +++ b/dev/tools/Magento/Tools/Di/Compiler/Config/Reader.php @@ -1,6 +1,5 @@ <?php /** - * * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ @@ -49,7 +48,7 @@ class Reader * @param Type $typeReader */ public function __construct( - \Magento\Framework\ObjectManager\ConfigInterface $diContainerConfig, + ConfigInterface $diContainerConfig, App\ObjectManager\ConfigLoader $configLoader, ArgumentsResolverFactory $argumentsResolverFactory, ClassReaderDecorator $classReaderDecorator, @@ -80,12 +79,15 @@ class Reader } $config = []; + + $this->fillThirdPartyInterfaces($areaConfig, $definitionsCollection); $config['arguments'] = $this->getConfigForScope($definitionsCollection, $areaConfig); foreach ($config['arguments'] as $key => $value) { if ($value !== null) { $config['arguments'][$key] = serialize($value); } } + foreach ($definitionsCollection->getInstancesNamesList() as $instanceName) { if (!$areaConfig->isShared($instanceName)) { $config['nonShared'][$instanceName] = true; @@ -95,6 +97,7 @@ class Reader $config['preferences'][$instanceName] = $preference; } } + foreach (array_keys($areaConfig->getVirtualTypes()) as $virtualType) { $config['instanceTypes'][$virtualType] = $areaConfig->getInstanceType($virtualType); } @@ -140,4 +143,26 @@ class Reader } return $constructors; } + + /** + * Returns preferences for third party code + * + * @param ConfigInterface $config + * @param DefinitionsCollection $definitionsCollection + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + * + * @return void + */ + private function fillThirdPartyInterfaces(ConfigInterface $config, DefinitionsCollection $definitionsCollection) + { + $definedInstances = $definitionsCollection->getInstancesNamesList(); + + foreach ($config->getPreferences() as $interface => $preference) { + if (in_array($interface, $definedInstances)) { + continue; + } + + $definitionsCollection->addDefinition($interface, []); + } + } } diff --git a/dev/tools/Magento/Tools/Di/Definition/Collection.php b/dev/tools/Magento/Tools/Di/Definition/Collection.php index 82638c7c5578d862fd0a24485624fe7f82b96879..580f930d24cdd59584306f0cd3eb62e696f0a170 100644 --- a/dev/tools/Magento/Tools/Di/Definition/Collection.php +++ b/dev/tools/Magento/Tools/Di/Definition/Collection.php @@ -1,6 +1,5 @@ <?php /** - * * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ @@ -33,7 +32,7 @@ class Collection * * @return void */ - public function initialize($definitions) + public function initialize(array $definitions) { $this->definitions = $definitions; } @@ -54,7 +53,7 @@ class Collection * Add new definition for instance * * @param string $instance - * @param array $arguments + * @param array|null $arguments * * @return void */ @@ -67,7 +66,7 @@ class Collection * Returns instance arguments * * @param string $instanceName - * @return null + * @return null|array */ public function getInstanceArguments($instanceName) { diff --git a/dev/tools/performance-toolkit/README.txt b/dev/tools/performance-toolkit/README.txt index f4bf6427b5f14935dbaf419bb988b44a29bf5b96..0a94b4e4b38c845d0c51f1069f88a65c14e7ff10 100644 --- a/dev/tools/performance-toolkit/README.txt +++ b/dev/tools/performance-toolkit/README.txt @@ -4,19 +4,27 @@ Performance Toolkit Installation ----------- jMeter: --- go to http://jmeter.apache.org/download_jmeter.cgi and download jMeter in Source section (pay you attention that Java 6 or later is required) +-- go to http://jmeter.apache.org/download_jmeter.cgi and download jMeter in Binary section (pay you attention that Java 6 or later is required) -- unzip archive Plugins (only if you want to use additional reports (like graphs)): -- go to http://jmeter-plugins.org/downloads/all/ and download JMeterPlugins-Standard and JMeterPlugins-Extras -- unzip them to appropriate ext directory of your jMeter instance. +-- additional reports can now be enabled via GUI (right click them, then click Enable) or editing the jMeter JMX XML (set 'enabled="true"'). Usage ----------- +Before running the jMeter tests for the first time, you will need to first use generate.php to generate the test data. + +If you do not wish to use performance metrics gathered from the server(s) (such as CPU / IO load), or do not wish to configure the jMeter metric gathering software on your server(s), you can disable that either via the GUI (right click on "Performance Metrics Collector" and click Disable) or by editing the jMeter JMX XML from: +<kg.apc.jmeter.perfmon.PerfMonCollector guiclass="kg.apc.jmeter.vizualizers.PerfMonGui" testclass="kg.apc.jmeter.perfmon.PerfMonCollector" testname="Performance Metrics Collector" enabled="true"> +to: +<kg.apc.jmeter.perfmon.PerfMonCollector guiclass="kg.apc.jmeter.vizualizers.PerfMonGui" testclass="kg.apc.jmeter.perfmon.PerfMonCollector" testname="Performance Metrics Collector" enabled="false"> +Attempting to run with Performance Metrics Collector enabled without appropriately configuring it will result in a timeout error connecting to the collector and the test not running. 1. Run via console -Scenario can accept 5 parameters that are described bellow in format <parameter_name:default_value>: +Scenario can accept parameters that are described bellow in format <parameter_name:default_value>: <host:''> URL component 'host' of application being tested (URL or IP). <base_path:'/'> Base path for tested site. @@ -24,6 +32,18 @@ Scenario can accept 5 parameters that are described bellow in format <parameter_ <ramp_period:300> Ramp period (seconds). Period the request will be distributed within. <orders:0> Number of orders in the period specified in the current allocation. If <orders> is specified, the <users> parameter will be recalculated. <report_save_path:./> Path where reports will be saved. Reports will be saved in current working directory by default. +<admin_path:backend/> Admin backend path. Default is backend. +<admin_user:admin/> Admin backend user. Default is admin. +<admin_password:123123q/> Admin backend password. Default is 123123q. +<view_product_add_to_cart_percent:62/> Percentage of users that will only reach the add to cart stage. Default is 62. +<view_catalog_percent:30/> Percentage of users that will only reach the view catalog stage. Default is 30. +<guest_checkout_percent:4/> Percentage of users that will reach the guest checkout stage. Default is 4. +<customer_checkout_percent:4/> Percentage of users that will reach the (logged-in) customer checkout stage. Default is 4. +<loops:1/> Number of loops to run. Default is 1. +<jmeter_agent_port:3450/> jMeter agent port. Default is 3450. +<db_server_ip:10.62.51.150/> DB Server IP (for jMeter Performance Metrics). Default is 10.62.51.150. +<web_server_1_ip:10.62.51.185/> Web Server 1 IP (for jMeter Performance Metrics). Default is 10.62.51.185. +<web_server_2_ip:10.62.51.186/> Web Server 2 IP (for jMeter Performance Metrics). Default is 10.62.51.186. All parameters must be passed to command line with "J" prefix: "-J<parameter_name>=<parameter_value>" diff --git a/lib/internal/Magento/Framework/Acl/Resource/Provider.php b/lib/internal/Magento/Framework/Acl/Resource/Provider.php index 73a405f88c27b68c65694eec9f818583291db4e8..c85b13805249a09920baacc9f81b394d09324074 100644 --- a/lib/internal/Magento/Framework/Acl/Resource/Provider.php +++ b/lib/internal/Magento/Framework/Acl/Resource/Provider.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Acl\Resource; class Provider implements ProviderInterface diff --git a/lib/internal/Magento/Framework/App/Action/Action.php b/lib/internal/Magento/Framework/App/Action/Action.php index 335d6d57a47b21b5ac76cb645f0fcfaa009c87d1..38e64f43b23e06331703729e065501a48a2628c7 100644 --- a/lib/internal/Magento/Framework/App/Action/Action.php +++ b/lib/internal/Magento/Framework/App/Action/Action.php @@ -12,6 +12,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 9336f7af13bf3ca5ce44d14dabb0da9e3bed248a..f824c06a7b0410d0c13a9ea5aadd4b7c10143c27 100644 --- a/lib/internal/Magento/Framework/Archive/Helper/File.php +++ b/lib/internal/Magento/Framework/Archive/Helper/File.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Helper class that simplifies files stream reading and writing */ @@ -86,6 +88,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/Helper/File/Gz.php b/lib/internal/Magento/Framework/Archive/Helper/File/Gz.php index d3eca2ecd529c43fbdeb6330085ee68c5a35bc7d..52d18ed04f0430aa6206d48273fb01cd3ed6d4f7 100644 --- a/lib/internal/Magento/Framework/Archive/Helper/File/Gz.php +++ b/lib/internal/Magento/Framework/Archive/Helper/File/Gz.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Helper class that simplifies gz files stream reading and writing */ diff --git a/lib/internal/Magento/Framework/Archive/Tar.php b/lib/internal/Magento/Framework/Archive/Tar.php index 85a838cae1623ef7575c44de665483e643bd2314..d8a532e0cc25ac4213c2eaaf3ffe239f8ca8a707 100644 --- a/lib/internal/Magento/Framework/Archive/Tar.php +++ b/lib/internal/Magento/Framework/Archive/Tar.php @@ -311,6 +311,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) { @@ -380,6 +382,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) { @@ -515,6 +518,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 fbf1d5375ea7abcb23703e342980c00413cd4a20..f980455dd5a6afd73d54141f63cf5cbff7d6778b 100644 --- a/lib/internal/Magento/Framework/Backup/AbstractBackup.php +++ b/lib/internal/Magento/Framework/Backup/AbstractBackup.php @@ -216,6 +216,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/Archive/Tar.php b/lib/internal/Magento/Framework/Backup/Archive/Tar.php index 8920bf2f730f6612df1203850b4b61fe9957084f..19d96a80a58498fac20f044fd8a0d4bcb7507fc3 100644 --- a/lib/internal/Magento/Framework/Backup/Archive/Tar.php +++ b/lib/internal/Magento/Framework/Backup/Archive/Tar.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 8f0c18e8755288d43722c87c4d8c9af8dd328c2e..fc89599c1672a3b9bc147092dfb1bc23d489c50d 100644 --- a/lib/internal/Magento/Framework/Backup/Db/BackupFactory.php +++ b/lib/internal/Magento/Framework/Backup/Db/BackupFactory.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 6f680945b0663c1d3f2c3eb8bb7c97461aae24e1..ba120c45615844b441b490d86e5bd9ba8e3be44b 100644 --- a/lib/internal/Magento/Framework/Backup/Factory.php +++ b/lib/internal/Magento/Framework/Backup/Factory.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 e3a9cb1fd1bd5e5edc70410bfc88993a21719b3e..24ffe43be56c49f15cdc8fcdf4f85b45bbc50e04 100644 --- a/lib/internal/Magento/Framework/Backup/Filesystem.php +++ b/lib/internal/Magento/Framework/Backup/Filesystem.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Backup; /** diff --git a/lib/internal/Magento/Framework/Backup/Filesystem/Helper.php b/lib/internal/Magento/Framework/Backup/Filesystem/Helper.php index a549234baca5670e6135332936a78572f42171ed..5a2df37545d25b7ad98a628dedab4d505d86b63b 100644 --- a/lib/internal/Magento/Framework/Backup/Filesystem/Helper.php +++ b/lib/internal/Magento/Framework/Backup/Filesystem/Helper.php @@ -52,6 +52,7 @@ class Helper * @param bool $removeRoot * @return void * @throws \Magento\Framework\Exception + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function rm($path, $skipPaths = [], $removeRoot = false) { @@ -78,6 +79,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 b4510f077d81ad88748e1c5118135c7db33ee0c9..b9c0a9c6270db7bfac6e92fa5fad3df7211a69cf 100644 --- a/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Ftp.php +++ b/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Ftp.php @@ -158,6 +158,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 fb2d2ebecf69d64acfe839e748a64dbe90af0ebe..b1233e1301b24e981d92dd8a0c98c02217390225 100644 --- a/lib/internal/Magento/Framework/Cache/Backend/Database.php +++ b/lib/internal/Magento/Framework/Cache/Backend/Database.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** Tables declaration: @@ -499,6 +501,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 cf4e05ea3ffbf43910ffa87095f11497fc932a90..9a3d4272af4dcb8161a2c4daabfcf9484d55f257 100644 --- a/lib/internal/Magento/Framework/Cache/Backend/Eaccelerator.php +++ b/lib/internal/Magento/Framework/Cache/Backend/Eaccelerator.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Cache\Backend; class Eaccelerator extends \Zend_Cache_Backend implements \Zend_Cache_Backend_ExtendedInterface @@ -36,6 +39,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) { @@ -108,6 +112,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 = []) { @@ -170,6 +175,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 = []) { @@ -184,6 +190,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 = []) { @@ -198,6 +205,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 = []) { @@ -209,6 +217,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() { @@ -230,6 +239,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 697903f2504dc9e1d23ef6ef1cf91257b3b3ecd3..98eafe0f910928432718435f533c032980bd8e38 100644 --- a/lib/internal/Magento/Framework/Code/Reader/ArgumentsReader.php +++ b/lib/internal/Magento/Framework/Code/Reader/ArgumentsReader.php @@ -16,6 +16,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/Reader/SourceArgumentsReader.php b/lib/internal/Magento/Framework/Code/Reader/SourceArgumentsReader.php index c31fa9c00d8abd8a1620b08d0943dcb031e9bf13..29b48c744ba5ce72730faebe0cb820a8276da4a8 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/Code/Validator/ArgumentSequence.php b/lib/internal/Magento/Framework/Code/Validator/ArgumentSequence.php index 08fa179c95d0a4386b41df6336004329ffa5b891..382983e35db84b77357773a611b84258a81ef57a 100644 --- a/lib/internal/Magento/Framework/Code/Validator/ArgumentSequence.php +++ b/lib/internal/Magento/Framework/Code/Validator/ArgumentSequence.php @@ -40,6 +40,7 @@ class ArgumentSequence implements ValidatorInterface * @param string $className * @return bool * @throws ValidationException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function validate($className) { @@ -135,6 +136,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 321ba05b1e7492adb7a55a72ebf7257c542ca5c5..63929f4a08ad7e24c1ff2ef93d3949fff6c7e7c9 100644 --- a/lib/internal/Magento/Framework/Code/Validator/ConstructorIntegrity.php +++ b/lib/internal/Magento/Framework/Code/Validator/ConstructorIntegrity.php @@ -30,6 +30,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/Composer/MagentoComponent.php b/lib/internal/Magento/Framework/Composer/MagentoComponent.php new file mode 100644 index 0000000000000000000000000000000000000000..5e2da7bfa557e166d6f45e04efd1a584dac92a30 --- /dev/null +++ b/lib/internal/Magento/Framework/Composer/MagentoComponent.php @@ -0,0 +1,30 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Framework\Composer; + +class MagentoComponent +{ + /** + * Get matched Magento component or empty array, if it's not a Magento component + * + * @param string $key + * @return string[] ['type' => '<type>', 'area' => '<area>', 'name' => '<name>'] + * Ex.: ['type' => 'module', 'name' => 'catalog'] + * ['type' => 'theme', 'area' => 'frontend', 'name' => 'blank'] + */ + public static function matchMagentoComponent($key) + { + $typePattern = 'module|theme|language|framework'; + $areaPattern = 'frontend|adminhtml'; + $namePattern = '[a-z_-]+'; + $regex = '/^magento\/(?P<type>' . $typePattern . ')(?:-(?P<area>' . $areaPattern . '))?(?:-(?P<name>' + . $namePattern . '))?$/'; + if (preg_match($regex, $key, $matches)) { + return $matches; + } + return []; + } +} diff --git a/lib/internal/Magento/Framework/Composer/README.md b/lib/internal/Magento/Framework/Composer/README.md new file mode 100644 index 0000000000000000000000000000000000000000..fc92f73c2db20310df2d28e92c12972b78c8f80d --- /dev/null +++ b/lib/internal/Magento/Framework/Composer/README.md @@ -0,0 +1,2 @@ +**Magento\Framework\Composer** provides Magento-specific features for working with packages. + For example, ability to distinguish Magento package and any other package. diff --git a/lib/internal/Magento/Framework/Config/Composer/Package.php b/lib/internal/Magento/Framework/Config/Composer/Package.php index ce9742f2c384f24a9fd21c66d39ea4903f899281..e9c3dfdab2fecc9b675310dcb97af370e01d0a85 100644 --- a/lib/internal/Magento/Framework/Config/Composer/Package.php +++ b/lib/internal/Magento/Framework/Config/Composer/Package.php @@ -59,6 +59,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 8579c742b8e2e71483431cc952523077123aaedc..f3c09c5da4028cf3c6738fcdf1e4d813705df256 100644 --- a/lib/internal/Magento/Framework/Config/Data.php +++ b/lib/internal/Magento/Framework/Config/Data.php @@ -7,6 +7,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 fa789f9346b58846e1470e77c7d1c97e05b6c1d4..57c18e8e6eb021cde44233bfaa54e6d2cc06ef46 100644 --- a/lib/internal/Magento/Framework/Config/Dom.php +++ b/lib/internal/Magento/Framework/Config/Dom.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Magento configuration XML DOM utility */ @@ -114,6 +116,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/Config/Theme.php b/lib/internal/Magento/Framework/Config/Theme.php index 16a583ac2d1367e35d8520b4e04c75161e12983f..aaa6c4f95a45da7d2ed5bec0641783e61952efa7 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/CurrencyFactory.php b/lib/internal/Magento/Framework/CurrencyFactory.php index 69f58e8255096955e0c7a5d3a2ee99bea4070f1e..a1a126aecd1f99f568e00437842cd9e652184fb6 100644 --- a/lib/internal/Magento/Framework/CurrencyFactory.php +++ b/lib/internal/Magento/Framework/CurrencyFactory.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework; class CurrencyFactory diff --git a/lib/internal/Magento/Framework/DB/AbstractMapper.php b/lib/internal/Magento/Framework/DB/AbstractMapper.php index 2bc7d790dedd6b60bb4510086f6bca1875a963cc..7a1206c095b87ab59a779acd070667961b1c946d 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/Adapter/Pdo/Mysql.php b/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php index 654a741fcbe1c14ce18f96867752ec62c81814f5..83467bf6bcc316c254cdc91f4fd5809da49d9948 100644 --- a/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php +++ b/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\DB\Adapter\Pdo; use Magento\Framework\Cache\FrontendInterface; @@ -18,6 +21,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'; @@ -400,6 +409,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 = []) { @@ -651,6 +661,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) { @@ -1130,6 +1142,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) { @@ -1516,6 +1531,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) { @@ -1657,6 +1674,7 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface * * @param array $column * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _getColumnTypeByDdl($column) { @@ -1753,6 +1771,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 = []) { @@ -1959,6 +1979,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) { @@ -2193,6 +2214,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) { @@ -2428,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, @@ -2553,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, @@ -2667,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) { @@ -2773,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) { @@ -3358,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) { diff --git a/lib/internal/Magento/Framework/DB/Ddl/Table.php b/lib/internal/Magento/Framework/DB/Ddl/Table.php index ec7fe5d3385f638b1c754877cbbe044292d9224a..f1044732a712352479defd67010779f08e065b41 100644 --- a/lib/internal/Magento/Framework/DB/Ddl/Table.php +++ b/lib/internal/Magento/Framework/DB/Ddl/Table.php @@ -270,6 +270,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) { @@ -405,6 +408,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) { @@ -455,6 +459,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/GenericMapper.php b/lib/internal/Magento/Framework/DB/GenericMapper.php index 5b507baf56ce0f3f3462ea9a3840f9e5e0d4330f..d3e07450ae4736a4ac151075c505273729b32ac4 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/DB/Helper.php b/lib/internal/Magento/Framework/DB/Helper.php index 59107055c6eae70862a27110d3e4c4b25f93a27f..31f404f4867b722ba850139c99626dc490b6767b 100644 --- a/lib/internal/Magento/Framework/DB/Helper.php +++ b/lib/internal/Magento/Framework/DB/Helper.php @@ -182,6 +182,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/MapperFactory.php b/lib/internal/Magento/Framework/DB/MapperFactory.php index 495578f6261bd316ebd209a8e656df6d9bfb03a6..0c701803e9b30b750174c7020d1d6bbaf164f9c0 100644 --- a/lib/internal/Magento/Framework/DB/MapperFactory.php +++ b/lib/internal/Magento/Framework/DB/MapperFactory.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\DB; /** diff --git a/lib/internal/Magento/Framework/DB/QueryFactory.php b/lib/internal/Magento/Framework/DB/QueryFactory.php index 90420d2c7cf05040007993d3253fa340619b3016..a78004fb03e48c4565b28379e825ebdbf3ad91d0 100644 --- a/lib/internal/Magento/Framework/DB/QueryFactory.php +++ b/lib/internal/Magento/Framework/DB/QueryFactory.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\DB; /** diff --git a/lib/internal/Magento/Framework/DB/Select.php b/lib/internal/Magento/Framework/DB/Select.php index 2892a57da352ae5ff08fa4009c24e1c089d65577..41e87249ca198f4abecd7d2b42ef0a2d74b6fc94 100644 --- a/lib/internal/Magento/Framework/DB/Select.php +++ b/lib/internal/Magento/Framework/DB/Select.php @@ -184,6 +184,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 b1ada9687946f5172054056696cb6cdd8bddbadf..f7f887ff59fc4425e043a5dbfa70aef6888001ab 100644 --- a/lib/internal/Magento/Framework/DB/Statement/Parameter.php +++ b/lib/internal/Magento/Framework/DB/Statement/Parameter.php @@ -115,6 +115,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 62a60436df2d3c582cb460fbe1f6aaa4acf009ba..0a98d1f658fa86e3271c50e6a7f58e35cfe882fe 100644 --- a/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php +++ b/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Mysql DB Statement * @@ -22,6 +24,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 93080bf7d650716c54cc9aef67a55913fe897043..e0a7b800b5df3925c8478680a09e815487a620f8 100644 --- a/lib/internal/Magento/Framework/DB/Tree.php +++ b/lib/internal/Magento/Framework/DB/Tree.php @@ -16,6 +16,9 @@ use Magento\Framework\DB\Tree\TreeException; * Magento Library */ require_once 'Tree/TreeException.php'; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Tree { /** @@ -77,6 +80,8 @@ class Tree /** * @param array $config * @throws TreeException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function __construct($config = []) { @@ -274,6 +279,7 @@ class Tree * @param string|int $nodeId * @param array $data * @return false|string + * @SuppressWarnings(PHPMD.ExitExpression) */ public function appendChild($nodeId, $data) { @@ -441,6 +447,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) { @@ -771,6 +781,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) { @@ -991,6 +1006,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 397081bc5a22d11c9916540f9c33bc340a7b6877..80aa840e9de0563351cfc43171d2e0ab75e5f8c5 100644 --- a/lib/internal/Magento/Framework/DB/Tree/Node.php +++ b/lib/internal/Magento/Framework/DB/Tree/Node.php @@ -7,6 +7,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 979c258772a3f23c4a83208373a3d12f7b5781c1..72c51669064cdd51c21e782e177545db45d907be 100644 --- a/lib/internal/Magento/Framework/Data/Collection.php +++ b/lib/internal/Magento/Framework/Data/Collection.php @@ -167,6 +167,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) { @@ -646,6 +647,7 @@ class Collection implements \IteratorAggregate, \Countable, ArrayInterface, Coll * * @param bool $flag * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function distinct($flag) { @@ -658,6 +660,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 61eef60817afdc9027a34c9dbd18c3a694f42f77..3b7dc9de3a9b0f7eaad48c1d9d1acfcc4d741865 100644 --- a/lib/internal/Magento/Framework/Data/Collection/Db.php +++ b/lib/internal/Magento/Framework/Data/Collection/Db.php @@ -12,6 +12,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 19d7da09b2d2a940b3e211b1700cacac7ce4058e..817c4b420519697de1ad27984ca0d286e151a125 100644 --- a/lib/internal/Magento/Framework/Data/Collection/Filesystem.php +++ b/lib/internal/Magento/Framework/Data/Collection/Filesystem.php @@ -231,6 +231,8 @@ class Filesystem extends \Magento\Framework\Data\Collection * * @param string|array $dir * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _collectRecursive($dir) { @@ -433,6 +435,8 @@ class Filesystem extends \Magento\Framework\Data\Collection * * @param array $row * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.EvalExpression) */ protected function _filterRow($row) { @@ -474,6 +478,7 @@ class Filesystem extends \Magento\Framework\Data\Collection * @param callback $callback * @param array $callbackParams * @return bool + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _invokeFilter($callback, $callbackParams) { @@ -492,6 +497,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') { @@ -731,6 +739,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 69190f8863cd617f5d15a0afa5b5e1fa4bc228af..5583f90b9e6ae3d83641bb33dd4174dc08960c6c 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php @@ -14,6 +14,7 @@ use Magento\Framework\Escaper; * Data form abstract class * * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractElement extends AbstractForm { @@ -530,6 +531,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 689a569e592bb61cb677dcce1309a2e8a61aeeb1..7f079c6e1b514093f27447a60278a9537f867688 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Checkbox.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Checkbox.php @@ -52,6 +52,7 @@ class Checkbox extends AbstractElement /** * @return string + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getElementHtml() { @@ -79,6 +80,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 4bfeea0ded5b960cf038c96c3fcf9a35d78f807b..c8e58d064926d4e0aff3ec2aea9aba1f4c911f94 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Editor.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Data\Form\Element; use Magento\Framework\Escaper; @@ -39,6 +42,7 @@ class Editor extends Textarea /** * @return string + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getElementHtml() { @@ -218,6 +222,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) { @@ -332,6 +338,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 fa022498d35530189eff3b601e08efce8b2004f2..cc2798e8f702cf4e5cb860b17a3283a093f89de3 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Category form input image element * @@ -33,6 +35,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 3439846888ee59e2d20f8fbb3f878d7b76ac96d3..e596cc69c7ffe7a96de2f60f3554f7010a2cddde 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Multiline.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Multiline.php @@ -101,6 +101,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 d23418c1453afa66c3c16e8f38a1880c4092356d..3fe64c7b21106eb00e3fc2b772a8c63d81b3892f 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Time.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Time.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Form time element * @@ -45,6 +47,8 @@ class Time extends AbstractElement /** * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getElementHtml() { diff --git a/lib/internal/Magento/Framework/Data/FormFactory.php b/lib/internal/Magento/Framework/Data/FormFactory.php index 8b31904077ddf4e1b074d78bc3c861d1c56c4c16..cd35382e2644672c17e2d5cbe458835172fde526 100644 --- a/lib/internal/Magento/Framework/Data/FormFactory.php +++ b/lib/internal/Magento/Framework/Data/FormFactory.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Data; /** diff --git a/lib/internal/Magento/Framework/Data/Tree.php b/lib/internal/Magento/Framework/Data/Tree.php index 79ec96e3ec135864320d0b51e3c2eb24a49a1118..767d7d8c1766cc78866ec4e1788e168eb96e5e18 100644 --- a/lib/internal/Magento/Framework/Data/Tree.php +++ b/lib/internal/Magento/Framework/Data/Tree.php @@ -46,6 +46,7 @@ class Tree * * @param Node $parentNode * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function load($parentNode = null) { @@ -56,6 +57,7 @@ class Tree * * @param int|string $nodeId * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function loadNode($nodeId) { @@ -68,6 +70,7 @@ class Tree * @param Node $parentNode * @param Node $prevNode * @return Node + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function appendChild($data, $parentNode, $prevNode = null) { @@ -103,6 +106,7 @@ class Tree * @param Node $parentNode * @param Node $prevNode * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function moveNodeTo($node, $parentNode, $prevNode = null) { @@ -115,6 +119,7 @@ class Tree * @param Node $parentNode * @param Node $prevNode * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function copyNodeTo($node, $parentNode, $prevNode = null) { @@ -142,6 +147,7 @@ class Tree * @param Node $parentNode * @param Node $prevNode * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function createNode($parentNode, $prevNode = null) { @@ -152,6 +158,7 @@ class Tree * * @param Node $node * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getChild($node) { @@ -162,6 +169,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 747e5a755e9b27ab98f20154bae39de938e4126d..69bb2b8d4747492bc401243e1e1243ed43d1d3c6 100644 --- a/lib/internal/Magento/Framework/Data/Tree/Node.php +++ b/lib/internal/Magento/Framework/Data/Tree/Node.php @@ -169,6 +169,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 8c42e03489b57a8d942f9dfe76e0767725847781..b1c3ecacd1ff71f749678d4d904ff73d643afb39 100644 --- a/lib/internal/Magento/Framework/Debug.php +++ b/lib/internal/Magento/Framework/Debug.php @@ -61,6 +61,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) { @@ -141,6 +143,7 @@ class Debug * * @param mixed $arg * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected static function _formatCalledArgument($arg) { diff --git a/lib/internal/Magento/Framework/Encryption/Crypt.php b/lib/internal/Magento/Framework/Encryption/Crypt.php index 1cb3f7ab0349face1424da81c560687e97a067b3..9185fc38c03fa08e8a0d49d643cf49f267c3adfe 100644 --- a/lib/internal/Magento/Framework/Encryption/Crypt.php +++ b/lib/internal/Magento/Framework/Encryption/Crypt.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 d536031ab0d16fe43cff175ead340d60550f0ec8..ede5035b9f945c5daaed59661a8afbd23f69b1a0 100644 --- a/lib/internal/Magento/Framework/Event/Invoker/InvokerDefault.php +++ b/lib/internal/Magento/Framework/Event/Invoker/InvokerDefault.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Event\Invoker; use Magento\Framework\Event\Observer; diff --git a/lib/internal/Magento/Framework/Event/Observer/Cron.php b/lib/internal/Magento/Framework/Event/Observer/Cron.php index 39ae34a5116af3a1b3046c2c78340ca7286a2bcf..8a0cdcd7f31a0370b1fbf73f068f0559240a8759 100644 --- a/lib/internal/Magento/Framework/Event/Observer/Cron.php +++ b/lib/internal/Magento/Framework/Event/Observer/Cron.php @@ -20,6 +20,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) { @@ -63,6 +64,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 95e7921a5d2a63e9c7579c50a2aea8fd965b41e1..4844401ac672ad7d3d66571aa9c903f661fecd3f 100644 --- a/lib/internal/Magento/Framework/File/Csv.php +++ b/lib/internal/Magento/Framework/File/Csv.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\File; /** @@ -137,6 +140,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/CsvMulty.php b/lib/internal/Magento/Framework/File/CsvMulty.php index de0897c4f8134c7538be28babf64acb6c8c43d69..71de4e8f7d269bb957613f85df9868c9df908c2a 100644 --- a/lib/internal/Magento/Framework/File/CsvMulty.php +++ b/lib/internal/Magento/Framework/File/CsvMulty.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 b56823b01e492070d9ab72ed6b38f9cca94bca7a..0cd0fe3eac6bde8a9ea4e7a7ec9bb84be5eeb6d3 100644 --- a/lib/internal/Magento/Framework/File/Transfer/Adapter/Http.php +++ b/lib/internal/Magento/Framework/File/Transfer/Adapter/Http.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Framework\File\Transfer\Adapter; class Http diff --git a/lib/internal/Magento/Framework/File/Uploader.php b/lib/internal/Magento/Framework/File/Uploader.php index 885de2b8d63f0709ee546bcaf9b3a1b633f2d082..cfc862a635bc137a62320b56ff2563fcdbb2a529 100644 --- a/lib/internal/Magento/Framework/File/Uploader.php +++ b/lib/internal/Magento/Framework/File/Uploader.php @@ -170,6 +170,7 @@ class Uploader * * @param array $result * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _afterSave($result) { @@ -184,6 +185,7 @@ class Uploader * @param string $newFileName * @return array * @throws \Exception + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function save($destinationFolder, $newFileName = null) { @@ -487,6 +489,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.php b/lib/internal/Magento/Framework/Filesystem.php index e55ea9d8b2dfadc626b6145a5b98423f1daa150e..6c4e7de35c2833b927ae99aecc83801bdff82ec3 100644 --- a/lib/internal/Magento/Framework/Filesystem.php +++ b/lib/internal/Magento/Framework/Filesystem.php @@ -7,7 +7,7 @@ */ namespace Magento\Framework; -use Magento\Framework\Filesystem\File\ReadInterface; +use Magento\Framework\Filesystem\DriverPool; class Filesystem { @@ -52,30 +52,34 @@ class Filesystem } /** - * Create an instance of directory with write permissions + * Create an instance of directory with read permissions * - * @param string $code + * @param string $directoryCode + * @param string $driverCode * @return \Magento\Framework\Filesystem\Directory\ReadInterface */ - public function getDirectoryRead($code) + public function getDirectoryRead($directoryCode, $driverCode = DriverPool::FILE) { + $code = $directoryCode . '_' . $driverCode; if (!array_key_exists($code, $this->readInstances)) { - $this->readInstances[$code] = $this->readFactory->create($this->getDirPath($code)); + $this->readInstances[$code] = $this->readFactory->create($this->getDirPath($directoryCode), $driverCode); } return $this->readInstances[$code]; } /** - * Create an instance of directory with read permissions + * Create an instance of directory with write permissions * - * @param string $code + * @param string $directoryCode + * @param string $driverCode * @return \Magento\Framework\Filesystem\Directory\WriteInterface * @throws \Magento\Framework\Filesystem\FilesystemException */ - public function getDirectoryWrite($code) + public function getDirectoryWrite($directoryCode, $driverCode = DriverPool::FILE) { + $code = $directoryCode . '_' . $driverCode; if (!array_key_exists($code, $this->writeInstances)) { - $this->writeInstances[$code] = $this->writeFactory->create($this->getDirPath($code)); + $this->writeInstances[$code] = $this->writeFactory->create($this->getDirPath($directoryCode), $driverCode); } return $this->writeInstances[$code]; } diff --git a/lib/internal/Magento/Framework/Filesystem/Directory/Read.php b/lib/internal/Magento/Framework/Filesystem/Directory/Read.php index 3d10c9741cd2760926d7bbcf1075a69ac6ef4000..33f09a43d326f99fc3fbce2df3f04b573f922db6 100644 --- a/lib/internal/Magento/Framework/Filesystem/Directory/Read.php +++ b/lib/internal/Magento/Framework/Filesystem/Directory/Read.php @@ -181,15 +181,13 @@ class Read implements ReadInterface * Open file in read mode * * @param string $path - * @param string|null $protocol * * @return \Magento\Framework\Filesystem\File\ReadInterface */ - public function openFile($path, $protocol = null) + public function openFile($path) { return $this->fileFactory->create( $this->driver->getAbsolutePath($this->path, $path), - $protocol, $this->driver ); } @@ -200,21 +198,14 @@ class Read implements ReadInterface * @param string $path * @param string|null $flag * @param resource|null $context - * @param string|null $protocol * @return string * @throws FilesystemException */ - public function readFile($path, $flag = null, $context = null, $protocol = null) + public function readFile($path, $flag = null, $context = null) { - $absolutePath = $this->driver->getAbsolutePath($this->path, $path, $protocol); + $absolutePath = $this->driver->getAbsolutePath($this->path, $path); + return $this->driver->fileGetContents($absolutePath, $flag, $context); - if (is_null($protocol)) { - return $this->driver->fileGetContents($absolutePath, $flag, $context); - } - - /** @var \Magento\Framework\Filesystem\File\Read $fileReader */ - $fileReader = $this->fileFactory->create($absolutePath, $protocol, $this->driver); - return $fileReader->readAll($flag, $context); } /** diff --git a/lib/internal/Magento/Framework/Filesystem/Directory/ReadFactory.php b/lib/internal/Magento/Framework/Filesystem/Directory/ReadFactory.php index 423ed6166a3c33f8b5f092343713ad3e3276c11b..e1a9b33ab7a97db6d71aa51a31bc479f4875d215 100644 --- a/lib/internal/Magento/Framework/Filesystem/Directory/ReadFactory.php +++ b/lib/internal/Magento/Framework/Filesystem/Directory/ReadFactory.php @@ -30,12 +30,12 @@ class ReadFactory * Create a readable directory * * @param string $path - * @param string $protocol + * @param string $driverCode * @return ReadInterface */ - public function create($path, $protocol = DriverPool::FILE) + public function create($path, $driverCode = DriverPool::FILE) { - $driver = $this->driverPool->getDriver($protocol); + $driver = $this->driverPool->getDriver($driverCode); $factory = new \Magento\Framework\Filesystem\File\ReadFactory($this->driverPool); return new Read($factory, $driver, $path); } diff --git a/lib/internal/Magento/Framework/Filesystem/Directory/Write.php b/lib/internal/Magento/Framework/Filesystem/Directory/Write.php index 6657360dc2a50b2e5f1bbec558b36c6a50b96ce2..18ff07a750e53fdcfad8d4af7cee94cf6d59507e 100644 --- a/lib/internal/Magento/Framework/Filesystem/Directory/Write.php +++ b/lib/internal/Magento/Framework/Filesystem/Directory/Write.php @@ -197,16 +197,15 @@ class Write extends Read implements WriteInterface * * @param string $path * @param string $mode - * @param string|null $protocol * @return \Magento\Framework\Filesystem\File\WriteInterface */ - public function openFile($path, $mode = 'w', $protocol = null) + public function openFile($path, $mode = 'w') { $folder = dirname($path); $this->create($folder); $this->assertWritable($folder); $absolutePath = $this->driver->getAbsolutePath($this->path, $path); - return $this->fileFactory->create($absolutePath, $protocol, $this->driver, $mode); + return $this->fileFactory->create($absolutePath, $this->driver, $mode); } /** @@ -215,13 +214,12 @@ class Write extends Read implements WriteInterface * @param string $path * @param string $content * @param string|null $mode - * @param string|null $protocol * @return int The number of bytes that were written. * @throws FilesystemException */ - public function writeFile($path, $content, $mode = 'w+', $protocol = null) + public function writeFile($path, $content, $mode = 'w+') { - return $this->openFile($path, $mode, $protocol)->write($content); + return $this->openFile($path, $mode)->write($content); } /** diff --git a/lib/internal/Magento/Framework/Filesystem/Directory/WriteFactory.php b/lib/internal/Magento/Framework/Filesystem/Directory/WriteFactory.php index 4585629cd98a382b1d9af12e186b27248ca26ee8..809d86bb20bc0fb59cf7ae911acced7c045c9553 100644 --- a/lib/internal/Magento/Framework/Filesystem/Directory/WriteFactory.php +++ b/lib/internal/Magento/Framework/Filesystem/Directory/WriteFactory.php @@ -30,13 +30,13 @@ class WriteFactory * Create a readable directory * * @param string $path - * @param string $protocol + * @param string $driverCode * @param int $createPermissions * @return \Magento\Framework\Filesystem\Directory\Write */ - public function create($path, $protocol = DriverPool::FILE, $createPermissions = null) + public function create($path, $driverCode = DriverPool::FILE, $createPermissions = null) { - $driver = $this->driverPool->getDriver($protocol); + $driver = $this->driverPool->getDriver($driverCode); $factory = new \Magento\Framework\Filesystem\File\WriteFactory($this->driverPool); return new Write($factory, $driver, $path, $createPermissions); } diff --git a/lib/internal/Magento/Framework/Filesystem/Directory/WriteInterface.php b/lib/internal/Magento/Framework/Filesystem/Directory/WriteInterface.php index df05fb18b13dce1c958b185009ad8635074dceac..ba46d247d4870a596a7c5affaf0bda21d97bca1e 100644 --- a/lib/internal/Magento/Framework/Filesystem/Directory/WriteInterface.php +++ b/lib/internal/Magento/Framework/Filesystem/Directory/WriteInterface.php @@ -80,10 +80,9 @@ interface WriteInterface extends ReadInterface * * @param string $path * @param string $mode - * @param string|null $protocol * @return \Magento\Framework\Filesystem\File\WriteInterface */ - public function openFile($path, $mode = 'w', $protocol = null); + public function openFile($path, $mode = 'w'); /** * Open file in given path diff --git a/lib/internal/Magento/Framework/Filesystem/Driver/Http.php b/lib/internal/Magento/Framework/Filesystem/Driver/Http.php index e025c61a4ebba705cdb10460c459d76b5e2581cf..09586e4576124964fcf01fc201fbf31a6a98e0c6 100644 --- a/lib/internal/Magento/Framework/Filesystem/Driver/Http.php +++ b/lib/internal/Magento/Framework/Filesystem/Driver/Http.php @@ -49,6 +49,7 @@ class Http extends File * * @param string $path * @return array + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function stat($path) { @@ -123,6 +124,7 @@ class Http extends File * @param string $mode * @return resource file * @throws FilesystemException + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function fileOpen($path, $mode) { @@ -202,6 +204,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/Filesystem/File/ReadFactory.php b/lib/internal/Magento/Framework/Filesystem/File/ReadFactory.php index d142ee2a284100dfbf2b12ade18c99a82fc63475..0c758ce471dfbe4d75d6cb0e065f7b14d65c394d 100644 --- a/lib/internal/Magento/Framework/Filesystem/File/ReadFactory.php +++ b/lib/internal/Magento/Framework/Filesystem/File/ReadFactory.php @@ -31,17 +31,13 @@ class ReadFactory * Create a readable file * * @param string $path - * @param string|null $protocol [optional] - * @param DriverInterface $driver [optional] + * @param DriverInterface|string $driver Driver or driver code * @return \Magento\Framework\Filesystem\File\ReadInterface - * @throws \InvalidArgumentException */ - public function create($path, $protocol = null, DriverInterface $driver = null) + public function create($path, $driver) { - if ($protocol) { - $driver = $this->driverPool->getDriver($protocol); - } elseif (!$driver) { - throw new \InvalidArgumentException('Either driver or protocol must be specified.'); + if (is_string($driver)) { + return new Read($path, $this->driverPool->getDriver($driver)); } return new Read($path, $driver); } diff --git a/lib/internal/Magento/Framework/Filesystem/File/WriteFactory.php b/lib/internal/Magento/Framework/Filesystem/File/WriteFactory.php index 95a764a0e41966a124fec248077373891bebedae..1f0fe8066c55709b0c97287232c3ccd9e8cd56d1 100644 --- a/lib/internal/Magento/Framework/Filesystem/File/WriteFactory.php +++ b/lib/internal/Magento/Framework/Filesystem/File/WriteFactory.php @@ -31,18 +31,14 @@ class WriteFactory * Create a readable file. * * @param string $path - * @param string|null $protocol [optional] - * @param DriverInterface $driver [optional] + * @param DriverInterface|string $driver Driver or driver code * @param string $mode [optional] * @return Write - * @throws \InvalidArgumentException */ - public function create($path, $protocol = null, DriverInterface $driver = null, $mode = 'r') + public function create($path, $driver, $mode = 'r') { - if ($protocol) { - $driver = $this->driverPool->getDriver($protocol); - } elseif (!$driver) { - throw new \InvalidArgumentException('Either driver or protocol must be specified.'); + if (is_string($driver)) { + return new Write($path, $this->driverPool->getDriver($driver), $mode); } return new Write($path, $driver, $mode); } diff --git a/lib/internal/Magento/Framework/Filter/Input.php b/lib/internal/Magento/Framework/Filter/Input.php index fb2f1988ba719e8fde6bf6055df0fb92f3c0c665..cfcf50919a28f0f8ddd45d41da9ed53284c0f4e1 100644 --- a/lib/internal/Magento/Framework/Filter/Input.php +++ b/lib/internal/Magento/Framework/Filter/Input.php @@ -206,6 +206,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/Input/MaliciousCode.php b/lib/internal/Magento/Framework/Filter/Input/MaliciousCode.php index 4d34329cae59c39e783d401fcb5b0037d9bf317e..72d30d3373709f369d338855d1c9271db7a3e8b8 100644 --- a/lib/internal/Magento/Framework/Filter/Input/MaliciousCode.php +++ b/lib/internal/Magento/Framework/Filter/Input/MaliciousCode.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Filter\Input; class MaliciousCode implements \Zend_Filter_Interface diff --git a/lib/internal/Magento/Framework/Filter/RemoveAccents.php b/lib/internal/Magento/Framework/Filter/RemoveAccents.php index ee71192ad0b1a6d0a45ec324f79ebfcbfbc5179f..fb153f56ed3c1cbd6c277ab5808db79cdc597046 100644 --- a/lib/internal/Magento/Framework/Filter/RemoveAccents.php +++ b/lib/internal/Magento/Framework/Filter/RemoveAccents.php @@ -26,6 +26,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 52a4ed62a0622ff533ac291ea08db3c6d54a3082..50db67715c20e9c3dd1adaea1bbb8e98a181cb4e 100644 --- a/lib/internal/Magento/Framework/Filter/Template.php +++ b/lib/internal/Magento/Framework/Filter/Template.php @@ -96,6 +96,7 @@ class Template implements \Zend_Filter_Interface * @param string $value * @return string * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function filter($value) { @@ -236,6 +237,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 9b392e5330f8cf48bd70a3e3a9df9bea6b5f58eb..00161bf427edb7dd1449804bc1d496a0fe66f95e 100644 --- a/lib/internal/Magento/Framework/Filter/Template/Tokenizer/Parameter.php +++ b/lib/internal/Magento/Framework/Filter/Template/Tokenizer/Parameter.php @@ -36,6 +36,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 531e6de40e1898fc0fb60dcde64f2a0572ceeeca..377219601d2d6481ff560f220b87d7fa71f7eae0 100644 --- a/lib/internal/Magento/Framework/Filter/Template/Tokenizer/Variable.php +++ b/lib/internal/Magento/Framework/Filter/Template/Tokenizer/Variable.php @@ -14,6 +14,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() { @@ -59,6 +60,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 b12e717f9f8c995520a9812ca00d2376bdc17496..275489ecdc2919be679a591c4441c21a1b050cef 100644 --- a/lib/internal/Magento/Framework/Gdata/Gshopping/Entry.php +++ b/lib/internal/Magento/Framework/Gdata/Gshopping/Entry.php @@ -78,6 +78,7 @@ class Entry extends \Zend_Gdata_Entry * * @param \DOMNode $child The \DOMNode to process * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function takeChildFromDOM($child) { @@ -223,6 +224,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/Gdata/Gshopping/HttpException.php b/lib/internal/Magento/Framework/Gdata/Gshopping/HttpException.php index f1f61974937de5a86023e90e45c46e04de24d8a6..c348c15cb75fc2c86c30f3ad3c9f3ea17ab20213 100644 --- a/lib/internal/Magento/Framework/Gdata/Gshopping/HttpException.php +++ b/lib/internal/Magento/Framework/Gdata/Gshopping/HttpException.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 07d55c651f9ed388ca419e2fd67df295e3249722..a677dbd5453f69941584de7f2c33d938fabde4cb 100644 --- a/lib/internal/Magento/Framework/HTTP/Adapter/Curl.php +++ b/lib/internal/Magento/Framework/HTTP/Adapter/Curl.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * HTTP CURL Adapter * @@ -51,6 +53,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() { @@ -137,6 +141,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 ce030bcc9e641c713a9e9d9a03a33a2cc53d7417..a8f5548b4f63568db90fb5520d89f6656e99e52a 100644 --- a/lib/internal/Magento/Framework/HTTP/Client/Curl.php +++ b/lib/internal/Magento/Framework/HTTP/Client/Curl.php @@ -331,6 +331,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 = []) { @@ -406,6 +408,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 2174b15a21ad60c642a76d729ddf583c470bbaed..949ef777adf302e0081d6dc10f61c7a707efb981 100644 --- a/lib/internal/Magento/Framework/HTTP/Client/Socket.php +++ b/lib/internal/Magento/Framework/HTTP/Client/Socket.php @@ -11,6 +11,12 @@ */ namespace Magento\Framework\HTTP\Client; +/** + * @SuppressWarnings(PHPMD.UnusedPrivateField) + */ +/** + * @SuppressWarnings(PHPMD.UnusedPrivateField) + */ class Socket implements \Magento\Framework\HTTP\ClientInterface { /** @@ -407,6 +413,7 @@ class Socket implements \Magento\Framework\HTTP\ClientInterface * Process response * * @return void + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function processResponse() { @@ -517,6 +524,7 @@ class Socket implements \Magento\Framework\HTTP\ClientInterface * * @param array $arr * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setOptions($arr) { @@ -529,6 +537,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/HTTP/Header.php b/lib/internal/Magento/Framework/HTTP/Header.php index 5f3c6283cafd14f4d89dc395a7728d677da89fd2..7dba8faecfe359099e1c2e8419a5127f183dc879 100644 --- a/lib/internal/Magento/Framework/HTTP/Header.php +++ b/lib/internal/Magento/Framework/HTTP/Header.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\HTTP; /** diff --git a/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php b/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php index bcd7cd03144c9bcd63d50c1adec98c00e778d689..3a7742a7efb1faa0afd922c5f4d0a7188537effe 100644 --- a/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php +++ b/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php @@ -10,6 +10,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 { @@ -263,6 +264,7 @@ abstract class AbstractAdapter implements AdapterInterface * @param \Magento\Framework\Filesystem $filesystem * @param \Psr\Log\LoggerInterface $logger * @param array $data + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct( \Magento\Framework\Filesystem $filesystem, diff --git a/lib/internal/Magento/Framework/Image/Adapter/Gd2.php b/lib/internal/Magento/Framework/Image/Adapter/Gd2.php index b561fec0a8db82643d569c9286358ee8fbfe8056..441a45afae58a385fb1341922404432aeb15d92e 100644 --- a/lib/internal/Magento/Framework/Image/Adapter/Gd2.php +++ b/lib/internal/Magento/Framework/Image/Adapter/Gd2.php @@ -203,6 +203,7 @@ class Gd2 extends \Magento\Framework\Image\Adapter\AbstractAdapter * @param resource &$imageResourceTo * @return int * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ private function _fillBackgroundColor(&$imageResourceTo) { @@ -276,6 +277,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) { @@ -366,6 +368,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 33ee1a1303954e81ea8833d6303c4e52401ebe94..1d3b133279ae43d9439bc1fa521854c926f66e3c 100644 --- a/lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php +++ b/lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php @@ -235,6 +235,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/Image/Factory.php b/lib/internal/Magento/Framework/Image/Factory.php index b3b4fc87df06fbd47c2b957e8ca9545a113591e8..256df1ca68c3c89b0ecb1ee6df0c7148e529a1b2 100644 --- a/lib/internal/Magento/Framework/Image/Factory.php +++ b/lib/internal/Magento/Framework/Image/Factory.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5d8b2b289ee91d408b5f028260ef19499a8cda0e..2671cbebb7d37cf0af38962c116543ab246a2e32 100644 --- a/lib/internal/Magento/Framework/Interception/Code/Generator/Interceptor.php +++ b/lib/internal/Magento/Framework/Interception/Code/Generator/Interceptor.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Interception\Code\Generator; class Interceptor extends \Magento\Framework\Code\Generator\EntityAbstract diff --git a/lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php b/lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php index 7086a3e6b5ba6de0f8171f61268a017472e6e4f4..1c188ff2c3d237bfba3b21f00464fb1d120b39a3 100644 --- a/lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php +++ b/lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php @@ -36,6 +36,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 568fab873e3d7dced79e7bd7c7e0959244442c7d..0b95374f8eb90b4e87979583a6d55ed65b05b028 100644 --- a/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php +++ b/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php @@ -19,6 +19,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 { /** @@ -84,6 +87,7 @@ class PluginList extends Scoped implements InterceptionPluginList * @param ClassDefinitions $classDefinitions * @param array $scopePriorityScheme * @param string $cacheId + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( ReaderInterface $reader, @@ -113,6 +117,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 d20bcf55c6fb766890c63f86b14bcfe0da6e5964..629ba1e6eedbc730563442487eaf776b063aa68f 100644 --- a/lib/internal/Magento/Framework/Io/AbstractIo.php +++ b/lib/internal/Magento/Framework/Io/AbstractIo.php @@ -53,6 +53,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 e1e65b3f5aad941b3744ac0431491585c2939302..5c9225067a10e59f103d470de83e366591f9557b 100644 --- a/lib/internal/Magento/Framework/Io/File.php +++ b/lib/internal/Magento/Framework/Io/File.php @@ -7,6 +7,7 @@ namespace Magento\Framework\Io; /** * Filesystem client + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) */ class File extends AbstractIo { @@ -367,6 +368,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 = []) { @@ -417,6 +420,7 @@ class File extends AbstractIo * @param string $dir * @return true * @throws \Exception + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function cd($dir) { @@ -459,6 +463,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) { @@ -594,6 +599,7 @@ class File extends AbstractIo * * @param string $filename * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function rm($filename) { @@ -609,6 +615,7 @@ class File extends AbstractIo * @param string $src * @param string $destination * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function mv($src, $destination) { @@ -624,6 +631,7 @@ class File extends AbstractIo * @param string $src * @param string $destination * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function cp($src, $destination) { @@ -679,6 +687,8 @@ class File extends AbstractIo * @param string|null $grep * @return array * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function ls($grep = null) { @@ -782,6 +792,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 b6b94ccdeb92585b56d67f2540239bc97368fd75..e7c8ee79cf8d574dc8d325d99bc1dff0b254eb93 100644 --- a/lib/internal/Magento/Framework/Io/Ftp.php +++ b/lib/internal/Magento/Framework/Io/Ftp.php @@ -67,6 +67,8 @@ class Ftp extends AbstractIo * @param array $args * @return true * @throws IoException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function open(array $args = []) { @@ -184,6 +186,7 @@ class Ftp extends AbstractIo * * @param string $dir * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function cd($dir) { @@ -261,6 +264,7 @@ class Ftp extends AbstractIo * * @param string $filename * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function rm($filename) { @@ -273,6 +277,7 @@ class Ftp extends AbstractIo * @param string $src * @param string $dest * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function mv($src, $dest) { @@ -294,6 +299,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 52e6d9401bce69deafeb9576d46eb864a799d6d0..85ece039f2b21134fb22bcce6b53f40dc5008bd7 100644 --- a/lib/internal/Magento/Framework/Io/IoInterface.php +++ b/lib/internal/Magento/Framework/Io/IoInterface.php @@ -56,6 +56,7 @@ interface IoInterface * * @param string $dir * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function cd($dir); @@ -83,6 +84,7 @@ interface IoInterface * * @param string $filename * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function rm($filename); @@ -92,6 +94,7 @@ interface IoInterface * @param string $src * @param string $dest * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function mv($src, $dest); @@ -109,6 +112,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 cf31017c4dadc296cb17fd45bce511b00e578ff1..d66a67d5fc00def21efdfa08b3f5d6b3e330f2b7 100644 --- a/lib/internal/Magento/Framework/Io/Sftp.php +++ b/lib/internal/Magento/Framework/Io/Sftp.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Io; /** @@ -97,6 +100,7 @@ class Sftp extends AbstractIo implements IoInterface * @param bool $recursive * @return bool * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function rmdir($dir, $recursive = false) { @@ -148,6 +152,7 @@ class Sftp extends AbstractIo implements IoInterface * * @param string $dir * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function cd($dir) { @@ -188,6 +193,7 @@ class Sftp extends AbstractIo implements IoInterface * * @param string $filename * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function rm($filename) { @@ -200,6 +206,7 @@ class Sftp extends AbstractIo implements IoInterface * @param string $source * @param string $destination * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function mv($source, $destination) { @@ -223,6 +230,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/Less/PreProcessor/Instruction/Import.php b/lib/internal/Magento/Framework/Less/PreProcessor/Instruction/Import.php index 90414cf66f27f33207fd95300b9ed0f84c9dc2a6..80adab5f41046a1086fc062fa98e879b5f541be9 100644 --- a/lib/internal/Magento/Framework/Less/PreProcessor/Instruction/Import.php +++ b/lib/internal/Magento/Framework/Less/PreProcessor/Instruction/Import.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @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 6da8268cf8c6d24229716b33deede24cd3a4a641..168355d54c45dd75d54bc0f701d90155b6639026 100644 --- a/lib/internal/Magento/Framework/Locale/Lists.php +++ b/lib/internal/Magento/Framework/Locale/Lists.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Locale; class Lists implements \Magento\Framework\Locale\ListsInterface @@ -63,6 +66,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/Mail/Template/TransportBuilder.php b/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php index 083358a4f7d40c0767b5985784e3607d600a3d97..5cfae3507d6f443c117bb0a9bd4eb5170d249f69 100644 --- a/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php +++ b/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Mail\Template; class TransportBuilder diff --git a/lib/internal/Magento/Framework/Message/AbstractMessage.php b/lib/internal/Magento/Framework/Message/AbstractMessage.php index d3226ca88999e41cc9cd91e01e6036551e7cd605..b0a096bf8040ad50ffe49846ec55bd840f0994f9 100644 --- a/lib/internal/Magento/Framework/Message/AbstractMessage.php +++ b/lib/internal/Magento/Framework/Message/AbstractMessage.php @@ -100,6 +100,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/Factory.php b/lib/internal/Magento/Framework/Message/Factory.php index c6f3f0443805aa8ab7403c03c6e5c72e185726c1..4c16064b5b6599dbb98f48307601dfff7eda1ee3 100644 --- a/lib/internal/Magento/Framework/Message/Factory.php +++ b/lib/internal/Magento/Framework/Message/Factory.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Message; use Magento\Framework\ObjectManagerInterface; diff --git a/lib/internal/Magento/Framework/Message/Manager.php b/lib/internal/Magento/Framework/Message/Manager.php index 6b1564b12f592b4d4c2728f71d28aa27b0872a37..73b212a58e3ee88769bd653a815c15ecafde2578 100644 --- a/lib/internal/Magento/Framework/Message/Manager.php +++ b/lib/internal/Magento/Framework/Message/Manager.php @@ -10,6 +10,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 9dcad0808fba253937b541b136a7e78873c440ce..e5342f49ac042e79fb0b572fca328a1285ab8b22 100644 --- a/lib/internal/Magento/Framework/Message/MessageInterface.php +++ b/lib/internal/Magento/Framework/Message/MessageInterface.php @@ -79,6 +79,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 1d80e645d44d914af1fe7095a115e2e641912506..8e692e8ce312180785a25f5238ea128d9328fe5c 100644 --- a/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php +++ b/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php @@ -16,6 +16,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 f3db950bc62355ad0aebc228a4e42e7098aee043..1701fe5d57f1911fd1fd8bf92ab8e4ee45cf0db6 100644 --- a/lib/internal/Magento/Framework/Model/AbstractModel.php +++ b/lib/internal/Magento/Framework/Model/AbstractModel.php @@ -11,6 +11,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 d68bde4b09531cf6fe84ef3e13310cf4f74b6037..e886d6334dff640305091344ff2b0ad9a8b3fec9 100644 --- a/lib/internal/Magento/Framework/Model/Exception.php +++ b/lib/internal/Magento/Framework/Model/Exception.php @@ -9,6 +9,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/AbstractResource.php b/lib/internal/Magento/Framework/Model/Resource/AbstractResource.php index de3f520930421c97c1b889cd358d96880362abf4..831dcf5ae71fb2f832a7372efd8abdfe49a0ac40 100644 --- a/lib/internal/Magento/Framework/Model/Resource/AbstractResource.php +++ b/lib/internal/Magento/Framework/Model/Resource/AbstractResource.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Model\Resource; /** diff --git a/lib/internal/Magento/Framework/Model/Resource/Db/AbstractDb.php b/lib/internal/Magento/Framework/Model/Resource/Db/AbstractDb.php index 1913652a13297df264499f66787fb4238832df35..e61f60533d5e6d0a8482f9e0c6cc49decd070a69 100644 --- a/lib/internal/Magento/Framework/Model/Resource/Db/AbstractDb.php +++ b/lib/internal/Magento/Framework/Model/Resource/Db/AbstractDb.php @@ -10,6 +10,7 @@ use Magento\Framework\Model\Exception as ModelException; /** * Abstract resource model class + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractDb extends \Magento\Framework\Model\Resource\AbstractResource { @@ -356,6 +357,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) { @@ -369,6 +371,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) { @@ -508,6 +511,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) { @@ -593,6 +597,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) { @@ -655,6 +660,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) { @@ -666,6 +672,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) { @@ -677,6 +684,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) { @@ -688,6 +696,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) { @@ -699,6 +708,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) { @@ -710,6 +720,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 f51d9f86c29f9508874ed4627c62b163fb30af34..725b39484dcc648022a2c854d34cf3700f53c2a7 100644 --- a/lib/internal/Magento/Framework/Model/Resource/Db/Collection/AbstractCollection.php +++ b/lib/internal/Magento/Framework/Model/Resource/Db/Collection/AbstractCollection.php @@ -3,10 +3,14 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Model\Resource\Db\Collection; /** * Abstract Resource Collection + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractCollection extends \Magento\Framework\Data\Collection\Db { @@ -191,6 +195,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/Model/Resource/Type/Db/Pdo/Mysql.php b/lib/internal/Magento/Framework/Model/Resource/Type/Db/Pdo/Mysql.php index 88448af0eead10a85d3d83d24a264e4c2c4724d7..162526fba27ae3f0151e65969b2f12f04d1397d3 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 @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Model\Resource\Type\Db\Pdo; use Magento\Framework\App\Resource\ConnectionAdapterInterface; diff --git a/lib/internal/Magento/Framework/Module/DataSetup.php b/lib/internal/Magento/Framework/Module/DataSetup.php index 06a3109d39b360ab04adb35189ae73736f5834ad..8d1ff06be4b756ef12bed239845849eb7bf5d551 100644 --- a/lib/internal/Magento/Framework/Module/DataSetup.php +++ b/lib/internal/Magento/Framework/Module/DataSetup.php @@ -263,6 +263,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) { @@ -384,6 +385,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) { @@ -416,6 +418,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 03c810ebe2dd6201119a20293ebd34df21c05fba..6c5697243d8647a82de5e655a8b10b22677fe5cd 100644 --- a/lib/internal/Magento/Framework/Module/ModuleList/Loader.php +++ b/lib/internal/Magento/Framework/Module/ModuleList/Loader.php @@ -66,6 +66,7 @@ class Loader * * @param array $origList * @return array + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ private function sortBySequence($origList) { diff --git a/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php b/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php index 6d1293a0ad5b24f2d12b337c06e1dd470d576f3c..52cbea3c74f5deb867a27b2b12b944c443cce3b3 100644 --- a/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php +++ b/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 bfd1238931dc0c0a5865a859a9ac1bc289ab7393..f054cb1480ec3260ffdfbfa558a14cb77a71c4f8 100644 --- a/lib/internal/Magento/Framework/Module/Resource.php +++ b/lib/internal/Magento/Framework/Module/Resource.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 5bd5bb434c40a533272ee8daf764047ed9851a08..01424e0d979ffa78a041bd9bd388080821519c8e 100644 --- a/lib/internal/Magento/Framework/Module/Setup/MigrationFactory.php +++ b/lib/internal/Magento/Framework/Module/Setup/MigrationFactory.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 b3ea8fafd04aa35bcc3f820933aeccc06583ef3d..c675bf1bccb97d3a78254580bb73577ca5b83ced 100644 --- a/lib/internal/Magento/Framework/Mview/ActionFactory.php +++ b/lib/internal/Magento/Framework/Mview/ActionFactory.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 c476171608fbc4bf20306cee1c7694442d9eede7..47b43916febc51d04a94035a3dbb9b68992fff04 100644 --- a/lib/internal/Magento/Framework/Mview/View.php +++ b/lib/internal/Magento/Framework/Mview/View.php @@ -3,8 +3,14 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Mview; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class View extends \Magento\Framework\Object implements ViewInterface { /** diff --git a/lib/internal/Magento/Framework/Mview/View/Subscription.php b/lib/internal/Magento/Framework/Mview/View/Subscription.php index 0d64eb27bb14aab52b1c0ec46d73840e131eeb4b..498cb0e147801ef8709a89a13def616677662be3 100644 --- a/lib/internal/Magento/Framework/Mview/View/Subscription.php +++ b/lib/internal/Magento/Framework/Mview/View/Subscription.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Mview\View; class Subscription implements SubscriptionInterface diff --git a/lib/internal/Magento/Framework/Object.php b/lib/internal/Magento/Framework/Object.php index 695be22ce6da3ed9db4e5dbd68c03c38237a9bf7..62a154337eb9da2a7a9302839f01a4498cb4132a 100644 --- a/lib/internal/Magento/Framework/Object.php +++ b/lib/internal/Magento/Framework/Object.php @@ -9,6 +9,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 3f24b856c9fa3674bcbb8f1a62911a250f3a6a3a..57d8a5625a980bbad4b2e24278875b7fc9444598 100644 --- a/lib/internal/Magento/Framework/Object/Cache.php +++ b/lib/internal/Magento/Framework/Object/Cache.php @@ -123,6 +123,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) { @@ -274,6 +276,7 @@ class Cache * * @param array|string $tags * @return true + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function deleteByTags($tags) { @@ -348,6 +351,7 @@ class Cache * * @param array|string $tags * @return array + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function findByTags($tags) { @@ -389,6 +393,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/Object/Mapper.php b/lib/internal/Magento/Framework/Object/Mapper.php index bffeefb451d0ce21da9275aa19acd10ef545c28a..ffa9bcb041e8c8f2965710498142e69622193d97 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/ObjectManager/Code/Generator/Persistor.php b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Persistor.php index abb3869c42c7aa159e168347b84e305889e393a4..45c3886ff2fbe9a4d76287cb7e5042d28056b689 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Persistor.php +++ b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Persistor.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 ff98d5584a74c1dce7f9ee7843793f30928265e6..d098d3a9bb30469ab0dab68b300bf8d41bceff70 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php +++ b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\ObjectManager\Code\Generator; /** diff --git a/lib/internal/Magento/Framework/ObjectManager/Config/Compiled.php b/lib/internal/Magento/Framework/ObjectManager/Config/Compiled.php index 131e4bfcbaad6a2de4b200e3727b5b25288fd901..a7484882066437cbb5d5a97c4cdd15bf1cb474b5 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Config/Compiled.php +++ b/lib/internal/Magento/Framework/ObjectManager/Config/Compiled.php @@ -145,4 +145,14 @@ class Compiled implements \Magento\Framework\ObjectManager\ConfigInterface { return $this->virtualTypes; } + + /** + * Returns list on preferences + * + * @return array + */ + public function getPreferences() + { + return $this->preferences; + } } diff --git a/lib/internal/Magento/Framework/ObjectManager/Config/Config.php b/lib/internal/Magento/Framework/ObjectManager/Config/Config.php index 29c0432bdc56d37950003bda1d2092931dd7d09b..6f05e61be5351ae55fd2b9fcc9742b042491b9ae 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Config/Config.php +++ b/lib/internal/Magento/Framework/ObjectManager/Config/Config.php @@ -313,4 +313,14 @@ class Config implements \Magento\Framework\ObjectManager\ConfigInterface { return $this->_virtualTypes; } + + /** + * Returns list on preferences + * + * @return array + */ + public function getPreferences() + { + return $this->_preferences; + } } diff --git a/lib/internal/Magento/Framework/ObjectManager/ConfigInterface.php b/lib/internal/Magento/Framework/ObjectManager/ConfigInterface.php index 9e023fcc5e3e85a94f9855b0741edc5598628d80..8f8f91297dc2a9ef69417f9419b10caf31759a95 100644 --- a/lib/internal/Magento/Framework/ObjectManager/ConfigInterface.php +++ b/lib/internal/Magento/Framework/ObjectManager/ConfigInterface.php @@ -72,4 +72,11 @@ interface ConfigInterface * @return void */ public function extend(array $configuration); + + /** + * Returns list on preferences + * + * @return array + */ + public function getPreferences(); } diff --git a/lib/internal/Magento/Framework/ObjectManager/DefinitionFactory.php b/lib/internal/Magento/Framework/ObjectManager/DefinitionFactory.php index c71e32ac3cf7a2667cf45b3e64040634ca36b26f..d735a93154406cd341876c4cfc69e2a0d5c79005 100644 --- a/lib/internal/Magento/Framework/ObjectManager/DefinitionFactory.php +++ b/lib/internal/Magento/Framework/ObjectManager/DefinitionFactory.php @@ -6,6 +6,9 @@ * See COPYING.txt for license details. * */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\ObjectManager; use Magento\Framework\Api\Code\Generator\DataBuilder as DataBuilderGenerator; diff --git a/lib/internal/Magento/Framework/Parse/Zip.php b/lib/internal/Magento/Framework/Parse/Zip.php index 6cac80ecd8d1c98395c30765db199a3e82dde3f2..aebc4af30e9f66b57aae094742420145247067ec 100644 --- a/lib/internal/Magento/Framework/Parse/Zip.php +++ b/lib/internal/Magento/Framework/Parse/Zip.php @@ -45,6 +45,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/Pricing/Price/Collection.php b/lib/internal/Magento/Framework/Pricing/Price/Collection.php index e0d9fbe0cf8947c3589aa933b44dbfc18a121b88..d9bd5730df654a221f4cf22e835394111a08dad5 100644 --- a/lib/internal/Magento/Framework/Pricing/Price/Collection.php +++ b/lib/internal/Magento/Framework/Pricing/Price/Collection.php @@ -43,6 +43,13 @@ class Collection implements \Iterator */ protected $excludes; + /** + * Cached price models + * + * @var array + */ + protected $priceModels; + /** * Constructor * @@ -61,6 +68,7 @@ class Collection implements \Iterator $this->priceFactory = $priceFactory; $this->pool = $pool; $this->quantity = $quantity; + $this->priceModels = []; } /** @@ -121,10 +129,13 @@ class Collection implements \Iterator */ public function get($code) { - return $this->priceFactory->create( - $this->saleableItem, - $this->pool[$code], - $this->quantity - ); + if (!isset($this->priceModels[$code])) { + $this->priceModels[$code] = $this->priceFactory->create( + $this->saleableItem, + $this->pool[$code], + $this->quantity + ); + } + return $this->priceModels[$code]; } } diff --git a/lib/internal/Magento/Framework/Pricing/PriceCurrencyInterface.php b/lib/internal/Magento/Framework/Pricing/PriceCurrencyInterface.php index aa86b245666d2e54f6b30df498ff93a19eb08795..9a0c8b2925b027ea2f72dfe536820fe2d3888181 100644 --- a/lib/internal/Magento/Framework/Pricing/PriceCurrencyInterface.php +++ b/lib/internal/Magento/Framework/Pricing/PriceCurrencyInterface.php @@ -30,12 +30,12 @@ interface PriceCurrencyInterface * Convert and round price value * * @param float $amount - * @param null|string|bool|int|\Magento\Store\Model\Store $store - * @param \Magento\Directory\Model\Currency|string|null $currency + * @param null|string|bool|int|\Magento\Framework\App\ScopeInterface $scope + * @param \Magento\Framework\Model\AbstractModel|string|null $currency * @param int $precision * @return float */ - public function convertAndRound($amount, $store = null, $currency = null, $precision = self::DEFAULT_PRECISION); + public function convertAndRound($amount, $scope = null, $currency = null, $precision = self::DEFAULT_PRECISION); /** * Format price value diff --git a/lib/internal/Magento/Framework/Pricing/Render/RendererPool.php b/lib/internal/Magento/Framework/Pricing/Render/RendererPool.php index 8e956dfeccaf6bd4bbb9942a79dba746206c11f5..c501e4adf70fdc644f682fc69a0347313efb5eb0 100644 --- a/lib/internal/Magento/Framework/Pricing/Render/RendererPool.php +++ b/lib/internal/Magento/Framework/Pricing/Render/RendererPool.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 095f65b6b57c5b47c542dec9dc17427761cf3cc0..143520c7560929d9d837296d44b15ba0c2209de6 100644 --- a/lib/internal/Magento/Framework/Profiler/Driver/Factory.php +++ b/lib/internal/Magento/Framework/Profiler/Driver/Factory.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Profiler\Driver; use Magento\Framework\Profiler\DriverInterface; 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 1ee710cab14e6322112d524915467ca25ef553dd..d33d1e914e801165b35161cddf46a3b023e20fb4 100644 --- a/lib/internal/Magento/Framework/Search/Adapter/Mysql/Aggregation/Interval.php +++ b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Aggregation/Interval.php @@ -41,6 +41,7 @@ class Interval implements IntervalInterface /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function load($limit, $offset = null, $lower = null, $upper = null) { @@ -63,6 +64,7 @@ class Interval implements IntervalInterface /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function loadPrevious($data, $index, $lower = null) { @@ -84,6 +86,7 @@ class Interval implements IntervalInterface /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function loadNext($data, $rightIndex, $upper = null) { diff --git a/lib/internal/Magento/Framework/Search/Adapter/Mysql/Mapper.php b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Mapper.php index 959ba62775a47d2e97750ac7ff2f194fafcfb1d0..2f8579a79e2dc678bba7880661b7d764bf6faba5 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/Dynamic/Algorithm.php b/lib/internal/Magento/Framework/Search/Dynamic/Algorithm.php index 13223af7352198aea764e010897ae5c2a355ba13..317a0b559148f7b7b6cb09817e0be815f1d286ec 100644 --- a/lib/internal/Magento/Framework/Search/Dynamic/Algorithm.php +++ b/lib/internal/Magento/Framework/Search/Dynamic/Algorithm.php @@ -163,6 +163,8 @@ class Algorithm * * @param IntervalInterface $interval * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function calculateSeparators(IntervalInterface $interval) { @@ -259,6 +261,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) { @@ -419,6 +424,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) { @@ -548,6 +555,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 9eac805147d15b5e24db49d8a740d92ce4bd58a1..a6ec65f17510b6a2a77b3309332c6a98978ecbd6 100644 --- a/lib/internal/Magento/Framework/Search/Request/Binder.php +++ b/lib/internal/Magento/Framework/Search/Request/Binder.php @@ -48,6 +48,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 d50c955609d5002044f5e9f6e2f5ee36c487e8cd..b3182007c3a3d9fe7617654a8f39e803b201bdc2 100644 --- a/lib/internal/Magento/Framework/Search/Request/Cleaner.php +++ b/lib/internal/Magento/Framework/Search/Request/Cleaner.php @@ -65,6 +65,8 @@ class Cleaner * @return void * @throws StateException * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ private function cleanQuery($queryName) { @@ -130,6 +132,7 @@ class Cleaner * @return void * @throws StateException * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ private function cleanFilter($filterName) { diff --git a/lib/internal/Magento/Framework/Search/Request/Mapper.php b/lib/internal/Magento/Framework/Search/Request/Mapper.php index 346b5a6603980651eaa65ee3ae26b80e6dc727a9..488880d07a00053431c277993b0715cc95f01b69 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) { diff --git a/lib/internal/Magento/Framework/Session/Config.php b/lib/internal/Magento/Framework/Session/Config.php index 8ded4ded7584f60135ca3ae0cfb059aa11839330..ff11331c7a904855cb289e9438ba55f0e96d9d92 100644 --- a/lib/internal/Magento/Framework/Session/Config.php +++ b/lib/internal/Magento/Framework/Session/Config.php @@ -110,6 +110,7 @@ class Config implements ConfigInterface * @param DeploymentConfig $deploymentConfig * @param string $scopeType * @param string $lifetimePath + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function __construct( \Magento\Framework\ValidatorFactory $validatorFactory, @@ -407,6 +408,7 @@ class Config implements ConfigInterface * Get session.cookie_secure * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCookieSecure() { @@ -429,6 +431,7 @@ class Config implements ConfigInterface * Get session.cookie_httponly * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCookieHttpOnly() { @@ -451,6 +454,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 accba2d69b8293575c1aa757998b8a3a23a1aedd..6c2372d20be4fc7c759618cdda8a93dfad19fc21 100644 --- a/lib/internal/Magento/Framework/Session/Config/ConfigInterface.php +++ b/lib/internal/Magento/Framework/Session/Config/ConfigInterface.php @@ -135,6 +135,7 @@ interface ConfigInterface * Get session.cookie_secure * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCookieSecure(); @@ -150,6 +151,7 @@ interface ConfigInterface * Get session.cookie_httponly * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCookieHttpOnly(); @@ -165,6 +167,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 324c155d16c1145c50599d7c7bf41565792b08cd..bfd8a6958a712c8a52d9e2031748180c675e6d53 100644 --- a/lib/internal/Magento/Framework/Session/SaveHandler.php +++ b/lib/internal/Magento/Framework/Session/SaveHandler.php @@ -102,6 +102,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 7cdc3feac29471d82f9677463312ba792e34820f..5d05e5ffbe9c388015ef853c1ccee955b30eae87 100644 --- a/lib/internal/Magento/Framework/Session/SaveHandler/DbTable.php +++ b/lib/internal/Magento/Framework/Session/SaveHandler/DbTable.php @@ -58,6 +58,7 @@ class DbTable extends \SessionHandler * @param string $savePath ignored * @param string $sessionName ignored * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function open($savePath, $sessionName) { @@ -145,6 +146,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 018a0717d2b35d1125b83dd61b61edd9088e7eb6..8c2c03d0dd849cf1abf8d205f47a43684b9d7fc6 100644 --- a/lib/internal/Magento/Framework/Session/SessionManager.php +++ b/lib/internal/Magento/Framework/Session/SessionManager.php @@ -343,6 +343,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 7276012389b84805c1781dd7d41da94f6e71ccae..0eedd921cea9905668d6894276e7f2b7a7f2bf25 100644 --- a/lib/internal/Magento/Framework/Session/SidResolver.php +++ b/lib/internal/Magento/Framework/Session/SidResolver.php @@ -127,6 +127,7 @@ class SidResolver implements SidResolverInterface * Retrieve use flag session var instead of SID for URL * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseSessionVar() { @@ -149,6 +150,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 63c14f353f64c6d39d681c0f0cf53dc48c42d411..b3467a5d0ef133b316b56a45ec7b0cc681e40ca1 100644 --- a/lib/internal/Magento/Framework/Session/SidResolverInterface.php +++ b/lib/internal/Magento/Framework/Session/SidResolverInterface.php @@ -42,6 +42,7 @@ interface SidResolverInterface * Retrieve use flag session var instead of SID for URL * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseSessionVar(); @@ -57,6 +58,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 ba38f560de34f06a98284af6405f8fbc5d9839c9..f94ec099c6fc5124217d1fbd52b3a3fae5b95d1c 100644 --- a/lib/internal/Magento/Framework/Simplexml/Config.php +++ b/lib/internal/Magento/Framework/Simplexml/Config.php @@ -184,6 +184,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 69e04dc7692ce245332819c0e8166b561ffe219b..98c881f1dd274ddb61fad6391ee6d2d500215bc8 100644 --- a/lib/internal/Magento/Framework/Simplexml/Element.php +++ b/lib/internal/Magento/Framework/Simplexml/Element.php @@ -27,6 +27,7 @@ class Element extends \SimpleXMLElement * * @param \Magento\Framework\Simplexml\Element $element * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setParent($element) { @@ -59,6 +60,7 @@ class Element extends \SimpleXMLElement * Enter description here... * * @return boolean + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function hasChildren() { @@ -93,6 +95,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) { @@ -222,6 +225,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) { @@ -368,6 +373,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 06fd8901909ee9d8efbf27d651a337231281e761..cde6db70a5b429ef72b937b32cd0a8baf8c043ed 100644 --- a/lib/internal/Magento/Framework/Stdlib/ArrayUtils.php +++ b/lib/internal/Magento/Framework/Stdlib/ArrayUtils.php @@ -56,6 +56,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/DateTime/DateInterface.php b/lib/internal/Magento/Framework/Stdlib/DateTime/DateInterface.php index 0da79c1abe940c74aa2f237abe1ecbb1a6d04eb1..369139a054ad4457108ae647b9d15933e0d772b8 100644 --- a/lib/internal/Magento/Framework/Stdlib/DateTime/DateInterface.php +++ b/lib/internal/Magento/Framework/Stdlib/DateTime/DateInterface.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 19f1532aeea077c77dc321babe35e477ebc4e465..725f64ec64034ff9aaaf72d033d9e98f3005d2b6 100644 --- a/lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php +++ b/lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Stdlib\DateTime; interface TimezoneInterface diff --git a/lib/internal/Magento/Framework/Stdlib/String.php b/lib/internal/Magento/Framework/Stdlib/String.php index 5b2cd7ccc4d220ba082616c5c95c8c2545ebb19b..bdf506b3b5d25280071812760c29212812dd3c8f 100644 --- a/lib/internal/Magento/Framework/Stdlib/String.php +++ b/lib/internal/Magento/Framework/Stdlib/String.php @@ -66,6 +66,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 48135e6214e33a7a3e4420b80124746f3317462b..aa8731c6fce2fe7175c53f6d497a83b0036cc022 100644 --- a/lib/internal/Magento/Framework/System/Dirs.php +++ b/lib/internal/Magento/Framework/System/Dirs.php @@ -10,6 +10,9 @@ class Dirs /** * @param string[]|string $dirname * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ShortMethodName) */ public static function rm($dirname) { @@ -91,6 +94,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 6d550651b7a0ac00d0de5cb2a53e1475888764f0..d02ceec99093e67f3b2a514d9fcf986f4c7aad3c 100644 --- a/lib/internal/Magento/Framework/System/Ftp.php +++ b/lib/internal/Magento/Framework/System/Ftp.php @@ -333,6 +333,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) { @@ -427,6 +428,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/Test/Utility/Files.php b/lib/internal/Magento/Framework/Test/Utility/Files.php index 30ad68f115fb88a5e2e99b2ba0a77e6e238a6449..edb0b8a83d9edda2c79330f4fda83d7542068fc9 100644 --- a/lib/internal/Magento/Framework/Test/Utility/Files.php +++ b/lib/internal/Magento/Framework/Test/Utility/Files.php @@ -1069,7 +1069,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); } diff --git a/lib/internal/Magento/Framework/Translate/Adapter.php b/lib/internal/Magento/Framework/Translate/Adapter.php index 07f907011a2262f6ba68cb8b85b16bd3c38747e2..39a8c338b63560b65cb965dae7b32352654a6c8b 100644 --- a/lib/internal/Magento/Framework/Translate/Adapter.php +++ b/lib/internal/Magento/Framework/Translate/Adapter.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Magento translate adapter */ diff --git a/lib/internal/Magento/Framework/Translate/AdapterInterface.php b/lib/internal/Magento/Framework/Translate/AdapterInterface.php index d2344d4a49aae13ea826c799f1559f464c463abb..19a4bbdc7f908289602baecb4142a72a5ff5572d 100644 --- a/lib/internal/Magento/Framework/Translate/AdapterInterface.php +++ b/lib/internal/Magento/Framework/Translate/AdapterInterface.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Magento translate adapter interface */ diff --git a/lib/internal/Magento/Framework/Translate/Inline.php b/lib/internal/Magento/Framework/Translate/Inline.php index 27d6931281b6771cfd5cb575c0449f085a19c9f7..21730dc60a2cda5a6d45e70fa790442644e18cf2 100644 --- a/lib/internal/Magento/Framework/Translate/Inline.php +++ b/lib/internal/Magento/Framework/Translate/Inline.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework\Translate; class Inline implements \Magento\Framework\Translate\InlineInterface @@ -166,6 +169,7 @@ class Inline implements \Magento\Framework\Translate\InlineInterface * * @param mixed|string|null $tagName * @return null + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getAdditionalHtmlAttribute($tagName = null) { diff --git a/lib/internal/Magento/Framework/Translate/Locale/Resolver/Plugin.php b/lib/internal/Magento/Framework/Translate/Locale/Resolver/Plugin.php index f91c0f380957e1b4e6dac397b2bcddb22c4fd6b4..2112b33aad7b352985895fb44f318b3bbbc33d4c 100644 --- a/lib/internal/Magento/Framework/Translate/Locale/Resolver/Plugin.php +++ b/lib/internal/Magento/Framework/Translate/Locale/Resolver/Plugin.php @@ -27,6 +27,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) { @@ -37,6 +38,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 52e81323a25e6ddf7c4781e369f5bab16dc158d6..b49406a36caf43966d5180a804bd64d4ff0054f4 100644 --- a/lib/internal/Magento/Framework/Url.php +++ b/lib/internal/Magento/Framework/Url.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + namespace Magento\Framework; /** @@ -53,6 +55,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 { @@ -159,6 +162,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, @@ -230,6 +234,7 @@ class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInt * Retrieve use session rule * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseSession() { @@ -426,6 +431,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) { @@ -506,6 +512,7 @@ class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInt * * @param array $routeParams * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _getRoutePath($routeParams = []) { @@ -763,6 +770,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/UrlFactory.php b/lib/internal/Magento/Framework/UrlFactory.php index 4521f2158ed5bee24d48f8754c2ad49857b3c057..f3e65d808ca58ceb6aba8bbc05f24daa62b878b5 100644 --- a/lib/internal/Magento/Framework/UrlFactory.php +++ b/lib/internal/Magento/Framework/UrlFactory.php @@ -3,6 +3,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @codingStandardsIgnoreFile + namespace Magento\Framework; class UrlFactory diff --git a/lib/internal/Magento/Framework/UrlInterface.php b/lib/internal/Magento/Framework/UrlInterface.php index 08991834c0b14e08d7cfe1dd210a199205701c83..61ca29f245fe12ae8e4d53573ba919027925c95c 100644 --- a/lib/internal/Magento/Framework/UrlInterface.php +++ b/lib/internal/Magento/Framework/UrlInterface.php @@ -49,6 +49,7 @@ interface UrlInterface * Retrieve use session rule * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseSession(); diff --git a/lib/internal/Magento/Framework/Validator/Builder.php b/lib/internal/Magento/Framework/Validator/Builder.php index cc6a4b7e81784766a70893ebf9b93bbdbfd8eb2f..adf856aa0e09315315ab1c74013708e6204a84f2 100644 --- a/lib/internal/Magento/Framework/Validator/Builder.php +++ b/lib/internal/Magento/Framework/Validator/Builder.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 253b0dba0c947454901b2e0b2f6fb4a1a7b96775..4bbce4c5da6686a1cf56a8ee0b511f4deec1e86c 100644 --- a/lib/internal/Magento/Framework/Validator/Constraint/Property.php +++ b/lib/internal/Magento/Framework/Validator/Constraint/Property.php @@ -5,6 +5,9 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ + +// @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 a503e4693f0d740309793a0a7969b8a6dd0f25f9..afd466ddb153c76bb6ae741f854085078d8ec54a 100644 --- a/lib/internal/Magento/Framework/Validator/ConstraintFactory.php +++ b/lib/internal/Magento/Framework/Validator/ConstraintFactory.php @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// @codingStandardsIgnoreFile + /** * Factory class for \Magento\Framework\Validator\Constraint */ diff --git a/app/code/Magento/Core/Model/Validator/Factory.php b/lib/internal/Magento/Framework/Validator/Factory.php similarity index 97% rename from app/code/Magento/Core/Model/Validator/Factory.php rename to lib/internal/Magento/Framework/Validator/Factory.php index 87417f739e0726e41e68af83b94a16e0a5fd5646..a663b91cc745f01f164e1d30a1f6e9f04682087b 100644 --- a/app/code/Magento/Core/Model/Validator/Factory.php +++ b/lib/internal/Magento/Framework/Validator/Factory.php @@ -5,7 +5,10 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Core\Model\Validator; + +// @codingStandardsIgnoreFile + +namespace Magento\Framework\Validator; class Factory { diff --git a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php index 07de1f3de9c10940bbb71ac9e1526e23f5cde2ea..73f90325de211f2ba007a0eef0125ece92d531ad 100644 --- a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php +++ b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php @@ -15,6 +15,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 d2112b3e6f6e05cdd9f4e81ac1d0a8b51c58f278..5bb3820c3a5f7d82e87a35378fd12d54adefb849 100644 --- a/lib/internal/Magento/Framework/Xml/Generator.php +++ b/lib/internal/Magento/Framework/Xml/Generator.php @@ -68,6 +68,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 a67d1575f6f532769f70fba1752bf7e238c0d38f..46e1303d39fa481cb9420d620d939a06945bd878 100644 --- a/lib/internal/Magento/Framework/Xml/Parser.php +++ b/lib/internal/Magento/Framework/Xml/Parser.php @@ -70,6 +70,8 @@ class Parser /** * @param bool $currentNode * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _xmlToArray($currentNode = false) { diff --git a/lib/web/mage/adminhtml/form.js b/lib/web/mage/adminhtml/form.js index c6fed3aa5fc4f17ddda44a33da83d997ec122b8f..e266ece372ac4c8abda7a7b74b2b582eeffe1ed8 100644 --- a/lib/web/mage/adminhtml/form.js +++ b/lib/web/mage/adminhtml/form.js @@ -458,7 +458,7 @@ FormElementDependenceController.prototype = { } } else { $(idTo).show(); - if (isAnInputOrSelect) { + if (isAnInputOrSelect && !isInheritCheckboxChecked) { $(idTo).disabled = false; jQuery('#' + idTo).removeClass('ignore-validate'); }