From add4457771c8381cb353221baa7ba6a79e714883 Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin Date: Wed, 31 Dec 2014 04:02:45 -0800 Subject: [PATCH 01/24] MAGETWO-31578: Implement tool for adding annotations to existing code - increased DepthOfInheritance minimum level to 8 - excluded php4 rules --- .../Magento/Test/Php/_files/phpmd/ruleset.xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml index 3a79cfa4cce60..4551fd874cc33 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml @@ -27,11 +27,19 @@ - + + + + + + + + + + - From 40219a6e637cf3c3fe9b038df2d599dbccf5207b Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin Date: Tue, 6 Jan 2015 02:15:22 -0800 Subject: [PATCH 02/24] MAGETWO-31578: Implement tool for adding annotations to existing code - dev/* code marked with @SuppressWarnings annotations --- .../Interception/Fixture/Intercepted.php | 24 +++++++++++++++++++ .../Fixture/Intercepted/InterfacePlugin.php | 10 ++++++++ .../Fixture/Intercepted/Plugin.php | 18 ++++++++++++++ .../Fixture/InterceptedInterface.php | 6 +++++ .../Fixture/InterceptedParent.php | 6 +++++ .../Fixture/InterceptedParentInterface.php | 3 +++ .../Report/Product/Viewed/CollectionTest.php | 2 ++ .../Model/Calculation/RateRepositoryTest.php | 1 + .../Integrity/Modular/TemplateFilesTest.php | 1 + .../Integrity/Theme/TemplateFilesTest.php | 1 + .../phpmd/input/cyclomatic_complexity.php | 1 + .../phpmd/input/descendant_count.php | 3 +++ .../CodeMessTest/phpmd/input/field_count.php | 1 + .../phpmd/input/method_length.php | 1 + .../CodeMessTest/phpmd/input/naming.php | 5 ++++ .../phpmd/input/parameter_list.php | 1 + .../phpmd/input/prohibited_statement.php | 6 +++++ .../phpmd/input/prohibited_statement_goto.php | 3 +++ .../CodeMessTest/phpmd/input/public_count.php | 1 + .../CodeMessTest/phpmd/input/unused.php | 12 ++++++++++ .../coding_style/classes/normal_class.php | 1 + .../functions/multiline_wrong_declaration.php | 5 ++++ .../coding_style/functions/normal_func.php | 2 ++ .../functions/unneeded_multiline.php | 1 + .../naming/constant/minuscule_letter.php | 3 +++ .../naming/method/normal_underscore_start.php | 3 +++ .../naming/property/normal_underscore.php | 3 +++ .../Backend/Model/Session/QuoteTest.php | 2 ++ .../Bundle/Model/OptionRepositoryTest.php | 3 +++ .../Price/BundleSelectionPriceTest.php | 1 + .../Adminhtml/Category/SaveTest.php | 3 +++ .../Controller/Product/Compare/IndexTest.php | 4 ++++ .../Magento/Catalog/Model/CategoryTest.php | 4 ++++ .../Model/Layer/Filter/AttributeTest.php | 6 +++++ .../Filter/DataProvider/CategoryTest.php | 3 +++ .../Catalog/Model/Layer/Filter/PriceTest.php | 4 ++++ .../Magento/Catalog/Model/LayerTest.php | 1 + .../Model/Product/LinkTypeProviderTest.php | 3 +++ .../Catalog/Model/Rss/CategoryTest.php | 3 +++ .../CatalogInventory/Model/ObserverTest.php | 3 +++ .../Model/Spi/StockRegistryProviderTest.php | 3 +++ .../Model/Layer/Filter/AttributeTest.php | 6 +++++ .../Model/Layer/Filter/CategoryTest.php | 3 +++ .../Model/Layer/Filter/PriceTest.php | 1 + .../Block/Product/ProductsListTest.php | 1 + .../Checkout/Controller/Onepage/IndexTest.php | 3 +++ .../Magento/Checkout/Helper/CartTest.php | 1 + .../Checkout/Model/Type/OnepageTest.php | 4 ++++ .../Model/Product/Validator/PluginTest.php | 1 + .../Pricing/Price/AttributePriceTest.php | 3 +++ .../Customer/Block/Widget/NameTest.php | 1 + .../Controller/Account/CreatePostTest.php | 3 +++ .../Controller/Varien/Router/StandardTest.php | 1 + .../Magento/Framework/Message/ManagerTest.php | 3 +++ .../Model/Product/Type/GroupedTest.php | 3 +++ .../Block/Header/AdditionalTest.php | 2 ++ .../Condition/Product/AbstractProductTest.php | 2 ++ .../Order/Creditmemo/NewActionTest.php | 1 + .../Order/Creditmemo/PrintActionTest.php | 1 + .../Adminhtml/Order/Creditmemo/ViewTest.php | 4 ++++ .../Sales/Model/AdminOrder/CreateTest.php | 3 +++ .../Quote/Address/CollectTotalsTest.php | 6 +++++ .../Magento/Sales/Model/QuoteTest.php | 4 ++++ .../Magento/SalesRule/Model/UtilityTest.php | 1 + .../Adminhtml/Order/Shipment/AddTrackTest.php | 3 +++ .../Order/Shipment/NewActionTest.php | 3 +++ .../Adminhtml/Order/Shipment/ViewTest.php | 1 + .../testsuite/Magento/Tax/Helper/DataTest.php | 1 + .../Tax/Model/Sales/Total/Quote/TaxTest.php | 1 + .../Magento/Ui/Component/FilterPoolTest.php | 1 + .../Magento/Ui/Component/ListingTest.php | 3 +++ .../Wishlist/Controller/Index/CartTest.php | 16 +++++++++++++ 72 files changed, 254 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php index 84988bbba5b03..d005d25826af4 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php @@ -9,42 +9,66 @@ class Intercepted extends InterceptedParent implements InterceptedInterface { protected $_key; + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function A($param1) { $this->_key = $param1; return $this; } + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function B($param1, $param2) { return '' . $param1 . $param2 . $this->C($param1) . ''; } + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function C($param1) { return '' . $param1 . ''; } + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function D($param1) { return '' . $this->_key . $param1 . ''; } + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ final public function E($param1) { return '' . $this->_key . $param1 . ''; } + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function F($param1) { return '' . $param1 . ''; } + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function G($param1) { return '' . $param1 . ""; } + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function K($param1) { return '' . $param1 . ''; 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 40a95354897a7..7524be69a2437 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/InterfacePlugin.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/InterfacePlugin.php @@ -14,6 +14,7 @@ class InterfacePlugin * @param \Closure $next * @param string $param1 * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundC(InterceptedInterface $subject, \Closure $next, $param1) { @@ -31,16 +32,25 @@ public function aroundF(InterceptedInterface $subject, \Closure $next, $param1) return '' . $subject->D($next($subject->C($param1))) . ''; } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function beforeG(InterceptedInterface $subject, $param1) { return ['' . $param1 . '']; } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function aroundG(InterceptedInterface $subject, \Closure $next, $param1) { return $next('' . $param1 . ''); } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function afterG(InterceptedInterface $subject, $result) { return '' . $result . ''; 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 06e04190ae49b..bb5c28aa280ff 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/Plugin.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/Plugin.php @@ -14,33 +14,51 @@ class Plugin */ protected $_counter = 0; + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function aroundC(Intercepted $subject, \Closure $next, $param1) { return '' . $next($param1) . ''; } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function aroundD(Intercepted $subject, \Closure $next, $param1) { $this->_counter++; return '' . $this->_counter . ': ' . $next($param1) . ''; } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function aroundK(Intercepted $subject, \Closure $next, $param1) { $result = $subject->C($param1); return '' . $subject->F($result) . ''; } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function beforeG(Intercepted $subject, $param1) { return ['' . $param1 . '']; } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function aroundG(Intercepted $subject, \Closure $next, $param1) { return $next('' . $param1 . ''); } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function afterG(Intercepted $subject, $result) { return '' . $result . ''; 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 fb4de8212a8bd..7a951369e386d 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedInterface.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedInterface.php @@ -7,7 +7,13 @@ 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 507bb5e20bae0..72ec8842a5296 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParent.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParent.php @@ -7,11 +7,17 @@ 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 8107018237f21..263e6d7bab551 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParentInterface.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParentInterface.php @@ -7,5 +7,8 @@ interface InterceptedParentInterface { + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + */ public function A($param1); } diff --git a/dev/tests/integration/testsuite/Magento/Reports/Model/Resource/Report/Product/Viewed/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Reports/Model/Resource/Report/Product/Viewed/CollectionTest.php index cffacf9534c55..50c12e3733633 100644 --- a/dev/tests/integration/testsuite/Magento/Reports/Model/Resource/Report/Product/Viewed/CollectionTest.php +++ b/dev/tests/integration/testsuite/Magento/Reports/Model/Resource/Report/Product/Viewed/CollectionTest.php @@ -46,6 +46,7 @@ public function testGetItems() * @param $dateFrom * @param $dateTo * @param $isTotal + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function testTableSelection($period, $expectedTable, $dateFrom, $dateTo, $isTotal = false) { @@ -91,6 +92,7 @@ public function testTableSelection($period, $expectedTable, $dateFrom, $dateTo, * Data provider for testTableSelection * * @return array + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function tableForPeriodDataProvider() { diff --git a/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RateRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RateRepositoryTest.php index 0c844893cfb7b..e35fbb77d470b 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RateRepositoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RateRepositoryTest.php @@ -506,6 +506,7 @@ public function testDeleteThrowsExceptionIfTargetTaxRateDoesNotExist() * * @magentoDbIsolation enabled * @dataProvider searchTaxRatesDataProvider + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function testGetList($filters, $filterGroup, $expectedRateCodes) { diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php index 8547aaa490950..802b42be3c8ca 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php @@ -42,6 +42,7 @@ function ($module, $template, $class, $area) { /** * @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 9f6aa570bc62b..d308e7128f854 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/TemplateFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/TemplateFilesTest.php @@ -61,6 +61,7 @@ public function templatesDataProvider() * * @param \SimpleXMLElement $layoutXml * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _getLayoutTemplates($layoutXml) { diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/cyclomatic_complexity.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/cyclomatic_complexity.php index e78ad0a73d199..2795d100cc80a 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/cyclomatic_complexity.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/cyclomatic_complexity.php @@ -4,6 +4,7 @@ abstract class Foo { /** * Method that violates the allowed cyclomatic complexity + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function bar() { diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/descendant_count.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/descendant_count.php index a559b0c1f59b4..4c035e76005e1 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/descendant_count.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/descendant_count.php @@ -1,5 +1,8 @@ assertEquals($optionId, $this->model->save($productMock, $optionMock)); } + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ public function testUpdate() { $productId = 1; diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionPriceTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionPriceTest.php index 68adb8e241a21..1c77424f30332 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionPriceTest.php @@ -163,6 +163,7 @@ protected function setupSelectionPrice($useRegularPrice = false) * * @param bool $useRegularPrice * @dataProvider useRegularPriceDataProvider + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function testGetValueTypeDynamic($useRegularPrice) { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/SaveTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/SaveTest.php index d8d6ab6897c97..ebf610fadc352 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/SaveTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/SaveTest.php @@ -6,6 +6,7 @@ /** * Class SaveTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class SaveTest extends \PHPUnit_Framework_TestCase { @@ -78,6 +79,7 @@ class SaveTest extends \PHPUnit_Framework_TestCase * Set up * * @return void + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function setUp() { @@ -207,6 +209,7 @@ protected function setUp() * @return void * * @dataProvider dataProviderExecute + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function testExecute($categoryId, $storeId, $activeTabId, $parentId) { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Product/Compare/IndexTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Product/Compare/IndexTest.php index a46b5a2806a0c..60cafb13995b5 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Product/Compare/IndexTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Product/Compare/IndexTest.php @@ -7,6 +7,10 @@ use Magento\Catalog\Model\Resource\Product\Compare\Item; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class IndexTest extends \PHPUnit_Framework_TestCase { /** @var \Magento\Catalog\Controller\Product\Compare\Index */ diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/CategoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/CategoryTest.php index a918e7be095e2..a63f7682958f4 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/CategoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/CategoryTest.php @@ -5,6 +5,10 @@ namespace Magento\Catalog\Model; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class CategoryTest extends \PHPUnit_Framework_TestCase { /** @var \Magento\Catalog\Model\Category */ diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/AttributeTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/AttributeTest.php index 90662bb9fdc27..7e8032da57097 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/AttributeTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/AttributeTest.php @@ -8,6 +8,9 @@ use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; use PHPUnit_Framework_MockObject_MockObject as MockObject; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class AttributeTest extends \PHPUnit_Framework_TestCase { /** @var \Magento\Catalog\Model\Resource\Layer\Filter\Attribute|MockObject */ @@ -45,6 +48,9 @@ class AttributeTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Catalog\Model\Layer\Filter\Item\DataBuilder|MockObject */ private $itemDataBuilder; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { /** @var \Magento\Catalog\Model\Layer\Filter\ItemFactory $filterItemFactory */ diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/DataProvider/CategoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/DataProvider/CategoryTest.php index e8b5cc362ca29..2f26990729d23 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/DataProvider/CategoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/DataProvider/CategoryTest.php @@ -33,6 +33,9 @@ class CategoryTest extends \PHPUnit_Framework_TestCase */ private $target; + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ protected function setUp() { /** @var \Magento\Framework\Registry $var */ diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/PriceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/PriceTest.php index d9e9655100b7e..a3ce5758190ff 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/PriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/PriceTest.php @@ -10,6 +10,7 @@ /** * Test for \Magento\Catalog\Model\Layer\Filter\Price + * @SuppressWarnings(PHPMD.UnusedPrivateField) */ class PriceTest extends \PHPUnit_Framework_TestCase { @@ -49,6 +50,9 @@ class PriceTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Catalog\Model\Layer\State|MockObject */ private $state; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { $this->request = $this->getMockBuilder('\Magento\Framework\App\RequestInterface') diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/LayerTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/LayerTest.php index 336e84b6d0ae5..c7831368d9677 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/LayerTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/LayerTest.php @@ -9,6 +9,7 @@ /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.TooManyFields) */ class LayerTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/LinkTypeProviderTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/LinkTypeProviderTest.php index 0638418b149b0..53bb94fc97dde 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/LinkTypeProviderTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/LinkTypeProviderTest.php @@ -62,6 +62,9 @@ protected function setUp() ); } + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ public function testGetItems() { $expectedResult = []; diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Rss/CategoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Rss/CategoryTest.php index 626b9e97bbabf..09bbb79f81ed0 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Rss/CategoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Rss/CategoryTest.php @@ -86,6 +86,9 @@ protected function setUp() ); } + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function testGetProductCollection() { $storeId = 1; diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/ObserverTest.php index afba5189fc328..c6d302801d611 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/ObserverTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/ObserverTest.php @@ -84,6 +84,9 @@ class ObserverTest extends \PHPUnit_Framework_TestCase */ protected $eventObserver; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { $this->stockStatus = $this->getMockBuilder('Magento\CatalogInventory\Model\Stock\Status') diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Spi/StockRegistryProviderTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Spi/StockRegistryProviderTest.php index 8bd5f27b3f3a3..224a28084df8b 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Spi/StockRegistryProviderTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Spi/StockRegistryProviderTest.php @@ -101,6 +101,9 @@ class StockRegistryProviderTest extends \PHPUnit_Framework_TestCase protected $productSku = 'simple'; protected $websiteId = 111; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { $this->objectManagerHelper = new ObjectManagerHelper($this); diff --git a/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/AttributeTest.php b/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/AttributeTest.php index 85de9a5d76886..f67edee41dc56 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/AttributeTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/AttributeTest.php @@ -8,6 +8,9 @@ use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; use PHPUnit_Framework_MockObject_MockObject as MockObject; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class AttributeTest extends \PHPUnit_Framework_TestCase { /** @@ -229,6 +232,9 @@ public function testGetItemsWithApply() $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 c9e2fad0c8a64..5b9dbffeeb47f 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/CategoryTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/CategoryTest.php @@ -226,6 +226,9 @@ function ($field) use ($requestVar, $categoryId) { $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 2c343b49e262f..890c078777ff1 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/PriceTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Layer/Filter/PriceTest.php @@ -10,6 +10,7 @@ /** * 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 a3e92b426f2f2..e398d9efc6d69 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogWidget/Block/Product/ProductsListTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogWidget/Block/Product/ProductsListTest.php @@ -10,6 +10,7 @@ /** * Class ProductsListTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class ProductsListTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Controller/Onepage/IndexTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Controller/Onepage/IndexTest.php index 662d082c6fb3e..ad94bd34381d9 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Controller/Onepage/IndexTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Controller/Onepage/IndexTest.php @@ -9,6 +9,9 @@ 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 d0209b44397c7..dee612d5bb91f 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Helper/CartTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Helper/CartTest.php @@ -200,6 +200,7 @@ public function testGetAddUrl() * @param string $expectedPostData * * @dataProvider deletePostJsonDataProvider + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function testGetDeletePostJson($id, $url, $isAjax, $expectedPostData) { diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php index 294315836209f..bad1ba8493c19 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php @@ -96,6 +96,9 @@ class OnepageTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Framework\Api\ExtensibleDataObjectConverter|\PHPUnit_Framework_MockObject_MockObject */ protected $extensibleDataObjectConverterMock; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { $this->addressRepositoryMock = $this->getMockForAbstractClass( @@ -378,6 +381,7 @@ public function testSaveBillingInvalidData() * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.ExcessiveParameterList) * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function testSaveBilling( $data, diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Validator/PluginTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Validator/PluginTest.php index f903d7c80add9..931d8a63bcac7 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Validator/PluginTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Validator/PluginTest.php @@ -325,6 +325,7 @@ public function testAroundValidateWithVariationsAndRequiredAttributes() * @param bool $isValid * @internal param array $attributes * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Catalog\Model\Product + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ private function createProduct($index, $id, $isValid = true) { diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Pricing/Price/AttributePriceTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Pricing/Price/AttributePriceTest.php index f747acbc34590..3db171c993ead 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Pricing/Price/AttributePriceTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Pricing/Price/AttributePriceTest.php @@ -125,6 +125,9 @@ public function testInstanceOf() $this->assertInstanceOf('Magento\ConfigurableProduct\Pricing\Price\AttributePrice', $object); } + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function testPrepareJsonAttributes() { $options = []; diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/NameTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/NameTest.php index 0a2076884d85c..5aad6669d1f93 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/NameTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/NameTest.php @@ -408,6 +408,7 @@ public function testGetStoreLabelWithException() * Helper method for testing all show*() methods. * * @param array $data Customer attribute(s) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ private function _setUpShowAttribute(array $data) { diff --git a/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreatePostTest.php b/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreatePostTest.php index 58db06e1de87c..6fbbddb9bc8ba 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreatePostTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreatePostTest.php @@ -116,6 +116,9 @@ class CreatePostTest extends \PHPUnit_Framework_TestCase */ protected $messageManagerMock; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { /** diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php index 165e730f0af39..564b2ad3ac6a5 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php @@ -71,6 +71,7 @@ public function testMatch( * Data provider for testMatch * * @return array + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function matchDataProvider() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Message/ManagerTest.php b/dev/tests/unit/testsuite/Magento/Framework/Message/ManagerTest.php index 32e6638df24b5..522426d6dfe73 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Message/ManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Message/ManagerTest.php @@ -167,6 +167,9 @@ public function testGetMessagesWithClear() $this->assertEquals($messageCollection, $this->model->getMessages(true)); } + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ public function testAddException() { $exceptionMessage = 'exception message'; diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php index cd98cd9ee707d..13c069e8d6549 100644 --- a/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php +++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php @@ -283,6 +283,9 @@ public function processBuyRequestDataProvider() ]; } + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ public function testGetChildrenMsrpWhenNoChildrenWithMsrp() { $key = '_cache_instance_associated_products'; diff --git a/dev/tests/unit/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php b/dev/tests/unit/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php index 9237b9f7ff895..d59754f3e0095 100644 --- a/dev/tests/unit/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php +++ b/dev/tests/unit/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php @@ -6,6 +6,7 @@ /** * Class AdditionalTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AdditionalTest extends \PHPUnit_Framework_TestCase { @@ -85,6 +86,7 @@ class AdditionalTest extends \PHPUnit_Framework_TestCase * Set up * * @return void + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function setUp() { diff --git a/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/Product/AbstractProductTest.php b/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/Product/AbstractProductTest.php index 93ad5f6f97d44..e5eaaccb1ebca 100644 --- a/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/Product/AbstractProductTest.php +++ b/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/Product/AbstractProductTest.php @@ -283,6 +283,7 @@ public function testGetMappedSqlField() * @param array $expectedValueSelectOptions * @param array $expectedValueOption * @dataProvider prepareValueOptionsDataProvider + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function testPrepareValueOptions( $setData, @@ -363,6 +364,7 @@ public function testPrepareValueOptions( /** * @return array + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function prepareValueOptionsDataProvider() { diff --git a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/NewActionTest.php b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/NewActionTest.php index 027be986e7dd2..bd908cd65510b 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/NewActionTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/NewActionTest.php @@ -6,6 +6,7 @@ /** * 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 055e15038537a..949b5e8362aa9 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/PrintActionTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/PrintActionTest.php @@ -6,6 +6,7 @@ /** * Class PrintActionTest + * @SuppressWarnings(PHPMD.TooManyFields) */ class PrintActionTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/ViewTest.php b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/ViewTest.php index f9902ddcc3041..ab1bfeda56ef5 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/ViewTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/ViewTest.php @@ -6,6 +6,7 @@ /** * Class ViewTest + * @SuppressWarnings(PHPMD.TooManyFields) */ class ViewTest extends \PHPUnit_Framework_TestCase { @@ -89,6 +90,9 @@ class ViewTest extends \PHPUnit_Framework_TestCase */ protected $pageTitleMock; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function setUp() { $this->invoiceMock = $this->getMockBuilder('Magento\Sales\Model\Order\Invoice') diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php index 80a1d4554f535..7a6214ef4f611 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php @@ -76,6 +76,9 @@ class CreateTest extends \PHPUnit_Framework_TestCase */ protected $objectFactory; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { $objectManagerMock = $this->getMock('Magento\Framework\ObjectManagerInterface'); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php index 82b30090c840c..c098b04913b93 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php @@ -74,6 +74,9 @@ class CollectTotalsTest extends \PHPUnit_Framework_TestCase */ protected $groupInterfaceMock; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); @@ -190,6 +193,9 @@ public function testDispatchWithDisableVatValidator() $this->model->dispatch($this->observerMock); } + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ public function testDispatchWithCustomerCountryNotInEUAndNotLoggedCustomerInGroup() { $this->groupManagementMock->expects($this->once()) diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/QuoteTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/QuoteTest.php index f99a191a3f16f..f8597c45e51d5 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/QuoteTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/QuoteTest.php @@ -12,6 +12,7 @@ * Test class for \Magento\Sales\Model\Order * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.TooManyFields) */ class QuoteTest extends \PHPUnit_Framework_TestCase { @@ -522,6 +523,9 @@ public function testloadByIdWithoutStore() $this->assertInstanceOf('Magento\Sales\Model\Quote', $result); } + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ public function testSetCustomerAddressData() { $customerId = 1; diff --git a/dev/tests/unit/testsuite/Magento/SalesRule/Model/UtilityTest.php b/dev/tests/unit/testsuite/Magento/SalesRule/Model/UtilityTest.php index 3f6532d3c1f86..245e5741958a2 100644 --- a/dev/tests/unit/testsuite/Magento/SalesRule/Model/UtilityTest.php +++ b/dev/tests/unit/testsuite/Magento/SalesRule/Model/UtilityTest.php @@ -7,6 +7,7 @@ /** * 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 b1fcb404f2041..bd6a7501e3693 100644 --- a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/AddTrackTest.php +++ b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/AddTrackTest.php @@ -155,6 +155,9 @@ public function setUp() ); } + /** + * @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 66cd7cc9e8e9f..f4c16404cee3d 100644 --- a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/NewActionTest.php +++ b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/NewActionTest.php @@ -85,6 +85,9 @@ class NewActionTest extends \PHPUnit_Framework_TestCase */ protected $pageTitleMock; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function setUp() { $objectManagerHelper = new ObjectManagerHelper($this); diff --git a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/ViewTest.php b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/ViewTest.php index 8b07f79e1d032..312c409563cf6 100644 --- a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/ViewTest.php +++ b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/ViewTest.php @@ -6,6 +6,7 @@ /** * Class ViewTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class ViewTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Tax/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Tax/Helper/DataTest.php index 01af7e215929c..c6cd649c02dfc 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Helper/DataTest.php @@ -121,6 +121,7 @@ public function testGetCalculatedTaxesForOrder() * * @param $inputArray * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Tax\Api\Data\OrderTaxDetailsInterface + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function mapOrderTaxItemDetail($inputArray) { diff --git a/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php b/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php index cc67af4a7cf0a..f684763168f60 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php @@ -26,6 +26,7 @@ class TaxTest extends \PHPUnit_Framework_TestCase * * @dataProvider dataProviderCollectArray * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function testCollect($itemData, $appliedRatesData, $taxDetailsData, $quoteDetailsData, $addressData, $verifyData diff --git a/dev/tests/unit/testsuite/Magento/Ui/Component/FilterPoolTest.php b/dev/tests/unit/testsuite/Magento/Ui/Component/FilterPoolTest.php index 59847118f0c63..108f5d5d3678f 100644 --- a/dev/tests/unit/testsuite/Magento/Ui/Component/FilterPoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Ui/Component/FilterPoolTest.php @@ -147,6 +147,7 @@ protected function setUp() * 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 4960983682bcf..a96403ced73fc 100644 --- a/dev/tests/unit/testsuite/Magento/Ui/Component/ListingTest.php +++ b/dev/tests/unit/testsuite/Magento/Ui/Component/ListingTest.php @@ -11,6 +11,9 @@ use Magento\Ui\Component\Listing\RowPool; use Magento\Ui\Context\ConfigurationFactory; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class ListingTest extends \PHPUnit_Framework_TestCase { /** diff --git a/dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/CartTest.php b/dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/CartTest.php index 9fdcf260c8079..7f1e5b216a409 100644 --- a/dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/CartTest.php +++ b/dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/CartTest.php @@ -5,6 +5,10 @@ namespace Magento\Wishlist\Controller\Index; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class CartTest extends \PHPUnit_Framework_TestCase { /** @@ -87,6 +91,9 @@ class CartTest extends \PHPUnit_Framework_TestCase */ protected $urlMock; + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp() { $this->wishlistProviderMock = $this->getMockBuilder('Magento\Wishlist\Controller\WishlistProviderInterface') @@ -262,6 +269,9 @@ public function testExecuteWithNoWishlist() $this->assertEquals($this->responseMock, $this->model->execute()); } + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function testExecuteWithQuantityArray() { $itemId = 2; @@ -472,6 +482,9 @@ public function testExecuteWithQuantityArray() $this->assertEquals($this->responseMock, $this->model->execute()); } + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function testExecuteWithoutQuantityArrayAndOutOfStock() { $itemId = 2; @@ -632,6 +645,9 @@ public function testExecuteWithoutQuantityArrayAndOutOfStock() $this->assertEquals($this->responseMock, $this->model->execute()); } + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function testExecuteWithoutQuantityArrayAndConfigurable() { $itemId = 2; From 4fc86c07f765923d84c0e935adab75cbceae5fed Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin Date: Tue, 6 Jan 2015 02:21:58 -0800 Subject: [PATCH 03/24] MAGETWO-31578: Implement tool for adding annotations to existing code - code in lib/internal is covered with @SuppressWarnings annotations --- .../Magento/Framework/App/Action/Action.php | 1 + .../Magento/Framework/Archive/Helper/File.php | 1 + .../Magento/Framework/Archive/Tar.php | 4 ++++ .../Framework/Backup/AbstractBackup.php | 1 + .../Framework/Backup/Filesystem/Helper.php | 3 +++ .../Backup/Filesystem/Rollback/Ftp.php | 1 + .../Framework/Cache/Backend/Database.php | 1 + .../Framework/Cache/Backend/Eaccelerator.php | 7 ++++++ .../Framework/Code/Reader/ArgumentsReader.php | 2 ++ .../Code/Validator/ArgumentSequence.php | 3 +++ .../Code/Validator/ConstructorIntegrity.php | 2 ++ .../Framework/Config/Composer/Package.php | 1 + .../Magento/Framework/Config/Data.php | 3 +++ lib/internal/Magento/Framework/Config/Dom.php | 1 + .../Framework/DB/Adapter/Pdo/Mysql.php | 22 +++++++++++++++++++ .../Magento/Framework/DB/Ddl/Table.php | 5 +++++ lib/internal/Magento/Framework/DB/Helper.php | 2 ++ lib/internal/Magento/Framework/DB/Select.php | 2 ++ .../Framework/DB/Statement/Parameter.php | 1 + .../Framework/DB/Statement/Pdo/Mysql.php | 1 + lib/internal/Magento/Framework/DB/Tree.php | 13 +++++++++++ .../Magento/Framework/DB/Tree/Node.php | 3 +++ .../Magento/Framework/Data/Collection.php | 3 +++ .../Magento/Framework/Data/Collection/Db.php | 1 + .../Framework/Data/Collection/Filesystem.php | 9 ++++++++ .../Data/Form/Element/AbstractElement.php | 2 ++ .../Framework/Data/Form/Element/Checkbox.php | 2 ++ .../Framework/Data/Form/Element/Editor.php | 4 ++++ .../Framework/Data/Form/Element/Gallery.php | 2 ++ .../Framework/Data/Form/Element/Multiline.php | 1 + .../Framework/Data/Form/Element/Time.php | 2 ++ lib/internal/Magento/Framework/Data/Tree.php | 8 +++++++ .../Magento/Framework/Data/Tree/Node.php | 1 + lib/internal/Magento/Framework/Debug.php | 3 +++ .../Magento/Framework/Event/Observer/Cron.php | 2 ++ lib/internal/Magento/Framework/File/Csv.php | 1 + .../Magento/Framework/File/Uploader.php | 3 +++ .../Framework/Filesystem/Driver/Http.php | 1 + .../Magento/Framework/Filter/Input.php | 1 + .../Framework/Filter/RemoveAccents.php | 1 + .../Magento/Framework/Filter/Template.php | 2 ++ .../Filter/Template/Tokenizer/Parameter.php | 1 + .../Filter/Template/Tokenizer/Variable.php | 2 ++ .../Framework/Gdata/Gshopping/Entry.php | 2 ++ .../Magento/Framework/HTTP/Adapter/Curl.php | 3 +++ .../Magento/Framework/HTTP/Client/Curl.php | 3 +++ .../Magento/Framework/HTTP/Client/Socket.php | 7 ++++++ .../Image/Adapter/AbstractAdapter.php | 2 ++ .../Magento/Framework/Image/Adapter/Gd2.php | 5 +++++ .../Framework/Image/Adapter/ImageMagick.php | 2 ++ .../Interception/Code/InterfaceValidator.php | 2 ++ .../Interception/PluginList/PluginList.php | 2 ++ .../Magento/Framework/Io/AbstractIo.php | 1 + lib/internal/Magento/Framework/Io/File.php | 12 ++++++++++ lib/internal/Magento/Framework/Io/Ftp.php | 6 +++++ .../Magento/Framework/Io/IoInterface.php | 4 ++++ lib/internal/Magento/Framework/Io/Sftp.php | 5 +++++ .../Magento/Framework/Locale/Lists.php | 1 + .../Framework/Message/AbstractMessage.php | 1 + .../Magento/Framework/Message/Manager.php | 1 + .../Framework/Message/MessageInterface.php | 1 + .../Model/AbstractExtensibleModel.php | 1 + .../Magento/Framework/Model/AbstractModel.php | 1 + .../Magento/Framework/Model/Exception.php | 1 + .../Model/Resource/Db/AbstractDb.php | 11 ++++++++++ .../Db/Collection/AbstractCollection.php | 3 +++ .../Magento/Framework/Module/DataSetup.php | 3 +++ .../Framework/Module/ModuleList/Loader.php | 1 + lib/internal/Magento/Framework/Mview/View.php | 3 +++ lib/internal/Magento/Framework/Object.php | 1 + .../Magento/Framework/Object/Cache.php | 5 +++++ lib/internal/Magento/Framework/Parse/Zip.php | 3 +++ .../Adapter/Mysql/Aggregation/Interval.php | 3 +++ .../Framework/Search/Dynamic/Algorithm.php | 9 ++++++++ .../Framework/Search/Request/Binder.php | 1 + .../Framework/Search/Request/Cleaner.php | 3 +++ .../Magento/Framework/Session/Config.php | 4 ++++ .../Session/Config/ConfigInterface.php | 3 +++ .../Magento/Framework/Session/SaveHandler.php | 1 + .../Framework/Session/SaveHandler/DbTable.php | 2 ++ .../Framework/Session/SessionManager.php | 1 + .../Magento/Framework/Session/SidResolver.php | 2 ++ .../Session/SidResolverInterface.php | 2 ++ .../Magento/Framework/Simplexml/Config.php | 1 + .../Magento/Framework/Simplexml/Element.php | 7 ++++++ .../Magento/Framework/Stdlib/ArrayUtils.php | 2 ++ .../Magento/Framework/Stdlib/String.php | 2 ++ .../Magento/Framework/System/Dirs.php | 4 ++++ lib/internal/Magento/Framework/System/Ftp.php | 2 ++ .../Translate/Locale/Resolver/Plugin.php | 2 ++ lib/internal/Magento/Framework/Url.php | 7 ++++++ .../Magento/Framework/UrlInterface.php | 1 + .../Framework/View/Element/AbstractBlock.php | 1 + .../Magento/Framework/Xml/Generator.php | 1 + lib/internal/Magento/Framework/Xml/Parser.php | 2 ++ 95 files changed, 288 insertions(+) diff --git a/lib/internal/Magento/Framework/App/Action/Action.php b/lib/internal/Magento/Framework/App/Action/Action.php index 8dbf0d96ebc20..8e400be128128 100644 --- a/lib/internal/Magento/Framework/App/Action/Action.php +++ b/lib/internal/Magento/Framework/App/Action/Action.php @@ -11,6 +11,7 @@ * 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 9e8f31b9247a5..22c4ed76ea660 100644 --- a/lib/internal/Magento/Framework/Archive/Helper/File.php +++ b/lib/internal/Magento/Framework/Archive/Helper/File.php @@ -85,6 +85,7 @@ public function __destruct() * @param int $chmod * @return void * @throws MagentoException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function open($mode = 'w+', $chmod = 0666) { diff --git a/lib/internal/Magento/Framework/Archive/Tar.php b/lib/internal/Magento/Framework/Archive/Tar.php index 05bbe6245904d..8aff2c0b80511 100644 --- a/lib/internal/Magento/Framework/Archive/Tar.php +++ b/lib/internal/Magento/Framework/Archive/Tar.php @@ -310,6 +310,8 @@ protected function _packAndWriteCurrentFile() * * @param bool $long * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _composeHeader($long = false) { @@ -379,6 +381,7 @@ protected function _composeHeader($long = false) * @param string $destination path to file is unpacked * @return string[] list of files * @throws \Magento\Framework\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _unpackCurrentTar($destination) { @@ -514,6 +517,7 @@ protected function _extractAndWriteFile($fileHeader, $destination) * @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 1709be0ff2c89..d0f4a7812bf3b 100644 --- a/lib/internal/Magento/Framework/Backup/AbstractBackup.php +++ b/lib/internal/Magento/Framework/Backup/AbstractBackup.php @@ -215,6 +215,7 @@ public function getBackupFilename() * Check whether last operation completed successfully * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsSuccess() { diff --git a/lib/internal/Magento/Framework/Backup/Filesystem/Helper.php b/lib/internal/Magento/Framework/Backup/Filesystem/Helper.php index e944a5a5c1c6b..ca0a97b52feed 100644 --- a/lib/internal/Magento/Framework/Backup/Filesystem/Helper.php +++ b/lib/internal/Magento/Framework/Backup/Filesystem/Helper.php @@ -51,6 +51,7 @@ class Helper * @param bool $removeRoot * @return void * @throws \Magento\Framework\Exception + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function rm($path, $skipPaths = [], $removeRoot = false) { @@ -77,6 +78,8 @@ public function rm($path, $skipPaths = [], $removeRoot = false) * @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 e8f1d78766d52..fef8bbba8501f 100644 --- a/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Ftp.php +++ b/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Ftp.php @@ -157,6 +157,7 @@ protected function _cleanupFtp() * @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 8b146188d7a47..ee8e1a89f3361 100644 --- a/lib/internal/Magento/Framework/Cache/Backend/Database.php +++ b/lib/internal/Magento/Framework/Cache/Backend/Database.php @@ -498,6 +498,7 @@ protected function _saveTags($id, $tags) * @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 3beab74b9d195..739b2a832ad86 100644 --- a/lib/internal/Magento/Framework/Cache/Backend/Eaccelerator.php +++ b/lib/internal/Magento/Framework/Cache/Backend/Eaccelerator.php @@ -35,6 +35,7 @@ public function __construct(array $options = []) * @param string $id cache id * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested * @return string cached datas (or false) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function load($id, $doNotTestCacheValidity = false) { @@ -107,6 +108,7 @@ public function remove($id) * @param string[] $tags array of tags * @throws \Zend_Cache_Exception * @return bool|void true if no problem + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function clean($mode = \Zend_Cache::CLEANING_MODE_ALL, $tags = []) { @@ -169,6 +171,7 @@ public function getTags() * * @param array $tags array of tags * @return string[] array of matching cache ids (string) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getIdsMatchingTags($tags = []) { @@ -183,6 +186,7 @@ public function getIdsMatchingTags($tags = []) * * @param string[] $tags array of tags * @return string[] array of not matching cache ids (string) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getIdsNotMatchingTags($tags = []) { @@ -197,6 +201,7 @@ public function getIdsNotMatchingTags($tags = []) * * @param string[] $tags array of tags * @return string[] array of any matching cache ids (string) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getIdsMatchingAnyTags($tags = []) { @@ -208,6 +213,7 @@ public function getIdsMatchingAnyTags($tags = []) * Return an array of stored cache ids * * @return string[] array of stored cache ids (string) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getIds() { @@ -229,6 +235,7 @@ public function getIds() * * @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 28309b5a59105..9c57f0b7a73dd 100644 --- a/lib/internal/Magento/Framework/Code/Reader/ArgumentsReader.php +++ b/lib/internal/Magento/Framework/Code/Reader/ArgumentsReader.php @@ -15,6 +15,8 @@ class ArgumentsReader * @param bool $groupByPosition * @param bool $inherited * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getConstructorArguments(\ReflectionClass $class, $groupByPosition = false, $inherited = false) { diff --git a/lib/internal/Magento/Framework/Code/Validator/ArgumentSequence.php b/lib/internal/Magento/Framework/Code/Validator/ArgumentSequence.php index 2aefdb95835a5..d429541719679 100644 --- a/lib/internal/Magento/Framework/Code/Validator/ArgumentSequence.php +++ b/lib/internal/Magento/Framework/Code/Validator/ArgumentSequence.php @@ -39,6 +39,7 @@ public function __construct(\Magento\Framework\Code\Reader\ArgumentsReader $argu * @param string $className * @return bool * @throws ValidationException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function validate($className) { @@ -134,6 +135,8 @@ protected function _checkArgumentSequence(array $actualSequence, array $required * @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 295cad1650ce0..e273f71abf597 100644 --- a/lib/internal/Magento/Framework/Code/Validator/ConstructorIntegrity.php +++ b/lib/internal/Magento/Framework/Code/Validator/ConstructorIntegrity.php @@ -29,6 +29,8 @@ public function __construct(\Magento\Framework\Code\Reader\ArgumentsReader $argu * @param string $className * @return bool * @throws \Magento\Framework\Code\ValidationException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validate($className) { diff --git a/lib/internal/Magento/Framework/Config/Composer/Package.php b/lib/internal/Magento/Framework/Config/Composer/Package.php index fe3079f9159a3..645e42a1f34b6 100644 --- a/lib/internal/Magento/Framework/Config/Composer/Package.php +++ b/lib/internal/Magento/Framework/Config/Composer/Package.php @@ -58,6 +58,7 @@ public function getJson($formatted = true, $format = null) * @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 64e987882317a..842e28835bab4 100644 --- a/lib/internal/Magento/Framework/Config/Data.php +++ b/lib/internal/Magento/Framework/Config/Data.php @@ -6,6 +6,9 @@ */ namespace Magento\Framework\Config; +/** + * @SuppressWarnings(PHPMD.NumberOfChildren) + */ class Data implements \Magento\Framework\Config\DataInterface { /** diff --git a/lib/internal/Magento/Framework/Config/Dom.php b/lib/internal/Magento/Framework/Config/Dom.php index 7ea9e21ffe562..a18c7a734a26f 100644 --- a/lib/internal/Magento/Framework/Config/Dom.php +++ b/lib/internal/Magento/Framework/Config/Dom.php @@ -113,6 +113,7 @@ public function merge($xml) * @param \DOMElement $node * @param string $parentPath path to parent node * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _mergeNode(\DOMElement $node, $parentPath) { diff --git a/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php b/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php index b63ca6b8f22ee..919699158c5cd 100644 --- a/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php +++ b/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php @@ -17,6 +17,12 @@ use Magento\Framework\Stdlib\DateTime; use Magento\Framework\Stdlib\String; +/** + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface { const TIMESTAMP_FORMAT = 'Y-m-d H:i:s'; @@ -399,6 +405,7 @@ protected function _checkDdlTransaction($sql) * @param mixed $bind An array of data or data itself to bind to the placeholders. * @return \Zend_Db_Statement_Pdo|void * @throws \Zend_Db_Adapter_Exception To re-throw \PDOException. + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function query($sql, $bind = []) { @@ -650,6 +657,8 @@ public function multiMagentoQuery($sql) * * @param string $sql * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _splitMultiQuery($sql) { @@ -1129,6 +1138,9 @@ public function getForeignKeysTree() * * @param array $tables * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function modifyTables($tables) { @@ -1515,6 +1527,8 @@ public function describeTable($tableName, $schemaName = null) * * @param array $columnData * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getColumnCreateByDescribe($columnData) { @@ -1656,6 +1670,7 @@ public function modifyColumnByDdl($tableName, $columnName, $definition, $flushDa * * @param array $column * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _getColumnTypeByDdl($column) { @@ -1752,6 +1767,8 @@ public function insertForce($table, array $bind) * @param array $fields update fields pairs or values * @return int The number of affected rows. * @throws \Zend_Db_Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function insertOnDuplicate($table, array $data, array $fields = []) { @@ -1958,6 +1975,7 @@ public function createTable(Table $table) * @param \Magento\Framework\DB\Ddl\Table $table * @throws \Zend_Db_Exception * @return \Zend_Db_Pdo_Statement + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function createTemporaryTable(\Magento\Framework\DB\Ddl\Table $table) { @@ -2192,6 +2210,10 @@ public function getColumnDefinitionFromDescribe($options, $ddlType = null) * @throws \Magento\Framework\Exception * @return string * @throws \Zend_Db_Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ protected function _getColumnDefinition($options, $ddlType = null) { diff --git a/lib/internal/Magento/Framework/DB/Ddl/Table.php b/lib/internal/Magento/Framework/DB/Ddl/Table.php index f6ac1784fa5b2..55b6f140a2962 100644 --- a/lib/internal/Magento/Framework/DB/Ddl/Table.php +++ b/lib/internal/Magento/Framework/DB/Ddl/Table.php @@ -269,6 +269,9 @@ public function getComment() * @param string $comment column description * @return $this * @throws \Zend_Db_Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function addColumn($name, $type, $size = null, $options = [], $comment = null) { @@ -404,6 +407,7 @@ public function addColumn($name, $type, $size = null, $options = [], $comment = * @param string $onUpdate the action on update * @return $this * @throws \Zend_Db_Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function addForeignKey($fkName, $column, $refTable, $refColumn, $onDelete = null, $onUpdate = null) { @@ -454,6 +458,7 @@ public function addForeignKey($fkName, $column, $refTable, $refColumn, $onDelete * @param array $options array of additional options * @return $this * @throws \Zend_Db_Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function addIndex($indexName, $fields, $options = []) { diff --git a/lib/internal/Magento/Framework/DB/Helper.php b/lib/internal/Magento/Framework/DB/Helper.php index 2b9bf573348c9..f0333c59a68e7 100644 --- a/lib/internal/Magento/Framework/DB/Helper.php +++ b/lib/internal/Magento/Framework/DB/Helper.php @@ -181,6 +181,8 @@ protected function _assembleLimit($query, $limitCount, $limitOffset, $columnList * @param string|null $groupByCondition OPTIONAL * @return mixed|array * @throws \Zend_Db_Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function prepareColumnsList(\Magento\Framework\DB\Select $select, $groupByCondition = null) { diff --git a/lib/internal/Magento/Framework/DB/Select.php b/lib/internal/Magento/Framework/DB/Select.php index d94be372abbf0..7b30718e1959f 100644 --- a/lib/internal/Magento/Framework/DB/Select.php +++ b/lib/internal/Magento/Framework/DB/Select.php @@ -183,6 +183,8 @@ public function match($columns, $expression, $isCondition = true, $mode = self:: * 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 df9ef05222545..7ca82cfd2b155 100644 --- a/lib/internal/Magento/Framework/DB/Statement/Parameter.php +++ b/lib/internal/Magento/Framework/DB/Statement/Parameter.php @@ -114,6 +114,7 @@ public function setIsBlob($isBlob) * @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 187a54490a9d0..1b12e7aab2006 100644 --- a/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php +++ b/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php @@ -21,6 +21,7 @@ class Mysql extends \Zend_Db_Statement_Pdo * @param array $params Array of values to bind to parameter placeholders. * @return bool * @throws \Zend_Db_Statement_Exception + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function _executeWithBinding(array $params) { diff --git a/lib/internal/Magento/Framework/DB/Tree.php b/lib/internal/Magento/Framework/DB/Tree.php index a6c344ff26530..c87b9bf2a29f4 100644 --- a/lib/internal/Magento/Framework/DB/Tree.php +++ b/lib/internal/Magento/Framework/DB/Tree.php @@ -76,6 +76,8 @@ class Tree /** * @param array $config * @throws TreeException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function __construct($config = []) { @@ -273,6 +275,7 @@ public function getNodeInfo($nodeId) * @param string|int $nodeId * @param array $data * @return false|string + * @SuppressWarnings(PHPMD.ExitExpression) */ public function appendChild($nodeId, $data) { @@ -440,6 +443,10 @@ public function removeNode($nodeId) * @param string|int $pId * @param string|int $aId * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.ExitExpression) */ public function moveNode($eId, $pId, $aId = 0) { @@ -770,6 +777,11 @@ public function moveNode($eId, $pId, $aId = 0) * @param string|int $pId * @param string|int $aId * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + * @SuppressWarnings(PHPMD.ExitExpression) */ public function moveNodes($eId, $pId, $aId = 0) { @@ -990,6 +1002,7 @@ protected function _addExtTablesToSelect(\Zend_Db_Select &$select) * @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 7644fb58c11d3..b4252b7c0450e 100644 --- a/lib/internal/Magento/Framework/DB/Tree/Node.php +++ b/lib/internal/Magento/Framework/DB/Tree/Node.php @@ -6,6 +6,9 @@ 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 e115f4d43838d..a11b01e7fff05 100644 --- a/lib/internal/Magento/Framework/Data/Collection.php +++ b/lib/internal/Magento/Framework/Data/Collection.php @@ -166,6 +166,7 @@ public function addFilter($field, $value, $type = 'and') * @param string|int|array $condition * @throws \Magento\Framework\Exception if some error in the input could be detected. * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function addFieldToFilter($field, $condition) { @@ -645,6 +646,7 @@ protected function _renderLimit() * * @param bool $flag * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function distinct($flag) { @@ -657,6 +659,7 @@ public function distinct($flag) * @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 a3d0b641186d6..d16b83b2be0fc 100644 --- a/lib/internal/Magento/Framework/Data/Collection/Db.php +++ b/lib/internal/Magento/Framework/Data/Collection/Db.php @@ -11,6 +11,7 @@ /** * 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 e3ed90d6f7ac6..977f015797990 100644 --- a/lib/internal/Magento/Framework/Data/Collection/Filesystem.php +++ b/lib/internal/Magento/Framework/Data/Collection/Filesystem.php @@ -230,6 +230,8 @@ public function setDirsFirst($value) * * @param string|array $dir * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _collectRecursive($dir) { @@ -432,6 +434,8 @@ public function addCallbackFilter($field, $value, $type, $callback, $isInverted * * @param array $row * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.EvalExpression) */ protected function _filterRow($row) { @@ -473,6 +477,7 @@ protected function _filterRow($row) * @param callback $callback * @param array $callbackParams * @return bool + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _invokeFilter($callback, $callbackParams) { @@ -491,6 +496,9 @@ protected function _invokeFilter($callback, $callbackParams) * @param string $type 'and' | 'or' * @see Db::addFieldToFilter() * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function addFieldToFilter($field, $cond, $type = 'and') { @@ -730,6 +738,7 @@ public function filterCallbackInArray($field, $filterValue, $row) * @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 5a55c5df17f07..4e1b736056e9c 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php @@ -13,6 +13,7 @@ * Data form abstract class * * @author Magento Core Team + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractElement extends AbstractForm { @@ -529,6 +530,7 @@ public function getHtmlContainerId() * @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 a0b553269c9c0..7d1f0fb0e9bba 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Checkbox.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Checkbox.php @@ -51,6 +51,7 @@ public function getHtmlAttributes() /** * @return string + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getElementHtml() { @@ -78,6 +79,7 @@ public function setIsChecked($value = false) * 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 6c14e5e5a2b31..d8417a67d6957 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Editor.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php @@ -38,6 +38,7 @@ public function __construct( /** * @return string + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getElementHtml() { @@ -217,6 +218,8 @@ protected function _getToggleButtonHtml($visible = true) * * @param bool $visible Display button or not * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getPluginButtonsHtml($visible = true) { @@ -331,6 +334,7 @@ protected function _prepareOptions($options) * * @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 f37dde95ea36d..8a0c8a4a6aeb4 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php @@ -32,6 +32,8 @@ public function __construct( /** * @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 ce904bc722d73..d505ead9bee7a 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Multiline.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Multiline.php @@ -100,6 +100,7 @@ public function getElementHtml() /** * @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 5773541b4c9f6..98ce8886b3534 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Time.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Time.php @@ -44,6 +44,8 @@ public function getName() /** * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getElementHtml() { diff --git a/lib/internal/Magento/Framework/Data/Tree.php b/lib/internal/Magento/Framework/Data/Tree.php index 660df333b2134..0bfad5302f7c4 100644 --- a/lib/internal/Magento/Framework/Data/Tree.php +++ b/lib/internal/Magento/Framework/Data/Tree.php @@ -45,6 +45,7 @@ public function getTree() * * @param Node $parentNode * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function load($parentNode = null) { @@ -55,6 +56,7 @@ public function load($parentNode = null) * * @param int|string $nodeId * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function loadNode($nodeId) { @@ -67,6 +69,7 @@ public function loadNode($nodeId) * @param Node $parentNode * @param Node $prevNode * @return Node + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function appendChild($data, $parentNode, $prevNode = null) { @@ -102,6 +105,7 @@ public function addNode($node, $parent = null) * @param Node $parentNode * @param Node $prevNode * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function moveNodeTo($node, $parentNode, $prevNode = null) { @@ -114,6 +118,7 @@ public function moveNodeTo($node, $parentNode, $prevNode = null) * @param Node $parentNode * @param Node $prevNode * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function copyNodeTo($node, $parentNode, $prevNode = null) { @@ -141,6 +146,7 @@ public function removeNode($node) * @param Node $parentNode * @param Node $prevNode * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function createNode($parentNode, $prevNode = null) { @@ -151,6 +157,7 @@ public function createNode($parentNode, $prevNode = null) * * @param Node $node * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getChild($node) { @@ -161,6 +168,7 @@ public function getChild($node) * * @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 4e4d94ee217da..4cae8b6ff594a 100644 --- a/lib/internal/Magento/Framework/Data/Tree/Node.php +++ b/lib/internal/Magento/Framework/Data/Tree/Node.php @@ -168,6 +168,7 @@ public function setPathId($path) /** * @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 7d58d1bc7db37..9fbac155956a0 100644 --- a/lib/internal/Magento/Framework/Debug.php +++ b/lib/internal/Magento/Framework/Debug.php @@ -60,6 +60,8 @@ public static function backtrace($return = false, $html = true, $withArgs = true * @param bool $html output in HTML format * @param bool $withArgs add short arguments of methods * @return string|bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public static function trace(array $trace, $return = false, $html = true, $withArgs = true) { @@ -140,6 +142,7 @@ public static function trace(array $trace, $return = false, $html = true, $withA * * @param mixed $arg * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected static function _formatCalledArgument($arg) { diff --git a/lib/internal/Magento/Framework/Event/Observer/Cron.php b/lib/internal/Magento/Framework/Event/Observer/Cron.php index c2ff3a5cf57ee..755b758d939cb 100644 --- a/lib/internal/Magento/Framework/Event/Observer/Cron.php +++ b/lib/internal/Magento/Framework/Event/Observer/Cron.php @@ -62,6 +62,8 @@ public function getNow() * @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 9405809d96389..9c5a67407801b 100644 --- a/lib/internal/Magento/Framework/File/Csv.php +++ b/lib/internal/Magento/Framework/File/Csv.php @@ -136,6 +136,7 @@ public function saveData($file, $data) * @param string $delimiter * @param string $enclosure * @return int + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function fputcsv(&$handle, $fields = [], $delimiter = ',', $enclosure = '"') { diff --git a/lib/internal/Magento/Framework/File/Uploader.php b/lib/internal/Magento/Framework/File/Uploader.php index 8eaa20cd15987..45c38e414526c 100644 --- a/lib/internal/Magento/Framework/File/Uploader.php +++ b/lib/internal/Magento/Framework/File/Uploader.php @@ -169,6 +169,7 @@ public function __construct($fileId) * * @param array $result * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _afterSave($result) { @@ -183,6 +184,7 @@ protected function _afterSave($result) * @param string $newFileName * @return array * @throws \Exception + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function save($destinationFolder, $newFileName = null) { @@ -486,6 +488,7 @@ private function _getMimeType() * @param string|array $fileId * @return void * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ private function _setUploadFileId($fileId) { diff --git a/lib/internal/Magento/Framework/Filesystem/Driver/Http.php b/lib/internal/Magento/Framework/Filesystem/Driver/Http.php index 0d5a3e1f82234..a02d624ba255f 100644 --- a/lib/internal/Magento/Framework/Filesystem/Driver/Http.php +++ b/lib/internal/Magento/Framework/Filesystem/Driver/Http.php @@ -48,6 +48,7 @@ public function isExists($path) * * @param string $path * @return array + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function stat($path) { diff --git a/lib/internal/Magento/Framework/Filter/Input.php b/lib/internal/Magento/Framework/Filter/Input.php index d59595ca1af76..982a25db5cda1 100644 --- a/lib/internal/Magento/Framework/Filter/Input.php +++ b/lib/internal/Magento/Framework/Filter/Input.php @@ -205,6 +205,7 @@ public function filter($data) * @param bool $isFilterListSimple * @return array * @throws \Exception when filter is not found or not instance of defined instances + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _filter(array $data, &$filters = null, $isFilterListSimple = false) { diff --git a/lib/internal/Magento/Framework/Filter/RemoveAccents.php b/lib/internal/Magento/Framework/Filter/RemoveAccents.php index fb5800ea4e0e9..588e2fc8a8a33 100644 --- a/lib/internal/Magento/Framework/Filter/RemoveAccents.php +++ b/lib/internal/Magento/Framework/Filter/RemoveAccents.php @@ -25,6 +25,7 @@ public function __construct($german = false) /** * @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 27dd4b24849bf..54bfdbb830772 100644 --- a/lib/internal/Magento/Framework/Filter/Template.php +++ b/lib/internal/Magento/Framework/Filter/Template.php @@ -95,6 +95,7 @@ public function getIncludeProcessor() * @param string $value * @return string * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function filter($value) { @@ -235,6 +236,7 @@ protected function _getIncludeParameters($value) * @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 352deaaabc21d..68885e11ba08e 100644 --- a/lib/internal/Magento/Framework/Filter/Template/Tokenizer/Parameter.php +++ b/lib/internal/Magento/Framework/Filter/Template/Tokenizer/Parameter.php @@ -35,6 +35,7 @@ public function tokenize() * 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 172bdfa394847..1bdaa7f858610 100644 --- a/lib/internal/Magento/Framework/Filter/Template/Tokenizer/Variable.php +++ b/lib/internal/Magento/Framework/Filter/Template/Tokenizer/Variable.php @@ -13,6 +13,7 @@ class Variable extends \Magento\Framework\Filter\Template\Tokenizer\AbstractToke * Tokenize string and return getted variable stack path * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function tokenize() { @@ -58,6 +59,7 @@ public function tokenize() * 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 ac17f30d455af..e755365521c51 100644 --- a/lib/internal/Magento/Framework/Gdata/Gshopping/Entry.php +++ b/lib/internal/Magento/Framework/Gdata/Gshopping/Entry.php @@ -77,6 +77,7 @@ public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) * * @param \DOMNode $child The \DOMNode to process * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function takeChildFromDOM($child) { @@ -222,6 +223,7 @@ public function getContentAttributes() * * @param string $name The name of the Content attribute to look for * @return string[] $matches Array of Attribute + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getContentAttributesByName($name) { diff --git a/lib/internal/Magento/Framework/HTTP/Adapter/Curl.php b/lib/internal/Magento/Framework/HTTP/Adapter/Curl.php index 0f6a781312fb7..d9702d7e33071 100644 --- a/lib/internal/Magento/Framework/HTTP/Adapter/Curl.php +++ b/lib/internal/Magento/Framework/HTTP/Adapter/Curl.php @@ -50,6 +50,8 @@ class Curl implements \Zend_Http_Client_Adapter_Interface * Apply current configuration array to transport resource * * @return \Magento\Framework\HTTP\Adapter\Curl + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _applyConfig() { @@ -136,6 +138,7 @@ public function connect($host, $port = 80, $secure = false) * @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 88b0f8e866a73..86285f63b467d 100644 --- a/lib/internal/Magento/Framework/HTTP/Client/Curl.php +++ b/lib/internal/Magento/Framework/HTTP/Client/Curl.php @@ -330,6 +330,8 @@ public function getStatus() * @param string $uri * @param array $params * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function makeRequest($method, $uri, $params = []) { @@ -405,6 +407,7 @@ public function doError($string) * @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 0c39b6870ee71..ed837b4cdbb75 100644 --- a/lib/internal/Magento/Framework/HTTP/Client/Socket.php +++ b/lib/internal/Magento/Framework/HTTP/Client/Socket.php @@ -10,6 +10,12 @@ */ namespace Magento\Framework\HTTP\Client; +/** + * @SuppressWarnings(PHPMD.UnusedPrivateField) + */ +/** + * @SuppressWarnings(PHPMD.UnusedPrivateField) + */ class Socket implements \Magento\Framework\HTTP\ClientInterface { /** @@ -406,6 +412,7 @@ protected function processResponseBody() * Process response * * @return void + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function processResponse() { diff --git a/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php b/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php index bd5b3a6cf2375..9b742a37a5f93 100644 --- a/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php +++ b/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php @@ -9,6 +9,7 @@ /** * @file Abstract.php * @author Magento Core Team + * @SuppressWarnings(PHPMD.TooManyFields) */ abstract class AbstractAdapter implements AdapterInterface { @@ -261,6 +262,7 @@ abstract public function getColorAt($x, $y); * * @param \Magento\Framework\Filesystem $filesystem * @param array $data + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct(\Magento\Framework\Filesystem $filesystem, array $data = []) { diff --git a/lib/internal/Magento/Framework/Image/Adapter/Gd2.php b/lib/internal/Magento/Framework/Image/Adapter/Gd2.php index 3895c29ecd1e9..3d9c02d670d01 100644 --- a/lib/internal/Magento/Framework/Image/Adapter/Gd2.php +++ b/lib/internal/Magento/Framework/Image/Adapter/Gd2.php @@ -202,6 +202,7 @@ private function _getCallback($callbackType, $fileType = null, $unsupportedText * @param resource &$imageResourceTo * @return int * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ private function _fillBackgroundColor(&$imageResourceTo) { @@ -275,6 +276,7 @@ public function checkAlpha($fileName) * @param bool &$isAlpha * @param bool &$isTrueColor * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ private function _getTransparency($imageResource, $fileType, &$isAlpha = false, &$isTrueColor = false) { @@ -365,6 +367,9 @@ public function rotate($angle) * @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 89ab022508c9a..867578dd8e6ac 100644 --- a/lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php +++ b/lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php @@ -234,6 +234,8 @@ public function crop($top = 0, $left = 0, $right = 0, $bottom = 0) * @return void * @throws \LogicException * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function watermark($imagePath, $positionX = 0, $positionY = 0, $opacity = 30, $tile = false) { diff --git a/lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php b/lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php index 3767bc54b2fb6..d1cd6952c6130 100644 --- a/lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php +++ b/lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php @@ -35,6 +35,8 @@ public function __construct(\Magento\Framework\Code\Reader\ArgumentsReader $argu * * @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 655d036f1e7e4..083b8c3cf77f6 100644 --- a/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php +++ b/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php @@ -83,6 +83,7 @@ class PluginList extends Scoped implements InterceptionPluginList * @param ClassDefinitions $classDefinitions * @param array $scopePriorityScheme * @param string $cacheId + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( ReaderInterface $reader, @@ -112,6 +113,7 @@ public function __construct( * @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 bb2fc4e0a6532..b5c5626070ba5 100644 --- a/lib/internal/Magento/Framework/Io/AbstractIo.php +++ b/lib/internal/Magento/Framework/Io/AbstractIo.php @@ -52,6 +52,7 @@ public function dirsep() /** * @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 375f9ee65aa07..5193ec7c0e2ba 100644 --- a/lib/internal/Magento/Framework/Io/File.php +++ b/lib/internal/Magento/Framework/Io/File.php @@ -6,6 +6,7 @@ /** * Filesystem client + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) */ class File extends AbstractIo { @@ -366,6 +367,8 @@ public static function rmdirRecursive($dir, $recursive = true) * @param array $dirCallback * @return mixed * @throws \InvalidArgumentException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected static function _recursiveCallback($dir, array $fileCallback, array $dirCallback = []) { @@ -416,6 +419,7 @@ public function pwd() * @param string $dir * @return true * @throws \Exception + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function cd($dir) { @@ -458,6 +462,7 @@ public function read($filename, $dest = null) * @param string|resource $src * @param int $mode * @return int|bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function write($filename, $src, $mode = null) { @@ -593,6 +598,7 @@ private function _createDestinationFolder($destinationFolder) * * @param string $filename * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function rm($filename) { @@ -608,6 +614,7 @@ public function rm($filename) * @param string $src * @param string $destination * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function mv($src, $destination) { @@ -623,6 +630,7 @@ public function mv($src, $destination) * @param string $src * @param string $destination * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function cp($src, $destination) { @@ -678,6 +686,8 @@ public static function chmodRecursive($dir, $mode) * @param string|null $grep * @return array * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function ls($grep = null) { @@ -781,6 +791,8 @@ protected function _iwd() * @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 09f41131f28ee..5ab2719c96626 100644 --- a/lib/internal/Magento/Framework/Io/Ftp.php +++ b/lib/internal/Magento/Framework/Io/Ftp.php @@ -66,6 +66,8 @@ class Ftp extends AbstractIo * @param array $args * @return true * @throws IoException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function open(array $args = []) { @@ -183,6 +185,7 @@ public function pwd() * * @param string $dir * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function cd($dir) { @@ -260,6 +263,7 @@ public function write($filename, $src, $mode = null) * * @param string $filename * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function rm($filename) { @@ -272,6 +276,7 @@ public function rm($filename) * @param string $src * @param string $dest * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function mv($src, $dest) { @@ -293,6 +298,7 @@ public function chmod($filename, $mode) /** * @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 dfcd25c74d50e..ae2e68c3ec2da 100644 --- a/lib/internal/Magento/Framework/Io/IoInterface.php +++ b/lib/internal/Magento/Framework/Io/IoInterface.php @@ -55,6 +55,7 @@ public function pwd(); * * @param string $dir * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function cd($dir); @@ -82,6 +83,7 @@ public function write($filename, $src, $mode = null); * * @param string $filename * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function rm($filename); @@ -91,6 +93,7 @@ public function rm($filename); * @param string $src * @param string $dest * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function mv($src, $dest); @@ -108,6 +111,7 @@ public function chmod($filename, $mode); * * @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 4faa38532bbb2..2ed666aa87bd7 100644 --- a/lib/internal/Magento/Framework/Io/Sftp.php +++ b/lib/internal/Magento/Framework/Io/Sftp.php @@ -96,6 +96,7 @@ public function mkdir($dir, $mode = 0777, $recursive = true) * @param bool $recursive * @return bool * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function rmdir($dir, $recursive = false) { @@ -147,6 +148,7 @@ public function pwd() * * @param string $dir * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function cd($dir) { @@ -187,6 +189,7 @@ public function write($filename, $source, $mode = null) * * @param string $filename * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function rm($filename) { @@ -199,6 +202,7 @@ public function rm($filename) * @param string $source * @param string $destination * @return bool + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function mv($source, $destination) { @@ -222,6 +226,7 @@ public function chmod($filename, $mode) * * @param null $grep ignored parameter * @return array + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function ls($grep = null) { diff --git a/lib/internal/Magento/Framework/Locale/Lists.php b/lib/internal/Magento/Framework/Locale/Lists.php index 006f998a1f3b4..9297a08df366c 100644 --- a/lib/internal/Magento/Framework/Locale/Lists.php +++ b/lib/internal/Magento/Framework/Locale/Lists.php @@ -62,6 +62,7 @@ public function getTranslatedOptionLocales() * * @param bool $translatedName translation flag * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _getOptionLocales($translatedName = false) { diff --git a/lib/internal/Magento/Framework/Message/AbstractMessage.php b/lib/internal/Magento/Framework/Message/AbstractMessage.php index 80e744c618ed2..18bea563de5a0 100644 --- a/lib/internal/Magento/Framework/Message/AbstractMessage.php +++ b/lib/internal/Magento/Framework/Message/AbstractMessage.php @@ -99,6 +99,7 @@ public function setIsSticky($isSticky = true) * Getter for flag. Whether message is sticky * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsSticky() { diff --git a/lib/internal/Magento/Framework/Message/Manager.php b/lib/internal/Magento/Framework/Message/Manager.php index 739cdb0dbf5dc..dbc10ee99da95 100644 --- a/lib/internal/Magento/Framework/Message/Manager.php +++ b/lib/internal/Magento/Framework/Message/Manager.php @@ -9,6 +9,7 @@ /** * 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 d2dd5e8b6555b..9155ce504ac4d 100644 --- a/lib/internal/Magento/Framework/Message/MessageInterface.php +++ b/lib/internal/Magento/Framework/Message/MessageInterface.php @@ -78,6 +78,7 @@ public function setIsSticky($isSticky); * 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 7f403df4cd1c0..f5109b1202c9b 100644 --- a/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php +++ b/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php @@ -15,6 +15,7 @@ * * 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 b223b53f1ce17..a4da902087b1f 100644 --- a/lib/internal/Magento/Framework/Model/AbstractModel.php +++ b/lib/internal/Magento/Framework/Model/AbstractModel.php @@ -10,6 +10,7 @@ * * @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 8b92e2930ee21..a5af17e454572 100644 --- a/lib/internal/Magento/Framework/Model/Exception.php +++ b/lib/internal/Magento/Framework/Model/Exception.php @@ -8,6 +8,7 @@ * Magento Model Exception * * This class will be extended by other modules + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Exception extends \Exception { diff --git a/lib/internal/Magento/Framework/Model/Resource/Db/AbstractDb.php b/lib/internal/Magento/Framework/Model/Resource/Db/AbstractDb.php index 4309ef36b03bb..b03b19be0b6f5 100644 --- a/lib/internal/Magento/Framework/Model/Resource/Db/AbstractDb.php +++ b/lib/internal/Magento/Framework/Model/Resource/Db/AbstractDb.php @@ -9,6 +9,7 @@ /** * Abstract resource model class + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractDb extends \Magento\Framework\Model\Resource\AbstractResource { @@ -355,6 +356,7 @@ public function load(\Magento\Framework\Model\AbstractModel $object, $value, $fi * @param mixed $value * @param \Magento\Framework\Model\AbstractModel $object * @return \Zend_Db_Select + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getLoadSelect($field, $value, $object) { @@ -368,6 +370,7 @@ protected function _getLoadSelect($field, $value, $object) * * @param \Magento\Framework\Model\AbstractModel $object * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function save(\Magento\Framework\Model\AbstractModel $object) { @@ -507,6 +510,7 @@ public function resetUniqueField() * * @param \Magento\Framework\Model\AbstractModel $object * @return void + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function unserializeFields(\Magento\Framework\Model\AbstractModel $object) { @@ -592,6 +596,7 @@ protected function _prepareValueForSave($value, $type) * @param \Magento\Framework\Model\AbstractModel $object * @return $this * @throws ModelException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _checkUnique(\Magento\Framework\Model\AbstractModel $object) { @@ -654,6 +659,7 @@ public function afterLoad(\Magento\Framework\Model\AbstractModel $object) * * @param \Magento\Framework\Model\AbstractModel|\Magento\Framework\Object $object * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _afterLoad(\Magento\Framework\Model\AbstractModel $object) { @@ -665,6 +671,7 @@ protected function _afterLoad(\Magento\Framework\Model\AbstractModel $object) * * @param \Magento\Framework\Model\AbstractModel|\Magento\Framework\Object $object * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object) { @@ -676,6 +683,7 @@ protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object) * * @param \Magento\Framework\Model\AbstractModel|\Magento\Framework\Object $object * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _afterSave(\Magento\Framework\Model\AbstractModel $object) { @@ -687,6 +695,7 @@ protected function _afterSave(\Magento\Framework\Model\AbstractModel $object) * * @param \Magento\Framework\Model\AbstractModel|\Magento\Framework\Object $object * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _beforeDelete(\Magento\Framework\Model\AbstractModel $object) { @@ -698,6 +707,7 @@ protected function _beforeDelete(\Magento\Framework\Model\AbstractModel $object) * * @param \Magento\Framework\Model\AbstractModel|\Magento\Framework\Object $object * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _afterDelete(\Magento\Framework\Model\AbstractModel $object) { @@ -709,6 +719,7 @@ protected function _afterDelete(\Magento\Framework\Model\AbstractModel $object) * * @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 6e68ed3552d56..b82cc77643098 100644 --- a/lib/internal/Magento/Framework/Model/Resource/Db/Collection/AbstractCollection.php +++ b/lib/internal/Magento/Framework/Model/Resource/Db/Collection/AbstractCollection.php @@ -6,6 +6,7 @@ /** * Abstract Resource Collection + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractCollection extends \Magento\Framework\Data\Collection\Db { @@ -190,6 +191,8 @@ public function getSelect() * Init fields for select * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _initSelectFields() { diff --git a/lib/internal/Magento/Framework/Module/DataSetup.php b/lib/internal/Magento/Framework/Module/DataSetup.php index 7612e372fa0a7..e01b19a57f082 100644 --- a/lib/internal/Magento/Framework/Module/DataSetup.php +++ b/lib/internal/Magento/Framework/Module/DataSetup.php @@ -262,6 +262,7 @@ protected function _includeFile($fileName) * @param string $toVersion * @param array $arrFiles * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _getModifySqlFiles($actionType, $fromVersion, $toVersion, $arrFiles) { @@ -383,6 +384,7 @@ public function deleteTableRow($table, $idField, $rowId, $parentField = null, $p * @param string $parentField * @param string|integer $parentId * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function updateTableRow($table, $idField, $rowId, $field, $value = null, $parentField = null, $parentId = 0) { @@ -415,6 +417,7 @@ public function updateTableRow($table, $idField, $rowId, $field, $value = null, * 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 37274755fa65a..d29b22158436e 100644 --- a/lib/internal/Magento/Framework/Module/ModuleList/Loader.php +++ b/lib/internal/Magento/Framework/Module/ModuleList/Loader.php @@ -65,6 +65,7 @@ public function load() * * @param array $origList * @return array + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ private function sortBySequence($origList) { diff --git a/lib/internal/Magento/Framework/Mview/View.php b/lib/internal/Magento/Framework/Mview/View.php index 2de767d656587..925bfd4a54585 100644 --- a/lib/internal/Magento/Framework/Mview/View.php +++ b/lib/internal/Magento/Framework/Mview/View.php @@ -4,6 +4,9 @@ */ namespace Magento\Framework\Mview; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class View extends \Magento\Framework\Object implements ViewInterface { /** diff --git a/lib/internal/Magento/Framework/Object.php b/lib/internal/Magento/Framework/Object.php index 438cdad543fa3..8ddf01ee6961d 100644 --- a/lib/internal/Magento/Framework/Object.php +++ b/lib/internal/Magento/Framework/Object.php @@ -8,6 +8,7 @@ * Universal data container with array access implementation * * @author Magento Core Team + * @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 8e3b78254f08d..187f7fd1be930 100644 --- a/lib/internal/Magento/Framework/Object/Cache.php +++ b/lib/internal/Magento/Framework/Object/Cache.php @@ -122,6 +122,8 @@ public function load($idx, $default = null) * @param array|string $tags * @return string * @throws \Magento\Framework\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function save($object, $idx = null, $tags = null) { @@ -273,6 +275,7 @@ public function deleteByClass($class) * * @param array|string $tags * @return true + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function deleteByTags($tags) { @@ -347,6 +350,7 @@ public function findByHash($hash) * * @param array|string $tags * @return array + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function findByTags($tags) { @@ -388,6 +392,7 @@ public function findByClass($class) * @param string $idx * @param object|null $object * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function debug($idx, $object = null) { diff --git a/lib/internal/Magento/Framework/Parse/Zip.php b/lib/internal/Magento/Framework/Parse/Zip.php index 9bd285f6bb08c..6efc853e5b168 100644 --- a/lib/internal/Magento/Framework/Parse/Zip.php +++ b/lib/internal/Magento/Framework/Parse/Zip.php @@ -44,6 +44,9 @@ public static function parseZip($zip) * * @param string $zipRange * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public static function zipRangeToZipPattern($zipRange) { diff --git a/lib/internal/Magento/Framework/Search/Adapter/Mysql/Aggregation/Interval.php b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Aggregation/Interval.php index 101df074da75f..b58f03db80c50 100644 --- a/lib/internal/Magento/Framework/Search/Adapter/Mysql/Aggregation/Interval.php +++ b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Aggregation/Interval.php @@ -40,6 +40,7 @@ private function getValueFiled() /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function load($limit, $offset = null, $lower = null, $upper = null) { @@ -62,6 +63,7 @@ public function load($limit, $offset = null, $lower = null, $upper = null) /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function loadPrevious($data, $index, $lower = null) { @@ -83,6 +85,7 @@ public function loadPrevious($data, $index, $lower = null) /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function loadNext($data, $rightIndex, $upper = null) { diff --git a/lib/internal/Magento/Framework/Search/Dynamic/Algorithm.php b/lib/internal/Magento/Framework/Search/Dynamic/Algorithm.php index b84ca42ca898e..07a29e76052fe 100644 --- a/lib/internal/Magento/Framework/Search/Dynamic/Algorithm.php +++ b/lib/internal/Magento/Framework/Search/Dynamic/Algorithm.php @@ -162,6 +162,8 @@ public function setStatistics($min, $max, $standardDeviation, $count) * * @param IntervalInterface $interval * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function calculateSeparators(IntervalInterface $interval) { @@ -258,6 +260,9 @@ protected function getIntervalsNumber() * @param int $quantileNumber should be from 1 to n-1 where n is number of intervals * @param IntervalInterface $interval * @return array|null + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _findValueSeparator($quantileNumber, IntervalInterface $interval) { @@ -418,6 +423,8 @@ protected function _getQuantile($quantileNumber) * @param bool $returnEmpty whether empty result is acceptable * @param null|float $roundingFactor if given, checks for range to contain the factor * @return false|array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _findRoundValue($lowerValue, $upperValue, $returnEmpty = true, $roundingFactor = null) { @@ -547,6 +554,8 @@ protected function _findBestSeparator($quantileNumber, $separators) * @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 30557bf5ca0ea..7d14148db8401 100644 --- a/lib/internal/Magento/Framework/Search/Request/Binder.php +++ b/lib/internal/Magento/Framework/Search/Request/Binder.php @@ -47,6 +47,7 @@ private function processLimits($data, $bindData) * @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 c9751c42e5798..e5194a12b4d16 100644 --- a/lib/internal/Magento/Framework/Search/Request/Cleaner.php +++ b/lib/internal/Magento/Framework/Search/Request/Cleaner.php @@ -64,6 +64,8 @@ public function clean(array $requestData) * @return void * @throws StateException * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ private function cleanQuery($queryName) { @@ -129,6 +131,7 @@ private function cleanAggregations() * @return void * @throws StateException * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ private function cleanFilter($filterName) { diff --git a/lib/internal/Magento/Framework/Session/Config.php b/lib/internal/Magento/Framework/Session/Config.php index 33a8c2f7a62e0..f40ac7c0eee59 100644 --- a/lib/internal/Magento/Framework/Session/Config.php +++ b/lib/internal/Magento/Framework/Session/Config.php @@ -109,6 +109,7 @@ class Config implements ConfigInterface * @param DeploymentConfig $deploymentConfig * @param string $scopeType * @param string $lifetimePath + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function __construct( \Magento\Framework\ValidatorFactory $validatorFactory, @@ -405,6 +406,7 @@ public function setCookieSecure($cookieSecure) * Get session.cookie_secure * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCookieSecure() { @@ -427,6 +429,7 @@ public function setCookieHttpOnly($cookieHttpOnly) * Get session.cookie_httponly * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCookieHttpOnly() { @@ -449,6 +452,7 @@ public function setUseCookies($useCookies) * 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 80c170e4af75b..b1e12ead5bc37 100644 --- a/lib/internal/Magento/Framework/Session/Config/ConfigInterface.php +++ b/lib/internal/Magento/Framework/Session/Config/ConfigInterface.php @@ -134,6 +134,7 @@ public function setCookieSecure($cookieSecure); * Get session.cookie_secure * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCookieSecure(); @@ -149,6 +150,7 @@ public function setCookieHttpOnly($cookieHttpOnly); * Get session.cookie_httponly * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCookieHttpOnly(); @@ -164,6 +166,7 @@ public function setUseCookies($useCookies); * 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 f028ae4b21084..667f32f004387 100644 --- a/lib/internal/Magento/Framework/Session/SaveHandler.php +++ b/lib/internal/Magento/Framework/Session/SaveHandler.php @@ -101,6 +101,7 @@ public function destroy($sessionId) * * @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 354b3e0a776fd..a99e710816fbf 100644 --- a/lib/internal/Magento/Framework/Session/SaveHandler/DbTable.php +++ b/lib/internal/Magento/Framework/Session/SaveHandler/DbTable.php @@ -57,6 +57,7 @@ protected function checkConnection() * @param string $savePath ignored * @param string $sessionName ignored * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function open($savePath, $sessionName) { @@ -144,6 +145,7 @@ public function destroy($sessionId) * * @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 fb4172633fe02..95858ec7cd6ea 100644 --- a/lib/internal/Magento/Framework/Session/SessionManager.php +++ b/lib/internal/Magento/Framework/Session/SessionManager.php @@ -342,6 +342,7 @@ public function setSessionId($sessionId) * * @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 371c715ddbea3..0c1b7fe9bde4d 100644 --- a/lib/internal/Magento/Framework/Session/SidResolver.php +++ b/lib/internal/Magento/Framework/Session/SidResolver.php @@ -126,6 +126,7 @@ public function setUseSessionVar($var) * Retrieve use flag session var instead of SID for URL * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseSessionVar() { @@ -148,6 +149,7 @@ public function setUseSessionInUrl($flag = true) * 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 458b6dbaf1852..12a1eaf4df659 100644 --- a/lib/internal/Magento/Framework/Session/SidResolverInterface.php +++ b/lib/internal/Magento/Framework/Session/SidResolverInterface.php @@ -41,6 +41,7 @@ public function setUseSessionVar($var); * Retrieve use flag session var instead of SID for URL * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseSessionVar(); @@ -56,6 +57,7 @@ public function setUseSessionInUrl($flag = true); * 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 58de8ce7a65f5..b257d4a3ac980 100644 --- a/lib/internal/Magento/Framework/Simplexml/Config.php +++ b/lib/internal/Magento/Framework/Simplexml/Config.php @@ -183,6 +183,7 @@ public function setCacheSaved($flag) * 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 568a5dea2111f..e45db3a0d25ca 100644 --- a/lib/internal/Magento/Framework/Simplexml/Element.php +++ b/lib/internal/Magento/Framework/Simplexml/Element.php @@ -26,6 +26,7 @@ class Element extends \SimpleXMLElement * * @param \Magento\Framework\Simplexml\Element $element * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setParent($element) { @@ -58,6 +59,7 @@ public function getParent() * Enter description here... * * @return boolean + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function hasChildren() { @@ -92,6 +94,7 @@ public function getAttribute($name) * @todo param string $path Subset of xpath. Example: "child/grand[@attrName='attrValue']/subGrand" * @param string $path Example: "child/grand@attrName=attrValue/subGrand" (to make it faster without regex) * @return \Magento\Framework\Simplexml\Element + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function descend($path) { @@ -221,6 +224,8 @@ protected function _asArray($isCanonical = false) * @param string $filename * @param int|boolean $level if false * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function asNiceXml($filename = '', $level = 0) { @@ -367,6 +372,8 @@ public function extend($source, $overwrite = false) * @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 69856ef34a8b3..0a21e7a5360eb 100644 --- a/lib/internal/Magento/Framework/Stdlib/ArrayUtils.php +++ b/lib/internal/Magento/Framework/Stdlib/ArrayUtils.php @@ -55,6 +55,8 @@ public function ksortMultibyte(array &$sort, $locale) * @param string $prefix * @param bool $forceSetAll * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function decorateArray($array, $prefix = 'decorated_', $forceSetAll = false) { diff --git a/lib/internal/Magento/Framework/Stdlib/String.php b/lib/internal/Magento/Framework/Stdlib/String.php index ceadc8295d354..cdcd01b0239f8 100644 --- a/lib/internal/Magento/Framework/Stdlib/String.php +++ b/lib/internal/Magento/Framework/Stdlib/String.php @@ -65,6 +65,8 @@ public function splitInjection($str, $length = 50, $needle = '-', $insert = ' ') * @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 73f7ea4648e68..329d69fae5101 100644 --- a/lib/internal/Magento/Framework/System/Dirs.php +++ b/lib/internal/Magento/Framework/System/Dirs.php @@ -9,6 +9,9 @@ class Dirs /** * @param string[]|string $dirname * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ShortMethodName) */ public static function rm($dirname) { @@ -90,6 +93,7 @@ public static function mkdirStrict($path, $recursive = true, $mode = 0777) * @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 901de8bc7ccc4..c5dd0963a7198 100644 --- a/lib/internal/Magento/Framework/System/Ftp.php +++ b/lib/internal/Magento/Framework/System/Ftp.php @@ -332,6 +332,7 @@ public function cdup() * @param int $fileMode FTP_BINARY | FTP_ASCII * @param int $resumeOffset * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function get($localFile, $remoteFile, $fileMode = FTP_BINARY, $resumeOffset = 0) { @@ -426,6 +427,7 @@ public function fileExists($path, $excludeIfIsDir = true) * @param string $dir * @param bool $recursive * @return array + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function ls($dir = "/", $recursive = false) { diff --git a/lib/internal/Magento/Framework/Translate/Locale/Resolver/Plugin.php b/lib/internal/Magento/Framework/Translate/Locale/Resolver/Plugin.php index 353b7fc01ee62..d9ea8e107cd01 100644 --- a/lib/internal/Magento/Framework/Translate/Locale/Resolver/Plugin.php +++ b/lib/internal/Magento/Framework/Translate/Locale/Resolver/Plugin.php @@ -26,6 +26,7 @@ public function __construct(\Magento\Framework\TranslateInterface $translate) * @param \Magento\Framework\Locale\ResolverInterface $subject * @param string|null $localeCode * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterEmulate(\Magento\Framework\Locale\ResolverInterface $subject, $localeCode) { @@ -36,6 +37,7 @@ public function afterEmulate(\Magento\Framework\Locale\ResolverInterface $subjec * @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 e2eaff82e8fae..7b4b6baedab04 100644 --- a/lib/internal/Magento/Framework/Url.php +++ b/lib/internal/Magento/Framework/Url.php @@ -52,6 +52,7 @@ * - F: host_url * - G: route_path * - H: route_url + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) */ class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInterface { @@ -158,6 +159,7 @@ class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInt * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param string $scopeType * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Route\ConfigInterface $routeConfig, @@ -229,6 +231,7 @@ public function setUseSession($useSession) * Retrieve use session rule * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseSession() { @@ -425,6 +428,7 @@ public function getBaseUrl($params = []) * * @param string $data * @return \Magento\Framework\UrlInterface + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _setRoutePath($data) { @@ -505,6 +509,7 @@ protected function _getActionPath() * * @param array $routeParams * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _getRoutePath($routeParams = []) { @@ -762,6 +767,8 @@ protected function _getFragment() * @param string|null $routePath * @param array|null $routeParams * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getUrl($routePath = null, $routeParams = null) { diff --git a/lib/internal/Magento/Framework/UrlInterface.php b/lib/internal/Magento/Framework/UrlInterface.php index e93f69e7e00de..c8a8aa866eba0 100644 --- a/lib/internal/Magento/Framework/UrlInterface.php +++ b/lib/internal/Magento/Framework/UrlInterface.php @@ -48,6 +48,7 @@ interface UrlInterface * Retrieve use session rule * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseSession(); diff --git a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php index 56689fe7335ae..4e79e73da35f3 100644 --- a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php +++ b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php @@ -14,6 +14,7 @@ * @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 c39bbc811179c..62963e355bb09 100644 --- a/lib/internal/Magento/Framework/Xml/Generator.php +++ b/lib/internal/Magento/Framework/Xml/Generator.php @@ -67,6 +67,7 @@ protected function _setCurrentDom($node) * @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 e2b960caf6049..9e64428863e5d 100644 --- a/lib/internal/Magento/Framework/Xml/Parser.php +++ b/lib/internal/Magento/Framework/Xml/Parser.php @@ -69,6 +69,8 @@ public function xmlToArray() /** * @param bool $currentNode * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _xmlToArray($currentNode = false) { From 325be96bf87db317600cd70914ea73ad781563d5 Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin Date: Tue, 6 Jan 2015 02:24:41 -0800 Subject: [PATCH 04/24] MAGETWO-31578: Implement tool for adding annotations to existing code - app/code is covered with @SuppressWarnings annotations --- .../AdminNotification/Model/Observer.php | 1 + .../Model/Resource/Inbox.php | 2 ++ .../Authorization/Model/Acl/AclRetriever.php | 1 + app/code/Magento/Backend/App/Action.php | 3 +++ .../Magento/Backend/App/Action/Context.php | 3 +++ app/code/Magento/Backend/App/DefaultPath.php | 1 + .../Magento/Backend/Block/Dashboard/Graph.php | 4 ++++ .../Backend/Block/Dashboard/Orders/Grid.php | 1 + .../Block/Dashboard/Tab/Customers/Most.php | 1 + .../Block/Dashboard/Tab/Customers/Newest.php | 1 + .../Block/Dashboard/Tab/Products/Ordered.php | 1 + .../Block/Dashboard/Tab/Products/Viewed.php | 1 + .../Block/System/Config/Form/Field.php | 1 + .../Block/Widget/Button/ButtonList.php | 1 + .../Backend/Block/Widget/Form/Container.php | 1 + .../Magento/Backend/Block/Widget/Grid.php | 6 ++++++ .../Backend/Block/Widget/Grid/Column.php | 1 + .../Block/Widget/Grid/Column/Filter/Store.php | 2 ++ .../Grid/Column/Renderer/AbstractRenderer.php | 1 + .../Widget/Grid/Column/Renderer/Action.php | 2 ++ .../Widget/Grid/Column/Renderer/Checkbox.php | 2 ++ .../Widget/Grid/Column/Renderer/Options.php | 1 + .../Widget/Grid/Column/Renderer/Store.php | 5 +++++ .../Backend/Block/Widget/Grid/ColumnSet.php | 4 ++++ .../Backend/Block/Widget/Grid/Container.php | 1 + .../Backend/Block/Widget/Grid/Export.php | 1 + .../Backend/Block/Widget/Grid/Extended.php | 10 +++++++++ .../Grid/Massaction/AbstractMassaction.php | 1 + .../Block/Widget/Grid/Massaction/Extended.php | 1 + .../Magento/Backend/Block/Widget/Tabs.php | 4 ++++ .../System/Config/System/Storage/Status.php | 1 + .../Adminhtml/System/Store/EditStore.php | 2 ++ .../Adminhtml/System/Store/Save.php | 1 + .../Magento/Backend/Model/Auth/Session.php | 1 + app/code/Magento/Backend/Model/Config.php | 4 ++++ .../Model/Config/Structure/Converter.php | 2 ++ .../Magento/Backend/Model/Locale/Resolver.php | 1 + .../Magento/Backend/Model/Menu/Config.php | 3 +++ .../Magento/Backend/Model/Session/Quote.php | 2 ++ .../Controller/Adminhtml/Index/Create.php | 1 + .../Controller/Adminhtml/Index/Download.php | 1 + .../Controller/Adminhtml/Index/Rollback.php | 3 +++ app/code/Magento/Backup/Model/Backup.php | 1 + app/code/Magento/Backup/Model/Resource/Db.php | 1 + .../Magento/Backup/Model/Resource/Helper.php | 1 + .../Magento/Bundle/Api/Data/LinkInterface.php | 1 + .../Catalog/Product/Edit/Tab/Attributes.php | 3 +++ .../Product/Edit/Tab/Attributes/Extend.php | 3 +++ .../Adminhtml/Sales/Order/Items/Renderer.php | 2 ++ .../Sales/Order/View/Items/Renderer.php | 2 ++ .../Product/View/Type/Bundle/Option.php | 1 + .../Block/Checkout/Cart/Item/Renderer.php | 2 ++ .../Block/Sales/Order/Items/Renderer.php | 2 ++ .../Initialization/Helper/Plugin/Bundle.php | 1 + .../Magento/Bundle/Model/LinkManagement.php | 5 +++++ app/code/Magento/Bundle/Model/Observer.php | 2 ++ .../Magento/Bundle/Model/OptionRepository.php | 5 +++++ .../Magento/Bundle/Model/Product/Price.php | 7 +++++++ .../Magento/Bundle/Model/Product/Type.php | 11 ++++++++++ .../Bundle/Model/Resource/Indexer/Price.php | 2 ++ .../Sales/Order/Pdf/Items/AbstractItems.php | 4 ++++ .../Sales/Order/Pdf/Items/Creditmemo.php | 3 +++ .../Model/Sales/Order/Pdf/Items/Invoice.php | 3 +++ .../Model/Sales/Order/Pdf/Items/Shipment.php | 3 +++ .../Bundle/Pricing/Adjustment/Calculator.php | 5 +++++ .../Pricing/Price/BundleSelectionPrice.php | 1 + app/code/Magento/Captcha/Model/Observer.php | 1 + .../Api/Data/CategoryTreeInterface.php | 1 + ...uctAttributeMediaGalleryEntryInterface.php | 1 + .../Api/Data/ProductCustomOptionInterface.php | 1 + .../Adminhtml/Category/AbstractCategory.php | 1 + .../Adminhtml/Category/Checkboxes/Tree.php | 1 + .../Adminhtml/Category/Tab/Attributes.php | 2 ++ .../Block/Adminhtml/Category/Tab/Design.php | 3 +++ .../Catalog/Block/Adminhtml/Category/Tabs.php | 1 + .../Catalog/Block/Adminhtml/Category/Tree.php | 3 +++ .../Form/Renderer/Config/DateFieldsOrder.php | 1 + .../Block/Adminhtml/Helper/Form/Wysiwyg.php | 1 + .../Product/Attribute/Edit/Tab/Advanced.php | 1 + .../Product/Attribute/Edit/Tab/Front.php | 1 + .../Product/Attribute/Edit/Tab/Main.php | 4 ++++ .../Adminhtml/Product/Attribute/Grid.php | 3 +++ .../NewAttribute/Product/Attributes.php | 3 +++ .../Adminhtml/Product/Attribute/Set/Main.php | 1 + .../Edit/Action/Attribute/Tab/Attributes.php | 3 +++ .../Adminhtml/Product/Edit/Tab/Attributes.php | 6 ++++++ .../Adminhtml/Product/Edit/Tab/Crosssell.php | 4 ++++ .../Product/Edit/Tab/Options/Option.php | 3 +++ .../Product/Edit/Tab/Options/Popup/Grid.php | 3 +++ .../Adminhtml/Product/Edit/Tab/Price/Tier.php | 1 + .../Adminhtml/Product/Edit/Tab/Related.php | 1 + .../Adminhtml/Product/Edit/Tab/Upsell.php | 1 + .../Block/Adminhtml/Product/Edit/Tabs.php | 4 ++++ .../Product/Frontend/Product/Watermark.php | 2 ++ .../Catalog/Block/Adminhtml/Product/Grid.php | 1 + .../Adminhtml/Product/Helper/Form/Gallery.php | 1 + app/code/Magento/Catalog/Block/Navigation.php | 4 ++++ .../Catalog/Block/Product/AbstractProduct.php | 3 +++ .../Block/Product/Compare/ListCompare.php | 1 + .../Magento/Catalog/Block/Product/Context.php | 1 + .../Catalog/Block/Product/ListProduct.php | 1 + .../Block/Product/ProductList/Toolbar.php | 1 + .../Magento/Catalog/Block/Product/View.php | 1 + .../Catalog/Block/Product/View/Attributes.php | 1 + .../Product/View/Options/Type/Select.php | 3 +++ .../Block/Product/Widget/Html/Pager.php | 1 + .../Block/Product/Widget/NewWidget.php | 1 + .../Magento/Catalog/Block/Rss/Category.php | 2 ++ .../Catalog/Block/Rss/Product/Special.php | 1 + .../Magento/Catalog/Block/Widget/Link.php | 1 + .../Controller/Adminhtml/Category/Edit.php | 2 ++ .../Controller/Adminhtml/Category/Save.php | 3 +++ .../Catalog/Controller/Adminhtml/Product.php | 1 + .../Product/Action/Attribute/Save.php | 4 ++++ .../Adminhtml/Product/Attribute/Edit.php | 1 + .../Adminhtml/Product/Attribute/Save.php | 7 +++++++ .../Product/Initialization/Helper.php | 2 ++ .../Initialization/StockDataFilter.php | 1 + .../Controller/Adminhtml/Product/Save.php | 1 + .../Controller/Adminhtml/Product/Set/Save.php | 1 + .../Controller/Adminhtml/Product/Validate.php | 2 ++ .../Catalog/Controller/Category/View.php | 5 +++++ .../Catalog/Controller/Product/Compare.php | 2 ++ .../Controller/Product/Compare/Index.php | 3 +++ app/code/Magento/Catalog/Helper/Data.php | 5 +++++ app/code/Magento/Catalog/Helper/Image.php | 2 ++ app/code/Magento/Catalog/Helper/Output.php | 1 + app/code/Magento/Catalog/Helper/Product.php | 7 +++++++ .../Catalog/Helper/Product/Compare.php | 3 +++ .../Catalog/Helper/Product/Composite.php | 1 + .../Catalog/Helper/Product/Configuration.php | 2 ++ .../Helper/Product/Edit/Action/Attribute.php | 2 ++ .../Catalog/Helper/Product/Flat/Indexer.php | 3 +++ .../Magento/Catalog/Helper/Product/View.php | 2 ++ .../Magento/Catalog/Model/AbstractModel.php | 1 + .../Model/App/Action/ContextPlugin.php | 1 + app/code/Magento/Catalog/Model/Category.php | 8 +++++++ .../Category/Attribute/Backend/Sortby.php | 2 ++ app/code/Magento/Catalog/Model/Config.php | 2 ++ .../Catalog/Model/Entity/Attribute.php | 2 ++ .../Model/Indexer/Category/AffectCache.php | 1 + .../Indexer/Category/Flat/AbstractAction.php | 1 + .../Category/Product/Plugin/StoreGroup.php | 1 + .../Model/Indexer/Product/AffectCache.php | 1 + .../Indexer/Product/Flat/AbstractAction.php | 2 ++ .../Indexer/Product/Flat/Action/Indexer.php | 2 ++ .../Indexer/Product/Flat/FlatTableBuilder.php | 2 ++ .../Indexer/Product/Price/AbstractAction.php | 2 ++ app/code/Magento/Catalog/Model/Layer.php | 1 + .../Model/Layer/Filter/Dynamic/Auto.php | 3 +++ .../Catalog/Model/Layer/Filter/Price.php | 2 ++ app/code/Magento/Catalog/Model/Product.php | 8 +++++++ .../Magento/Catalog/Model/Product/Action.php | 1 + .../Backend/Groupprice/AbstractGroupprice.php | 6 ++++++ .../Model/Product/Attribute/Backend/Media.php | 10 +++++++++ .../Model/Product/Attribute/Backend/Price.php | 1 + .../Model/Product/Attribute/Repository.php | 6 ++++++ .../Product/Attribute/Source/Inputtype.php | 1 + .../Catalog/Model/Product/Compare/Item.php | 1 + .../Catalog/Model/Product/Gallery/Entry.php | 1 + .../Product/Gallery/GalleryManagement.php | 3 +++ .../Model/Product/GroupPriceManagement.php | 2 ++ .../Magento/Catalog/Model/Product/Image.php | 11 ++++++++++ .../Magento/Catalog/Model/Product/Option.php | 4 ++++ .../Model/Product/Option/Type/Date.php | 5 +++++ .../Model/Product/Option/Type/DefaultType.php | 5 +++++ .../Model/Product/Option/Type/File.php | 2 ++ .../Option/Type/File/ValidatorFile.php | 4 ++++ .../Model/Product/Option/Validator/Select.php | 2 ++ .../Catalog/Model/Product/PriceModifier.php | 1 + .../Model/Product/TierPriceManagement.php | 3 +++ .../Model/Product/Type/AbstractType.php | 21 +++++++++++++++++++ .../Catalog/Model/Product/Type/Price.php | 4 ++++ .../Magento/Catalog/Model/Product/Url.php | 2 ++ .../Catalog/Model/Product/Validator.php | 1 + .../Catalog/Model/ProductRepository.php | 3 +++ .../Model/Resource/AbstractResource.php | 4 ++++ .../Catalog/Model/Resource/Category.php | 5 +++++ .../Model/Resource/Category/Collection.php | 2 ++ .../Catalog/Model/Resource/Category/Tree.php | 8 +++++++ .../Catalog/Model/Resource/Eav/Attribute.php | 5 +++++ .../Magento/Catalog/Model/Resource/Helper.php | 1 + .../Catalog/Model/Resource/Product.php | 2 ++ .../Model/Resource/Product/Collection.php | 13 ++++++++++++ .../Product/Compare/Item/Collection.php | 1 + .../Product/Indexer/Price/DefaultPrice.php | 3 +++ .../Catalog/Model/Resource/Product/Link.php | 1 + .../Catalog/Model/Resource/Product/Option.php | 3 +++ .../Model/Resource/Product/Option/Value.php | 3 +++ .../Product/Option/Value/Collection.php | 1 + .../Magento/Catalog/Model/Resource/Setup.php | 1 + .../Magento/Catalog/Model/Resource/Url.php | 2 ++ .../Backend/Catalog/Url/Rewrite/Suffix.php | 4 ++++ .../Catalog/Pricing/Price/TierPrice.php | 1 + .../Catalog/Pricing/Render/PriceBox.php | 1 + .../Model/Export/Product.php | 8 +++++++ .../Model/Import/Product.php | 18 ++++++++++++++++ .../Model/Import/Product/Option.php | 2 ++ .../Import/Product/Type/AbstractType.php | 5 +++++ .../Api/Data/StockItemInterface.php | 12 +++++++++++ .../Api/StockConfigurationInterface.php | 2 ++ .../Magento/CatalogInventory/Helper/Stock.php | 1 + .../Model/Adminhtml/Stock/Item.php | 2 ++ .../CatalogInventory/Model/Configuration.php | 2 ++ .../CatalogInventory/Model/Observer.php | 1 + .../Model/Quote/Item/QuantityValidator.php | 3 +++ .../Initializer/StockItem.php | 2 ++ .../Resource/Indexer/Stock/DefaultStock.php | 2 ++ .../CatalogInventory/Model/Stock/Item.php | 15 +++++++++++++ .../Model/Stock/StockItemRepository.php | 2 ++ .../Model/Stock/StockRepository.php | 1 + .../Model/Stock/StockStatusRepository.php | 1 + .../CatalogInventory/Model/StockIndex.php | 2 ++ .../Model/StockManagement.php | 1 + .../Model/StockRegistryProvider.php | 1 + .../Model/StockStateProvider.php | 5 +++++ .../Promo/Catalog/Edit/Tab/Actions.php | 1 + .../Adminhtml/Promo/Catalog/Edit/Tab/Main.php | 1 + .../Adminhtml/Promo/Catalog/Save.php | 1 + .../Model/Indexer/IndexBuilder.php | 10 +++++++++ .../Magento/CatalogRule/Model/Observer.php | 3 +++ .../CatalogRule/Model/Resource/Rule.php | 1 + app/code/Magento/CatalogRule/Model/Rule.php | 4 ++++ .../Mysql/Aggregation/DataProvider.php | 3 +++ .../Adapter/Mysql/Dynamic/DataProvider.php | 3 +++ .../Adapter/Mysql/Filter/Preprocessor.php | 1 + .../Magento/CatalogSearch/Model/Advanced.php | 6 ++++++ .../Model/Indexer/Fulltext/Action/Full.php | 9 ++++++++ .../Model/Layer/Filter/Decimal.php | 1 + .../Model/Layer/Filter/Price.php | 2 ++ .../CatalogSearch/Model/Resource/Advanced.php | 3 +++ .../Model/Resource/Advanced/Collection.php | 2 ++ .../Model/Resource/Fulltext/Collection.php | 1 + .../Model/Resource/Search/Collection.php | 3 +++ .../Model/Search/RequestGenerator.php | 1 + .../Block/Product/ProductsList.php | 2 ++ .../Model/Rule/Condition/Product.php | 1 + app/code/Magento/Centinel/Model/Config.php | 2 ++ app/code/Magento/Centinel/Model/Service.php | 1 + .../Centinel/Model/State/Mastercard.php | 3 +++ .../Magento/Centinel/Model/State/Visa.php | 4 ++++ app/code/Magento/Checkout/Block/Cart.php | 2 ++ .../Checkout/Block/Cart/Item/Renderer.php | 1 + .../Magento/Checkout/Block/Cart/Shipping.php | 2 ++ .../Magento/Checkout/Block/Cart/Sidebar.php | 2 ++ app/code/Magento/Checkout/Block/Onepage.php | 1 + .../Block/Onepage/AbstractOnepage.php | 2 ++ .../Checkout/Block/Onepage/Billing.php | 2 ++ .../Magento/Checkout/Block/Onepage/Login.php | 2 ++ .../Checkout/Block/Onepage/Shipping.php | 2 ++ .../Onepage/Shipping/Method/Available.php | 2 ++ .../Magento/Checkout/Block/Total/Nominal.php | 1 + .../Magento/Checkout/Controller/Cart/Add.php | 1 + .../Checkout/Controller/Cart/CouponPost.php | 2 ++ .../Controller/Cart/UpdateItemOptions.php | 2 ++ .../Magento/Checkout/Controller/Onepage.php | 4 ++++ .../Checkout/Controller/Onepage/SaveOrder.php | 2 ++ .../Controller/Onepage/SavePayment.php | 1 + app/code/Magento/Checkout/Helper/Cart.php | 2 ++ app/code/Magento/Checkout/Helper/Data.php | 3 +++ app/code/Magento/Checkout/Model/Cart.php | 6 ++++++ app/code/Magento/Checkout/Model/Session.php | 6 ++++++ .../Magento/Checkout/Model/Type/Onepage.php | 13 ++++++++++++ .../Checkout/Service/V1/Cart/ReadService.php | 1 + .../Service/V1/Data/Cart/Customer.php | 1 + .../Service/V1/Data/Cart/ShippingMethod.php | 1 + .../Checkout/Service/V1/Data/CartMapper.php | 1 + .../Block/Adminhtml/Agreement/Edit/Form.php | 1 + .../Block/Adminhtml/Agreement/Grid.php | 1 + .../Controller/Adminhtml/Agreement/Edit.php | 1 + .../Block/Adminhtml/Page/Edit/Tab/Main.php | 1 + .../Magento/Cms/Block/Adminhtml/Page/Grid.php | 1 + .../Cms/Controller/Adminhtml/Block/Edit.php | 1 + .../Cms/Controller/Adminhtml/Page/Edit.php | 1 + .../Magento/Cms/Controller/Index/Index.php | 1 + app/code/Magento/Cms/Helper/Page.php | 3 +++ app/code/Magento/Cms/Model/Resource/Block.php | 1 + .../Cms/Model/Resource/CmsCriteriaMapper.php | 1 + .../Cms/Model/Wysiwyg/Images/Storage.php | 4 ++++ .../Attribute/Edit/Tab/Variations/Main.php | 3 +++ app/code/Magento/Core/App/Router/Base.php | 9 ++++++++ app/code/Magento/Core/Model/File/Storage.php | 4 ++++ .../Core/Model/File/Storage/Database.php | 1 + .../Model/File/Storage/Directory/Database.php | 1 + .../Magento/Core/Model/File/Storage/File.php | 1 + .../Magento/Core/Model/File/Storage/Flag.php | 1 + .../Model/File/Validator/AvailablePath.php | 3 +++ app/code/Magento/Core/Model/Layout/Merge.php | 3 +++ app/code/Magento/Core/Model/Observer.php | 1 + .../Magento/Core/Model/Resource/Design.php | 2 ++ .../Core/Model/Url/RouteParamsResolver.php | 2 ++ .../Backend/Config/Structure/Converter.php | 1 + app/code/Magento/Cron/Model/Observer.php | 6 ++++++ app/code/Magento/Cron/Model/Schedule.php | 2 ++ .../Model/System/Currencysymbol.php | 2 ++ .../Block/Adminhtml/Edit/Tab/Addresses.php | 1 + .../Block/Adminhtml/Edit/Tab/Reviews.php | 3 +++ app/code/Magento/Customer/Helper/Address.php | 1 + app/code/Magento/Customer/Model/Address.php | 2 ++ .../Model/Address/AbstractAddress.php | 5 +++++ .../Model/App/Action/ContextPlugin.php | 1 + app/code/Magento/Customer/Model/Customer.php | 7 +++++++ app/code/Magento/Customer/Model/Group.php | 1 + .../Model/Metadata/Form/AbstractData.php | 6 ++++++ .../Customer/Model/Metadata/Form/Date.php | 2 ++ .../Customer/Model/Metadata/Form/File.php | 7 +++++++ .../Customer/Model/Metadata/Form/Image.php | 2 ++ .../Model/Metadata/Form/Multiline.php | 1 + .../Customer/Model/Metadata/Form/Text.php | 2 ++ app/code/Magento/Customer/Model/Observer.php | 1 + .../Customer/Model/Renderer/Region.php | 2 ++ .../Model/Resource/AddressRepository.php | 3 +++ .../Customer/Model/Resource/Customer.php | 3 +++ .../Model/Resource/CustomerRepository.php | 3 +++ .../Magento/Customer/Model/Resource/Setup.php | 3 +++ app/code/Magento/Customer/Model/Session.php | 2 ++ .../Model/Export/Address.php | 4 ++++ .../Model/Import/AbstractCustomer.php | 2 ++ .../Model/Import/Address.php | 10 +++++++++ .../Model/Import/Customer.php | 9 ++++++++ .../Adminhtml/Editor/Toolbar/Buttons/Edit.php | 1 + .../Adminhtml/Editor/Toolbar/Buttons/Save.php | 1 + .../Magento/DesignEditor/Model/Observer.php | 1 + .../DesignEditor/Model/Url/NavigationMode.php | 1 + app/code/Magento/Dhl/Model/Carrier.php | 20 ++++++++++++++++++ app/code/Magento/Directory/Model/Currency.php | 4 ++++ app/code/Magento/Directory/Model/Observer.php | 1 + .../Model/Resource/Country/Collection.php | 1 + .../Directory/Model/Resource/Currency.php | 1 + .../Product/Edit/Tab/Downloadable/Links.php | 6 ++++++ .../Product/Edit/Tab/Downloadable/Samples.php | 1 + .../Block/Catalog/Product/Links.php | 4 ++++ .../Block/Catalog/Product/Samples.php | 1 + .../Block/Checkout/Cart/Item/Renderer.php | 1 + .../Downloadable/Block/Checkout/Success.php | 1 + .../Block/Customer/Products/ListProducts.php | 1 + .../Downloadable/Controller/Download/Link.php | 4 ++++ .../Controller/Download/LinkSample.php | 1 + .../Controller/Download/Sample.php | 1 + app/code/Magento/Downloadable/Helper/Data.php | 1 + .../Magento/Downloadable/Helper/Download.php | 2 ++ .../Magento/Downloadable/Model/Observer.php | 5 +++++ .../Downloadable/Model/Product/Type.php | 8 +++++++ .../Downloadable/Model/Resource/Link.php | 1 + .../Sales/Order/Pdf/Items/AbstractItems.php | 2 ++ .../Sales/Order/Pdf/Items/Creditmemo.php | 1 + .../Model/Sales/Order/Pdf/Items/Invoice.php | 2 ++ .../Eav/Api/Data/AttributeInterface.php | 1 + .../Attribute/Edit/Main/AbstractMain.php | 1 + .../Eav/Model/Attribute/Data/AbstractData.php | 4 ++++ .../Magento/Eav/Model/Attribute/Data/Date.php | 2 ++ .../Magento/Eav/Model/Attribute/Data/File.php | 4 ++++ .../Eav/Model/Attribute/Data/Image.php | 2 ++ .../Magento/Eav/Model/Attribute/Data/Text.php | 2 ++ .../Magento/Eav/Model/AttributeRepository.php | 3 +++ .../Eav/Model/AttributeSetRepository.php | 3 +++ app/code/Magento/Eav/Model/Config.php | 5 +++++ .../Eav/Model/Entity/AbstractEntity.php | 18 ++++++++++++++++ .../Magento/Eav/Model/Entity/Attribute.php | 6 ++++++ .../Entity/Attribute/AbstractAttribute.php | 8 +++++++ .../Attribute/Backend/AbstractBackend.php | 2 ++ .../Eav/Model/Entity/Attribute/Set.php | 7 +++++++ .../Attribute/Source/AbstractSource.php | 3 +++ .../Entity/Collection/AbstractCollection.php | 12 +++++++++++ app/code/Magento/Eav/Model/Entity/Setup.php | 6 ++++++ .../Eav/Model/Entity/Setup/Context.php | 1 + app/code/Magento/Eav/Model/Form.php | 3 +++ .../Magento/Eav/Model/Resource/Attribute.php | 1 + .../Eav/Model/Resource/Entity/Attribute.php | 1 + .../Eav/Model/Resource/Form/Fieldset.php | 2 ++ app/code/Magento/Fedex/Model/Carrier.php | 14 +++++++++++++ .../GiftMessage/Block/Message/Inline.php | 2 ++ .../Magento/GiftMessage/Helper/Message.php | 5 +++++ .../GiftMessage/Model/GiftMessageManager.php | 1 + app/code/Magento/GiftMessage/Model/Save.php | 2 ++ .../Category/Edit/Tab/Googleoptimizer.php | 3 +++ .../Block/Adminhtml/Types/Edit/Form.php | 1 + .../Adminhtml/Googleshopping/Types/Save.php | 1 + .../Magento/GoogleShopping/Helper/Data.php | 1 + .../GoogleShopping/Model/Attribute.php | 1 + .../Model/Attribute/ContentLanguage.php | 1 + .../Model/Attribute/DefaultAttribute.php | 3 +++ .../Model/Attribute/Destinations.php | 1 + .../Model/Attribute/GoogleProductCategory.php | 1 + .../Model/Attribute/ImageLink.php | 1 + .../GoogleShopping/Model/Attribute/Link.php | 1 + .../Model/Attribute/ProductType.php | 1 + .../Attribute/SalePriceEffectiveDate.php | 2 ++ .../Model/Attribute/TargetCountry.php | 1 + .../GoogleShopping/Model/Attribute/Tax.php | 2 ++ .../Magento/GoogleShopping/Model/Config.php | 3 +++ .../GoogleShopping/Model/MassOperations.php | 6 ++++++ .../Magento/GoogleShopping/Model/Observer.php | 1 + .../Model/Resource/Attribute/Collection.php | 1 + .../Magento/GoogleShopping/Model/Type.php | 2 ++ .../Block/Adminhtml/Export/Filter.php | 2 ++ .../Model/Export/AbstractEntity.php | 2 ++ .../Model/Export/Adapter/AbstractAdapter.php | 1 + .../Model/Export/Entity/AbstractEav.php | 2 ++ .../Model/Export/Entity/AbstractEntity.php | 3 +++ .../Magento/ImportExport/Model/Import.php | 2 ++ .../Model/Import/AbstractEntity.php | 6 ++++++ .../Model/Import/Entity/AbstractEav.php | 2 ++ .../Model/Import/Entity/AbstractEntity.php | 5 +++++ .../Model/Processor/InvalidateCache.php | 1 + app/code/Magento/Log/Model/Aggregation.php | 3 +++ app/code/Magento/Log/Model/Cron.php | 1 + app/code/Magento/Log/Model/Resource/Log.php | 1 + .../Log/Model/Resource/Visitor/Collection.php | 1 + .../Log/Model/Resource/Visitor/Online.php | 1 + app/code/Magento/Log/Model/Visitor.php | 1 + .../Multishipping/Block/Checkout/Overview.php | 1 + .../Multishipping/Controller/Checkout.php | 3 +++ .../Controller/Checkout/OverviewPost.php | 1 + .../Model/Checkout/Type/Multishipping.php | 9 ++++++++ .../Checkout/Type/Multishipping/State.php | 1 + .../Newsletter/Block/Adminhtml/Problem.php | 2 ++ .../Newsletter/Block/Adminhtml/Queue/Edit.php | 5 +++++ .../Block/Adminhtml/Queue/Edit/Form.php | 3 +++ .../Block/Adminhtml/Queue/Preview/Form.php | 1 + .../Block/Adminhtml/Template/Edit.php | 3 +++ .../Block/Adminhtml/Template/Edit/Form.php | 2 ++ .../Block/Adminhtml/Template/Preview/Form.php | 1 + .../Controller/Adminhtml/Queue/Save.php | 1 + app/code/Magento/Newsletter/Model/Queue.php | 4 ++++ .../Model/Resource/Subscriber/Collection.php | 1 + .../Magento/Newsletter/Model/Subscriber.php | 1 + .../Magento/Newsletter/Model/Template.php | 3 +++ .../Model/Carrier/Flatrate.php | 2 ++ .../OfflineShipping/Model/Carrier/Pickup.php | 1 + .../Model/Carrier/Tablerate.php | 4 ++++ .../Model/Quote/Freeshipping.php | 1 + .../Model/Resource/Carrier/Tablerate.php | 8 +++++++ .../App/FrontController/BuiltinPlugin.php | 1 + .../App/FrontController/VarnishPlugin.php | 1 + .../Model/Controller/Result/BuiltinPlugin.php | 1 + app/code/Magento/Payment/Block/Form/Cc.php | 1 + app/code/Magento/Payment/Block/Info.php | 1 + app/code/Magento/Payment/Helper/Data.php | 3 +++ .../Payment/Model/Method/AbstractMethod.php | 12 +++++++++++ app/code/Magento/Persistent/Helper/Data.php | 2 ++ .../Model/Observer/ClearExpiredCronJob.php | 1 + .../Observer/CustomerAuthenticatedEvent.php | 1 + .../Persistent/Model/Observer/Session.php | 1 + .../Model/Observer/SetLoadPersistentQuote.php | 1 + app/code/Magento/Persistent/Model/Session.php | 2 ++ app/code/Magento/ProductAlert/Model/Email.php | 4 ++++ .../Magento/ProductAlert/Model/Observer.php | 6 ++++++ .../Model/Resource/AbstractResource.php | 1 + .../Adminhtml/Config/Form/Field/YtdStart.php | 1 + .../Reports/Block/Adminhtml/Filter/Form.php | 1 + .../Magento/Reports/Block/Adminhtml/Grid.php | 4 ++++ .../Block/Adminhtml/Grid/AbstractGrid.php | 3 +++ .../Block/Adminhtml/Product/Viewed/Grid.php | 1 + .../Adminhtml/Sales/Bestsellers/Grid.php | 1 + .../Block/Adminhtml/Sales/Coupons/Grid.php | 2 ++ .../Block/Adminhtml/Sales/Invoiced/Grid.php | 1 + .../Block/Adminhtml/Sales/Refunded/Grid.php | 1 + .../Block/Adminhtml/Sales/Sales/Grid.php | 2 ++ .../Block/Adminhtml/Sales/Shipping/Grid.php | 1 + .../Block/Adminhtml/Sales/Tax/Grid.php | 2 ++ .../Adminhtml/Shopcart/Abandoned/Grid.php | 2 ++ .../Adminhtml/Shopcart/Customer/Grid.php | 1 + .../Block/Adminhtml/Shopcart/Product/Grid.php | 1 + .../Controller/Adminhtml/Report/Sales.php | 3 +++ app/code/Magento/Reports/Helper/Data.php | 1 + .../Magento/Reports/Model/Event/Observer.php | 4 ++++ app/code/Magento/Reports/Model/Item.php | 1 + .../Model/Product/Index/AbstractIndex.php | 1 + .../Reports/Model/Product/Index/Compared.php | 1 + .../Summary/Collection/AbstractCollection.php | 2 ++ .../Magento/Reports/Model/Resource/Event.php | 2 ++ .../Model/Resource/Order/Collection.php | 5 +++++ .../Model/Resource/Product/Collection.php | 3 +++ .../Index/Collection/AbstractCollection.php | 3 +++ .../Resource/Product/Lowstock/Collection.php | 3 +++ .../Model/Resource/Report/AbstractReport.php | 2 ++ .../Model/Resource/Report/Product/Viewed.php | 1 + .../Report/Product/Viewed/Collection.php | 6 ++++++ .../Resource/Review/Customer/Collection.php | 1 + .../Resource/Shopcart/Product/Collection.php | 1 + app/code/Magento/Reports/Model/Totals.php | 2 ++ .../Review/Block/Adminhtml/Add/Form.php | 1 + .../Magento/Review/Block/Adminhtml/Edit.php | 1 + .../Review/Block/Adminhtml/Edit/Form.php | 1 + .../Magento/Review/Block/Adminhtml/Grid.php | 1 + .../Adminhtml/Product/Edit/Tab/Reviews.php | 3 +++ .../Review/Block/Adminhtml/Product/Grid.php | 1 + .../Block/Adminhtml/Rating/Detailed.php | 1 + .../Block/Adminhtml/Rating/Edit/Tab/Form.php | 3 +++ app/code/Magento/Review/Block/Form.php | 2 ++ .../Magento/Review/Block/Product/View.php | 2 ++ .../Controller/Adminhtml/Product/Save.php | 1 + .../Magento/Review/Controller/Product.php | 2 ++ .../Review/Controller/Product/Post.php | 1 + app/code/Magento/Review/Helper/Data.php | 1 + .../Magento/Review/Model/Resource/Rating.php | 1 + .../Resource/Review/Product/Collection.php | 2 ++ app/code/Magento/Review/Model/Review.php | 2 ++ app/code/Magento/Rule/Model/AbstractModel.php | 4 ++++ .../Rule/Model/Action/AbstractAction.php | 1 + .../Model/Condition/AbstractCondition.php | 9 ++++++++ .../Magento/Rule/Model/Condition/Combine.php | 1 + .../Condition/Product/AbstractProduct.php | 9 ++++++++ .../Rule/Model/Condition/Sql/Builder.php | 1 + .../Block/Adminhtml/Order/Address/Form.php | 2 ++ .../Adminhtml/Order/Create/AbstractCreate.php | 1 + .../Order/Create/Billing/Address.php | 1 + .../Block/Adminhtml/Order/Create/Form.php | 1 + .../Order/Create/Form/AbstractForm.php | 2 ++ .../Adminhtml/Order/Create/Form/Account.php | 1 + .../Adminhtml/Order/Create/Form/Address.php | 1 + .../Adminhtml/Order/Create/Items/Grid.php | 3 +++ .../Order/Create/Shipping/Address.php | 4 ++++ .../Order/Create/Sidebar/AbstractSidebar.php | 2 ++ .../Block/Adminhtml/Order/Create/Totals.php | 1 + .../Order/Create/Totals/Discount.php | 1 + .../Order/Create/Totals/Grandtotal.php | 1 + .../Order/Create/Totals/Shipping.php | 1 + .../Order/Create/Totals/Subtotal.php | 1 + .../Adminhtml/Order/Create/Totals/Tax.php | 1 + .../Adminhtml/Order/Invoice/Create/Items.php | 1 + .../Block/Adminhtml/Order/Invoice/View.php | 2 ++ .../Adminhtml/Order/Status/Edit/Form.php | 1 + .../Sales/Block/Adminhtml/Order/View.php | 3 +++ .../Block/Adminhtml/Report/Filter/Form.php | 1 + .../Adminhtml/Report/Filter/Form/Coupon.php | 1 + .../Adminhtml/Report/Filter/Form/Order.php | 2 ++ .../Config/Form/Fieldset/Order/Statuses.php | 1 + .../Sales/Block/Items/AbstractItems.php | 3 +++ .../Order/Item/Renderer/DefaultRenderer.php | 1 + app/code/Magento/Sales/Block/Order/Totals.php | 1 + .../Sales/Block/Status/Grid/Column/State.php | 1 + .../Block/Status/Grid/Column/Unassign.php | 1 + .../Creditmemo/AbstractCreditmemo/View.php | 1 + .../Sales/Controller/Adminhtml/Order.php | 2 ++ .../Controller/Adminhtml/Order/Create.php | 4 ++++ .../Adminhtml/Order/Create/Save.php | 1 + .../Adminhtml/Order/Creditmemo/Save.php | 2 ++ .../Adminhtml/Order/CreditmemoLoader.php | 2 ++ .../Adminhtml/Order/Invoice/Save.php | 3 +++ .../Controller/Adminhtml/Order/Pdfdocs.php | 1 + .../Shipment/AbstractShipment/View.php | 1 + .../Download/DownloadCustomOption.php | 2 ++ .../Order/Plugin/Authentication.php | 1 + app/code/Magento/Sales/Helper/Guest.php | 1 + .../Magento/Sales/Model/AdminOrder/Create.php | 18 ++++++++++++++++ .../Magento/Sales/Model/Config/Converter.php | 1 + .../Magento/Sales/Model/Convert/Order.php | 3 +++ .../Magento/Sales/Model/Convert/Quote.php | 1 + app/code/Magento/Sales/Model/Order.php | 12 +++++++++++ .../Magento/Sales/Model/Order/Address.php | 2 ++ .../Magento/Sales/Model/Order/Builder.php | 3 +++ .../Magento/Sales/Model/Order/Creditmemo.php | 5 +++++ .../Sales/Model/Order/Creditmemo/Comment.php | 1 + .../Order/Creditmemo/Total/AbstractTotal.php | 1 + .../Magento/Sales/Model/Order/Customer.php | 1 + .../Magento/Sales/Model/Order/Invoice.php | 5 +++++ .../Sales/Model/Order/Invoice/Comment.php | 1 + .../Order/Invoice/Total/AbstractTotal.php | 1 + .../Sales/Model/Order/Invoice/Total/Tax.php | 1 + app/code/Magento/Sales/Model/Order/Item.php | 8 +++++++ .../Magento/Sales/Model/Order/Payment.php | 14 +++++++++++++ .../Sales/Model/Order/Payment/Transaction.php | 8 +++++++ .../Sales/Model/Order/Pdf/AbstractPdf.php | 10 +++++++++ .../Sales/Model/Order/Pdf/Creditmemo.php | 1 + .../Magento/Sales/Model/Order/Pdf/Invoice.php | 1 + .../Model/Order/Pdf/Items/AbstractItems.php | 1 + .../Sales/Model/Order/Pdf/Shipment.php | 1 + .../Model/Order/Pdf/Total/DefaultTotal.php | 1 + .../Magento/Sales/Model/Order/Shipment.php | 2 ++ .../Sales/Model/Order/Shipment/Comment.php | 1 + .../Sales/Model/Order/Shipment/Track.php | 1 + .../Sales/Model/Order/Status/History.php | 1 + app/code/Magento/Sales/Model/Quote.php | 15 +++++++++++++ .../Magento/Sales/Model/Quote/Address.php | 11 ++++++++++ .../Quote/Address/Total/AbstractTotal.php | 3 +++ .../Model/Quote/Address/Total/Collector.php | 1 + .../Model/Quote/Address/Total/Discount.php | 1 + .../Model/Quote/Address/Total/Shipping.php | 3 +++ .../Sales/Model/Quote/Address/Total/Tax.php | 3 +++ app/code/Magento/Sales/Model/Quote/Item.php | 1 + .../Sales/Model/Quote/Item/AbstractItem.php | 1 + .../Sales/Model/Quote/Item/Updater.php | 1 + .../Magento/Sales/Model/Quote/Payment.php | 1 + .../QuoteRepository/Plugin/Authorization.php | 2 ++ .../Collection/AbstractCollection.php | 1 + .../Magento/Sales/Model/Resource/Entity.php | 1 + .../Model/Resource/Order/Grid/Collection.php | 1 + .../Model/Resource/Order/Handler/State.php | 2 ++ .../Resource/Order/Plugin/Authorization.php | 1 + .../Sales/Model/Resource/Order/Status.php | 1 + .../Quote/Address/Attribute/Backend.php | 1 + .../Quote/Address/Attribute/Frontend.php | 1 + .../Model/Resource/Quote/Item/Collection.php | 1 + .../Model/Resource/Report/Bestsellers.php | 2 ++ .../Report/Bestsellers/Collection.php | 3 +++ .../Sales/Model/Resource/Report/Invoiced.php | 1 + .../Model/Resource/Report/Order/Createdat.php | 2 ++ .../Sales/Model/Resource/Report/Refunded.php | 1 + .../Sales/Model/Resource/Report/Shipping.php | 1 + .../Magento/Sales/Model/Resource/Setup.php | 2 ++ .../Magento/Sales/Model/Service/Order.php | 5 +++++ .../Magento/Sales/Model/Service/Quote.php | 4 ++++ .../Promo/Quote/Edit/Tab/Actions.php | 1 + .../Promo/Quote/Edit/Tab/Coupons/Form.php | 1 + .../Adminhtml/Promo/Quote/Edit/Tab/Main.php | 2 ++ .../Controller/Adminhtml/Promo/Quote/Edit.php | 1 + .../Controller/Adminhtml/Promo/Quote/Save.php | 2 ++ app/code/Magento/SalesRule/Model/Observer.php | 4 ++++ .../SalesRule/Model/Quote/Discount.php | 1 + .../Model/Resource/Report/Rule/Createdat.php | 1 + app/code/Magento/SalesRule/Model/Rule.php | 5 +++++ .../Model/Rule/Condition/Product/Found.php | 1 + .../Magento/SalesRule/Model/RulesApplier.php | 1 + app/code/Magento/SalesRule/Model/Utility.php | 3 +++ .../Magento/SalesRule/Model/Validator.php | 3 +++ .../Search/Block/Adminhtml/Dashboard/Last.php | 1 + .../Search/Block/Adminhtml/Dashboard/Top.php | 1 + .../Search/Block/Adminhtml/Term/Edit/Form.php | 1 + .../Search/Controller/Adminhtml/Term/Edit.php | 1 + .../Search/Controller/Adminhtml/Term/Save.php | 1 + app/code/Magento/Search/Helper/Data.php | 1 + app/code/Magento/Search/Model/Query.php | 1 + .../Magento/Search/Model/Resource/Helper.php | 1 + .../Controller/Product/Sendmail.php | 1 + .../Magento/Sendfriend/Model/Observer.php | 1 + .../Sendfriend/Model/Resource/Sendfriend.php | 1 + .../Magento/Sendfriend/Model/Sendfriend.php | 5 +++++ .../Shipping/Block/Adminhtml/View/Form.php | 1 + .../Magento/Shipping/Block/Tracking/Popup.php | 1 + .../Order/Shipment/MassPrintShippingLabel.php | 1 + .../Adminhtml/Order/Shipment/Save.php | 2 ++ .../Model/Carrier/AbstractCarrier.php | 7 +++++++ .../Model/Carrier/AbstractCarrierOnline.php | 6 ++++++ .../Shipping/Model/Order/Pdf/Packaging.php | 7 +++++++ .../Magento/Shipping/Model/Rate/Result.php | 1 + app/code/Magento/Shipping/Model/Shipping.php | 7 +++++++ .../Model/Shipping/LabelGenerator.php | 3 +++ .../Shipping/Model/Shipping/Labels.php | 4 ++++ .../Controller/Adminhtml/Sitemap/Edit.php | 1 + .../Controller/Adminhtml/Sitemap/Save.php | 1 + app/code/Magento/Sitemap/Model/Observer.php | 2 ++ .../Model/Resource/Catalog/Product.php | 1 + app/code/Magento/Sitemap/Model/Sitemap.php | 3 +++ .../Store/App/Action/Plugin/Context.php | 1 + .../Store/Model/Resource/Group/Collection.php | 1 + .../Store/Model/Resource/Store/Collection.php | 1 + .../Model/Resource/Website/Collection.php | 1 + app/code/Magento/Store/Model/Storage/Db.php | 8 +++++++ .../Magento/Store/Model/StorageFactory.php | 3 +++ app/code/Magento/Store/Model/Store.php | 8 +++++++ app/code/Magento/Store/Model/System/Store.php | 4 ++++ app/code/Magento/Store/Model/Website.php | 3 +++ .../Api/Data/QuoteDetailsItemInterface.php | 1 + .../Magento/Tax/Block/Adminhtml/Rate/Form.php | 7 +++++++ .../Tax/Block/Adminhtml/Rule/Edit/Form.php | 3 +++ .../Block/Checkout/Cart/Sidebar/Totals.php | 3 +++ .../Magento/Tax/Block/Sales/Order/Tax.php | 1 + .../Magento/Tax/Controller/Adminhtml/Rule.php | 1 + app/code/Magento/Tax/Helper/Data.php | 4 ++++ app/code/Magento/Tax/Model/Calculation.php | 6 ++++++ .../Model/Calculation/AbstractCalculator.php | 3 +++ .../Magento/Tax/Model/Calculation/Rate.php | 4 ++++ .../Tax/Model/Calculation/RateRepository.php | 3 +++ .../Magento/Tax/Model/Calculation/Rule.php | 1 + .../Tax/Model/Calculation/Rule/Validator.php | 3 +++ app/code/Magento/Tax/Model/Config.php | 6 ++++++ app/code/Magento/Tax/Model/Observer.php | 4 ++++ .../Tax/Model/Resource/Calculation.php | 5 +++++ .../Sales/Total/Quote/CommonTaxCollector.php | 3 +++ .../Tax/Model/Sales/Total/Quote/Tax.php | 3 +++ app/code/Magento/Tax/Model/TaxCalculation.php | 3 +++ .../Magento/Tax/Model/TaxClass/Repository.php | 3 +++ .../Magento/Tax/Model/TaxRuleRepository.php | 3 +++ .../Model/Rate/CsvImportHandler.php | 1 + .../Translation/Model/Inline/Parser.php | 2 ++ .../Translation/Model/Js/DataProvider.php | 1 + .../Magento/Ui/Component/AbstractView.php | 2 ++ .../Magento/Ui/Component/Filter/Type/Date.php | 2 ++ app/code/Magento/Ui/Component/Form.php | 2 ++ .../Form/Element/AbstractFormElement.php | 1 + .../Form/Element/ElementInterface.php | 1 + .../Ui/Component/Form/Element/Radio.php | 1 + .../Ui/Component/Form/Element/Select.php | 1 + .../Magento/Ui/Component/Form/Fieldset.php | 1 + .../Ui/Component/Layout/AbstractStructure.php | 4 ++++ app/code/Magento/Ui/Component/Listing.php | 1 + .../Ui/DataProvider/Config/Converter.php | 3 +++ app/code/Magento/Ui/DataProvider/Manager.php | 1 + app/code/Magento/Ui/DataProvider/Metadata.php | 3 +++ app/code/Magento/Ups/Helper/Config.php | 1 + app/code/Magento/Ups/Model/Carrier.php | 16 ++++++++++++++ .../Model/Config/Source/OriginShipment.php | 1 + .../Ups/Model/Config/Source/Unitofmeasure.php | 1 + .../UrlRewrite/Block/Catalog/Product/Grid.php | 1 + .../UrlRewrite/Block/Cms/Page/Grid.php | 1 + .../User/Controller/Adminhtml/User/Save.php | 2 ++ app/code/Magento/User/Model/Resource/User.php | 1 + .../Tab/General/Shipping/Packaging/Plugin.php | 2 ++ app/code/Magento/Usps/Model/Carrier.php | 19 +++++++++++++++++ app/code/Magento/Weee/Helper/Data.php | 1 + .../Weee/Model/Attribute/Backend/Weee/Tax.php | 1 + app/code/Magento/Weee/Model/Observer.php | 4 ++++ app/code/Magento/Weee/Model/Tax.php | 6 ++++++ .../Weee/Model/Total/Creditmemo/Weee.php | 4 ++++ .../Magento/Weee/Model/Total/Invoice/Weee.php | 3 +++ .../Magento/Weee/Model/Total/Quote/Weee.php | 2 ++ .../Weee/Model/Total/Quote/WeeeTax.php | 2 ++ .../Widget/Block/Adminhtml/Widget/Chooser.php | 1 + .../Widget/Instance/Edit/Tab/Main.php | 1 + .../Widget/Instance/Edit/Tab/Main/Layout.php | 1 + .../Widget/Instance/Edit/Tab/Properties.php | 3 +++ .../Widget/Block/Adminhtml/Widget/Options.php | 2 ++ .../Widget/Model/NamespaceResolver.php | 2 ++ .../Magento/Widget/Model/Template/Filter.php | 2 ++ app/code/Magento/Widget/Model/Widget.php | 2 ++ .../Magento/Widget/Model/Widget/Instance.php | 7 +++++++ .../Magento/Wishlist/Block/AbstractBlock.php | 1 + .../Wishlist/Block/Customer/Sidebar.php | 1 + .../Magento/Wishlist/Controller/Index/Add.php | 3 +++ .../Wishlist/Controller/Index/Cart.php | 5 +++++ .../Controller/Index/DownloadCustomOption.php | 2 ++ .../Wishlist/Controller/Index/Fromcart.php | 1 + .../Wishlist/Controller/Index/Send.php | 6 ++++++ .../Wishlist/Controller/Index/Update.php | 2 ++ .../Wishlist/Controller/WishlistProvider.php | 1 + app/code/Magento/Wishlist/Helper/Data.php | 1 + app/code/Magento/Wishlist/Helper/Rss.php | 4 ++++ app/code/Magento/Wishlist/Model/Item.php | 2 ++ .../Magento/Wishlist/Model/ItemCarrier.php | 6 ++++++ app/code/Magento/Wishlist/Model/Observer.php | 3 +++ .../Model/Resource/Item/Collection.php | 2 ++ .../Model/Resource/Item/Collection/Grid.php | 3 +++ app/code/Magento/Wishlist/Model/Wishlist.php | 6 ++++++ 735 files changed, 1946 insertions(+) diff --git a/app/code/Magento/AdminNotification/Model/Observer.php b/app/code/Magento/AdminNotification/Model/Observer.php index ab7c5de87baa1..6a56cfdfbe5ca 100644 --- a/app/code/Magento/AdminNotification/Model/Observer.php +++ b/app/code/Magento/AdminNotification/Model/Observer.php @@ -38,6 +38,7 @@ public function __construct( * * @param \Magento\Framework\Event\Observer $observer * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function preDispatch(\Magento\Framework\Event\Observer $observer) { diff --git a/app/code/Magento/AdminNotification/Model/Resource/Inbox.php b/app/code/Magento/AdminNotification/Model/Resource/Inbox.php index 9075e97583901..d4db204964691 100644 --- a/app/code/Magento/AdminNotification/Model/Resource/Inbox.php +++ b/app/code/Magento/AdminNotification/Model/Resource/Inbox.php @@ -57,6 +57,7 @@ public function loadLatestNotice(\Magento\AdminNotification\Model\Inbox $object) * * @param \Magento\AdminNotification\Model\Inbox $object * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getNoticeStatus(\Magento\AdminNotification\Model\Inbox $object) { @@ -86,6 +87,7 @@ public function getNoticeStatus(\Magento\AdminNotification\Model\Inbox $object) * @param \Magento\AdminNotification\Model\Inbox $object * @param array $data * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function parse(\Magento\AdminNotification\Model\Inbox $object, array $data) { diff --git a/app/code/Magento/Authorization/Model/Acl/AclRetriever.php b/app/code/Magento/Authorization/Model/Acl/AclRetriever.php index bbe4491d5cf8f..ffe8ee789d6ff 100644 --- a/app/code/Magento/Authorization/Model/Acl/AclRetriever.php +++ b/app/code/Magento/Authorization/Model/Acl/AclRetriever.php @@ -16,6 +16,7 @@ /** * Permission tree retriever + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AclRetriever { diff --git a/app/code/Magento/Backend/App/Action.php b/app/code/Magento/Backend/App/Action.php index 3fca0cbd88cc5..0f35f667440ca 100644 --- a/app/code/Magento/Backend/App/Action.php +++ b/app/code/Magento/Backend/App/Action.php @@ -8,6 +8,9 @@ */ namespace Magento\Backend\App; +/** + * @SuppressWarnings(PHPMD.NumberOfChildren) + */ class Action extends \Magento\Backend\App\AbstractAction { } diff --git a/app/code/Magento/Backend/App/Action/Context.php b/app/code/Magento/Backend/App/Action/Context.php index 400c3574ff963..3cad615401f9c 100644 --- a/app/code/Magento/Backend/App/Action/Context.php +++ b/app/code/Magento/Backend/App/Action/Context.php @@ -6,6 +6,7 @@ /** * Backend Controller context + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Context extends \Magento\Framework\App\Action\Context { @@ -67,6 +68,7 @@ class Context extends \Magento\Framework\App\Action\Context * @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param bool $canUseBaseUrl + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\RequestInterface $request, @@ -135,6 +137,7 @@ public function getBackendUrl() /** * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCanUseBaseUrl() { diff --git a/app/code/Magento/Backend/App/DefaultPath.php b/app/code/Magento/Backend/App/DefaultPath.php index 3b66a0d06559c..2dd5c2a2810c7 100644 --- a/app/code/Magento/Backend/App/DefaultPath.php +++ b/app/code/Magento/Backend/App/DefaultPath.php @@ -15,6 +15,7 @@ class DefaultPath implements \Magento\Framework\App\DefaultPathInterface /** * @param \Magento\Backend\App\ConfigInterface $config + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function __construct(\Magento\Backend\App\ConfigInterface $config) { diff --git a/app/code/Magento/Backend/Block/Dashboard/Graph.php b/app/code/Magento/Backend/Block/Dashboard/Graph.php index 93add0bb0aad3..eaa95f5ff623d 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Graph.php +++ b/app/code/Magento/Backend/Block/Dashboard/Graph.php @@ -185,6 +185,10 @@ public function getAllSeries() * * @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 ab8cc95817305..1ee9d3368b099 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php +++ b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php @@ -8,6 +8,7 @@ * Adminhtml dashboard recent orders grid * * @author Magento Core Team + * @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 823e1d06f72d8..334ef2b0e7643 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php @@ -8,6 +8,7 @@ * Adminhtml dashboard most active buyers * * @author Magento Core Team + * @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 262e590c3a24d..33c6e5305e982 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php @@ -8,6 +8,7 @@ * Adminhtml dashboard most recent customers grid * * @author Magento Core Team + * @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 98d881edbe908..f566daf358b08 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php @@ -8,6 +8,7 @@ * Adminhtml dashboard most ordered products grid * * @author Magento Core Team + * @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 7fdd30ab3deca..665c5de9161b1 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php @@ -8,6 +8,7 @@ * Adminhtml dashboard most viewed products grid * * @author Magento Core Team + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Viewed extends \Magento\Backend\Block\Dashboard\Grid { diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field.php b/app/code/Magento/Backend/Block/System/Config/Form/Field.php index b2cec8e2eab9f..f97740950c7ac 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field.php @@ -13,6 +13,7 @@ /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Field extends \Magento\Backend\Block\Template implements \Magento\Framework\Data\Form\Element\Renderer\RendererInterface { diff --git a/app/code/Magento/Backend/Block/Widget/Button/ButtonList.php b/app/code/Magento/Backend/Block/Widget/Button/ButtonList.php index d65978892ea1f..6c0e46c1cb2b6 100644 --- a/app/code/Magento/Backend/Block/Widget/Button/ButtonList.php +++ b/app/code/Magento/Backend/Block/Widget/Button/ButtonList.php @@ -34,6 +34,7 @@ public function __construct(ItemFactory $itemFactory) * @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 909bd357a7db7..cc924eb6fe040 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Container.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Container.php @@ -8,6 +8,7 @@ * Backend form container block * * @author Magento Core Team + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Container extends \Magento\Backend\Block\Widget\Container { diff --git a/app/code/Magento/Backend/Block/Widget/Grid.php b/app/code/Magento/Backend/Block/Widget/Grid.php index 1d795fd631add..f089a3e0603e2 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid.php +++ b/app/code/Magento/Backend/Block/Widget/Grid.php @@ -9,6 +9,7 @@ * * @method string getRowClickCallback() getRowClickCallback() * @method \Magento\Backend\Block\Widget\Grid setRowClickCallback() setRowClickCallback(string $value) + * @SuppressWarnings(PHPMD.TooManyFields) */ class Grid extends \Magento\Backend\Block\Widget { @@ -145,6 +146,7 @@ public function __construct( /** * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _construct() { @@ -330,6 +332,7 @@ public function getPreparedCollection() * Apply sorting and filtering to collection * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareCollection() { @@ -577,6 +580,7 @@ public function setPagerVisibility($visible = true) * Return visibility of pager * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getPagerVisibility() { @@ -598,6 +602,7 @@ public function setMessageBlockVisibility($visible = true) * Return visibility of message blocks * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getMessageBlockVisibility() { @@ -760,6 +765,7 @@ public function setCountTotals($count = true) * 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 21a64e49faa68..bf6ec395a97f4 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column.php @@ -231,6 +231,7 @@ public function getHeaderCssClass() /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getSortable() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Store.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Store.php index 8cdd868a74409..330510f558b24 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Store.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Store.php @@ -36,6 +36,8 @@ public function __construct( * 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 60ab490595cc0..552e17df9aaac 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php @@ -9,6 +9,7 @@ /** * 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 410f2e3854fe0..33630b4a59abd 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php @@ -115,6 +115,8 @@ protected function _toLinkHtml($action, \Magento\Framework\Object $row) * @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 d18e27bd75ad9..378c7bcedf5d2 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php @@ -69,6 +69,8 @@ protected function _getValues() * * @param \Magento\Framework\Object $row * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function render(\Magento\Framework\Object $row) { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Options.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Options.php index 87a3ab23d8ee4..433dedfd5b79a 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Options.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Options.php @@ -26,6 +26,7 @@ protected function _getOptions() * * @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 ee47da4f0d5f5..e80367cc636eb 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Store.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Store.php @@ -52,6 +52,7 @@ protected function _getStoreModel() * Retrieve 'show all stores label' flag * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ protected function _getShowAllStoresLabelFlag() { @@ -66,6 +67,7 @@ protected function _getShowAllStoresLabelFlag() * Retrieve 'show empty stores label' flag * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ protected function _getShowEmptyStoresLabelFlag() { @@ -81,6 +83,8 @@ protected function _getShowEmptyStoresLabelFlag() * * @param \Magento\Framework\Object $row * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function render(\Magento\Framework\Object $row) { @@ -131,6 +135,7 @@ public function render(\Magento\Framework\Object $row) * * @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 343281001de37..0393419a28279 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/ColumnSet.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/ColumnSet.php @@ -100,6 +100,7 @@ class ColumnSet extends \Magento\Framework\View\Element\Template * @param \Magento\Backend\Model\Widget\Grid\SubTotals $subtotals * @param \Magento\Backend\Model\Widget\Grid\Totals $totals * @param array $data + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, @@ -485,6 +486,7 @@ public function setIsCollapsed($isCollapsed) * Retrieve flag is collapsed * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsCollapsed() { @@ -527,6 +529,7 @@ public function setCountSubTotals($flag = true) * Return count subtotals * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCountSubTotals() { @@ -549,6 +552,7 @@ public function setCountTotals($flag = true) * 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 fc923840eb954..8b034bf6623ea 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Container.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Container.php @@ -8,6 +8,7 @@ * Backend grid container block * * @author Magento Core Team + * @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 248a1bf4027a7..5ec6857e3ab3e 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Export.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Export.php @@ -105,6 +105,7 @@ protected function _getTotals() * 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 611e2d1af9454..642719e3cb57d 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Extended.php @@ -6,6 +6,12 @@ use Magento\Framework\App\Filesystem\DirectoryList; +/** + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.NumberOfChildren) + */ class Extended extends \Magento\Backend\Block\Widget\Grid implements \Magento\Backend\Block\Widget\Grid\ExportInterface { /** @@ -777,6 +783,7 @@ public function setHeadersVisibility($visible = true) * Return visibility of column headers * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getHeadersVisibility() { @@ -798,6 +805,7 @@ public function setFilterVisibility($visible = true) * Return visibility of filter * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getFilterVisibility() { @@ -864,6 +872,7 @@ public function setIsCollapsed($isCollapsed) * Retrieve flag is collapsed * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsCollapsed() { @@ -1242,6 +1251,7 @@ public function setCountSubTotals($flag = true) * 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 cb95460a476b3..a827a3b551a8e 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php @@ -294,6 +294,7 @@ public function removeItem($itemId) * 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 4cba44195ff16..07453f87e3c34 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php @@ -305,6 +305,7 @@ public function removeItem($itemId) * 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 b58495a86ac94..5128c6f412e9e 100644 --- a/app/code/Magento/Backend/Block/Widget/Tabs.php +++ b/app/code/Magento/Backend/Block/Widget/Tabs.php @@ -8,6 +8,7 @@ /** * Tabs block + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Tabs extends \Magento\Backend\Block\Widget { @@ -105,6 +106,7 @@ public function addTabAfter($tabId, $tab, $afterTabId) * @param array|\Magento\Framework\Object|string $tab * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function addTab($tabId, $tab) { @@ -301,6 +303,7 @@ public function canShowTab($tab) /** * @param \Magento\Framework\Object|TabInterface $tab * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getTabIsHidden($tab) { @@ -389,6 +392,7 @@ public function getTabContent($tab) * @param string $tabOneId * @param string $tabTwoId * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function bindShadowTabs($tabOneId, $tabTwoId) { diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Config/System/Storage/Status.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Config/System/Storage/Status.php index fa14e28e5c50e..dba0f827bd8f4 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Config/System/Storage/Status.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Config/System/Storage/Status.php @@ -28,6 +28,7 @@ public function __construct( * Retrieve synchronize process state and it's parameters in json format * * @return \Magento\Framework\Controller\Result\JSON + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Store/EditStore.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Store/EditStore.php index 41ced9589d049..a454c7a7ae669 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Store/EditStore.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Store/EditStore.php @@ -9,6 +9,8 @@ class EditStore extends \Magento\Backend\Controller\Adminhtml\System\Store { /** * @return \Magento\Framework\Controller\ResultInterface + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Store/Save.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Store/Save.php index bf93b4c2558a5..cd4031a15fd27 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Store/Save.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Store/Save.php @@ -10,6 +10,7 @@ class Save extends \Magento\Backend\Controller\Adminhtml\System\Store { /** * @return \Magento\Backend\Model\View\Result\Redirect + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Backend/Model/Auth/Session.php b/app/code/Magento/Backend/Model/Auth/Session.php index b14281e3c1968..3c4f0fd92362e 100644 --- a/app/code/Magento/Backend/Model/Auth/Session.php +++ b/app/code/Magento/Backend/Model/Auth/Session.php @@ -63,6 +63,7 @@ class Session extends \Magento\Framework\Session\SessionManager implements \Mage * @param \Magento\Framework\Acl\Builder $aclBuilder * @param \Magento\Backend\Model\UrlInterface $backendUrl * @param \Magento\Backend\App\ConfigInterface $config + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Request\Http $request, diff --git a/app/code/Magento/Backend/Model/Config.php b/app/code/Magento/Backend/Model/Config.php index 2d6b82c5f73f6..25a2b760aaeb8 100644 --- a/app/code/Magento/Backend/Model/Config.php +++ b/app/code/Magento/Backend/Model/Config.php @@ -9,6 +9,7 @@ * Used to save configuration * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Config extends \Magento\Framework\Object { @@ -178,6 +179,9 @@ public function save() * @param \Magento\Framework\DB\Transaction $saveTransaction * @param \Magento\Framework\DB\Transaction $deleteTransaction * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _processGroup( $groupId, diff --git a/app/code/Magento/Backend/Model/Config/Structure/Converter.php b/app/code/Magento/Backend/Model/Config/Structure/Converter.php index 6430ef2726593..41ab9804c6f9d 100644 --- a/app/code/Magento/Backend/Model/Config/Structure/Converter.php +++ b/app/code/Magento/Backend/Model/Config/Structure/Converter.php @@ -71,6 +71,8 @@ public function convert($source) * * @param \DOMNode $root * @return array|null + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _convertDOMDocument(\DOMNode $root) { diff --git a/app/code/Magento/Backend/Model/Locale/Resolver.php b/app/code/Magento/Backend/Model/Locale/Resolver.php index ce2c51b9049d1..b7b6dda8c4b79 100644 --- a/app/code/Magento/Backend/Model/Locale/Resolver.php +++ b/app/code/Magento/Backend/Model/Locale/Resolver.php @@ -40,6 +40,7 @@ class Resolver extends \Magento\Framework\Locale\Resolver * @param \Magento\Framework\App\RequestInterface $request * @param \Magento\Framework\Locale\Validator $localeValidator * @param null $locale + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, diff --git a/app/code/Magento/Backend/Model/Menu/Config.php b/app/code/Magento/Backend/Model/Menu/Config.php index 19f9c2526a713..2f6251571207e 100644 --- a/app/code/Magento/Backend/Model/Menu/Config.php +++ b/app/code/Magento/Backend/Model/Menu/Config.php @@ -4,6 +4,9 @@ */ namespace Magento\Backend\Model\Menu; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Config { const CACHE_ID = 'backend_menu_config'; diff --git a/app/code/Magento/Backend/Model/Session/Quote.php b/app/code/Magento/Backend/Model/Session/Quote.php index 3b1b7149aed18..2da20fd5cd3a6 100644 --- a/app/code/Magento/Backend/Model/Session/Quote.php +++ b/app/code/Magento/Backend/Model/Session/Quote.php @@ -21,6 +21,7 @@ * @method int getCurrencyId() * @method Quote setOrderId($orderId) * @method int getOrderId() + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Quote extends \Magento\Framework\Session\SessionManager { @@ -86,6 +87,7 @@ class Quote extends \Magento\Framework\Session\SessionManager * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param GroupManagementInterface $groupManagement + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Request\Http $request, diff --git a/app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php b/app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php index d594ed0907050..f1a59c9cdb43a 100644 --- a/app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php +++ b/app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php @@ -14,6 +14,7 @@ class Create extends \Magento\Backup\Controller\Adminhtml\Index * Create backup action * * @return void|\Magento\Backend\App\Action + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php b/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php index e9b22751e442a..5f68a92b9580e 100644 --- a/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php +++ b/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php @@ -13,6 +13,7 @@ class Download extends \Magento\Backup\Controller\Adminhtml\Index * Download backup action * * @return void|\Magento\Backend\App\Action + * @SuppressWarnings(PHPMD.ExitExpression) */ public function execute() { diff --git a/app/code/Magento/Backup/Controller/Adminhtml/Index/Rollback.php b/app/code/Magento/Backup/Controller/Adminhtml/Index/Rollback.php index 20723783b18fa..5c5640fe07a3d 100644 --- a/app/code/Magento/Backup/Controller/Adminhtml/Index/Rollback.php +++ b/app/code/Magento/Backup/Controller/Adminhtml/Index/Rollback.php @@ -14,6 +14,9 @@ class Rollback extends \Magento\Backup\Controller\Adminhtml\Index * Rollback Action * * @return void|\Magento\Backend\App\Action + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function execute() { diff --git a/app/code/Magento/Backup/Model/Backup.php b/app/code/Magento/Backup/Model/Backup.php index 5e0f62ba27ee6..44369629987c1 100644 --- a/app/code/Magento/Backup/Model/Backup.php +++ b/app/code/Magento/Backup/Model/Backup.php @@ -12,6 +12,7 @@ * @method string getPath() * @method string getName() * @method string getTime() + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Backup extends \Magento\Framework\Object implements \Magento\Framework\Backup\Db\BackupInterface { diff --git a/app/code/Magento/Backup/Model/Resource/Db.php b/app/code/Magento/Backup/Model/Resource/Db.php index e9b47b2c97aba..1d53303e710f7 100644 --- a/app/code/Magento/Backup/Model/Resource/Db.php +++ b/app/code/Magento/Backup/Model/Resource/Db.php @@ -180,6 +180,7 @@ public function getTableHeader($tableName) * @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 8b3b530a0d0db..a2e8c11c93183 100644 --- a/app/code/Magento/Backup/Model/Resource/Helper.php +++ b/app/code/Magento/Backup/Model/Resource/Helper.php @@ -119,6 +119,7 @@ public function getTableCreateScript($tableName, $addDropIfExists = false) * @param string $tableName * @param bool $withForeignKeys * @return string + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getTableCreateSql($tableName, $withForeignKeys = false) { diff --git a/app/code/Magento/Bundle/Api/Data/LinkInterface.php b/app/code/Magento/Bundle/Api/Data/LinkInterface.php index af85c0db52730..88498863dd322 100644 --- a/app/code/Magento/Bundle/Api/Data/LinkInterface.php +++ b/app/code/Magento/Bundle/Api/Data/LinkInterface.php @@ -47,6 +47,7 @@ public function getIsDefined(); * 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 40135566a288a..46398975c1ecb 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php @@ -6,6 +6,7 @@ /** * Bundle product attributes tab + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Attributes extends \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attributes { @@ -13,6 +14,8 @@ class Attributes extends \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attri * Prepare attributes form of bundle product * * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php index 1b1155244397f..d093ac060dc59 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php @@ -53,6 +53,9 @@ protected function _construct() * 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 2b06cc3cd8565..a60a02d9e62ae 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php @@ -69,6 +69,7 @@ public function getChilds($item) /** * @param mixed $item * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isShipmentSeparately($item = null) { @@ -104,6 +105,7 @@ public function isShipmentSeparately($item = null) /** * @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 828f482ecb0cb..3dea707625530 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php @@ -32,6 +32,7 @@ public function truncateString($value, $length = 80, $etc = '...', &$remainder = /** * @param null|object $item * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isShipmentSeparately($item = null) { @@ -64,6 +65,7 @@ public function isShipmentSeparately($item = null) /** * @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 d7b78e3224472..5b33daae698ed 100644 --- a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php +++ b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php @@ -271,6 +271,7 @@ public function getSelectionTitlePrice($selection, $includeContainer = true) * @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 27c67359b7e9b..6694b30acaaa1 100644 --- a/app/code/Magento/Bundle/Block/Checkout/Cart/Item/Renderer.php +++ b/app/code/Magento/Bundle/Block/Checkout/Cart/Item/Renderer.php @@ -37,6 +37,7 @@ class Renderer extends \Magento\Checkout\Block\Cart\Item\Renderer * @param Configuration $bundleProductConfiguration * @param \Magento\Framework\Module\Manager $moduleManager * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, @@ -82,6 +83,7 @@ protected function _construct() * * @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 698f54a46fef4..a476771d6c046 100644 --- a/app/code/Magento/Bundle/Block/Sales/Order/Items/Renderer.php +++ b/app/code/Magento/Bundle/Block/Sales/Order/Items/Renderer.php @@ -16,6 +16,7 @@ class Renderer extends \Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer /** * @param mixed $item * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isShipmentSeparately($item = null) { @@ -51,6 +52,7 @@ public function isShipmentSeparately($item = null) /** * @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 02d65c1bc2e3a..679c5bd17e81c 100644 --- a/app/code/Magento/Bundle/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Bundle.php +++ b/app/code/Magento/Bundle/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Bundle.php @@ -27,6 +27,7 @@ public function __construct(\Magento\Framework\App\RequestInterface $request) * * @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 68ee05b2f326b..7f2b5a22669a4 100644 --- a/app/code/Magento/Bundle/Model/LinkManagement.php +++ b/app/code/Magento/Bundle/Model/LinkManagement.php @@ -9,6 +9,9 @@ use Magento\Framework\Exception\CouldNotSaveException; use Magento\Framework\Exception\InputException; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class LinkManagement implements \Magento\Bundle\Api\ProductLinkManagementInterface { /** @@ -95,6 +98,8 @@ public function addChildByProductSku($productSku, $optionId, \Magento\Bundle\Api /** * {@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 b8f77c23cb44e..f80347079f794 100644 --- a/app/code/Magento/Bundle/Model/Observer.php +++ b/app/code/Magento/Bundle/Model/Observer.php @@ -66,6 +66,8 @@ public function __construct( * * @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 b577c7765734a..1c08ef0efe4db 100644 --- a/app/code/Magento/Bundle/Model/OptionRepository.php +++ b/app/code/Magento/Bundle/Model/OptionRepository.php @@ -9,6 +9,9 @@ use Magento\Framework\Exception\NoSuchEntityException; use Magento\Webapi\Exception; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class OptionRepository implements \Magento\Bundle\Api\ProductOptionRepositoryInterface { /** @@ -144,6 +147,7 @@ public function deleteById($productSku, $optionId) /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function save( \Magento\Catalog\Api\Data\ProductInterface $product, @@ -217,6 +221,7 @@ private function getProduct($productSku) * @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 f09394f58412b..371dd863284b8 100644 --- a/app/code/Magento/Bundle/Model/Product/Price.php +++ b/app/code/Magento/Bundle/Model/Product/Price.php @@ -10,6 +10,7 @@ /** * Bundle Price Model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Price extends \Magento\Catalog\Model\Product\Type\Price { @@ -73,6 +74,7 @@ public function __construct( * Is min/max prices have been calculated by index * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsPricesCalculatedByIndex() { @@ -180,6 +182,9 @@ public function getChildFinalPrice($product, $productQty, $childProduct, $childP * @param bool|null $includeTax * @param bool $takeTierPrice * @return float|array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getTotalPrices($product, $which = null, $includeTax = null, $takeTierPrice = true) { @@ -522,6 +527,8 @@ protected function _applyTierPrice($product, $qty, $finalPrice) * @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 adcd9dd07f48b..b4d55aeaf03e6 100644 --- a/app/code/Magento/Bundle/Model/Product/Type.php +++ b/app/code/Magento/Bundle/Model/Product/Type.php @@ -9,6 +9,9 @@ /** * Bundle Type Model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType { @@ -340,6 +343,7 @@ public function isVirtual($product) * * @param \Magento\Catalog\Model\Product $product * @return $this|void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function beforeSave($product) { @@ -384,6 +388,7 @@ public function beforeSave($product) * * @param \Magento\Catalog\Model\Product $product * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function save($product) { @@ -590,6 +595,8 @@ public function prepareQuoteItemQty($qty, $product) * * @param \Magento\Catalog\Model\Product $product * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function isSalable($product) { @@ -648,6 +655,9 @@ public function isSalable($product) * @param \Magento\Catalog\Model\Product $product * @param string $processMode * @return array|string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareProduct(\Magento\Framework\Object $buyRequest, $product, $processMode) { @@ -1013,6 +1023,7 @@ public function hasOptions($product) * * @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 d0b9365157183..82b76add2e1d6 100644 --- a/app/code/Magento/Bundle/Model/Resource/Indexer/Price.php +++ b/app/code/Magento/Bundle/Model/Resource/Indexer/Price.php @@ -124,6 +124,7 @@ protected function _prepareBundleOptionTable() * @param int $priceType * @param int|array $entityIds the entity ids limitation * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareBundlePriceByType($priceType, $entityIds = null) { @@ -372,6 +373,7 @@ protected function _calculateBundleOptionPrice() * * @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 70d75128ed904..f5168ba0f1376 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php @@ -53,6 +53,7 @@ public function getChilds($item) * * @param \Magento\Framework\Object $item * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isShipmentSeparately($item = null) { @@ -90,6 +91,7 @@ public function isShipmentSeparately($item = null) * * @param \Magento\Framework\Object $item * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isChildCalculated($item = null) { @@ -129,6 +131,7 @@ public function isChildCalculated($item = null) * * @param \Magento\Framework\Object $item * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getBundleOptions($item = null) { @@ -163,6 +166,7 @@ public function getSelectionAttributes($item) * * @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 716ebb19e28b3..9c28d73b542f5 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php @@ -55,6 +55,9 @@ public function __construct( * 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 6a6c5df32c257..6ee362083a287 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php @@ -53,6 +53,9 @@ public function __construct( * 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 a79b5f334e8d1..a07b1ad399cfc 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php @@ -53,6 +53,9 @@ public function __construct( * 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 e15bbbf89f1df..411ac7cf44552 100644 --- a/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php +++ b/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php @@ -19,6 +19,7 @@ /** * Bundle price calculator + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Calculator implements BundleCalculatorInterface { @@ -171,6 +172,8 @@ public function getAmountWithoutOption($amount, Product $saleableItem) * @param bool $searchMin * @param bool $useRegularPrice * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function getSelectionAmounts(Product $bundleProduct, $searchMin, $useRegularPrice = false) { @@ -294,6 +297,7 @@ protected function calculateFixedBundleAmount($basePriceValue, $bundleProduct, $ * @param \Magento\Bundle\Pricing\Price\BundleSelectionPrice[] $selectionPriceList * @param null|string $exclude * @return \Magento\Framework\Pricing\Amount\AmountInterface + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function calculateDynamicBundleAmount($basePriceValue, $bundleProduct, $selectionPriceList, $exclude) { @@ -381,6 +385,7 @@ public function createSelectionPriceList($option, $bundleProduct, $useRegularPri * @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 4868f3b09423f..1a07e673dfe42 100644 --- a/app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.php +++ b/app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.php @@ -15,6 +15,7 @@ /** * Bundle option price + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class BundleSelectionPrice extends AbstractPrice { diff --git a/app/code/Magento/Captcha/Model/Observer.php b/app/code/Magento/Captcha/Model/Observer.php index f334e578863da..7ec17bedb4a78 100644 --- a/app/code/Magento/Captcha/Model/Observer.php +++ b/app/code/Magento/Captcha/Model/Observer.php @@ -8,6 +8,7 @@ * Captcha Observer * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Observer { diff --git a/app/code/Magento/Catalog/Api/Data/CategoryTreeInterface.php b/app/code/Magento/Catalog/Api/Data/CategoryTreeInterface.php index 8e2cb5cb78e10..4532afab168dc 100644 --- a/app/code/Magento/Catalog/Api/Data/CategoryTreeInterface.php +++ b/app/code/Magento/Catalog/Api/Data/CategoryTreeInterface.php @@ -31,6 +31,7 @@ public function getName(); * 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 537db1700cf0e..9a2d46c4efc6c 100644 --- a/app/code/Magento/Catalog/Api/Data/ProductAttributeMediaGalleryEntryInterface.php +++ b/app/code/Magento/Catalog/Api/Data/ProductAttributeMediaGalleryEntryInterface.php @@ -40,6 +40,7 @@ public function getPosition(); * 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 86125492a09eb..eb7d45d8a741c 100644 --- a/app/code/Magento/Catalog/Api/Data/ProductCustomOptionInterface.php +++ b/app/code/Magento/Catalog/Api/Data/ProductCustomOptionInterface.php @@ -46,6 +46,7 @@ public function getSortOrder(); * 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 8746bd4877e8a..4bd02b18ea4bd 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/AbstractCategory.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/AbstractCategory.php @@ -120,6 +120,7 @@ public function getStore() * @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 d4cc60d673727..6691d009d3eb0 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Checkboxes/Tree.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Checkboxes/Tree.php @@ -77,6 +77,7 @@ protected function setExpandedPath($path) * @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 a781811ee276d..eeba03efc17f5 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php @@ -37,6 +37,8 @@ protected function _construct() * 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 9a901923e751d..dac119fad1511 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Design.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Design.php @@ -4,6 +4,9 @@ */ namespace Magento\Catalog\Block\Adminhtml\Category\Tab; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Design extends \Magento\Catalog\Block\Adminhtml\Form { /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tabs.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tabs.php index 9b6b4b9d346a1..43fd8b23a33b6 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tabs.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tabs.php @@ -105,6 +105,7 @@ public function getAttributeTabBlock() * 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 e319dda2ba457..9abf8ed3f2307 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php @@ -243,6 +243,7 @@ public function getSwitchTreeUrl() /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsWasExpanded() { @@ -313,6 +314,8 @@ public function getBreadcrumbsJavascript($path, $javascriptVarName) * @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 b272634701ad7..f7ed33a771c5b 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Config/DateFieldsOrder.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Config/DateFieldsOrder.php @@ -18,6 +18,7 @@ class DateFieldsOrder extends Field /** * @param AbstractElement $element * @return string + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getElementHtml(AbstractElement $element) { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php b/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php index 1f9429e665fe2..f23a32cfe17e4 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php @@ -137,6 +137,7 @@ public function getAfterElementHtml() * 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 2656c10bad118..a266bae27adb2 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php @@ -53,6 +53,7 @@ public function __construct( * 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 8d5b5c381a0ea..c11210b5a2345 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php @@ -43,6 +43,7 @@ public function __construct( /** * {@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 e6a7ed15573e1..756e349ac2aea 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Main.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Main.php @@ -12,12 +12,16 @@ 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 e9a41e8d5c450..a72836ae05ad8 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php @@ -12,6 +12,9 @@ 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 a284ea7632983..9c71bb5a2ab29 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Attributes.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Attributes.php @@ -12,6 +12,9 @@ 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 5aebe3f200c1e..327b1f7ce343f 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php @@ -344,6 +344,7 @@ protected function _getSetId() * 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 6735b2ab3bb78..7dd12041a745f 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php @@ -12,6 +12,9 @@ use Magento\Framework\Data\Form\Element\AbstractElement; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Attributes extends \Magento\Catalog\Block\Adminhtml\Form implements \Magento\Backend\Block\Widget\Tab\TabInterface { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php index 5583ece486313..1dc83ff413809 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php @@ -10,12 +10,18 @@ */ namespace Magento\Catalog\Block\Adminhtml\Product\Edit\Tab; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Attributes extends \Magento\Catalog\Block\Adminhtml\Form { /** * Prepare attributes form * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php index 76549407ee709..e57ef20ab4647 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php @@ -14,6 +14,9 @@ use Magento\Backend\Block\Widget\Grid\Extended; use Magento\Catalog\Model\Product; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Crosssell extends Extended { /** @@ -186,6 +189,7 @@ public function isReadonly() * 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 9f54bda5ea5a1..5850fc36e56e1 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php @@ -268,6 +268,9 @@ public function getTemplatesHtml() /** * @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 1b6cfb40b1693..964444d98c685 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Popup/Grid.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Popup/Grid.php @@ -12,6 +12,9 @@ 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 5b5d7bd8496c6..aedefddcfaa4a 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Tier.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Tier.php @@ -42,6 +42,7 @@ protected function _sortValues($data) * @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 366dd7aa16542..e6817d33ed0c8 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Related.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Related.php @@ -183,6 +183,7 @@ public function isReadonly() * 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 655c2d4ad53c3..336cefd6dcdd7 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Upsell.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Upsell.php @@ -180,6 +180,7 @@ protected function _prepareCollection() * 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 d08324c0c2d8b..8df4d4dc70ab7 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs.php @@ -71,6 +71,7 @@ class Tabs extends \Magento\Backend\Block\Widget\Tabs * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\Translate\InlineInterface $translateInline * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Backend\Block\Template\Context $context, @@ -117,6 +118,9 @@ public function getGroupCollection($attributeSetId) /** * @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 200561aa8dccf..69b12be65f6d9 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Frontend/Product/Watermark.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Frontend/Product/Watermark.php @@ -125,6 +125,7 @@ public function render(AbstractElement $element) /** * @param AbstractElement $element * @return string + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _getHeaderHtml($element) { @@ -148,6 +149,7 @@ protected function _getHeaderHtml($element) /** * @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 c84778729a260..d160dea8dcf53 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php @@ -208,6 +208,7 @@ protected function _addColumnFilterToCollection($column) /** * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareColumns() { diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php index 8b6d28dc9471c..c62ed8ef09fb9 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php @@ -175,6 +175,7 @@ public function getAttributeFieldName($attribute) * * @param Attribute|string $attribute * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getAttributeReadonly($attribute) { diff --git a/app/code/Magento/Catalog/Block/Navigation.php b/app/code/Magento/Catalog/Block/Navigation.php index ed8f5d99d5700..1a2e92a38c869 100644 --- a/app/code/Magento/Catalog/Block/Navigation.php +++ b/app/code/Magento/Catalog/Block/Navigation.php @@ -11,6 +11,7 @@ * Catalog navigation * * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Navigation extends \Magento\Framework\View\Element\Template implements \Magento\Framework\View\Block\IdentityInterface { @@ -270,6 +271,9 @@ protected function _getItemPosition($level) * @param string $childrenWrapClass If specified wraps children list in div with this class * @param boolean $noEventAttributes Whether ot not to add on* attributes to list item * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _renderCategoryMenuItemHtml( $category, diff --git a/app/code/Magento/Catalog/Block/Product/AbstractProduct.php b/app/code/Magento/Catalog/Block/Product/AbstractProduct.php index e4ef668929937..66f8e84c7228c 100644 --- a/app/code/Magento/Catalog/Block/Product/AbstractProduct.php +++ b/app/code/Magento/Catalog/Block/Product/AbstractProduct.php @@ -6,6 +6,8 @@ /** * Class AbstractProduct + * @SuppressWarnings(PHPMD.NumberOfChildren) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AbstractProduct extends \Magento\Framework\View\Element\Template { @@ -376,6 +378,7 @@ public function getPageLayout() * * @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 ad87e805056f4..fbdaa39bbb723 100644 --- a/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php +++ b/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php @@ -11,6 +11,7 @@ /** * 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 14ae9729f3e07..573c8e5e8f5ef 100644 --- a/app/code/Magento/Catalog/Block/Product/Context.php +++ b/app/code/Magento/Catalog/Block/Product/Context.php @@ -6,6 +6,7 @@ /** * 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 8628f008d12a2..2439810ea81cd 100644 --- a/app/code/Magento/Catalog/Block/Product/ListProduct.php +++ b/app/code/Magento/Catalog/Block/Product/ListProduct.php @@ -14,6 +14,7 @@ /** * Product list + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class ListProduct extends AbstractProduct implements IdentityInterface { diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php index 98d0ba28ab7a6..ebac80d1bbbb7 100644 --- a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php +++ b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php @@ -11,6 +11,7 @@ * Product list toolbar * * @author Magento Core Team + * @SuppressWarnings(PHPMD.TooManyFields) */ class Toolbar extends \Magento\Framework\View\Element\Template { diff --git a/app/code/Magento/Catalog/Block/Product/View.php b/app/code/Magento/Catalog/Block/Product/View.php index 18ef7c70cc951..ee82d0c10c5e0 100644 --- a/app/code/Magento/Catalog/Block/Product/View.php +++ b/app/code/Magento/Catalog/Block/Product/View.php @@ -72,6 +72,7 @@ class View extends AbstractProduct implements \Magento\Framework\View\Block\Iden * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency * @param array $data * @codingStandardsIgnoreStart + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Catalog\Block\Product\Context $context, diff --git a/app/code/Magento/Catalog/Block/Product/View/Attributes.php b/app/code/Magento/Catalog/Block/Product/View/Attributes.php index 9828e2ea95eb7..96922f7f54837 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Attributes.php +++ b/app/code/Magento/Catalog/Block/Product/View/Attributes.php @@ -66,6 +66,7 @@ public function getProduct() * * @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 27280fb2b3f7b..a9e0c0d20ccb1 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Options/Type/Select.php +++ b/app/code/Magento/Catalog/Block/Product/View/Options/Type/Select.php @@ -37,6 +37,9 @@ public function __construct( * 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 09ba8338cdf0e..db0c35a5a74a9 100644 --- a/app/code/Magento/Catalog/Block/Product/Widget/Html/Pager.php +++ b/app/code/Magento/Catalog/Block/Product/Widget/Html/Pager.php @@ -151,6 +151,7 @@ public function getTotalNum() * 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 1f2db4b0951a4..6303f6a267893 100644 --- a/app/code/Magento/Catalog/Block/Product/Widget/NewWidget.php +++ b/app/code/Magento/Catalog/Block/Product/Widget/NewWidget.php @@ -196,6 +196,7 @@ public function getPagerHtml() * @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 7000804947e30..4d43e00310078 100644 --- a/app/code/Magento/Catalog/Block/Rss/Category.php +++ b/app/code/Magento/Catalog/Block/Rss/Category.php @@ -11,6 +11,7 @@ /** * Class Category * @package Magento\Catalog\Block\Rss + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Category extends \Magento\Framework\View\Element\AbstractBlock implements DataProviderInterface { @@ -60,6 +61,7 @@ class Category extends \Magento\Framework\View\Element\AbstractBlock implements * @param \Magento\Customer\Model\Session $customerSession * @param CategoryRepositoryInterface $categoryRepository * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Catalog/Block/Rss/Product/Special.php b/app/code/Magento/Catalog/Block/Rss/Product/Special.php index 50292baecd4b7..e5177a0258ac8 100644 --- a/app/code/Magento/Catalog/Block/Rss/Product/Special.php +++ b/app/code/Magento/Catalog/Block/Rss/Product/Special.php @@ -10,6 +10,7 @@ /** * Class Special * @package Magento\Catalog\Block\Rss\Product + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Special extends \Magento\Framework\View\Element\AbstractBlock implements DataProviderInterface { diff --git a/app/code/Magento/Catalog/Block/Widget/Link.php b/app/code/Magento/Catalog/Block/Widget/Link.php index 40ffefb24c757..a710ff7e89cbb 100644 --- a/app/code/Magento/Catalog/Block/Widget/Link.php +++ b/app/code/Magento/Catalog/Block/Widget/Link.php @@ -66,6 +66,7 @@ public function __construct( * * @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 f17bfc3abd5c1..34b10d7aa4155 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Category/Edit.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Category/Edit.php @@ -38,6 +38,8 @@ public function __construct( * 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 5e470317e2bf6..7f945b6560b2f 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.php @@ -67,6 +67,9 @@ protected function _filterCategoryPostData(array $rawData) * 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 ea70e943db429..f5366e406fa7b 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product.php @@ -8,6 +8,7 @@ /** * Catalog product controller + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Product extends \Magento\Backend\App\Action { diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php index 963160cf04e99..ad634300ea2b5 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php @@ -9,6 +9,7 @@ /** * Class Save + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Action\Attribute { @@ -79,6 +80,9 @@ public function __construct( * 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 2deca24d3a967..c354b28c08fc9 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Edit.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Edit.php @@ -38,6 +38,7 @@ public function __construct( /** * @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 be7c060d361b5..c9875cf47735b 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php @@ -7,6 +7,9 @@ use Magento\Catalog\Model\Product\AttributeSet\AlreadyExistsException; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Attribute { /** @@ -56,6 +59,7 @@ class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Attribute * @param \Magento\Catalog\Helper\Product $productHelper * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory * @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Backend\App\Action\Context $context, @@ -82,6 +86,9 @@ public function __construct( /** * @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 98dd712429bff..f100d96a9f177 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php @@ -57,6 +57,8 @@ public function __construct( * * @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 46ecff533cf09..f4601804736d5 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilter.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilter.php @@ -44,6 +44,7 @@ public function __construct( * * @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 7dc0df9dbaee5..04f9e4857d61e 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php @@ -57,6 +57,7 @@ public function __construct( * 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 aa7d6c6d1826b..da219e891f0be 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php @@ -62,6 +62,7 @@ protected function _getEntityTypeId() * [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 45cf6c67cf650..dc99ceeef9382 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Validate.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Validate.php @@ -57,6 +57,8 @@ public function __construct( * 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 d6db2447de5f1..ecc35c2a66d9d 100644 --- a/app/code/Magento/Catalog/Controller/Category/View.php +++ b/app/code/Magento/Catalog/Controller/Category/View.php @@ -10,6 +10,9 @@ use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\View\Result\PageFactory; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class View extends \Magento\Framework\App\Action\Action { /** @@ -134,6 +137,8 @@ protected function _initCategory() * 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 a5690060e2a8b..c8cc5ffde722a 100644 --- a/app/code/Magento/Catalog/Controller/Product/Compare.php +++ b/app/code/Magento/Catalog/Controller/Product/Compare.php @@ -13,6 +13,7 @@ * Catalog compare controller * * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Compare extends \Magento\Framework\App\Action\Action { @@ -105,6 +106,7 @@ class Compare extends \Magento\Framework\App\Action\Action * @param \Magento\Framework\Controller\Result\RedirectFactory $resultRedirectFactory * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory * @param ProductRepositoryInterface $productRepository + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/app/code/Magento/Catalog/Controller/Product/Compare/Index.php b/app/code/Magento/Catalog/Controller/Product/Compare/Index.php index 60700d407579f..896ce44b351a7 100644 --- a/app/code/Magento/Catalog/Controller/Product/Compare/Index.php +++ b/app/code/Magento/Catalog/Controller/Product/Compare/Index.php @@ -10,6 +10,9 @@ use Magento\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 3c1f489aa1f94..adafe60cc3acc 100644 --- a/app/code/Magento/Catalog/Helper/Data.php +++ b/app/code/Magento/Catalog/Helper/Data.php @@ -14,6 +14,8 @@ /** * Catalog data helper + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Data extends \Magento\Framework\App\Helper\AbstractHelper { @@ -183,6 +185,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * @param PriceCurrencyInterface $priceCurrency * @param ProductRepositoryInterface $productRepository * @param CategoryRepositoryInterface $categoryRepository + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Helper\Context $context, @@ -463,6 +466,8 @@ public function shouldDisplayProductCountOnLayer($storeId = null) * @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 e232b7280a793..15358582c72f7 100644 --- a/app/code/Magento/Catalog/Helper/Image.php +++ b/app/code/Magento/Catalog/Helper/Image.php @@ -248,6 +248,7 @@ public function keepAspectRatio($flag) * @param bool $flag * @param string[] $position * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function keepFrame($flag, $position = ['center', 'middle']) { @@ -266,6 +267,7 @@ public function keepFrame($flag, $position = ['center', 'middle']) * @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 3d5bd36819a85..36586a7872128 100644 --- a/app/code/Magento/Catalog/Helper/Output.php +++ b/app/code/Magento/Catalog/Helper/Output.php @@ -132,6 +132,7 @@ public function process($method, $result, $params) * @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 b26f922a2abff..ecc2a3c48d15a 100644 --- a/app/code/Magento/Catalog/Helper/Product.php +++ b/app/code/Magento/Catalog/Helper/Product.php @@ -12,6 +12,7 @@ /** * Catalog category helper + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Product extends \Magento\Core\Helper\Url { @@ -109,6 +110,7 @@ class Product extends \Magento\Core\Helper\Url * @param array $reindexPriceIndexerData * @param ProductRepositoryInterface $productRepository * @param CategoryRepositoryInterface $categoryRepository + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Helper\Context $context, @@ -245,6 +247,7 @@ public function getSmallImageUrl($product) * * @param ModelProduct|\Magento\Framework\Object $product * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getThumbnailUrl($product) { @@ -283,6 +286,7 @@ public function getStatuses() * @param ModelProduct|int $product * @param string $where * @return boolean + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function canShow($product, $where = 'catalog') { @@ -384,6 +388,8 @@ public function getAttributeSourceModelByInputType($inputType) * @param \Magento\Framework\Object $params * * @return false|ModelProduct + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function initProduct($productId, $controller, $params = null) { @@ -537,6 +543,7 @@ public function setSkipSaleableCheck($skipSaleableCheck = false) * 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 d762ef438dd9b..206d47e249ef2 100644 --- a/app/code/Magento/Catalog/Helper/Product/Compare.php +++ b/app/code/Magento/Catalog/Helper/Product/Compare.php @@ -11,6 +11,7 @@ * Catalog Product Compare Helper * * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Compare extends \Magento\Core\Helper\Url { @@ -103,6 +104,7 @@ class Compare extends \Magento\Core\Helper\Url * @param \Magento\Framework\Data\Form\FormKey $formKey * @param \Magento\Wishlist\Helper\Data $wishlistHelper * @param \Magento\Core\Helper\PostData $coreHelper + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Helper\Context $context, @@ -356,6 +358,7 @@ public function setAllowUsedFlat($flag) * 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 6a5dc49806700..7618b1596afbb 100644 --- a/app/code/Magento/Catalog/Helper/Product/Composite.php +++ b/app/code/Magento/Catalog/Helper/Product/Composite.php @@ -18,6 +18,7 @@ * Adminhtml catalog product composite helper * * @author Magento Core Team + * @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 6a818dc1e20c2..bead7f43f41dd 100644 --- a/app/code/Magento/Catalog/Helper/Product/Configuration.php +++ b/app/code/Magento/Catalog/Helper/Product/Configuration.php @@ -144,6 +144,8 @@ public function getOptions(\Magento\Catalog\Model\Product\Configuration\Item\Ite * - '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 8a6c156fa3fa1..172cbacd77d86 100644 --- a/app/code/Magento/Catalog/Helper/Product/Edit/Action/Attribute.php +++ b/app/code/Magento/Catalog/Helper/Product/Edit/Action/Attribute.php @@ -10,6 +10,7 @@ /** * Class Attribute + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Attribute extends \Magento\Backend\Helper\Data { @@ -66,6 +67,7 @@ class Attribute extends \Magento\Backend\Helper\Data * @param \Magento\Backend\Model\Session $session * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productsFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Helper\Context $context, diff --git a/app/code/Magento/Catalog/Helper/Product/Flat/Indexer.php b/app/code/Magento/Catalog/Helper/Product/Flat/Indexer.php index e029df6c439b4..0d3e46a469dd3 100644 --- a/app/code/Magento/Catalog/Helper/Product/Flat/Indexer.php +++ b/app/code/Magento/Catalog/Helper/Product/Flat/Indexer.php @@ -7,6 +7,8 @@ /** * Catalog Product Flat Indexer Helper * + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Indexer extends \Magento\Framework\App\Helper\AbstractHelper { @@ -129,6 +131,7 @@ class Indexer extends \Magento\Framework\App\Helper\AbstractHelper * @param bool $addFilterableAttrs * @param bool $addChildData * @param array $flatAttributeGroups + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Helper\Context $context, diff --git a/app/code/Magento/Catalog/Helper/Product/View.php b/app/code/Magento/Catalog/Helper/Product/View.php index 1973e8fbf0951..d7852e1a83ff7 100644 --- a/app/code/Magento/Catalog/Helper/Product/View.php +++ b/app/code/Magento/Catalog/Helper/Product/View.php @@ -101,6 +101,8 @@ public function __construct( * @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 168813ce8f6db..23a47db8f11ce 100644 --- a/app/code/Magento/Catalog/Model/AbstractModel.php +++ b/app/code/Magento/Catalog/Model/AbstractModel.php @@ -312,6 +312,7 @@ public function setExistsStoreValueFlag($attributeCode) * * @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 7da58daf9e838..18dacad31ee4d 100644 --- a/app/code/Magento/Catalog/Model/App/Action/ContextPlugin.php +++ b/app/code/Magento/Catalog/Model/App/Action/ContextPlugin.php @@ -47,6 +47,7 @@ public function __construct( * @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 7d13628710b4e..1fc360af70fa1 100644 --- a/app/code/Magento/Catalog/Model/Category.php +++ b/app/code/Magento/Catalog/Model/Category.php @@ -26,6 +26,10 @@ * @method Category setUrlPath(string $urlPath) * * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Category extends \Magento\Catalog\Model\AbstractModel implements \Magento\Framework\Object\IdentityInterface, @@ -189,6 +193,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -256,6 +261,7 @@ protected function _construct() * Get flat resource model flag * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseFlatResource() { @@ -407,6 +413,7 @@ public function getProductCollection() * @param bool $noDesignAttributes * @return array * @todo Use with Flat Resource + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getAttributes($noDesignAttributes = false) { @@ -1092,6 +1099,7 @@ public function getUpdatedAt() /** * @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 c4372b1b1d033..15c8e1374b771 100644 --- a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php +++ b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php @@ -34,6 +34,8 @@ public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $ * @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 3641dacd74f75..c952319dd5540 100644 --- a/app/code/Magento/Catalog/Model/Config.php +++ b/app/code/Magento/Catalog/Model/Config.php @@ -6,6 +6,8 @@ /** * @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 e1e07eb8fe887..09e7fa2da41a8 100644 --- a/app/code/Magento/Catalog/Model/Entity/Attribute.php +++ b/app/code/Magento/Catalog/Model/Entity/Attribute.php @@ -42,6 +42,7 @@ * @method \Magento\Catalog\Model\Entity\Attribute setIsWysiwygEnabled(int $value) * @method int getIsUsedForPromoRules() * @method \Magento\Catalog\Model\Entity\Attribute setIsUsedForPromoRules(int $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Attribute extends \Magento\Eav\Model\Entity\Attribute { @@ -85,6 +86,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/AffectCache.php b/app/code/Magento/Catalog/Model/Indexer/Category/AffectCache.php index 3858eb94fb035..3fa35baa61c14 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/AffectCache.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/AffectCache.php @@ -28,6 +28,7 @@ public function __construct( * @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 36d1e6d8ff19e..a3d2ef62ea8e2 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Flat/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Flat/AbstractAction.php @@ -185,6 +185,7 @@ protected function getFlatTableStructure($tableName) * Return array of static columns * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function getStaticColumns() { diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/StoreGroup.php b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/StoreGroup.php index 86e060834d50e..9c49984e04004 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/StoreGroup.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/StoreGroup.php @@ -22,6 +22,7 @@ public function __construct(\Magento\Indexer\Model\IndexerRegistry $indexerRegis * @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 ea50c8e0cd8de..2ecfb96c20079 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/AffectCache.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/AffectCache.php @@ -28,6 +28,7 @@ public function __construct( * @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 3cf1f0e15b71a..c9d10aea74ec8 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/AbstractAction.php @@ -117,6 +117,7 @@ protected function _getTemporaryTableName($tableName) * @param array $tablesList * @param int|string $storeId * @return void + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _cleanOnFailure(array $tablesList, $storeId) { @@ -182,6 +183,7 @@ protected function _getProductTypeInstances() * @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 6f5911abbcfcf..893d6974a7e43 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Indexer.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Indexer.php @@ -40,6 +40,8 @@ public function __construct( * @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 deaa8d99049da..d8a86e5a3df60 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/FlatTableBuilder.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/FlatTableBuilder.php @@ -97,6 +97,8 @@ public function build($storeId, $changedIds, $valueFieldSuffix, $tableDropSuffix * @param int|string $storeId * @return void * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _createTemporaryFlatTable($storeId) { diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php index dbde7ffb86881..891576e026927 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php @@ -7,6 +7,7 @@ /** * Abstract action reindex class * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractAction { @@ -443,6 +444,7 @@ protected function _emptyTable($table) * * @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 64290646cd67c..7f8405677994f 100644 --- a/app/code/Magento/Catalog/Model/Layer.php +++ b/app/code/Magento/Catalog/Model/Layer.php @@ -11,6 +11,7 @@ * Catalog view layer model * * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Layer extends \Magento\Framework\Object { diff --git a/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/Auto.php b/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/Auto.php index 1020640c93472..57b7981e013df 100644 --- a/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/Auto.php +++ b/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/Auto.php @@ -12,6 +12,9 @@ use Magento\Framework\Registry; use Magento\Framework\Search\Dynamic\Algorithm; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Auto implements AlgorithmInterface { const MIN_RANGE_POWER = 10; diff --git a/app/code/Magento/Catalog/Model/Layer/Filter/Price.php b/app/code/Magento/Catalog/Model/Layer/Filter/Price.php index 2ac5447502c30..30502703baaa6 100644 --- a/app/code/Magento/Catalog/Model/Layer/Filter/Price.php +++ b/app/code/Magento/Catalog/Model/Layer/Filter/Price.php @@ -8,6 +8,7 @@ * Layer price filter * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Price extends \Magento\Catalog\Model\Layer\Filter\AbstractFilter { @@ -69,6 +70,7 @@ class Price extends \Magento\Catalog\Model\Layer\Filter\AbstractFilter * @param Dynamic\AlgorithmFactory $algorithmFactory * @param DataProvider\PriceFactory $dataProviderFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Catalog\Model\Layer\Filter\ItemFactory $filterItemFactory, diff --git a/app/code/Magento/Catalog/Model/Product.php b/app/code/Magento/Catalog/Model/Product.php index b26ffe5bdcf7c..095b707d217ed 100644 --- a/app/code/Magento/Catalog/Model/Product.php +++ b/app/code/Magento/Catalog/Model/Product.php @@ -28,6 +28,10 @@ * @method Product setRequestPath(string $requestPath) * * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Product extends \Magento\Catalog\Model\AbstractModel implements IdentityInterface, @@ -639,6 +643,7 @@ public function getStoreIds() * @param int $groupId Retrieve attributes of the specified group * @param bool $skipSuper Not used * @return \Magento\Eav\Model\Entity\Attribute\AbstractAttribute[] + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getAttributes($groupId = null, $skipSuper = false) { @@ -661,6 +666,7 @@ public function getAttributes($groupId = null, $skipSuper = false) * Check product options and type options and save them, too * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function beforeSave() { @@ -1392,6 +1398,7 @@ public function isAvailable() * Is product salable detecting by product type * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsSalable() { @@ -1678,6 +1685,7 @@ public function getOptions() * 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 6cbd2373eed7a..f978227925ca2 100644 --- a/app/code/Magento/Catalog/Model/Product/Action.php +++ b/app/code/Magento/Catalog/Model/Product/Action.php @@ -116,6 +116,7 @@ public function updateAttributes($productIds, $attrData, $storeId) * * @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 157545a285e0f..2f07f6ea542bd 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractGroupprice.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractGroupprice.php @@ -108,6 +108,7 @@ abstract protected function _getResource(); * * @param array $objectArray * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getAdditionalUniqueFields($objectArray) { @@ -131,6 +132,8 @@ protected function _isPriceFixed($priceObject) * @param \Magento\Catalog\Model\Product $object * @throws \Magento\Framework\Model\Exception * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validate($object) { @@ -283,6 +286,9 @@ public function afterLoad($object) * * @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 956447517a5b0..73b845d5b71b9 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php @@ -13,6 +13,10 @@ use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Model\Exception; +/** + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Media extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend { /** @@ -163,6 +167,8 @@ public function validate($object) /** * @param \Magento\Framework\Object $object * @return $this|void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function beforeSave($object) { @@ -253,6 +259,8 @@ public function getRenamedImage($file) /** * @param \Magento\Framework\Object $object * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function afterSave($object) { @@ -346,6 +354,8 @@ protected function removeDeletedImages(array $files) * @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 545f93426d2a0..38a8019b83783 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php @@ -95,6 +95,7 @@ public function setScope($attribute) * * @param \Magento\Catalog\Model\Product $object * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function afterSave($object) { diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php b/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php index 40ebe17214d3c..5aff918f97112 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php @@ -8,6 +8,9 @@ use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\NoSuchEntityException; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Repository implements \Magento\Catalog\Api\ProductAttributeRepositoryInterface { /** @@ -71,6 +74,7 @@ class Repository implements \Magento\Catalog\Api\ProductAttributeRepositoryInter * @param \Magento\Framework\Api\Config\MetadataConfig $metadataConfig * @param \Magento\Framework\Api\SearchCriteriaDataBuilder $searchCriteriaBuilder * @param \Magento\Framework\Api\FilterBuilder $filterBuilder + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Catalog\Model\Resource\Attribute $attributeResource, @@ -120,6 +124,8 @@ public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCr /** * {@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 0275c94f307ac..b47b04bbbba63 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Source/Inputtype.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Source/Inputtype.php @@ -38,6 +38,7 @@ public function __construct(\Magento\Framework\Event\ManagerInterface $eventMana * 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 e63ab56b208ae..eab5830cc48eb 100644 --- a/app/code/Magento/Catalog/Model/Product/Compare/Item.php +++ b/app/code/Magento/Catalog/Model/Product/Compare/Item.php @@ -206,6 +206,7 @@ public function bindCustomerLogin() * * @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 3b04efcf19b17..72830eaa06b7f 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/Entry.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/Entry.php @@ -45,6 +45,7 @@ public function getPosition() * 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 6e46c6472e25e..deb76aea5d468 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php @@ -14,6 +14,9 @@ use Magento\Framework\Exception\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 0a39a50e69fc7..20eb8a3d8643c 100644 --- a/app/code/Magento/Catalog/Model/Product/GroupPriceManagement.php +++ b/app/code/Magento/Catalog/Model/Product/GroupPriceManagement.php @@ -68,6 +68,8 @@ public function __construct( /** * {@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 fbb66e6b0b939..1d69922c240bf 100644 --- a/app/code/Magento/Catalog/Model/Product/Image.php +++ b/app/code/Magento/Catalog/Model/Product/Image.php @@ -14,6 +14,11 @@ use Magento\Framework\Image as MagentoImage; use Magento\Store\Model\Store; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Image extends \Magento\Framework\Model\AbstractModel { /** @@ -173,6 +178,8 @@ class Image extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -380,6 +387,7 @@ protected function _getMemoryUsage() /** * @param string|null $file * @return float|int + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getNeedMemoryForFile($file = null) { @@ -435,6 +443,8 @@ protected function _rgbToString($rgbArray) * @param string $file * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function setBaseFile($file) { @@ -610,6 +620,7 @@ public function setAngle($angle) * @param int $height * @param int $opacity * @return $this + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function setWatermark( $file, diff --git a/app/code/Magento/Catalog/Model/Product/Option.php b/app/code/Magento/Catalog/Model/Product/Option.php index 9311b73442647..cdc0c608ba6f2 100644 --- a/app/code/Magento/Catalog/Model/Product/Option.php +++ b/app/code/Magento/Catalog/Model/Product/Option.php @@ -21,6 +21,7 @@ * @method \Magento\Catalog\Model\Product\Option setProductId(int $value) * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Option extends AbstractExtensibleModel implements \Magento\Catalog\Api\Data\ProductCustomOptionInterface { @@ -103,6 +104,7 @@ class Option extends AbstractExtensibleModel implements \Magento\Catalog\Api\Dat * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -312,6 +314,7 @@ public function groupFactory($type) * Save options. * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function saveOptions() { @@ -625,6 +628,7 @@ public function getSortOrder() * 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 3fc88c0b44b80..79375a0704182 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Type/Date.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Type/Date.php @@ -43,6 +43,8 @@ public function __construct( * @param array $values All product option values, i.e. array (option_id => mixed, option_id => mixed...) * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validateUserValue($values) { @@ -116,6 +118,8 @@ public function validateUserValue($values) * * @return string|null Prepared option value * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function prepareForCart() { @@ -174,6 +178,7 @@ public function prepareForCart() * * @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 6a42182e7b0e5..76a465081d45b 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php @@ -10,6 +10,7 @@ * Catalog product option default type * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class DefaultType extends \Magento\Framework\Object { @@ -215,6 +216,7 @@ public function validateUserValue($values) * Check skip required option validation * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getSkipCheckRequiredOption() { @@ -297,6 +299,7 @@ public function getEditableOptionValue($optionValue) * @param string $optionValue * @param array $productOptionValues Values for product option * @return string|null + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function parseOptionValue($optionValue, $productOptionValues) { @@ -320,6 +323,7 @@ public function prepareOptionValueForRequest($optionValue) * @param string $optionValue Prepared for cart option value * @param float $basePrice For percent price type * @return float + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getOptionPrice($optionValue, $basePrice) { @@ -334,6 +338,7 @@ public function getOptionPrice($optionValue, $basePrice) * @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 e3ebe2cedf0a0..b50046bf3bd73 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Type/File.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Type/File.php @@ -11,6 +11,7 @@ * Catalog product option file type * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType { @@ -178,6 +179,7 @@ protected function _getCurrentConfigFileInfo() * @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 8ddcbf00db95d..d9af28723ba60 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Type/File/ValidatorFile.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Type/File/ValidatorFile.php @@ -8,6 +8,9 @@ use Magento\Catalog\Model\Product; use Magento\Framework\App\Filesystem\DirectoryList; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class ValidatorFile extends Validator { /** @@ -86,6 +89,7 @@ public function setProduct(Product $product) * @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 95dec4ea4f649..3c79ad4a14eea 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Validator/Select.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Validator/Select.php @@ -30,6 +30,8 @@ protected function checkAllValuesRemoved($values) * * @param Option $option * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function validateOptionValue(Option $option) { diff --git a/app/code/Magento/Catalog/Model/Product/PriceModifier.php b/app/code/Magento/Catalog/Model/Product/PriceModifier.php index e6b61b5dde72b..e7f6887607497 100644 --- a/app/code/Magento/Catalog/Model/Product/PriceModifier.php +++ b/app/code/Magento/Catalog/Model/Product/PriceModifier.php @@ -69,6 +69,7 @@ public function removeGroupPrice(\Magento\Catalog\Model\Product $product, $custo * @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 a0b2ef6440145..e561fa8f11017 100644 --- a/app/code/Magento/Catalog/Model/Product/TierPriceManagement.php +++ b/app/code/Magento/Catalog/Model/Product/TierPriceManagement.php @@ -12,6 +12,9 @@ use Magento\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 1b9fcdff10fe8..1c173d2795c8f 100644 --- a/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php +++ b/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php @@ -9,6 +9,10 @@ /** * Abstract model for product type implementation + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractType { @@ -166,6 +170,7 @@ abstract public function deleteTypeSpecificData(\Magento\Catalog\Model\Product $ * @param \Magento\Framework\Registry $coreRegistry * @param \Psr\Log\LoggerInterface $logger * @param ProductRepositoryInterface $productRepository + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Catalog\Model\Product\Option $catalogProductOption, @@ -224,6 +229,7 @@ public function getRelationInfo() * @param int $parentId * @param bool $required * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getChildrenIds($parentId, $required = true) { @@ -235,6 +241,7 @@ public function getChildrenIds($parentId, $required = true) * * @param int|array $childId * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getParentIdsByChild($childId) { @@ -318,6 +325,7 @@ public function getAttributeById($attributeId, $product) * * @param \Magento\Catalog\Model\Product $product * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function isVirtual($product) { @@ -348,6 +356,7 @@ public function isSalable($product) * @param \Magento\Catalog\Model\Product $product * @param string $processMode * @return array|string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareProduct(\Magento\Framework\Object $buyRequest, $product, $processMode) { @@ -461,6 +470,8 @@ public function prepareForCart(\Magento\Framework\Object $buyRequest, $product) * * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function processFileQueue() { @@ -713,6 +724,7 @@ public function beforeSave($product) * * @param \Magento\Catalog\Model\Product $product * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function isComposite($product) { @@ -724,6 +736,7 @@ public function isComposite($product) * * @param \Magento\Catalog\Model\Product $product * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function canConfigure($product) { @@ -827,6 +840,7 @@ public function hasOptions($product) * @param \Magento\Catalog\Model\Product $product * * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function updateQtyOption($options, \Magento\Framework\Object $option, $value, $product) { @@ -879,6 +893,8 @@ public function setStoreFilter($store, $product) * * @param \Magento\Catalog\Model\Product $product * @return boolean false + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getForceChildItemQtyChanges($product) { @@ -891,6 +907,7 @@ public function getForceChildItemQtyChanges($product) * @param int|float $qty * @param \Magento\Catalog\Model\Product $product * @return float + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function prepareQuoteItemQty($qty, $product) { @@ -974,6 +991,7 @@ public function getProductsToPurchaseByReqGroups($product) * @param \Magento\Catalog\Model\Product $product * @param \Magento\Framework\Object $buyRequest * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function processBuyRequest($product, $buyRequest) { @@ -1027,6 +1045,7 @@ public function hasWeight() * * @param \Magento\Catalog\Model\Product $product * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setImageFromChildProduct(\Magento\Catalog\Model\Product $product) { @@ -1038,6 +1057,7 @@ public function setImageFromChildProduct(\Magento\Catalog\Model\Product $product * * @param \Magento\Catalog\Model\Product $product * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getIdentities(\Magento\Catalog\Model\Product $product) { @@ -1047,6 +1067,7 @@ public function getIdentities(\Magento\Catalog\Model\Product $product) /** * @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 d183d530ecc8d..5100305fcda5c 100644 --- a/app/code/Magento/Catalog/Model/Product/Type/Price.php +++ b/app/code/Magento/Catalog/Model/Product/Type/Price.php @@ -156,6 +156,7 @@ public function getFinalPrice($qty, $product) * @param Product $childProduct * @param float $childProductQty * @return float + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getChildFinalPrice($product, $productQty, $childProduct, $childProductQty) { @@ -242,6 +243,8 @@ protected function _applyTierPrice($product, $qty, $finalPrice) * @param Product $product * @return float|array * @deprecated (MAGETWO-31465) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getTierPrice($qty, $product) { @@ -409,6 +412,7 @@ public function getFormatedPrice($product) * @param float $finalPrice * @return float * @deprecated (MAGETWO-31469) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _applyOptionsPrice($product, $qty, $finalPrice) { diff --git a/app/code/Magento/Catalog/Model/Product/Url.php b/app/code/Magento/Catalog/Model/Product/Url.php index 0a679bb7e5bb3..09a220ae3faaf 100644 --- a/app/code/Magento/Catalog/Model/Product/Url.php +++ b/app/code/Magento/Catalog/Model/Product/Url.php @@ -157,6 +157,8 @@ public function formatUrlKey($str) * @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 9033f21f50940..47ac5951c70c1 100644 --- a/app/code/Magento/Catalog/Model/Product/Validator.php +++ b/app/code/Magento/Catalog/Model/Product/Validator.php @@ -17,6 +17,7 @@ class Validator * @param RequestInterface $request * @param \Magento\Framework\Object $response * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function validate(Product $product, RequestInterface $request, \Magento\Framework\Object $response) { diff --git a/app/code/Magento/Catalog/Model/ProductRepository.php b/app/code/Magento/Catalog/Model/ProductRepository.php index 10931b04a15ea..b92f454535abb 100644 --- a/app/code/Magento/Catalog/Model/ProductRepository.php +++ b/app/code/Magento/Catalog/Model/ProductRepository.php @@ -10,6 +10,9 @@ use Magento\Framework\Api\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 cfeb545ae9013..ecb67e6116001 100644 --- a/app/code/Magento/Catalog/Model/Resource/AbstractResource.php +++ b/app/code/Magento/Catalog/Model/Resource/AbstractResource.php @@ -8,6 +8,7 @@ /** * Catalog entity abstract model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractResource extends \Magento\Eav\Model\Entity\AbstractEntity { @@ -531,6 +532,9 @@ protected function _canUpdateAttribute(AbstractAttribute $attribute, $value, arr * @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 6eebb369d2b06..7dfdc494991bd 100644 --- a/app/code/Magento/Catalog/Model/Resource/Category.php +++ b/app/code/Magento/Catalog/Model/Resource/Category.php @@ -10,6 +10,9 @@ */ namespace Magento\Catalog\Model\Resource; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Category extends AbstractResource { /** @@ -325,6 +328,8 @@ protected function _getMaxPosition($path) * * @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 d219fd60332bd..db33f16fc6454 100644 --- a/app/code/Magento/Catalog/Model/Resource/Category/Collection.php +++ b/app/code/Magento/Catalog/Model/Resource/Category/Collection.php @@ -200,6 +200,8 @@ protected function _loadProductCount() * @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 0aabf40c99e7f..2659ca7ac6083 100644 --- a/app/code/Magento/Catalog/Model/Resource/Category/Tree.php +++ b/app/code/Magento/Catalog/Model/Resource/Category/Tree.php @@ -4,6 +4,9 @@ */ namespace Magento\Catalog\Model\Resource\Category; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Tree extends \Magento\Framework\Data\Tree\Dbp { const ID_FIELD = 'id'; @@ -156,6 +159,8 @@ public function getStoreId() * @param boolean $toLoad * @param boolean $onlyActive * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function addCollectionData( $collection = null, @@ -323,6 +328,7 @@ protected function _getInactiveItemIds($collection, $storeId) * * @param int $id * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ protected function _getItemIsActive($id) { @@ -436,6 +442,8 @@ protected function _afterMove() * @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 4b573832cd098..da3f8ce04f160 100644 --- a/app/code/Magento/Catalog/Model/Resource/Eav/Attribute.php +++ b/app/code/Magento/Catalog/Model/Resource/Eav/Attribute.php @@ -35,6 +35,7 @@ * @method int setIsUsedForPromoRules(int $value) * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Attribute extends \Magento\Eav\Model\Entity\Attribute implements \Magento\Catalog\Api\Data\ProductAttributeInterface @@ -112,6 +113,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute implements * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -174,6 +176,7 @@ protected function _construct() * * @return \Magento\Framework\Model\AbstractModel * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function beforeSave() { @@ -411,6 +414,7 @@ public function _getDefaultSourceModel() * Check is an attribute used in EAV index * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isIndexable() { @@ -441,6 +445,7 @@ public function isIndexable() * Is original attribute config indexable * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _isOriginalIndexable() { diff --git a/app/code/Magento/Catalog/Model/Resource/Helper.php b/app/code/Magento/Catalog/Model/Resource/Helper.php index ef2f15133bd8e..23d92bfaf5981 100644 --- a/app/code/Magento/Catalog/Model/Resource/Helper.php +++ b/app/code/Magento/Catalog/Model/Resource/Helper.php @@ -29,6 +29,7 @@ public function __construct(\Magento\Framework\App\Resource $resource, $modulePr * @param array $column * @param array $describe * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function compareIndexColumnProperties($column, $describe) { diff --git a/app/code/Magento/Catalog/Model/Resource/Product.php b/app/code/Magento/Catalog/Model/Resource/Product.php index 5cdb5ec2ad7ff..ac205a6e7051a 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product.php +++ b/app/code/Magento/Catalog/Model/Resource/Product.php @@ -8,6 +8,7 @@ * Product entity resource model * * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Product extends AbstractResource { @@ -310,6 +311,7 @@ protected function _saveWebsiteIds($product) * * @param \Magento\Framework\Object $object * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _saveCategories(\Magento\Framework\Object $object) { diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Collection.php b/app/code/Magento/Catalog/Model/Resource/Product/Collection.php index 73b7c3cb603b3..cc0bb42dd9551 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Collection.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Collection.php @@ -12,6 +12,11 @@ /** * Product collection + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.NumberOfChildren) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractCollection { @@ -1389,6 +1394,7 @@ public function addPriceData($customerGroupId = null, $websiteId = null) * @param array $condition * @param string $joinType * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function addAttributeToFilter($attribute, $condition = null, $joinType = 'inner') { @@ -1528,6 +1534,8 @@ public function setVisibility($visibility) * @param string $attribute * @param string $dir * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function addAttributeToSort($attribute, $dir = self::SORT_ORDER_ASC) { @@ -1625,6 +1633,7 @@ protected function _prepareProductLimitationFilters() * Join website product limitation * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _productLimitationJoinWebsite() { @@ -1677,6 +1686,8 @@ protected function _productLimitationJoinWebsite() * Join additional (alternative) store visibility filter * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _productLimitationJoinStore() { @@ -1976,6 +1987,8 @@ public function addCategoryIds() * 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 c82e9ed4d6ffc..16c66cc611566 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Compare/Item/Collection.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Compare/Item/Collection.php @@ -9,6 +9,7 @@ * * @author Magento Core Team * @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 5f30b32bc234c..c5763f1ac0a6b 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price/DefaultPrice.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price/DefaultPrice.php @@ -109,6 +109,7 @@ public function setIsComposite($flag) * Check product type is composite * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsComposite() { @@ -202,6 +203,7 @@ protected function _getWebsiteDateTable() * * @param int|array $entityIds the entity ids limitation * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareFinalPriceData($entityIds = null) { @@ -390,6 +392,7 @@ protected function _prepareCustomOptionPriceTable() * Apply custom option minimal and maximal price to temporary final price index table * * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _applyCustomOption() { diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Link.php b/app/code/Magento/Catalog/Model/Resource/Product/Link.php index e2883afd0ba11..799d804d8ed38 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Link.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Link.php @@ -53,6 +53,7 @@ protected function _construct() * @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 59dccbe862af8..510ee1ac08880 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Option.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Option.php @@ -81,6 +81,8 @@ protected function _afterSave(\Magento\Framework\Model\AbstractModel $object) * * @param \Magento\Framework\Model\AbstractModel $object * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _saveValuePrices(\Magento\Framework\Model\AbstractModel $object) { @@ -229,6 +231,7 @@ protected function _saveValuePrices(\Magento\Framework\Model\AbstractModel $obje * * @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 088e77ed2e24a..bbb415ed1b840 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Option/Value.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Option/Value.php @@ -82,6 +82,8 @@ protected function _afterSave(\Magento\Framework\Model\AbstractModel $object) * * @param \Magento\Framework\Model\AbstractModel $object * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _saveValuePrices(\Magento\Framework\Model\AbstractModel $object) { @@ -208,6 +210,7 @@ protected function _saveValuePrices(\Magento\Framework\Model\AbstractModel $obje * * @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 c28f18ff31eaf..a1878d969762a 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Option/Value/Collection.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Option/Value/Collection.php @@ -187,6 +187,7 @@ public function addPriceToResult($storeId) * @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 bb2713d989c66..7b3193814e840 100644 --- a/app/code/Magento/Catalog/Model/Resource/Setup.php +++ b/app/code/Magento/Catalog/Model/Resource/Setup.php @@ -80,6 +80,7 @@ public function createEavAttributeResource($data = []) * 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 eacf7eceddc10..85be258b8093a 100644 --- a/app/code/Magento/Catalog/Model/Resource/Url.php +++ b/app/code/Magento/Catalog/Model/Resource/Url.php @@ -362,6 +362,8 @@ protected function _prepareStoreRootCategories($stores) * @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 922a5d28548e0..2ffc55530434c 100644 --- a/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php +++ b/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php @@ -17,6 +17,9 @@ use Magento\UrlRewrite\Model\Storage\DbStorage; use Magento\UrlRewrite\Service\V1\Data\UrlRewrite; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Suffix extends \Magento\Framework\App\Config\Value { /** @var \Magento\UrlRewrite\Helper\UrlRewrite */ @@ -42,6 +45,7 @@ class Suffix extends \Magento\Framework\App\Config\Value * @param \Magento\Framework\App\Resource $appResource * @param \Magento\UrlRewrite\Model\UrlFinderInterface $urlFinder * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Catalog/Pricing/Price/TierPrice.php b/app/code/Magento/Catalog/Pricing/Price/TierPrice.php index 58542994dc41f..757eb4dd4f193 100644 --- a/app/code/Magento/Catalog/Pricing/Price/TierPrice.php +++ b/app/code/Magento/Catalog/Pricing/Price/TierPrice.php @@ -249,6 +249,7 @@ protected function canApplyTierPrice(array $currentTierPrice, $prevPriceGroup, $ * 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 0e2b2e84f9e1c..a99acfa5cb556 100644 --- a/app/code/Magento/Catalog/Pricing/Render/PriceBox.php +++ b/app/code/Magento/Catalog/Pricing/Render/PriceBox.php @@ -83,6 +83,7 @@ public function getRandomString($length, $chars = null) * * @param Product $product * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCanDisplayQty(Product $product) { diff --git a/app/code/Magento/CatalogImportExport/Model/Export/Product.php b/app/code/Magento/CatalogImportExport/Model/Export/Product.php index c3d0f1d794394..1cfbecff66608 100644 --- a/app/code/Magento/CatalogImportExport/Model/Export/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Export/Product.php @@ -8,6 +8,9 @@ * Export entity product model * * @author Magento Core Team + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity { @@ -212,6 +215,7 @@ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity * @param Product\Type\Factory $_typeFactory * @param \Magento\Catalog\Model\Product\LinkTypeProvider $linkTypeProvider * @param \Magento\CatalogImportExport\Model\Export\RowCustomizerInterface $rowCustomizer + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, @@ -758,6 +762,10 @@ public function export() * 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 60bcd0528cf20..0164b490e1c60 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -8,6 +8,9 @@ /** * Import entity product model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity { @@ -524,6 +527,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity * @param \Magento\Indexer\Model\IndexerRegistry $indexerRegistry * @param array $data * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Core\Helper\Data $coreData, @@ -824,6 +828,8 @@ protected function _initWebsites() * @param array $rowData * @param int $rowNum * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _isProductCategoryValid(array $rowData, $rowNum) { @@ -892,6 +898,7 @@ protected function _prepareRowForDb(array $rowData) * @param array $rowData * @param int $rowNum * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _isTierPriceValid(array $rowData, $rowNum) { @@ -959,6 +966,7 @@ protected function _isTierPriceValid(array $rowData, $rowNum) * @param array $rowData * @param int $rowNum * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _isGroupPriceValid(array $rowData, $rowNum) { @@ -1049,6 +1057,9 @@ protected function _isSuperProductsSkuValid($rowData, $rowNum) * Must be called after ALL products saving done. * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _saveLinks() { @@ -1282,6 +1293,9 @@ protected function _saveProductEntity(array $entityRowsIn, array $entityRowsUp) * Gather and save information about product entities. * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _saveProducts() { @@ -1636,6 +1650,7 @@ protected function _uploadMediaFiles($fileName) * * @param array $mediaGalleryData * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _saveMediaGallery(array $mediaGalleryData) { @@ -1918,6 +1933,9 @@ public function getWebsiteCodes() * @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 52639e64620ce..bb1c2245c6b77 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php @@ -1168,6 +1168,7 @@ protected function _collectOptionMainData( * @param array &$parentCount * @param array &$childCount * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _collectOptionTypeData( array $rowData, @@ -1437,6 +1438,7 @@ protected function _getPriceData(array $rowData, $optionId, $type) * @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 8685e70537ff3..9baf5e1afaa16 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Type/AbstractType.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Type/AbstractType.php @@ -122,6 +122,7 @@ public function __construct( * @param array $attrParams Refined attribute parameters. * @param mixed $attribute * @return \Magento\CatalogImportExport\Model\Import\Product\Type\AbstractType + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _addAttributeParams($attrSetName, array $attrParams, $attribute) { @@ -200,6 +201,7 @@ protected function _initAttributes() * * @param string $attrCode * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _isAttributeRequiredCheckNeeded($attrCode) { @@ -212,6 +214,7 @@ protected function _isAttributeRequiredCheckNeeded($attrCode) * @param array $rowData * @param int $rowNum * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _isParticularAttributesValid(array $rowData, $rowNum) { @@ -246,6 +249,7 @@ public function getParticularAttributes() * @param int $rowNum * @param bool $isNewProduct Optional * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isRowValid(array $rowData, $rowNum, $isNewProduct = true) { @@ -300,6 +304,7 @@ public function isSuitable() * @param bool $withDefaultValue * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function prepareAttributesWithDefaultValueForSave(array $rowData, $withDefaultValue = true) { diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php index 30a605e1a75b7..909f3b9d42d42 100644 --- a/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php +++ b/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php @@ -91,16 +91,19 @@ public function getIsInStock(); /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsQtyDecimal(); /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getShowDefaultNotificationMessage(); /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigMinQty(); @@ -125,6 +128,7 @@ public function getMinSaleQty(); /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigMaxSaleQty(); @@ -137,6 +141,7 @@ public function getMaxSaleQty(); /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigBackorders(); @@ -149,6 +154,7 @@ public function getBackorders(); /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigNotifyStockQty(); @@ -161,6 +167,7 @@ public function getNotifyStockQty(); /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigQtyIncrements(); @@ -173,6 +180,7 @@ public function getQtyIncrements(); /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigEnableQtyInc(); @@ -180,11 +188,13 @@ public function getUseConfigEnableQtyInc(); * Retrieve whether Quantity Increments is enabled * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getEnableQtyIncrements(); /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigManageStock(); @@ -192,6 +202,7 @@ public function getUseConfigManageStock(); * Retrieve can Manage Stock * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getManageStock(); @@ -202,6 +213,7 @@ public function getLowStockDate(); /** * @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 34b34a6ad08e1..28a538ece587e 100644 --- a/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php @@ -68,6 +68,7 @@ public function getNotifyStockQty($storeId = null); * * @param int $storeId * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getEnableQtyIncrements($storeId = null); @@ -98,6 +99,7 @@ public function getManageStock($storeId = null); * * @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 0e3233a749f49..01301a64318bc 100644 --- a/app/code/Magento/CatalogInventory/Helper/Stock.php +++ b/app/code/Magento/CatalogInventory/Helper/Stock.php @@ -83,6 +83,7 @@ public function assignStatusToProduct(\Magento\Catalog\Model\Product $product, $ * * @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 4c0be1afe7fad..b8a17f45f692d 100644 --- a/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php +++ b/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php @@ -35,6 +35,7 @@ class Item extends \Magento\CatalogInventory\Model\Stock\Item * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -112,6 +113,7 @@ public function hasAdminArea() /** * @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 f9705bdf870f7..755df20868dd2 100644 --- a/app/code/Magento/CatalogInventory/Model/Configuration.php +++ b/app/code/Magento/CatalogInventory/Model/Configuration.php @@ -254,6 +254,7 @@ public function getNotifyStockQty($store = null) * * @param null|string|bool|int|\Magento\Store\Model\Store $store * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getEnableQtyIncrements($store = null) { @@ -312,6 +313,7 @@ public function getManageStock($store = null) * * @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 a10c6d80870e8..d5f2bb21e7ee7 100644 --- a/app/code/Magento/CatalogInventory/Model/Observer.php +++ b/app/code/Magento/CatalogInventory/Model/Observer.php @@ -15,6 +15,7 @@ /** * 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 18c5eeeb34af3..fcf9b51b8a300 100644 --- a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php +++ b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php @@ -56,6 +56,9 @@ public function __construct( * * @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 642152da6e8f6..6a362336cf29b 100644 --- a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/StockItem.php +++ b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/StockItem.php @@ -49,6 +49,8 @@ public function __construct( * * @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 c9d48baae8462..a212b6c13dd40 100644 --- a/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/DefaultStock.php +++ b/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/DefaultStock.php @@ -131,6 +131,7 @@ public function setIsComposite($flag) * Check product type is composite * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsComposite() { @@ -156,6 +157,7 @@ protected function _isManageStock() * @param int|array $entityIds * @param bool $usePrimaryTable use primary or temporary index table * @return \Magento\Framework\DB\Select + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getStockStatusSelect($entityIds = null, $usePrimaryTable = false) { diff --git a/app/code/Magento/CatalogInventory/Model/Stock/Item.php b/app/code/Magento/CatalogInventory/Model/Stock/Item.php index bfb3d1fcec2a3..17c0711d921ab 100644 --- a/app/code/Magento/CatalogInventory/Model/Stock/Item.php +++ b/app/code/Magento/CatalogInventory/Model/Stock/Item.php @@ -39,6 +39,7 @@ * @method \Magento\CatalogInventory\Model\Stock\Item setQtyIncrements(float $value) * @method \Magento\CatalogInventory\Model\Stock\Item setUseConfigEnableQtyInc(int $value) * @method \Magento\CatalogInventory\Model\Stock\Item setEnableQtyIncrements(int $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Item extends AbstractExtensibleModel implements StockItemInterface { @@ -122,6 +123,7 @@ class Item extends AbstractExtensibleModel implements StockItemInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -211,6 +213,7 @@ public function getProductId() /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getStockStatusChangedAuto() { @@ -240,6 +243,7 @@ public function getIsInStock() /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsQtyDecimal() { @@ -248,6 +252,7 @@ public function getIsQtyDecimal() /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsDecimalDivided() { @@ -266,6 +271,7 @@ public function getLowStockDate() * Check if notification message should be added despite of backorders notification flag * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getShowDefaultNotificationMessage() { @@ -274,6 +280,7 @@ public function getShowDefaultNotificationMessage() /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigMinQty() { @@ -297,6 +304,7 @@ public function getMinQty() /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigMinSaleQty() { @@ -320,6 +328,7 @@ public function getMinSaleQty() /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigMaxSaleQty() { @@ -344,6 +353,7 @@ public function getMaxSaleQty() /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigNotifyStockQty() { @@ -365,6 +375,7 @@ public function getNotifyStockQty() /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigEnableQtyInc() { @@ -375,6 +386,7 @@ public function getUseConfigEnableQtyInc() * Retrieve whether Quantity Increments is enabled * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getEnableQtyIncrements() { @@ -388,6 +400,7 @@ public function getEnableQtyIncrements() * Retrieve whether config for Quantity Increments should be used * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigQtyIncrements() { @@ -418,6 +431,7 @@ public function getQtyIncrements() /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUseConfigBackorders() { @@ -439,6 +453,7 @@ public function getBackorders() /** * @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 8d74e574c3a20..46f65da7664ed 100644 --- a/app/code/Magento/CatalogInventory/Model/Stock/StockItemRepository.php +++ b/app/code/Magento/CatalogInventory/Model/Stock/StockItemRepository.php @@ -22,6 +22,7 @@ /** * Class StockItemRepository + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class StockItemRepository implements StockItemRepositoryInterface { @@ -86,6 +87,7 @@ class StockItemRepository implements StockItemRepositoryInterface * @param MapperFactory $mapperFactory * @param TimezoneInterface $localeDate * @param Processor $indexProcessor + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( StockConfigurationInterface $stockConfiguration, diff --git a/app/code/Magento/CatalogInventory/Model/Stock/StockRepository.php b/app/code/Magento/CatalogInventory/Model/Stock/StockRepository.php index cfd5cc8d9a262..01d0d54b574ac 100644 --- a/app/code/Magento/CatalogInventory/Model/Stock/StockRepository.php +++ b/app/code/Magento/CatalogInventory/Model/Stock/StockRepository.php @@ -17,6 +17,7 @@ /** * 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 e3eb4bc1c5796..613f20e6ed4dd 100644 --- a/app/code/Magento/CatalogInventory/Model/Stock/StockStatusRepository.php +++ b/app/code/Magento/CatalogInventory/Model/Stock/StockStatusRepository.php @@ -15,6 +15,7 @@ /** * 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 1bf059039ce5e..c7a1d895e094d 100644 --- a/app/code/Magento/CatalogInventory/Model/StockIndex.php +++ b/app/code/Magento/CatalogInventory/Model/StockIndex.php @@ -74,6 +74,7 @@ public function __construct( * @param int $productId * @param int $websiteId * @return true + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function rebuild($productId = null, $websiteId = null) { @@ -126,6 +127,7 @@ public function updateProductStockStatus($productId, $websiteId) * @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 f6f39f50015fe..235a248f17e12 100644 --- a/app/code/Magento/CatalogInventory/Model/StockManagement.php +++ b/app/code/Magento/CatalogInventory/Model/StockManagement.php @@ -67,6 +67,7 @@ public function __construct( * @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 8fa8bba389bf3..e67d97fe426fa 100644 --- a/app/code/Magento/CatalogInventory/Model/StockRegistryProvider.php +++ b/app/code/Magento/CatalogInventory/Model/StockRegistryProvider.php @@ -18,6 +18,7 @@ /** * 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 a69d3a40ce998..bb82b4c100f25 100644 --- a/app/code/Magento/CatalogInventory/Model/StockStateProvider.php +++ b/app/code/Magento/CatalogInventory/Model/StockStateProvider.php @@ -92,6 +92,9 @@ public function verifyNotification(StockItemInterface $stockItem) * @param int|float $summaryQty * @param int|float $origQty * @return \Magento\Framework\Object + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function checkQuoteItemQty(StockItemInterface $stockItem, $qty, $summaryQty, $origQty = 0) { @@ -319,6 +322,8 @@ public function checkQtyIncrements(StockItemInterface $stockItem, $qty) * * @param StockItemInterface $stockItem * @return float + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getStockQty(StockItemInterface $stockItem) { diff --git a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Actions.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Actions.php index 702c263fc45e5..803e7db212c54 100644 --- a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Actions.php +++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Actions.php @@ -52,6 +52,7 @@ public function isHidden() /** * @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 c8344ff8dbe47..d3020b2298d12 100644 --- a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Main.php +++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Main.php @@ -105,6 +105,7 @@ public function isHidden() /** * @return Form + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog/Save.php b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog/Save.php index 70f07b81bfb0f..cf1ae7917c5a7 100644 --- a/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog/Save.php +++ b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog/Save.php @@ -11,6 +11,7 @@ class Save extends \Magento\CatalogRule\Controller\Adminhtml\Promo\Catalog { /** * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php b/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php index 9c5cbbedb2b1e..bada3b8bb6fd1 100644 --- a/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php +++ b/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php @@ -11,6 +11,9 @@ use Magento\CatalogRule\Model\Rule; use Magento\Framework\Pricing\PriceCurrencyInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class IndexBuilder { const SECONDS_IN_DAY = 86400; @@ -81,6 +84,7 @@ class IndexBuilder * @param \Magento\Framework\Stdlib\DateTime\DateTime $dateTime * @param \Magento\Catalog\Model\ProductFactory $productFactory * @param int $batchCount + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( RuleCollectionFactory $ruleCollectionFactory, @@ -209,6 +213,7 @@ protected function cleanByIds($productIds) * @param Product $product * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function applyRule(Rule $rule, $product) { @@ -317,6 +322,8 @@ protected function getTable($tableName) /** * @param Rule $rule * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function updateRuleProductData(Rule $rule) { @@ -399,6 +406,9 @@ protected function updateRuleProductData(Rule $rule) * @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 fe95ba131b6dd..9aef0eab0b36e 100644 --- a/app/code/Magento/CatalogRule/Model/Observer.php +++ b/app/code/Magento/CatalogRule/Model/Observer.php @@ -21,6 +21,9 @@ 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 8d2f50e3fd9f3..c190214d71335 100644 --- a/app/code/Magento/CatalogRule/Model/Resource/Rule.php +++ b/app/code/Magento/CatalogRule/Model/Resource/Rule.php @@ -99,6 +99,7 @@ class Rule extends \Magento\Rule\Model\Resource\AbstractResource * @param \Psr\Log\LoggerInterface $logger * @param \Magento\Framework\Stdlib\DateTime $dateTime * @param PriceCurrencyInterface $priceCurrency + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Resource $resource, diff --git a/app/code/Magento/CatalogRule/Model/Rule.php b/app/code/Magento/CatalogRule/Model/Rule.php index dfbad0eb86fef..78b9a2b1e0768 100644 --- a/app/code/Magento/CatalogRule/Model/Rule.php +++ b/app/code/Magento/CatalogRule/Model/Rule.php @@ -36,6 +36,8 @@ * @method \Magento\CatalogRule\Model\Rule setDiscountAmount(float $value) * @method string getWebsiteIds() * @method \Magento\CatalogRule\Model\Rule setWebsiteIds(string $value) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Rule extends \Magento\Rule\Model\AbstractModel { @@ -159,6 +161,7 @@ class Rule extends \Magento\Rule\Model\AbstractModel * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $relatedCacheTypes * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -340,6 +343,7 @@ protected function _getWebsitesMap() * @param Product $product * @param float $price * @return float|null + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function calcProductPriceRule(Product $product, $price) { diff --git a/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Aggregation/DataProvider.php b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Aggregation/DataProvider.php index 34f434eb7083c..9619c899c6582 100644 --- a/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Aggregation/DataProvider.php +++ b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Aggregation/DataProvider.php @@ -15,6 +15,9 @@ use Magento\Framework\Search\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 46d19101a7d79..c6c7da4ae01a6 100644 --- a/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Dynamic/DataProvider.php +++ b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Dynamic/DataProvider.php @@ -16,6 +16,9 @@ use Magento\Framework\Search\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 0ad924de9c398..44f3db45bf753 100644 --- a/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php +++ b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php @@ -62,6 +62,7 @@ public function __construct( /** * {@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 c537e2b8e5e78..60ba4855b1854 100644 --- a/app/code/Magento/CatalogSearch/Model/Advanced.php +++ b/app/code/Magento/CatalogSearch/Model/Advanced.php @@ -41,6 +41,7 @@ * @method \Magento\CatalogSearch\Model\Advanced setUpdatedAt(string $value) * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Advanced extends \Magento\Framework\Model\AbstractModel { @@ -120,6 +121,7 @@ class Advanced extends \Magento\Framework\Model\AbstractModel * @param ProductFactory $productFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( Context $context, @@ -155,6 +157,8 @@ public function __construct( * @param array $values * @return $this * @throws Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function addFilters($values) { @@ -283,6 +287,8 @@ public function prepareProductCollection($collection) * @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 25a1c87a70508..07a8bf4a14174 100644 --- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php @@ -6,6 +6,10 @@ use Magento\Framework\Pricing\PriceCurrencyInterface; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Full { /** @@ -154,6 +158,7 @@ class Full * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate * @param \Magento\CatalogSearch\Model\Resource\Fulltext $fulltextResource * @param PriceCurrencyInterface $priceCurrency + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Resource $resource, @@ -258,6 +263,8 @@ protected function rebuildIndex($productIds = null) * @param int $storeId Store View Id * @param int|array $productIds Product Entity Id * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function rebuildStoreIndex($storeId, $productIds = null) { @@ -636,6 +643,8 @@ protected function getProductEmulator($typeId) * @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 4951758f227b0..a2c1b6340503f 100644 --- a/app/code/Magento/CatalogSearch/Model/Layer/Filter/Decimal.php +++ b/app/code/Magento/CatalogSearch/Model/Layer/Filter/Decimal.php @@ -88,6 +88,7 @@ public function apply(\Magento\Framework\App\RequestInterface $request) * * @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 a364ae6e605ae..4081154e8e69a 100644 --- a/app/code/Magento/CatalogSearch/Model/Layer/Filter/Price.php +++ b/app/code/Magento/CatalogSearch/Model/Layer/Filter/Price.php @@ -53,6 +53,7 @@ class Price extends AbstractFilter * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency * @param \Magento\Catalog\Model\Layer\Filter\Dynamic\AlgorithmFactory $algorithmFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Catalog\Model\Layer\Filter\ItemFactory $filterItemFactory, @@ -106,6 +107,7 @@ public function setCurrencyRate($rate) * * @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 c0f0c1662b289..d4a19e82a0501 100644 --- a/app/code/Magento/CatalogSearch/Model/Resource/Advanced.php +++ b/app/code/Magento/CatalogSearch/Model/Resource/Advanced.php @@ -84,6 +84,7 @@ protected function _dispatchPreparePriceEvent($select) * @param \Magento\Catalog\Model\Resource\Eav\Attribute $attribute * @param string|array $value * @return string|array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function prepareCondition($attribute, $value) { @@ -121,6 +122,7 @@ public function prepareCondition($attribute, $value) * @param string|array $value * @param int $rate * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function addRatedPriceFilter($collection, $attribute, $value, $rate = 1) { @@ -165,6 +167,7 @@ public function addRatedPriceFilter($collection, $attribute, $value, $rate = 1) * @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 f8d25720209b3..37029e4365bfd 100644 --- a/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php +++ b/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php @@ -10,6 +10,7 @@ * Collection Advanced * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection { @@ -121,6 +122,7 @@ public function addFieldsToFilter($fields) /** * @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 3a6827063f78f..92d2fffb6de27 100644 --- a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php +++ b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php @@ -10,6 +10,7 @@ /** * 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 2880a05ef4642..678ffa8339bbf 100644 --- a/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php +++ b/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php @@ -8,6 +8,7 @@ * Search collection * * @deprecated + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection implements \Magento\Search\Model\SearchCollectionInterface { @@ -270,6 +271,8 @@ protected function _getSearchEntityIdsSql($query, $searchOnlyInCurrentStore = tr * * @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 df7bd250c96e0..c1d723999fb0f 100644 --- a/app/code/Magento/CatalogSearch/Model/Search/RequestGenerator.php +++ b/app/code/Magento/CatalogSearch/Model/Search/RequestGenerator.php @@ -135,6 +135,7 @@ protected function getSearchableAttributes() * Generate advanced search request * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ private function generateAdvancedSearchRequest() { diff --git a/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php b/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php index 3779f07c8bfd2..c20e511bf7e28 100644 --- a/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php +++ b/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php @@ -7,6 +7,7 @@ /** * Catalog Products List widget block * Class ProductsList + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class ProductsList extends \Magento\Catalog\Block\Product\AbstractProduct implements \Magento\Widget\Block\BlockInterface { @@ -146,6 +147,7 @@ public function getCacheKeyInfo() /** * {@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 d41ab443e4dae..c57feb10ca695 100644 --- a/app/code/Magento/CatalogWidget/Model/Rule/Condition/Product.php +++ b/app/code/Magento/CatalogWidget/Model/Rule/Condition/Product.php @@ -42,6 +42,7 @@ class Product extends \Magento\Rule\Model\Condition\Product\AbstractProduct * @param \Magento\Framework\Locale\FormatInterface $localeFormat * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Rule\Model\Condition\Context $context, diff --git a/app/code/Magento/Centinel/Model/Config.php b/app/code/Magento/Centinel/Model/Config.php index 05ca3a3f72576..89cc104a3c524 100644 --- a/app/code/Magento/Centinel/Model/Config.php +++ b/app/code/Magento/Centinel/Model/Config.php @@ -116,6 +116,7 @@ public function getTransactionPwd() * Return flag - is centinel mode test * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsTestMode() { @@ -137,6 +138,7 @@ private function _getServiceConfigValue($key) * 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 f364c33e8a501..3e78adfc8af44 100644 --- a/app/code/Magento/Centinel/Model/Service.php +++ b/app/code/Magento/Centinel/Model/Service.php @@ -141,6 +141,7 @@ protected function _getConfig() * @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 de32102b29bf4..ba75f85d48eb2 100644 --- a/app/code/Magento/Centinel/Model/State/Mastercard.php +++ b/app/code/Magento/Centinel/Model/State/Mastercard.php @@ -25,6 +25,8 @@ public function isAuthenticateAllowed() * Result depends from flag self::getIsModeStrict() * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function isAuthenticateSuccessful() { @@ -132,6 +134,7 @@ protected function _isLookupStrictSuccessful() * 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 9ed47d9e00bca..1d73658f29879 100644 --- a/app/code/Magento/Centinel/Model/State/Visa.php +++ b/app/code/Magento/Centinel/Model/State/Visa.php @@ -25,6 +25,9 @@ public function isAuthenticateAllowed() * Result depends from flag self::getIsModeStrict() * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function isAuthenticateSuccessful() { @@ -151,6 +154,7 @@ protected function _isLookupStrictSuccessful() * Analyse lookup`s results. If lookup is soft successful return true * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _isLookupSoftSuccessful() { diff --git a/app/code/Magento/Checkout/Block/Cart.php b/app/code/Magento/Checkout/Block/Cart.php index 7f3fa41ea8f03..ea043a7b5e5e0 100644 --- a/app/code/Magento/Checkout/Block/Cart.php +++ b/app/code/Magento/Checkout/Block/Cart.php @@ -66,6 +66,7 @@ protected function _construct() * prepare cart items URLs * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function prepareItemUrls() { @@ -163,6 +164,7 @@ public function getContinueShoppingUrl() /** * @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 d8f150979b513..77aa7bb122dc0 100644 --- a/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php +++ b/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php @@ -15,6 +15,7 @@ * * @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 17f3d8f19d484..0aec7f5a8f0d2 100644 --- a/app/code/Magento/Checkout/Block/Cart/Shipping.php +++ b/app/code/Magento/Checkout/Block/Cart/Shipping.php @@ -195,6 +195,7 @@ public function getEstimateRegion() * Show City in Shipping Estimation * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCityActive() { @@ -205,6 +206,7 @@ public function getCityActive() * 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 2d03078111b14..6e08aebd3d747 100644 --- a/app/code/Magento/Checkout/Block/Cart/Sidebar.php +++ b/app/code/Magento/Checkout/Block/Cart/Sidebar.php @@ -158,6 +158,7 @@ public function isPossibleOnepageCheckout() * Get one page checkout page url * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCheckoutUrl() { @@ -168,6 +169,7 @@ public function getCheckoutUrl() * Define if Mini Shopping Cart Pop-Up Menu enabled * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsNeedToDisplaySideBar() { diff --git a/app/code/Magento/Checkout/Block/Onepage.php b/app/code/Magento/Checkout/Block/Onepage.php index 72d116e13c643..1a5f46fb32f03 100644 --- a/app/code/Magento/Checkout/Block/Onepage.php +++ b/app/code/Magento/Checkout/Block/Onepage.php @@ -25,6 +25,7 @@ class Onepage extends \Magento\Checkout\Block\Onepage\AbstractOnepage * @param \Magento\Framework\App\Http\Context $httpContext * @param \Magento\Customer\Model\Address\Mapper $addressMapper * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Checkout/Block/Onepage/AbstractOnepage.php b/app/code/Magento/Checkout/Block/Onepage/AbstractOnepage.php index 746296fc98144..4bd52a59ef675 100644 --- a/app/code/Magento/Checkout/Block/Onepage/AbstractOnepage.php +++ b/app/code/Magento/Checkout/Block/Onepage/AbstractOnepage.php @@ -13,6 +13,7 @@ /** * One page common functionality block + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractOnepage extends \Magento\Framework\View\Element\Template { @@ -99,6 +100,7 @@ abstract class AbstractOnepage extends \Magento\Framework\View\Element\Template * @param \Magento\Framework\App\Http\Context $httpContext * @param \Magento\Customer\Model\Address\Mapper $addressMapper * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Checkout/Block/Onepage/Billing.php b/app/code/Magento/Checkout/Block/Onepage/Billing.php index 5f232f4c6f2e3..e893759986478 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Billing.php +++ b/app/code/Magento/Checkout/Block/Onepage/Billing.php @@ -9,6 +9,7 @@ /** * One page checkout status + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Billing extends \Magento\Checkout\Block\Onepage\AbstractOnepage { @@ -45,6 +46,7 @@ class Billing extends \Magento\Checkout\Block\Onepage\AbstractOnepage * @param \Magento\Customer\Model\Address\Mapper $addressMapper * @param \Magento\Sales\Model\Quote\AddressFactory $addressFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Checkout/Block/Onepage/Login.php b/app/code/Magento/Checkout/Block/Onepage/Login.php index 20ed2288b6354..4926d88ba5b88 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Login.php +++ b/app/code/Magento/Checkout/Block/Onepage/Login.php @@ -10,6 +10,7 @@ /** * One page checkout status + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Login extends AbstractOnepage { @@ -53,6 +54,7 @@ class Login extends AbstractOnepage * @param \Magento\Customer\Model\Registration $registration * @param \Magento\Customer\Model\Address\Mapper $dataObjectConverter * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Checkout/Block/Onepage/Shipping.php b/app/code/Magento/Checkout/Block/Onepage/Shipping.php index 9cc46d16483e4..e1991fd71e651 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Shipping.php +++ b/app/code/Magento/Checkout/Block/Onepage/Shipping.php @@ -9,6 +9,7 @@ /** * One page checkout status + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Shipping extends \Magento\Checkout\Block\Onepage\AbstractOnepage { @@ -38,6 +39,7 @@ class Shipping extends \Magento\Checkout\Block\Onepage\AbstractOnepage * @param \Magento\Customer\Model\Address\Mapper $addressMapper * @param \Magento\Sales\Model\Quote\AddressFactory $addressFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Checkout/Block/Onepage/Shipping/Method/Available.php b/app/code/Magento/Checkout/Block/Onepage/Shipping/Method/Available.php index 713b5331a4b8d..4d854962a073e 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Shipping/Method/Available.php +++ b/app/code/Magento/Checkout/Block/Onepage/Shipping/Method/Available.php @@ -10,6 +10,7 @@ /** * One page checkout status + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Available extends \Magento\Checkout\Block\Onepage\AbstractOnepage { @@ -36,6 +37,7 @@ class Available extends \Magento\Checkout\Block\Onepage\AbstractOnepage * @param \Magento\Framework\App\Http\Context $httpContext * @param \Magento\Customer\Model\Address\Mapper $addressMapper * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Checkout/Block/Total/Nominal.php b/app/code/Magento/Checkout/Block/Total/Nominal.php index e77ae71bb9e83..c063789c15f4f 100644 --- a/app/code/Magento/Checkout/Block/Total/Nominal.php +++ b/app/code/Magento/Checkout/Block/Total/Nominal.php @@ -103,6 +103,7 @@ public function getItemDetailsRowAmount(\Magento\Framework\Object $row) * * @param \Magento\Framework\Object $row * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getItemDetailsRowIsCompounded(\Magento\Framework\Object $row) { diff --git a/app/code/Magento/Checkout/Controller/Cart/Add.php b/app/code/Magento/Checkout/Controller/Cart/Add.php index 64abe026ff2f5..805d58e89c5d6 100644 --- a/app/code/Magento/Checkout/Controller/Cart/Add.php +++ b/app/code/Magento/Checkout/Controller/Cart/Add.php @@ -61,6 +61,7 @@ protected function _initProduct() * Add product to shopping cart action * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Checkout/Controller/Cart/CouponPost.php b/app/code/Magento/Checkout/Controller/Cart/CouponPost.php index 4bb72d37daeab..936e1634422eb 100644 --- a/app/code/Magento/Checkout/Controller/Cart/CouponPost.php +++ b/app/code/Magento/Checkout/Controller/Cart/CouponPost.php @@ -49,6 +49,8 @@ public function __construct( * Initialize coupon * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Checkout/Controller/Cart/UpdateItemOptions.php b/app/code/Magento/Checkout/Controller/Cart/UpdateItemOptions.php index 7cc5528e1a445..36d2d63ffad1d 100644 --- a/app/code/Magento/Checkout/Controller/Cart/UpdateItemOptions.php +++ b/app/code/Magento/Checkout/Controller/Cart/UpdateItemOptions.php @@ -11,6 +11,8 @@ class UpdateItemOptions extends \Magento\Checkout\Controller\Cart * Update product configuration for a cart item * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Checkout/Controller/Onepage.php b/app/code/Magento/Checkout/Controller/Onepage.php index d4d5b6836ad74..0ff159b0e7806 100644 --- a/app/code/Magento/Checkout/Controller/Onepage.php +++ b/app/code/Magento/Checkout/Controller/Onepage.php @@ -9,6 +9,9 @@ use Magento\Framework\App\Action\NotFoundException; use Magento\Framework\App\RequestInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Onepage extends Action { /** @@ -68,6 +71,7 @@ class Onepage extends Action * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\View\LayoutFactory $layoutFactory * @param \Magento\Sales\Model\QuoteRepository $quoteRepository + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/app/code/Magento/Checkout/Controller/Onepage/SaveOrder.php b/app/code/Magento/Checkout/Controller/Onepage/SaveOrder.php index 1fa75bfe5cc22..4ceae281def70 100644 --- a/app/code/Magento/Checkout/Controller/Onepage/SaveOrder.php +++ b/app/code/Magento/Checkout/Controller/Onepage/SaveOrder.php @@ -11,6 +11,8 @@ class SaveOrder extends \Magento\Checkout\Controller\Onepage * Create order action * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function execute() { diff --git a/app/code/Magento/Checkout/Controller/Onepage/SavePayment.php b/app/code/Magento/Checkout/Controller/Onepage/SavePayment.php index 28e561ecaa531..5671067082768 100644 --- a/app/code/Magento/Checkout/Controller/Onepage/SavePayment.php +++ b/app/code/Magento/Checkout/Controller/Onepage/SavePayment.php @@ -23,6 +23,7 @@ protected function _getReviewHtml() * 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 7dd2339de1e46..215468d34b680 100644 --- a/app/code/Magento/Checkout/Helper/Cart.php +++ b/app/code/Magento/Checkout/Helper/Cart.php @@ -190,6 +190,7 @@ public function getSummaryCount() * Check quote for virtual products only * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsVirtualQuote() { @@ -201,6 +202,7 @@ public function getIsVirtualQuote() * * @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 130ab9c9cc55e..46714dc7b00db 100644 --- a/app/code/Magento/Checkout/Helper/Data.php +++ b/app/code/Magento/Checkout/Helper/Data.php @@ -12,6 +12,7 @@ * Checkout default helper * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Data extends \Magento\Framework\App\Helper\AbstractHelper { @@ -206,6 +207,8 @@ public function getBaseSubtotalInclTax($item) * @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 1ef8dc6e160ea..cfd0cb6ab3cf8 100644 --- a/app/code/Magento/Checkout/Model/Cart.php +++ b/app/code/Magento/Checkout/Model/Cart.php @@ -12,6 +12,7 @@ /** * Shopping cart model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Cart extends Object implements CartInterface { @@ -101,6 +102,7 @@ class Cart extends Object implements CartInterface * @param \Magento\Sales\Model\QuoteRepository $quoteRepository * @param ProductRepositoryInterface $productRepository * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Event\ManagerInterface $eventManager, @@ -329,6 +331,7 @@ protected function _getProductRequest($requestInfo) * @param \Magento\Framework\Object|int|array $requestInfo * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function addProduct($productInfo, $requestInfo = null) { @@ -472,6 +475,8 @@ public function suggestItemsQty($data) * @param array $data * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function updateItems($data) { @@ -656,6 +661,7 @@ public function getItemsQty() * @throws \Magento\Framework\Model\Exception * * @see \Magento\Sales\Model\Quote::updateItem() + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function updateItem($itemId, $requestInfo = null, $updatingParams = null) { diff --git a/app/code/Magento/Checkout/Model/Session.php b/app/code/Magento/Checkout/Model/Session.php index e96f1f02dd641..a96deebe17e24 100644 --- a/app/code/Magento/Checkout/Model/Session.php +++ b/app/code/Magento/Checkout/Model/Session.php @@ -7,6 +7,9 @@ use Magento\Customer\Api\Data\CustomerInterface; use Magento\Sales\Model\Quote; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Session extends \Magento\Framework\Session\SessionManager { /** @@ -93,6 +96,7 @@ class Session extends \Magento\Framework\Session\SessionManager * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Request\Http $request, @@ -169,6 +173,8 @@ public function setLoadInactive($load = true) * 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 e8aef6e7a50aa..d489102ac37d7 100644 --- a/app/code/Magento/Checkout/Model/Type/Onepage.php +++ b/app/code/Magento/Checkout/Model/Type/Onepage.php @@ -19,6 +19,11 @@ use Magento\Framework\Exception\NoSuchEntityException; use Magento\Sales\Model\Order\Email\Sender\OrderSender; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Onepage { /** @@ -191,6 +196,7 @@ class Onepage * @param CustomerRepositoryInterface $customerRepository * @param \Magento\Sales\Model\QuoteRepository $quoteRepository * @param \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Event\ManagerInterface $eventManager, @@ -297,6 +303,7 @@ public function getCustomerSession() * Initialize quote state to be valid for one page checkout * * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function initCheckout() { @@ -371,6 +378,9 @@ public function saveCheckoutMethod($method) * @param array $data * @param int $customerAddressId * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function saveBilling($data, $customerAddressId) { @@ -622,6 +632,8 @@ protected function _validateCustomerData(array $data) * @param array $data * @param int $customerAddressId * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function saveShipping($data, $customerAddressId) { @@ -842,6 +854,7 @@ protected function _prepareNewCustomerQuote() * 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 e408788b6ec95..14b0bc8d06a5b 100644 --- a/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php +++ b/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php @@ -14,6 +14,7 @@ /** * Cart read service object. + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class ReadService implements ReadServiceInterface { diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php index 220d45a510d57..90c9458631810 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php @@ -171,6 +171,7 @@ public function getNoteNotify() * 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 ef53bed0d8f39..dbe6c60f93449 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php @@ -110,6 +110,7 @@ public function getBaseAmount() * 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 510f7db92e60e..d7161fcb8bff6 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/CartMapper.php +++ b/app/code/Magento/Checkout/Service/V1/Data/CartMapper.php @@ -9,6 +9,7 @@ /** * Cart mapper + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class CartMapper { diff --git a/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Edit/Form.php b/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Edit/Form.php index 970da457b992f..6207184b390c8 100644 --- a/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Edit/Form.php +++ b/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Edit/Form.php @@ -44,6 +44,7 @@ protected function _construct() /** * @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 17b4768ccdd32..ce1d51909cb96 100644 --- a/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Grid.php +++ b/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Grid.php @@ -118,6 +118,7 @@ protected function _afterLoadCollection() * @param \Magento\Framework\Data\Collection $collection * @param \Magento\Backend\Block\Widget\Grid\Column $column * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _filterStoreCondition($collection, $column) { diff --git a/app/code/Magento/CheckoutAgreements/Controller/Adminhtml/Agreement/Edit.php b/app/code/Magento/CheckoutAgreements/Controller/Adminhtml/Agreement/Edit.php index 45cf11e85abea..0db0b8ef7e06f 100644 --- a/app/code/Magento/CheckoutAgreements/Controller/Adminhtml/Agreement/Edit.php +++ b/app/code/Magento/CheckoutAgreements/Controller/Adminhtml/Agreement/Edit.php @@ -9,6 +9,7 @@ class Edit extends \Magento\CheckoutAgreements\Controller\Adminhtml\Agreement { /** * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Main.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Main.php index 08b2e44fe258b..3fe6b9853e63f 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Main.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Main.php @@ -36,6 +36,7 @@ public function __construct( * 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 8c747bcc7289e..9ff73a1c6606a 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Page/Grid.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Grid.php @@ -175,6 +175,7 @@ protected function _afterLoadCollection() * @param \Magento\Framework\Data\Collection $collection * @param \Magento\Framework\Object $column * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _filterStoreCondition($collection, \Magento\Framework\Object $column) { diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Block/Edit.php b/app/code/Magento/Cms/Controller/Adminhtml/Block/Edit.php index b6c1688c8ab11..58b72a76abdf3 100644 --- a/app/code/Magento/Cms/Controller/Adminhtml/Block/Edit.php +++ b/app/code/Magento/Cms/Controller/Adminhtml/Block/Edit.php @@ -11,6 +11,7 @@ class Edit extends \Magento\Cms\Controller\Adminhtml\Block * Edit CMS block * * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Page/Edit.php b/app/code/Magento/Cms/Controller/Adminhtml/Page/Edit.php index 1044910cc4c96..d3f0b4ff466dd 100644 --- a/app/code/Magento/Cms/Controller/Adminhtml/Page/Edit.php +++ b/app/code/Magento/Cms/Controller/Adminhtml/Page/Edit.php @@ -59,6 +59,7 @@ protected function _initAction() * 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 0a2861b70a9ea..7716b2317329f 100644 --- a/app/code/Magento/Cms/Controller/Index/Index.php +++ b/app/code/Magento/Cms/Controller/Index/Index.php @@ -12,6 +12,7 @@ class Index extends \Magento\Framework\App\Action\Action * * @param string|null $coreRoute * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function execute($coreRoute = null) { diff --git a/app/code/Magento/Cms/Helper/Page.php b/app/code/Magento/Cms/Helper/Page.php index 7b65b88404183..cb389deea1e02 100644 --- a/app/code/Magento/Cms/Helper/Page.php +++ b/app/code/Magento/Cms/Helper/Page.php @@ -92,6 +92,7 @@ class Page extends \Magento\Framework\App\Helper\AbstractHelper * @param \Magento\Framework\Escaper $escaper * @param \Magento\Framework\App\ViewInterface $view * @param \Magento\Framework\View\Page\Config $pageConfig + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Helper\Context $context, @@ -139,6 +140,8 @@ public function renderPage(Action $action, $pageId = null) * @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 8d75bc9f05f2c..5da75e6bfd8e2 100644 --- a/app/code/Magento/Cms/Model/Resource/Block.php +++ b/app/code/Magento/Cms/Model/Resource/Block.php @@ -193,6 +193,7 @@ protected function _getLoadSelect($field, $value, $object) * * @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 2767beae0700d..593cf7919be73 100644 --- a/app/code/Magento/Cms/Model/Resource/CmsCriteriaMapper.php +++ b/app/code/Magento/Cms/Model/Resource/CmsCriteriaMapper.php @@ -37,6 +37,7 @@ protected function init() * * @param bool $flag * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function mapFirstStoreFlag($flag) { diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php index e7d6933c8e613..f5c66b52d082f 100644 --- a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php +++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php @@ -11,6 +11,8 @@ * Wysiwyg Images model * * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Storage extends \Magento\Framework\Object { @@ -186,6 +188,8 @@ public function __construct( * * @param string $path Parent directory path * @return \Magento\Framework\Data\Collection\Filesystem + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getDirsCollection($path) { diff --git a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Attribute/Edit/Tab/Variations/Main.php b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Attribute/Edit/Tab/Variations/Main.php index 248bc92b55f15..17127099bfdee 100644 --- a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Attribute/Edit/Tab/Variations/Main.php +++ b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Attribute/Edit/Tab/Variations/Main.php @@ -10,6 +10,9 @@ */ namespace Magento\ConfigurableProduct\Block\Adminhtml\Product\Attribute\Edit\Tab\Variations; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Main extends \Magento\Eav\Block\Adminhtml\Attribute\Edit\Main\AbstractMain { /** diff --git a/app/code/Magento/Core/App/Router/Base.php b/app/code/Magento/Core/App/Router/Base.php index bfb4a0d21550a..22523d3cb17cd 100644 --- a/app/code/Magento/Core/App/Router/Base.php +++ b/app/code/Magento/Core/App/Router/Base.php @@ -8,6 +8,10 @@ use Magento\Framework\App\RequestInterface; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Base implements \Magento\Framework\App\RouterInterface { /** @@ -116,6 +120,8 @@ class Base implements \Magento\Framework\App\RouterInterface * @param string $routerId * @param \Magento\Framework\Code\NameBuilder $nameBuilder * @throws \InvalidArgumentException + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct( \Magento\Framework\App\Router\ActionList $actionList, @@ -253,6 +259,8 @@ protected function getNotFoundAction($currentModuleName, RequestInterface $reque * @param \Magento\Framework\App\RequestInterface $request * @param array $params * @return \Magento\Framework\App\Action\Action|null + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function matchAction(\Magento\Framework\App\RequestInterface $request, array $params) { @@ -344,6 +352,7 @@ public function getActionClassName($module, $actionPath) * @param \Magento\Framework\App\RequestInterface $request * @param string $path * @return void + * @SuppressWarnings(PHPMD.ExitExpression) */ protected function _checkShouldBeSecure(\Magento\Framework\App\RequestInterface $request, $path = '') { diff --git a/app/code/Magento/Core/Model/File/Storage.php b/app/code/Magento/Core/Model/File/Storage.php index 153ebd3aab780..b610a3c3cd43d 100644 --- a/app/code/Magento/Core/Model/File/Storage.php +++ b/app/code/Magento/Core/Model/File/Storage.php @@ -10,6 +10,7 @@ /** * Class Storage + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Storage extends AbstractModel { @@ -96,6 +97,7 @@ class Storage extends AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -194,6 +196,8 @@ public function getStorageModel($storage = null, $params = []) * * @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 6484ffcb07031..be0c83b686f66 100644 --- a/app/code/Magento/Core/Model/File/Storage/Database.php +++ b/app/code/Magento/Core/Model/File/Storage/Database.php @@ -52,6 +52,7 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param null $connectionName * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Core/Model/File/Storage/Directory/Database.php b/app/code/Magento/Core/Model/File/Storage/Directory/Database.php index 0174d3b1c9047..34d7fd72e3461 100644 --- a/app/code/Magento/Core/Model/File/Storage/Directory/Database.php +++ b/app/code/Magento/Core/Model/File/Storage/Directory/Database.php @@ -39,6 +39,7 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param null $connectionName * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Core/Model/File/Storage/File.php b/app/code/Magento/Core/Model/File/Storage/File.php index 66ac32332d005..2403061007524 100644 --- a/app/code/Magento/Core/Model/File/Storage/File.php +++ b/app/code/Magento/Core/Model/File/Storage/File.php @@ -130,6 +130,7 @@ public function clear() * @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 cb6f3f4cad13d..3d06707ecbdf4 100644 --- a/app/code/Magento/Core/Model/File/Storage/Flag.php +++ b/app/code/Magento/Core/Model/File/Storage/Flag.php @@ -49,6 +49,7 @@ class Flag extends \Magento\Framework\Flag * * @param \Exception $e * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function passError(\Exception $e) { diff --git a/app/code/Magento/Core/Model/File/Validator/AvailablePath.php b/app/code/Magento/Core/Model/File/Validator/AvailablePath.php index af196001769c6..34e39d97f3608 100644 --- a/app/code/Magento/Core/Model/File/Validator/AvailablePath.php +++ b/app/code/Magento/Core/Model/File/Validator/AvailablePath.php @@ -190,6 +190,7 @@ public function getAvailablePaths() * @param string $value File/dir path * @return bool * @throws \Exception Throw exception on empty both paths masks types + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isValid($value) { @@ -231,6 +232,8 @@ public function isValid($value) * @param string[] $paths Protected/available paths masks * @param bool $protected Paths masks is protected? * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _isValidByPaths($valuePathInfo, $paths, $protected) { diff --git a/app/code/Magento/Core/Model/Layout/Merge.php b/app/code/Magento/Core/Model/Layout/Merge.php index a1533f98efb5b..33df2137fa775 100644 --- a/app/code/Magento/Core/Model/Layout/Merge.php +++ b/app/code/Magento/Core/Model/Layout/Merge.php @@ -9,6 +9,8 @@ /** * Layout merge model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Merge implements \Magento\Framework\View\Layout\ProcessorInterface { @@ -168,6 +170,7 @@ class Merge implements \Magento\Framework\View\Layout\ProcessorInterface * @param \Magento\Framework\Filesystem $filesystem * @param \Magento\Framework\View\Design\ThemeInterface $theme Non-injectable theme instance * @param string $cacheSuffix + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\DesignInterface $design, diff --git a/app/code/Magento/Core/Model/Observer.php b/app/code/Magento/Core/Model/Observer.php index 9f67373accaa2..c8ac454a76d0e 100644 --- a/app/code/Magento/Core/Model/Observer.php +++ b/app/code/Magento/Core/Model/Observer.php @@ -56,6 +56,7 @@ class Observer * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param Theme\Registration $registration * @param \Psr\Log\LoggerInterface $logger + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct( \Magento\Framework\App\Cache\Frontend\Pool $cacheFrontendPool, diff --git a/app/code/Magento/Core/Model/Resource/Design.php b/app/code/Magento/Core/Model/Resource/Design.php index b9313dc4f5637..0e7d6525dbcb2 100644 --- a/app/code/Magento/Core/Model/Resource/Design.php +++ b/app/code/Magento/Core/Model/Resource/Design.php @@ -105,6 +105,8 @@ public function _beforeSave(\Magento\Framework\Model\AbstractModel $object) * @param string $dateTo * @param int $currentId * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _checkIntersection($storeId, $dateFrom, $dateTo, $currentId) { diff --git a/app/code/Magento/Core/Model/Url/RouteParamsResolver.php b/app/code/Magento/Core/Model/Url/RouteParamsResolver.php index 221c8e2fa580c..5ea49391c630a 100644 --- a/app/code/Magento/Core/Model/Url/RouteParamsResolver.php +++ b/app/code/Magento/Core/Model/Url/RouteParamsResolver.php @@ -49,6 +49,8 @@ public function __construct( /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function setRouteParams(array $data, $unsetOldParams = true) { diff --git a/app/code/Magento/Cron/Model/Backend/Config/Structure/Converter.php b/app/code/Magento/Cron/Model/Backend/Config/Structure/Converter.php index 959dded5f7e4f..ad034e736226d 100644 --- a/app/code/Magento/Cron/Model/Backend/Config/Structure/Converter.php +++ b/app/code/Magento/Cron/Model/Backend/Config/Structure/Converter.php @@ -27,6 +27,7 @@ public function __construct(\Magento\Cron\Model\Groups\Config\Data $groupsConfig * * @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 c28ebef08e738..49deb4445f837 100644 --- a/app/code/Magento/Cron/Model/Observer.php +++ b/app/code/Magento/Cron/Model/Observer.php @@ -10,6 +10,9 @@ use Magento\Framework\App\Filesystem\DirectoryList; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Observer { /**#@+ @@ -117,6 +120,9 @@ public function __construct( * * @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 8547b88d30004..4f62b2289e588 100644 --- a/app/code/Magento/Cron/Model/Schedule.php +++ b/app/code/Magento/Cron/Model/Schedule.php @@ -127,6 +127,8 @@ public function trySchedule() * @param int $num * @return bool * @throws Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function matchCronExpression($expr, $num) { diff --git a/app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.php b/app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.php index 30fe06f7d9575..76dc17819e43e 100644 --- a/app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.php +++ b/app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.php @@ -138,6 +138,8 @@ public function __construct( * Returns currency symbol properties array based on config values * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getCurrencySymbolsData() { diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php index a7f02b4a7a922..6542928ff346d 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php @@ -18,6 +18,7 @@ * 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 681c84647aa0c..e074cef79b31f 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Reviews.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Reviews.php @@ -10,6 +10,9 @@ */ namespace Magento\Customer\Block\Adminhtml\Edit\Tab; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Reviews extends \Magento\Review\Block\Adminhtml\Grid { /** diff --git a/app/code/Magento/Customer/Helper/Address.php b/app/code/Magento/Customer/Helper/Address.php index 627a97d1874c5..38b44235f259d 100644 --- a/app/code/Magento/Customer/Helper/Address.php +++ b/app/code/Magento/Customer/Helper/Address.php @@ -14,6 +14,7 @@ * Customer address helper * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Address extends \Magento\Framework\App\Helper\AbstractHelper { diff --git a/app/code/Magento/Customer/Model/Address.php b/app/code/Magento/Customer/Model/Address.php index 2ddd80d02b569..6f61ccd0ddfae 100644 --- a/app/code/Magento/Customer/Model/Address.php +++ b/app/code/Magento/Customer/Model/Address.php @@ -15,6 +15,7 @@ * * @method int getParentId() getParentId() * @method \Magento\Customer\Model\Address setParentId() setParentId(int $parentId) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Address extends \Magento\Customer\Model\Address\AbstractAddress { @@ -53,6 +54,7 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Customer/Model/Address/AbstractAddress.php b/app/code/Magento/Customer/Model/Address/AbstractAddress.php index 088ac96e0d76a..80c9a4f357657 100644 --- a/app/code/Magento/Customer/Model/Address/AbstractAddress.php +++ b/app/code/Magento/Customer/Model/Address/AbstractAddress.php @@ -26,6 +26,7 @@ * @method string getTelephone() * @method string getPostcode() * @method bool getShouldIgnoreValidation() + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AbstractAddress extends \Magento\Framework\Model\AbstractExtensibleModel { @@ -122,6 +123,7 @@ class AbstractAddress extends \Magento\Framework\Model\AbstractExtensibleModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -471,6 +473,7 @@ public function beforeSave() * @return AddressInterface * @deprecated Use Api/Data/AddressInterface as a result of service operations. Don't rely on the model to provide * the instance of Api/Data/AddressInterface + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getDataModel($defaultBillingAddressId = null, $defaultShippingAddressId = null) { @@ -526,6 +529,8 @@ public function getDataModel($defaultBillingAddressId = null, $defaultShippingAd * Validate address attribute values * * @return bool|array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validate() { diff --git a/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php b/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php index 3037a022188df..0460e6912b7d0 100644 --- a/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php +++ b/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php @@ -40,6 +40,7 @@ public function __construct( * @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 98ac3c18bb29c..e9c3424ab307b 100644 --- a/app/code/Magento/Customer/Model/Customer.php +++ b/app/code/Magento/Customer/Model/Customer.php @@ -30,6 +30,10 @@ * @method Customer setPasswordHash($string) * @method string getPasswordHash() * @method string getConfirmation() + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Customer extends \Magento\Framework\Model\AbstractExtensibleModel { @@ -218,6 +222,7 @@ class Customer extends \Magento\Framework\Model\AbstractExtensibleModel * @param DataObjectProcessor $dataObjectProcessor * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -990,6 +995,8 @@ public function setStore(\Magento\Store\Model\Store $store) * (i.e. its change is requested) * * @return bool|string[] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validate() { diff --git a/app/code/Magento/Customer/Model/Group.php b/app/code/Magento/Customer/Model/Group.php index 699fa503a48df..252ff3c86c4e9 100644 --- a/app/code/Magento/Customer/Model/Group.php +++ b/app/code/Magento/Customer/Model/Group.php @@ -77,6 +77,7 @@ class Group extends \Magento\Framework\Model\AbstractExtensibleModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Customer/Model/Metadata/Form/AbstractData.php b/app/code/Magento/Customer/Model/Metadata/Form/AbstractData.php index e5c0978f14030..78461578f4735 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/AbstractData.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/AbstractData.php @@ -8,6 +8,9 @@ use Magento\Framework\Api\ArrayObjectSearch; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ abstract class AbstractData { /** @@ -256,6 +259,8 @@ protected function _applyOutputFilter($value) * * @param string $value * @return array|true + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _validateInputRule($value) { @@ -436,6 +441,7 @@ protected function _validateInputRule($value) * 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 6a1443c0d3d8f..3fae45000c5b5 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/Date.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/Date.php @@ -21,6 +21,8 @@ public function extractValue(\Magento\Framework\App\RequestInterface $request) /** * {@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 2d8f7a9b78f9e..26a8fe7837b97 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/File.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/File.php @@ -11,6 +11,9 @@ use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Api\ArrayObjectSearch; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class File extends AbstractData { /** @@ -54,6 +57,7 @@ class File extends AbstractData * @param \Magento\Core\Model\File\Validator\NotProtectedExtension $fileValidator * @param Filesystem $fileSystem * @param UploaderFactory $uploaderFactory + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, @@ -77,6 +81,7 @@ public function __construct( /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function extractValue(\Magento\Framework\App\RequestInterface $request) { @@ -193,6 +198,8 @@ protected function _isUploadedFile($filename) /** * {@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 5527c99d8a08a..01fc21457277e 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/Image.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/Image.php @@ -16,6 +16,8 @@ class Image extends File * * @param array $value * @return string[] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _validateByRules($value) { diff --git a/app/code/Magento/Customer/Model/Metadata/Form/Multiline.php b/app/code/Magento/Customer/Model/Metadata/Form/Multiline.php index 1e5e68afc1b3f..2ac504c838454 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/Multiline.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/Multiline.php @@ -24,6 +24,7 @@ public function extractValue(\Magento\Framework\App\RequestInterface $request) /** * {@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 34802ae362c81..320ad12aaa7d8 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/Text.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/Text.php @@ -49,6 +49,8 @@ public function extractValue(\Magento\Framework\App\RequestInterface $request) /** * {@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 2e26e5325165a..692055fddcb47 100644 --- a/app/code/Magento/Customer/Model/Observer.php +++ b/app/code/Magento/Customer/Model/Observer.php @@ -150,6 +150,7 @@ public function beforeAddressSave($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 10857235b4966..ec146726bc209 100644 --- a/app/code/Magento/Customer/Model/Renderer/Region.php +++ b/app/code/Magento/Customer/Model/Renderer/Region.php @@ -55,6 +55,8 @@ public function __construct( /** * @param AbstractElement $element * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function render(AbstractElement $element) { diff --git a/app/code/Magento/Customer/Model/Resource/AddressRepository.php b/app/code/Magento/Customer/Model/Resource/AddressRepository.php index a775fdaf72db5..a64724956f68a 100644 --- a/app/code/Magento/Customer/Model/Resource/AddressRepository.php +++ b/app/code/Magento/Customer/Model/Resource/AddressRepository.php @@ -12,6 +12,9 @@ use Magento\Framework\Api\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 a7599d3073af1..c8bc87217472c 100644 --- a/app/code/Magento/Customer/Model/Resource/Customer.php +++ b/app/code/Magento/Customer/Model/Resource/Customer.php @@ -8,6 +8,7 @@ /** * Customer entity resource model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Customer extends \Magento\Eav\Model\Entity\AbstractEntity { @@ -39,6 +40,7 @@ class Customer extends \Magento\Eav\Model\Entity\AbstractEntity * @param \Magento\Core\Model\Validator\Factory $validatorFactory * @param \Magento\Framework\Stdlib\DateTime $dateTime * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Resource $resource, @@ -183,6 +185,7 @@ protected function _afterSave(\Magento\Framework\Object $customer) * * @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 d55b6b246efb5..2a7a73df544c0 100644 --- a/app/code/Magento/Customer/Model/Resource/CustomerRepository.php +++ b/app/code/Magento/Customer/Model/Resource/CustomerRepository.php @@ -12,6 +12,7 @@ /** * Customer repository. + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class CustomerRepository implements \Magento\Customer\Api\CustomerRepositoryInterface { @@ -88,6 +89,7 @@ class CustomerRepository implements \Magento\Customer\Api\CustomerRepositoryInte * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Customer\Model\CustomerFactory $customerFactory, @@ -119,6 +121,7 @@ public function __construct( /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function save(\Magento\Customer\Api\Data\CustomerInterface $customer, $passwordHash = null) { diff --git a/app/code/Magento/Customer/Model/Resource/Setup.php b/app/code/Magento/Customer/Model/Resource/Setup.php index ff8aa012f1259..342b96ca83e8f 100644 --- a/app/code/Magento/Customer/Model/Resource/Setup.php +++ b/app/code/Magento/Customer/Model/Resource/Setup.php @@ -46,6 +46,8 @@ public function __construct( * Add customer attributes to customer forms * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function installCustomerForms() { @@ -113,6 +115,7 @@ public function installCustomerForms() * 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 af41901242d77..107993816f748 100644 --- a/app/code/Magento/Customer/Model/Session.php +++ b/app/code/Magento/Customer/Model/Session.php @@ -13,6 +13,7 @@ /** * Customer session model * @method string getNoReferer() + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Session extends \Magento\Framework\Session\SessionManager { @@ -111,6 +112,7 @@ class Session extends \Magento\Framework\Session\SessionManager * @param \Magento\Framework\App\Http\Context $httpContext * @param CustomerRepositoryInterface $customerRepository * @param GroupManagementInterface $groupManagement + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Request\Http $request, diff --git a/app/code/Magento/CustomerImportExport/Model/Export/Address.php b/app/code/Magento/CustomerImportExport/Model/Export/Address.php index 68281aec5e609..b9e131decdd7c 100644 --- a/app/code/Magento/CustomerImportExport/Model/Export/Address.php +++ b/app/code/Magento/CustomerImportExport/Model/Export/Address.php @@ -4,6 +4,9 @@ */ namespace Magento\CustomerImportExport\Model\Export; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Address extends \Magento\ImportExport\Model\Export\Entity\AbstractEav { /**#@+ @@ -108,6 +111,7 @@ class Address extends \Magento\ImportExport\Model\Export\Entity\AbstractEav * @param \Magento\CustomerImportExport\Model\Export\CustomerFactory $eavCustomerFactory * @param \Magento\Customer\Model\Resource\Address\CollectionFactory $addressColFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, diff --git a/app/code/Magento/CustomerImportExport/Model/Import/AbstractCustomer.php b/app/code/Magento/CustomerImportExport/Model/Import/AbstractCustomer.php index 03f2d3b690cde..9485c8e9f47bb 100644 --- a/app/code/Magento/CustomerImportExport/Model/Import/AbstractCustomer.php +++ b/app/code/Magento/CustomerImportExport/Model/Import/AbstractCustomer.php @@ -8,6 +8,7 @@ /** * Import entity abstract customer model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractCustomer extends \Magento\ImportExport\Model\Import\Entity\AbstractEav { @@ -78,6 +79,7 @@ abstract class AbstractCustomer extends \Magento\ImportExport\Model\Import\Entit * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\CustomerImportExport\Model\Resource\Import\Customer\StorageFactory $storageFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Core\Helper\Data $coreData, diff --git a/app/code/Magento/CustomerImportExport/Model/Import/Address.php b/app/code/Magento/CustomerImportExport/Model/Import/Address.php index 207b214fad7d6..98c0f0f7be28c 100644 --- a/app/code/Magento/CustomerImportExport/Model/Import/Address.php +++ b/app/code/Magento/CustomerImportExport/Model/Import/Address.php @@ -4,6 +4,10 @@ */ namespace Magento\CustomerImportExport\Model\Import; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Address extends AbstractCustomer { /**#@+ @@ -225,6 +229,8 @@ class Address extends AbstractCustomer * @param \Magento\Customer\Model\Resource\Address\Attribute\CollectionFactory $attributesFactory * @param \Magento\Framework\Stdlib\DateTime $dateTime * @param array $data + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Core\Helper\Data $coreData, @@ -450,6 +456,8 @@ protected function _mergeEntityAttributes(array $newAttributes, array $attribute * * @param array $rowData * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _prepareDataForUpdate(array $rowData) { @@ -644,6 +652,8 @@ public static function getDefaultAddressAttributeMapping() * @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 ed9807ec7c3b1..30497ebecd567 100644 --- a/app/code/Magento/CustomerImportExport/Model/Import/Customer.php +++ b/app/code/Magento/CustomerImportExport/Model/Import/Customer.php @@ -4,6 +4,9 @@ */ namespace Magento\CustomerImportExport\Model\Import; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Customer extends AbstractCustomer { /** @@ -127,6 +130,7 @@ class Customer extends AbstractCustomer * @param \Magento\Customer\Model\Resource\Attribute\CollectionFactory $attrCollectionFactory * @param \Magento\Customer\Model\CustomerFactory $customerFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Core\Helper\Data $coreData, @@ -276,6 +280,8 @@ protected function _getNextEntityId() * * @param array $rowData * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _prepareDataForUpdate(array $rowData) { @@ -365,6 +371,7 @@ protected function _prepareDataForUpdate(array $rowData) * Import data rows * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _importData() { @@ -432,6 +439,8 @@ public function getEntityTypeCode() * @param array $rowData * @param int $rowNumber * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _validateRowForUpdate(array $rowData, $rowNumber) { diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Edit.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Edit.php index 0a33cc3bef630..912533a479e94 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Edit.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Edit.php @@ -80,6 +80,7 @@ public function getOptionAttributesHtml($key, $option) * 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 2337a4467a2ee..46eb8d60382f3 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Save.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Save.php @@ -78,6 +78,7 @@ public function setTheme($theme) * Whether button is disabled * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDisabled() { diff --git a/app/code/Magento/DesignEditor/Model/Observer.php b/app/code/Magento/DesignEditor/Model/Observer.php index 2f26e0571791a..e9d80a493c048 100644 --- a/app/code/Magento/DesignEditor/Model/Observer.php +++ b/app/code/Magento/DesignEditor/Model/Observer.php @@ -47,6 +47,7 @@ public function __construct( * * @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 7e206ac327bb0..dae895c9d158f 100644 --- a/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php +++ b/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php @@ -43,6 +43,7 @@ class NavigationMode extends \Magento\Framework\Url * @param string $scopeType * @param \Magento\DesignEditor\Helper\Data $helper * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Route\ConfigInterface $routeConfig, diff --git a/app/code/Magento/Dhl/Model/Carrier.php b/app/code/Magento/Dhl/Model/Carrier.php index b81ffca5c1081..77d2105726f25 100644 --- a/app/code/Magento/Dhl/Model/Carrier.php +++ b/app/code/Magento/Dhl/Model/Carrier.php @@ -14,6 +14,9 @@ /** * DHL International (API v1.4) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shipping\Model\Carrier\CarrierInterface { @@ -206,6 +209,7 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin * @param \Magento\Framework\HTTP\ZendClientFactory $httpClientFactory * @param \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, @@ -369,6 +373,8 @@ protected function _addParams(\Magento\Framework\Object $requestObject) * * @param \Magento\Framework\Object $request * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function setRequest(\Magento\Framework\Object $request) { @@ -610,6 +616,7 @@ public function getDhlProducts($doc) * * @param string $code One-symbol code (see getDhlProducts()) * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDhlProductTitle($code) { @@ -656,6 +663,8 @@ protected function _getWeight($weight, $maxWeight = false, $configWeightUnit = f * Prepare items to pieces * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getAllItems() { @@ -746,6 +755,7 @@ protected function _getAllItems() * * @param \Magento\Shipping\Model\Simplexml\Element $nodeBkgDetails * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _makePieces(\Magento\Shipping\Model\Simplexml\Element $nodeBkgDetails) { @@ -1008,6 +1018,8 @@ protected function _setQuotesRequestXmlDate(\SimpleXMLElement $requestXml, $date * @param string $response * @return bool|\Magento\Framework\Object|Result|Error * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _parseResponse($response) { @@ -1095,6 +1107,7 @@ protected function _parseResponse($response) * * @param \SimpleXMLElement $shipmentDetails * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _addRate(\SimpleXMLElement $shipmentDetails) { @@ -1359,6 +1372,9 @@ protected function _getMinDimension($dimensionUnit) * * @return Result|\Magento\Framework\Object * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _doRequest() { @@ -1552,6 +1568,8 @@ protected function _doRequest() * @param RateRequest $rawRequest * @param string $originRegion * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _shipmentDetails($xml, $rawRequest, $originRegion = '') { @@ -1740,6 +1758,8 @@ protected function _getXMLTracking($trackings) * @param string[] $trackings * @param string $response * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _parseXmlTrackingResponse($trackings, $response) { diff --git a/app/code/Magento/Directory/Model/Currency.php b/app/code/Magento/Directory/Model/Currency.php index 2d6d55fb71bc6..c5a29bbd2dde6 100644 --- a/app/code/Magento/Directory/Model/Currency.php +++ b/app/code/Magento/Directory/Model/Currency.php @@ -13,6 +13,9 @@ use Magento\Directory\Exception; use Magento\Directory\Model\Currency\Filter; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Currency extends \Magento\Framework\Model\AbstractModel { /** @@ -72,6 +75,7 @@ class Currency extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Directory/Model/Observer.php b/app/code/Magento/Directory/Model/Observer.php index 9831302081921..fd48d4d39daf9 100644 --- a/app/code/Magento/Directory/Model/Observer.php +++ b/app/code/Magento/Directory/Model/Observer.php @@ -83,6 +83,7 @@ public function __construct( /** * @param mixed $schedule * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function scheduledUpdateCurrencyRates($schedule) { diff --git a/app/code/Magento/Directory/Model/Resource/Country/Collection.php b/app/code/Magento/Directory/Model/Resource/Country/Collection.php index ed505ab7aa0f4..c382f1089b5aa 100644 --- a/app/code/Magento/Directory/Model/Resource/Country/Collection.php +++ b/app/code/Magento/Directory/Model/Resource/Country/Collection.php @@ -53,6 +53,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param mixed $connection * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Core\Model\EntityFactory $entityFactory, diff --git a/app/code/Magento/Directory/Model/Resource/Currency.php b/app/code/Magento/Directory/Model/Resource/Currency.php index 005d02081f3ec..38433b2fe5c78 100644 --- a/app/code/Magento/Directory/Model/Resource/Currency.php +++ b/app/code/Magento/Directory/Model/Resource/Currency.php @@ -160,6 +160,7 @@ public function saveRates($rates) * @param \Magento\Directory\Model\Currency $model * @param string $path * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getConfigCurrencies($model, $path) { diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php index b791971d023e0..795e86c40cf28 100644 --- a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php +++ b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php @@ -8,6 +8,7 @@ * Adminhtml catalog product downloadable items tab links section * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Links extends \Magento\Backend\Block\Template { @@ -87,6 +88,7 @@ class Links extends \Magento\Backend\Block\Template * @param \Magento\Eav\Model\Entity\AttributeFactory $attributeFactory * @param \Magento\Backend\Model\UrlFactory $urlFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Backend\Block\Template\Context $context, @@ -214,6 +216,7 @@ public function getLinksTitle() * Check exists defined links title * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUsedDefault() { @@ -224,6 +227,7 @@ public function getUsedDefault() * Return true if price in website scope * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsPriceWebsiteScope() { @@ -241,6 +245,8 @@ public function getIsPriceWebsiteScope() * 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 b116af0826238..6ccec440045b1 100644 --- a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php +++ b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php @@ -188,6 +188,7 @@ public function getSampleData() * Check exists defined samples title * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getUsedDefault() { diff --git a/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php b/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php index eabb0c4225444..d03a26d57a084 100644 --- a/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php +++ b/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php @@ -45,6 +45,7 @@ public function __construct( * Enter description here... * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getLinksPurchasedSeparately() { @@ -53,6 +54,7 @@ public function getLinksPurchasedSeparately() /** * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getLinkSelectionRequired() { @@ -136,6 +138,7 @@ public function getLinksTitle() * Return true if target of link new window * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsOpenInNewWindow() { @@ -150,6 +153,7 @@ public function getIsOpenInNewWindow() * * @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 13e5390b0dc81..a8dd75adeb9b3 100644 --- a/app/code/Magento/Downloadable/Block/Catalog/Product/Samples.php +++ b/app/code/Magento/Downloadable/Block/Catalog/Product/Samples.php @@ -59,6 +59,7 @@ public function getSamplesTitle() * 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 a7c54f2b7e773..0177d861e8f74 100644 --- a/app/code/Magento/Downloadable/Block/Checkout/Cart/Item/Renderer.php +++ b/app/code/Magento/Downloadable/Block/Checkout/Cart/Item/Renderer.php @@ -32,6 +32,7 @@ class Renderer extends \Magento\Checkout\Block\Cart\Item\Renderer * @param \Magento\Downloadable\Helper\Catalog\Product\Configuration $downloadableProductConfiguration * @param \Magento\Framework\Module\Manager $moduleManager * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Downloadable/Block/Checkout/Success.php b/app/code/Magento/Downloadable/Block/Checkout/Success.php index dffdc9de9fa1b..d1416da1ab743 100644 --- a/app/code/Magento/Downloadable/Block/Checkout/Success.php +++ b/app/code/Magento/Downloadable/Block/Checkout/Success.php @@ -55,6 +55,7 @@ public function __construct( * 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 bf1611da4337f..ef08619fa24e6 100644 --- a/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php +++ b/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php @@ -158,6 +158,7 @@ public function getDownloadUrl($item) * Return true if target of link new window * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsOpenInNewWindow() { diff --git a/app/code/Magento/Downloadable/Controller/Download/Link.php b/app/code/Magento/Downloadable/Controller/Download/Link.php index cf1c4d6270e46..3f9078a77d46d 100644 --- a/app/code/Magento/Downloadable/Controller/Download/Link.php +++ b/app/code/Magento/Downloadable/Controller/Download/Link.php @@ -25,6 +25,10 @@ protected function _getCustomerSession() * 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 ea8f928caadf5..338dabc959be2 100644 --- a/app/code/Magento/Downloadable/Controller/Download/LinkSample.php +++ b/app/code/Magento/Downloadable/Controller/Download/LinkSample.php @@ -14,6 +14,7 @@ class LinkSample extends \Magento\Downloadable\Controller\Download * Download link's sample action * * @return ResponseInterface + * @SuppressWarnings(PHPMD.ExitExpression) */ public function execute() { diff --git a/app/code/Magento/Downloadable/Controller/Download/Sample.php b/app/code/Magento/Downloadable/Controller/Download/Sample.php index 72a761a8d96b8..9b4339df86dc8 100644 --- a/app/code/Magento/Downloadable/Controller/Download/Sample.php +++ b/app/code/Magento/Downloadable/Controller/Download/Sample.php @@ -14,6 +14,7 @@ class Sample extends \Magento\Downloadable\Controller\Download * Download sample action * * @return ResponseInterface + * @SuppressWarnings(PHPMD.ExitExpression) */ public function execute() { diff --git a/app/code/Magento/Downloadable/Helper/Data.php b/app/code/Magento/Downloadable/Helper/Data.php index 7989aa76cced8..15be28876fe73 100644 --- a/app/code/Magento/Downloadable/Helper/Data.php +++ b/app/code/Magento/Downloadable/Helper/Data.php @@ -37,6 +37,7 @@ public function __construct( * * @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 937be7b750f83..2efd55ef364e0 100644 --- a/app/code/Magento/Downloadable/Helper/Download.php +++ b/app/code/Magento/Downloadable/Helper/Download.php @@ -10,6 +10,7 @@ /** * Downloadable Products Download Helper + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Download extends \Magento\Framework\App\Helper\AbstractHelper { @@ -293,6 +294,7 @@ public function output() * * @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 bacac2047a547..e806b250077db 100644 --- a/app/code/Magento/Downloadable/Model/Observer.php +++ b/app/code/Magento/Downloadable/Model/Observer.php @@ -10,6 +10,7 @@ * Downloadable Products Observer * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Observer { @@ -110,6 +111,8 @@ public function prepareProductSave($observer) * * @param \Magento\Framework\Object $observer * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function saveDownloadableOrderItem($observer) { @@ -229,6 +232,8 @@ public function setHasDownloadableProducts($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 3fa35f6189e4a..28621b660e523 100644 --- a/app/code/Magento/Downloadable/Model/Product/Type.php +++ b/app/code/Magento/Downloadable/Model/Product/Type.php @@ -10,6 +10,7 @@ * Downloadable product type model * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Type extends \Magento\Catalog\Model\Product\Type\Virtual { @@ -72,6 +73,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\Virtual * @param \Magento\Downloadable\Model\Resource\Sample\CollectionFactory $samplesFactory * @param \Magento\Downloadable\Model\SampleFactory $sampleFactory * @param \Magento\Downloadable\Model\LinkFactory $linkFactory + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Catalog\Model\Product\Option $catalogProductOption, @@ -186,6 +188,7 @@ public function hasRequiredOptions($product) * * @param \Magento\Catalog\Model\Product $product * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getLinkSelectionRequired($product) { @@ -228,6 +231,9 @@ public function hasSamples($product) * * @param \Magento\Catalog\Model\Product $product * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function save($product) { @@ -560,6 +566,8 @@ public function deleteTypeSpecificData(\Magento\Catalog\Model\Product $product) * @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 b139ed4bcd81c..67f9277325b29 100644 --- a/app/code/Magento/Downloadable/Model/Resource/Link.php +++ b/app/code/Magento/Downloadable/Model/Resource/Link.php @@ -69,6 +69,7 @@ protected function _construct() * * @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 16dfe68a25a40..21be2eae6bcdd 100644 --- a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/AbstractItems.php +++ b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/AbstractItems.php @@ -6,6 +6,7 @@ /** * Order Downloadable Pdf Items renderer + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractItems extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems { @@ -45,6 +46,7 @@ abstract class AbstractItems extends \Magento\Sales\Model\Order\Pdf\Items\Abstra * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php index 9c93337030fc5..9b7c23afe6779 100644 --- a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php +++ b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php @@ -27,6 +27,7 @@ class Creditmemo extends \Magento\Downloadable\Model\Sales\Order\Pdf\Items\Abstr * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php index 05d4bf202a944..23a8bfb9e2e2a 100644 --- a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php +++ b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php @@ -27,6 +27,7 @@ class Invoice extends \Magento\Downloadable\Model\Sales\Order\Pdf\Items\Abstract * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -62,6 +63,7 @@ public function __construct( * Draw item line * * @return void + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function draw() { diff --git a/app/code/Magento/Eav/Api/Data/AttributeInterface.php b/app/code/Magento/Eav/Api/Data/AttributeInterface.php index aecf21d851ba5..67501a8820064 100644 --- a/app/code/Magento/Eav/Api/Data/AttributeInterface.php +++ b/app/code/Magento/Eav/Api/Data/AttributeInterface.php @@ -73,6 +73,7 @@ public function getEntityTypeId(); * 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 f73acfcbc0c6b..b75bfeab2782b 100644 --- a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php +++ b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php @@ -99,6 +99,7 @@ public function getAttributeObject() * Preparing default form elements for editing attribute * * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php b/app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php index f8a52ed7bde3d..27dff63da4019 100644 --- a/app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php +++ b/app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php @@ -11,6 +11,7 @@ * EAV Attribute Abstract Data Model * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractData { @@ -284,6 +285,8 @@ protected function _applyOutputFilter($value) * * @param string $value * @return string|true + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _validateInputRule($value) { @@ -478,6 +481,7 @@ public function setIsAjaxRequest($flag = true) * 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 577265a546b64..0d16c99b022e9 100644 --- a/app/code/Magento/Eav/Model/Attribute/Data/Date.php +++ b/app/code/Magento/Eav/Model/Attribute/Data/Date.php @@ -31,6 +31,8 @@ public function extractValue(RequestInterface $request) * * @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 94b0e6ff1c674..df14a32799db2 100644 --- a/app/code/Magento/Eav/Model/Attribute/Data/File.php +++ b/app/code/Magento/Eav/Model/Attribute/Data/File.php @@ -63,6 +63,7 @@ public function __construct( * * @param RequestInterface $request * @return array|string|bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function extractValue(RequestInterface $request) { @@ -162,6 +163,8 @@ protected function _validateByRules($value) * * @param array|string $value * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validateValue($value) { @@ -204,6 +207,7 @@ public function validateValue($value) * * @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 27cf808fe38a4..0efb736c45a1d 100644 --- a/app/code/Magento/Eav/Model/Attribute/Data/Image.php +++ b/app/code/Magento/Eav/Model/Attribute/Data/Image.php @@ -17,6 +17,8 @@ class Image extends \Magento\Eav\Model\Attribute\Data\File * * @param array $value * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _validateByRules($value) { diff --git a/app/code/Magento/Eav/Model/Attribute/Data/Text.php b/app/code/Magento/Eav/Model/Attribute/Data/Text.php index e32506f45dd1f..2d6351af856e8 100644 --- a/app/code/Magento/Eav/Model/Attribute/Data/Text.php +++ b/app/code/Magento/Eav/Model/Attribute/Data/Text.php @@ -52,6 +52,8 @@ public function extractValue(RequestInterface $request) * * @param array|string $value * @return bool|array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validateValue($value) { diff --git a/app/code/Magento/Eav/Model/AttributeRepository.php b/app/code/Magento/Eav/Model/AttributeRepository.php index 7b2b69dd5f802..9809fb35dffc3 100644 --- a/app/code/Magento/Eav/Model/AttributeRepository.php +++ b/app/code/Magento/Eav/Model/AttributeRepository.php @@ -11,6 +11,9 @@ use Magento\Framework\Exception\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 2bd27a9f844cf..6c94aa590438c 100644 --- a/app/code/Magento/Eav/Model/AttributeSetRepository.php +++ b/app/code/Magento/Eav/Model/AttributeSetRepository.php @@ -15,6 +15,9 @@ use Magento\Framework\Exception\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 fbf4c5faa907f..b3b3f9b5249be 100644 --- a/app/code/Magento/Eav/Model/Config.php +++ b/app/code/Magento/Eav/Model/Config.php @@ -6,6 +6,9 @@ use Magento\Eav\Model\Entity\Type; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Config { /**#@+ @@ -449,6 +452,8 @@ public function getAttribute($entityType, $code) * @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 5d67832a96007..aab51c7333d87 100644 --- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php @@ -16,6 +16,9 @@ * Entity/Attribute/Model - entity abstract * * @author Magento Core Team + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractEntity extends \Magento\Framework\Model\Resource\AbstractResource implements EntityInterface { @@ -413,6 +416,7 @@ protected function _getConfig() * * @param string|int|Element $attribute * @return AbstractAttribute|false + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getAttribute($attribute) { @@ -636,6 +640,7 @@ public function attributesCompare($firstAttribute, $secondAttribute) * @param \Magento\Framework\Object $object * @param AbstractAttribute $attribute * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _isApplicableAttribute($object, $attribute) { @@ -656,6 +661,8 @@ protected function _isApplicableAttribute($object, $attribute) * * @throws \Exception|\Magento\Eav\Model\Entity\Attribute\Exception * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function walkAttributes($partMethod, array $args = [], $collectExceptionMessages = null) { @@ -738,6 +745,7 @@ public function walkAttributes($partMethod, array $args = [], $collectExceptionM * @param string $method * @param array $args array of arguments * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _isCallableAttributeInstance($instance, $method, $args) { @@ -1079,6 +1087,7 @@ protected function _prepareLoadSelect(array $selects) * @param \Magento\Framework\Object $object * @param string|int $rowId * @return \Zend_Db_Select + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getLoadRowSelect($object, $rowId) { @@ -1224,6 +1233,8 @@ private function _aggregateDeleteData(&$delete, $attribute, $object) * * @param \Magento\Framework\Object $newObject * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _collectSaveData($newObject) { @@ -1328,6 +1339,7 @@ protected function _collectSaveData($newObject) * @param mixed $v New value of the attribute. Can be used in subclasses. * @param array $origData * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _canUpdateAttribute(AbstractAttribute $attribute, $v, array &$origData) { @@ -1382,6 +1394,8 @@ protected function _prepareStaticValue($key, $value) * * @param array $saveData array('newObject', 'entityRow', 'insert', 'update', 'delete') * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _processSaveData($saveData) { @@ -1491,6 +1505,7 @@ protected function _insertAttribute($object, $attribute, $value) * @param mixed $valueId * @param mixed $value * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _updateAttribute($object, $attribute, $valueId, $value) { @@ -1581,6 +1596,7 @@ protected function _prepareValueForSave($value, AbstractAttribute $attribute) * @param string $table * @param array $info * @return \Magento\Framework\Object + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _deleteAttributes($object, $table, $info) { @@ -1609,6 +1625,7 @@ protected function _deleteAttributes($object, $table, $info) * @param string $attributeCode * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function saveAttribute(\Magento\Framework\Object $object, $attributeCode) { @@ -1665,6 +1682,7 @@ public function saveAttribute(\Magento\Framework\Object $object, $attributeCode) * @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 7c0e627b56690..e9438a6f0cac7 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute.php @@ -11,6 +11,7 @@ * EAV Entity attribute model * * @method \Magento\Eav\Model\Entity\Attribute setOption($value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Attribute extends \Magento\Eav\Model\Entity\Attribute\AbstractAttribute implements \Magento\Framework\Object\IdentityInterface @@ -79,6 +80,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute\AbstractAttribute im * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -207,6 +209,8 @@ public function loadEntityAttributeIdBySet() * * @return $this * @throws Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function beforeSave() { @@ -306,6 +310,7 @@ public function afterSave() * * @param string $type frontend_input field value * @return string backend_type field value + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getBackendTypeByInput($type) { @@ -349,6 +354,7 @@ public function getBackendTypeByInput($type) * * @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 00afe4c579cf7..d18a6e3ee89e4 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php @@ -9,6 +9,9 @@ /** * Entity/Attribute/Model - attribute abstract + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractAttribute extends \Magento\Framework\Model\AbstractExtensibleModel implements AttributeInterface, @@ -117,6 +120,7 @@ abstract class AbstractAttribute extends \Magento\Framework\Model\AbstractExtens * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -299,6 +303,7 @@ public function setBackendTable($data) /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsVisibleOnFront() { @@ -656,6 +661,7 @@ public function getFlatColumns() * Retrieve flat columns DDL definition * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function _getFlatColumnsDdlDefinition() { @@ -739,6 +745,7 @@ public function _getFlatColumnsDdlDefinition() * Used in database compatible mode * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _getFlatColumnsOldDefinition() { @@ -813,6 +820,7 @@ protected function _getFlatColumnsOldDefinition() * 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 ee0ceebd3f2db..d3a56cdde9fd5 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/AbstractBackend.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/AbstractBackend.php @@ -6,6 +6,7 @@ /** * Entity/Attribute/Model - attribute backend abstract + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractBackend implements \Magento\Eav\Model\Entity\Attribute\Backend\BackendInterface { @@ -211,6 +212,7 @@ public function getDefaultValue() * @param \Magento\Framework\Object $object * @throws \Magento\Eav\Exception * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function validate($object) { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Set.php b/app/code/Magento/Eav/Model/Entity/Attribute/Set.php index 89d1db9f16408..eb71650008c98 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Set.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Set.php @@ -21,6 +21,9 @@ use Magento\Eav\Model\Entity\Type; use Magento\Framework\Api\AttributeDataBuilder; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Set extends \Magento\Framework\Model\AbstractExtensibleModel implements \Magento\Eav\Api\Data\AttributeSetInterface { @@ -69,6 +72,7 @@ class Set extends \Magento\Framework\Model\AbstractExtensibleModel implements * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -155,6 +159,8 @@ public function initFromSkeleton($skeletonId) * * @param array $data * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function organizeData($data) { @@ -262,6 +268,7 @@ public function validate() * @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 629eabe56def6..9bf0583788c6c 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Source/AbstractSource.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Source/AbstractSource.php @@ -8,6 +8,7 @@ * Entity/Attribute/Model - attribute selection source abstract * * @author Magento Core Team + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractSource implements \Magento\Eav\Model\Entity\Attribute\Source\SourceInterface, @@ -93,6 +94,7 @@ public function getOptionId($value) * @param \Magento\Eav\Model\Entity\Collection\AbstractCollection $collection * @param string $dir direction * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function addValueSortToCollection($collection, $dir = \Magento\Framework\Data\Collection::SORT_ORDER_DESC) { @@ -124,6 +126,7 @@ public function getFlatIndexes() * * @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 9c10fc846bce2..638a00a42b8b7 100644 --- a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php +++ b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php @@ -8,6 +8,9 @@ /** * Entity/Attribute/Model - collection abstract + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractCollection extends \Magento\Framework\Data\Collection\Db { @@ -124,6 +127,7 @@ abstract class AbstractCollection extends \Magento\Framework\Data\Collection\Db * @param \Magento\Eav\Model\Resource\Helper $resourceHelper * @param \Magento\Framework\Validator\UniversalFactory $universalFactory * @param mixed $connection + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Core\Model\EntityFactory $entityFactory, @@ -619,6 +623,8 @@ public function groupByAttribute($attribute) * @param null $storeId * @return $this * @throws \Magento\Eav\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function joinAttribute($alias, $attribute, $bind, $filter = null, $joinType = 'inner', $storeId = null) { @@ -769,6 +775,7 @@ public function joinField($alias, $table, $field, $bind, $cond = null, $joinType * @param string $joinType * @return $this * @throws \Magento\Eav\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function joinTable($table, $bind, $fields = null, $cond = null, $joinType = 'inner') { @@ -1096,6 +1103,9 @@ public function _loadEntities($printQuery = false, $logQuery = false) * @param bool $logQuery * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function _loadAttributes($printQuery = false, $logQuery = false) { @@ -1185,6 +1195,7 @@ protected function _getLoadAttributesSelect($table, $attributeIds = []) * @param string $table * @param string $type * @return Select + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _addLoadAttributesSelectValues($select, $table, $type) { @@ -1281,6 +1292,7 @@ protected function _getAttributeFieldName($attributeCode) * @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 3508beb572f02..7139001f1fb2f 100644 --- a/app/code/Magento/Eav/Model/Entity/Setup.php +++ b/app/code/Magento/Eav/Model/Entity/Setup.php @@ -6,6 +6,9 @@ */ namespace Magento\Eav\Model\Entity; +/** + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + */ class Setup extends \Magento\Framework\Module\DataSetup { /** @@ -767,6 +770,7 @@ public function addAttribute($entityTypeId, $code, array $attr) * @param array $option * @return void * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function addAttributeOption($option) { @@ -1216,6 +1220,8 @@ public function addAttributeToGroup($entityType, $setId, $groupId, $attributeId, * * @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 b08b99d84ab25..d56ba528295cd 100644 --- a/app/code/Magento/Eav/Model/Entity/Setup/Context.php +++ b/app/code/Magento/Eav/Model/Entity/Setup/Context.php @@ -24,6 +24,7 @@ class Context extends \Magento\Framework\Module\Setup\Context * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor * @param \Magento\Framework\Filesystem $filesystem * @param PropertyMapperInterface $attributeMapper + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Psr\Log\LoggerInterface $logger, diff --git a/app/code/Magento/Eav/Model/Form.php b/app/code/Magento/Eav/Model/Form.php index ba2384d612ea9..eb872ed481d98 100644 --- a/app/code/Magento/Eav/Model/Form.php +++ b/app/code/Magento/Eav/Model/Form.php @@ -10,6 +10,8 @@ * EAV Entity Form Model * * @author Magento Core Team + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class Form { @@ -576,6 +578,7 @@ public function setIsAjaxRequest($flag = true) * 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 97c9ce0d22323..6fff6258ef59d 100644 --- a/app/code/Magento/Eav/Model/Resource/Attribute.php +++ b/app/code/Magento/Eav/Model/Resource/Attribute.php @@ -85,6 +85,7 @@ protected function _getLoadSelect($field, $value, $object) * * @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 3f2130ec93287..bf5ce786c43c8 100644 --- a/app/code/Magento/Eav/Model/Resource/Entity/Attribute.php +++ b/app/code/Magento/Eav/Model/Resource/Entity/Attribute.php @@ -260,6 +260,7 @@ protected function _saveAdditionalAttributeData(AbstractModel $object) * @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 c56d8edbff286..ed974e100ab8c 100644 --- a/app/code/Magento/Eav/Model/Resource/Form/Fieldset.php +++ b/app/code/Magento/Eav/Model/Resource/Form/Fieldset.php @@ -33,6 +33,8 @@ protected function _construct() * * @param FormFieldset|AbstractModel $object * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _afterSave(AbstractModel $object) { diff --git a/app/code/Magento/Fedex/Model/Carrier.php b/app/code/Magento/Fedex/Model/Carrier.php index 7f5c390ed91ab..42e80b5d50435 100644 --- a/app/code/Magento/Fedex/Model/Carrier.php +++ b/app/code/Magento/Fedex/Model/Carrier.php @@ -12,6 +12,8 @@ * Fedex shipping implementation * * @author Magento Core Team + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\Carrier\CarrierInterface { @@ -252,6 +254,8 @@ public function collectRates(RateRequest $request) * * @param RateRequest $request * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function setRequest(RateRequest $request) { @@ -492,6 +496,7 @@ protected function _getQuotes() * * @param mixed $response * @return Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareRateResponse($response) { @@ -689,6 +694,7 @@ protected function _getXmlQuotes() * * @param mixed $response * @return Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _parseXmlResponse($response) { @@ -777,6 +783,7 @@ protected function _parseXml($xmlContent) * @param string $type * @param string $code * @return array|false + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getCode($type, $code = '') { @@ -1047,6 +1054,9 @@ protected function _getXMLTracking($tracking) * @param string[] $trackingValue * @param \stdClass $response * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _parseTrackingResponse($trackingValue, $response) { @@ -1222,6 +1232,9 @@ protected function _getAuthDetails() * * @param \Magento\Framework\Object $request * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _formShipmentRequest(\Magento\Framework\Object $request) { @@ -1451,6 +1464,7 @@ public function rollBack($data) * * @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 c6ef06601da39..5fe409ac12771 100644 --- a/app/code/Magento/GiftMessage/Block/Message/Inline.php +++ b/app/code/Magento/GiftMessage/Block/Message/Inline.php @@ -274,6 +274,7 @@ public function countItems() * Check if items has messages * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getItemsHasMesssages() { @@ -289,6 +290,7 @@ public function getItemsHasMesssages() * 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 b8cc61374ba9e..31045f4063ee1 100644 --- a/app/code/Magento/GiftMessage/Helper/Message.php +++ b/app/code/Magento/GiftMessage/Helper/Message.php @@ -6,6 +6,7 @@ /** * Gift Message helper + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Message extends \Magento\Core\Helper\Data { @@ -70,6 +71,7 @@ class Message extends \Magento\Core\Helper\Data * @param \Magento\Framework\Escaper $escaper * @param array $skipMessageCheck * @param bool $dbCompatibleMode + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Helper\Context $context, @@ -135,6 +137,7 @@ protected function skipPage($pageType) * @param \Magento\Framework\Object $entity * @param \Magento\Store\Model\Store|int|null $store * @return bool|string|null + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isMessagesAvailable($type, \Magento\Framework\Object $entity, $store = null) { @@ -287,6 +290,7 @@ public function setCached($key, $value) * @param array $quote * @param \Magento\Store\Model\Store|int|null $store * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getAvailableForQuoteItems($quote, $store = null) { @@ -304,6 +308,7 @@ public function getAvailableForQuoteItems($quote, $store = null) * @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 7eb71725830c3..6e48caa542480 100644 --- a/app/code/Magento/GiftMessage/Model/GiftMessageManager.php +++ b/app/code/Magento/GiftMessage/Model/GiftMessageManager.php @@ -24,6 +24,7 @@ public function __construct( * @param array $giftMessages * @param \Magento\Sales\Model\Quote $quote * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function add($giftMessages, $quote) { diff --git a/app/code/Magento/GiftMessage/Model/Save.php b/app/code/Magento/GiftMessage/Model/Save.php index 4ede29a1aaf26..22a04f2aa32b4 100644 --- a/app/code/Magento/GiftMessage/Model/Save.php +++ b/app/code/Magento/GiftMessage/Model/Save.php @@ -79,6 +79,7 @@ public function saveAllInQuote() /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getSaved() { @@ -242,6 +243,7 @@ public function getAllowQuoteItemsProducts() * * @param \Magento\Framework\Object $item * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsAllowedQuoteItem($item) { diff --git a/app/code/Magento/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php b/app/code/Magento/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php index a99f6afb3c64c..b9cb7c6a684a6 100644 --- a/app/code/Magento/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php +++ b/app/code/Magento/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php @@ -6,6 +6,9 @@ */ namespace Magento\GoogleOptimizer\Block\Adminhtml\Catalog\Category\Edit\Tab; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Googleoptimizer extends \Magento\Catalog\Block\Adminhtml\Form { /** diff --git a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Form.php b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Form.php index f374451ed0ab3..21be4393ceb33 100644 --- a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Form.php +++ b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Form.php @@ -70,6 +70,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * @param \Magento\Framework\Data\Form\Element\Factory $elementFactory * @param \Magento\GoogleShopping\Helper\Category $googleShoppingCategory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Backend\Block\Template\Context $context, diff --git a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types/Save.php b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types/Save.php index f2ee9b58d4bd8..c207fc6b0e24e 100644 --- a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types/Save.php +++ b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types/Save.php @@ -11,6 +11,7 @@ class Save extends \Magento\GoogleShopping\Controller\Adminhtml\Googleshopping\T * Save attribute set mapping * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/GoogleShopping/Helper/Data.php b/app/code/Magento/GoogleShopping/Helper/Data.php index e2fd1a3ccf156..4a80b78c59549 100644 --- a/app/code/Magento/GoogleShopping/Helper/Data.php +++ b/app/code/Magento/GoogleShopping/Helper/Data.php @@ -85,6 +85,7 @@ public function normalizeName($name) * @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 9778f83d3a867..d6be813d7658c 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute.php @@ -108,6 +108,7 @@ protected function _construct() * * @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 b897703bf7f1a..ab3c3937f2ad9 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/ContentLanguage.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/ContentLanguage.php @@ -29,6 +29,7 @@ class ContentLanguage extends \Magento\GoogleShopping\Model\Attribute\DefaultAtt * @param \Magento\GoogleShopping\Model\Config $config * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/DefaultAttribute.php b/app/code/Magento/GoogleShopping/Model/Attribute/DefaultAttribute.php index 66c3a063e552c..c0ed3c62b4d12 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/DefaultAttribute.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/DefaultAttribute.php @@ -10,6 +10,9 @@ */ namespace Magento\GoogleShopping\Model\Attribute; +/** + * @SuppressWarnings(PHPMD.NumberOfChildren) + */ class DefaultAttribute extends \Magento\GoogleShopping\Model\Attribute { /** diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/Destinations.php b/app/code/Magento/GoogleShopping/Model/Attribute/Destinations.php index 697b4e91e3966..168bba47892f2 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/Destinations.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/Destinations.php @@ -29,6 +29,7 @@ class Destinations extends \Magento\GoogleShopping\Model\Attribute\DefaultAttrib * @param \Magento\GoogleShopping\Model\Config $config * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/GoogleProductCategory.php b/app/code/Magento/GoogleShopping/Model/Attribute/GoogleProductCategory.php index 77ff5bcee7b7a..44afff6961c56 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/GoogleProductCategory.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/GoogleProductCategory.php @@ -37,6 +37,7 @@ class GoogleProductCategory extends \Magento\GoogleShopping\Model\Attribute\Defa * @param \Magento\GoogleShopping\Model\Config $config * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/ImageLink.php b/app/code/Magento/GoogleShopping/Model/Attribute/ImageLink.php index 0fb5cbf6b1342..ea1fc39e98adf 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/ImageLink.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/ImageLink.php @@ -27,6 +27,7 @@ class ImageLink extends \Magento\GoogleShopping\Model\Attribute\DefaultAttribute * @param \Magento\Catalog\Helper\Product $catalogProduct * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/Link.php b/app/code/Magento/GoogleShopping/Model/Attribute/Link.php index b8aabde6928f9..2676b9ca32f83 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/Link.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/Link.php @@ -27,6 +27,7 @@ class Link extends \Magento\GoogleShopping\Model\Attribute\DefaultAttribute * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/ProductType.php b/app/code/Magento/GoogleShopping/Model/Attribute/ProductType.php index 44a6ddd9f460a..8f7efe7ad830e 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/ProductType.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/ProductType.php @@ -29,6 +29,7 @@ class ProductType extends \Magento\GoogleShopping\Model\Attribute\DefaultAttribu * @param \Magento\Catalog\Api\CategoryRepositoryInterface $categoryRepository * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/SalePriceEffectiveDate.php b/app/code/Magento/GoogleShopping/Model/Attribute/SalePriceEffectiveDate.php index bd443169180bc..2a1af27f17692 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/SalePriceEffectiveDate.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/SalePriceEffectiveDate.php @@ -18,6 +18,8 @@ class SalePriceEffectiveDate extends \Magento\GoogleShopping\Model\Attribute\Def * @param \Magento\Catalog\Model\Product $product * @param \Magento\Framework\Gdata\Gshopping\Entry $entry * @return \Magento\Framework\Gdata\Gshopping\Entry + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function convertAttribute($product, $entry) { diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/TargetCountry.php b/app/code/Magento/GoogleShopping/Model/Attribute/TargetCountry.php index 4d5672ca1118e..09dcc47186339 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/TargetCountry.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/TargetCountry.php @@ -29,6 +29,7 @@ class TargetCountry extends \Magento\GoogleShopping\Model\Attribute\DefaultAttri * @param \Magento\GoogleShopping\Model\Config $config * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/GoogleShopping/Model/Attribute/Tax.php b/app/code/Magento/GoogleShopping/Model/Attribute/Tax.php index af7acb94ddcf6..9f683c69bc22b 100644 --- a/app/code/Magento/GoogleShopping/Model/Attribute/Tax.php +++ b/app/code/Magento/GoogleShopping/Model/Attribute/Tax.php @@ -12,6 +12,7 @@ * Tax attribute model * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Tax extends \Magento\GoogleShopping\Model\Attribute\DefaultAttribute { @@ -92,6 +93,7 @@ class Tax extends \Magento\GoogleShopping\Model\Attribute\DefaultAttribute * @param \Magento\Customer\Api\GroupManagementInterface $groupManagement * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/GoogleShopping/Model/Config.php b/app/code/Magento/GoogleShopping/Model/Config.php index 3840d0d4794e2..41be2b38879d5 100644 --- a/app/code/Magento/GoogleShopping/Model/Config.php +++ b/app/code/Magento/GoogleShopping/Model/Config.php @@ -243,6 +243,7 @@ public function getAttributes() * where: key - attribute name, value - group name * * @return array + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function getAttributeGroupsFlat() { @@ -271,6 +272,7 @@ public function getBaseAttributes() * * @param int $storeId * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsDebug($storeId) { @@ -281,6 +283,7 @@ public function getIsDebug($storeId) * 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 52c6f69d1e9d1..62cf5d985e4b4 100644 --- a/app/code/Magento/GoogleShopping/Model/MassOperations.php +++ b/app/code/Magento/GoogleShopping/Model/MassOperations.php @@ -11,6 +11,7 @@ * Controller for mass opertions with items * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class MassOperations { @@ -73,6 +74,7 @@ class MassOperations * @param \Magento\GoogleShopping\Helper\Data $gleShoppingData * @param \Magento\GoogleShopping\Helper\Category $gleShoppingCategory * @param array $data + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct( \Magento\GoogleShopping\Model\Resource\Item\CollectionFactory $collectionFactory, @@ -142,6 +144,8 @@ public function setFlag(\Magento\GoogleShopping\Model\Flag $flag) * @param int $storeId * @return $this * @throws \Exception|\Zend_Gdata_App_CaptchaRequiredException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function addProducts($productIds, $storeId) { @@ -216,6 +220,7 @@ public function addProducts($productIds, $storeId) * @param int[]|ItemCollection $items * @return $this * @throws \Exception|\Zend_Gdata_App_CaptchaRequiredException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function synchronizeItems($items) { @@ -302,6 +307,7 @@ public function synchronizeItems($items) * @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 dd411a80fdeba..66f9882556178 100644 --- a/app/code/Magento/GoogleShopping/Model/Observer.php +++ b/app/code/Magento/GoogleShopping/Model/Observer.php @@ -145,6 +145,7 @@ protected function _getItemsCollection($product) * * @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 99148fa0d9137..e2eb66de03551 100644 --- a/app/code/Magento/GoogleShopping/Model/Resource/Attribute/Collection.php +++ b/app/code/Magento/GoogleShopping/Model/Resource/Attribute/Collection.php @@ -93,6 +93,7 @@ protected function _joinAttributeSet() * Get flag - whether to join attribute_set_id to attributes or not * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getJoinAttributeSetFlag() { diff --git a/app/code/Magento/GoogleShopping/Model/Type.php b/app/code/Magento/GoogleShopping/Model/Type.php index 6847685945e03..cabda5ee7eca7 100644 --- a/app/code/Magento/GoogleShopping/Model/Type.php +++ b/app/code/Magento/GoogleShopping/Model/Type.php @@ -63,6 +63,7 @@ class Type extends \Magento\Framework\Model\AbstractModel * @param \Magento\GoogleShopping\Model\Resource\Type $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -110,6 +111,7 @@ public function loadByAttributeSetId($attributeSetId, $targetCountry) * @param CatalogModelProduct $product * @param Entry $entry * @return Entry + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function convertProductToEntry($product, $entry) { diff --git a/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php b/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php index a168d8d6fb46f..5b0df239bac18 100644 --- a/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php +++ b/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php @@ -209,6 +209,7 @@ protected function _getNumberFromToHtmlWithValue(Attribute $attribute, $value) * @param Attribute $attribute * @param mixed $value * @return string + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _getSelectHtmlWithValue(Attribute $attribute, $value) { @@ -322,6 +323,7 @@ protected function _prepareColumns() * @param \Magento\Framework\Object $column * @param boolean $isExport * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function decorateFilter($value, Attribute $row, \Magento\Framework\Object $column, $isExport) { diff --git a/app/code/Magento/ImportExport/Model/Export/AbstractEntity.php b/app/code/Magento/ImportExport/Model/Export/AbstractEntity.php index fe1e1e4a60e3b..413e85568c840 100644 --- a/app/code/Magento/ImportExport/Model/Export/AbstractEntity.php +++ b/app/code/Magento/ImportExport/Model/Export/AbstractEntity.php @@ -10,6 +10,7 @@ * Export entity abstract model * * @author Magento Core Team + * @SuppressWarnings(PHPMD.TooManyFields) */ abstract class AbstractEntity { @@ -159,6 +160,7 @@ abstract class AbstractEntity * @param \Magento\ImportExport\Model\Export\Factory $collectionFactory * @param \Magento\ImportExport\Model\Resource\CollectionByPagesIteratorFactory $resourceColFactory * @param array $data + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, diff --git a/app/code/Magento/ImportExport/Model/Export/Adapter/AbstractAdapter.php b/app/code/Magento/ImportExport/Model/Export/Adapter/AbstractAdapter.php index 053bf2e396e34..74d161bcfea05 100644 --- a/app/code/Magento/ImportExport/Model/Export/Adapter/AbstractAdapter.php +++ b/app/code/Magento/ImportExport/Model/Export/Adapter/AbstractAdapter.php @@ -108,6 +108,7 @@ public function getFileExtension() * * @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 1773db16576ec..3feec0b42d5a0 100644 --- a/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEav.php +++ b/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEav.php @@ -13,6 +13,7 @@ * Export EAV entity abstract model * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractEav extends \Magento\ImportExport\Model\Export\AbstractEntity { @@ -153,6 +154,7 @@ protected function _prepareEntityCollection(AbstractCollection $collection) * * @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 837b5d2a405c4..349e14d81d7b4 100644 --- a/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEntity.php +++ b/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEntity.php @@ -10,6 +10,8 @@ * Export entity abstract model * * @author Magento Core Team + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractEntity { @@ -243,6 +245,7 @@ protected function _initAttrValues() * * @param \Magento\Eav\Model\Entity\Collection\AbstractCollection $collection * @return \Magento\Eav\Model\Entity\Collection\AbstractCollection + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareEntityCollection(\Magento\Eav\Model\Entity\Collection\AbstractCollection $collection) { diff --git a/app/code/Magento/ImportExport/Model/Import.php b/app/code/Magento/ImportExport/Model/Import.php index 37f63e1ce2978..00d0d4e671038 100644 --- a/app/code/Magento/ImportExport/Model/Import.php +++ b/app/code/Magento/ImportExport/Model/Import.php @@ -14,6 +14,7 @@ * * @method string getBehavior() getBehavior() * @method \Magento\ImportExport\Model\Import setEntity() setEntity(string $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Import extends \Magento\ImportExport\Model\AbstractModel { @@ -123,6 +124,7 @@ class Import extends \Magento\ImportExport\Model\AbstractModel * @param Source\Import\Behavior\Factory $behaviorFactory * @param \Magento\Indexer\Model\IndexerRegistry $indexerRegistry * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Psr\Log\LoggerInterface $logger, diff --git a/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php b/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php index c7774999109af..9963b129b1c0a 100644 --- a/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php +++ b/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php @@ -7,6 +7,8 @@ /** * Import entity abstract model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractEntity { @@ -243,6 +245,7 @@ abstract class AbstractEntity * @param \Magento\ImportExport\Model\Resource\Helper $resourceHelper * @param \Magento\Framework\App\Resource $resource * @param array $data + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function __construct( \Magento\Core\Helper\Data $coreData, @@ -318,6 +321,8 @@ protected function _prepareRowForDb(array $rowData) * Validate data rows and save bunches to DB * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _saveValidatedBunches() { @@ -595,6 +600,7 @@ public function getMasterAttributeCode() * @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 7593e4170c340..461435dc8c04b 100644 --- a/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEav.php +++ b/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEav.php @@ -6,6 +6,7 @@ /** * Import EAV entity abstract model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractEav extends \Magento\ImportExport\Model\Import\AbstractEntity { @@ -81,6 +82,7 @@ abstract class AbstractEav extends \Magento\ImportExport\Model\Import\AbstractEn * @param \Magento\ImportExport\Model\Export\Factory $collectionFactory * @param \Magento\Eav\Model\Config $eavConfig * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Core\Helper\Data $coreData, diff --git a/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEntity.php b/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEntity.php index 44b33d95dfd86..f169d27c785d9 100644 --- a/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEntity.php +++ b/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEntity.php @@ -8,6 +8,8 @@ /** * Import entity abstract model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractEntity { @@ -256,6 +258,7 @@ abstract protected function _importData(); * * @param array $rowData * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _isRowScopeDefault(array $rowData) { @@ -287,6 +290,7 @@ protected function _prepareRowForDb(array $rowData) * Validate data rows and save bunches to DB. * * @return $this|void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _saveValidatedBunches() { @@ -573,6 +577,7 @@ public function isAttributeParticular($attrCode) * @param array $rowData Row data * @param int $rowNum * @return boolean + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function isAttributeValid($attrCode, array $attrParams, array $rowData, $rowNum) { diff --git a/app/code/Magento/Indexer/Model/Processor/InvalidateCache.php b/app/code/Magento/Indexer/Model/Processor/InvalidateCache.php index 2332ef4f49465..8fdbc4e5f939c 100644 --- a/app/code/Magento/Indexer/Model/Processor/InvalidateCache.php +++ b/app/code/Magento/Indexer/Model/Processor/InvalidateCache.php @@ -45,6 +45,7 @@ public function __construct( * * @param \Magento\Indexer\Model\Processor $subject * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterUpdateMview(\Magento\Indexer\Model\Processor $subject) { diff --git a/app/code/Magento/Log/Model/Aggregation.php b/app/code/Magento/Log/Model/Aggregation.php index 8e442004aad4a..eda1d103385f3 100644 --- a/app/code/Magento/Log/Model/Aggregation.php +++ b/app/code/Magento/Log/Model/Aggregation.php @@ -74,6 +74,7 @@ public function run() * * @param string $lastDate * @return null|void + * @SuppressWarnings(PHPMD.UnusedPrivateMethod) */ private function _removeEmpty($lastDate) { @@ -185,6 +186,7 @@ public function getLastRecordDate() * @param int|string $in * @param null $offset * @return bool|string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ private function _date($in, $offset = null) { @@ -201,6 +203,7 @@ private function _date($in, $offset = null) * @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 bce6876887a68..7b68c92d951cd 100644 --- a/app/code/Magento/Log/Model/Cron.php +++ b/app/code/Magento/Log/Model/Cron.php @@ -65,6 +65,7 @@ class Cron extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Log/Model/Resource/Log.php b/app/code/Magento/Log/Model/Resource/Log.php index 66a49e747df8f..c93d8f2061fea 100644 --- a/app/code/Magento/Log/Model/Resource/Log.php +++ b/app/code/Magento/Log/Model/Resource/Log.php @@ -130,6 +130,7 @@ protected function _cleanVisitors($time) * * @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 f598505ded53a..210351bc9822a 100644 --- a/app/code/Magento/Log/Model/Resource/Visitor/Collection.php +++ b/app/code/Magento/Log/Model/Resource/Visitor/Collection.php @@ -172,6 +172,7 @@ public function load($printQuery = false, $logQuery = false) * 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 cbff21f7575bb..be4001bac13cf 100644 --- a/app/code/Magento/Log/Model/Resource/Visitor/Online.php +++ b/app/code/Magento/Log/Model/Resource/Visitor/Online.php @@ -42,6 +42,7 @@ protected function _construct() * @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 ea33af37a292a..ff5db6d935e6a 100644 --- a/app/code/Magento/Log/Model/Visitor.php +++ b/app/code/Magento/Log/Model/Visitor.php @@ -62,6 +62,7 @@ class Visitor extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Multishipping/Block/Checkout/Overview.php b/app/code/Magento/Multishipping/Block/Checkout/Overview.php index 7c8a80de9d67e..58df0b6f29b2c 100644 --- a/app/code/Magento/Multishipping/Block/Checkout/Overview.php +++ b/app/code/Magento/Multishipping/Block/Checkout/Overview.php @@ -132,6 +132,7 @@ public function getShippingAddressCount() /** * @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 5bfb025ff0811..9b7e1115314c1 100644 --- a/app/code/Magento/Multishipping/Controller/Checkout.php +++ b/app/code/Magento/Multishipping/Controller/Checkout.php @@ -10,6 +10,7 @@ /** * Multishipping checkout controller + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Checkout extends \Magento\Checkout\Controller\Action implements \Magento\Checkout\Controller\Express\RedirectLoginInterface @@ -76,6 +77,8 @@ protected function _getCheckoutSession() * * @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 22b3cad9e9a88..e37aa9e5d404f 100644 --- a/app/code/Magento/Multishipping/Controller/Checkout/OverviewPost.php +++ b/app/code/Magento/Multishipping/Controller/Checkout/OverviewPost.php @@ -42,6 +42,7 @@ public function __construct( * Overview action * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php index 7a514c4e0304f..f8366b4b7468c 100644 --- a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php +++ b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php @@ -10,6 +10,9 @@ /** * Multishipping checkout model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Multishipping extends \Magento\Framework\Object { @@ -130,6 +133,7 @@ class Multishipping extends \Magento\Framework\Object * @param \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder, * @param \Magento\Framework\Api\FilterBuilder $filterBuilder, * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Checkout\Model\Session $checkoutSession, @@ -177,6 +181,7 @@ public function __construct( * Split virtual/not virtual items between default billing/shipping addresses * * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _init() { @@ -336,6 +341,8 @@ public function removeAddressItem($addressId, $itemId) * @param array $info * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function setShippingItemsInformation($info) { @@ -419,6 +426,8 @@ public function setShippingItemsInformation($info) * @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 620deff6270c8..b22970e595d78 100644 --- a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping/State.php +++ b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping/State.php @@ -143,6 +143,7 @@ public function setCompleteStep($step) * * @param string $step * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCompleteStep($step) { diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php b/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php index 753ce3d1f002c..bbc94dc134ac1 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php @@ -39,6 +39,7 @@ public function __construct( /** * @return void + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _construct() { @@ -100,6 +101,7 @@ public function getDeleteButtonHtml() * 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 92fe714575f72..59ec0aa1ef829 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php @@ -217,6 +217,7 @@ public function getResumeButtonHtml() * Getter for availability preview mode * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsPreview() { @@ -240,6 +241,7 @@ protected function isSingleStoreMode() * Getter for id of current store (the only one in single-store mode and current in multi-stores mode) * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ protected function getStoreId() { @@ -250,6 +252,7 @@ protected function getStoreId() * Getter for check is this newsletter the plain text. * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsTextType() { @@ -260,6 +263,7 @@ public function getIsTextType() * Getter for availability resume action * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCanResume() { @@ -270,6 +274,7 @@ public function getCanResume() * 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 e59d635501c99..511c0b44b4aa8 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php @@ -56,6 +56,9 @@ public function __construct( * 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 7f85c71a35b34..6b9dba21f501e 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview/Form.php @@ -16,6 +16,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * Preparing from for revision page * * @return \Magento\Backend\Block\Widget\Form + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _prepareForm() { diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php index 51c3517b4a5af..8f7674d8a1b06 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php @@ -55,6 +55,7 @@ public function getModel() * Preparing block layout * * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareLayout() { @@ -170,6 +171,7 @@ protected function _prepareLayout() * Return edit flag for block * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getEditMode() { @@ -277,6 +279,7 @@ protected function isSingleStoreMode() * 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 7c197160903b3..58aed9ac957c9 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit/Form.php @@ -49,6 +49,8 @@ public function getModel() * 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 ae0d58e28e68a..4d07ad1741af2 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview/Form.php @@ -16,6 +16,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * Preparing from for revision page * * @return \Magento\Backend\Block\Widget\Form + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _prepareForm() { diff --git a/app/code/Magento/Newsletter/Controller/Adminhtml/Queue/Save.php b/app/code/Magento/Newsletter/Controller/Adminhtml/Queue/Save.php index 5d6a8d807ba0a..f6dc01385e426 100644 --- a/app/code/Magento/Newsletter/Controller/Adminhtml/Queue/Save.php +++ b/app/code/Magento/Newsletter/Controller/Adminhtml/Queue/Save.php @@ -12,6 +12,7 @@ class Save extends \Magento\Newsletter\Controller\Adminhtml\Queue * * @throws \Magento\Framework\Model\Exception * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Newsletter/Model/Queue.php b/app/code/Magento/Newsletter/Model/Queue.php index 2da2209ba0f77..611bab0c55841 100644 --- a/app/code/Magento/Newsletter/Model/Queue.php +++ b/app/code/Magento/Newsletter/Model/Queue.php @@ -30,6 +30,7 @@ * @method string getQueueFinishAt() * @method \Magento\Newsletter\Model\Queue setQueueFinishAt(string $value) * @SuppressWarnings(PHPMD.LongVariable) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Queue extends \Magento\Email\Model\AbstractTemplate { @@ -123,6 +124,7 @@ class Queue extends \Magento\Email\Model\AbstractTemplate * @param \Magento\Newsletter\Model\Resource\Subscriber\CollectionFactory $subscriberCollectionFactory * @param \Magento\Newsletter\Model\Queue\TransportBuilder $transportBuilder * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -195,6 +197,7 @@ public function setQueueStartAtByString($startAt) * * @param int $count * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function sendPerSubscriber($count = 20) { @@ -319,6 +322,7 @@ public function setSaveStoresFlag($value) * Getter for save stores flag. * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getSaveStoresFlag() { diff --git a/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php index 1da9cb8fd70a0..ce9c6991f3886 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php +++ b/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php @@ -263,6 +263,7 @@ public function addStoreFilter($storeIds) * Get queue joined flag * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getQueueJoinedFlag() { diff --git a/app/code/Magento/Newsletter/Model/Subscriber.php b/app/code/Magento/Newsletter/Model/Subscriber.php index 1a29809a3374c..26015e724c722 100644 --- a/app/code/Magento/Newsletter/Model/Subscriber.php +++ b/app/code/Magento/Newsletter/Model/Subscriber.php @@ -135,6 +135,7 @@ class Subscriber extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Newsletter/Model/Template.php b/app/code/Magento/Newsletter/Model/Template.php index 739269724ee23..69dae3c333303 100644 --- a/app/code/Magento/Newsletter/Model/Template.php +++ b/app/code/Magento/Newsletter/Model/Template.php @@ -31,6 +31,7 @@ * @method \Magento\Newsletter\Model\Template setModifiedAt(string $value) * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Template extends \Magento\Email\Model\AbstractTemplate { @@ -100,6 +101,7 @@ class Template extends \Magento\Email\Model\AbstractTemplate * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory * @param \Magento\Framework\Filter\FilterManager $filterManager * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -216,6 +218,7 @@ public function isPreprocessed() * Check Template Text Preprocessed * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getTemplateTextPreprocessed() { diff --git a/app/code/Magento/OfflineShipping/Model/Carrier/Flatrate.php b/app/code/Magento/OfflineShipping/Model/Carrier/Flatrate.php index 559102029f395..0ba82082ea835 100644 --- a/app/code/Magento/OfflineShipping/Model/Carrier/Flatrate.php +++ b/app/code/Magento/OfflineShipping/Model/Carrier/Flatrate.php @@ -56,6 +56,8 @@ public function __construct( /** * @param \Magento\Sales\Model\Quote\Address\RateRequest $request * @return Result|bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request) { diff --git a/app/code/Magento/OfflineShipping/Model/Carrier/Pickup.php b/app/code/Magento/OfflineShipping/Model/Carrier/Pickup.php index d689bef7b9567..e1e94f8cb0570 100644 --- a/app/code/Magento/OfflineShipping/Model/Carrier/Pickup.php +++ b/app/code/Magento/OfflineShipping/Model/Carrier/Pickup.php @@ -51,6 +51,7 @@ public function __construct( /** * @param \Magento\Sales\Model\Quote\Address\RateRequest $request * @return \Magento\Shipping\Model\Rate\Result + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request) { diff --git a/app/code/Magento/OfflineShipping/Model/Carrier/Tablerate.php b/app/code/Magento/OfflineShipping/Model/Carrier/Tablerate.php index 710c6b45ff3d3..02d00b7ada975 100644 --- a/app/code/Magento/OfflineShipping/Model/Carrier/Tablerate.php +++ b/app/code/Magento/OfflineShipping/Model/Carrier/Tablerate.php @@ -50,6 +50,7 @@ class Tablerate extends \Magento\Shipping\Model\Carrier\AbstractCarrier implemen * @param \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $resultMethodFactory * @param \Magento\OfflineShipping\Model\Resource\Carrier\TablerateFactory $tablerateFactory * @param array $data + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, @@ -72,6 +73,9 @@ public function __construct( /** * @param \Magento\Sales\Model\Quote\Address\RateRequest $request * @return \Magento\Shipping\Model\Rate\Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request) { diff --git a/app/code/Magento/OfflineShipping/Model/Quote/Freeshipping.php b/app/code/Magento/OfflineShipping/Model/Quote/Freeshipping.php index 254785c9c5115..d95a49b43f9b8 100644 --- a/app/code/Magento/OfflineShipping/Model/Quote/Freeshipping.php +++ b/app/code/Magento/OfflineShipping/Model/Quote/Freeshipping.php @@ -38,6 +38,7 @@ public function __construct( * * @param \Magento\Sales\Model\Quote\Address $address * @return \Magento\OfflineShipping\Model\Quote\Freeshipping + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function collect(Address $address) { diff --git a/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php b/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php index ee3d001166fe3..929aeb75e5427 100644 --- a/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php +++ b/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php @@ -13,6 +13,10 @@ use Magento\Framework\Filesystem; use Magento\Framework\Filesystem\DirectoryList; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Tablerate extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** @@ -240,6 +244,8 @@ public function getRate(\Magento\Sales\Model\Quote\Address\RateRequest $request) * @return \Magento\OfflineShipping\Model\Resource\Carrier\Tablerate * @todo: this method should be refactored as soon as updated design will be provided * @see https://wiki.corp.x.com/display/MCOMS/Magento+Filesystem+Decisions + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function uploadAndImport(\Magento\Framework\Object $object) { @@ -402,6 +408,8 @@ protected function _getConditionFullName($conditionName) * @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 148ff16b9ce9f..d644ce13ba0ce 100644 --- a/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php +++ b/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php @@ -56,6 +56,7 @@ public function __construct( * @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 2a3c8117c52a3..1a22bdbaba79b 100644 --- a/app/code/Magento/PageCache/Model/App/FrontController/VarnishPlugin.php +++ b/app/code/Magento/PageCache/Model/App/FrontController/VarnishPlugin.php @@ -44,6 +44,7 @@ public function __construct( * @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 9f0991bf7132a..91b7320757a70 100644 --- a/app/code/Magento/PageCache/Model/Controller/Result/BuiltinPlugin.php +++ b/app/code/Magento/PageCache/Model/Controller/Result/BuiltinPlugin.php @@ -56,6 +56,7 @@ public function __construct( * @param callable $proceed * @param ResponseHttp $response * @return \Magento\Framework\Controller\ResultInterface + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundRenderResult( \Magento\Framework\Controller\ResultInterface $subject, diff --git a/app/code/Magento/Payment/Block/Form/Cc.php b/app/code/Magento/Payment/Block/Form/Cc.php index 2e4dbb9a8e4c9..5ca0b86f68a96 100644 --- a/app/code/Magento/Payment/Block/Form/Cc.php +++ b/app/code/Magento/Payment/Block/Form/Cc.php @@ -36,6 +36,7 @@ public function __construct( * 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 9143ae046fdbc..8e274cd38d22a 100644 --- a/app/code/Magento/Payment/Block/Info.php +++ b/app/code/Magento/Payment/Block/Info.php @@ -113,6 +113,7 @@ public function getValueAsArray($value, $escapeHtml = false) * false => full information may be shown * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsSecureMode() { diff --git a/app/code/Magento/Payment/Helper/Data.php b/app/code/Magento/Payment/Helper/Data.php index 29618544918da..8522149c41bc9 100644 --- a/app/code/Magento/Payment/Helper/Data.php +++ b/app/code/Magento/Payment/Helper/Data.php @@ -17,6 +17,7 @@ /** * Payment module base helper + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Data extends \Magento\Framework\App\Helper\AbstractHelper { @@ -264,6 +265,8 @@ public function getPaymentMethods() * @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 7f20e76e347c2..1261f4293557f 100644 --- a/app/code/Magento/Payment/Model/Method/AbstractMethod.php +++ b/app/code/Magento/Payment/Model/Method/AbstractMethod.php @@ -12,6 +12,8 @@ /** * Payment method abstract model * @method AbstractMethod setStore() + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) */ abstract class AbstractMethod extends \Magento\Framework\Object implements MethodInterface, PaymentMethodChecksInterface { @@ -304,6 +306,7 @@ public function canRefundPartialPerInvoice() * * @param \Magento\Framework\Object $payment * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function canVoid(\Magento\Framework\Object $payment) { @@ -357,6 +360,7 @@ public function canFetchTransactionInfo() * @param \Magento\Payment\Model\Info $payment * @param string $transactionId * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function fetchTransactionInfo(\Magento\Payment\Model\Info $payment, $transactionId) { @@ -506,6 +510,7 @@ public function validate() * * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function order(\Magento\Framework\Object $payment, $amount) { @@ -523,6 +528,7 @@ public function order(\Magento\Framework\Object $payment, $amount) * * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function authorize(\Magento\Framework\Object $payment, $amount) { @@ -540,6 +546,7 @@ public function authorize(\Magento\Framework\Object $payment, $amount) * * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function capture(\Magento\Framework\Object $payment, $amount) { @@ -587,6 +594,7 @@ public function processBeforeRefund($invoice, $payment) * @param float $amount * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function refund(\Magento\Framework\Object $payment, $amount) { @@ -614,6 +622,7 @@ public function processCreditmemo($creditmemo, $payment) * @param \Magento\Framework\Object $payment * * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function cancel(\Magento\Framework\Object $payment) { @@ -640,6 +649,7 @@ public function void(\Magento\Framework\Object $payment) * * @param \Magento\Payment\Model\Info $payment * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function canReviewPayment(\Magento\Payment\Model\Info $payment) { @@ -760,6 +770,7 @@ public function isAvailable($quote = null) * @param object $stateObject * * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function initialize($paymentAction, $stateObject) { @@ -794,6 +805,7 @@ protected function _debug($debugData) * Define if debugging is enabled * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDebugFlag() { diff --git a/app/code/Magento/Persistent/Helper/Data.php b/app/code/Magento/Persistent/Helper/Data.php index 47b1a12e53b9a..4105aeb1515ae 100644 --- a/app/code/Magento/Persistent/Helper/Data.php +++ b/app/code/Magento/Persistent/Helper/Data.php @@ -156,6 +156,7 @@ public function getLifeTime($store = null) * Check if set `Clear on Logout` in config settings * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getClearOnLogout() { @@ -190,6 +191,7 @@ public function getPersistentConfigFilePath() * * @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 2681c966cb43a..793d034a8845e 100644 --- a/app/code/Magento/Persistent/Model/Observer/ClearExpiredCronJob.php +++ b/app/code/Magento/Persistent/Model/Observer/ClearExpiredCronJob.php @@ -38,6 +38,7 @@ public function __construct( * * @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 b650f1aa62ed9..d7161945f73c2 100644 --- a/app/code/Magento/Persistent/Model/Observer/CustomerAuthenticatedEvent.php +++ b/app/code/Magento/Persistent/Model/Observer/CustomerAuthenticatedEvent.php @@ -46,6 +46,7 @@ public function __construct( * * @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 f90e4a7a78494..74df0031f820e 100644 --- a/app/code/Magento/Persistent/Model/Observer/Session.php +++ b/app/code/Magento/Persistent/Model/Observer/Session.php @@ -72,6 +72,7 @@ public function __construct( /** * @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 2d98c95e5a896..156934676a9f3 100644 --- a/app/code/Magento/Persistent/Model/Observer/SetLoadPersistentQuote.php +++ b/app/code/Magento/Persistent/Model/Observer/SetLoadPersistentQuote.php @@ -58,6 +58,7 @@ public function __construct( * * @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 8015e496df4f3..ef162816c9a99 100644 --- a/app/code/Magento/Persistent/Model/Session.php +++ b/app/code/Magento/Persistent/Model/Session.php @@ -109,6 +109,7 @@ class Session extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -162,6 +163,7 @@ public function setLoadExpired($loadExpired = true) * Get if model loads expired sessions * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getLoadExpired() { diff --git a/app/code/Magento/ProductAlert/Model/Email.php b/app/code/Magento/ProductAlert/Model/Email.php index 98b57693e8cb5..70ec05d059f13 100644 --- a/app/code/Magento/ProductAlert/Model/Email.php +++ b/app/code/Magento/ProductAlert/Model/Email.php @@ -8,6 +8,7 @@ * ProductAlert Email processor * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Email extends \Magento\Framework\Model\AbstractModel { @@ -118,6 +119,7 @@ class Email extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -280,6 +282,8 @@ protected function _getStockBlock() * Send customer email * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function send() { diff --git a/app/code/Magento/ProductAlert/Model/Observer.php b/app/code/Magento/ProductAlert/Model/Observer.php index 326d6a005d61b..6c3cbac7f97e9 100644 --- a/app/code/Magento/ProductAlert/Model/Observer.php +++ b/app/code/Magento/ProductAlert/Model/Observer.php @@ -8,6 +8,7 @@ * ProductAlert observer * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Observer { @@ -123,6 +124,7 @@ class Observer * @param \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder * @param \Magento\ProductAlert\Model\EmailFactory $emailFactory * @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Catalog\Helper\Data $catalogData, @@ -172,6 +174,8 @@ protected function _getWebsites() * * @param \Magento\ProductAlert\Model\Email $email * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _processPrice(\Magento\ProductAlert\Model\Email $email) { @@ -257,6 +261,8 @@ protected function _processPrice(\Magento\ProductAlert\Model\Email $email) * * @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 0fafc02a59653..d7b1018cd2682 100644 --- a/app/code/Magento/ProductAlert/Model/Resource/AbstractResource.php +++ b/app/code/Magento/ProductAlert/Model/Resource/AbstractResource.php @@ -62,6 +62,7 @@ public function loadByParam(\Magento\Framework\Model\AbstractModel $object) * @param int $customerId * @param int $websiteId * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function deleteCustomer(\Magento\Framework\Model\AbstractModel $object, $customerId, $websiteId = null) { diff --git a/app/code/Magento/Reports/Block/Adminhtml/Config/Form/Field/YtdStart.php b/app/code/Magento/Reports/Block/Adminhtml/Config/Form/Field/YtdStart.php index 1d2bf67b5f7e9..9bf05b555493e 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Config/Form/Field/YtdStart.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Config/Form/Field/YtdStart.php @@ -16,6 +16,7 @@ class YtdStart extends \Magento\Backend\Block\System\Config\Form\Field /** * @param AbstractElement $element * @return string + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getElementHtml(AbstractElement $element) { diff --git a/app/code/Magento/Reports/Block/Adminhtml/Filter/Form.php b/app/code/Magento/Reports/Block/Adminhtml/Filter/Form.php index 502ce81beb70b..c70792b3b7dd3 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Filter/Form.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Filter/Form.php @@ -51,6 +51,7 @@ public function setFieldVisibility($fieldId, $visibility) * @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 6cb9449636580..b8f61390531c9 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Grid.php @@ -71,6 +71,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid * Apply sorting and filtering to collection * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareCollection() { @@ -183,6 +184,7 @@ protected function _getAllowedStoreIds() * * @param array $data * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _setFilterValues($data) { @@ -208,6 +210,7 @@ public function setStoreSwitcherVisibility($visible = true) * Return visibility of store switcher * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getStoreSwitcherVisibility() { @@ -240,6 +243,7 @@ public function setDateFilterVisibility($visible = true) * 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 78b5540d71085..16b58d0c62337 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Grid/AbstractGrid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Grid/AbstractGrid.php @@ -185,6 +185,8 @@ protected function _getStoreIds() /** * @return $this|\Magento\Backend\Block\Widget\Grid + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _prepareCollection() { @@ -392,6 +394,7 @@ protected function _addOrderStatusFilter($collection, $filterData) * @param \Magento\Reports\Model\Resource\Report\Collection\AbstractCollection $collection * @param \Magento\Framework\Object $filterData * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _addCustomFilter($collection, $filterData) { diff --git a/app/code/Magento/Reports/Block/Adminhtml/Product/Viewed/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Product/Viewed/Grid.php index 4795380e045fd..205ed5605041e 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Product/Viewed/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Product/Viewed/Grid.php @@ -8,6 +8,7 @@ * Adminhtml most viewed products report grid block * * @author Magento Core Team + * @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 73e4922c38b83..1bebe56a63ee4 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Bestsellers/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Bestsellers/Grid.php @@ -8,6 +8,7 @@ * Adminhtml bestsellers report grid block * * @author Magento Core Team + * @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 5cdac91fbf3da..467e19cc6a5e3 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons/Grid.php @@ -8,6 +8,7 @@ * Adminhtml coupons report grid block * * @author Magento Core Team + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid { @@ -40,6 +41,7 @@ public function getResourceCollectionName() /** * @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 04167c0dabcf3..38d3beec3add0 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced/Grid.php @@ -8,6 +8,7 @@ * Adminhtml invoiced report grid block * * @author Magento Core Team + * @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 7c03365493f66..13eaebac77f76 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded/Grid.php @@ -8,6 +8,7 @@ * Adminhtml refunded report grid block * * @author Magento Core Team + * @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 b27cfc8492da7..e6518ab8daa8c 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales/Grid.php @@ -8,6 +8,7 @@ * Adminhtml sales report grid block * * @author Magento Core Team + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid { @@ -38,6 +39,7 @@ public function getResourceCollectionName() /** * @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 fc3ca2fdf5f00..2c36b41b63479 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping/Grid.php @@ -8,6 +8,7 @@ * Adminhtml shipping report grid block * * @author Magento Core Team + * @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 cb96bc5b98347..bc26a7aa77229 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax/Grid.php @@ -8,6 +8,7 @@ * Adminhtml tax report grid block * * @author Magento Core Team + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid { @@ -152,6 +153,7 @@ protected function _prepareColumns() * 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 8d5a10fc9add3..1dd759eabce3a 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php @@ -8,6 +8,7 @@ * Adminhtml abandoned shopping carts report grid block * * @author Magento Core Team + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\Shopcart { @@ -85,6 +86,7 @@ protected function _addColumnFilterToCollection($column) /** * @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 db716f31f5ce7..8cd98a5704165 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Customer/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Customer/Grid.php @@ -8,6 +8,7 @@ * Adminhtml items in carts report grid block * * @author Magento Core Team + * @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 eca3edddcfaed..8ad74458a3966 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Product/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Product/Grid.php @@ -8,6 +8,7 @@ * Adminhtml products in carts report grid block * * @author Magento Core Team + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\Shopcart { diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales.php index de64f4a3fcf6a..b8bf2a28fbf54 100644 --- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales.php +++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales.php @@ -10,6 +10,9 @@ */ namespace Magento\Reports\Controller\Adminhtml\Report; +/** + * @SuppressWarnings(PHPMD.NumberOfChildren) + */ class Sales extends AbstractReport { /** diff --git a/app/code/Magento/Reports/Helper/Data.php b/app/code/Magento/Reports/Helper/Data.php index 5ddcd53cf4825..dbc868823e0ea 100644 --- a/app/code/Magento/Reports/Helper/Data.php +++ b/app/code/Magento/Reports/Helper/Data.php @@ -41,6 +41,7 @@ public function __construct(\Magento\Framework\App\Helper\Context $context, \Mag * @param string $to * @param string $period * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getIntervals($from, $to, $period = self::REPORT_PERIOD_TYPE_DAY) { diff --git a/app/code/Magento/Reports/Model/Event/Observer.php b/app/code/Magento/Reports/Model/Event/Observer.php index 29a7c544c17b3..20d0c87adc0c9 100644 --- a/app/code/Magento/Reports/Model/Event/Observer.php +++ b/app/code/Magento/Reports/Model/Event/Observer.php @@ -106,6 +106,7 @@ protected function _event($eventTypeId, $objectId, $subjectId = null, $subtype = * * @param \Magento\Framework\Event\Observer $observer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function customerLogin(\Magento\Framework\Event\Observer $observer) { @@ -129,6 +130,7 @@ public function customerLogin(\Magento\Framework\Event\Observer $observer) * * @param \Magento\Framework\Event\Observer $observer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function customerLogout(\Magento\Framework\Event\Observer $observer) { @@ -181,6 +183,7 @@ public function sendfriendProduct(\Magento\Framework\Event\Observer $observer) * * @param \Magento\Framework\Event\Observer $observer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function catalogProductCompareRemoveProduct(\Magento\Framework\Event\Observer $observer) { @@ -196,6 +199,7 @@ public function catalogProductCompareRemoveProduct(\Magento\Framework\Event\Obse * * @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 f240cccde06ff..eb4831e0f83cd 100644 --- a/app/code/Magento/Reports/Model/Item.php +++ b/app/code/Magento/Reports/Model/Item.php @@ -32,6 +32,7 @@ public function setIsEmpty($flag = true) * 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 c70d3a2ece96a..a1798f1f957f0 100644 --- a/app/code/Magento/Reports/Model/Product/Index/AbstractIndex.php +++ b/app/code/Magento/Reports/Model/Product/Index/AbstractIndex.php @@ -58,6 +58,7 @@ abstract class AbstractIndex extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Reports/Model/Product/Index/Compared.php b/app/code/Magento/Reports/Model/Product/Index/Compared.php index f79d8be7a0cf2..03f4c1abdd2db 100644 --- a/app/code/Magento/Reports/Model/Product/Index/Compared.php +++ b/app/code/Magento/Reports/Model/Product/Index/Compared.php @@ -48,6 +48,7 @@ class Compared extends \Magento\Reports\Model\Product\Index\AbstractIndex * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Reports/Model/Resource/Entity/Summary/Collection/AbstractCollection.php b/app/code/Magento/Reports/Model/Resource/Entity/Summary/Collection/AbstractCollection.php index 8e54e0fba2628..2b83d5ed6a740 100644 --- a/app/code/Magento/Reports/Model/Resource/Entity/Summary/Collection/AbstractCollection.php +++ b/app/code/Magento/Reports/Model/Resource/Entity/Summary/Collection/AbstractCollection.php @@ -83,6 +83,7 @@ public function setSelectPeriod($periodType, $customStart = null, $customEnd = n * * @param int $period * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setDatePeriod($period) { @@ -94,6 +95,7 @@ public function setDatePeriod($period) * * @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 62e22c7704cad..3c8792ed77cdb 100644 --- a/app/code/Magento/Reports/Model/Resource/Event.php +++ b/app/code/Magento/Reports/Model/Resource/Event.php @@ -54,6 +54,7 @@ protected function _construct() * @param int $customerId * @param array $types * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function updateCustomerType(\Magento\Reports\Model\Event $model, $visitorId, $customerId, $types = []) { @@ -168,6 +169,7 @@ public function getCurrentStoreIds(array $predefinedStoreIds = null) * * @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 5e90b28e091f9..ce22dd6b49544 100644 --- a/app/code/Magento/Reports/Model/Resource/Order/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Order/Collection.php @@ -10,6 +10,7 @@ * Reports orders collection * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Collection extends \Magento\Sales\Model\Resource\Order\Collection { @@ -105,6 +106,7 @@ public function __construct( * * @param string $range * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function checkIsLive($range) { @@ -361,6 +363,7 @@ protected function _getTZRangeOffsetExpression($range, $attribute, $from = null, * @param string $tzFrom * @param string $tzTo * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getTZRangeExpressionForAttribute($range, $attribute, $tzFrom = '+00:00', $tzTo = null) { @@ -383,6 +386,7 @@ protected function _getTZRangeExpressionForAttribute($range, $attribute, $tzFrom * @param string $customEnd * @param bool $returnObjects * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getDateRange($range, $customStart, $customEnd, $returnObjects = false) { @@ -539,6 +543,7 @@ protected function _calculateTotalsLive($isFilter = 0) * * @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 28ad32d28ed42..9999f93a21cc7 100644 --- a/app/code/Magento/Reports/Model/Resource/Product/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Product/Collection.php @@ -10,6 +10,9 @@ */ namespace Magento\Reports\Model\Resource\Product; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection { const SELECT_COUNT_SQL_TYPE_CART = 1; diff --git a/app/code/Magento/Reports/Model/Resource/Product/Index/Collection/AbstractCollection.php b/app/code/Magento/Reports/Model/Resource/Product/Index/Collection/AbstractCollection.php index 6a980688534b0..30f4aef3b87fa 100644 --- a/app/code/Magento/Reports/Model/Resource/Product/Index/Collection/AbstractCollection.php +++ b/app/code/Magento/Reports/Model/Resource/Product/Index/Collection/AbstractCollection.php @@ -10,6 +10,9 @@ */ namespace Magento\Reports\Model\Resource\Product\Index\Collection; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ abstract class AbstractCollection extends \Magento\Catalog\Model\Resource\Product\Collection { /** diff --git a/app/code/Magento/Reports/Model/Resource/Product/Lowstock/Collection.php b/app/code/Magento/Reports/Model/Resource/Product/Lowstock/Collection.php index c6e28286319ba..7d3fcbf8dfa13 100644 --- a/app/code/Magento/Reports/Model/Resource/Product/Lowstock/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Product/Lowstock/Collection.php @@ -10,6 +10,9 @@ */ namespace Magento\Reports\Model\Resource\Product\Lowstock; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Collection extends \Magento\Reports\Model\Resource\Product\Collection { /** diff --git a/app/code/Magento/Reports/Model/Resource/Report/AbstractReport.php b/app/code/Magento/Reports/Model/Resource/Report/AbstractReport.php index 8fea5b72d7d08..e52ccfcba2df5 100644 --- a/app/code/Magento/Reports/Model/Resource/Report/AbstractReport.php +++ b/app/code/Magento/Reports/Model/Resource/Report/AbstractReport.php @@ -7,6 +7,7 @@ /** * Abstract report aggregate resource model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractReport extends \Magento\Framework\Model\Resource\Db\AbstractDb { @@ -275,6 +276,7 @@ protected function _makeConditionFromDateRangeSelect($select, $periodColumn) * @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 0065c5b791cdf..49b2e991485df 100644 --- a/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed.php +++ b/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed.php @@ -78,6 +78,7 @@ protected function _construct() * @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 7923155007ee7..322f2672dd048 100644 --- a/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed/Collection.php @@ -8,6 +8,9 @@ */ namespace Magento\Reports\Model\Resource\Report\Product\Viewed; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Collection extends \Magento\Reports\Model\Resource\Report\Collection\AbstractCollection { /** @@ -218,6 +221,9 @@ public function addStoreRestrictions($storeIds) * 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 6c3e9d99b3e7e..1d41208d2f999 100644 --- a/app/code/Magento/Reports/Model/Resource/Review/Customer/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Review/Customer/Collection.php @@ -28,6 +28,7 @@ class Collection extends \Magento\Review\Model\Resource\Review\Collection * @param \Magento\Customer\Model\Resource\Customer $customerResource * @param mixed $connection * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Core\Model\EntityFactory $entityFactory, diff --git a/app/code/Magento/Reports/Model/Resource/Shopcart/Product/Collection.php b/app/code/Magento/Reports/Model/Resource/Shopcart/Product/Collection.php index 65a991c52850c..33202f691ed49 100644 --- a/app/code/Magento/Reports/Model/Resource/Shopcart/Product/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Shopcart/Product/Collection.php @@ -31,6 +31,7 @@ protected function _joinFields() * @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 3e50e6b5be0e9..d1b6c19e00ed2 100644 --- a/app/code/Magento/Reports/Model/Totals.php +++ b/app/code/Magento/Reports/Model/Totals.php @@ -18,6 +18,8 @@ class Totals * @param string $from * @param string $to * @return \Magento\Framework\Object + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function countTotals($grid, $from, $to) { diff --git a/app/code/Magento/Review/Block/Adminhtml/Add/Form.php b/app/code/Magento/Review/Block/Adminhtml/Add/Form.php index 829789a368dd9..1c65f642ba2b1 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Add/Form.php +++ b/app/code/Magento/Review/Block/Adminhtml/Add/Form.php @@ -50,6 +50,7 @@ public function __construct( * 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 60d5e3f094a5c..a43aed9e8e87d 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Edit.php +++ b/app/code/Magento/Review/Block/Adminhtml/Edit.php @@ -54,6 +54,7 @@ public function __construct( * 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 7d961b202044b..3651d0b47d9c1 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Edit/Form.php +++ b/app/code/Magento/Review/Block/Adminhtml/Edit/Form.php @@ -67,6 +67,7 @@ public function __construct( * 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 3df4f24b7f9ee..0e0542f0c131e 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Grid.php +++ b/app/code/Magento/Review/Block/Adminhtml/Grid.php @@ -152,6 +152,7 @@ protected function _prepareCollection() * 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 2e608f54a9579..94fd04c859f0a 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Product/Edit/Tab/Reviews.php +++ b/app/code/Magento/Review/Block/Adminhtml/Product/Edit/Tab/Reviews.php @@ -6,6 +6,9 @@ */ namespace Magento\Review\Block\Adminhtml\Product\Edit\Tab; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Reviews extends \Magento\Review\Block\Adminhtml\Grid { /** diff --git a/app/code/Magento/Review/Block/Adminhtml/Product/Grid.php b/app/code/Magento/Review/Block/Adminhtml/Product/Grid.php index 500357dd747dd..6389f6d182c17 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Product/Grid.php +++ b/app/code/Magento/Review/Block/Adminhtml/Product/Grid.php @@ -8,6 +8,7 @@ * Adminhtml product grid block * * @author Magento Core Team + * @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 5393269b9a20a..ba53a2324e7df 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Rating/Detailed.php +++ b/app/code/Magento/Review/Block/Adminhtml/Rating/Detailed.php @@ -148,6 +148,7 @@ public function setIndependentMode() * @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 1e1ee3352df1e..14f151e57f214 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php +++ b/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php @@ -60,6 +60,9 @@ public function __construct( * 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 7061078082210..3cf00c12c2c29 100644 --- a/app/code/Magento/Review/Block/Form.php +++ b/app/code/Magento/Review/Block/Form.php @@ -13,6 +13,7 @@ * Review form block * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Form extends \Magento\Framework\View\Element\Template { @@ -85,6 +86,7 @@ class Form extends \Magento\Framework\View\Element\Template * @param \Magento\Framework\App\Http\Context $httpContext * @param \Magento\Customer\Model\Url $customerUrl * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, diff --git a/app/code/Magento/Review/Block/Product/View.php b/app/code/Magento/Review/Block/Product/View.php index a2a92b010050a..567ceb37336be 100644 --- a/app/code/Magento/Review/Block/Product/View.php +++ b/app/code/Magento/Review/Block/Product/View.php @@ -11,6 +11,7 @@ * Product Reviews Page * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class View extends \Magento\Catalog\Block\Product\View { @@ -41,6 +42,7 @@ class View extends \Magento\Catalog\Block\Product\View * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency * @param \Magento\Review\Model\Resource\Review\CollectionFactory $collectionFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Catalog\Block\Product\Context $context, diff --git a/app/code/Magento/Review/Controller/Adminhtml/Product/Save.php b/app/code/Magento/Review/Controller/Adminhtml/Product/Save.php index 61f4995772978..873ddf6580356 100644 --- a/app/code/Magento/Review/Controller/Adminhtml/Product/Save.php +++ b/app/code/Magento/Review/Controller/Adminhtml/Product/Save.php @@ -9,6 +9,7 @@ class Save extends \Magento\Review\Controller\Adminhtml\Product { /** * @return mixed + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Review/Controller/Product.php b/app/code/Magento/Review/Controller/Product.php index 1bbc2610ff55c..3955e52e9f7fd 100644 --- a/app/code/Magento/Review/Controller/Product.php +++ b/app/code/Magento/Review/Controller/Product.php @@ -13,6 +13,7 @@ * Review controller * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Product extends \Magento\Framework\App\Action\Action { @@ -106,6 +107,7 @@ class Product extends \Magento\Framework\App\Action\Action * @param \Magento\Framework\Session\Generic $reviewSession * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/app/code/Magento/Review/Controller/Product/Post.php b/app/code/Magento/Review/Controller/Product/Post.php index 24f6095ac0385..22d3c05f8283b 100644 --- a/app/code/Magento/Review/Controller/Product/Post.php +++ b/app/code/Magento/Review/Controller/Product/Post.php @@ -13,6 +13,7 @@ class Post extends \Magento\Review\Controller\Product * Submit new review action * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Review/Helper/Data.php b/app/code/Magento/Review/Helper/Data.php index 37508f871d6d9..4174eccc53da4 100644 --- a/app/code/Magento/Review/Helper/Data.php +++ b/app/code/Magento/Review/Helper/Data.php @@ -76,6 +76,7 @@ public function getDetailHtml($origDetail) * 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 64ba57293a043..a97cb8b6d21f0 100644 --- a/app/code/Magento/Review/Model/Resource/Rating.php +++ b/app/code/Magento/Review/Model/Resource/Rating.php @@ -158,6 +158,7 @@ public function getStores($ratingId) * * @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 e43f85a0fcfe5..5a22dd874d2d1 100644 --- a/app/code/Magento/Review/Model/Resource/Review/Product/Collection.php +++ b/app/code/Magento/Review/Model/Resource/Review/Product/Collection.php @@ -10,6 +10,7 @@ * Review Product Collection * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection { @@ -447,6 +448,7 @@ public function setOrder($attribute, $dir = 'DESC') * @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 100b0edb3c80d..74a6a1576961f 100644 --- a/app/code/Magento/Review/Model/Review.php +++ b/app/code/Magento/Review/Model/Review.php @@ -18,6 +18,7 @@ * @method \Magento\Review\Model\Review setEntityPkValue(int $value) * @method int getStatusId() * @method \Magento\Review\Model\Review setStatusId(int $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Review extends \Magento\Framework\Model\AbstractModel { @@ -120,6 +121,7 @@ class Review extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Rule/Model/AbstractModel.php b/app/code/Magento/Rule/Model/AbstractModel.php index 80aeaa77a2477..cff0edf79a203 100644 --- a/app/code/Magento/Rule/Model/AbstractModel.php +++ b/app/code/Magento/Rule/Model/AbstractModel.php @@ -99,6 +99,7 @@ public function __construct( * * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function beforeSave() { @@ -296,6 +297,7 @@ public function loadPost(array $data) * * @param array $data * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _convertFlatToRecursive(array $data) { @@ -350,6 +352,8 @@ public function validate(\Magento\Framework\Object $object) * * @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 b888e4dee7c8d..ad0b585ed1091 100644 --- a/app/code/Magento/Rule/Model/Action/AbstractAction.php +++ b/app/code/Magento/Rule/Model/Action/AbstractAction.php @@ -337,6 +337,7 @@ public function getRemoveLinkHtml() /** * @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 916a1404540f9..675b1ee40ff20 100644 --- a/app/code/Magento/Rule/Model/Condition/AbstractCondition.php +++ b/app/code/Magento/Rule/Model/Condition/AbstractCondition.php @@ -13,6 +13,10 @@ use Magento\Framework\Data\Form; use Magento\Framework\Data\Form\Element\AbstractElement; +/** + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + */ abstract class AbstractCondition extends \Magento\Framework\Object implements ConditionInterface { /** @@ -216,6 +220,7 @@ public function asXml() /** * @param array $arr * @return $this + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function loadArray($arr) { @@ -407,6 +412,7 @@ public function getValue() /** * @return array|string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getValueName() { @@ -701,6 +707,9 @@ public function asStringRecursive($level = 0) * * @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 45d78849d0386..a1f5d6d55bcb7 100644 --- a/app/code/Magento/Rule/Model/Condition/Combine.php +++ b/app/code/Magento/Rule/Model/Condition/Combine.php @@ -199,6 +199,7 @@ public function asXml($containerKey = 'conditions', $itemKey = 'condition') * @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 f0d4de7d40fb9..68b6ef8b59b11 100644 --- a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php +++ b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php @@ -10,6 +10,10 @@ */ namespace Magento\Rule\Model\Condition\Product; +/** + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ abstract class AbstractProduct extends \Magento\Rule\Model\Condition\AbstractCondition { /** @@ -188,6 +192,7 @@ public function loadAttributeOptions() * 'value_option' - hashed array: array($value => $label, ...), * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareValueOptions() { @@ -456,6 +461,7 @@ public function getValueElementChooserUrl() * Retrieve Explicit Apply * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getExplicitApply() { @@ -482,6 +488,7 @@ public function getExplicitApply() * * @param array $arr * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function loadArray($arr) { @@ -525,6 +532,8 @@ public function loadArray($arr) * * @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 0f8f8cecb3928..ee2d7c87022bb 100644 --- a/app/code/Magento/Rule/Model/Condition/Sql/Builder.php +++ b/app/code/Magento/Rule/Model/Condition/Sql/Builder.php @@ -140,6 +140,7 @@ protected function _getMappedSqlCondition(AbstractCondition $condition, $value = * @param Combine $combine * @param string $value * @return string + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getMappedSqlCombination(Combine $combine, $value = '') { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php index e005960ffa7ef..e71984f2f6cb3 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php @@ -8,6 +8,8 @@ /** * 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 3fb9895a8e77b..5c30fca8bcd6f 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/AbstractCreate.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/AbstractCreate.php @@ -10,6 +10,7 @@ * Adminhtml sales order create abstract block * * @author Magento Core Team + * @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 0a1de984a0fa3..39b9566ce0ac2 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Billing/Address.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Billing/Address.php @@ -8,6 +8,7 @@ * Adminhtml sales order create billing address block * * @author Magento Core Team + * @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 df37fb306b619..3f8c3f8e40ade 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form.php @@ -55,6 +55,7 @@ class Form extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate * @param \Magento\Framework\Locale\CurrencyInterface $localeCurrency * @param \Magento\Customer\Model\Address\Mapper $addressMapper * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Backend\Block\Template\Context $context, diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php index 522bbadd38856..75c302032f95f 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php @@ -140,6 +140,7 @@ protected function _getAdditionalFormElementRenderers() * * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _addAdditionalFormElementData(\Magento\Framework\Data\Form\Element\AbstractElement $element) { @@ -152,6 +153,7 @@ protected function _addAdditionalFormElementData(\Magento\Framework\Data\Form\El * @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 38ff541a8c157..79217910d87dd 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php @@ -45,6 +45,7 @@ class Account extends AbstractForm * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository * @param ExtensibleDataObjectConverter $extensibleDataObjectConverter * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Backend\Block\Template\Context $context, diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php index 3d3420432cb07..9ae0ed6cc223d 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php @@ -9,6 +9,7 @@ /** * 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 44c40e361c743..7ca784342edfe 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php @@ -13,6 +13,7 @@ /** * Adminhtml sales order create items grid block + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Grid extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate { @@ -81,6 +82,7 @@ class Grid extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate * @param StockRegistryInterface $stockRegistry * @param StockStateInterface $stockState * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Backend\Block\Template\Context $context, @@ -446,6 +448,7 @@ public function getCustomOptions(Item $item) * 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 5135cc9f37156..87419e4c8e4f6 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Shipping/Address.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Shipping/Address.php @@ -8,6 +8,7 @@ * Adminhtml sales order create shipping address block * * @author Magento Core Team + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Address extends \Magento\Sales\Block\Adminhtml\Order\Create\Form\Address { @@ -62,6 +63,7 @@ public function getIsShipping() * Same as billing address flag * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsAsBilling() { @@ -72,6 +74,7 @@ public function getIsAsBilling() * Saving shipping address must be turned off, when it is the same as billing * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDontSaveInAddressBook() { @@ -118,6 +121,7 @@ public function getAddress() * 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 28187dad8301e..7ae70dec4da1e 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebar.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebar.php @@ -139,6 +139,7 @@ public function getItemCount() * Retrieve all items * * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getItems() { @@ -217,6 +218,7 @@ public function getItemQty(\Magento\Framework\Object $item) * * @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 dedf8478a6d14..7b2ce7852497d 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php @@ -186,6 +186,7 @@ public function canSendNewOrderConfirmationEmail() * 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 142451ba00a56..f279f4f7c98b3 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Discount.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Discount.php @@ -10,6 +10,7 @@ * Subtotal Total Row Renderer * * @author Magento Core Team + * @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 e092ed249ec78..9ecaa1792d15f 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php @@ -10,6 +10,7 @@ * Subtotal Total Row Renderer * * @author Magento Core Team + * @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 ac7c56845d3e0..fc26e1dbb60b8 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php @@ -10,6 +10,7 @@ * Subtotal Total Row Renderer * * @author Magento Core Team + * @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 6872e52489f7a..05cc201e0b422 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php @@ -10,6 +10,7 @@ * Subtotal Total Row Renderer * * @author Magento Core Team + * @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 3dc17dd19dbe3..93fd4866920c4 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php @@ -8,6 +8,7 @@ * Tax Total Row Renderer * * @author Magento Core Team + * @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 196e28d552650..0625b06204f0b 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Items.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Items.php @@ -91,6 +91,7 @@ protected function _beforeToHtml() * 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 60799d03fb743..2db7a175216f8 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View.php @@ -53,6 +53,8 @@ public function __construct( * 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 920fe13ee0154..8a7b99cdc2bc8 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Status/Edit/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Status/Edit/Form.php @@ -6,6 +6,7 @@ /** * 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 919c1cf898ed6..2980f4045d299 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View.php @@ -63,6 +63,9 @@ public function __construct( * 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 0a1aab9df654a..628947f9667ae 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php @@ -8,6 +8,7 @@ * Sales Adminhtml report filter form * * @author Magento Core Team + * @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 3283faa517d23..8752c911a6595 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Coupon.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Coupon.php @@ -8,6 +8,7 @@ * Sales Adminhtml report filter form for coupons report * * @author Magento Core Team + * @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 204927be18ac3..9675c7f5baf28 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Order.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Order.php @@ -8,6 +8,7 @@ * Sales Adminhtml report filter form order * * @author Magento Core Team + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Order extends \Magento\Sales\Block\Adminhtml\Report\Filter\Form { @@ -15,6 +16,7 @@ class Order extends \Magento\Sales\Block\Adminhtml\Report\Filter\Form * Preparing form * * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _prepareForm() { diff --git a/app/code/Magento/Sales/Block/Adminhtml/System/Config/Form/Fieldset/Order/Statuses.php b/app/code/Magento/Sales/Block/Adminhtml/System/Config/Form/Fieldset/Order/Statuses.php index 248e3806fd63c..1a2c47e57f7a8 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/System/Config/Form/Fieldset/Order/Statuses.php +++ b/app/code/Magento/Sales/Block/Adminhtml/System/Config/Form/Fieldset/Order/Statuses.php @@ -103,6 +103,7 @@ protected function _getFieldRenderer() * @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 ed4b0b0335f25..b80cb099783bf 100644 --- a/app/code/Magento/Sales/Block/Items/AbstractItems.php +++ b/app/code/Magento/Sales/Block/Items/AbstractItems.php @@ -8,6 +8,7 @@ * Abstract block for display sales (quote/order/invoice etc.) items * * @author Magento Core Team + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class AbstractItems extends \Magento\Framework\View\Element\Template { @@ -22,6 +23,7 @@ class AbstractItems extends \Magento\Framework\View\Element\Template * @param string $type * @return \Magento\Framework\View\Element\AbstractBlock * @throws \RuntimeException + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getItemRenderer($type) { @@ -46,6 +48,7 @@ public function getItemRenderer($type) * * @param \Magento\Framework\View\Element\AbstractBlock $renderer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _prepareItem(\Magento\Framework\View\Element\AbstractBlock $renderer) { diff --git a/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php b/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php index 9f3d707513d5e..af07fc6f6c137 100644 --- a/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php +++ b/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php @@ -122,6 +122,7 @@ public function getItemOptions() * ) * * @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 74fce3fc02d65..899d24a3b74f9 100644 --- a/app/code/Magento/Sales/Block/Order/Totals.php +++ b/app/code/Magento/Sales/Block/Order/Totals.php @@ -284,6 +284,7 @@ public function removeTotal($code) * * @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 fa7c2bd773acc..753a16943ab5c 100644 --- a/app/code/Magento/Sales/Block/Status/Grid/Column/State.php +++ b/app/code/Magento/Sales/Block/Status/Grid/Column/State.php @@ -44,6 +44,7 @@ public function getFrameCallback() * @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 9523ca2a159e5..386838f2b1c66 100644 --- a/app/code/Magento/Sales/Block/Status/Grid/Column/Unassign.php +++ b/app/code/Magento/Sales/Block/Status/Grid/Column/Unassign.php @@ -24,6 +24,7 @@ public function getFrameCallback() * @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 345203142024b..97c8160aa6ef8 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/View.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/View.php @@ -19,6 +19,7 @@ protected function _isAllowed() * 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 3950384f3f197..7e671672b0575 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order.php @@ -10,6 +10,7 @@ * Adminhtml sales orders controller * * @author Magento Core Team + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Order extends \Magento\Backend\App\Action { @@ -100,6 +101,7 @@ protected function _initOrder() * 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 066511dee95c4..796afc99863a5 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php @@ -10,6 +10,7 @@ * Adminhtml sales orders creation process controller * * @author Magento Core Team + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Create extends \Magento\Backend\App\Action { @@ -109,6 +110,9 @@ protected function _processData() * * @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 b6cc613401d74..cc3d139ff8784 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Save.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Save.php @@ -12,6 +12,7 @@ class Save extends \Magento\Sales\Controller\Adminhtml\Order\Create * Saving quote and create order * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/Save.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/Save.php index fd22737d14566..85f27c7cadf38 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/Save.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/Save.php @@ -49,6 +49,8 @@ protected function _isAllowed() * 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 c02c6e5e2c7dc..b16226188c2d2 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/CreditmemoLoader.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/CreditmemoLoader.php @@ -78,6 +78,7 @@ class CreditmemoLoader extends Object * @param \Magento\Framework\Registry $registry * @param \Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Sales\Model\Order\CreditmemoFactory $creditmemoFactory, @@ -172,6 +173,7 @@ protected function _initInvoice($order) * 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 24eaeae728018..7427292469fe6 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/Save.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/Save.php @@ -94,6 +94,9 @@ protected function _prepareShipment($invoice) * 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 53ab83fb98904..0cccb68159985 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfdocs.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfdocs.php @@ -14,6 +14,7 @@ class Pdfdocs extends \Magento\Sales\Controller\Adminhtml\Order * Print all documents for selected orders * * @return ResponseInterface|void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/View.php b/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/View.php index 5c8d4c4a4f421..d9d86803d23b2 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/View.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/View.php @@ -19,6 +19,7 @@ protected function _isAllowed() * 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 fd64c11bf68c7..522111cdbf104 100644 --- a/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php +++ b/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php @@ -13,6 +13,8 @@ class DownloadCustomOption extends \Magento\Framework\App\Action\Action * Custom options download action * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExitExpression) */ public function execute() { diff --git a/app/code/Magento/Sales/Controller/Order/Plugin/Authentication.php b/app/code/Magento/Sales/Controller/Order/Plugin/Authentication.php index 4e80b48629697..e05f19c9a1e08 100644 --- a/app/code/Magento/Sales/Controller/Order/Plugin/Authentication.php +++ b/app/code/Magento/Sales/Controller/Order/Plugin/Authentication.php @@ -37,6 +37,7 @@ public function __construct( * @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 fc2383e5fad82..6c943563deefe 100644 --- a/app/code/Magento/Sales/Helper/Guest.php +++ b/app/code/Magento/Sales/Helper/Guest.php @@ -9,6 +9,7 @@ /** * Sales module base helper + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Guest extends \Magento\Core\Helper\Data { diff --git a/app/code/Magento/Sales/Model/AdminOrder/Create.php b/app/code/Magento/Sales/Model/AdminOrder/Create.php index 5d06152dd0b3c..68ef0a377792e 100644 --- a/app/code/Magento/Sales/Model/AdminOrder/Create.php +++ b/app/code/Magento/Sales/Model/AdminOrder/Create.php @@ -10,6 +10,9 @@ /** * Order create model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Model\Cart\CartInterface { @@ -219,6 +222,7 @@ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Mode * @param \Magento\Customer\Api\Data\CustomerDataBuilder $customerBuilder * @param \Magento\Customer\Model\Customer\Mapper $customerMapper * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\ObjectManagerInterface $objectManager, @@ -289,6 +293,7 @@ public function setIsValidate($flag) * Return is validate data in import flag * * @return boolean + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsValidate() { @@ -423,6 +428,8 @@ public function setQuote(\Magento\Sales\Model\Quote $quote) * @param \Magento\Sales\Model\Order $order * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function initFromOrder(\Magento\Sales\Model\Order $order) { @@ -704,6 +711,8 @@ public function getCustomerGroupId() * @param int $qty * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function moveQuoteItem($item, $moveTo, $qty) { @@ -829,6 +838,9 @@ public function moveQuoteItem($item, $moveTo, $qty) * @param array $data * @return $this * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function applySidebarData($data) { @@ -1542,6 +1554,8 @@ public function setAccountData($accountData) * * @param array $data * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function importPostData($data) { @@ -1642,6 +1656,7 @@ protected function _validateCustomerData(\Magento\Customer\Api\Data\CustomerInte * Set customer data to quote. * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function _prepareCustomer() { @@ -1704,6 +1719,7 @@ public function _prepareCustomer() * @param \Magento\Sales\Model\Quote\Address $quoteCustomerAddress * @return void * @throws \InvalidArgumentException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _prepareCustomerAddress($customer, $quoteCustomerAddress) { @@ -1832,6 +1848,8 @@ public function createOrder() * * @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 508b547132ee0..de95aae5e2039 100644 --- a/app/code/Magento/Sales/Model/Config/Converter.php +++ b/app/code/Magento/Sales/Model/Config/Converter.php @@ -16,6 +16,7 @@ class Converter implements \Magento\Framework\Config\ConverterInterface * @param mixed $source * @return array * @throws \InvalidArgumentException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function convert($source) { diff --git a/app/code/Magento/Sales/Model/Convert/Order.php b/app/code/Magento/Sales/Model/Convert/Order.php index 4bb740e237f54..c01140469d7b9 100644 --- a/app/code/Magento/Sales/Model/Convert/Order.php +++ b/app/code/Magento/Sales/Model/Convert/Order.php @@ -8,6 +8,9 @@ */ namespace Magento\Sales\Model\Convert; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Order extends \Magento\Framework\Object { /** diff --git a/app/code/Magento/Sales/Model/Convert/Quote.php b/app/code/Magento/Sales/Model/Convert/Quote.php index bbcafd4b0ad62..fb0dd4bf4f857 100644 --- a/app/code/Magento/Sales/Model/Convert/Quote.php +++ b/app/code/Magento/Sales/Model/Convert/Quote.php @@ -7,6 +7,7 @@ /** * Quote data convert model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Quote extends \Magento\Framework\Object { diff --git a/app/code/Magento/Sales/Model/Order.php b/app/code/Magento/Sales/Model/Order.php index 89e8ca8befbd5..8bf2be5642d57 100644 --- a/app/code/Magento/Sales/Model/Order.php +++ b/app/code/Magento/Sales/Model/Order.php @@ -175,6 +175,10 @@ * @method bool hasForcedCanCreditmemo() * @method bool getIsInProcess() * @method \Magento\Customer\Model\Customer getCustomer() + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Order extends AbstractModel implements EntityInterface, ApiOrderInterface { @@ -411,6 +415,7 @@ class Order extends AbstractModel implements EntityInterface, ApiOrderInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -529,6 +534,7 @@ public function setActionFlag($action, $flag) * Return flag for order if it can sends new email to customer. * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCanSendNewEmailFlag() { @@ -589,6 +595,8 @@ public function getStore() * Retrieve order cancel availability * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function canCancel() { @@ -648,6 +656,7 @@ protected function _canVoidOrder() * Retrieve order invoice availability * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function canInvoice() { @@ -758,6 +767,7 @@ public function canComment() * Retrieve order shipment availability * * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function canShip() { @@ -837,6 +847,7 @@ public function canReorderIgnoreSalable() * * @param bool $ignoreSalable * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _canReorder($ignoreSalable = false) { @@ -1999,6 +2010,7 @@ public function reset() /** * @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 f80ebcbba88af..6a0f950a75b39 100644 --- a/app/code/Magento/Sales/Model/Order/Address.php +++ b/app/code/Magento/Sales/Model/Order/Address.php @@ -37,6 +37,7 @@ * @method Address setMiddlename(string $value) * @method Address setSuffix(string $value) * @method Address setCompany(string $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Address extends AbstractAddress implements OrderAddressInterface { @@ -77,6 +78,7 @@ class Address extends AbstractAddress implements OrderAddressInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Sales/Model/Order/Builder.php b/app/code/Magento/Sales/Model/Order/Builder.php index e55fd4d85462f..2c9b197b00589 100644 --- a/app/code/Magento/Sales/Model/Order/Builder.php +++ b/app/code/Magento/Sales/Model/Order/Builder.php @@ -7,6 +7,9 @@ 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 b8ef9173022b8..7002d8eb0931f 100644 --- a/app/code/Magento/Sales/Model/Order/Creditmemo.php +++ b/app/code/Magento/Sales/Model/Order/Creditmemo.php @@ -59,6 +59,9 @@ * @method \Magento\Sales\Model\Order\Creditmemo setBaseShippingHiddenTaxAmnt(float $value) * @method \Magento\Sales\Model\Order\Creditmemo setShippingInclTax(float $value) * @method \Magento\Sales\Model\Order\Creditmemo setBaseShippingInclTax(float $value) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Creditmemo extends AbstractModel implements EntityInterface, CreditmemoInterface { @@ -164,6 +167,7 @@ class Creditmemo extends AbstractModel implements EntityInterface, CreditmemoInt * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -753,6 +757,7 @@ public function addComment($comment, $notify = false, $visibleOnFront = false) /** * @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 1aa934f6a253e..6b55dc531e74b 100644 --- a/app/code/Magento/Sales/Model/Order/Creditmemo/Comment.php +++ b/app/code/Magento/Sales/Model/Order/Creditmemo/Comment.php @@ -42,6 +42,7 @@ class Comment extends AbstractModel implements CreditmemoCommentInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Sales/Model/Order/Creditmemo/Total/AbstractTotal.php b/app/code/Magento/Sales/Model/Order/Creditmemo/Total/AbstractTotal.php index 65268ee7bb39b..3d979262d9d79 100644 --- a/app/code/Magento/Sales/Model/Order/Creditmemo/Total/AbstractTotal.php +++ b/app/code/Magento/Sales/Model/Order/Creditmemo/Total/AbstractTotal.php @@ -16,6 +16,7 @@ abstract class AbstractTotal extends \Magento\Sales\Model\Order\Total\AbstractTo * * @param \Magento\Sales\Model\Order\Creditmemo $creditmemo * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function collect(\Magento\Sales\Model\Order\Creditmemo $creditmemo) { diff --git a/app/code/Magento/Sales/Model/Order/Customer.php b/app/code/Magento/Sales/Model/Order/Customer.php index 98ac4ac55f590..59ab8afdf869c 100644 --- a/app/code/Magento/Sales/Model/Order/Customer.php +++ b/app/code/Magento/Sales/Model/Order/Customer.php @@ -92,6 +92,7 @@ class Customer * @param string $customerPrefix * @param string $customerSuffix * @param string $customerTaxvat + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( $customerDob, diff --git a/app/code/Magento/Sales/Model/Order/Invoice.php b/app/code/Magento/Sales/Model/Order/Invoice.php index 602fbe33aef0a..702974c1f1f6c 100644 --- a/app/code/Magento/Sales/Model/Order/Invoice.php +++ b/app/code/Magento/Sales/Model/Order/Invoice.php @@ -51,6 +51,9 @@ * @method \Magento\Sales\Model\Order\Invoice setBaseShippingHiddenTaxAmnt(float $value) * @method \Magento\Sales\Model\Order\Invoice setShippingInclTax(float $value) * @method \Magento\Sales\Model\Order\Invoice setBaseShippingInclTax(float $value) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Invoice extends AbstractModel implements EntityInterface, InvoiceInterface { @@ -165,6 +168,7 @@ class Invoice extends AbstractModel implements EntityInterface, InvoiceInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -616,6 +620,7 @@ public function getStateName($stateId = null) * * @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 45eec7d806446..a3160cffc4092 100644 --- a/app/code/Magento/Sales/Model/Order/Invoice/Comment.php +++ b/app/code/Magento/Sales/Model/Order/Invoice/Comment.php @@ -42,6 +42,7 @@ class Comment extends AbstractModel implements InvoiceCommentInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Sales/Model/Order/Invoice/Total/AbstractTotal.php b/app/code/Magento/Sales/Model/Order/Invoice/Total/AbstractTotal.php index bfeabbc4b83cf..895cf21d12efd 100644 --- a/app/code/Magento/Sales/Model/Order/Invoice/Total/AbstractTotal.php +++ b/app/code/Magento/Sales/Model/Order/Invoice/Total/AbstractTotal.php @@ -16,6 +16,7 @@ abstract class AbstractTotal extends \Magento\Sales\Model\Order\Total\AbstractTo * * @param \Magento\Sales\Model\Order\Invoice $invoice * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function collect(\Magento\Sales\Model\Order\Invoice $invoice) { diff --git a/app/code/Magento/Sales/Model/Order/Invoice/Total/Tax.php b/app/code/Magento/Sales/Model/Order/Invoice/Total/Tax.php index c71bdbf4edfee..982f6bf0205a9 100644 --- a/app/code/Magento/Sales/Model/Order/Invoice/Total/Tax.php +++ b/app/code/Magento/Sales/Model/Order/Invoice/Total/Tax.php @@ -11,6 +11,7 @@ class Tax extends AbstractTotal * * @param \Magento\Sales\Model\Order\Invoice $invoice * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function collect(\Magento\Sales\Model\Order\Invoice $invoice) { diff --git a/app/code/Magento/Sales/Model/Order/Item.php b/app/code/Magento/Sales/Model/Order/Item.php index dd313aff3eabb..67631c93beec2 100644 --- a/app/code/Magento/Sales/Model/Order/Item.php +++ b/app/code/Magento/Sales/Model/Order/Item.php @@ -94,6 +94,9 @@ * @method \Magento\Sales\Model\Order\Item setBaseTaxRefunded(float $value) * @method \Magento\Sales\Model\Order\Item setDiscountRefunded(float $value) * @method \Magento\Sales\Model\Order\Item setBaseDiscountRefunded(float $value) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Item extends AbstractExtensibleModel implements OrderItemInterface { @@ -186,6 +189,7 @@ class Item extends AbstractExtensibleModel implements OrderItemInterface * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -376,6 +380,8 @@ public function getOrder() * Retrieve item status identifier * * @return int + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getStatusId() { @@ -630,6 +636,7 @@ public function isChildrenCalculated() * Check if discount has to be applied to parent item * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getForceApplyDiscountToParentItem() { @@ -673,6 +680,7 @@ public function isShipSeparately() * * @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 d4ed96c547cbf..43f6ef48533e0 100644 --- a/app/code/Magento/Sales/Model/Order/Payment.php +++ b/app/code/Magento/Sales/Model/Order/Payment.php @@ -66,6 +66,9 @@ * @method \Magento\Sales\Model\Order\Payment setCcNumberEnc(string $value) * @method \Magento\Sales\Model\Order\Payment setCcTransId(string $value) * @method \Magento\Sales\Model\Order\Payment setAddressStatus(string $value) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Payment extends Info implements OrderPaymentInterface { @@ -158,6 +161,7 @@ class Payment extends Info implements OrderPaymentInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -278,6 +282,7 @@ public function canCapturePartial() * This method is supposed to be called only when order is placed * * @return $this + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function place() { @@ -695,6 +700,8 @@ public function registerVoidNotification($amount = null) * @return $this * @throws \Exception * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function refund($creditmemo) { @@ -790,6 +797,7 @@ public function refund($creditmemo) * * @param float $amount * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function registerRefundNotification($amount) { @@ -978,6 +986,8 @@ public function deny() * @param bool $isOnline * @return $this * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function registerPaymentReviewAction($action, $isOnline) { @@ -1209,6 +1219,8 @@ public function authorize($isOnline, $amount) * @param float $amount * @param string $gatewayCallback * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _void($isOnline, $amount = null, $gatewayCallback = 'void') { @@ -1283,6 +1295,8 @@ protected function _void($isOnline, $amount = null, $gatewayCallback = 'void') * @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 69b6619a72046..9114cf392370d 100644 --- a/app/code/Magento/Sales/Model/Order/Payment/Transaction.php +++ b/app/code/Magento/Sales/Model/Order/Payment/Transaction.php @@ -22,6 +22,8 @@ * @method \Magento\Sales\Model\Order\Payment\Transaction setCreatedAt(string $value) * * @author Magento Core Team + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Transaction extends AbstractExtensibleModel implements TransactionInterface { @@ -160,6 +162,7 @@ class Transaction extends AbstractExtensibleModel implements TransactionInterfac * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -299,6 +302,8 @@ public function getParentTransaction($shouldLoad = true) * @param string $txnId * @param bool $recursive * @return Transaction[] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getChildTransactions($types = null, $txnId = null, $recursive = false) { @@ -567,6 +572,7 @@ public function unsAdditionalInformation($key = null) * @return $this * @throws \Magento\Framework\Model\Exception * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function close($shouldSave = true) { @@ -726,6 +732,8 @@ public function beforeSave() * * @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 22bd3b898d6d7..e053da1df33c6 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php @@ -8,6 +8,8 @@ /** * Sales Order PDF abstract model + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractPdf extends \Magento\Framework\Object { @@ -218,6 +220,7 @@ public function getAlignCenter($string, $x, $columnWidth, \Zend_Pdf_Resource_Fon * @param \Zend_Pdf_Page &$page * @param null $store * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function insertLogo(&$page, $store = null) { @@ -329,6 +332,7 @@ protected function _formatAddress($address) * * @param array $address * @return int Height + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _calcAddressHeight($address) { @@ -354,6 +358,9 @@ protected function _calcAddressHeight($address) * @param \Magento\Sales\Model\Order $obj * @param bool $putOrderId * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function insertOrder(&$page, $obj, $putOrderId = true) { @@ -929,6 +936,9 @@ public function newPage(array $settings = []) * @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 b163fd2bf8d8b..5fba85dd8cc9b 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php @@ -6,6 +6,7 @@ /** * 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 5d7d121479b28..140e72fefdd55 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php @@ -6,6 +6,7 @@ /** * 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 4be5f572e097e..485f546299e13 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Items/AbstractItems.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Items/AbstractItems.php @@ -8,6 +8,7 @@ /** * 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 a46d46bf3df93..e1760165d88af 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php @@ -6,6 +6,7 @@ /** * 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 7db973093c2fe..6676f2cce6b2b 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php @@ -88,6 +88,7 @@ public function getTotalsForDisplay() * ) * * @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 32d4a78faf2fd..fdfaa79075e9c 100644 --- a/app/code/Magento/Sales/Model/Order/Shipment.php +++ b/app/code/Magento/Sales/Model/Order/Shipment.php @@ -26,6 +26,7 @@ * @method \Magento\Sales\Model\Order\Shipment setIncrementId(string $value) * @method \Magento\Sales\Model\Order\Shipment setCreatedAt(string $value) * @method \Magento\Sales\Model\Order\Shipment setUpdatedAt(string $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Shipment extends AbstractModel implements EntityInterface, ShipmentInterface { @@ -112,6 +113,7 @@ class Shipment extends AbstractModel implements EntityInterface, ShipmentInterfa * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Sales/Model/Order/Shipment/Comment.php b/app/code/Magento/Sales/Model/Order/Shipment/Comment.php index 15ea5cc47c2aa..986639559e405 100644 --- a/app/code/Magento/Sales/Model/Order/Shipment/Comment.php +++ b/app/code/Magento/Sales/Model/Order/Shipment/Comment.php @@ -42,6 +42,7 @@ class Comment extends AbstractModel implements ShipmentCommentInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Sales/Model/Order/Shipment/Track.php b/app/code/Magento/Sales/Model/Order/Shipment/Track.php index 699824bb0d342..b0411cc1c13d6 100644 --- a/app/code/Magento/Sales/Model/Order/Shipment/Track.php +++ b/app/code/Magento/Sales/Model/Order/Shipment/Track.php @@ -67,6 +67,7 @@ class Track extends AbstractModel implements ShipmentTrackInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Sales/Model/Order/Status/History.php b/app/code/Magento/Sales/Model/Order/Status/History.php index 0312b69baf256..eba332daa2046 100644 --- a/app/code/Magento/Sales/Model/Order/Status/History.php +++ b/app/code/Magento/Sales/Model/Order/Status/History.php @@ -56,6 +56,7 @@ class History extends AbstractModel implements OrderStatusHistoryInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Sales/Model/Quote.php b/app/code/Magento/Sales/Model/Quote.php index 2a3013319bd2f..7d88bdcc0e467 100644 --- a/app/code/Magento/Sales/Model/Quote.php +++ b/app/code/Magento/Sales/Model/Quote.php @@ -115,6 +115,10 @@ * @method Quote setIsPersistent(bool $value) * @method Quote setSharedStoreIds(array $values) * @method Quote setWebsite($value) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Quote extends \Magento\Framework\Model\AbstractModel { @@ -356,6 +360,7 @@ class Quote extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -1054,6 +1059,7 @@ public function addShippingAddress(Address $address) * * @param bool $useCache * @return \Magento\Eav\Model\Entity\Collection\AbstractCollection + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getItemsCollection($useCache = true) { @@ -1276,6 +1282,8 @@ public function addItem(\Magento\Sales\Model\Quote\Item $item) * @param null|string $processMode * @return \Magento\Sales\Model\Quote\Item|string * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function addProduct( \Magento\Catalog\Model\Product $product, @@ -1363,6 +1371,7 @@ public function addProduct( * @param \Magento\Catalog\Model\Product $product * @param int $qty * @return \Magento\Sales\Model\Quote\Item + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _addCatalogProduct(\Magento\Catalog\Model\Product $product, $qty = 1) { @@ -1417,6 +1426,7 @@ protected function _addCatalogProduct(\Magento\Catalog\Model\Product $product, $ * @throws \Magento\Framework\Model\Exception * * @see \Magento\Catalog\Helper\Product::addParamsToBuyRequest() + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function updateItem($itemId, $buyRequest, $params = null) { @@ -1593,6 +1603,7 @@ public function getPayment() /** * @param string $paymentId * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getPaymentById($paymentId) { @@ -1925,6 +1936,7 @@ public function addErrorInfo( * @param string $type An internal error type ('error', 'qty', etc.), passed then to adding messages routine * @param array $params * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function removeErrorInfosByParams($type, $params) { @@ -2015,6 +2027,8 @@ public function reserveOrderId() /** * @param bool $multishipping * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validateMinimumAmount($multishipping = false) { @@ -2106,6 +2120,7 @@ public function isVirtual() * Check quote for virtual product only * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsVirtual() { diff --git a/app/code/Magento/Sales/Model/Quote/Address.php b/app/code/Magento/Sales/Model/Quote/Address.php index a362afd5ea134..25eab112fdb92 100644 --- a/app/code/Magento/Sales/Model/Quote/Address.php +++ b/app/code/Magento/Sales/Model/Quote/Address.php @@ -111,6 +111,10 @@ * @method \Magento\SalesRule\Model\Rule[] getCartFixedRules() * @method int[] getAppliedRuleIds() * @method Address setBaseShippingInclTax(float $value) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Address extends \Magento\Customer\Model\Address\AbstractAddress { @@ -269,6 +273,7 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -567,6 +572,8 @@ public function getItemsCollection() * Get all available address items * * @return \Magento\Sales\Model\Quote\Address\Item[] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getAllItems() { @@ -1026,6 +1033,8 @@ public function collectShippingRates() * * @param \Magento\Sales\Model\Quote\Item\AbstractItem $item * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function requestShippingRates(\Magento\Sales\Model\Quote\Item\AbstractItem $item = null) { @@ -1253,6 +1262,7 @@ public function setAppliedTaxes($data) * @param float $value * @param bool $alreadyExclTax * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setShippingAmount($value, $alreadyExclTax = false) { @@ -1265,6 +1275,7 @@ public function setShippingAmount($value, $alreadyExclTax = false) * @param float $value * @param bool $alreadyExclTax * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setBaseShippingAmount($value, $alreadyExclTax = false) { diff --git a/app/code/Magento/Sales/Model/Quote/Address/Total/AbstractTotal.php b/app/code/Magento/Sales/Model/Quote/Address/Total/AbstractTotal.php index c17e6a943032a..f757b8544c03c 100644 --- a/app/code/Magento/Sales/Model/Quote/Address/Total/AbstractTotal.php +++ b/app/code/Magento/Sales/Model/Quote/Address/Total/AbstractTotal.php @@ -6,6 +6,7 @@ /** * Sales Quote Address Total abstract model + * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractTotal { @@ -230,6 +231,7 @@ public function getItemBaseRowTotal(\Magento\Sales\Model\Quote\Item\AbstractItem * * @param \Magento\Sales\Model\Quote\Item\AbstractItem $item * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsItemRowTotalCompoundable(\Magento\Sales\Model\Quote\Item\AbstractItem $item) { @@ -246,6 +248,7 @@ public function getIsItemRowTotalCompoundable(\Magento\Sales\Model\Quote\Item\Ab * @param array $config * @param store $store * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function processConfigArray($config, $store) { diff --git a/app/code/Magento/Sales/Model/Quote/Address/Total/Collector.php b/app/code/Magento/Sales/Model/Quote/Address/Total/Collector.php index 9c711850919a7..95a40c1bea9f7 100644 --- a/app/code/Magento/Sales/Model/Quote/Address/Total/Collector.php +++ b/app/code/Magento/Sales/Model/Quote/Address/Total/Collector.php @@ -137,6 +137,7 @@ protected function _initModelInstance($class, $totalCode, $totalConfig) * Initialize retrievers array * * @return $this + * @SuppressWarnings(PHPMD.UnusedPrivateMethod) */ private function _initRetrievers() { diff --git a/app/code/Magento/Sales/Model/Quote/Address/Total/Discount.php b/app/code/Magento/Sales/Model/Quote/Address/Total/Discount.php index b0344cd6c7750..686eb5f9efc22 100644 --- a/app/code/Magento/Sales/Model/Quote/Address/Total/Discount.php +++ b/app/code/Magento/Sales/Model/Quote/Address/Total/Discount.php @@ -33,6 +33,7 @@ public function __construct( /** * @param \Magento\Sales\Model\Quote\Address $address * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function collect(\Magento\Sales\Model\Quote\Address $address) { diff --git a/app/code/Magento/Sales/Model/Quote/Address/Total/Shipping.php b/app/code/Magento/Sales/Model/Quote/Address/Total/Shipping.php index 7ab5938b64b1d..16d41cbdb780a 100644 --- a/app/code/Magento/Sales/Model/Quote/Address/Total/Shipping.php +++ b/app/code/Magento/Sales/Model/Quote/Address/Total/Shipping.php @@ -28,6 +28,9 @@ public function __construct( * * @param \Magento\Sales\Model\Quote\Address $address * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function collect(\Magento\Sales\Model\Quote\Address $address) { diff --git a/app/code/Magento/Sales/Model/Quote/Address/Total/Tax.php b/app/code/Magento/Sales/Model/Quote/Address/Total/Tax.php index 2262d64a71746..06057f8a47faa 100644 --- a/app/code/Magento/Sales/Model/Quote/Address/Total/Tax.php +++ b/app/code/Magento/Sales/Model/Quote/Address/Total/Tax.php @@ -59,6 +59,9 @@ public function __construct( /** * @param \Magento\Sales\Model\Quote\Address $address * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function collect(\Magento\Sales\Model\Quote\Address $address) { diff --git a/app/code/Magento/Sales/Model/Quote/Item.php b/app/code/Magento/Sales/Model/Quote/Item.php index 445859a2ea973..6c22d70b3b74e 100644 --- a/app/code/Magento/Sales/Model/Quote/Item.php +++ b/app/code/Magento/Sales/Model/Quote/Item.php @@ -96,6 +96,7 @@ * @method null|bool getHasConfigurationUnavailableError() * @method \Magento\Sales\Model\Quote\Item setHasConfigurationUnavailableError(bool $value) * @method \Magento\Sales\Model\Quote\Item unsHasConfigurationUnavailableError() + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Item extends \Magento\Sales\Model\Quote\Item\AbstractItem { diff --git a/app/code/Magento/Sales/Model/Quote/Item/AbstractItem.php b/app/code/Magento/Sales/Model/Quote/Item/AbstractItem.php index 796cbcda8abbc..5c53c317ebbce 100644 --- a/app/code/Magento/Sales/Model/Quote/Item/AbstractItem.php +++ b/app/code/Magento/Sales/Model/Quote/Item/AbstractItem.php @@ -41,6 +41,7 @@ * @method float getDiscountTaxCompensation() * @method float getRowTotal() * @method float getPriceInclTax() + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractItem extends \Magento\Framework\Model\AbstractModel implements \Magento\Catalog\Model\Product\Configuration\Item\ItemInterface diff --git a/app/code/Magento/Sales/Model/Quote/Item/Updater.php b/app/code/Magento/Sales/Model/Quote/Item/Updater.php index ee5c771aa54a5..de60231ef9a31 100644 --- a/app/code/Magento/Sales/Model/Quote/Item/Updater.php +++ b/app/code/Magento/Sales/Model/Quote/Item/Updater.php @@ -54,6 +54,7 @@ public function __construct( * @param array $info * @throws InvalidArgumentException * @return Updater + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function update(Item $item, array $info) { diff --git a/app/code/Magento/Sales/Model/Quote/Payment.php b/app/code/Magento/Sales/Model/Quote/Payment.php index 57c2ad97e9c01..b72731e717c83 100644 --- a/app/code/Magento/Sales/Model/Quote/Payment.php +++ b/app/code/Magento/Sales/Model/Quote/Payment.php @@ -77,6 +77,7 @@ class Payment extends \Magento\Payment\Model\Info * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Sales/Model/QuoteRepository/Plugin/Authorization.php b/app/code/Magento/Sales/Model/QuoteRepository/Plugin/Authorization.php index 9c45c72110cb5..9213020f1927c 100644 --- a/app/code/Magento/Sales/Model/QuoteRepository/Plugin/Authorization.php +++ b/app/code/Magento/Sales/Model/QuoteRepository/Plugin/Authorization.php @@ -31,6 +31,7 @@ public function __construct( * @param \Magento\Sales\Model\Quote $quote * @return \Magento\Sales\Model\Quote * @throws \Magento\Framework\Exception\NoSuchEntityException + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterGetActive( \Magento\Sales\Model\QuoteRepository $subject, @@ -49,6 +50,7 @@ public function afterGetActive( * @param \Magento\Sales\Model\Quote $quote * @return \Magento\Sales\Model\Quote * @throws \Magento\Framework\Exception\NoSuchEntityException + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterGetActiveForCustomer( \Magento\Sales\Model\QuoteRepository $subject, diff --git a/app/code/Magento/Sales/Model/Resource/Collection/AbstractCollection.php b/app/code/Magento/Sales/Model/Resource/Collection/AbstractCollection.php index aceafd15169d3..a67c9ab96ed44 100644 --- a/app/code/Magento/Sales/Model/Resource/Collection/AbstractCollection.php +++ b/app/code/Magento/Sales/Model/Resource/Collection/AbstractCollection.php @@ -162,6 +162,7 @@ public function getAllIds($limit = null, $offset = null) * @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 9331aff68ade4..4d3169b510fc8 100644 --- a/app/code/Magento/Sales/Model/Resource/Entity.php +++ b/app/code/Magento/Sales/Model/Resource/Entity.php @@ -9,6 +9,7 @@ /** * 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 4a3510491ba4a..4b5cda3e941ae 100644 --- a/app/code/Magento/Sales/Model/Resource/Order/Grid/Collection.php +++ b/app/code/Magento/Sales/Model/Resource/Order/Grid/Collection.php @@ -85,6 +85,7 @@ public function setIsCustomerMode($value) * 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 f07182ad71f06..18af86baf2276 100644 --- a/app/code/Magento/Sales/Model/Resource/Order/Handler/State.php +++ b/app/code/Magento/Sales/Model/Resource/Order/Handler/State.php @@ -17,6 +17,8 @@ class State * * @param Order $order * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function check(Order $order) { diff --git a/app/code/Magento/Sales/Model/Resource/Order/Plugin/Authorization.php b/app/code/Magento/Sales/Model/Resource/Order/Plugin/Authorization.php index 25c18db0b6e1c..6d46afa6f5d5b 100644 --- a/app/code/Magento/Sales/Model/Resource/Order/Plugin/Authorization.php +++ b/app/code/Magento/Sales/Model/Resource/Order/Plugin/Authorization.php @@ -34,6 +34,7 @@ public function __construct( * @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 df6258b3683b0..53dd277174362 100644 --- a/app/code/Magento/Sales/Model/Resource/Order/Status.php +++ b/app/code/Magento/Sales/Model/Resource/Order/Status.php @@ -265,6 +265,7 @@ protected function checkIsStateDefault($state, $status) * * @param string $state * @return string + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function getStatusByState($state) { diff --git a/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Backend.php b/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Backend.php index a24dbbdbaa1db..8abb8ada5cbc5 100644 --- a/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Backend.php +++ b/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Backend.php @@ -16,6 +16,7 @@ class Backend extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBacken * * @param \Magento\Sales\Model\Quote\Address $address * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function collectTotals(\Magento\Sales\Model\Quote\Address $address) { diff --git a/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Frontend.php b/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Frontend.php index 4d39f012265a3..30ea33b29d175 100644 --- a/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Frontend.php +++ b/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Frontend.php @@ -16,6 +16,7 @@ class Frontend extends \Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFron * * @param \Magento\Sales\Model\Quote\Address $address * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function fetchTotals(\Magento\Sales\Model\Quote\Address $address) { diff --git a/app/code/Magento/Sales/Model/Resource/Quote/Item/Collection.php b/app/code/Magento/Sales/Model/Resource/Quote/Item/Collection.php index 979e29328651a..63ce8da3b3b43 100644 --- a/app/code/Magento/Sales/Model/Resource/Quote/Item/Collection.php +++ b/app/code/Magento/Sales/Model/Resource/Quote/Item/Collection.php @@ -182,6 +182,7 @@ protected function _assignOptions() * Add products to items and item options * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _assignProducts() { diff --git a/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php b/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php index 49989878dc42f..e112d782d1b8f 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php @@ -6,6 +6,7 @@ /** * Bestsellers report resource model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Bestsellers extends AbstractReport { @@ -79,6 +80,7 @@ protected function _construct() * @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 16782bc689873..4d1c4c36ef135 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Bestsellers/Collection.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Bestsellers/Collection.php @@ -216,6 +216,9 @@ public function addStoreRestrictions($storeIds) * 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 ca3f986adca4e..09c1bba13da2f 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Invoiced.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Invoiced.php @@ -49,6 +49,7 @@ public function aggregate($from = null, $to = null) * @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 598ea134ea234..44f8095efcfee 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Order/Createdat.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Order/Createdat.php @@ -41,6 +41,8 @@ public function aggregate($from = null, $to = null) * @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 91111be7c66d1..a49c05338b5d1 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Refunded.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Refunded.php @@ -136,6 +136,7 @@ protected function _aggregateByOrderCreatedAt($from, $to) * @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 21306eea59238..2c897376deab8 100644 --- a/app/code/Magento/Sales/Model/Resource/Report/Shipping.php +++ b/app/code/Magento/Sales/Model/Resource/Report/Shipping.php @@ -140,6 +140,7 @@ protected function _aggregateByOrderCreatedAt($from, $to) * @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 eb17dbec66e71..230887fea8d25 100644 --- a/app/code/Magento/Sales/Model/Resource/Setup.php +++ b/app/code/Magento/Sales/Model/Resource/Setup.php @@ -164,6 +164,8 @@ protected function _addGridAttribute($table, $attribute, $attr, $entityTypeId) * @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 4c6f5d7111b14..c15e5da968d6d 100644 --- a/app/code/Magento/Sales/Model/Service/Order.php +++ b/app/code/Magento/Sales/Model/Service/Order.php @@ -204,6 +204,8 @@ public function prepareCreditmemo($data = []) * @param object $invoice * @param array $data * @return \Magento\Sales\Model\Order\Creditmemo + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function prepareInvoiceCreditmemo($invoice, $data = []) { @@ -315,6 +317,7 @@ protected function _initCreditmemoData($creditmemo, $data) * @param \Magento\Sales\Model\Order\Item $item * @param array $qtys * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _canInvoiceItem($item, $qtys = []) { @@ -355,6 +358,7 @@ protected function _canInvoiceItem($item, $qtys = []) * @param \Magento\Sales\Model\Order\Item $item * @param array $qtys * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _canShipItem($item, $qtys = []) { @@ -401,6 +405,7 @@ protected function _canShipItem($item, $qtys = []) * @param array $qtys * @param array $invoiceQtysRefundLimits * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _canRefundItem($item, $qtys = [], $invoiceQtysRefundLimits = []) { diff --git a/app/code/Magento/Sales/Model/Service/Quote.php b/app/code/Magento/Sales/Model/Service/Quote.php index f2872f9cdf2ee..8bdd1404a5861 100644 --- a/app/code/Magento/Sales/Model/Service/Quote.php +++ b/app/code/Magento/Sales/Model/Service/Quote.php @@ -7,6 +7,7 @@ /** * Class Quote * Quote submit service model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Quote { @@ -110,6 +111,7 @@ class Quote * @param \Magento\Customer\Api\AddressRepositoryInterface $addressRepository * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository * @param \Magento\Customer\Api\Data\RegionDataBuilder $regionDataBuilder + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Event\ManagerInterface $eventManager, @@ -209,6 +211,8 @@ protected function prepareCustomerData(\Magento\Sales\Model\Quote $quote) * * @return \Magento\Sales\Model\Order * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function submitOrderWithDataObject() { diff --git a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.php index ea32f81cdc457..7846f269c49e7 100644 --- a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.php +++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.php @@ -84,6 +84,7 @@ public function isHidden() * 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 1f64df08565ad..4fcc2e5f545b6 100644 --- a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Form.php +++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Form.php @@ -40,6 +40,7 @@ public function __construct( * Prepare coupon codes generation parameters form * * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _prepareForm() { diff --git a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php index bfd7b0ce8733f..7f911a3ef4a10 100644 --- a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php +++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php @@ -115,6 +115,8 @@ public function isHidden() * 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 66f405391d4d4..95547dade3c3c 100644 --- a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Edit.php +++ b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Edit.php @@ -11,6 +11,7 @@ class Edit extends \Magento\SalesRule\Controller\Adminhtml\Promo\Quote * Promo quote edit action * * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php index 1aa9ed6cc533d..8131e0bc0fa71 100644 --- a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php +++ b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php @@ -11,6 +11,8 @@ class Save extends \Magento\SalesRule\Controller\Adminhtml\Promo\Quote * Promo quote save action * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/SalesRule/Model/Observer.php b/app/code/Magento/SalesRule/Model/Observer.php index 11507f162defe..4f0ca2c3ab31d 100644 --- a/app/code/Magento/SalesRule/Model/Observer.php +++ b/app/code/Magento/SalesRule/Model/Observer.php @@ -6,6 +6,9 @@ use Magento\Framework\Event\Observer as EventObserver; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Observer { /** @@ -89,6 +92,7 @@ public function __construct( /** * @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 ac2b485eb9e8f..6e4ba24a83998 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -58,6 +58,7 @@ public function __construct( * * @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 63bd5a0554ec1..38f92fde3a801 100644 --- a/app/code/Magento/SalesRule/Model/Resource/Report/Rule/Createdat.php +++ b/app/code/Magento/SalesRule/Model/Resource/Report/Rule/Createdat.php @@ -41,6 +41,7 @@ public function aggregate($from = null, $to = null) * @param mixed $from * @param mixed $to * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _aggregateByOrder($aggregationField, $from, $to) { diff --git a/app/code/Magento/SalesRule/Model/Rule.php b/app/code/Magento/SalesRule/Model/Rule.php index e0cc5a38af2f6..45a7fbeecc6ab 100644 --- a/app/code/Magento/SalesRule/Model/Rule.php +++ b/app/code/Magento/SalesRule/Model/Rule.php @@ -62,6 +62,7 @@ * @method \Magento\SalesRule\Model\Rule setCouponCode(string $value) * @method int getRuleId() * @method \Magento\SalesRule\Model\Rule setRuleId(int $ruleId) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Rule extends \Magento\Rule\Model\AbstractModel { @@ -184,6 +185,7 @@ class Rule extends \Magento\Rule\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -435,6 +437,8 @@ public function getCouponTypes() * @param int $saveAttemptCount Number of attempts to save newly created coupon * @return \Magento\SalesRule\Model\Coupon|null * @throws \Exception|\Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function acquireCoupon($saveNewlyCreated = true, $saveAttemptCount = 10) { @@ -524,6 +528,7 @@ public function setIsValidForAddress($address, $validationResult) * * @param Address $address * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsValidForAddress($address) { diff --git a/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php b/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php index bea0defa401eb..5f125f1f307ab 100644 --- a/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php +++ b/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php @@ -54,6 +54,7 @@ public function asHtml() * * @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 4dace1d8f8df7..33be5c89edc33 100644 --- a/app/code/Magento/SalesRule/Model/RulesApplier.php +++ b/app/code/Magento/SalesRule/Model/RulesApplier.php @@ -47,6 +47,7 @@ public function __construct( * @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 43f9fa2c1f72d..2f1990049c9a1 100644 --- a/app/code/Magento/SalesRule/Model/Utility.php +++ b/app/code/Magento/SalesRule/Model/Utility.php @@ -76,6 +76,8 @@ public function __construct( * @param \Magento\SalesRule\Model\Rule $rule * @param \Magento\Sales\Model\Quote\Address $address * @return bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function canProcessRule($rule, $address) { @@ -179,6 +181,7 @@ public function minFix( * @param \Magento\SalesRule\Model\Rule\Action\Discount\Data $discountData * @param \Magento\Sales\Model\Quote\Item\AbstractItem $item * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function deltaRoundingFix( \Magento\SalesRule\Model\Rule\Action\Discount\Data $discountData, diff --git a/app/code/Magento/SalesRule/Model/Validator.php b/app/code/Magento/SalesRule/Model/Validator.php index b934c473ad757..4dc6fcd0ba11b 100644 --- a/app/code/Magento/SalesRule/Model/Validator.php +++ b/app/code/Magento/SalesRule/Model/Validator.php @@ -18,6 +18,7 @@ * @method Validator setWebsiteId($id) * @method mixed getCustomerGroupId() * @method Validator setCustomerGroupId($id) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Validator extends \Magento\Framework\Model\AbstractModel { @@ -100,6 +101,7 @@ class Validator extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -245,6 +247,7 @@ public function process(AbstractItem $item) * * @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 747e285bef794..a715b212ede7b 100644 --- a/app/code/Magento/Search/Block/Adminhtml/Dashboard/Last.php +++ b/app/code/Magento/Search/Block/Adminhtml/Dashboard/Last.php @@ -6,6 +6,7 @@ /** * 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 bfc541cb33660..30cba87a47b87 100644 --- a/app/code/Magento/Search/Block/Adminhtml/Dashboard/Top.php +++ b/app/code/Magento/Search/Block/Adminhtml/Dashboard/Top.php @@ -6,6 +6,7 @@ /** * 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 19a39a35d8701..12ed47f693152 100644 --- a/app/code/Magento/Search/Block/Adminhtml/Term/Edit/Form.php +++ b/app/code/Magento/Search/Block/Adminhtml/Term/Edit/Form.php @@ -50,6 +50,7 @@ protected function _construct() * 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 1334049f02694..ff55e2b346736 100644 --- a/app/code/Magento/Search/Controller/Adminhtml/Term/Edit.php +++ b/app/code/Magento/Search/Controller/Adminhtml/Term/Edit.php @@ -32,6 +32,7 @@ public function __construct( /** * @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 f483caa72d3de..45b1cef503e58 100644 --- a/app/code/Magento/Search/Controller/Adminhtml/Term/Save.php +++ b/app/code/Magento/Search/Controller/Adminhtml/Term/Save.php @@ -30,6 +30,7 @@ public function __construct( * 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 e9f4092c9fdbf..d2d29b90ef338 100644 --- a/app/code/Magento/Search/Helper/Data.php +++ b/app/code/Magento/Search/Helper/Data.php @@ -250,6 +250,7 @@ public function getNoteMessages() * * @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 aa0fe6755bd9c..b7f4c4a019dd0 100644 --- a/app/code/Magento/Search/Model/Query.php +++ b/app/code/Magento/Search/Model/Query.php @@ -39,6 +39,7 @@ * @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 b6e779f1d7b55..2d5a28bd99ca9 100644 --- a/app/code/Magento/Search/Model/Resource/Helper.php +++ b/app/code/Magento/Search/Model/Resource/Helper.php @@ -24,6 +24,7 @@ public function __construct(\Magento\Framework\App\Resource $resource, $modulePr * @param string $str The source string * @param int $maxWordLength * @return array (0 => words, 1 => terms) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function prepareTerms($str, $maxWordLength = 0) { diff --git a/app/code/Magento/Sendfriend/Controller/Product/Sendmail.php b/app/code/Magento/Sendfriend/Controller/Product/Sendmail.php index 22b59f311f86c..4cffba0bbcb80 100644 --- a/app/code/Magento/Sendfriend/Controller/Product/Sendmail.php +++ b/app/code/Magento/Sendfriend/Controller/Product/Sendmail.php @@ -36,6 +36,7 @@ public function __construct( * Send Email Post Action * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Sendfriend/Model/Observer.php b/app/code/Magento/Sendfriend/Model/Observer.php index b5d32062f1e66..9a498a734e877 100644 --- a/app/code/Magento/Sendfriend/Model/Observer.php +++ b/app/code/Magento/Sendfriend/Model/Observer.php @@ -30,6 +30,7 @@ public function __construct(\Magento\Sendfriend\Model\SendfriendFactory $sendfri * * @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 6fd232b012000..6f1bd3c342708 100644 --- a/app/code/Magento/Sendfriend/Model/Resource/Sendfriend.php +++ b/app/code/Magento/Sendfriend/Model/Resource/Sendfriend.php @@ -29,6 +29,7 @@ protected function _construct() * @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 5f928d51c62b8..116578d8050ad 100644 --- a/app/code/Magento/Sendfriend/Model/Sendfriend.php +++ b/app/code/Magento/Sendfriend/Model/Sendfriend.php @@ -17,6 +17,7 @@ * @method \Magento\Sendfriend\Model\Sendfriend setTime(int $value) * * @author Magento Core Team + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Sendfriend extends \Magento\Framework\Model\AbstractModel { @@ -120,6 +121,7 @@ class Sendfriend extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -218,6 +220,8 @@ public function send() * Validate Form data * * @return bool|string[] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function validate() { @@ -267,6 +271,7 @@ public function validate() * * @param array $recipients * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function setRecipients($recipients) { diff --git a/app/code/Magento/Shipping/Block/Adminhtml/View/Form.php b/app/code/Magento/Shipping/Block/Adminhtml/View/Form.php index b3955a4ea74a0..8e51c87fd2fda 100644 --- a/app/code/Magento/Shipping/Block/Adminhtml/View/Form.php +++ b/app/code/Magento/Shipping/Block/Adminhtml/View/Form.php @@ -69,6 +69,7 @@ public function getSource() * 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 58ef0e9a32f54..670b6e7f7cfe8 100644 --- a/app/code/Magento/Shipping/Block/Tracking/Popup.php +++ b/app/code/Magento/Shipping/Block/Tracking/Popup.php @@ -85,6 +85,7 @@ public function formatDeliveryTime($time, $date = null) * 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 950585e1b2c5f..dbe6d848608cb 100644 --- a/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/MassPrintShippingLabel.php +++ b/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/MassPrintShippingLabel.php @@ -49,6 +49,7 @@ protected function _isAllowed() * 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 893cf57a363b1..a192c298db153 100644 --- a/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/Save.php +++ b/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/Save.php @@ -77,6 +77,8 @@ protected function _saveShipment($shipment) * We can save only new shipment. Existing shipments are not editable * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php index 21a384ed8845e..b1f367ae00634 100644 --- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php +++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php @@ -132,6 +132,7 @@ public function getConfigData($field) * * @param string $field * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getConfigFlag($field) { @@ -195,6 +196,8 @@ public function getContainerTypes(\Magento\Framework\Object $params = null) * * @param \Magento\Framework\Object|null $params * @return array|bool + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getAllowedContainers(\Magento\Framework\Object $params = null) { @@ -267,6 +270,7 @@ public function getDeliveryConfirmationTypes(\Magento\Framework\Object $params = /** * @param \Magento\Sales\Model\Quote\Address\RateRequest $request * @return $this|bool|false|\Magento\Framework\Model\AbstractModel + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function checkAvailableShipCountries(\Magento\Sales\Model\Quote\Address\RateRequest $request) { @@ -373,6 +377,8 @@ public function getSortOrder() /** * @param \Magento\Sales\Model\Quote\Address\RateRequest $request * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _updateFreeMethodQuote($request) { @@ -576,6 +582,7 @@ protected function _debug($debugData) * Define if debugging is enabled * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDebugFlag() { diff --git a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php index 3a8f97aab639e..250f8557cfdbd 100644 --- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php +++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php @@ -11,6 +11,7 @@ /** * Abstract online shipping carrier model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractCarrierOnline extends AbstractCarrier { @@ -246,6 +247,7 @@ public function isShippingLabelsAvailable() * * @param RateRequest $request * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getAllItems(RateRequest $request) { @@ -278,6 +280,8 @@ public function getAllItems(RateRequest $request) * * @param RateRequest $request * @return $this|bool|Error + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function proccessAdditionalValidation(RateRequest $request) { @@ -517,6 +521,7 @@ public function returnOfShipment($request) * @return bool * * @todo implement rollback logic + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function rollBack($data) { @@ -565,6 +570,7 @@ protected function _isUSCountry($countyId) * * @param null|string $countyDest * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function isGirthAllowed($countyDest = null) { diff --git a/app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php b/app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php index fd099bac0147b..4396bbd5667ac 100644 --- a/app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php +++ b/app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php @@ -6,6 +6,9 @@ use Magento\Shipping\Helper\Carrier; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf { /** @@ -141,6 +144,10 @@ protected function _drawHeaderBlock(\Zend_Pdf_Page $page) * * @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 cbbacd061cfdb..2c647b0fdba9a 100644 --- a/app/code/Magento/Shipping/Model/Rate/Result.php +++ b/app/code/Magento/Shipping/Model/Rate/Result.php @@ -181,6 +181,7 @@ public function getCheapestRate() * 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 e80576a030dce..779c0badaef04 100644 --- a/app/code/Magento/Shipping/Model/Shipping.php +++ b/app/code/Magento/Shipping/Model/Shipping.php @@ -7,6 +7,9 @@ use Magento\Sales\Model\Order\Shipment; use Magento\Sales\Model\Quote\Address\RateCollectorInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Shipping implements RateCollectorInterface { /** @@ -230,6 +233,8 @@ public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $req * @param string $carrierCode * @param \Magento\Sales\Model\Quote\Address\RateRequest $request * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function collectCarrierRates($carrierCode, $request) { @@ -309,6 +314,8 @@ public function collectCarrierRates($carrierCode, $request) * @param \Magento\Shipping\Model\Carrier\AbstractCarrier $carrier * @param \Magento\Sales\Model\Quote\Address\RateRequest $request * @return array [int, float] + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function composePackagesForCarrier($carrier, $request) { diff --git a/app/code/Magento/Shipping/Model/Shipping/LabelGenerator.php b/app/code/Magento/Shipping/Model/Shipping/LabelGenerator.php index 43b358eacdacd..f843e45eb1ca4 100644 --- a/app/code/Magento/Shipping/Model/Shipping/LabelGenerator.php +++ b/app/code/Magento/Shipping/Model/Shipping/LabelGenerator.php @@ -8,6 +8,9 @@ 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 506e437cf3abe..4ea4dccda1309 100644 --- a/app/code/Magento/Shipping/Model/Shipping/Labels.php +++ b/app/code/Magento/Shipping/Model/Shipping/Labels.php @@ -8,6 +8,7 @@ /** * Shipping labels model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Labels extends \Magento\Shipping\Model\Shipping { @@ -33,6 +34,7 @@ class Labels extends \Magento\Shipping\Model\Shipping * @param \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry * @param \Magento\Backend\Model\Auth\Session $authSession * @param \Magento\Shipping\Model\Shipment\Request $request + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, @@ -68,6 +70,8 @@ public function __construct( * @param Shipment $orderShipment * @return \Magento\Framework\Object * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function requestToShipment(Shipment $orderShipment) { diff --git a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php index 2a5eccdd008d8..8ffc475ea2ae8 100644 --- a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php +++ b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php @@ -28,6 +28,7 @@ public function __construct(\Magento\Backend\App\Action\Context $context, \Magen * 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 62d24a3f7c84e..87a6a61e9a2fa 100644 --- a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php +++ b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php @@ -14,6 +14,7 @@ class Save extends \Magento\Sitemap\Controller\Adminhtml\Sitemap * Save action * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { diff --git a/app/code/Magento/Sitemap/Model/Observer.php b/app/code/Magento/Sitemap/Model/Observer.php index ef351bdf2b903..4ec6f97dfd3b5 100644 --- a/app/code/Magento/Sitemap/Model/Observer.php +++ b/app/code/Magento/Sitemap/Model/Observer.php @@ -89,6 +89,8 @@ public function __construct( * * @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 2bd5f593acd85..4743cbb6dedf4 100644 --- a/app/code/Magento/Sitemap/Model/Resource/Catalog/Product.php +++ b/app/code/Magento/Sitemap/Model/Resource/Catalog/Product.php @@ -10,6 +10,7 @@ * Sitemap resource product collection model * * @author Magento Core Team + * @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 948fd6192235b..be8003120f4f3 100644 --- a/app/code/Magento/Sitemap/Model/Sitemap.php +++ b/app/code/Magento/Sitemap/Model/Sitemap.php @@ -21,6 +21,8 @@ * @method \Magento\Sitemap\Model\Sitemap setSitemapTime(string $value) * @method int getStoreId() * @method \Magento\Sitemap\Model\Sitemap setStoreId(int $value) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Sitemap extends \Magento\Framework\Model\AbstractModel { @@ -156,6 +158,7 @@ class Sitemap extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Store/App/Action/Plugin/Context.php b/app/code/Magento/Store/App/Action/Plugin/Context.php index 54c7b490e15f3..cc18909e6242c 100644 --- a/app/code/Magento/Store/App/Action/Plugin/Context.php +++ b/app/code/Magento/Store/App/Action/Plugin/Context.php @@ -53,6 +53,7 @@ public function __construct( * @param callable $proceed * @param \Magento\Framework\App\RequestInterface $request * @return mixed + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundDispatch( \Magento\Framework\App\Action\Action $subject, diff --git a/app/code/Magento/Store/Model/Resource/Group/Collection.php b/app/code/Magento/Store/Model/Resource/Group/Collection.php index 29a6347020228..04020c4ed0cc3 100644 --- a/app/code/Magento/Store/Model/Resource/Group/Collection.php +++ b/app/code/Magento/Store/Model/Resource/Group/Collection.php @@ -35,6 +35,7 @@ public function setLoadDefault($loadDefault) * 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 175a313c577e1..131174d4948ab 100644 --- a/app/code/Magento/Store/Model/Resource/Store/Collection.php +++ b/app/code/Magento/Store/Model/Resource/Store/Collection.php @@ -50,6 +50,7 @@ public function setLoadDefault($loadDefault) * Is load default (admin) store * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getLoadDefault() { diff --git a/app/code/Magento/Store/Model/Resource/Website/Collection.php b/app/code/Magento/Store/Model/Resource/Website/Collection.php index ee2b60ad296cc..582e922a5f972 100644 --- a/app/code/Magento/Store/Model/Resource/Website/Collection.php +++ b/app/code/Magento/Store/Model/Resource/Website/Collection.php @@ -56,6 +56,7 @@ public function setLoadDefault($loadDefault) * 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 94f6e8c8ae166..feaeb57548358 100644 --- a/app/code/Magento/Store/Model/Storage/Db.php +++ b/app/code/Magento/Store/Model/Storage/Db.php @@ -13,6 +13,10 @@ use Magento\Store\Model\Website; use Magento\Store\Model\WebsiteFactory as WebsiteFactory; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Db implements \Magento\Store\Model\StoreManagerInterface { /** @@ -132,6 +136,7 @@ class Db implements \Magento\Store\Model\StoreManagerInterface * @param State $appState * @param bool $isSingleStoreAllowed * @param null $currentStore + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( StoreFactory $storeFactory, @@ -178,6 +183,7 @@ protected function _getDefaultStore() * Init store, group and website collections * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _initStores() { @@ -282,6 +288,8 @@ public function isSingleStoreMode() * @param null|string|bool|int|Store $storeId * @return Store * @throws \Magento\Framework\App\InitException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getStore($storeId = null) { diff --git a/app/code/Magento/Store/Model/StorageFactory.php b/app/code/Magento/Store/Model/StorageFactory.php index edcf2110824c0..e03db84cdb829 100644 --- a/app/code/Magento/Store/Model/StorageFactory.php +++ b/app/code/Magento/Store/Model/StorageFactory.php @@ -6,6 +6,9 @@ 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 2d51a5f161858..55ef04b792917 100644 --- a/app/code/Magento/Store/Model/Store.php +++ b/app/code/Magento/Store/Model/Store.php @@ -18,6 +18,9 @@ * @method int getStoreId() * @method \Magento\Store\Model\Store setSortOrder(int $value) * @method \Magento\Store\Model\Store setIsActive(int $value) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Store extends AbstractModel implements \Magento\Framework\App\ScopeInterface, @@ -316,6 +319,7 @@ class Store extends AbstractModel implements * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param bool $isCustomEntryPoint * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -525,6 +529,8 @@ public function getUrl($route = '', $params = []) * @param boolean|null $secure * @return string * @throws \InvalidArgumentException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getBaseUrl($type = \Magento\Framework\UrlInterface::URL_TYPE_LINK, $secure = null) { @@ -1010,6 +1016,8 @@ public function isCanDelete() * * @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 c3cde144be7aa..29be887532c7e 100644 --- a/app/code/Magento/Store/Model/System/Store.php +++ b/app/code/Magento/Store/Model/System/Store.php @@ -99,6 +99,8 @@ protected function _loadStoreCollection() * @param bool $empty * @param bool $all * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getStoreValuesForForm($empty = false, $all = false) { @@ -155,6 +157,8 @@ public function getStoreValuesForForm($empty = false, $all = false) * @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 a9622277f5587..51a13faed2893 100644 --- a/app/code/Magento/Store/Model/Website.php +++ b/app/code/Magento/Store/Model/Website.php @@ -25,6 +25,8 @@ * @method \Magento\Store\Model\Website setDefaultGroupId(int $value) * @method int getIsDefault() * @method \Magento\Store\Model\Website setIsDefault(int $value) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Website extends \Magento\Framework\Model\AbstractModel implements \Magento\Framework\Object\IdentityInterface, @@ -174,6 +176,7 @@ class Website extends \Magento\Framework\Model\AbstractModel implements * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Tax/Api/Data/QuoteDetailsItemInterface.php b/app/code/Magento/Tax/Api/Data/QuoteDetailsItemInterface.php index bfbdacc6dc0bf..f6d188130f3e8 100644 --- a/app/code/Magento/Tax/Api/Data/QuoteDetailsItemInterface.php +++ b/app/code/Magento/Tax/Api/Data/QuoteDetailsItemInterface.php @@ -71,6 +71,7 @@ public function getQuantity(); * 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 6230cd5f04497..1b772520e4271 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php @@ -13,6 +13,9 @@ use Magento\Framework\Exception\NoSuchEntityException; use Magento\Tax\Controller\RegistryConstants; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Form extends \Magento\Backend\Block\Widget\Form\Generic { const FORM_ELEMENT_ID = 'rate-form'; @@ -70,6 +73,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * @param \Magento\Tax\Api\TaxRateRepositoryInterface $taxRateRepository * @param \Magento\Tax\Model\TaxRateCollection $taxRateCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Backend\Block\Template\Context $context, @@ -103,6 +107,9 @@ protected function _construct() /** * @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 87b1b5c260719..e26d3fca84fa2 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit/Form.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit/Form.php @@ -89,6 +89,9 @@ protected function _construct() /** * @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 3035168ed7d40..e0cbdcaf59192 100644 --- a/app/code/Magento/Tax/Block/Checkout/Cart/Sidebar/Totals.php +++ b/app/code/Magento/Tax/Block/Checkout/Cart/Sidebar/Totals.php @@ -85,6 +85,7 @@ public function getSubtotalExclTax() * Return whether subtotal should be displayed including tax * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDisplaySubtotalInclTax() { @@ -95,6 +96,7 @@ public function getDisplaySubtotalInclTax() * Return whether subtotal should be displayed excluding tax * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getDisplaySubtotalExclTax() { @@ -105,6 +107,7 @@ public function getDisplaySubtotalExclTax() * 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 b7addd8d333ab..bda3ace8a1459 100644 --- a/app/code/Magento/Tax/Block/Sales/Order/Tax.php +++ b/app/code/Magento/Tax/Block/Sales/Order/Tax.php @@ -114,6 +114,7 @@ public function getStore() /** * @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 8f5759e45e097..491b496bc2ebc 100644 --- a/app/code/Magento/Tax/Controller/Adminhtml/Rule.php +++ b/app/code/Magento/Tax/Controller/Adminhtml/Rule.php @@ -80,6 +80,7 @@ protected function _isAllowed() * * @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 26e3386435f47..c1f82df0eae9e 100644 --- a/app/code/Magento/Tax/Helper/Data.php +++ b/app/code/Magento/Tax/Helper/Data.php @@ -21,6 +21,8 @@ /** * Catalog data helper + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Data extends \Magento\Framework\App\Helper\AbstractHelper { @@ -169,6 +171,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * @param \Magento\Catalog\Helper\Data $catalogHelper * @param OrderTaxManagementInterface $orderTaxManagement * @param PriceCurrencyInterface $priceCurrency + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Helper\Context $context, @@ -789,6 +792,7 @@ protected function calculateTaxForOrder(EntityInterface $current) * @param EntityInterface $order * @param EntityInterface $salesItem * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function calculateTaxForItems(EntityInterface $order, EntityInterface $salesItem) { diff --git a/app/code/Magento/Tax/Model/Calculation.php b/app/code/Magento/Tax/Model/Calculation.php index 5c7cfdc55232d..8b2086fd55606 100644 --- a/app/code/Magento/Tax/Model/Calculation.php +++ b/app/code/Magento/Tax/Model/Calculation.php @@ -19,6 +19,8 @@ /** * Tax Calculation Model + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Calculation extends \Magento\Framework\Model\AbstractModel { @@ -186,6 +188,7 @@ class Calculation extends \Magento\Framework\Model\AbstractModel * @param PriceCurrencyInterface $priceCurrency * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -469,6 +472,9 @@ protected function _isCrossBorderTradeEnabled($store = null) * @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 d871fde75bad8..d8f9a4872eaa9 100644 --- a/app/code/Magento/Tax/Model/Calculation/AbstractCalculator.php +++ b/app/code/Magento/Tax/Model/Calculation/AbstractCalculator.php @@ -13,6 +13,9 @@ use Magento\Tax\Api\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 31a852062ebf4..69f0dba1804a9 100644 --- a/app/code/Magento/Tax/Model/Calculation/Rate.php +++ b/app/code/Magento/Tax/Model/Calculation/Rate.php @@ -22,6 +22,7 @@ * @method \Magento\Tax\Model\Calculation\Rate setZipIsRange(int $value) * @method \Magento\Tax\Model\Calculation\Rate setZipFrom(int $value) * @method \Magento\Tax\Model\Calculation\Rate setZipTo(int $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Rate extends \Magento\Framework\Model\AbstractExtensibleModel implements \Magento\Tax\Api\Data\TaxRateInterface { @@ -62,6 +63,7 @@ class Rate extends \Magento\Framework\Model\AbstractExtensibleModel implements \ * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -104,6 +106,8 @@ protected function _construct() * * @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 299cc227c614e..2361d5197dbac 100644 --- a/app/code/Magento/Tax/Model/Calculation/RateRepository.php +++ b/app/code/Magento/Tax/Model/Calculation/RateRepository.php @@ -17,6 +17,9 @@ use Magento\Tax\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 18aece57d597d..3fe525b09b8fa 100644 --- a/app/code/Magento/Tax/Model/Calculation/Rule.php +++ b/app/code/Magento/Tax/Model/Calculation/Rule.php @@ -58,6 +58,7 @@ class Rule extends \Magento\Framework\Model\AbstractExtensibleModel implements T * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Tax/Model/Calculation/Rule/Validator.php b/app/code/Magento/Tax/Model/Calculation/Rule/Validator.php index a4a379ba38d89..78e07010349ef 100644 --- a/app/code/Magento/Tax/Model/Calculation/Rule/Validator.php +++ b/app/code/Magento/Tax/Model/Calculation/Rule/Validator.php @@ -32,6 +32,9 @@ public function __construct(ClassModelRegistry $classModelRegistry) * @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 bfd8e11e64910..6f8d0f1707dd3 100644 --- a/app/code/Magento/Tax/Model/Config.php +++ b/app/code/Magento/Tax/Model/Config.php @@ -12,6 +12,9 @@ use Magento\Store\Model\Store; +/** + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + */ class Config { // tax notifications @@ -262,6 +265,7 @@ public function setNeedUseShippingExcludeTax($flag) * Get flag what we need use shipping price exclude tax * * @return bool $flag + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getNeedUseShippingExcludeTax() { @@ -783,6 +787,7 @@ public function isWrongDiscountSettingsIgnored($store = null) * * @param null|string|bool|int|Store $store * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getInfoUrl($store = null) { @@ -799,6 +804,7 @@ public function getInfoUrl($store = null) * * @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 da2ad2ba127f5..ec9589dff5c99 100644 --- a/app/code/Magento/Tax/Model/Observer.php +++ b/app/code/Magento/Tax/Model/Observer.php @@ -116,6 +116,9 @@ public function salesEventConvertQuoteAddressToOrder(\Magento\Framework\Event\Ob * * @param \Magento\Framework\Event\Observer $observer * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function salesEventOrderAfterSave(\Magento\Framework\Event\Observer $observer) { @@ -253,6 +256,7 @@ public function salesEventOrderAfterSave(\Magento\Framework\Event\Observer $obse * * @param \Magento\Cron\Model\Schedule $schedule * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aggregateSalesReportTaxData($schedule) { diff --git a/app/code/Magento/Tax/Model/Resource/Calculation.php b/app/code/Magento/Tax/Model/Resource/Calculation.php index b885c1c90edb6..15582f75cb999 100644 --- a/app/code/Magento/Tax/Model/Resource/Calculation.php +++ b/app/code/Magento/Tax/Model/Resource/Calculation.php @@ -129,6 +129,8 @@ public function getRate($request) * @param \Magento\Framework\Object $request * @param array|null $rates * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function getCalculationProcess($request, $rates = null) { @@ -262,6 +264,9 @@ protected function _createSearchPostCodeTemplates($postcode, $exactPostcode = nu * * @param \Magento\Framework\Object $request * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _getRates($request) { diff --git a/app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php b/app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php index 604fbf6340536..f575b6bb03c36 100644 --- a/app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php +++ b/app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php @@ -19,6 +19,7 @@ /** * Tax totals calculation model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class CommonTaxCollector extends AbstractTotal { @@ -708,6 +709,8 @@ public function convertAppliedTaxes($appliedTaxes, $baseAppliedTaxes, $extraInfo * @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 aa786ec33bfec..92b39c7f72627 100644 --- a/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php +++ b/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php @@ -12,6 +12,7 @@ /** * Tax totals calculation model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Tax extends CommonTaxCollector { @@ -229,6 +230,7 @@ public function mapQuoteExtraTaxables( * @param Address $address * @param array $itemsByType * @return $this + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function processExtraTaxables(Address $address, Array $itemsByType) { @@ -280,6 +282,7 @@ protected function processExtraTaxables(Address $address, Array $itemsByType) * * @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 97b31af401cca..97eb86e8958cf 100644 --- a/app/code/Magento/Tax/Model/TaxCalculation.php +++ b/app/code/Magento/Tax/Model/TaxCalculation.php @@ -19,6 +19,9 @@ 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 0d2bfda3cade7..2746f1e2ca013 100644 --- a/app/code/Magento/Tax/Model/TaxClass/Repository.php +++ b/app/code/Magento/Tax/Model/TaxClass/Repository.php @@ -20,6 +20,9 @@ use Magento\Tax\Model\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 6dd5ae339956b..0d2b8cc6e9b53 100644 --- a/app/code/Magento/Tax/Model/TaxRuleRepository.php +++ b/app/code/Magento/Tax/Model/TaxRuleRepository.php @@ -21,6 +21,9 @@ use Magento\Tax\Model\Resource\Calculation\Rule\Collection; use Magento\Tax\Model\Resource\Calculation\Rule\CollectionFactory; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class TaxRuleRepository implements TaxRuleRepositoryInterface { /** diff --git a/app/code/Magento/TaxImportExport/Model/Rate/CsvImportHandler.php b/app/code/Magento/TaxImportExport/Model/Rate/CsvImportHandler.php index d60d86a2283e6..f14ab9a98e7cc 100644 --- a/app/code/Magento/TaxImportExport/Model/Rate/CsvImportHandler.php +++ b/app/code/Magento/TaxImportExport/Model/Rate/CsvImportHandler.php @@ -141,6 +141,7 @@ protected function _filterFileFields(array $fileFields) * @param array $validFields assoc array of valid file fields * @return array * @throws \Magento\Framework\Model\Exception + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _filterRateData(array $rateRawData, array $invalidFields, array $validFields) { diff --git a/app/code/Magento/Translation/Model/Inline/Parser.php b/app/code/Magento/Translation/Model/Inline/Parser.php index 211e6ad7e4e37..8e628bb0b6c97 100644 --- a/app/code/Magento/Translation/Model/Inline/Parser.php +++ b/app/code/Magento/Translation/Model/Inline/Parser.php @@ -271,6 +271,7 @@ public function setIsJson($flag) * @param array $matches * @param array $options * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getAttributeLocation($matches, $options) { @@ -284,6 +285,7 @@ protected function _getAttributeLocation($matches, $options) * @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 e5ab456ae6e3c..db333e01f16c9 100644 --- a/app/code/Magento/Translation/Model/Js/DataProvider.php +++ b/app/code/Magento/Translation/Model/Js/DataProvider.php @@ -11,6 +11,7 @@ class DataProvider implements DataProviderInterface * Get translation data * * @return string[] + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getData() { diff --git a/app/code/Magento/Ui/Component/AbstractView.php b/app/code/Magento/Ui/Component/AbstractView.php index 1fd832be29b54..fd1b316abd085 100644 --- a/app/code/Magento/Ui/Component/AbstractView.php +++ b/app/code/Magento/Ui/Component/AbstractView.php @@ -18,6 +18,8 @@ /** * 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 e476d9f754223..d07b84c53bf1d 100644 --- a/app/code/Magento/Ui/Component/Filter/Type/Date.php +++ b/app/code/Magento/Ui/Component/Filter/Type/Date.php @@ -18,6 +18,7 @@ /** * Class Date + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Date extends FilterAbstract { @@ -55,6 +56,7 @@ class Date extends FilterAbstract * @param FilterPool $filterPool * @param ResolverInterface $localeResolver * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( TemplateContext $context, diff --git a/app/code/Magento/Ui/Component/Form.php b/app/code/Magento/Ui/Component/Form.php index e765e240a8688..956bc06a04586 100644 --- a/app/code/Magento/Ui/Component/Form.php +++ b/app/code/Magento/Ui/Component/Form.php @@ -73,6 +73,7 @@ class Form extends AbstractView * @param ActionPool $actionPool * @param ButtonProviderFactory $buttonProviderFactory * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( TemplateContext $context, @@ -209,6 +210,7 @@ public function getValidateAction() * @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 7f8b1299e58d0..8cd29324972ea 100644 --- a/app/code/Magento/Ui/Component/Form/Element/AbstractFormElement.php +++ b/app/code/Magento/Ui/Component/Form/Element/AbstractFormElement.php @@ -37,6 +37,7 @@ public function getFormInputName() /** * @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 0e6c7e964df69..6703903adcdc5 100644 --- a/app/code/Magento/Ui/Component/Form/Element/ElementInterface.php +++ b/app/code/Magento/Ui/Component/Form/Element/ElementInterface.php @@ -23,6 +23,7 @@ public function getFormInputName(); /** * @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 6c5e7ae556134..fe8c51dfebca2 100644 --- a/app/code/Magento/Ui/Component/Form/Element/Radio.php +++ b/app/code/Magento/Ui/Component/Form/Element/Radio.php @@ -11,6 +11,7 @@ class Radio extends AbstractFormElement { /** * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getChecked() { diff --git a/app/code/Magento/Ui/Component/Form/Element/Select.php b/app/code/Magento/Ui/Component/Form/Element/Select.php index cefc727600cd4..2458dda0330ca 100644 --- a/app/code/Magento/Ui/Component/Form/Element/Select.php +++ b/app/code/Magento/Ui/Component/Form/Element/Select.php @@ -14,6 +14,7 @@ class Select extends AbstractFormElement * * @param string $optionValue * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsSelected($optionValue) { diff --git a/app/code/Magento/Ui/Component/Form/Fieldset.php b/app/code/Magento/Ui/Component/Form/Fieldset.php index 6bc1641b5b653..96f3846535f7c 100644 --- a/app/code/Magento/Ui/Component/Form/Fieldset.php +++ b/app/code/Magento/Ui/Component/Form/Fieldset.php @@ -28,6 +28,7 @@ public function getLegendText() /** * @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 fed10e449514e..be4d9ba4f35da 100644 --- a/app/code/Magento/Ui/Component/Layout/AbstractStructure.php +++ b/app/code/Magento/Ui/Component/Layout/AbstractStructure.php @@ -88,6 +88,7 @@ public function __construct( /** * @inheritdoc + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function prepare() { @@ -203,6 +204,7 @@ protected function getDataSources() /** * @param array $dataSourceConfig * @return void + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function processDataSource(array $dataSourceConfig) { @@ -441,6 +443,7 @@ protected function addElementToGroup($groupName, $elementName, $referenceElement * @param string $dataScope * @param array $element * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function addElementToCollection(array & $collection, $elementName, $dataScope, array $element) { @@ -539,6 +542,7 @@ protected function getNextSortInc() * @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 8a0fffd534c3b..774d15ef1c5a1 100644 --- a/app/code/Magento/Ui/Component/Listing.php +++ b/app/code/Magento/Ui/Component/Listing.php @@ -58,6 +58,7 @@ class Listing extends AbstractView * @param ActionPool $actionPool * @param RowPool $dataProviderRowPool * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( TemplateContext $context, diff --git a/app/code/Magento/Ui/DataProvider/Config/Converter.php b/app/code/Magento/Ui/DataProvider/Config/Converter.php index f9de00aa191be..7a3d8c2a29f1b 100644 --- a/app/code/Magento/Ui/DataProvider/Config/Converter.php +++ b/app/code/Magento/Ui/DataProvider/Config/Converter.php @@ -47,6 +47,7 @@ public function __construct(\Magento\Eav\Model\Entity\TypeFactory $entityTypeFac * * @param \DOMNode $source * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function toArray(\DOMNode $source) { @@ -99,6 +100,8 @@ protected function toArray(\DOMNode $source) * * @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 a2db36660d109..6ab84dc8664d7 100644 --- a/app/code/Magento/Ui/DataProvider/Manager.php +++ b/app/code/Magento/Ui/DataProvider/Manager.php @@ -95,6 +95,7 @@ public function getCollectionData($dataSource, array $filters = []) * @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 11185631b3456..e8f3cbe53d576 100644 --- a/app/code/Magento/Ui/DataProvider/Metadata.php +++ b/app/code/Magento/Ui/DataProvider/Metadata.php @@ -246,6 +246,9 @@ protected function initAttributes() * @param string $name * @param array $field * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function prepare($name, array & $field) { diff --git a/app/code/Magento/Ups/Helper/Config.php b/app/code/Magento/Ups/Helper/Config.php index be82030aa0fe2..dd09f44816fcb 100644 --- a/app/code/Magento/Ups/Helper/Config.php +++ b/app/code/Magento/Ups/Helper/Config.php @@ -36,6 +36,7 @@ public function getCode($type, $code = '') * 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 8a5ea44b6eff8..460bf55511ce4 100644 --- a/app/code/Magento/Ups/Model/Carrier.php +++ b/app/code/Magento/Ups/Model/Carrier.php @@ -13,6 +13,8 @@ /** * UPS shipping implementation + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Carrier extends AbstractCarrierOnline implements CarrierInterface { @@ -200,6 +202,9 @@ public function collectRates(RateRequest $request) * * @param RateRequest $request * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function setRequest(RateRequest $request) { @@ -491,6 +496,7 @@ public function getShipmentByCode($code, $origin = null) * * @param string $response * @return Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _parseCgiResponse($response) { @@ -560,6 +566,9 @@ protected function _parseCgiResponse($response) * Get xml rates * * @return Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _getXmlQuotes() { @@ -747,6 +756,7 @@ protected function _getBaseCurrencyRate($code) * * @param mixed $xmlResponse * @return Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _parseXmlResponse($xmlResponse) { @@ -972,6 +982,8 @@ protected function _getXmlTracking($trackings) * @param string $trackingValue * @param string $xmlResponse * @return null + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _parseXmlTrackingResponse($trackingValue, $xmlResponse) { @@ -1133,6 +1145,9 @@ public function getAllowedMethods() * * @param \Magento\Framework\Object $request * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _formShipmentRequest(\Magento\Framework\Object $request) { @@ -1505,6 +1520,7 @@ public function getShipConfirmUrl() * * @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 0bdba07481abe..3548cb034708b 100644 --- a/app/code/Magento/Ups/Model/Config/Source/OriginShipment.php +++ b/app/code/Magento/Ups/Model/Config/Source/OriginShipment.php @@ -18,6 +18,7 @@ class OriginShipment extends \Magento\Ups\Model\Config\Source\Generic /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function toOptionArray() { diff --git a/app/code/Magento/Ups/Model/Config/Source/Unitofmeasure.php b/app/code/Magento/Ups/Model/Config/Source/Unitofmeasure.php index 3dfc72c6ecd09..793b2cb288ebe 100644 --- a/app/code/Magento/Ups/Model/Config/Source/Unitofmeasure.php +++ b/app/code/Magento/Ups/Model/Config/Source/Unitofmeasure.php @@ -18,6 +18,7 @@ class Unitofmeasure extends \Magento\Ups\Model\Config\Source\Generic /** * {@inheritdoc} + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function toOptionArray() { diff --git a/app/code/Magento/UrlRewrite/Block/Catalog/Product/Grid.php b/app/code/Magento/UrlRewrite/Block/Catalog/Product/Grid.php index d9a3df31f2198..f37ce83f123f2 100644 --- a/app/code/Magento/UrlRewrite/Block/Catalog/Product/Grid.php +++ b/app/code/Magento/UrlRewrite/Block/Catalog/Product/Grid.php @@ -8,6 +8,7 @@ * Products grid for URL rewrites editing * * @author Magento Core Team + * @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 79844fa883ea8..d9fabada7a127 100644 --- a/app/code/Magento/UrlRewrite/Block/Cms/Page/Grid.php +++ b/app/code/Magento/UrlRewrite/Block/Cms/Page/Grid.php @@ -8,6 +8,7 @@ * CMS pages grid for URL rewrites * * @author Magento Core Team + * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Grid extends \Magento\Cms\Block\Adminhtml\Page\Grid { diff --git a/app/code/Magento/User/Controller/Adminhtml/User/Save.php b/app/code/Magento/User/Controller/Adminhtml/User/Save.php index 048bf50ddba33..587fb71a873b0 100644 --- a/app/code/Magento/User/Controller/Adminhtml/User/Save.php +++ b/app/code/Magento/User/Controller/Adminhtml/User/Save.php @@ -9,6 +9,8 @@ class Save extends \Magento\User\Controller\Adminhtml\User { /** * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { diff --git a/app/code/Magento/User/Model/Resource/User.php b/app/code/Magento/User/Model/Resource/User.php index c1bde86fbb172..c27a049e6eeed 100644 --- a/app/code/Magento/User/Model/Resource/User.php +++ b/app/code/Magento/User/Model/Resource/User.php @@ -11,6 +11,7 @@ /** * ACL user resource + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class User extends \Magento\Framework\Model\Resource\Db\AbstractDb { diff --git a/app/code/Magento/Usps/Block/Rma/Adminhtml/Rma/Edit/Tab/General/Shipping/Packaging/Plugin.php b/app/code/Magento/Usps/Block/Rma/Adminhtml/Rma/Edit/Tab/General/Shipping/Packaging/Plugin.php index ffb28539fe2b9..bf844ecc0d7b0 100644 --- a/app/code/Magento/Usps/Block/Rma/Adminhtml/Rma/Edit/Tab/General/Shipping/Packaging/Plugin.php +++ b/app/code/Magento/Usps/Block/Rma/Adminhtml/Rma/Edit/Tab/General/Shipping/Packaging/Plugin.php @@ -45,6 +45,7 @@ public function __construct(UspsHelper $uspsHelper, RequestInterface $request) * @param \Magento\Framework\Object $subject $subject * @param bool $result * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterIsGirthAllowed(\Magento\Framework\Object $subject, $result) { @@ -57,6 +58,7 @@ public function afterIsGirthAllowed(\Magento\Framework\Object $subject, $result) * @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 7f22a33a79b9a..3d7afd722b9c8 100644 --- a/app/code/Magento/Usps/Model/Carrier.php +++ b/app/code/Magento/Usps/Model/Carrier.php @@ -10,6 +10,8 @@ /** * USPS shipping + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\Carrier\CarrierInterface { @@ -194,6 +196,9 @@ public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $req * * @param \Magento\Sales\Model\Quote\Address\RateRequest $request * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function setRequest(\Magento\Sales\Model\Quote\Address\RateRequest $request) { @@ -361,6 +366,9 @@ protected function _setFreeMethodRequest($freeMethod) * * @link http://www.usps.com/webtools/htm/Rate-Calculators-v2-3.htm * @return Result + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _getXmlQuotes() { @@ -483,6 +491,8 @@ protected function _getXmlQuotes() * @param string $response * @return Result * @link http://www.usps.com/webtools/htm/Rate-Calculators-v2-3.htm + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _parseXmlResponse($response) { @@ -583,6 +593,7 @@ protected function _parseXmlResponse($response) * @param string $type * @param string $code * @return array|false + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getCode($type, $code = '') { @@ -1018,6 +1029,8 @@ protected function _getXmlTracking($trackings) * @param string $trackingvalue * @param string $response * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _parseXmlTrackingResponse($trackingvalue, $response) { @@ -1121,6 +1134,7 @@ public function getAllowedMethods() * * @param string $countryId * @return string|false + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _getCountryName($countryId) { @@ -1449,6 +1463,7 @@ protected function _formUsExpressShipmentRequest(\Magento\Framework\Object $requ * @param string $serviceType * @return string * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _formUsSignatureConfirmationShipmentRequest(\Magento\Framework\Object $request, $serviceType) { @@ -1548,6 +1563,9 @@ protected function _convertPoundOunces($weightInPounds) * * @param \Magento\Framework\Object $request * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _formIntlShipmentRequest(\Magento\Framework\Object $request) { @@ -1799,6 +1817,7 @@ protected function _formIntlShipmentRequest(\Magento\Framework\Object $request) * * @param \Magento\Framework\Object $request * @return \Magento\Framework\Object + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _doShipmentRequest(\Magento\Framework\Object $request) { diff --git a/app/code/Magento/Weee/Helper/Data.php b/app/code/Magento/Weee/Helper/Data.php index 893fcd3a25d2c..f928ee6c55bdd 100644 --- a/app/code/Magento/Weee/Helper/Data.php +++ b/app/code/Magento/Weee/Helper/Data.php @@ -209,6 +209,7 @@ public function getAmount($product, $website = null) * @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 d9d09e6511f66..a9435a88260f7 100644 --- a/app/code/Magento/Weee/Model/Attribute/Backend/Weee/Tax.php +++ b/app/code/Magento/Weee/Model/Attribute/Backend/Weee/Tax.php @@ -91,6 +91,7 @@ public function validate($object) * * @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 4798e0e61a34b..f5dfe7366b59f 100644 --- a/app/code/Magento/Weee/Model/Observer.php +++ b/app/code/Magento/Weee/Model/Observer.php @@ -4,6 +4,9 @@ */ namespace Magento\Weee\Model; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Observer extends \Magento\Framework\Model\AbstractModel { /** @@ -44,6 +47,7 @@ class Observer extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Weee/Model/Tax.php b/app/code/Magento/Weee/Model/Tax.php index 98b9608ffaeed..d0541cef9513c 100644 --- a/app/code/Magento/Weee/Model/Tax.php +++ b/app/code/Magento/Weee/Model/Tax.php @@ -10,6 +10,9 @@ use Magento\Tax\Model\Calculation; use Magento\Customer\Api\AccountManagementInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Tax extends \Magento\Framework\Model\AbstractModel { /** @@ -95,6 +98,7 @@ class Tax extends \Magento\Framework\Model\AbstractModel * @param PriceCurrencyInterface $priceCurrency * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -196,6 +200,8 @@ public function getWeeeTaxAttributeCodes($store = null, $forceEnabled = false) * @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 0dfc5cebce1c6..94f91dbc5291b 100644 --- a/app/code/Magento/Weee/Model/Total/Creditmemo/Weee.php +++ b/app/code/Magento/Weee/Model/Total/Creditmemo/Weee.php @@ -37,6 +37,10 @@ public function __construct(\Magento\Weee\Helper\Data $weeeData, array $data = [ * * @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 d0539a81325c0..b56ff8e511903 100644 --- a/app/code/Magento/Weee/Model/Total/Invoice/Weee.php +++ b/app/code/Magento/Weee/Model/Total/Invoice/Weee.php @@ -35,6 +35,9 @@ public function __construct(\Magento\Weee\Helper\Data $weeeData, array $data = [ * * @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 a7a8729da4ea8..2c51cd9b25d5d 100644 --- a/app/code/Magento/Weee/Model/Total/Quote/Weee.php +++ b/app/code/Magento/Weee/Model/Total/Quote/Weee.php @@ -125,6 +125,8 @@ public function collect(\Magento\Sales\Model\Quote\Address $address) * @param \Magento\Sales\Model\Quote\Address $address * @param \Magento\Sales\Model\Quote\Item\AbstractItem $item * @return void|$this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ protected function _process(\Magento\Sales\Model\Quote\Address $address, $item) { diff --git a/app/code/Magento/Weee/Model/Total/Quote/WeeeTax.php b/app/code/Magento/Weee/Model/Total/Quote/WeeeTax.php index 00a5bfb2c0ef2..5f07f635353d7 100644 --- a/app/code/Magento/Weee/Model/Total/Quote/WeeeTax.php +++ b/app/code/Magento/Weee/Model/Total/Quote/WeeeTax.php @@ -15,6 +15,8 @@ class WeeeTax extends Weee * * @param \Magento\Sales\Model\Quote\Address $address * @return $this + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function collect(\Magento\Sales\Model\Quote\Address $address) { diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php index c4138de7ccd71..b66fa238951f9 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php @@ -118,6 +118,7 @@ public function getFieldsetId() * 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 c64afb4fe2829..ec57db24f3960 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php @@ -108,6 +108,7 @@ public function getWidgetInstance() * 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 fa1e2b209625b..2c1848c89a6f7 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php @@ -184,6 +184,7 @@ protected function _getDisplayOnOptions() * 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 614eeaa7eb2be..c39bcfb884474 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Properties.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Properties.php @@ -10,6 +10,9 @@ */ namespace Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Tab; +/** + * @SuppressWarnings(PHPMD.DepthOfInheritance) + */ class Properties extends \Magento\Widget\Block\Adminhtml\Widget\Options implements \Magento\Backend\Block\Widget\Tab\TabInterface { diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php index 7d60851766774..c1aaf3eb8ba65 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php @@ -133,6 +133,8 @@ public function addFields() * * @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 6dc652513238f..1cd22a5a64e72 100644 --- a/app/code/Magento/Widget/Model/NamespaceResolver.php +++ b/app/code/Magento/Widget/Model/NamespaceResolver.php @@ -33,6 +33,8 @@ public function __construct(\Magento\Framework\Module\ModuleListInterface $modul * @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 695345a62c8f3..a7a8a59c8f091 100644 --- a/app/code/Magento/Widget/Model/Template/Filter.php +++ b/app/code/Magento/Widget/Model/Template/Filter.php @@ -6,6 +6,7 @@ /** * Template Filter Model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Filter extends \Magento\Cms\Model\Template\Filter { @@ -33,6 +34,7 @@ class Filter extends \Magento\Cms\Model\Template\Filter * @param \Magento\Backend\Model\UrlInterface $backendUrlBuilder * @param \Magento\Widget\Model\Resource\Widget $widgetResource * @param \Magento\Widget\Model\Widget $widget + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Stdlib\String $string, diff --git a/app/code/Magento/Widget/Model/Widget.php b/app/code/Magento/Widget/Model/Widget.php index 7511d0fa9b6da..df0679c6def6c 100644 --- a/app/code/Magento/Widget/Model/Widget.php +++ b/app/code/Magento/Widget/Model/Widget.php @@ -116,6 +116,8 @@ public function getConfigAsXml($type) * * @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 e64b225142985..8a005665f6f9d 100644 --- a/app/code/Magento/Widget/Model/Widget/Instance.php +++ b/app/code/Magento/Widget/Model/Widget/Instance.php @@ -17,6 +17,7 @@ * @method \Magento\Widget\Model\Widget\Instance setSortOrder(int $value) * @method \Magento\Widget\Model\Widget\Instance setThemeId(int $value) * @method int getThemeId() + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Instance extends \Magento\Framework\Model\AbstractModel { @@ -122,6 +123,7 @@ class Instance extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $relatedCacheTypes * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -186,6 +188,8 @@ protected function _construct() * Processing object before save data * * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function beforeSave() { @@ -407,6 +411,7 @@ public function getWidgetReference($matchParam, $value, $requestedParam) * Load widget XML config and merge with theme widget config * * @return array|null + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getWidgetConfigAsArray() { @@ -531,6 +536,8 @@ public function getWidgetSupportedTemplatesByContainer($containerName) * @param string $container * @param string $templatePath * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function generateLayoutUpdateXml($container, $templatePath = '') { diff --git a/app/code/Magento/Wishlist/Block/AbstractBlock.php b/app/code/Magento/Wishlist/Block/AbstractBlock.php index 6640d6b53a456..b3a9ca0479683 100644 --- a/app/code/Magento/Wishlist/Block/AbstractBlock.php +++ b/app/code/Magento/Wishlist/Block/AbstractBlock.php @@ -80,6 +80,7 @@ protected function _getWishlist() * * @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 246493b70ae2b..a509518c73781 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Sidebar.php +++ b/app/code/Magento/Wishlist/Block/Customer/Sidebar.php @@ -56,6 +56,7 @@ protected function _toHtml() * * @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 7b45de5f6fdac..d54f124b01683 100644 --- a/app/code/Magento/Wishlist/Controller/Index/Add.php +++ b/app/code/Magento/Wishlist/Controller/Index/Add.php @@ -51,6 +51,9 @@ public function __construct( * * @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 edb018b57b84e..795ed6717c690 100644 --- a/app/code/Magento/Wishlist/Controller/Index/Cart.php +++ b/app/code/Magento/Wishlist/Controller/Index/Cart.php @@ -9,6 +9,9 @@ use Magento\Framework\App\ResponseInterface; use Magento\Wishlist\Controller\IndexInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Cart extends Action\Action implements IndexInterface { /** @@ -91,6 +94,8 @@ public function __construct( * 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 08d349788296d..e7baa39cb1629 100644 --- a/app/code/Magento/Wishlist/Controller/Index/DownloadCustomOption.php +++ b/app/code/Magento/Wishlist/Controller/Index/DownloadCustomOption.php @@ -32,6 +32,8 @@ public function __construct( * 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 8b822593a94e6..7b3354bb06f8c 100644 --- a/app/code/Magento/Wishlist/Controller/Index/Fromcart.php +++ b/app/code/Magento/Wishlist/Controller/Index/Fromcart.php @@ -33,6 +33,7 @@ public function __construct( * * @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 3d1e22d689207..c755830820178 100644 --- a/app/code/Magento/Wishlist/Controller/Index/Send.php +++ b/app/code/Magento/Wishlist/Controller/Index/Send.php @@ -10,6 +10,9 @@ use Magento\Framework\App\ResponseInterface; use Magento\Wishlist\Controller\IndexInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Send extends Action\Action implements IndexInterface { /** @@ -82,6 +85,9 @@ public function __construct( * * @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 40c1e7dbee43a..186157e8ae63a 100644 --- a/app/code/Magento/Wishlist/Controller/Index/Update.php +++ b/app/code/Magento/Wishlist/Controller/Index/Update.php @@ -50,6 +50,8 @@ public function __construct( * * @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 cd810cda32406..0122527720139 100644 --- a/app/code/Magento/Wishlist/Controller/WishlistProvider.php +++ b/app/code/Magento/Wishlist/Controller/WishlistProvider.php @@ -54,6 +54,7 @@ public function __construct( /** * {@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 65874e652d2fb..7af5012d2aec0 100644 --- a/app/code/Magento/Wishlist/Helper/Data.php +++ b/app/code/Magento/Wishlist/Helper/Data.php @@ -10,6 +10,7 @@ * Wishlist Data Helper * * @author Magento Core Team + * @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 513969f67234d..27b24750b8b03 100644 --- a/app/code/Magento/Wishlist/Helper/Rss.php +++ b/app/code/Magento/Wishlist/Helper/Rss.php @@ -5,6 +5,9 @@ namespace Magento\Wishlist\Helper; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Rss extends \Magento\Wishlist\Helper\Data { /** @@ -34,6 +37,7 @@ class Rss extends \Magento\Wishlist\Helper\Data * @param \Magento\Wishlist\Controller\WishlistProviderInterface $wishlistProvider * @param \Magento\Customer\Api\Data\CustomerDataBuilder $customerBuilder * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Helper\Context $context, diff --git a/app/code/Magento/Wishlist/Model/Item.php b/app/code/Magento/Wishlist/Model/Item.php index 284118a5eef7c..cc3f2edf3a38d 100644 --- a/app/code/Magento/Wishlist/Model/Item.php +++ b/app/code/Magento/Wishlist/Model/Item.php @@ -26,6 +26,7 @@ * @method \Magento\Wishlist\Model\Item setAddedAt(string $value) * @method string getDescription() * @method \Magento\Wishlist\Model\Item setDescription(string $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Item extends AbstractModel implements ItemInterface { @@ -131,6 +132,7 @@ class Item extends AbstractModel implements ItemInterface * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, diff --git a/app/code/Magento/Wishlist/Model/ItemCarrier.php b/app/code/Magento/Wishlist/Model/ItemCarrier.php index a492568b03d80..39e8e983f1d7f 100644 --- a/app/code/Magento/Wishlist/Model/ItemCarrier.php +++ b/app/code/Magento/Wishlist/Model/ItemCarrier.php @@ -14,6 +14,9 @@ use Magento\Framework\UrlInterface; use Magento\Wishlist\Helper\Data as WishlistHelper; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class ItemCarrier { /** @@ -100,6 +103,9 @@ public function __construct( * @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 e20109f60c164..1ab18bf1ea173 100644 --- a/app/code/Magento/Wishlist/Model/Observer.php +++ b/app/code/Magento/Wishlist/Model/Observer.php @@ -121,6 +121,7 @@ public function processCartUpdateBefore($observer) /** * @param \Magento\Framework\Event\Observer $observer * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function processAddToCart($observer) { @@ -176,6 +177,7 @@ public function processAddToCart($observer) * * @param \Magento\Framework\Event\Observer $observer * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function customerLogin(\Magento\Framework\Event\Observer $observer) { @@ -189,6 +191,7 @@ public function customerLogin(\Magento\Framework\Event\Observer $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 8ab2536a38ad7..d611a28011ec7 100644 --- a/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php +++ b/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php @@ -6,6 +6,8 @@ /** * 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 06c7bd3b58e57..01b96becde9a9 100644 --- a/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php +++ b/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php @@ -10,6 +10,9 @@ 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 574d389c9ebba..b094d118f4449 100644 --- a/app/code/Magento/Wishlist/Model/Wishlist.php +++ b/app/code/Magento/Wishlist/Model/Wishlist.php @@ -22,6 +22,7 @@ * @method \Magento\Wishlist\Model\Wishlist setSharingCode(string $value) * @method string getUpdatedAt() * @method \Magento\Wishlist\Model\Wishlist setUpdatedAt(string $value) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magento\Framework\Object\IdentityInterface { @@ -134,6 +135,7 @@ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magent * @param ProductRepositoryInterface $productRepository * @param bool $useCurrentWebsite * @param array $data + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, @@ -369,6 +371,8 @@ public function addItem(Item $item) * @param bool $forciblySetQty * @throws \Magento\Framework\Model\Exception * @return Item|string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function addNewItem($product, $buyRequest = null, $forciblySetQty = false) { @@ -599,6 +603,8 @@ public function isOwner($customerId) * @throws Exception * * @see \Magento\Catalog\Helper\Product::addParamsToBuyRequest() + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function updateItem($itemId, $buyRequest, $params = null) { From 2080fea485b7500250d22a1e58d5471dfcd5a93a Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin Date: Tue, 6 Jan 2015 14:33:01 +0200 Subject: [PATCH 05/24] MAGETWO-31575: Remove black/white lists from file system and builds configuration - Updated LiveCodeTest to use github changes - Refactored test framework helper code --- .../Tool/BlacklistInterface.php | 18 +++ .../CodingStandard/Tool/CodeMessDetector.php | 32 ++-- .../CodingStandard/Tool/CodeSniffer.php | 80 ++++------ .../CodingStandard/Tool/CopyPasteDetector.php | 36 +++-- .../Tool/ExtensionInterface.php | 19 +++ .../CodingStandard/ToolInterface.php | 7 +- .../CodingStandard/Tool/CodeSnifferTest.php | 5 - .../Magento/Test/Php/LiveCodeTest.php | 108 +++++-------- .../Test/Php/_files/blacklist/common.txt | 118 -------------- .../Php/_files/phpcs/blacklist/common.txt | 41 ----- .../Php/_files/phpcs/whitelist/common.txt | 8 - .../Test/Php/_files/whitelist/common.txt | 151 +----------------- 12 files changed, 153 insertions(+), 470 deletions(-) create mode 100644 dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/BlacklistInterface.php create mode 100644 dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/ExtensionInterface.php delete mode 100644 dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt delete mode 100644 dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt delete mode 100644 dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/whitelist/common.txt diff --git a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/BlacklistInterface.php b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/BlacklistInterface.php new file mode 100644 index 0000000000000..487d07583384e --- /dev/null +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/BlacklistInterface.php @@ -0,0 +1,18 @@ +_reportFile = $reportFile; - $this->_rulesetFile = $rulesetFile; + $this->reportFile = $reportFile; + $this->rulesetFile = $rulesetFile; } /** @@ -47,25 +49,21 @@ public function canRun() } /** - * Run tool for files specified - * - * @param array $whiteList Files/directories to be inspected - * @param array $blackList Files/directories to be excluded from the inspection - * @param array $extensions Array of alphanumeric strings, for example: 'php', 'xml', 'phtml', 'css'... - * - * @return int + * {@inheritdoc} */ - public function run(array $whiteList, array $blackList = [], array $extensions = []) + public function run(array $whiteList) { + if (empty($whiteList)) { + return \PHP_PMD_TextUI_Command::EXIT_SUCCESS; + } + $commandLineArguments = [ 'run_file_mock', //emulate script name in console arguments implode(',', $whiteList), 'xml', //report format - $this->_rulesetFile, - '--exclude', - implode(',', $blackList), + $this->rulesetFile, '--reportfile', - $this->_reportFile, + $this->reportFile, ]; $options = new \PHP_PMD_TextUI_CommandLineOptions($commandLineArguments); diff --git a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer.php b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer.php index edc994e2c0361..b0525aad0274f 100644 --- a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer.php +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer.php @@ -11,28 +11,35 @@ use Magento\TestFramework\CodingStandard\Tool\CodeSniffer\Wrapper; use Magento\TestFramework\CodingStandard\ToolInterface; -class CodeSniffer implements ToolInterface +class CodeSniffer implements ToolInterface, ExtensionInterface { /** * Ruleset directory * * @var string */ - protected $rulesetDir; + private $rulesetDir; /** * Report file * * @var string */ - protected $reportFile; + private $reportFile; /** * PHPCS cli tool wrapper * * @var Wrapper */ - protected $wrapper; + private $wrapper; + + /** + * List of extensions for tool run + * + * @var array + */ + private $extensions = ['php']; /** * Constructor @@ -49,64 +56,41 @@ public function __construct($rulesetDir, $reportFile, Wrapper $wrapper) } /** - * Whether the tool can be ran on the current environment - * - * @return bool + * {@inheritdoc} */ - public function canRun() + public function setExtensions(array $extensions) { - return class_exists('PHP_CodeSniffer_CLI'); + $this->extensions = $extensions; } /** - * Return the version of code sniffer found + * Whether the tool can be ran on the current environment * - * @return string + * @return bool */ - public function version() + public function canRun() { - return $this->wrapper->version(); + return class_exists('PHP_CodeSniffer_CLI'); } /** - * Run tool for files specified - * - * @param array $whiteList Files/directories to be inspected - * @param array $blackList Files/directories to be excluded from the inspection - * @param array $extensions Array of alphanumeric strings, for example: 'php', 'xml', 'phtml', 'css'... - * @param int $warningSeverity Severity level of warnings, default is 0 - * - * @return int + * {@inheritdoc} */ - public function run( - array $whiteList, - array $blackList = [], - array $extensions = [], - $warningSeverity = 0 - ) { - $whiteList = array_map( - function ($item) { - return $item; - }, - $whiteList - ); - - $blackList = array_map( - function ($item) { - return preg_quote($item); - }, - $blackList - ); + public function run(array $whiteList) + { + if (empty($whiteList)) { + return 0; + } $this->wrapper->checkRequirements(); $settings = $this->wrapper->getDefaults(); $settings['files'] = $whiteList; $settings['standard'] = [$this->rulesetDir]; - $settings['ignored'] = $blackList; - $settings['extensions'] = $extensions; + $settings['extensions'] = $this->extensions; $settings['reportFile'] = $this->reportFile; - $settings['warningSeverity'] = $warningSeverity; + $settings['warningSeverity'] = 0; $settings['reports']['checkstyle'] = null; + $this->wrapper->setValues($settings); ob_start(); @@ -115,14 +99,4 @@ function ($item) { 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 fb096ac48dd35..66a60989ba227 100644 --- a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CopyPasteDetector.php +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CopyPasteDetector.php @@ -8,14 +8,23 @@ */ namespace Magento\TestFramework\CodingStandard\Tool; -class CopyPasteDetector implements \Magento\TestFramework\CodingStandard\ToolInterface +use Magento\TestFramework\CodingStandard\ToolInterface; + +class CopyPasteDetector implements ToolInterface, BlacklistInterface { /** * Report file * * @var string */ - protected $_reportFile; + private $reportFile; + + /** + * List of paths to be excluded from tool run + * + * @var array + */ + private $blacklist; /** * Constructor @@ -24,7 +33,15 @@ class CopyPasteDetector implements \Magento\TestFramework\CodingStandard\ToolInt */ public function __construct($reportFile) { - $this->_reportFile = $reportFile; + $this->reportFile = $reportFile; + } + + /** + * {@inheritdoc} + */ + public function setBlackList(array $blackList) + { + $this->blacklist = $blackList; } /** @@ -44,17 +61,14 @@ public function canRun() * Run tool for files specified * * @param array $whiteList Files/directories to be inspected - * @param array $blackList Files/directories to be excluded from the inspection - * @param array $extensions Array of alphanumeric strings, for example: 'php', 'xml', 'phtml', 'css'... + * @return int * * @SuppressWarnings(PHPMD.UnusedLocalVariable) - * - * @return int */ - public function run(array $whiteList, array $blackList = [], array $extensions = []) + public function run(array $whiteList) { $blackListStr = ' '; - foreach ($blackList as $file) { + foreach ($this->blacklist as $file) { $file = escapeshellarg(trim($file)); if (!$file) { continue; @@ -63,8 +77,8 @@ public function run(array $whiteList, array $blackList = [], array $extensions = } $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 0000000000000..08b405ab3d781 --- /dev/null +++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/ExtensionInterface.php @@ -0,0 +1,19 @@ +_tool->run($whiteList, $blackList, $extensions); } - - public function testGetReportFile() - { - $this->assertEquals(self::REPORT_FILE, $this->_tool->getReportFile()); - } } diff --git a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php index 65dc86503fe12..cf45282b97a26 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php @@ -28,16 +28,6 @@ class LiveCodeTest extends PHPUnit_Framework_TestCase */ protected static $pathToSource = ''; - /** - * @var array - */ - protected static $whiteList = []; - - /** - * @var array - */ - protected static $blackList = []; - /** * Setup basics for all tests * @@ -50,22 +40,39 @@ public static function setUpBeforeClass() if (!is_dir(self::$reportDir)) { mkdir(self::$reportDir, 0777); } - self::setupFileLists(); } /** - * Helper method to setup the black and white lists + * Returns whitelist based on blacklist and git changed files * - * @param string $type - * @return void + * @param array $fileTypes + * @return array */ - public static function setupFileLists($type = '') + public static function getWhitelist($fileTypes = ['php']) { - if ($type != '' && !preg_match('/\/$/', $type)) { - $type = $type . '/'; + $directoriesToCheck = file(__DIR__ . '/_files/whitelist/whitelist.txt', FILE_IGNORE_NEW_LINES); + + $changedFiles = array_filter( + Utility\Files::readLists(__DIR__ . '/_files/changed_files.txt'), + function ($path) use ($directoriesToCheck) { + foreach ($directoriesToCheck as $directory) { + if (strpos($path, BP . '/' . $directory) === 0) { + return true; + } + } + return false; + } + ); + if (!empty($fileTypes)) { + $changedFiles = array_filter( + $changedFiles, + function ($path) use ($fileTypes) { + return in_array(pathinfo($path, PATHINFO_EXTENSION), $fileTypes); + } + ); } - self::$whiteList = Utility\Files::readLists(__DIR__ . '/_files/' . $type . 'whitelist/*.txt'); - self::$blackList = Utility\Files::readLists(__DIR__ . '/_files/' . $type . 'blacklist/*.txt'); + + return $changedFiles; } /** @@ -82,15 +89,12 @@ public function testCodeStylePsr2() if (!$codeSniffer->canRun()) { $this->markTestSkipped('PHP Code Sniffer is not installed.'); } - if (version_compare($codeSniffer->version(), '1.4.7') === -1) { + if (version_compare($wrapper->version(), '1.4.7') === -1) { $this->markTestSkipped('PHP Code Sniffer Build Too Old.'); } - self::setupFileLists('phpcs'); - $result = $codeSniffer->run(self::$whiteList, self::$blackList, ['php']); - $this->assertFileExists( - $reportFile, - 'Expected ' . $reportFile . ' to be created by phpcs run with PSR2 standard' - ); + + $result = $codeSniffer->run(self::getWhitelist()); + $this->assertEquals( 0, $result, @@ -111,8 +115,8 @@ public function testCodeStyle() if (!$codeSniffer->canRun()) { $this->markTestSkipped('PHP Code Sniffer is not installed.'); } - self::setupFileLists(); - $result = $codeSniffer->run(self::$whiteList, self::$blackList, ['php', 'phtml']); + $codeSniffer->setExtensions(['php', 'phtml']); + $result = $codeSniffer->run(self::getWhitelist(['php', 'phtml'])); $this->assertEquals( 0, $result, @@ -138,12 +142,11 @@ public function testAnnotationStandard() if (!$codeSniffer->canRun()) { $this->markTestSkipped('PHP Code Sniffer is not installed.'); } - self::setupFileLists('phpcs'); - $severity = 0; // Change to 5 to see the warnings + $result = $codeSniffer->run(self::getWhitelist(['php'])); $this->assertEquals( 0, - $result = $codeSniffer->run(self::$whiteList, self::$blackList, ['php'], $severity), + $result, "PHP Code Sniffer has found {$result} error(s): See detailed report in {$reportFile}" ); } @@ -157,12 +160,7 @@ public function testAnnotationStandard() */ public function testCodeMess($whiteList) { - if (count($whiteList) == 1) { - $formattedPath = preg_replace('~/~', '_', preg_replace('~' . self::$pathToSource . '~', '', $whiteList[0])); - } else { - $formattedPath = '_app_lib'; - } - $reportFile = self::$reportDir . '/phpmd_report' . $formattedPath . '.xml'; + $reportFile = self::$reportDir . '/phpmd_report.xml'; $codeMessDetector = new CodeMessDetector(realpath(__DIR__ . '/_files/phpmd/ruleset.xml'), $reportFile); if (!$codeMessDetector->canRun()) { @@ -171,39 +169,14 @@ public function testCodeMess($whiteList) $this->assertEquals( PHP_PMD_TextUI_Command::EXIT_SUCCESS, - $codeMessDetector->run($whiteList, self::$blackList), + $codeMessDetector->run(self::getWhitelist(['php'])), "PHP Code Mess has found error(s): See detailed report in {$reportFile}" ); // delete empty reports - unlink($reportFile); - } - - /** - * To improve the test execution performance the whitelist is split into smaller parts: - * - in case of dev code (tests, tools, etc) each whitelist entry is fed separately to phpmd - * - app/lib code is still being executed within a single whitelist to make sure that all design - * metrics (depth of inheritance, number of children, etc.) are being calculated in a correct way. - * @return array - */ - public function whiteListDataProvider() - { - $whiteList = []; - $testCodePattern = '~' . self::$pathToSource . '/dev/~'; - $nonTestCode = []; - - self::setupFileLists(); - - foreach (self::$whiteList as $path) { - if (!preg_match($testCodePattern, $path)) { - $nonTestCode[] = $path; - } else { - $whiteList[] = [[$path]]; - } + if (file_exists($reportFile)) { + unlink($reportFile); } - $whiteList[] = [$nonTestCode]; - - return $whiteList; } /** @@ -220,14 +193,15 @@ public function testCopyPaste() $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 8b0e96b4500ba..0000000000000 --- 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 b08055eedb4f7..0000000000000 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt +++ /dev/null @@ -1,41 +0,0 @@ -# Files or directories that are excluded from static code analysis for any reason -# Glob patterns are supported -# Overrides the white list -# -# Formatter introduces long line -app/bootstrap.php -# Formatter introduces long line -app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/NewCategory.php -# Formatter introduces long line -app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php -# Formatter introduces long line -app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php -# Formatter introduces long line -app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php -# Formatter introduces long line -app/code/Magento/Catalog/Block/Adminhtml/Product/Options/Ajax.php -# Formatter introduces long line -app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Design.php -# Formatter introduces long line -app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php -# Formatter introduces long line -app/code/Magento/Backend/Block/System/Store/Edit.php -# Not magento code -dev/tools/layout -# PSR-1 not applied to -dev/tests/js -# Example files that are expected to fail code sniffer -dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input -# Example files that are expected to fail code mess detector -dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input -# __ method for Translate cannot be in camelCase -lib/internal/Magento/Framework/Translate/Adapter.php -# __ method for Translate cannot be in camelCase -lib/internal/Magento/Framework/Translate/AdapterInterface.php -# PSR-1 not applied to -dev/tests/integration/testsuite/Magento -# PSR-1 not applied to -dev/tests/unit/testsuite/Magento -# Newer version of phpcs does not complain about spacing issue. This appears to be a bug in the phpcs version that is currently run in bamboo. -app/code/Magento/Sales/Model/Order/Payment/Transaction.php -vendor diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/whitelist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/whitelist/common.txt deleted file mode 100644 index bd9a1028a5ede..0000000000000 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/whitelist/common.txt +++ /dev/null @@ -1,8 +0,0 @@ -# Files or directories that are included into php code sniffer analysis -# Glob patterns are supported -# -app -dev -index.php -lib/internal/Magento -pub diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt index 1d53a63755720..7f4e36bbdbb41 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt @@ -1,148 +1,9 @@ -# Files or directories that are included into static code analysis -# Glob patterns are supported -# -app/bootstrap.php -app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php -app/code/Magento/Backend/Block/System/Store/Edit -app/code/Magento/Backend/Block/System/Store/Edit.php -app/code/Magento/Backend/Model/Observer.php -app/code/Magento/Bundle/Model/Plugin -app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/NewCategory.php -app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php -app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Popup/Grid.php -app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php -app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php -app/code/Magento/Catalog/Block/Adminhtml/Product/Options/Ajax.php -app/code/Magento/Catalog/Block/Product/TemplateSelector.php -app/code/Magento/Catalog/Block/Product/View/BaseImage.php -app/code/Magento/Catalog/Block/Product/View/Gallery.php -app/code/Magento/Catalog/Block/Product/View/Tabs.php -app/code/Magento/Catalog/Model/Attribute/Config -app/code/Magento/Catalog/Model/Attribute/Config.php -app/code/Magento/Catalog/Model/Resource/Category/Collection -app/code/Magento/Catalog/Model/Product/Type.php -app/code/Magento/Catalog/Model/ProductOptions -app/code/Magento/Catalog/Model/ProductTypes -app/code/Magento/Catalog/Model/Plugin -app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php -app/code/Magento/Centinel/Model/State/Jcb.php -app/code/Magento/Checkout/Block/Cart/Link.php -app/code/Magento/Checkout/Block/Link.php -app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Design.php -app/code/Magento/Cms/Controller/Router.php -app/code/Magento/Cms/Model/Template/FilterProvider.php -app/code/Magento/ConfigurableImportExport -app/code/Magento/ConfigurableProduct -app/code/Magento/Core/data -app/code/Magento/Core/Model/Design.php -app/code/Magento/Core/Model/Layout/Update.php -app/code/Magento/Core/Model/Resource/Theme -app/code/Magento/Core/Model/Resource/Theme.php -app/code/Magento/Core/Model/Theme -app/code/Magento/Core/Model/Theme.php -app/code/Magento/Core/Model/Url/SecurityInfo.php -app/code/Magento/Cron/Model/Config/Converter -app/code/Magento/Cron/Model/Config/Reader -app/code/Magento/Cron/Model/Config/Data.php -app/code/Magento/Cron/Model/Config/SchemaLocator.php -app/code/Magento/Cron/Model/Config.php -app/code/Magento/Cron/Model/ConfigInterface.php -app/code/Magento/Directory/Helper -app/code/Magento/Customer/Block -app/code/Magento/Customer/Controller -app/code/Magento/Customer/Helper -app/code/Magento/Customer/Model/Visitor.php -app/code/Magento/Customer/Model/Resource/Visitor.php -app/code/Magento/Customer/Model/Address/Config -app/code/Magento/Customer/Model/Address/Config.php -app/code/Magento/CustomerImportExport/Model/Import/CustomerComposite.php -app/code/Magento/CustomerImportExport/Model/Resource/Import/Customer/Storage.php -app/code/Magento/CustomerImportExport/Model/Resource/Import/CustomerComposite/Data.php -app/code/Magento/Directory/Model/Currency/DefaultLocator.php -app/code/Magento/Directory/Model/Resource/Region -app/code/Magento/Eav/Model/Cache/Type.php -app/code/Magento/GiftMessage/Model/Plugin -app/code/Magento/GiftMessage/Model/Type/Plugin -app/code/Magento/GiftMessage/Service -app/code/Magento/GoogleShopping/Block/SiteVerification.php -app/code/Magento/GoogleShopping/Model/AttributeFactory.php -app/code/Magento/GroupedImportExport -app/code/Magento/Eav/Model/Entity/Attribute/Config -app/code/Magento/Eav/Model/Entity/Attribute/Config.php -app/code/Magento/Email -app/code/Magento/ImportExport/Model/Export/Config -app/code/Magento/ImportExport/Model/Export/Config.php -app/code/Magento/ImportExport/Model/Export/ConfigInterface.php -app/code/Magento/ImportExport/Model/Import/Config -app/code/Magento/ImportExport/Model/Import/Config.php -app/code/Magento/ImportExport/Model/Import/ConfigInterface.php -app/code/Magento/ImportExport/Controller/Adminhtml/Import.php -app/code/Magento/Integration -app/code/Magento/Log/Model/Resource/Helper.php -app/code/Magento/Log/Model/Resource/Shell.php -app/code/Magento/Log/Model/Shell.php -app/code/Magento/Log/Model/Shell -app/code/Magento/Msrp -app/code/Magento/ProductAlert/Block/Product/View -app/code/Magento/Reports/Block/Adminhtml/Customer -app/code/Magento/Reports/Block/Adminhtml/Product -app/code/Magento/Reports/Controller/Adminhtml/Report/Customer.php -app/code/Magento/Reports/Controller/Adminhtml/Report/Product.php -app/code/Magento/Reports/Model/Plugin -app/code/Magento/Reports/Model/Resource/Accounts -app/code/Magento/Reports/Model/Resource/Customer -app/code/Magento/Reports/Model/Resource/Report/Collection.php -app/code/Magento/Sales/Block/Guest/Link.php -app/code/Magento/Sales/Block/Order/Link.php -app/code/Magento/Sales/Block/Order/Info/Buttons/Rss.php -app/code/Magento/Sales/Block/Adminhtml/Order/Details.php -app/code/Magento/Sales/Model/Order/Pdf/Config -app/code/Magento/Sales/Model/Order/Pdf/Config.php -app/code/Magento/Sales/Model/Order/Pdf/Total/Factory.php -app/code/Magento/Sales/Model/Observer -app/code/Magento/Sales/Model/Quote/Address/*Interface.php -app/code/Magento/Sales/Model/Quote/Address/*Interface.php -app/code/Magento/Sales/Model/Resource/Order/Rss/OrderStatus.php -app/code/Magento/Sales/Model/Rss/NewOrder.php -app/code/Magento/Sales/Model/Rss/OrderStatus.php -app/code/Magento/SalesRule/Model/Plugin -app/code/Magento/Sendfriend/Block/Plugin/Catalog/Product/View.php -app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking/Invoice.php -app/code/Magento/Shipping/Model/Observer.php -app/code/Magento/Shipping/Model/Order/Track.php -app/code/Magento/Shipping/Model/CarrierFactory.php -app/code/Magento/Shipping/Model/Resource/Order -app/code/Magento/Theme -app/code/Magento/Webapi -app/code/Magento/GroupedProduct -app/code/Magento/Rss -app/code/Magento/CatalogUrlRewrite -app/code/Magento/CmsUrlRewrite -app/code/Magento/UrlRewrite -app/code/Magento/Wishlist/Block/Link.php -app/code/Magento/Wishlist/Block/Rss -app/code/Magento/Wishlist/Model/Rss/Wishlist.php -dev/shell +app/code/Magento +lib/internal/Magento/Framework +dev/tools/Magento +dev/tests/api-functional dev/tests/functional -dev/tests/integration/* -dev/tests/js +dev/tests/integration dev/tests/performance dev/tests/static -dev/tests/unit/framework -dev/tests/unit/testsuite/Magento/* -dev/tools -lib/internal/Magento/Framework/App -lib/internal/Magento/Framework/Backup/Db -lib/internal/Magento/Framework/Backup/Factory.php -lib/internal/Magento/Framework/Cache/Core.php -lib/internal/Magento/Framework/Convert -lib/internal/Magento/Framework/Exception -lib/internal/Magento/Framework/Stdlib/DateTime.php -lib/internal/Magento/Framework/Object.php -lib/internal/Magento/Framework/Data/Argument -lib/internal/Magento/Framework/ObjectManager -lib/internal/Magento/Framework/Api -lib/internal/Magento/Framework/Url/SecurityInfoInterface.php -lib/internal/Magento/Framework/View -lib/internal/Magento/Framework/Locale/Validator.php -lib/internal/Magento/Framework/Notification +dev/tests/unit \ No newline at end of file From 238860fe779434a07de63c141d673e204c6fafb8 Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin Date: Fri, 9 Jan 2015 18:34:25 +0200 Subject: [PATCH 06/24] MAGETWO-31575: Remove black/white lists from file system and builds configuration - make tests to work with several files with changes --- .../TestFramework/Utility/ChangedFiles.php | 9 +++++++- .../Magento/Test/Legacy/ObsoleteCodeTest.php | 2 +- .../Magento/Test/Php/LiveCodeTest.php | 23 +++++++++++-------- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php b/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php index 12f30777c889e..2bb78abdba798 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php +++ b/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php @@ -5,6 +5,8 @@ namespace Magento\TestFramework\Utility; +use Magento\Framework\Test\Utility\Files; + /** * A helper to gather various changed files * if INCREMENTAL_BUILD env variable is set by CI build infrastructure, only files changed in the @@ -23,7 +25,12 @@ 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); + try { + $phpFiles = Files::readLists($changedFilesList); + } catch (\Exception $e){ + $phpFiles = []; + } + foreach ($phpFiles as $key => $phpFile) { $phpFiles[$key] = $fileHelper->getPathToSource() . '/' . $phpFile; } diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php index d70d167aec5ea..5409481f3bd89 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php @@ -129,7 +129,7 @@ function ($file) { $this->_testObsoleteConstants($content); $this->_testObsoletePropertySkipCalculate($content); }, - \Magento\TestFramework\Utility\ChangedFiles::getPhpFiles(__DIR__ . '/_files/changed_files.txt') + \Magento\TestFramework\Utility\ChangedFiles::getPhpFiles(__DIR__ . '/_files/changed_files') ); } diff --git a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php index cf45282b97a26..bdace23da6a91 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php @@ -52,17 +52,22 @@ public static function getWhitelist($fileTypes = ['php']) { $directoriesToCheck = file(__DIR__ . '/_files/whitelist/whitelist.txt', FILE_IGNORE_NEW_LINES); - $changedFiles = array_filter( - Utility\Files::readLists(__DIR__ . '/_files/changed_files.txt'), - function ($path) use ($directoriesToCheck) { - foreach ($directoriesToCheck as $directory) { - if (strpos($path, BP . '/' . $directory) === 0) { - return true; + try { + $changedFiles = array_filter( + Utility\Files::readLists(__DIR__ . '/_files/changed_files'), + function ($path) use ($directoriesToCheck) { + foreach ($directoriesToCheck as $directory) { + if (strpos($path, BP . '/' . $directory) === 0) { + return true; + } } + return false; } - return false; - } - ); + ); + } catch (\Exception $e) { + $changedFiles = []; + } + if (!empty($fileTypes)) { $changedFiles = array_filter( $changedFiles, From 67adf6bde988192d1828668b410e037d6c161b2b Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin Date: Fri, 9 Jan 2015 18:38:57 +0200 Subject: [PATCH 07/24] MAGETWO-31575: Remove black/white lists from file system and builds configuration - added whitelist --- dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php index bdace23da6a91..42bf38ba1c057 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php @@ -50,7 +50,7 @@ public static function setUpBeforeClass() */ public static function getWhitelist($fileTypes = ['php']) { - $directoriesToCheck = file(__DIR__ . '/_files/whitelist/whitelist.txt', FILE_IGNORE_NEW_LINES); + $directoriesToCheck = file(__DIR__ . '/_files/whitelist/common.txt', FILE_IGNORE_NEW_LINES); try { $changedFiles = array_filter( From fc0095909cc60285af2ba08318316b1322360bb3 Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin Date: Fri, 9 Jan 2015 18:44:05 +0200 Subject: [PATCH 08/24] MAGETWO-31575: Remove black/white lists from file system and builds configuration - removed dataprovider --- dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php index 42bf38ba1c057..7638669ece104 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php @@ -159,11 +159,9 @@ public function testAnnotationStandard() /** * Run mess detector on code * - * @param array $whiteList * @return void - * @dataProvider whiteListDataProvider */ - public function testCodeMess($whiteList) + public function testCodeMess() { $reportFile = self::$reportDir . '/phpmd_report.xml'; $codeMessDetector = new CodeMessDetector(realpath(__DIR__ . '/_files/phpmd/ruleset.xml'), $reportFile); From b1a682dd8c5ce32d3166f21966b04181fdced670 Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin Date: Tue, 13 Jan 2015 17:20:49 +0200 Subject: [PATCH 09/24] MAGETWO-31575: Remove black/white lists from file system and builds configuration - ObsoleteCodeTest and LiveCodeTest optimized --- .../TestFramework/Utility/ChangedFiles.php | 17 +++++--------- .../Magento/Test/Legacy/ObsoleteCodeTest.php | 2 +- .../Magento/Test/Php/LiveCodeTest.php | 22 ++++++++----------- .../Magento/Framework/Test/Utility/Files.php | 2 +- 4 files changed, 16 insertions(+), 27 deletions(-) diff --git a/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php b/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php index 2bb78abdba798..c2e1b911fa499 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php +++ b/dev/tests/static/framework/Magento/TestFramework/Utility/ChangedFiles.php @@ -23,21 +23,14 @@ class ChangedFiles public static function getPhpFiles($changedFilesList) { $fileHelper = \Magento\Framework\Test\Utility\Files::init(); - $allPhpFiles = $fileHelper->getPhpFiles(); if (isset($_ENV['INCREMENTAL_BUILD'])) { - try { - $phpFiles = Files::readLists($changedFilesList); - } catch (\Exception $e){ - $phpFiles = []; + $phpFiles = Files::readLists($changedFilesList); + if (!empty($phpFiles)) { + $phpFiles = \Magento\Framework\Test\Utility\Files::composeDataSets($phpFiles); + $phpFiles = array_intersect_key($phpFiles, $fileHelper->getPhpFiles()); } - - foreach ($phpFiles as $key => $phpFile) { - $phpFiles[$key] = $fileHelper->getPathToSource() . '/' . $phpFile; - } - $phpFiles = \Magento\Framework\Test\Utility\Files::composeDataSets($phpFiles); - $phpFiles = array_intersect_key($phpFiles, $allPhpFiles); } else { - $phpFiles = $allPhpFiles; + $phpFiles = $fileHelper->getPhpFiles(); } return $phpFiles; diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php index 5409481f3bd89..6ea7b09b0ecdd 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php @@ -129,7 +129,7 @@ function ($file) { $this->_testObsoleteConstants($content); $this->_testObsoletePropertySkipCalculate($content); }, - \Magento\TestFramework\Utility\ChangedFiles::getPhpFiles(__DIR__ . '/_files/changed_files') + \Magento\TestFramework\Utility\ChangedFiles::getPhpFiles(__DIR__ . '/_files/changed_files*') ); } diff --git a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php index 7638669ece104..e87c0716f8843 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php @@ -52,21 +52,17 @@ public static function getWhitelist($fileTypes = ['php']) { $directoriesToCheck = file(__DIR__ . '/_files/whitelist/common.txt', FILE_IGNORE_NEW_LINES); - try { - $changedFiles = array_filter( - Utility\Files::readLists(__DIR__ . '/_files/changed_files'), - function ($path) use ($directoriesToCheck) { - foreach ($directoriesToCheck as $directory) { - if (strpos($path, BP . '/' . $directory) === 0) { - return true; - } + $changedFiles = array_filter( + Utility\Files::readLists(__DIR__ . '/_files/changed_files*'), + function ($path) use ($directoriesToCheck) { + foreach ($directoriesToCheck as $directory) { + if (strpos($path, BP . '/' . $directory) === 0) { + return true; } - return false; } - ); - } catch (\Exception $e) { - $changedFiles = []; - } + return false; + } + ); if (!empty($fileTypes)) { $changedFiles = array_filter( diff --git a/lib/internal/Magento/Framework/Test/Utility/Files.php b/lib/internal/Magento/Framework/Test/Utility/Files.php index becc11b1899f2..3f485a91abb10 100644 --- a/lib/internal/Magento/Framework/Test/Utility/Files.php +++ b/lib/internal/Magento/Framework/Test/Utility/Files.php @@ -1068,7 +1068,7 @@ public static function readLists($globPattern) */ $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); } From 004c9bb917b250ae2d6515ec3b96d4099b6f9c2e Mon Sep 17 00:00:00 2001 From: Dmytro Kvashnin Date: Wed, 14 Jan 2015 14:46:18 +0200 Subject: [PATCH 10/24] MAGETWO-31575: Remove black/white lists from file system and builds configuration - ignore coding standards added to files with defects --- .../AdminNotification/Block/Grid/Renderer/Actions.php | 3 +++ app/code/Magento/AdminNotification/Block/ToolbarEntry.php | 3 +++ .../AdminNotification/Model/Resource/Grid/Collection.php | 2 ++ .../AdminNotification/Model/System/Message/Baseurl.php | 3 +++ .../Model/System/Message/Media/Synchronization/Error.php | 3 +++ .../AdminNotification/Model/System/Message/Security.php | 3 +++ .../view/adminhtml/templates/notification/window.phtml | 3 +++ .../view/adminhtml/templates/system/messages.phtml | 3 +++ .../view/adminhtml/templates/system/messages/popup.phtml | 3 +++ .../view/adminhtml/templates/toolbar_entry.phtml | 3 +++ app/code/Magento/Authorization/Model/Resource/Rules.php | 3 +++ app/code/Magento/Backend/App/Config.php | 3 +++ app/code/Magento/Backend/Block/Dashboard.php | 3 +++ .../Magento/Backend/Block/Dashboard/AbstractDashboard.php | 3 +++ app/code/Magento/Backend/Block/Menu.php | 3 +++ app/code/Magento/Backend/Block/Page/Header.php | 3 +++ app/code/Magento/Backend/Block/Page/Notices.php | 2 ++ .../Backend/Block/Page/System/Config/Robots/Reset.php | 3 +++ .../Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php | 3 +++ app/code/Magento/Backend/Block/System/Config/Form/Field.php | 2 ++ .../Config/Form/Field/FieldArray/AbstractFieldArray.php | 3 +++ .../Block/System/Config/Form/Field/Select/Allowspecific.php | 2 ++ .../Magento/Backend/Block/System/Design/Edit/Tab/General.php | 3 +++ .../Magento/Backend/Block/Widget/Form/Element/Gallery.php | 3 +++ .../Magento/Backend/Block/Widget/Form/Renderer/Element.php | 3 +++ .../Magento/Backend/Block/Widget/Form/Renderer/Fieldset.php | 3 +++ .../Backend/Block/Widget/Form/Renderer/Fieldset/Element.php | 3 +++ app/code/Magento/Backend/Block/Widget/Grid.php | 3 +++ .../Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php | 3 +++ .../Backend/Block/Widget/Grid/Column/Filter/Datetime.php | 3 +++ .../Backend/Block/Widget/Grid/Column/Renderer/Action.php | 3 +++ .../Backend/Block/Widget/Grid/Column/Renderer/Currency.php | 3 +++ app/code/Magento/Backend/Block/Widget/Grid/Export.php | 3 +++ .../Magento/Backend/Controller/Adminhtml/System/Store.php | 3 +++ .../Magento/Backend/Model/Config/Backend/Currency/Base.php | 2 ++ .../Magento/Backend/Model/Config/Backend/Email/Sender.php | 2 ++ app/code/Magento/Backend/Model/Config/Backend/Encrypted.php | 3 +++ .../Magento/Backend/Model/Config/Source/Dev/Dbautoup.php | 3 +++ .../Magento/Backend/Model/Config/Structure/Element/Group.php | 3 +++ app/code/Magento/Backend/Model/Menu/Director/Director.php | 3 +++ app/code/Magento/Backend/Model/Menu/Item.php | 3 +++ .../Magento/Backend/Model/Widget/Grid/AbstractTotals.php | 3 +++ .../view/adminhtml/templates/admin/access_denied.phtml | 3 +++ .../Backend/view/adminhtml/templates/admin/login.phtml | 3 +++ .../view/adminhtml/templates/admin/overlay_popup.phtml | 3 +++ .../Backend/view/adminhtml/templates/admin/page.phtml | 3 +++ .../Backend/view/adminhtml/templates/dashboard/graph.phtml | 3 +++ .../Backend/view/adminhtml/templates/dashboard/grid.phtml | 3 +++ .../Backend/view/adminhtml/templates/dashboard/index.phtml | 3 +++ .../Backend/view/adminhtml/templates/dashboard/salebar.phtml | 3 +++ .../view/adminhtml/templates/dashboard/searches.phtml | 3 +++ .../view/adminhtml/templates/dashboard/store/switcher.phtml | 3 +++ .../view/adminhtml/templates/dashboard/totalbar.phtml | 3 +++ app/code/Magento/Backend/view/adminhtml/templates/menu.phtml | 3 +++ .../Backend/view/adminhtml/templates/page/copyright.phtml | 3 +++ .../Backend/view/adminhtml/templates/page/footer.phtml | 3 +++ .../Backend/view/adminhtml/templates/page/header.phtml | 2 ++ .../view/adminhtml/templates/page/js/components.phtml | 3 +++ .../Backend/view/adminhtml/templates/page/js/translate.phtml | 3 +++ .../Backend/view/adminhtml/templates/page/locale.phtml | 3 +++ .../Backend/view/adminhtml/templates/page/notices.phtml | 3 +++ .../templates/page/system/config/robots/reset.phtml | 2 ++ .../Backend/view/adminhtml/templates/pageactions.phtml | 3 +++ .../Backend/view/adminhtml/templates/store/switcher.phtml | 3 +++ .../templates/store/switcher/form/renderer/fieldset.phtml | 3 +++ .../store/switcher/form/renderer/fieldset/element.phtml | 3 +++ .../view/adminhtml/templates/system/autocomplete.phtml | 3 +++ .../Backend/view/adminhtml/templates/system/cache/edit.phtml | 3 +++ .../view/adminhtml/templates/system/config/edit.phtml | 3 +++ .../adminhtml/templates/system/config/form/field/array.phtml | 3 +++ .../Backend/view/adminhtml/templates/system/config/js.phtml | 3 +++ .../view/adminhtml/templates/system/config/switcher.phtml | 3 +++ .../system/config/system/storage/media/synchronize.phtml | 3 +++ .../view/adminhtml/templates/system/config/tabs.phtml | 2 ++ .../view/adminhtml/templates/system/design/index.phtml | 3 +++ .../Backend/view/adminhtml/templates/system/search.phtml | 2 ++ .../Backend/view/adminhtml/templates/widget/accordion.phtml | 3 +++ .../view/adminhtml/templates/widget/breadcrumbs.phtml | 3 +++ .../Backend/view/adminhtml/templates/widget/button.phtml | 3 +++ .../view/adminhtml/templates/widget/button/split.phtml | 3 +++ .../Backend/view/adminhtml/templates/widget/form.phtml | 3 +++ .../view/adminhtml/templates/widget/form/container.phtml | 3 +++ .../view/adminhtml/templates/widget/form/element.phtml | 3 +++ .../adminhtml/templates/widget/form/element/gallery.phtml | 3 +++ .../adminhtml/templates/widget/form/renderer/element.phtml | 3 +++ .../adminhtml/templates/widget/form/renderer/fieldset.phtml | 3 +++ .../templates/widget/form/renderer/fieldset/element.phtml | 3 +++ .../Backend/view/adminhtml/templates/widget/grid.phtml | 3 +++ .../view/adminhtml/templates/widget/grid/column_set.phtml | 3 +++ .../view/adminhtml/templates/widget/grid/container.phtml | 3 +++ .../adminhtml/templates/widget/grid/container/empty.phtml | 3 +++ .../view/adminhtml/templates/widget/grid/export.phtml | 3 +++ .../view/adminhtml/templates/widget/grid/extended.phtml | 3 +++ .../view/adminhtml/templates/widget/grid/massaction.phtml | 3 +++ .../templates/widget/grid/massaction_extended.phtml | 3 +++ .../view/adminhtml/templates/widget/grid/serializer.phtml | 3 +++ .../Backend/view/adminhtml/templates/widget/tabs.phtml | 2 ++ .../Backend/view/adminhtml/templates/widget/tabshoriz.phtml | 3 +++ .../Backend/view/adminhtml/templates/widget/tabsleft.phtml | 3 +++ .../view/adminhtml/templates/widget/view/container.phtml | 3 +++ .../Backend/view/install/templates/page/copyright.phtml | 3 +++ app/code/Magento/Backup/Model/Resource/Helper.php | 3 +++ .../Backup/view/adminhtml/templates/backup/dialogs.phtml | 3 +++ .../Backup/view/adminhtml/templates/backup/list.phtml | 3 +++ .../Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php | 3 +++ .../Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php | 3 +++ app/code/Magento/Bundle/Model/Product/Type.php | 3 +++ .../Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php | 3 +++ .../product/composite/fieldset/options/bundle.phtml | 3 +++ .../product/composite/fieldset/options/type/checkbox.phtml | 2 ++ .../product/composite/fieldset/options/type/multi.phtml | 2 ++ .../product/composite/fieldset/options/type/radio.phtml | 2 ++ .../product/composite/fieldset/options/type/select.phtml | 2 ++ .../view/adminhtml/templates/product/edit/bundle.phtml | 2 ++ .../adminhtml/templates/product/edit/bundle/option.phtml | 2 ++ .../templates/product/edit/bundle/option/selection.phtml | 2 ++ .../templates/sales/creditmemo/create/items/renderer.phtml | 3 +++ .../templates/sales/creditmemo/view/items/renderer.phtml | 3 +++ .../templates/sales/invoice/create/items/renderer.phtml | 3 +++ .../templates/sales/invoice/view/items/renderer.phtml | 3 +++ .../templates/sales/order/view/items/renderer.phtml | 3 +++ .../templates/sales/shipment/create/items/renderer.phtml | 3 +++ .../templates/sales/shipment/view/items/renderer.phtml | 3 +++ .../view/base/templates/product/price/final_price.phtml | 3 +++ .../view/base/templates/product/price/selection/amount.phtml | 3 +++ .../view/base/templates/product/price/tier_prices.phtml | 3 +++ .../frontend/templates/catalog/product/view/customize.phtml | 3 +++ .../frontend/templates/catalog/product/view/summary.phtml | 3 +++ .../templates/catalog/product/view/type/bundle.phtml | 4 +++- .../catalog/product/view/type/bundle/option/checkbox.phtml | 3 +++ .../catalog/product/view/type/bundle/option/multi.phtml | 2 ++ .../catalog/product/view/type/bundle/option/radio.phtml | 2 ++ .../catalog/product/view/type/bundle/option/select.phtml | 3 +++ .../templates/catalog/product/view/type/bundle/options.phtml | 3 +++ .../templates/email/order/items/creditmemo/default.phtml | 3 +++ .../templates/email/order/items/invoice/default.phtml | 3 +++ .../frontend/templates/email/order/items/order/default.phtml | 3 +++ .../templates/email/order/items/shipment/default.phtml | 3 +++ .../Bundle/view/frontend/templates/js/components.phtml | 3 +++ .../templates/sales/order/creditmemo/items/renderer.phtml | 3 +++ .../templates/sales/order/invoice/items/renderer.phtml | 3 +++ .../view/frontend/templates/sales/order/items/renderer.phtml | 2 ++ .../templates/sales/order/shipment/items/renderer.phtml | 3 +++ app/code/Magento/Captcha/Model/Config/Form/AbstractForm.php | 2 ++ .../Magento/Captcha/view/adminhtml/templates/default.phtml | 3 +++ .../Magento/Captcha/view/frontend/templates/default.phtml | 3 +++ .../Captcha/view/frontend/templates/js/components.phtml | 3 +++ app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php | 2 ++ .../Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php | 2 ++ .../Product/Edit/Action/Attribute/Tab/Attributes.php | 2 ++ .../Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts.php | 2 ++ .../Block/Adminhtml/Product/Edit/Tab/Options/Option.php | 2 ++ .../Catalog/Block/Adminhtml/Product/Helper/Form/Category.php | 3 +++ .../Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php | 2 ++ app/code/Magento/Catalog/Block/Breadcrumbs.php | 2 ++ app/code/Magento/Catalog/Block/Navigation.php | 3 +++ .../Magento/Catalog/Block/Product/ProductList/Related.php | 3 +++ .../Magento/Catalog/Block/Product/ProductList/Upsell.php | 3 +++ .../Controller/Adminhtml/Product/Action/Attribute.php | 3 +++ .../Catalog/Controller/Adminhtml/Product/Attribute/Save.php | 3 +++ app/code/Magento/Catalog/Helper/Product/ProductList.php | 2 ++ app/code/Magento/Catalog/Helper/Product/View.php | 2 ++ app/code/Magento/Catalog/Model/Config.php | 3 +++ app/code/Magento/Catalog/Model/Factory.php | 2 ++ .../Catalog/Model/Indexer/Category/Flat/AbstractAction.php | 3 +++ .../Model/Indexer/Category/Product/AbstractAction.php | 3 +++ .../Model/Indexer/Category/Product/Plugin/IndexerState.php | 3 +++ .../Model/Indexer/Category/Product/Plugin/MviewState.php | 3 +++ .../Catalog/Model/Indexer/Product/Flat/Plugin/Store.php | 3 +++ .../Catalog/Model/Indexer/Product/Flat/Plugin/StoreGroup.php | 3 +++ .../Catalog/Model/Layer/Filter/Dynamic/AlgorithmFactory.php | 3 +++ app/code/Magento/Catalog/Model/Layer/Filter/Item.php | 2 ++ app/code/Magento/Catalog/Model/Layer/Filter/Price.php | 3 +++ app/code/Magento/Catalog/Model/Product/Action.php | 3 +++ .../Attribute/Backend/Groupprice/AbstractGroupprice.php | 3 +++ .../Magento/Catalog/Model/Product/Attribute/Backend/Sku.php | 2 ++ .../Catalog/Model/Product/Attribute/Source/Inputtype.php | 2 ++ app/code/Magento/Catalog/Model/Product/Media/Config.php | 3 +++ app/code/Magento/Catalog/Model/Product/Option.php | 3 +++ .../Catalog/Model/Product/Option/Type/DefaultType.php | 3 +++ app/code/Magento/Catalog/Model/Product/Option/Value.php | 3 +++ .../Magento/Catalog/Model/Product/TypeTransitionManager.php | 3 +++ app/code/Magento/Catalog/Model/Product/Website.php | 2 ++ app/code/Magento/Catalog/Model/Resource/AbstractResource.php | 3 +++ app/code/Magento/Catalog/Model/Resource/Eav/Attribute.php | 3 +++ .../Model/Resource/Product/Attribute/Backend/Media.php | 3 +++ .../Magento/Catalog/Model/Resource/Product/Collection.php | 3 +++ app/code/Magento/Catalog/Model/Template/Filter.php | 2 ++ app/code/Magento/Catalog/Model/Template/Filter/Factory.php | 2 ++ app/code/Magento/Catalog/Pricing/Price/TierPrice.php | 2 ++ .../Catalog/data/catalog_setup/data-install-2.0.0.php | 2 ++ .../templates/catalog/category/checkboxes/tree.phtml | 3 +++ .../view/adminhtml/templates/catalog/category/edit.phtml | 3 +++ .../adminhtml/templates/catalog/category/edit/form.phtml | 2 ++ .../view/adminhtml/templates/catalog/category/tree.phtml | 3 +++ .../adminhtml/templates/catalog/category/widget/tree.phtml | 3 +++ .../templates/catalog/form/renderer/fieldset/element.phtml | 3 +++ .../Catalog/view/adminhtml/templates/catalog/product.phtml | 3 +++ .../adminhtml/templates/catalog/product/attribute/form.phtml | 3 +++ .../adminhtml/templates/catalog/product/attribute/js.phtml | 3 +++ .../templates/catalog/product/attribute/labels.phtml | 3 +++ .../templates/catalog/product/attribute/options.phtml | 3 +++ .../templates/catalog/product/attribute/set/main.phtml | 3 +++ .../catalog/product/attribute/set/toolbar/main.phtml | 3 +++ .../templates/catalog/product/composite/configure.phtml | 3 +++ .../catalog/product/composite/fieldset/options.phtml | 3 +++ .../product/composite/fieldset/options/type/date.phtml | 3 +++ .../product/composite/fieldset/options/type/file.phtml | 3 +++ .../product/composite/fieldset/options/type/select.phtml | 3 +++ .../product/composite/fieldset/options/type/text.phtml | 3 +++ .../templates/catalog/product/composite/fieldset/qty.phtml | 3 +++ .../view/adminhtml/templates/catalog/product/edit.phtml | 3 +++ .../templates/catalog/product/edit/action/attribute.phtml | 3 +++ .../templates/catalog/product/edit/action/inventory.phtml | 3 +++ .../templates/catalog/product/edit/action/websites.phtml | 3 +++ .../templates/catalog/product/edit/attribute_set.phtml | 3 +++ .../adminhtml/templates/catalog/product/edit/options.phtml | 3 +++ .../templates/catalog/product/edit/options/option.phtml | 3 +++ .../templates/catalog/product/edit/options/type/date.phtml | 3 +++ .../templates/catalog/product/edit/options/type/file.phtml | 3 +++ .../templates/catalog/product/edit/options/type/select.phtml | 3 +++ .../templates/catalog/product/edit/options/type/text.phtml | 3 +++ .../templates/catalog/product/edit/price/group.phtml | 3 +++ .../templates/catalog/product/edit/price/tier.phtml | 3 +++ .../templates/catalog/product/edit/serializer.phtml | 3 +++ .../adminhtml/templates/catalog/product/edit/websites.phtml | 3 +++ .../adminhtml/templates/catalog/product/helper/gallery.phtml | 3 +++ .../view/adminhtml/templates/catalog/product/js.phtml | 2 ++ .../view/adminhtml/templates/catalog/product/tab/alert.phtml | 3 +++ .../adminhtml/templates/catalog/product/tab/inventory.phtml | 3 +++ .../view/adminhtml/templates/catalog/wysiwyg/js.phtml | 3 +++ .../adminhtml/templates/product/edit/attribute/search.phtml | 2 ++ .../Catalog/view/adminhtml/templates/product/edit/tabs.phtml | 2 ++ .../templates/product/grid/massaction_extended.phtml | 3 +++ .../Catalog/view/adminhtml/templates/rss/grid/link.phtml | 2 ++ .../view/base/templates/product/price/amount/default.phtml | 3 +++ .../view/base/templates/product/price/amount/option.phtml | 3 +++ .../Catalog/view/base/templates/product/price/default.phtml | 3 +++ .../view/base/templates/product/price/final_price.phtml | 3 +++ .../view/base/templates/product/price/tier_prices.phtml | 3 +++ .../Catalog/view/frontend/templates/category/cms.phtml | 3 +++ .../view/frontend/templates/category/description.phtml | 3 +++ .../Catalog/view/frontend/templates/category/image.phtml | 3 +++ .../Catalog/view/frontend/templates/category/products.phtml | 3 +++ .../Catalog/view/frontend/templates/category/rss.phtml | 3 +++ .../Catalog/view/frontend/templates/category/view.phtml | 3 +++ .../Catalog/view/frontend/templates/js/components.phtml | 3 +++ .../Catalog/view/frontend/templates/navigation/left.phtml | 2 ++ .../view/frontend/templates/product/compare/link.phtml | 3 +++ .../view/frontend/templates/product/compare/list.phtml | 3 +++ .../view/frontend/templates/product/compare/sidebar.phtml | 3 +++ .../Catalog/view/frontend/templates/product/gallery.phtml | 3 +++ .../Catalog/view/frontend/templates/product/list.phtml | 3 +++ .../Catalog/view/frontend/templates/product/list/items.phtml | 3 +++ .../view/frontend/templates/product/list/toolbar.phtml | 3 +++ .../frontend/templates/product/list/toolbar/amount.phtml | 3 +++ .../frontend/templates/product/list/toolbar/limiter.phtml | 3 +++ .../frontend/templates/product/list/toolbar/sorter.phtml | 3 +++ .../frontend/templates/product/list/toolbar/viewmode.phtml | 3 +++ .../Catalog/view/frontend/templates/product/listing.phtml | 3 +++ .../view/frontend/templates/product/view/additional.phtml | 3 +++ .../Catalog/view/frontend/templates/product/view/addto.phtml | 3 +++ .../view/frontend/templates/product/view/addtocart.phtml | 2 ++ .../view/frontend/templates/product/view/attribute.phtml | 2 ++ .../view/frontend/templates/product/view/attributes.phtml | 2 ++ .../view/frontend/templates/product/view/base-image.phtml | 2 ++ .../view/frontend/templates/product/view/description.phtml | 2 ++ .../view/frontend/templates/product/view/details.phtml | 3 +++ .../Catalog/view/frontend/templates/product/view/form.phtml | 2 ++ .../view/frontend/templates/product/view/mailto.phtml | 3 +++ .../frontend/templates/product/view/opengraph/general.phtml | 2 ++ .../view/frontend/templates/product/view/options.phtml | 3 +++ .../frontend/templates/product/view/options/type/date.phtml | 3 +++ .../templates/product/view/options/type/default.phtml | 3 +++ .../frontend/templates/product/view/options/type/file.phtml | 3 +++ .../templates/product/view/options/type/select.phtml | 3 +++ .../frontend/templates/product/view/options/type/text.phtml | 3 +++ .../view/frontend/templates/product/view/price_clone.phtml | 3 +++ .../view/frontend/templates/product/view/review.phtml | 3 +++ .../view/frontend/templates/product/view/type/default.phtml | 3 +++ .../product/widget/new/column/new_default_list.phtml | 3 +++ .../product/widget/new/column/new_images_list.phtml | 3 +++ .../templates/product/widget/new/column/new_names_list.phtml | 3 +++ .../templates/product/widget/new/content/new_grid.phtml | 3 +++ .../templates/product/widget/new/content/new_list.phtml | 3 +++ .../Magento/CatalogImportExport/Model/Import/Product.php | 3 +++ .../CatalogImportExport/Model/Import/Product/Option.php | 3 +++ .../Model/Indexer/Category/Product/Plugin/Import.php | 3 +++ .../Model/Indexer/Product/Category/Plugin/Import.php | 3 +++ .../Model/Resource/Stock/Item/StockItemCriteria.php | 3 +++ .../Model/Resource/Stock/Status/StockStatusCriteria.php | 3 +++ app/code/Magento/CatalogInventory/Model/StockIndex.php | 3 +++ .../Magento/CatalogInventory/Model/StockStateProvider.php | 3 +++ .../view/frontend/templates/qtyincrements.phtml | 2 ++ .../view/frontend/templates/stockqty/composite.phtml | 2 ++ .../view/frontend/templates/stockqty/default.phtml | 2 ++ .../CatalogRule/Controller/Adminhtml/Promo/Catalog.php | 2 ++ .../view/adminhtml/templates/promo/fieldset.phtml | 3 +++ .../CatalogRule/view/adminhtml/templates/promo/form.phtml | 3 +++ .../CatalogSearch/Model/Resource/Search/Collection.php | 3 +++ .../view/frontend/templates/advanced/form.phtml | 3 +++ .../view/frontend/templates/advanced/link.phtml | 3 +++ .../view/frontend/templates/advanced/result.phtml | 3 +++ .../CatalogSearch/view/frontend/templates/result.phtml | 3 +++ .../Magento/CatalogWidget/Block/Product/ProductsList.php | 3 +++ .../view/adminhtml/templates/product/widget/conditions.phtml | 3 +++ .../frontend/templates/product/widget/content/grid.phtml | 3 +++ app/code/Magento/Centinel/Model/Config.php | 2 ++ .../view/adminhtml/templates/authentication/complete.phtml | 3 +++ .../Centinel/view/adminhtml/templates/validation/form.phtml | 3 +++ .../Centinel/view/frontend/templates/authentication.phtml | 3 +++ .../view/frontend/templates/authentication/complete.phtml | 3 +++ app/code/Magento/Centinel/view/frontend/templates/logo.phtml | 3 +++ app/code/Magento/Checkout/Block/Cart/Item/Renderer.php | 3 +++ app/code/Magento/Checkout/Block/Cart/Sidebar.php | 3 +++ app/code/Magento/Checkout/Block/Cart/Sidebar/Totals.php | 3 +++ app/code/Magento/Checkout/Block/Onepage/Failure.php | 3 +++ app/code/Magento/Checkout/Block/Onepage/Progress.php | 3 +++ app/code/Magento/Checkout/Controller/Cart/Add.php | 3 +++ app/code/Magento/Checkout/Controller/Cart/Index.php | 3 +++ .../Magento/Checkout/Controller/Cart/UpdateItemOptions.php | 3 +++ app/code/Magento/Checkout/Controller/Cart/UpdatePost.php | 3 +++ app/code/Magento/Checkout/Helper/Cart.php | 3 +++ app/code/Magento/Checkout/Service/V1/Cart/WriteService.php | 2 ++ app/code/Magento/Checkout/Service/V1/Data/Cart.php | 3 +++ .../Checkout/Service/V1/PaymentMethod/WriteService.php | 3 +++ .../Service/V1/PaymentMethod/WriteServiceInterface.php | 3 +++ .../Checkout/Service/V1/ShippingMethod/ReadService.php | 2 ++ .../Checkout/Service/V1/ShippingMethod/WriteService.php | 3 +++ .../Service/V1/ShippingMethod/WriteServiceInterface.php | 3 +++ .../Magento/Checkout/view/frontend/templates/button.phtml | 3 +++ .../view/frontend/templates/cart/additional/info.phtml | 3 +++ .../Checkout/view/frontend/templates/cart/coupon.phtml | 3 +++ .../Magento/Checkout/view/frontend/templates/cart/form.phtml | 2 ++ .../frontend/templates/cart/item/configure/updatecart.phtml | 2 ++ .../Checkout/view/frontend/templates/cart/item/default.phtml | 2 ++ .../view/frontend/templates/cart/item/price/sidebar.phtml | 2 ++ .../Checkout/view/frontend/templates/cart/methods.phtml | 3 +++ .../Checkout/view/frontend/templates/cart/minicart.phtml | 2 ++ .../Checkout/view/frontend/templates/cart/shipping.phtml | 3 +++ .../view/frontend/templates/cart/sidebar/default.phtml | 3 +++ .../Checkout/view/frontend/templates/item/price/row.phtml | 2 ++ .../Checkout/view/frontend/templates/item/price/unit.phtml | 2 ++ .../Checkout/view/frontend/templates/js/components.phtml | 3 +++ .../Magento/Checkout/view/frontend/templates/onepage.phtml | 2 ++ .../Checkout/view/frontend/templates/onepage/billing.phtml | 3 +++ .../Checkout/view/frontend/templates/onepage/failure.phtml | 3 +++ .../Checkout/view/frontend/templates/onepage/link.phtml | 3 +++ .../Checkout/view/frontend/templates/onepage/login.phtml | 3 +++ .../Checkout/view/frontend/templates/onepage/payment.phtml | 3 +++ .../view/frontend/templates/onepage/payment/methods.phtml | 3 +++ .../Checkout/view/frontend/templates/onepage/progress.phtml | 3 +++ .../view/frontend/templates/onepage/review/info.phtml | 2 ++ .../view/frontend/templates/onepage/review/item.phtml | 2 ++ .../templates/onepage/review/item/price/row_excl_tax.phtml | 2 ++ .../templates/onepage/review/item/price/row_incl_tax.phtml | 2 ++ .../templates/onepage/review/item/price/unit_excl_tax.phtml | 2 ++ .../templates/onepage/review/item/price/unit_incl_tax.phtml | 2 ++ .../view/frontend/templates/onepage/review/totals.phtml | 2 ++ .../Checkout/view/frontend/templates/onepage/shipping.phtml | 3 +++ .../view/frontend/templates/onepage/shipping_method.phtml | 3 +++ .../templates/onepage/shipping_method/additional.phtml | 3 +++ .../templates/onepage/shipping_method/available.phtml | 3 +++ .../Checkout/view/frontend/templates/shipping/price.phtml | 3 +++ .../Magento/Checkout/view/frontend/templates/success.phtml | 3 +++ .../Checkout/view/frontend/templates/total/default.phtml | 3 +++ .../Checkout/view/frontend/templates/total/nominal.phtml | 2 ++ app/code/Magento/CheckoutAgreements/Block/Agreements.php | 3 +++ .../Magento/CheckoutAgreements/Model/Resource/Agreement.php | 3 +++ .../Model/Resource/Agreement/Collection.php | 3 +++ .../CheckoutAgreements/Service/V1/Agreement/ReadService.php | 3 +++ .../view/frontend/templates/agreements.phtml | 3 +++ .../view/frontend/templates/multishipping_agreements.phtml | 3 +++ app/code/Magento/Cms/Block/Block.php | 3 +++ app/code/Magento/Cms/Model/Resource/Page.php | 3 +++ .../Magento/Cms/Model/Wysiwyg/Images/Storage/Collection.php | 3 +++ app/code/Magento/Cms/data/cms_setup/data-install-2.0.0.php | 2 ++ .../Cms/view/adminhtml/templates/browser/content.phtml | 3 +++ .../Cms/view/adminhtml/templates/browser/content/files.phtml | 3 +++ .../view/adminhtml/templates/browser/content/uploader.phtml | 3 +++ .../Magento/Cms/view/adminhtml/templates/browser/tree.phtml | 3 +++ .../templates/page/edit/form/renderer/content.phtml | 3 +++ app/code/Magento/Cms/view/frontend/templates/content.phtml | 3 +++ app/code/Magento/Cms/view/frontend/templates/meta.phtml | 3 +++ .../templates/catalog/product/attribute/set/js.phtml | 3 +++ .../catalog/product/composite/fieldset/configurable.phtml | 3 +++ .../catalog/product/edit/super/attribute-js-template.phtml | 3 +++ .../catalog/product/edit/super/attribute-template.phtml | 3 +++ .../templates/catalog/product/edit/super/config.phtml | 3 +++ .../templates/catalog/product/edit/super/matrix.phtml | 3 +++ .../configurable/affected-attribute-set-selector/form.phtml | 2 ++ .../configurable/affected-attribute-set-selector/js.phtml | 3 +++ .../view/frontend/templates/js/components.phtml | 3 +++ .../templates/product/view/type/options/configurable.phtml | 3 +++ app/code/Magento/Contact/view/frontend/templates/form.phtml | 3 +++ app/code/Magento/Core/Model/Asset/Config.php | 3 +++ app/code/Magento/Core/Model/File/Storage.php | 3 +++ .../Magento/Core/Model/File/Storage/Directory/Database.php | 3 +++ .../Core/Model/File/Validator/NotProtectedExtension.php | 3 +++ app/code/Magento/Core/Model/Resource/Config.php | 3 +++ app/code/Magento/Core/Model/Resource/Design.php | 3 +++ app/code/Magento/Core/Model/Resource/Layout/Update.php | 3 +++ app/code/Magento/Core/Model/Resource/Variable.php | 3 +++ .../Core/Model/TemplateEngine/Decorator/DebugHints.php | 3 +++ .../Magento/Core/Model/TemplateEngine/Plugin/DebugHints.php | 3 +++ app/code/Magento/Core/Model/Url/RouteParamsResolver.php | 3 +++ app/code/Magento/Core/Model/Validator/Factory.php | 3 +++ app/code/Magento/Core/Model/Variable/Config.php | 2 ++ app/code/Magento/Core/view/frontend/templates/messages.phtml | 3 +++ .../Controller/Adminhtml/System/Currency/SaveRates.php | 3 +++ .../CurrencySymbol/view/adminhtml/templates/grid.phtml | 3 +++ .../adminhtml/templates/system/currency/rate/matrix.phtml | 3 +++ .../adminhtml/templates/system/currency/rate/services.phtml | 3 +++ .../view/adminhtml/templates/system/currency/rates.phtml | 3 +++ app/code/Magento/Customer/Model/Metadata/ElementFactory.php | 3 +++ .../Magento/Customer/Model/Metadata/Form/AbstractData.php | 3 +++ app/code/Magento/Customer/Model/Observer.php | 3 +++ .../Magento/Customer/view/adminhtml/templates/edit/js.phtml | 3 +++ .../templates/edit/tab/account/form/renderer/group.phtml | 3 +++ .../templates/edit/tab/account/form/renderer/sendemail.phtml | 3 +++ .../sales/order/create/address/form/renderer/vat.phtml | 3 +++ .../view/adminhtml/templates/system/config/validatevat.phtml | 3 +++ .../Customer/view/adminhtml/templates/tab/addresses.phtml | 3 +++ .../Magento/Customer/view/adminhtml/templates/tab/cart.phtml | 3 +++ .../Customer/view/adminhtml/templates/tab/newsletter.phtml | 3 +++ .../view/adminhtml/templates/tab/view/personal_info.phtml | 2 ++ .../Customer/view/adminhtml/templates/tab/view/sales.phtml | 3 +++ .../Customer/view/frontend/templates/account/customer.phtml | 5 ++++- .../view/frontend/templates/account/dashboard/address.phtml | 2 ++ .../view/frontend/templates/account/dashboard/info.phtml | 2 ++ .../Customer/view/frontend/templates/account/link/back.phtml | 3 +++ .../view/frontend/templates/additionalinfocustomer.phtml | 3 +++ .../Customer/view/frontend/templates/address/book.phtml | 3 +++ .../Customer/view/frontend/templates/address/edit.phtml | 3 +++ .../Customer/view/frontend/templates/form/confirmation.phtml | 3 +++ .../Magento/Customer/view/frontend/templates/form/edit.phtml | 2 ++ .../view/frontend/templates/form/forgotpassword.phtml | 3 +++ .../Customer/view/frontend/templates/form/login.phtml | 2 ++ .../Customer/view/frontend/templates/form/newsletter.phtml | 3 +++ .../Customer/view/frontend/templates/form/register.phtml | 3 +++ .../frontend/templates/form/resetforgottenpassword.phtml | 2 ++ .../Customer/view/frontend/templates/js/components.phtml | 3 +++ .../Customer/view/frontend/templates/newcustomer.phtml | 3 +++ .../Customer/view/frontend/templates/widget/dob.phtml | 2 ++ .../Customer/view/frontend/templates/widget/gender.phtml | 3 +++ .../Customer/view/frontend/templates/widget/name.phtml | 2 ++ .../Customer/view/frontend/templates/widget/taxvat.phtml | 3 +++ .../DesignEditor/Block/Adminhtml/Editor/Container.php | 3 +++ .../DesignEditor/Block/Adminhtml/Editor/Form/Renderer.php | 2 ++ .../Block/Adminhtml/Editor/Form/Renderer/LogoUploader.php | 3 +++ .../Adminhtml/System/Design/Editor/Tools/JsList.php | 3 +++ .../Model/Editor/Tools/QuickStyles/Form/Renderer/Factory.php | 3 +++ .../Model/Editor/Tools/QuickStyles/Renderer/Factory.php | 3 +++ .../view/adminhtml/templates/editor/container.phtml | 3 +++ .../templates/editor/form/renderer/color-picker.phtml | 3 +++ .../adminhtml/templates/editor/form/renderer/composite.phtml | 3 +++ .../templates/editor/form/renderer/composite/children.phtml | 3 +++ .../templates/editor/form/renderer/composite/wrapper.phtml | 3 +++ .../templates/editor/form/renderer/element/wrapper.phtml | 3 +++ .../templates/editor/form/renderer/logo-uploader.phtml | 3 +++ .../adminhtml/templates/editor/form/renderer/simple.phtml | 3 +++ .../adminhtml/templates/editor/form/renderer/template.phtml | 3 +++ .../view/adminhtml/templates/editor/toolbar/buttons.phtml | 3 +++ .../adminhtml/templates/editor/toolbar/buttons/edit.phtml | 3 +++ .../DesignEditor/view/adminhtml/templates/editor/tools.phtml | 3 +++ .../view/adminhtml/templates/editor/tools/block.phtml | 3 +++ .../view/adminhtml/templates/editor/tools/code/custom.phtml | 3 +++ .../view/adminhtml/templates/editor/tools/code/js.phtml | 3 +++ .../templates/editor/tools/files/content/files.phtml | 3 +++ .../view/adminhtml/templates/editor/tools/settings.phtml | 3 +++ .../view/adminhtml/templates/editor/tools/tabs.phtml | 3 +++ .../adminhtml/templates/editor/tools/tabs/super-handle.phtml | 3 +++ .../view/adminhtml/templates/theme/available.phtml | 3 +++ .../DesignEditor/view/adminhtml/templates/theme/button.phtml | 3 +++ .../view/adminhtml/templates/theme/customized.phtml | 3 +++ .../view/adminhtml/templates/theme/list/available.phtml | 3 +++ .../view/adminhtml/templates/theme/list/customized.phtml | 3 +++ .../adminhtml/templates/theme/selector/first_entrance.phtml | 3 +++ .../view/adminhtml/templates/theme/selector/storeview.phtml | 3 +++ .../view/adminhtml/templates/theme/selector/theme_edit.phtml | 3 +++ .../view/frontend/templates/translate_inline.phtml | 3 +++ app/code/Magento/Dhl/Block/Adminhtml/Unitofmeasure.php | 3 +++ app/code/Magento/Dhl/Model/Carrier.php | 3 +++ .../Dhl/Model/Plugin/Checkout/Block/Cart/Shipping.php | 3 +++ app/code/Magento/Directory/Model/Country.php | 2 ++ app/code/Magento/Directory/Model/Currency/Import/Factory.php | 3 +++ .../Magento/Directory/Model/Currency/Import/Webservicex.php | 2 ++ .../Magento/Directory/Model/Resource/Country/Collection.php | 2 ++ app/code/Magento/Directory/Model/Resource/Region.php | 2 ++ .../Magento/Directory/view/frontend/templates/currency.phtml | 3 +++ .../Directory/view/frontend/templates/currency/switch.phtml | 3 +++ .../Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php | 3 +++ .../Magento/Downloadable/Block/Catalog/Product/Samples.php | 3 +++ .../Downloadable/Block/Customer/Products/ListProducts.php | 3 +++ .../Block/Sales/Order/Email/Items/Downloadable.php | 3 +++ .../Block/Sales/Order/Email/Items/Order/Downloadable.php | 3 +++ .../Block/Sales/Order/Item/Renderer/Downloadable.php | 3 +++ .../Magento/Downloadable/Controller/Customer/Products.php | 3 +++ .../Downloadable/Helper/Catalog/Product/Configuration.php | 3 +++ app/code/Magento/Downloadable/Helper/Download.php | 3 +++ .../Model/Sales/Order/Pdf/Items/AbstractItems.php | 3 +++ .../templates/product/composite/fieldset/downloadable.phtml | 3 +++ .../view/adminhtml/templates/product/edit/downloadable.phtml | 3 +++ .../templates/product/edit/downloadable/links.phtml | 3 +++ .../templates/product/edit/downloadable/samples.phtml | 3 +++ .../sales/items/column/downloadable/creditmemo/name.phtml | 3 +++ .../sales/items/column/downloadable/invoice/name.phtml | 3 +++ .../templates/sales/items/column/downloadable/name.phtml | 3 +++ .../view/frontend/templates/catalog/product/links.phtml | 3 +++ .../view/frontend/templates/catalog/product/samples.phtml | 2 ++ .../view/frontend/templates/catalog/product/type.phtml | 2 ++ .../view/frontend/templates/checkout/cart/item/default.phtml | 3 +++ .../view/frontend/templates/checkout/links.phtml | 3 +++ .../view/frontend/templates/checkout/success.phtml | 3 +++ .../view/frontend/templates/customer/products/list.phtml | 3 +++ .../email/order/items/creditmemo/downloadable.phtml | 3 +++ .../templates/email/order/items/invoice/downloadable.phtml | 3 +++ .../templates/email/order/items/order/downloadable.phtml | 3 +++ .../Downloadable/view/frontend/templates/js/components.phtml | 3 +++ .../sales/order/creditmemo/items/renderer/downloadable.phtml | 2 ++ .../sales/order/invoice/items/renderer/downloadable.phtml | 2 ++ .../templates/sales/order/items/renderer/downloadable.phtml | 2 ++ .../Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php | 2 ++ app/code/Magento/Eav/Helper/Data.php | 3 +++ app/code/Magento/Eav/Model/Attribute.php | 2 ++ app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php | 3 +++ app/code/Magento/Eav/Model/AttributeDataFactory.php | 3 +++ app/code/Magento/Eav/Model/Entity/AbstractEntity.php | 3 +++ .../Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php | 3 +++ .../Magento/Eav/Model/Entity/Attribute/Frontend/Datetime.php | 3 +++ .../Email/view/adminhtml/templates/template/edit.phtml | 3 +++ .../Email/view/adminhtml/templates/template/list.phtml | 3 +++ app/code/Magento/Fedex/Model/Carrier.php | 3 +++ app/code/Magento/GiftMessage/Helper/Message.php | 3 +++ .../view/adminhtml/templates/giftoptionsform.phtml | 3 +++ .../Magento/GiftMessage/view/adminhtml/templates/popup.phtml | 3 +++ .../adminhtml/templates/sales/order/create/giftoptions.phtml | 3 +++ .../view/adminhtml/templates/sales/order/create/items.phtml | 3 +++ .../adminhtml/templates/sales/order/view/giftoptions.phtml | 3 +++ .../view/adminhtml/templates/sales/order/view/items.phtml | 3 +++ .../Magento/GiftMessage/view/frontend/templates/inline.phtml | 3 +++ app/code/Magento/GoogleAnalytics/Block/Ga.php | 3 +++ app/code/Magento/GoogleAnalytics/Helper/Data.php | 3 +++ .../Magento/GoogleAnalytics/view/frontend/templates/ga.phtml | 3 +++ app/code/Magento/GoogleOptimizer/Block/Code/Category.php | 3 +++ app/code/Magento/GoogleOptimizer/Block/Code/Product.php | 3 +++ app/code/Magento/GoogleOptimizer/Helper/Data.php | 3 +++ .../GoogleOptimizer/Model/Observer/Block/Category/Tab.php | 3 +++ .../Magento/GoogleShopping/Block/Adminhtml/Items/Item.php | 3 +++ .../Controller/Adminhtml/Googleshopping/Items/Index.php | 3 +++ .../Controller/Adminhtml/Googleshopping/Items/Refresh.php | 3 +++ app/code/Magento/GoogleShopping/Helper/Category.php | 3 +++ .../GoogleShopping/Model/Attribute/DefaultAttribute.php | 2 ++ app/code/Magento/GoogleShopping/Model/Attribute/Price.php | 3 +++ app/code/Magento/GoogleShopping/Model/Config.php | 3 +++ .../GoogleShopping/Model/Resource/Attribute/Collection.php | 3 +++ .../GoogleShopping/Model/Resource/Grid/Collection.php | 2 ++ app/code/Magento/GoogleShopping/Model/Service.php | 3 +++ .../GoogleShopping/Model/Source/Destinationstates.php | 3 +++ .../GoogleShopping/view/adminhtml/templates/captcha.phtml | 3 +++ .../GoogleShopping/view/adminhtml/templates/types/edit.phtml | 3 +++ .../view/adminhtml/templates/types/edit/attributes.phtml | 3 +++ .../view/adminhtml/templates/types/edit/select.phtml | 3 +++ .../catalog/product/composite/fieldset/grouped.phtml | 3 +++ .../view/adminhtml/templates/product/grouped/grouped.phtml | 2 ++ .../view/base/templates/product/price/final_price.phtml | 2 ++ .../view/frontend/templates/product/view/type/default.phtml | 3 +++ .../view/frontend/templates/product/view/type/grouped.phtml | 2 ++ app/code/Magento/ImportExport/Helper/Data.php | 3 +++ app/code/Magento/ImportExport/Model/Export.php | 3 +++ .../Magento/ImportExport/Model/Export/Entity/Factory.php | 2 ++ app/code/Magento/ImportExport/Model/Import.php | 3 +++ .../Magento/ImportExport/Model/Import/Entity/Factory.php | 2 ++ .../adminhtml/templates/integration/tokens_exchange.phtml | 3 +++ .../view/frontend/templates/layer/filter.phtml | 3 +++ .../view/frontend/templates/layer/state.phtml | 3 +++ .../view/frontend/templates/layer/view.phtml | 3 +++ app/code/Magento/Log/Model/Resource/Visitor/Online.php | 3 +++ .../Log/view/adminhtml/templates/customer/status.phtml | 2 ++ app/code/Magento/Log/view/adminhtml/templates/online.phtml | 3 +++ .../Msrp/view/base/templates/product/price/msrp.phtml | 2 ++ app/code/Magento/Msrp/view/frontend/templates/popup.phtml | 3 +++ .../frontend/templates/render/item/price_msrp_item.phtml | 3 +++ .../view/frontend/templates/render/item/price_msrp_rss.phtml | 3 +++ app/code/Magento/Multishipping/Helper/Data.php | 3 +++ .../Multishipping/Model/Checkout/Type/Multishipping.php | 3 +++ .../view/frontend/templates/checkout/address/select.phtml | 2 ++ .../view/frontend/templates/checkout/addresses.phtml | 3 +++ .../view/frontend/templates/checkout/billing.phtml | 3 +++ .../view/frontend/templates/checkout/billing/items.phtml | 3 +++ .../view/frontend/templates/checkout/item/default.phtml | 3 +++ .../view/frontend/templates/checkout/link.phtml | 3 +++ .../view/frontend/templates/checkout/overview.phtml | 3 +++ .../view/frontend/templates/checkout/overview/item.phtml | 3 +++ .../view/frontend/templates/checkout/shipping.phtml | 3 +++ .../view/frontend/templates/checkout/state.phtml | 3 +++ .../view/frontend/templates/checkout/success.phtml | 3 +++ .../view/frontend/templates/js/components.phtml | 3 +++ .../view/frontend/templates/multishipping/item/default.phtml | 3 +++ .../Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php | 3 +++ .../Magento/Newsletter/Block/Adminhtml/Template/Edit.php | 2 ++ .../Magento/Newsletter/Controller/Adminhtml/Queue/Save.php | 3 +++ .../Magento/Newsletter/Model/Resource/Grid/Collection.php | 2 ++ app/code/Magento/Newsletter/Model/Resource/Template.php | 3 +++ .../view/adminhtml/templates/preview/iframeswitcher.phtml | 3 +++ .../Newsletter/view/adminhtml/templates/preview/store.phtml | 3 +++ .../Newsletter/view/adminhtml/templates/problem/list.phtml | 3 +++ .../Newsletter/view/adminhtml/templates/queue/edit.phtml | 3 +++ .../Newsletter/view/adminhtml/templates/queue/list.phtml | 3 +++ .../view/adminhtml/templates/subscriber/list.phtml | 3 +++ .../Newsletter/view/adminhtml/templates/template/edit.phtml | 3 +++ .../Newsletter/view/adminhtml/templates/template/list.phtml | 3 +++ .../Newsletter/view/frontend/templates/js/components.phtml | 3 +++ .../Newsletter/view/frontend/templates/subscribe.phtml | 3 +++ .../view/adminhtml/templates/form/banktransfer.phtml | 3 +++ .../view/adminhtml/templates/form/cashondelivery.phtml | 2 ++ .../view/adminhtml/templates/form/checkmo.phtml | 3 +++ .../view/adminhtml/templates/form/purchaseorder.phtml | 3 +++ .../view/adminhtml/templates/info/checkmo.phtml | 3 +++ .../view/adminhtml/templates/info/pdf/checkmo.phtml | 3 +++ .../view/frontend/templates/form/banktransfer.phtml | 3 +++ .../view/frontend/templates/form/cashondelivery.phtml | 2 ++ .../view/frontend/templates/form/checkmo.phtml | 3 +++ .../view/frontend/templates/form/purchaseorder.phtml | 3 +++ .../view/frontend/templates/info/checkmo.phtml | 3 +++ .../Model/Plugin/Checkout/Block/Cart/Shipping.php | 2 ++ .../PageCache/view/frontend/templates/js/components.phtml | 3 +++ app/code/Magento/Payment/Model/Method/AbstractMethod.php | 3 +++ .../Magento/Payment/view/adminhtml/templates/form/cc.phtml | 3 +++ .../Payment/view/adminhtml/templates/info/default.phtml | 3 +++ .../Payment/view/adminhtml/templates/info/instructions.phtml | 3 +++ .../Payment/view/adminhtml/templates/info/pdf/default.phtml | 3 +++ .../Payment/view/adminhtml/templates/info/substitution.phtml | 3 +++ .../Magento/Payment/view/frontend/templates/form/cc.phtml | 3 +++ .../Payment/view/frontend/templates/info/default.phtml | 3 +++ .../Payment/view/frontend/templates/info/instructions.phtml | 3 +++ .../Persistent/view/frontend/templates/remember_me.phtml | 3 +++ app/code/Magento/ProductAlert/Block/Email/AbstractEmail.php | 3 +++ app/code/Magento/ProductAlert/Model/Resource/Price.php | 3 +++ app/code/Magento/ProductAlert/Model/Resource/Stock.php | 3 +++ .../ProductAlert/view/frontend/templates/email/price.phtml | 2 ++ .../ProductAlert/view/frontend/templates/email/stock.phtml | 2 ++ app/code/Magento/Reports/Block/Adminhtml/Filter/Form.php | 3 +++ app/code/Magento/Reports/Block/Adminhtml/Grid.php | 3 +++ .../Block/Adminhtml/Grid/Column/Renderer/Currency.php | 3 +++ .../Magento/Reports/Block/Adminhtml/Sales/Invoiced/Grid.php | 3 +++ .../Magento/Reports/Block/Adminhtml/Sales/Refunded/Grid.php | 3 +++ .../Magento/Reports/Block/Adminhtml/Sales/Sales/Grid.php | 3 +++ .../Magento/Reports/Block/Adminhtml/Sales/Shipping/Grid.php | 3 +++ app/code/Magento/Reports/Block/Adminhtml/Sales/Tax/Grid.php | 3 +++ app/code/Magento/Reports/Block/Adminhtml/Wishlist.php | 3 +++ app/code/Magento/Reports/Block/Product/Compared.php | 3 +++ app/code/Magento/Reports/Block/Product/Viewed.php | 3 +++ app/code/Magento/Reports/Helper/Data.php | 2 ++ app/code/Magento/Reports/Model/DateFactory.php | 3 +++ .../Entity/Summary/Collection/AbstractCollection.php | 2 ++ app/code/Magento/Reports/Model/Resource/Order/Collection.php | 3 +++ .../Reports/Model/Resource/Product/Index/AbstractIndex.php | 3 +++ app/code/Magento/Reports/Model/Resource/Quote/Collection.php | 2 ++ .../Magento/Reports/Model/Resource/Report/AbstractReport.php | 2 ++ .../Magento/Reports/Model/Resource/Report/Product/Viewed.php | 2 ++ .../Model/Resource/Report/Product/Viewed/Collection.php | 2 ++ .../Reports/data/reports_setup/data-install-2.0.0.php | 2 ++ app/code/Magento/Reports/view/adminhtml/templates/grid.phtml | 3 +++ .../view/adminhtml/templates/report/grid/container.phtml | 3 +++ .../view/adminhtml/templates/report/refresh/statistics.phtml | 3 +++ .../Reports/view/adminhtml/templates/store/switcher.phtml | 3 +++ .../view/adminhtml/templates/store/switcher/enhanced.phtml | 3 +++ .../Reports/view/frontend/templates/js/components.phtml | 3 +++ .../view/frontend/templates/product/widget/viewed.phtml | 3 +++ .../view/frontend/templates/product/widget/viewed/item.phtml | 3 +++ .../widget/compared/column/compared_default_list.phtml | 3 +++ .../widget/compared/column/compared_images_list.phtml | 3 +++ .../widget/compared/column/compared_names_list.phtml | 3 +++ .../templates/widget/compared/content/compared_grid.phtml | 3 +++ .../templates/widget/compared/content/compared_list.phtml | 3 +++ .../templates/widget/viewed/column/viewed_default_list.phtml | 3 +++ .../templates/widget/viewed/column/viewed_images_list.phtml | 3 +++ .../templates/widget/viewed/column/viewed_names_list.phtml | 3 +++ .../templates/widget/viewed/content/viewed_grid.phtml | 3 +++ .../templates/widget/viewed/content/viewed_list.phtml | 3 +++ app/code/Magento/Review/Block/Adminhtml/Add.php | 3 +++ app/code/Magento/Review/Block/Adminhtml/Grid.php | 2 ++ app/code/Magento/Review/Helper/Action/Pager.php | 3 +++ app/code/Magento/Review/Helper/Data.php | 3 +++ .../Review/view/adminhtml/templates/rating/detailed.phtml | 3 +++ .../Review/view/adminhtml/templates/rating/form.phtml | 3 +++ .../Review/view/adminhtml/templates/rating/options.phtml | 3 +++ .../view/adminhtml/templates/rating/stars/detailed.phtml | 3 +++ .../view/adminhtml/templates/rating/stars/summary.phtml | 3 +++ .../Review/view/adminhtml/templates/rss/grid/link.phtml | 2 ++ .../Review/view/frontend/templates/customer/list.phtml | 3 +++ .../Review/view/frontend/templates/customer/recent.phtml | 3 +++ .../Review/view/frontend/templates/customer/view.phtml | 3 +++ .../Magento/Review/view/frontend/templates/detailed.phtml | 3 +++ app/code/Magento/Review/view/frontend/templates/form.phtml | 3 +++ .../Review/view/frontend/templates/helper/summary.phtml | 3 +++ .../view/frontend/templates/helper/summary_short.phtml | 3 +++ .../Review/view/frontend/templates/product/view/count.phtml | 3 +++ .../Review/view/frontend/templates/product/view/list.phtml | 3 +++ .../Review/view/frontend/templates/product/view/other.phtml | 3 +++ .../Magento/Review/view/frontend/templates/redirect.phtml | 3 +++ app/code/Magento/Review/view/frontend/templates/view.phtml | 3 +++ app/code/Magento/Rss/view/frontend/templates/feeds.phtml | 3 +++ app/code/Magento/Rule/Model/AbstractModel.php | 2 ++ .../Sales/Api/CreditmemoCommentRepositoryInterface.php | 3 +++ app/code/Magento/Sales/Api/CreditmemoManagementInterface.php | 3 +++ app/code/Magento/Sales/Api/Data/CreditmemoInterface.php | 3 +++ app/code/Magento/Sales/Api/OrderManagementInterface.php | 3 +++ .../Sales/Api/OrderStatusHistoryRepositoryInterface.php | 3 +++ .../Magento/Sales/Block/Adminhtml/Order/Invoice/View.php | 3 +++ app/code/Magento/Sales/Block/Order/Creditmemo/Totals.php | 3 +++ .../Sales/Block/Order/Item/Renderer/DefaultRenderer.php | 3 +++ app/code/Magento/Sales/Helper/Reorder.php | 3 +++ app/code/Magento/Sales/Model/AdminOrder/Create.php | 3 +++ app/code/Magento/Sales/Model/Order/Creditmemo.php | 3 +++ app/code/Magento/Sales/Model/Order/Email/NotifySender.php | 3 +++ app/code/Magento/Sales/Model/Order/Payment.php | 3 +++ app/code/Magento/Sales/Model/Order/Payment/Transaction.php | 3 +++ app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php | 3 +++ .../Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php | 3 +++ app/code/Magento/Sales/Model/Order/Shipment/Item.php | 3 +++ app/code/Magento/Sales/Model/Quote.php | 3 +++ .../Magento/Sales/Model/Quote/Address/Total/Collector.php | 3 +++ app/code/Magento/Sales/Model/Quote/Item.php | 3 +++ app/code/Magento/Sales/Model/Resource/Quote.php | 3 +++ .../Sales/Model/Resource/Report/Bestsellers/Collection.php | 3 +++ .../Sales/view/adminhtml/templates/items/column/name.phtml | 3 +++ .../Sales/view/adminhtml/templates/items/column/qty.phtml | 3 +++ .../Sales/view/adminhtml/templates/items/price/row.phtml | 3 +++ .../Sales/view/adminhtml/templates/items/price/total.phtml | 3 +++ .../Sales/view/adminhtml/templates/items/price/unit.phtml | 3 +++ .../view/adminhtml/templates/items/renderer/default.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/address/form.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/comments/view.phtml | 3 +++ .../view/adminhtml/templates/order/create/abstract.phtml | 3 +++ .../templates/order/create/billing/method/form.phtml | 3 +++ .../view/adminhtml/templates/order/create/comment.phtml | 3 +++ .../view/adminhtml/templates/order/create/coupons/form.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/create/data.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/create/form.phtml | 3 +++ .../view/adminhtml/templates/order/create/form/address.phtml | 2 ++ .../view/adminhtml/templates/order/create/giftmessage.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/create/items.phtml | 3 +++ .../view/adminhtml/templates/order/create/items/grid.phtml | 2 ++ .../adminhtml/templates/order/create/items/price/row.phtml | 3 +++ .../adminhtml/templates/order/create/items/price/total.phtml | 3 +++ .../adminhtml/templates/order/create/items/price/unit.phtml | 3 +++ .../adminhtml/templates/order/create/newsletter/form.phtml | 3 +++ .../templates/order/create/shipping/method/form.phtml | 3 +++ .../view/adminhtml/templates/order/create/sidebar.phtml | 2 ++ .../adminhtml/templates/order/create/sidebar/items.phtml | 3 +++ .../view/adminhtml/templates/order/create/store/select.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/create/totals.phtml | 3 +++ .../adminhtml/templates/order/create/totals/default.phtml | 3 +++ .../adminhtml/templates/order/create/totals/grandtotal.phtml | 3 +++ .../adminhtml/templates/order/create/totals/shipping.phtml | 3 +++ .../adminhtml/templates/order/create/totals/subtotal.phtml | 3 +++ .../view/adminhtml/templates/order/create/totals/tax.phtml | 3 +++ .../adminhtml/templates/order/creditmemo/create/form.phtml | 3 +++ .../adminhtml/templates/order/creditmemo/create/items.phtml | 3 +++ .../order/creditmemo/create/items/renderer/default.phtml | 3 +++ .../order/creditmemo/create/totals/adjustments.phtml | 3 +++ .../adminhtml/templates/order/creditmemo/view/form.phtml | 3 +++ .../adminhtml/templates/order/creditmemo/view/items.phtml | 3 +++ .../order/creditmemo/view/items/renderer/default.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/details.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/giftoptions.phtml | 3 +++ .../view/adminhtml/templates/order/invoice/create/form.phtml | 3 +++ .../adminhtml/templates/order/invoice/create/items.phtml | 3 +++ .../order/invoice/create/items/renderer/default.phtml | 3 +++ .../view/adminhtml/templates/order/invoice/view/form.phtml | 3 +++ .../view/adminhtml/templates/order/invoice/view/items.phtml | 3 +++ .../order/invoice/view/items/renderer/default.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/totalbar.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/totals.phtml | 3 +++ .../view/adminhtml/templates/order/totals/discount.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/totals/due.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/totals/grand.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/totals/item.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/totals/paid.phtml | 3 +++ .../view/adminhtml/templates/order/totals/refunded.phtml | 3 +++ .../view/adminhtml/templates/order/totals/shipping.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/totals/tax.phtml | 3 +++ .../view/adminhtml/templates/order/view/giftmessage.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/view/history.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/view/info.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/view/items.phtml | 3 +++ .../templates/order/view/items/renderer/default.phtml | 3 +++ .../view/adminhtml/templates/order/view/tab/history.phtml | 3 +++ .../Sales/view/adminhtml/templates/order/view/tab/info.phtml | 3 +++ .../Sales/view/adminhtml/templates/page/js/components.phtml | 3 +++ .../Sales/view/adminhtml/templates/rss/order/grid/link.phtml | 2 ++ .../Sales/view/adminhtml/templates/transactions/detail.phtml | 3 +++ .../view/frontend/templates/email/creditmemo/items.phtml | 3 +++ .../Sales/view/frontend/templates/email/invoice/items.phtml | 3 +++ .../Magento/Sales/view/frontend/templates/email/items.phtml | 3 +++ .../frontend/templates/email/items/creditmemo/default.phtml | 3 +++ .../frontend/templates/email/items/invoice/default.phtml | 3 +++ .../view/frontend/templates/email/items/order/default.phtml | 2 ++ .../view/frontend/templates/email/items/price/row.phtml | 3 +++ .../frontend/templates/email/items/shipment/default.phtml | 3 +++ .../Sales/view/frontend/templates/email/shipment/items.phtml | 3 +++ .../Sales/view/frontend/templates/email/shipment/track.phtml | 3 +++ .../Magento/Sales/view/frontend/templates/guest/form.phtml | 3 +++ .../Sales/view/frontend/templates/items/price/row.phtml | 2 ++ .../templates/items/price/total_after_discount.phtml | 2 ++ .../Sales/view/frontend/templates/items/price/unit.phtml | 2 ++ .../Sales/view/frontend/templates/js/components.phtml | 3 +++ .../Sales/view/frontend/templates/order/comments.phtml | 3 +++ .../view/frontend/templates/order/creditmemo/items.phtml | 3 +++ .../templates/order/creditmemo/items/renderer/default.phtml | 3 +++ .../Sales/view/frontend/templates/order/history.phtml | 3 +++ .../Magento/Sales/view/frontend/templates/order/info.phtml | 3 +++ .../Sales/view/frontend/templates/order/info/buttons.phtml | 3 +++ .../view/frontend/templates/order/info/buttons/rss.phtml | 2 ++ .../Sales/view/frontend/templates/order/invoice/items.phtml | 3 +++ .../templates/order/invoice/items/renderer/default.phtml | 3 +++ .../Magento/Sales/view/frontend/templates/order/items.phtml | 3 +++ .../frontend/templates/order/items/renderer/default.phtml | 2 ++ .../Sales/view/frontend/templates/order/order_comments.phtml | 3 +++ .../Sales/view/frontend/templates/order/order_date.phtml | 3 +++ .../view/frontend/templates/order/print/creditmemo.phtml | 3 +++ .../Sales/view/frontend/templates/order/print/invoice.phtml | 3 +++ .../Sales/view/frontend/templates/order/print/shipment.phtml | 3 +++ .../Magento/Sales/view/frontend/templates/order/recent.phtml | 3 +++ .../templates/order/shipment/items/renderer/default.phtml | 3 +++ .../Magento/Sales/view/frontend/templates/order/totals.phtml | 3 +++ .../Magento/Sales/view/frontend/templates/order/view.phtml | 3 +++ .../Sales/view/frontend/templates/reorder/sidebar.phtml | 3 +++ .../Sales/view/frontend/templates/widget/guest/form.phtml | 3 +++ .../Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Grid.php | 3 +++ .../SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php | 3 +++ app/code/Magento/SalesRule/Helper/Coupon.php | 3 +++ .../SalesRule/Model/Resource/Report/Rule/Createdat.php | 3 +++ .../Magento/SalesRule/Model/Resource/Rule/Collection.php | 3 +++ app/code/Magento/SalesRule/Model/Validator.php | 3 +++ app/code/Magento/Search/Model/Resource/Query.php | 3 +++ .../Magento/Search/view/frontend/templates/search_data.phtml | 3 +++ app/code/Magento/Search/view/frontend/templates/term.phtml | 3 +++ app/code/Magento/Sendfriend/Controller/Product/Sendmail.php | 3 +++ app/code/Magento/Sendfriend/Helper/Data.php | 3 +++ .../Magento/Sendfriend/view/frontend/templates/send.phtml | 3 +++ app/code/Magento/Shipping/Block/Tracking/Popup.php | 3 +++ app/code/Magento/Shipping/Helper/Data.php | 2 ++ app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php | 3 +++ app/code/Magento/Shipping/Model/Config.php | 3 +++ app/code/Magento/Shipping/Model/Info.php | 3 +++ app/code/Magento/Shipping/Model/Shipping/Labels.php | 3 +++ .../Shipping/view/adminhtml/templates/create/form.phtml | 3 +++ .../Shipping/view/adminhtml/templates/create/items.phtml | 3 +++ .../adminhtml/templates/create/items/renderer/default.phtml | 3 +++ .../view/adminhtml/templates/order/Tracking/view.phtml | 3 +++ .../view/adminhtml/templates/order/packaging/grid.phtml | 3 +++ .../view/adminhtml/templates/order/packaging/packed.phtml | 3 +++ .../view/adminhtml/templates/order/packaging/popup.phtml | 3 +++ .../Shipping/view/adminhtml/templates/order/tracking.phtml | 3 +++ .../Shipping/view/adminhtml/templates/order/view/info.phtml | 3 +++ .../Shipping/view/adminhtml/templates/view/form.phtml | 3 +++ .../Shipping/view/adminhtml/templates/view/items.phtml | 3 +++ .../adminhtml/templates/view/items/renderer/default.phtml | 3 +++ .../Magento/Shipping/view/frontend/templates/items.phtml | 3 +++ .../Shipping/view/frontend/templates/tracking/link.phtml | 3 +++ .../Shipping/view/frontend/templates/tracking/popup.phtml | 3 +++ app/code/Magento/Sitemap/Model/Sitemap.php | 3 +++ app/code/Magento/Store/Model/Resource/Website.php | 3 +++ .../Magento/Store/view/frontend/templates/switch/flags.phtml | 3 +++ .../Store/view/frontend/templates/switch/languages.phtml | 3 +++ .../Store/view/frontend/templates/switch/stores.phtml | 3 +++ app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php | 2 ++ app/code/Magento/Tax/Helper/Data.php | 3 +++ app/code/Magento/Tax/Model/Calculation/Rate.php | 2 ++ app/code/Magento/Tax/Model/Observer.php | 2 ++ app/code/Magento/Tax/Model/Resource/Sales/Order/Tax/Item.php | 2 ++ .../Tax/Model/Sales/Total/Quote/CommonTaxCollector.php | 3 +++ .../Tax/view/adminhtml/templates/items/price/row.phtml | 3 +++ .../Tax/view/adminhtml/templates/items/price/total.phtml | 3 +++ .../Tax/view/adminhtml/templates/items/price/unit.phtml | 3 +++ .../adminhtml/templates/order/create/items/price/row.phtml | 3 +++ .../adminhtml/templates/order/create/items/price/total.phtml | 3 +++ .../adminhtml/templates/order/create/items/price/unit.phtml | 3 +++ .../Magento/Tax/view/adminhtml/templates/rate/form.phtml | 3 +++ app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml | 3 +++ .../Magento/Tax/view/adminhtml/templates/rate/title.phtml | 3 +++ .../Tax/view/adminhtml/templates/toolbar/class/save.phtml | 3 +++ .../Tax/view/adminhtml/templates/toolbar/rate/add.phtml | 3 +++ .../Tax/view/adminhtml/templates/toolbar/rate/save.phtml | 3 +++ .../Tax/view/adminhtml/templates/toolbar/rule/save.phtml | 3 +++ .../Magento/Tax/view/base/templates/pricing/adjustment.phtml | 3 +++ .../Tax/view/base/templates/pricing/adjustment/bundle.phtml | 3 +++ .../templates/checkout/cart/item/price/sidebar.phtml | 2 ++ .../frontend/templates/checkout/cart/minicart/totals.phtml | 2 ++ .../Tax/view/frontend/templates/checkout/grandtotal.phtml | 3 +++ .../Tax/view/frontend/templates/checkout/shipping.phtml | 3 +++ .../view/frontend/templates/checkout/shipping/price.phtml | 3 +++ .../Tax/view/frontend/templates/checkout/subtotal.phtml | 3 +++ .../Magento/Tax/view/frontend/templates/checkout/tax.phtml | 3 +++ .../Tax/view/frontend/templates/email/items/price/row.phtml | 3 +++ .../Magento/Tax/view/frontend/templates/item/price/row.phtml | 2 ++ .../frontend/templates/item/price/total_after_discount.phtml | 2 ++ .../Tax/view/frontend/templates/item/price/unit.phtml | 2 ++ app/code/Magento/Tax/view/frontend/templates/order/tax.phtml | 3 +++ .../view/adminhtml/templates/importExport.phtml | 3 +++ .../view/adminhtml/templates/browser/content/files.phtml | 3 +++ app/code/Magento/Theme/view/base/templates/root.phtml | 3 +++ .../Theme/view/frontend/templates/callouts/left_col.phtml | 3 +++ .../Theme/view/frontend/templates/callouts/right_col.phtml | 3 +++ .../Magento/Theme/view/frontend/templates/html/block.phtml | 3 +++ .../Theme/view/frontend/templates/html/breadcrumbs.phtml | 3 +++ .../Theme/view/frontend/templates/html/collapsible.phtml | 3 +++ .../Theme/view/frontend/templates/html/container.phtml | 3 +++ .../Magento/Theme/view/frontend/templates/html/footer.phtml | 3 +++ .../Magento/Theme/view/frontend/templates/html/header.phtml | 3 +++ .../Theme/view/frontend/templates/html/header/logo.phtml | 3 +++ .../Magento/Theme/view/frontend/templates/html/notices.phtml | 3 +++ .../Magento/Theme/view/frontend/templates/html/pager.phtml | 3 +++ .../Theme/view/frontend/templates/html/sections.phtml | 3 +++ .../Theme/view/frontend/templates/html/skiptarget.phtml | 3 +++ .../Magento/Theme/view/frontend/templates/html/title.phtml | 2 ++ .../Magento/Theme/view/frontend/templates/html/topmenu.phtml | 3 +++ .../Theme/view/frontend/templates/js/components.phtml | 3 +++ app/code/Magento/Theme/view/frontend/templates/link.phtml | 3 +++ app/code/Magento/Translation/Model/Js/DataProvider.php | 2 ++ .../view/adminhtml/templates/translate_inline.phtml | 3 +++ .../view/frontend/templates/translate_inline.phtml | 3 +++ app/code/Magento/Ui/Controller/Adminhtml/Form/Fieldset.php | 3 +++ app/code/Magento/Ui/DataProvider/Config/Converter.php | 2 ++ .../Ui/view/base/templates/control/button/default.phtml | 3 +++ .../Magento/Ui/view/base/templates/filter_pool/active.phtml | 3 +++ .../Ui/view/base/templates/form/fieldset/default.phtml | 3 +++ .../Ui/view/base/templates/layout/group/default.phtml | 3 +++ app/code/Magento/Ups/Model/Carrier.php | 3 +++ .../adminhtml/templates/system/shipping/carrier_config.phtml | 2 ++ .../UrlRewrite/view/adminhtml/templates/categories.phtml | 3 +++ .../Magento/UrlRewrite/view/adminhtml/templates/edit.phtml | 3 +++ .../UrlRewrite/view/adminhtml/templates/selector.phtml | 3 +++ app/code/Magento/User/Block/User/Edit/Tab/Main.php | 3 +++ app/code/Magento/User/Model/Resource/User.php | 3 +++ .../User/view/adminhtml/templates/admin/forgotpassword.phtml | 3 +++ .../view/adminhtml/templates/admin/forgotpassword_url.phtml | 3 +++ .../adminhtml/templates/admin/resetforgottenpassword.phtml | 3 +++ .../Magento/User/view/adminhtml/templates/role/edit.phtml | 3 +++ .../User/view/adminhtml/templates/role/users_grid_js.phtml | 3 +++ .../User/view/adminhtml/templates/user/roles_grid_js.phtml | 3 +++ app/code/Magento/Usps/Model/Carrier.php | 3 +++ app/code/Magento/Usps/Model/Source/Method.php | 3 +++ .../integration/activate/permissions/tab/webapi.phtml | 3 +++ .../Webapi/view/adminhtml/templates/resourcetree.phtml | 3 +++ app/code/Magento/Weee/Block/Renderer/Weee/Tax.php | 3 +++ app/code/Magento/Weee/Model/Total/Quote/Weee.php | 3 +++ .../Weee/view/adminhtml/templates/items/price/row.phtml | 3 +++ .../Weee/view/adminhtml/templates/items/price/total.phtml | 3 +++ .../Weee/view/adminhtml/templates/items/price/unit.phtml | 3 +++ .../adminhtml/templates/order/create/items/price/row.phtml | 3 +++ .../adminhtml/templates/order/create/items/price/total.phtml | 3 +++ .../adminhtml/templates/order/create/items/price/unit.phtml | 3 +++ .../Magento/Weee/view/adminhtml/templates/renderer/tax.phtml | 3 +++ .../Weee/view/base/templates/pricing/adjustment.phtml | 3 +++ .../templates/checkout/cart/item/price/sidebar.phtml | 2 ++ .../checkout/onepage/review/item/price/row_excl_tax.phtml | 2 ++ .../checkout/onepage/review/item/price/row_incl_tax.phtml | 2 ++ .../checkout/onepage/review/item/price/unit_excl_tax.phtml | 2 ++ .../checkout/onepage/review/item/price/unit_incl_tax.phtml | 2 ++ .../Weee/view/frontend/templates/email/items/price/row.phtml | 3 +++ .../Weee/view/frontend/templates/item/price/row.phtml | 2 ++ .../frontend/templates/item/price/total_after_discount.phtml | 2 ++ .../Weee/view/frontend/templates/item/price/unit.phtml | 2 ++ app/code/Magento/Widget/Block/Adminhtml/Widget.php | 2 ++ .../Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php | 3 +++ app/code/Magento/Widget/Model/Widget.php | 2 ++ .../view/adminhtml/templates/instance/edit/layout.phtml | 3 +++ app/code/Magento/Wishlist/Model/Item.php | 3 +++ .../Magento/Wishlist/sql/wishlist_setup/install-2.0.0.php | 2 ++ .../adminhtml/templates/customer/edit/tab/wishlist.phtml | 2 ++ .../Wishlist/view/frontend/templates/button/share.phtml | 2 ++ .../Wishlist/view/frontend/templates/button/tocart.phtml | 3 +++ .../Wishlist/view/frontend/templates/button/update.phtml | 3 +++ .../Wishlist/view/frontend/templates/email/items.phtml | 3 +++ .../view/frontend/templates/item/column/actions.phtml | 2 ++ .../Wishlist/view/frontend/templates/item/column/cart.phtml | 2 ++ .../view/frontend/templates/item/column/comment.phtml | 2 ++ .../Wishlist/view/frontend/templates/item/column/edit.phtml | 2 ++ .../Wishlist/view/frontend/templates/item/column/image.phtml | 2 ++ .../Wishlist/view/frontend/templates/item/column/name.phtml | 2 ++ .../Wishlist/view/frontend/templates/item/column/price.phtml | 2 ++ .../view/frontend/templates/item/column/remove.phtml | 3 +++ .../view/frontend/templates/item/configure/addto.phtml | 3 +++ .../Magento/Wishlist/view/frontend/templates/item/list.phtml | 3 +++ .../Wishlist/view/frontend/templates/js/components.phtml | 3 +++ app/code/Magento/Wishlist/view/frontend/templates/link.phtml | 3 +++ .../Wishlist/view/frontend/templates/options_list.phtml | 3 +++ .../Magento/Wishlist/view/frontend/templates/rss/email.phtml | 3 +++ .../Wishlist/view/frontend/templates/rss/wishlist.phtml | 3 +++ .../Magento/Wishlist/view/frontend/templates/shared.phtml | 3 +++ .../Magento/Wishlist/view/frontend/templates/sharing.phtml | 2 ++ .../Magento/Wishlist/view/frontend/templates/sidebar.phtml | 3 +++ app/code/Magento/Wishlist/view/frontend/templates/view.phtml | 3 +++ .../TestModule4/Service/V1/DataObjectServiceInterface.php | 3 +++ .../TestModule4/Service/V1/Entity/ExtensibleRequest.php | 3 +++ .../TestModuleMSC/Model/Data/CustomAttributeDataObject.php | 3 +++ .../Model/Data/CustomAttributeNestedDataObject.php | 3 +++ .../_files/Magento/TestModuleMSC/Model/Data/Item.php | 3 +++ .../Magento/TestFramework/Annotation/ApiDataFixture.php | 3 +++ .../testsuite/Magento/Catalog/Api/CategoryManagementTest.php | 3 +++ .../Magento/Catalog/Api/ProductAttributeManagementTest.php | 3 +++ .../Catalog/Api/ProductCustomOptionRepositoryTest.php | 2 ++ .../Catalog/Api/ProductMediaAttributeManagementTest.php | 3 +++ .../Magento/Catalog/Api/ProductTierPriceManagementTest.php | 2 ++ .../testsuite/Magento/CatalogInventory/Api/StockItemTest.php | 3 +++ .../Magento/ConfigurableProduct/Api/OptionRepositoryTest.php | 3 +++ .../testsuite/Magento/Customer/Api/AddressRepositoryTest.php | 2 ++ .../Service/V1/DownloadableLink/WriteServiceTest.php | 3 +++ .../Service/V1/DownloadableSample/WriteServiceTest.php | 3 +++ .../Magento/GiftMessage/Service/V1/WriteServiceTest.php | 2 ++ .../Magento/Sales/Service/V1/CreditmemoCreateTest.php | 3 +++ .../Magento/Sales/Service/V1/OrderStatusHistoryAddTest.php | 3 +++ .../Magento/Sales/Service/V1/ShipmentCreateTest.php | 3 +++ .../testsuite/Magento/Tax/Api/TaxClassRepositoryTest.php | 2 ++ .../Magento/Webapi/WsdlGenerationFromDataObjectTest.php | 2 ++ .../framework/Magento/TestFramework/Db/Adapter/Mysql.php | 2 ++ .../integration/framework/Magento/TestFramework/Db/Mysql.php | 2 ++ .../Magento/Backend/Block/Widget/Grid/MassactionTest.php | 3 +++ .../Catalog/Controller/Adminhtml/Product/NewActionTest.php | 3 +++ .../Magento/Catalog/Controller/Product/CompareTest.php | 3 +++ .../testsuite/Magento/Catalog/Model/Product/ImageTest.php | 3 +++ .../Magento/Catalog/Model/Resource/Product/OptionTest.php | 3 +++ .../Magento/CatalogImportExport/Model/Import/ProductTest.php | 2 ++ .../Block/Adminhtml/Form/Field/CustomergroupTest.php | 3 +++ .../CatalogSearch/Model/Layer/Filter/CategoryTest.php | 3 +++ .../Model/CategoryUrlRewriteGeneratorTest.php | 3 +++ .../Checkout/_files/quote_with_simple_product_saved.php | 2 ++ .../_files/quote_with_virtual_product_and_address.php | 3 +++ .../testsuite/Magento/Cms/Controller/RouterTest.php | 3 +++ .../Block/Adminhtml/Product/Edit/Tab/Super/ConfigTest.php | 3 +++ .../Model/Product/Type/ConfigurableTest.php | 3 +++ .../testsuite/Magento/Core/Model/Variable/ConfigTest.php | 3 +++ .../testsuite/Magento/Customer/Controller/AccountTest.php | 2 ++ .../testsuite/Magento/Customer/Controller/AjaxLoginTest.php | 2 ++ .../Magento/Customer/Model/CustomerRegistryTest.php | 2 ++ .../Customer/_files/customer_non_default_website_id.php | 2 ++ .../CustomerImportExport/Model/Export/AddressTest.php | 3 +++ .../CustomerImportExport/Model/Import/CustomerTest.php | 3 +++ .../testsuite/Magento/Directory/Model/ObserverTest.php | 2 ++ .../Downloadable/_files/order_with_downloadable_product.php | 2 ++ .../testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php | 2 ++ .../Magento/Framework/Interception/Fixture/Intercepted.php | 3 +++ .../Framework/Interception/Fixture/InterceptedInterface.php | 3 +++ .../Framework/Interception/Fixture/InterceptedParent.php | 3 +++ .../Interception/Fixture/InterceptedParentInterface.php | 3 +++ .../Magento/Framework/Less/File/Collector/AggregatedTest.php | 3 +++ .../Magento/Framework/Model/Resource/Db/AbstractTest.php | 3 +++ .../Magento/Framework/Stdlib/Cookie/CookieScopeTest.php | 2 ++ .../Magento/Framework/Stdlib/Cookie/PhpCookieReaderTest.php | 4 +++- .../Magento/ImportExport/Model/Export/EntityAbstractTest.php | 2 ++ .../Multishipping/Block/Checkout/Address/SelectTest.php | 2 ++ .../Magento/Multishipping/Block/Checkout/OverviewTest.php | 3 +++ .../Controller/Adminhtml/Report/Product/ViewedTest.php | 3 +++ .../testsuite/Magento/Reports/_files/viewed_products.php | 2 ++ .../Magento/Review/Block/Adminhtml/Edit/FormTest.php | 2 ++ .../integration/testsuite/Magento/Review/Block/FormTest.php | 3 +++ .../Magento/Sales/Model/Resource/Order/StatusTest.php | 2 ++ .../integration/testsuite/Magento/Sales/_files/order.php | 3 +++ .../testsuite/Magento/Sales/_files/order_fixture_store.php | 2 ++ .../integration/testsuite/Magento/Store/Model/StoreTest.php | 3 +++ .../Magento/Tax/Model/Sales/Total/Quote/SetupUtil.php | 3 +++ .../Magento/Tax/Model/Sales/Total/Quote/SubtotalTest.php | 2 ++ .../testsuite/Magento/Tax/Pricing/AdjustmentTest.php | 2 ++ .../testsuite/Magento/Test/Integrity/LayoutTest.php | 3 +++ .../User/Controller/Adminhtml/User/InvalidateTokenTest.php | 2 ++ .../integration/testsuite/Magento/User/Model/UserTest.php | 3 +++ .../testsuite/Magento/Widget/Model/Config/ReaderTest.php | 3 +++ .../testsuite/Magento/Wishlist/Helper/RssTest.php | 2 ++ .../TestFramework/CodingStandard/Tool/BlacklistInterface.php | 4 +++- .../TestFramework/CodingStandard/Tool/CopyPasteDetector.php | 2 ++ .../Magento/Test/Legacy/_files/obsolete_config_nodes.php | 3 +++ .../Magento/Test/Legacy/_files/obsolete_constants.php | 3 +++ .../Magento/Test/Legacy/_files/obsolete_methods.php | 3 +++ .../Magento/Test/Legacy/_files/obsolete_properties.php | 3 +++ .../phpcs/input/coding_style/classes/normal_class.php | 2 ++ .../input/coding_style/functions/method_without_scope.php | 2 ++ .../coding_style/functions/multiline_wrong_declaration.php | 3 +++ .../phpcs/input/coding_style/functions/normal_func.php | 3 +++ .../input/coding_style/functions/unneeded_multiline.php | 3 +++ .../input/coding_style/inline_doc/format/wrong_align.php | 3 +++ .../phpcs/input/coding_style/inline_doc/normal.php | 3 +++ .../phpcs/input/naming/property/normal_underscore.php | 3 +++ dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php | 3 +++ .../Magento/AdminNotification/Block/ToolbarEntryTest.php | 2 ++ .../Backend/Block/System/Config/Form/Field/ImageTest.php | 2 ++ .../Magento/Backend/Block/System/Config/FormTest.php | 3 +++ .../Magento/Backend/Block/Widget/Grid/ColumnSetTest.php | 3 +++ .../Backend/Controller/Adminhtml/Cache/CleanMediaTest.php | 3 +++ .../Controller/Adminhtml/Dashboard/AbstractTestCase.php | 5 ++++- .../Controller/Adminhtml/Dashboard/CustomersMostTest.php | 5 ++++- .../Controller/Adminhtml/Dashboard/CustomersNewestTest.php | 5 ++++- .../Controller/Adminhtml/Dashboard/ProductsViewedTest.php | 5 ++++- .../Backend/Model/Config/Backend/Cookie/LifetimeTest.php | 3 +++ .../Magento/Backend/Model/Config/Backend/Cookie/PathTest.php | 3 +++ .../Model/Config/Source/Storage/Media/DatabaseTest.php | 3 +++ .../testsuite/Magento/Backend/Model/Config/StructureTest.php | 3 +++ dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php | 2 ++ .../Block/Catalog/Product/View/Type/Bundle/OptionTest.php | 3 +++ .../Bundle/Block/Catalog/Product/View/Type/BundleTest.php | 3 +++ .../testsuite/Magento/Bundle/Model/LinkManagementTest.php | 2 ++ .../Magento/Bundle/Pricing/Adjustment/CalculatorTest.php | 3 +++ .../Magento/Bundle/Pricing/Price/DiscountCalculatorTest.php | 2 ++ .../Magento/Bundle/Pricing/Price/GroupPriceTest.php | 3 +++ .../Block/Adminhtml/Category/AbstractCategoryTest.php | 3 +++ .../unit/testsuite/Magento/Catalog/Block/Layer/ViewTest.php | 3 +++ .../Magento/Catalog/Block/Product/AbstractProductTest.php | 3 +++ .../testsuite/Magento/Catalog/Block/Product/ViewTest.php | 3 +++ .../Adminhtml/Category/Widget/CategoriesJsonTest.php | 3 +++ .../Controller/Adminhtml/Category/Widget/ChooserTest.php | 3 +++ .../Magento/Catalog/Controller/Product/Compare/IndexTest.php | 3 +++ .../Magento/Catalog/Model/App/Action/ContextPluginTest.php | 2 ++ .../Model/Attribute/Backend/CustomlayoutupdateTest.php | 3 +++ .../Catalog/Model/Category/Attribute/Backend/SortbyTest.php | 3 +++ .../Catalog/Model/Category/AttributeRepositoryTest.php | 2 ++ .../testsuite/Magento/Catalog/Model/Category/TreeTest.php | 2 ++ .../unit/testsuite/Magento/Catalog/Model/CategoryTest.php | 2 ++ .../Catalog/Model/Indexer/Category/AffectCacheTest.php | 2 ++ .../Catalog/Model/Indexer/Product/AffectCacheTest.php | 2 ++ .../Catalog/Model/Indexer/Product/Flat/Action/EraserTest.php | 2 ++ .../Catalog/Model/Indexer/Product/Flat/Action/RowTest.php | 3 +++ .../Catalog/Model/Indexer/Product/Flat/Action/RowsTest.php | 3 +++ .../Model/Indexer/Product/Price/Plugin/CustomerGroupTest.php | 3 +++ .../Catalog/Model/Layer/Category/AvailabilityFlagTest.php | 2 ++ .../Catalog/Model/Layer/Category/CollectionFilterTest.php | 2 ++ .../Model/Layer/Category/FilterableAttributeListTest.php | 2 ++ .../testsuite/Magento/Catalog/Model/Layer/FilterListTest.php | 2 ++ .../Model/Layer/Search/FilterableAttributeListTest.php | 2 ++ .../Magento/Catalog/Model/Layout/DepersonalizePluginTest.php | 2 ++ .../Catalog/Model/Product/Attribute/ManagementTest.php | 3 +++ .../Catalog/Model/Product/Attribute/RepositoryTest.php | 2 ++ .../Catalog/Model/Product/Attribute/Source/StatusTest.php | 2 ++ .../Catalog/Model/Product/Attribute/TypesListTest.php | 2 ++ .../Magento/Catalog/Model/Product/LinkTypeProviderTest.php | 3 +++ .../Catalog/Model/Product/Option/Validator/PoolTest.php | 2 ++ .../Magento/Catalog/Model/Product/PriceModifierTest.php | 2 ++ .../Catalog/Model/Product/TierPriceManagementTest.php | 3 +++ .../unit/testsuite/Magento/Catalog/Model/ProductTest.php | 3 +++ .../Magento/Catalog/Model/Resource/Category/TreeTest.php | 3 +++ .../Magento/Catalog/Model/Resource/Eav/AttributeTest.php | 3 +++ .../Model/Resource/Product/Attribute/Backend/MediaTest.php | 3 +++ .../Catalog/Model/Resource/Product/Option/CollectionTest.php | 3 +++ .../Magento/Catalog/Pricing/Price/BasePriceTest.php | 3 +++ .../Magento/Catalog/Pricing/Price/GroupPriceTest.php | 2 ++ .../Magento/Catalog/Pricing/Price/TierPriceTest.php | 2 ++ .../unit/testsuite/Magento/CatalogRule/Model/CronTest.php | 2 ++ .../Magento/CatalogRule/Plugin/Indexer/CategoryTest.php | 3 +++ .../Magento/CatalogRule/Plugin/Indexer/CustomerGroupTest.php | 3 +++ .../Magento/CatalogRule/Plugin/Indexer/ImportExportTest.php | 3 +++ .../Magento/CatalogRule/Plugin/Indexer/WebsiteTest.php | 3 +++ .../unit/testsuite/Magento/Checkout/Helper/CartTest.php | 3 +++ .../unit/testsuite/Magento/Checkout/Helper/DataTest.php | 3 +++ .../Checkout/Model/Layout/DepersonalizePluginTest.php | 2 ++ .../unit/testsuite/Magento/Checkout/Model/SessionTest.php | 2 ++ .../testsuite/Magento/Checkout/Model/Type/OnepageTest.php | 2 ++ .../Checkout/Service/V1/Address/Billing/WriteServiceTest.php | 2 ++ .../Magento/Checkout/Service/V1/Address/ConverterTest.php | 2 ++ .../Service/V1/Address/Shipping/WriteServiceTest.php | 2 ++ .../Magento/Checkout/Service/V1/Address/ValidatorTest.php | 2 ++ .../Checkout/Service/V1/Cart/PaymentMethod/BuilderTest.php | 2 ++ .../Checkout/Service/V1/Cart/PaymentMethod/ConverterTest.php | 2 ++ .../Magento/Checkout/Service/V1/Cart/ReadServiceTest.php | 2 ++ .../Magento/Checkout/Service/V1/Cart/TotalsServiceTest.php | 3 +++ .../Magento/Checkout/Service/V1/Cart/WriteServiceTest.php | 3 +++ .../Magento/Checkout/Service/V1/Coupon/ReadServiceTest.php | 2 ++ .../Magento/Checkout/Service/V1/Coupon/WriteServiceTest.php | 2 ++ .../Service/V1/Data/Cart/ShippingMethodConverterTest.php | 2 ++ .../Checkout/Service/V1/Data/PaymentMethod/ConverterTest.php | 2 ++ .../Magento/Checkout/Service/V1/Item/ReaderServiceTest.php | 2 ++ .../Checkout/Service/V1/PaymentMethod/ReadServiceTest.php | 2 ++ .../Checkout/Service/V1/PaymentMethod/WriteServiceTest.php | 2 ++ .../Model/Export/RowCustomizerTest.php | 3 +++ .../Magento/ConfigurableProduct/Helper/DataTest.php | 3 +++ .../Model/Product/Type/ConfigurableTest.php | 3 +++ .../ConfigurableProduct/Model/Product/Type/PluginTest.php | 3 +++ .../Initializer/Option/Plugin/ConfigurableProductTest.php | 3 +++ .../ConfigurableProduct/Model/SuggestedAttributeListTest.php | 3 +++ .../testsuite/Magento/Contact/Controller/Index/IndexTest.php | 3 +++ .../unit/testsuite/Magento/Contact/Controller/IndexTest.php | 2 ++ dev/tests/unit/testsuite/Magento/Contact/Helper/DataTest.php | 2 ++ .../testsuite/Magento/Core/App/Router/NoRouteHandlerTest.php | 3 +++ dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php | 3 +++ .../unit/testsuite/Magento/Core/Model/App/EmulationTest.php | 3 +++ .../unit/testsuite/Magento/Core/Model/Asset/ConfigTest.php | 3 +++ .../Magento/Core/Model/Asset/Plugin/CleanMergedJsCssTest.php | 3 +++ .../Magento/Core/Model/Layout/DepersonalizePluginTest.php | 2 ++ .../testsuite/Magento/Core/Model/Theme/Image/PathTest.php | 2 ++ .../unit/testsuite/Magento/Core/Model/View/DesignTest.php | 3 +++ .../Magento/Customer/Block/Account/Dashboard/InfoTest.php | 3 +++ .../Customer/Block/Adminhtml/Edit/Tab/AccountTest.php | 2 ++ .../unit/testsuite/Magento/Customer/Block/Widget/DobTest.php | 3 +++ .../testsuite/Magento/Customer/Block/Widget/GenderTest.php | 3 +++ .../testsuite/Magento/Customer/Block/Widget/NameTest.php | 3 +++ .../testsuite/Magento/Customer/Block/Widget/TaxvatTest.php | 3 +++ .../Magento/Customer/Controller/Account/ConfirmTest.php | 2 ++ .../Magento/Customer/Controller/Account/CreatePostTest.php | 3 +++ .../Magento/Customer/Controller/Account/CreateTest.php | 3 +++ .../Controller/Adminhtml/Index/ResetPasswordTest.php | 3 +++ .../testsuite/Magento/Customer/Controller/Ajax/LoginTest.php | 2 ++ .../Magento/Customer/Helper/Session/CurrentCustomerTest.php | 3 +++ .../Magento/Customer/Model/Resource/AddressTest.php | 2 ++ .../testsuite/Magento/Customer/Model/Resource/GroupTest.php | 2 ++ .../Model/Import/CustomerCompositeTest.php | 3 +++ .../CustomerImportExport/Model/Import/CustomerTest.php | 2 ++ .../DesignEditor/Controller/Varien/Router/StandardTest.php | 3 +++ .../Directory/Model/Resource/Country/CollectionTest.php | 3 +++ .../Magento/Eav/Model/Attribute/Data/AbstractDataTest.php | 3 +++ .../testsuite/Magento/Eav/Model/Attribute/Data/FileTest.php | 3 +++ .../testsuite/Magento/Eav/Model/Attribute/Data/ImageTest.php | 3 +++ .../testsuite/Magento/Eav/Model/AttributeManagementTest.php | 2 ++ .../Eav/Model/Entity/Attribute/Source/BooleanTest.php | 3 +++ .../Magento/Eav/Model/Resource/Attribute/CollectionTest.php | 3 +++ .../Magento/Eav/Model/Resource/Entity/AttributeTest.php | 3 +++ .../Eav/Plugin/Model/Resource/Entity/AttributeTest.php | 2 ++ .../Magento/Email/Block/Adminhtml/Template/PreviewTest.php | 3 +++ .../testsuite/Magento/Framework/App/Action/ActionTest.php | 2 ++ .../unit/testsuite/Magento/Framework/App/AreaListTest.php | 3 +++ .../unit/testsuite/Magento/Framework/App/BootstrapTest.php | 2 ++ .../Magento/Framework/App/ObjectManager/ConfigLoaderTest.php | 3 +++ .../testsuite/Magento/Framework/App/Request/HttpTest.php | 3 +++ .../unit/testsuite/Magento/Framework/App/ResourceTest.php | 2 ++ .../testsuite/Magento/Framework/App/StaticResourceTest.php | 3 +++ .../Magento/Framework/Autoload/ClassLoaderWrapperTest.php | 3 +++ .../unit/testsuite/Magento/Framework/Cache/CoreTest.php | 2 ++ .../Code/Reader/_files/ClassesForArgumentsReader.php | 3 +++ .../Code/Validator/_files/ClassesForArgumentSequence.php | 3 +++ .../Code/Validator/_files/ClassesForConstructorIntegrity.php | 3 +++ .../Code/Validator/_files/ClassesForContextAggregation.php | 3 +++ .../Code/Validator/_files/ClassesForTypeDuplication.php | 3 +++ .../Magento/Framework/Config/Composer/PackageTest.php | 2 ++ .../unit/testsuite/Magento/Framework/Config/DataTest.php | 3 +++ .../testsuite/Magento/Framework/DB/AbstractMapperTest.php | 3 +++ .../testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php | 2 ++ .../testsuite/Magento/Framework/Data/Collection/DbTest.php | 3 +++ .../Framework/Data/Form/Element/AbstractElementTest.php | 2 ++ dev/tests/unit/testsuite/Magento/Framework/File/CsvTest.php | 2 ++ .../Interception/Code/Generator/InterceptorTest.php | 2 ++ .../Framework/Interception/Code/InterfaceValidatorTest.php | 2 ++ .../Model/InterfaceValidator/ItemPlugin/ExtraParameters.php | 3 +++ .../ItemPlugin/IncompatibleArgumentsCount.php | 3 +++ .../ItemPlugin/IncompatibleArgumentsType.php | 3 +++ .../Model/InterfaceValidator/ItemPlugin/InvalidProceed.php | 3 +++ .../Model/InterfaceValidator/ItemPlugin/ValidPlugin.php | 3 +++ .../testsuite/Magento/Framework/Less/FileGeneratorTest.php | 2 ++ .../Framework/Less/PreProcessor/Instruction/ImportTest.php | 2 ++ .../Less/PreProcessor/Instruction/MagentoImportTest.php | 2 ++ .../unit/testsuite/Magento/Framework/Locale/ConfigTest.php | 2 ++ .../unit/testsuite/Magento/Framework/Locale/CurrencyTest.php | 2 ++ .../Magento/Framework/Model/Resource/Db/AbstractDbTest.php | 2 ++ .../Model/Resource/Db/Collection/AbstractCollectionTest.php | 2 ++ .../Magento/Framework/Mview/Config/Data/ProxyTest.php | 3 +++ .../unit/testsuite/Magento/Framework/Mview/ConfigTest.php | 3 +++ .../Magento/Framework/Mview/View/CollectionTest.php | 3 +++ .../Magento/Framework/Mview/View/SubscriptionFactoryTest.php | 3 +++ .../Magento/Framework/Mview/View/SubscriptionTest.php | 3 +++ .../ObjectManager/Config/Reader/_files/ConfigDomMock.php | 2 ++ .../Magento/Framework/Phrase/Renderer/CompositeTest.php | 3 +++ .../unit/testsuite/Magento/Framework/Session/ConfigTest.php | 2 ++ dev/tests/unit/testsuite/Magento/Framework/ShellTest.php | 3 +++ .../Magento/Framework/Stdlib/Cookie/CookieScopeTest.php | 2 ++ .../Magento/Framework/Stdlib/Cookie/PhpCookieManagerTest.php | 2 ++ dev/tests/unit/testsuite/Magento/Framework/UrlTest.php | 2 ++ .../testsuite/Magento/Framework/ValidatorFactoryTest.php | 3 +++ .../testsuite/Magento/Framework/View/Asset/MergedTest.php | 3 +++ .../Framework/View/Asset/ModuleNotation/ResolverTest.php | 2 ++ .../Framework/View/Asset/PreProcessor/ModuleNotationTest.php | 2 ++ .../Magento/Framework/View/Asset/RepositoryTest.php | 2 ++ .../testsuite/Magento/Framework/View/Asset/SourceTest.php | 2 ++ .../unit/testsuite/Magento/Framework/View/BlockPoolTest.php | 2 ++ .../testsuite/Magento/Framework/View/DataSourcePoolTest.php | 2 ++ .../Design/FileResolution/Fallback/CacheData/FlatTest.php | 2 ++ .../Design/FileResolution/Fallback/CacheData/GroupedTest.php | 2 ++ .../FileResolution/Fallback/Resolver/AlternativeTest.php | 2 ++ .../Design/FileResolution/Fallback/Resolver/SimpleTest.php | 2 ++ .../Magento/Framework/View/Design/Theme/ImageTest.php | 2 ++ .../View/File/Collector/Decorator/ModuleDependencyTest.php | 2 ++ .../View/File/Collector/Decorator/ModuleOutputTest.php | 2 ++ .../Framework/View/File/Collector/Override/BaseTest.php | 2 ++ .../View/File/Collector/Override/ThemeModularTest.php | 2 ++ .../testsuite/Magento/Framework/View/File/FileListTest.php | 2 ++ .../unit/testsuite/Magento/Framework/View/FileSystemTest.php | 2 ++ .../Magento/Framework/View/Layout/Reader/MoveTest.php | 2 ++ .../testsuite/Magento/Framework/View/Result/LayoutTest.php | 2 ++ .../Framework/View/TemplateEngine/_files/simple.phtml | 3 +++ .../Magento/GiftMessage/Model/GiftMessageManagerTest.php | 2 ++ .../Magento/GiftMessage/Model/Type/Plugin/OnepageTest.php | 2 ++ .../Magento/GiftMessage/Service/V1/ReadServiceTest.php | 2 ++ .../Magento/Indexer/Model/Processor/InvalidateCacheTest.php | 2 ++ .../Controller/Adminhtml/Integration/DeleteTest.php | 3 +++ .../Controller/Adminhtml/Integration/EditTest.php | 3 +++ .../Controller/Adminhtml/Integration/NewActionTest.php | 3 +++ .../Adminhtml/Integration/PermissionsDialogTest.php | 3 +++ .../Controller/Adminhtml/Integration/SaveTest.php | 3 +++ .../Controller/Adminhtml/Integration/TokensDialogTest.php | 3 +++ .../unit/testsuite/Magento/Integration/Oauth/OauthTest.php | 3 +++ .../Magento/Integration/Service/V1/AdminTokenServiceTest.php | 2 ++ dev/tests/unit/testsuite/Magento/Msrp/Helper/DataTest.php | 2 ++ .../Multishipping/Block/Checkout/Address/SelectTest.php | 3 +++ .../Magento/Multishipping/Block/Checkout/OverviewTest.php | 2 ++ .../Multishipping/Block/Checkout/Payment/InfoTest.php | 2 ++ .../Magento/Multishipping/Block/Checkout/ShippingTest.php | 2 ++ .../Magento/Multishipping/Block/Checkout/StateTest.php | 2 ++ .../Magento/Multishipping/Block/Checkout/SuccessTest.php | 2 ++ .../Controller/Checkout/Address/EditAddressTest.php | 3 +++ .../Controller/Checkout/Address/EditBillingTest.php | 3 +++ .../Controller/Checkout/Address/EditShippingTest.php | 3 +++ .../Controller/Checkout/Address/NewBillingTest.php | 3 +++ .../Controller/Checkout/Address/NewShippingTest.php | 3 +++ .../Magento/Newsletter/Controller/Manage/SaveTest.php | 3 +++ .../testsuite/Magento/PageCache/Controller/Block/EsiTest.php | 3 +++ .../Magento/PageCache/Controller/Block/RenderTest.php | 2 ++ .../PageCache/Model/Controller/Result/BuiltinPluginTest.php | 3 +++ .../Magento/PageCache/Model/Observer/FlushAllCacheTest.php | 3 +++ .../PageCache/Model/Observer/FlushCacheByTagsTest.php | 3 +++ .../Model/Observer/ProcessLayoutRenderElementTest.php | 3 +++ dev/tests/unit/testsuite/Magento/Payment/Block/FormTest.php | 3 +++ .../Magento/Payment/Block/Info/SubstitutionTest.php | 2 ++ .../Magento/Payment/Model/Config/Source/AllmethodsTest.php | 2 ++ .../unit/testsuite/Magento/Payment/Model/ConfigTest.php | 2 ++ .../unit/testsuite/Magento/Payment/Model/MethodListTest.php | 2 ++ .../Model/Observer/ApplyBlockPersistentDataTest.php | 3 +++ .../Persistent/Model/Observer/RemovePersistentCookieTest.php | 2 ++ .../Persistent/Model/Observer/UpdateCustomerCookiesTest.php | 3 +++ .../testsuite/Magento/Persistent/Model/QuoteManagerTest.php | 2 ++ .../Resource/Report/Collection/AbstractCollectionTest.php | 5 ++++- .../Magento/Review/Controller/Adminhtml/Product/PostTest.php | 2 ++ .../unit/testsuite/Magento/Rss/Model/RssManagerTest.php | 2 ++ .../unit/testsuite/Magento/Rss/Model/UrlBuilderTest.php | 2 ++ .../Rule/Model/Condition/Product/AbstractProductTest.php | 2 ++ .../Sales/Block/Adminhtml/Order/Create/Items/GridTest.php | 3 +++ .../Sales/Block/Adminhtml/Order/Create/TotalsTest.php | 3 +++ .../Sales/Block/Order/Email/Items/DefaultItemsTest.php | 3 +++ .../Sales/Block/Order/Email/Items/Order/DefaultOrderTest.php | 3 +++ .../Sales/Block/Order/Item/Renderer/DefaultRendererTest.php | 3 +++ .../Sales/Controller/Adminhtml/Order/Creditmemo/SaveTest.php | 3 +++ .../Magento/Sales/Helper/Quote/Item/CompareTest.php | 2 ++ .../testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php | 3 +++ .../Magento/Sales/Model/Grid/Child/CollectionUpdaterTest.php | 2 ++ .../Magento/Sales/Model/Grid/CollectionUpdaterTest.php | 2 ++ .../Sales/Model/Observer/Backend/CustomerQuoteTest.php | 3 +++ .../Observer/Frontend/Quote/Address/CollectTotalsTest.php | 3 +++ .../Magento/Sales/Model/Order/Creditmemo/Total/TaxTest.php | 3 +++ .../testsuite/Magento/Sales/Model/Order/CreditmemoTest.php | 3 +++ .../Magento/Sales/Model/Order/Invoice/Total/ShippingTest.php | 3 +++ .../unit/testsuite/Magento/Sales/Model/Order/InvoiceTest.php | 3 +++ .../unit/testsuite/Magento/Sales/Model/Quote/AddressTest.php | 3 +++ .../unit/testsuite/Magento/Sales/Model/Quote/ItemTest.php | 3 +++ dev/tests/unit/testsuite/Magento/Sales/Model/QuoteTest.php | 3 +++ .../testsuite/Magento/Sales/Model/Resource/GridPoolTest.php | 3 +++ .../Magento/Sales/Model/Resource/Order/StatusTest.php | 3 +++ .../SalesRule/Model/Resource/Report/CollectionTest.php | 3 +++ .../Controller/Adminhtml/Order/Shipment/AddTrackTest.php | 2 ++ .../Controller/Adminhtml/Order/Shipment/SaveTest.php | 2 ++ .../unit/testsuite/Magento/Shipping/Model/ShipmentTest.php | 2 ++ .../Magento/Store/App/Action/Plugin/ContextTest.php | 2 ++ .../Magento/Store/App/Action/Plugin/StoreCheckTest.php | 3 +++ .../Magento/Store/Model/Config/Reader/ReaderPoolTest.php | 3 +++ .../unit/testsuite/Magento/Store/Model/Storage/DbTest.php | 3 +++ dev/tests/unit/testsuite/Magento/Store/Model/StoreTest.php | 3 +++ .../Magento/Tax/Block/Checkout/Cart/Sidebar/TotalsTest.php | 3 +++ dev/tests/unit/testsuite/Magento/Tax/Helper/DataTest.php | 3 +++ .../Calculation/RowBaseAndTotalBaseCalculatorTestCase.php | 2 ++ .../unit/testsuite/Magento/Tax/Model/Config/TaxClassTest.php | 2 ++ dev/tests/unit/testsuite/Magento/Tax/Model/ConfigTest.php | 2 ++ .../Tax/Model/Sales/Total/Quote/CommonTaxCollectorTest.php | 3 +++ .../Magento/Tax/Model/Sales/Total/Quote/ShippingTest.php | 3 +++ .../Magento/Tax/Model/Sales/Total/Quote/TaxTest.php | 3 +++ .../Block/Adminhtml/System/Design/Theme/Tab/CssTest.php | 3 +++ .../Magento/Theme/Model/Url/Plugin/SignatureTest.php | 2 ++ .../Magento/Tools/Di/Compiler/ArgumentsResolverTest.php | 3 +++ .../testsuite/Magento/Tools/Di/Definition/CollectionTest.php | 3 +++ .../unit/testsuite/Magento/Tools/I18n/Parser/ParserTest.php | 3 +++ .../Magento/UrlRewrite/Block/Catalog/Edit/FormTest.php | 2 ++ .../Magento/UrlRewrite/Model/Storage/DbStorageTest.php | 3 +++ .../unit/testsuite/Magento/Webapi/Controller/RestTest.php | 3 +++ .../Magento/Webapi/Controller/Soap/Request/HandlerTest.php | 3 +++ .../unit/testsuite/Magento/Webapi/_files/test_interfaces.php | 3 +++ .../Magento/Weee/Model/Attribute/Backend/Weee/TaxTest.php | 2 ++ .../unit/testsuite/Magento/Weee/Pricing/AdjustmentTest.php | 2 ++ .../testsuite/Magento/Wishlist/Model/Rss/WishlistTest.php | 2 ++ lib/internal/Magento/Framework/Acl/Resource/Provider.php | 3 +++ lib/internal/Magento/Framework/Archive/Helper/File.php | 2 ++ lib/internal/Magento/Framework/Archive/Helper/File/Gz.php | 2 ++ lib/internal/Magento/Framework/Backup/Archive/Tar.php | 2 ++ lib/internal/Magento/Framework/Backup/Db/BackupFactory.php | 3 +++ lib/internal/Magento/Framework/Backup/Factory.php | 3 +++ lib/internal/Magento/Framework/Backup/Filesystem.php | 3 +++ lib/internal/Magento/Framework/Cache/Backend/Database.php | 2 ++ .../Magento/Framework/Cache/Backend/Eaccelerator.php | 3 +++ lib/internal/Magento/Framework/Config/Dom.php | 2 ++ lib/internal/Magento/Framework/CurrencyFactory.php | 3 +++ lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php | 3 +++ lib/internal/Magento/Framework/DB/MapperFactory.php | 2 ++ lib/internal/Magento/Framework/DB/QueryFactory.php | 3 +++ lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php | 2 ++ lib/internal/Magento/Framework/Data/Form/Element/Editor.php | 3 +++ lib/internal/Magento/Framework/Data/Form/Element/Gallery.php | 2 ++ lib/internal/Magento/Framework/Data/Form/Element/Time.php | 2 ++ lib/internal/Magento/Framework/Data/FormFactory.php | 3 +++ lib/internal/Magento/Framework/Encryption/Crypt.php | 3 +++ .../Magento/Framework/Event/Invoker/InvokerDefault.php | 3 +++ lib/internal/Magento/Framework/File/Csv.php | 3 +++ lib/internal/Magento/Framework/File/CsvMulty.php | 2 ++ .../Magento/Framework/File/Transfer/Adapter/Http.php | 2 ++ .../Magento/Framework/Filter/Input/MaliciousCode.php | 3 +++ .../Magento/Framework/Gdata/Gshopping/HttpException.php | 3 +++ lib/internal/Magento/Framework/HTTP/Adapter/Curl.php | 2 ++ lib/internal/Magento/Framework/HTTP/Header.php | 3 +++ lib/internal/Magento/Framework/Image/Factory.php | 3 +++ .../Framework/Interception/Code/Generator/Interceptor.php | 3 +++ lib/internal/Magento/Framework/Io/Sftp.php | 3 +++ .../Framework/Less/PreProcessor/Instruction/Import.php | 2 ++ lib/internal/Magento/Framework/Locale/Lists.php | 3 +++ .../Magento/Framework/Mail/Template/TransportBuilder.php | 3 +++ lib/internal/Magento/Framework/Message/Factory.php | 3 +++ .../Magento/Framework/Model/Resource/AbstractResource.php | 3 +++ .../Model/Resource/Db/Collection/AbstractCollection.php | 3 +++ .../Magento/Framework/Model/Resource/Type/Db/Pdo/Mysql.php | 3 +++ .../Magento/Framework/Module/Plugin/DbStatusValidator.php | 3 +++ lib/internal/Magento/Framework/Module/Resource.php | 3 +++ .../Magento/Framework/Module/Setup/MigrationFactory.php | 3 +++ lib/internal/Magento/Framework/Mview/ActionFactory.php | 3 +++ lib/internal/Magento/Framework/Mview/View.php | 3 +++ lib/internal/Magento/Framework/Mview/View/Subscription.php | 3 +++ .../Framework/ObjectManager/Code/Generator/Persistor.php | 3 +++ .../Framework/ObjectManager/Code/Generator/Repository.php | 3 +++ .../Magento/Framework/ObjectManager/DefinitionFactory.php | 3 +++ .../Magento/Framework/Pricing/Render/RendererPool.php | 3 +++ lib/internal/Magento/Framework/Profiler/Driver/Factory.php | 3 +++ .../Magento/Framework/Stdlib/DateTime/DateInterface.php | 3 +++ .../Magento/Framework/Stdlib/DateTime/TimezoneInterface.php | 3 +++ lib/internal/Magento/Framework/Translate/Adapter.php | 2 ++ .../Magento/Framework/Translate/AdapterInterface.php | 2 ++ lib/internal/Magento/Framework/Translate/Inline.php | 3 +++ lib/internal/Magento/Framework/Url.php | 2 ++ lib/internal/Magento/Framework/UrlFactory.php | 3 +++ lib/internal/Magento/Framework/Validator/Builder.php | 3 +++ .../Magento/Framework/Validator/Constraint/Property.php | 3 +++ .../Magento/Framework/Validator/ConstraintFactory.php | 2 ++ 1442 files changed, 3980 insertions(+), 9 deletions(-) mode change 100755 => 100644 dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php mode change 100755 => 100644 dev/tests/integration/testsuite/Magento/Customer/Controller/AjaxLoginTest.php diff --git a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php index baa57d81bab31..d0e9f207ed4c4 100644 --- a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php +++ b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\AdminNotification\Block\Grid\Renderer; class Actions extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer diff --git a/app/code/Magento/AdminNotification/Block/ToolbarEntry.php b/app/code/Magento/AdminNotification/Block/ToolbarEntry.php index 30d2793ef9d4a..f7c604d0d84a4 100644 --- a/app/code/Magento/AdminNotification/Block/ToolbarEntry.php +++ b/app/code/Magento/AdminNotification/Block/ToolbarEntry.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\AdminNotification\Block; /** diff --git a/app/code/Magento/AdminNotification/Model/Resource/Grid/Collection.php b/app/code/Magento/AdminNotification/Model/Resource/Grid/Collection.php index 33880cfb708b3..242cb283bccde 100644 --- a/app/code/Magento/AdminNotification/Model/Resource/Grid/Collection.php +++ b/app/code/Magento/AdminNotification/Model/Resource/Grid/Collection.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * AdminNotification Inbox model * diff --git a/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php b/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php index e8041a763ce9b..d168b9037bd95 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\AdminNotification\Model\System\Message; class Baseurl implements \Magento\Framework\Notification\MessageInterface diff --git a/app/code/Magento/AdminNotification/Model/System/Message/Media/Synchronization/Error.php b/app/code/Magento/AdminNotification/Model/System/Message/Media/Synchronization/Error.php index cdec54248b89b..03b2ff284af43 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/Media/Synchronization/Error.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/Media/Synchronization/Error.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\AdminNotification\Model\System\Message\Media\Synchronization; class Error extends \Magento\AdminNotification\Model\System\Message\Media\AbstractSynchronization diff --git a/app/code/Magento/AdminNotification/Model/System/Message/Security.php b/app/code/Magento/AdminNotification/Model/System/Message/Security.php index f7e44190cb0e0..99b6868f6cd95 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/Security.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/Security.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\AdminNotification\Model\System\Message; class Security implements \Magento\Framework\Notification\MessageInterface diff --git a/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml index f18d2b5cbd75f..90f099113566e 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> 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 c384f2a10ed42..bf9d006c7f7dd 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?>
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 8ffdbd265e00f..dd880fa47c6da 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/templates/toolbar_entry.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/toolbar_entry.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?> getUnreadNotificationCount(); ?> diff --git a/app/code/Magento/Authorization/Model/Resource/Rules.php b/app/code/Magento/Authorization/Model/Resource/Rules.php index d1f16dbe54a44..8ade47a994e35 100644 --- a/app/code/Magento/Authorization/Model/Resource/Rules.php +++ b/app/code/Magento/Authorization/Model/Resource/Rules.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Authorization\Model\Resource; /** diff --git a/app/code/Magento/Backend/App/Config.php b/app/code/Magento/Backend/App/Config.php index f4fb411577330..ab9f053b99fd5 100644 --- a/app/code/Magento/Backend/App/Config.php +++ b/app/code/Magento/Backend/App/Config.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\App; /** diff --git a/app/code/Magento/Backend/Block/Dashboard.php b/app/code/Magento/Backend/Block/Dashboard.php index 2f59e29741bf5..e61baaebd902e 100644 --- a/app/code/Magento/Backend/Block/Dashboard.php +++ b/app/code/Magento/Backend/Block/Dashboard.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block; class Dashboard extends \Magento\Backend\Block\Template diff --git a/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php b/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php index 43f034166cfc8..f6e55363ec65a 100644 --- a/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php +++ b/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Dashboard; /** diff --git a/app/code/Magento/Backend/Block/Menu.php b/app/code/Magento/Backend/Block/Menu.php index b77cb7c86c49a..7413dc5c7a882 100644 --- a/app/code/Magento/Backend/Block/Menu.php +++ b/app/code/Magento/Backend/Block/Menu.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block; /** diff --git a/app/code/Magento/Backend/Block/Page/Header.php b/app/code/Magento/Backend/Block/Page/Header.php index 39574f1ec1572..08ed3799f8594 100644 --- a/app/code/Magento/Backend/Block/Page/Header.php +++ b/app/code/Magento/Backend/Block/Page/Header.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Page; /** diff --git a/app/code/Magento/Backend/Block/Page/Notices.php b/app/code/Magento/Backend/Block/Page/Notices.php index 20d8be4eaf0ae..b7e5cb9c71653 100644 --- a/app/code/Magento/Backend/Block/Page/Notices.php +++ b/app/code/Magento/Backend/Block/Page/Notices.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Adminhtml header notices block * diff --git a/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php b/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php index 4ce4762158642..867f138c7f49a 100644 --- a/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php +++ b/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Page\System\Config\Robots; /** diff --git a/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php b/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php index a983e672e0934..dc4a2e0abbd71 100644 --- a/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php +++ b/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Store\Switcher\Form\Renderer; /** diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field.php b/app/code/Magento/Backend/Block/System/Config/Form/Field.php index f97740950c7ac..91415bce932aa 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Abstract config form element renderer * diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php index c853eabc971be..e07c3d0ebeb54 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\System\Config\Form\Field\FieldArray; /** diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/Select/Allowspecific.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/Select/Allowspecific.php index efd49c6284673..ae28b64a46907 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/Select/Allowspecific.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/Select/Allowspecific.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * System configuration shipping methods allow all countries select * diff --git a/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php b/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php index 1b2a4d6196064..239dc7d2cc2d5 100644 --- a/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php +++ b/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\System\Design\Edit\Tab; class General extends \Magento\Backend\Block\Widget\Form\Generic diff --git a/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php b/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php index 70fbebbb72b7d..f7e17e2f8c5bd 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Form\Element; use Magento\Framework\Data\Form\Element\AbstractElement; diff --git a/app/code/Magento/Backend/Block/Widget/Form/Renderer/Element.php b/app/code/Magento/Backend/Block/Widget/Form/Renderer/Element.php index 028e461fc1c92..c7819085ba9a2 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Renderer/Element.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Renderer/Element.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Form\Renderer; use Magento\Framework\Data\Form\Element\AbstractElement; diff --git a/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset.php b/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset.php index 230557518ce53..d073b6e758a09 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Form\Renderer; use Magento\Framework\Data\Form\Element\AbstractElement; diff --git a/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset/Element.php b/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset/Element.php index 66953aae94e37..6913efdc47904 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset/Element.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset/Element.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Form\Renderer\Fieldset; use Magento\Framework\Data\Form\Element\AbstractElement; diff --git a/app/code/Magento/Backend/Block/Widget/Grid.php b/app/code/Magento/Backend/Block/Widget/Grid.php index f089a3e0603e2..d0195ea6753ad 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid.php +++ b/app/code/Magento/Backend/Block/Widget/Grid.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget; /** diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php index 239c649110ee6..f7fdad4c65c15 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Grid\Column\Filter; /** diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php index 47f5e07ccc017..3ea080c4876f1 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Grid\Column\Filter; /** diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php index 33630b4a59abd..45e03bd1d9045 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Grid\Column\Renderer; /** diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php index 076ff34ceda09..c479c14c770b6 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Grid\Column\Renderer; /** diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Export.php b/app/code/Magento/Backend/Block/Widget/Grid/Export.php index 5ec6857e3ab3e..6ad2a1b2b7d9e 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Export.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Export.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Block\Widget\Grid; use Magento\Framework\App\Filesystem\DirectoryList; diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php index 92e18a9b7c757..18eba24c23a0a 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Controller\Adminhtml\System; use Magento\Backend\App\Action; diff --git a/app/code/Magento/Backend/Model/Config/Backend/Currency/Base.php b/app/code/Magento/Backend/Model/Config/Backend/Currency/Base.php index 930f2655009e3..212d6c5abfed6 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Currency/Base.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Currency/Base.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * Backend Directory currency backend model * Allows dispatching before and after events for each controller action diff --git a/app/code/Magento/Backend/Model/Config/Backend/Email/Sender.php b/app/code/Magento/Backend/Model/Config/Backend/Email/Sender.php index 0a670a2ca9ff0..b6d066148966c 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Email/Sender.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Email/Sender.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ +// @codingStandardsIgnoreFile + /** * System config email sender field backend model */ diff --git a/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php b/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php index ca827699e2f92..464cc4a897a58 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php @@ -4,6 +4,9 @@ * * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Config\Backend; class Encrypted extends \Magento\Framework\App\Config\Value implements \Magento\Framework\App\Config\Data\ProcessorInterface diff --git a/app/code/Magento/Backend/Model/Config/Source/Dev/Dbautoup.php b/app/code/Magento/Backend/Model/Config/Source/Dev/Dbautoup.php index 5ee09db4892ee..ded1c1b303b29 100644 --- a/app/code/Magento/Backend/Model/Config/Source/Dev/Dbautoup.php +++ b/app/code/Magento/Backend/Model/Config/Source/Dev/Dbautoup.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Config\Source\Dev; class Dbautoup implements \Magento\Framework\Option\ArrayInterface diff --git a/app/code/Magento/Backend/Model/Config/Structure/Element/Group.php b/app/code/Magento/Backend/Model/Config/Structure/Element/Group.php index ec69736a68734..9d79c7434062f 100644 --- a/app/code/Magento/Backend/Model/Config/Structure/Element/Group.php +++ b/app/code/Magento/Backend/Model/Config/Structure/Element/Group.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Config\Structure\Element; class Group extends AbstractComposite diff --git a/app/code/Magento/Backend/Model/Menu/Director/Director.php b/app/code/Magento/Backend/Model/Menu/Director/Director.php index 0d77330ecb0c5..c1178d64e3dd0 100644 --- a/app/code/Magento/Backend/Model/Menu/Director/Director.php +++ b/app/code/Magento/Backend/Model/Menu/Director/Director.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Menu\Director; class Director extends \Magento\Backend\Model\Menu\AbstractDirector diff --git a/app/code/Magento/Backend/Model/Menu/Item.php b/app/code/Magento/Backend/Model/Menu/Item.php index 8091747ede2cd..a98a0083320ed 100644 --- a/app/code/Magento/Backend/Model/Menu/Item.php +++ b/app/code/Magento/Backend/Model/Menu/Item.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Menu; /** diff --git a/app/code/Magento/Backend/Model/Widget/Grid/AbstractTotals.php b/app/code/Magento/Backend/Model/Widget/Grid/AbstractTotals.php index c9aaee1255303..bb6d1f321485f 100644 --- a/app/code/Magento/Backend/Model/Widget/Grid/AbstractTotals.php +++ b/app/code/Magento/Backend/Model/Widget/Grid/AbstractTotals.php @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + namespace Magento\Backend\Model\Widget\Grid; abstract class AbstractTotals implements \Magento\Backend\Model\Widget\Grid\TotalsInterface diff --git a/app/code/Magento/Backend/view/adminhtml/templates/admin/access_denied.phtml b/app/code/Magento/Backend/view/adminhtml/templates/admin/access_denied.phtml index d2f903e71e504..da046cab0592d 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/admin/access_denied.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/admin/access_denied.phtml @@ -2,6 +2,9 @@ /** * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) */ + +// @codingStandardsIgnoreFile + ?>