From 7b8522c85d101ccf7a6aa867956b9c1075c89bf9 Mon Sep 17 00:00:00 2001 From: Yaroslav Zenin Date: Tue, 13 Oct 2020 10:41:31 +0300 Subject: [PATCH 01/20] fix undefined method isAllowedForRuleCondition --- app/code/Magento/SalesRule/Model/Rule/Condition/Product.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/SalesRule/Model/Rule/Condition/Product.php b/app/code/Magento/SalesRule/Model/Rule/Condition/Product.php index ff83bb1ee912..0429786caffa 100644 --- a/app/code/Magento/SalesRule/Model/Rule/Condition/Product.php +++ b/app/code/Magento/SalesRule/Model/Rule/Condition/Product.php @@ -68,9 +68,8 @@ public function loadAttributeOptions() $attributes = []; foreach ($productAttributes as $attribute) { /* @var $attribute \Magento\Catalog\Model\ResourceModel\Eav\Attribute */ - if (!$attribute->isAllowedForRuleCondition() - || !$attribute->getDataUsingMethod($this->_isUsedForRuleProperty) - ) { + if (!$attribute->getDataUsingMethod($this->_isUsedForRuleProperty) + || !$attribute->isAllowedForRuleCondition()) { continue; } $frontLabel = $attribute->getFrontendLabel(); From 981cd295b4e8eb5c7a318f7abc77098ea182c985 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" Date: Mon, 26 Oct 2020 12:12:30 +0200 Subject: [PATCH 02/20] add unit test --- .../Unit/Model/Rule/Condition/ProductTest.php | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/ProductTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/ProductTest.php index 22627717a47f..def46fc1f2dd 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/ProductTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/ProductTest.php @@ -11,6 +11,7 @@ use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Model\ProductCategoryList; use Magento\Catalog\Model\ProductFactory; +use Magento\Catalog\Model\ResourceModel\Eav\Attribute; use Magento\Catalog\Model\ResourceModel\Product; use Magento\Directory\Model\CurrencyFactory; use Magento\Eav\Model\Config; @@ -319,6 +320,73 @@ public function testQuoteLocaleFormatPrice($isValid, $conditionValue, $operator $this->assertEquals($isValid, $this->model->setValue($conditionValue)->validate($item)); } + /** + * Test for loadAttributeOptions + * + * @return void + */ + public function testLoadAttributeOptions(): void + { + $secondAttributeCode = 'second_attribute'; + + $attribute = $this->getMockBuilder(Attribute::class) + ->onlyMethods(['getDataUsingMethod']) + ->disableOriginalConstructor() + ->getMock(); + $attribute->expects($this->atLeastOnce()) + ->method('getDataUsingMethod') + ->with('is_used_for_promo_rules') + ->willReturn(false); + + $attributeSecond = $this->getMockBuilder(Attribute::class) + ->onlyMethods(['getDataUsingMethod', 'isAllowedForRuleCondition', 'getAttributeCode']) + ->addMethods(['getFrontendLabel']) + ->disableOriginalConstructor() + ->getMock(); + $attributeSecond->expects($this->atLeastOnce()) + ->method('getDataUsingMethod') + ->with('is_used_for_promo_rules') + ->willReturn(true); + $attributeSecond->expects($this->atLeastOnce()) + ->method('isAllowedForRuleCondition') + ->willReturn(true); + $attributeSecond->expects($this->atLeastOnce()) + ->method('getFrontendLabel') + ->willReturn('Second Attribute'); + $attributeSecond->expects($this->atLeastOnce()) + ->method('getAttributeCode') + ->willReturn($secondAttributeCode); + + $attributeLoaderInterfaceMock = $this->createMock(AbstractEntity::class); + $attributeLoaderInterfaceMock->expects($this->atLeastOnce()) + ->method('getAttributesByCode') + ->willReturn([$attribute, $attributeSecond]); + + $productResourceMock = $this->createMock(Product::class); + $productResourceMock->expects($this->atLeastOnce()) + ->method('loadAllAttributes') + ->willReturn($attributeLoaderInterfaceMock); + + $model = new SalesRuleProduct( + $this->contextMock, + $this->backendHelperMock, + $this->configMock, + $this->productFactoryMock, + $this->productRepositoryMock, + $productResourceMock, + $this->collectionMock, + $this->format, + [], + $this->productCategoryListMock + ); + + $model->loadAttributeOptions(); + + $this->assertArrayHasKey($secondAttributeCode, $model->getAttributeOption()); + $this->assertArrayHasKey('children::' . $secondAttributeCode, $model->getAttributeOption()); + $this->assertArrayHasKey('parent::' . $secondAttributeCode, $model->getAttributeOption()); + } + /** * DataProvider for testQuoteLocaleFormatPrice * From 9d537765e4c004557dd9bced78ef25e63f170295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Szubert?= Date: Tue, 30 Mar 2021 00:42:24 +0200 Subject: [PATCH 03/20] Removed unnecessary spacing on backend grid --- .../adminhtml/templates/widget/grid.phtml | 95 ++++++++++--------- 1 file changed, 49 insertions(+), 46 deletions(-) diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml index 6f9344d7e1d7..1b2cee5cf327 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml @@ -4,6 +4,10 @@ * See COPYING.txt for license details. */ +use Magento\Backend\Block\Widget\Grid; +use Magento\Framework\Escaper; +use Magento\Framework\View\Helper\SecureHtmlRenderer; + ?> getColumns() !== null ? count($block->getColumns()): 0; +$numColumns = $block->getColumns() !== null ? count($block->getColumns()) : 0; ?> getCollection()): ?> - canDisplayContainer()): ?> -
+
getLayout()->getMessagesBlock()->getGroupedHtml() ?> @@ -45,7 +49,7 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()): 0;
-
+
getChildHtml('grid.massaction') ?> @@ -54,20 +58,19 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()): 0; getCollection()->getSize(); ?>
- getUiId('total-count') ?>> - escapeHtml(__('records found')) ?> - escapeHtml(__('records found')) ?> + 0 - escapeHtml(__('selected')) ?> - + escapeHtml(__('selected')) ?>
getPagerVisibility()): ?>
- - +
getCollection()->getCurPage() ?> getCollection()->getLastPageNumber() ?> 1): ?> renderEventListenerAsTag( 'onclick', /* @noEscape */ $block->getJsObjectName() . '.setPage(\'' . /* @noEscape */ ($_curPage - 1) . '\');event.preventDefault();', - 'div#' . $block->escapeJs($block->getId()) . + 'div#' . $escaper->escapeJs($block->getId()) . ' .admin__data-grid-pager button.action-previous:not(.disabled)' ) ?> getUiId('current-page') ?> /> @@ -121,29 +124,29 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()): 0; 'onkeypress', /* @noEscape */ $block->getJsObjectName() . '.inputPage(event, \'' . /* @noEscape */ $_lastPage . '\')', - '#' . $block->escapeHtml($block->getHtmlId()) . '_page-current' + '#' . $escaper->escapeHtml($block->getHtmlId()) . '_page-current' ) ?> - - renderEventListenerAsTag( 'onclick', /* @noEscape */ $block->getJsObjectName() . '.setPage(\'' . /* @noEscape */ ($_curPage + 1) . '\');event.preventDefault();', - 'div#' . $block->escapeJs($block->getId()) . + 'div#' . $escaper->escapeJs($block->getId()) . ' .admin__data-grid-pager button.action-next:not(.disabled)' ) ?>
@@ -153,14 +156,14 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()): 0;
getGridCssClass()): ?> - +
getChildHtml('grid.columnSet') ?>
- +
getChildHtml('grid.columnSet') ?>
@@ -191,44 +194,44 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()): 0; require(deps, function('. ($block->getDependencyJsObject() ? 'registry' : '') .'){' . PHP_EOL; //TODO: getJsObjectName and getRowClickCallback has unexpected behavior. Should be removed if ($block->getDependencyJsObject()) { - $scriptString .= 'registry.get(\'' . $block->escapeJs($block->getDependencyJsObject()) . - '\', function ('. $block->escapeJs($block->getDependencyJsObject()) . ') {' . PHP_EOL; + $scriptString .= 'registry.get(\'' . $escaper->escapeJs($block->getDependencyJsObject()) . + '\', function ('. $escaper->escapeJs($block->getDependencyJsObject()) . ') {' . PHP_EOL; } - $scriptString .= $block->escapeJs($block->getJsObjectName()) . ' = new varienGrid(\'' . - $block->escapeJs($block->getId()) . '\', \'' . $block->escapeJs($block->getGridUrl()) . '\', \'' . - $block->escapeJs($block->getVarNamePage()) .'\', \'' . - $block->escapeJs($block->getVarNameSort()) . '\', \'' . - $block->escapeJs($block->getVarNameDir()) . '\', \'' . $block->escapeJs($block->getVarNameFilter()) .'\'); + $scriptString .= $escaper->escapeJs($block->getJsObjectName()) . ' = new varienGrid(\'' . + $escaper->escapeJs($block->getId()) . '\', \'' . $escaper->escapeJs($block->getGridUrl()) . '\', \'' . + $escaper->escapeJs($block->getVarNamePage()) .'\', \'' . + $escaper->escapeJs($block->getVarNameSort()) . '\', \'' . + $escaper->escapeJs($block->getVarNameDir()) . '\', \'' . $escaper->escapeJs($block->getVarNameFilter()) .'\'); ' . PHP_EOL; - $scriptString .= $block->escapeJs($block->getJsObjectName()) . '.useAjax = ' . - (/* @noEscape */ $block->escapeJs($block->getUseAjax()) ? 'true' : 'false') . ';' . PHP_EOL; + $scriptString .= $escaper->escapeJs($block->getJsObjectName()) . '.useAjax = ' . + (/* @noEscape */ $escaper->escapeJs($block->getUseAjax()) ? 'true' : 'false') . ';' . PHP_EOL; if ($block->getRowClickCallback()) { - $scriptString .= $block->escapeJs($block->getJsObjectName()) . '.rowClickCallback = ' . + $scriptString .= $escaper->escapeJs($block->getJsObjectName()) . '.rowClickCallback = ' . /* @noEscape */ $block->getRowClickCallback() . ';' . PHP_EOL; } if ($block->getCheckboxCheckCallback()) { - $scriptString .= $block->escapeJs($block->getJsObjectName()) . '.checkboxCheckCallback = ' . + $scriptString .= $escaper->escapeJs($block->getJsObjectName()) . '.checkboxCheckCallback = ' . /* @noEscape */ $block->getCheckboxCheckCallback() . ';' . PHP_EOL; } if ($block->getSortableUpdateCallback()) { - $scriptString .= $block->escapeJs($block->getJsObjectName()) . '.sortableUpdateCallback = ' . + $scriptString .= $escaper->escapeJs($block->getJsObjectName()) . '.sortableUpdateCallback = ' . /* @noEscape */ $block->getSortableUpdateCallback() . ';' . PHP_EOL; } if ($block->getFilterKeyPressCallback()) { - $scriptString .= $block->escapeJs($block->getJsObjectName()) . '.filterKeyPressCallback = ' . + $scriptString .= $escaper->escapeJs($block->getJsObjectName()) . '.filterKeyPressCallback = ' . /* @noEscape */ $block->getFilterKeyPressCallback() . ';' . PHP_EOL; } - $scriptString .= $block->escapeJs($block->getJsObjectName()) . '.bindSortable();' . PHP_EOL; + $scriptString .= $escaper->escapeJs($block->getJsObjectName()) . '.bindSortable();' . PHP_EOL; if ($block->getRowInitCallback()) { - $scriptString .= $block->escapeJs($block->getJsObjectName()) . '.initRowCallback = ' . + $scriptString .= $escaper->escapeJs($block->getJsObjectName()) . '.initRowCallback = ' . /* @noEscape */ $block->getRowInitCallback() . ';' . PHP_EOL; - $scriptString .= $block->escapeJs($block->getJsObjectName()) . '..initGridRows();' . PHP_EOL; + $scriptString .= $escaper->escapeJs($block->getJsObjectName()) . '..initGridRows();' . PHP_EOL; } if ($block->getChildBlock('grid.massaction') && From ec910362091e53cbad4130fd12449b50f4a33978 Mon Sep 17 00:00:00 2001 From: Tiago Sampaio Date: Thu, 15 Jul 2021 22:17:30 -0300 Subject: [PATCH 04/20] Cleaning up unused code. --- .../Model/ProductCollectionStockCondition.php | 1 - .../Model/ResourceModel/Stock/Item/StockItemCriteria.php | 8 ++++---- .../ResourceModel/Stock/Status/StockStatusCriteria.php | 6 +++--- app/code/Magento/CatalogInventory/Model/StockRegistry.php | 6 +++--- .../CatalogInventory/Model/StockRegistryProvider.php | 1 - .../Setup/Patch/Data/ConvertSerializedDataToJson.php | 1 - .../Setup/Patch/Data/CreateDefaultStock.php | 1 - .../Setup/Patch/Data/UpdateStockItemsWebsite.php | 1 - 8 files changed, 10 insertions(+), 15 deletions(-) diff --git a/app/code/Magento/CatalogInventory/Model/ProductCollectionStockCondition.php b/app/code/Magento/CatalogInventory/Model/ProductCollectionStockCondition.php index 8de5f9821d14..a25164310bbf 100644 --- a/app/code/Magento/CatalogInventory/Model/ProductCollectionStockCondition.php +++ b/app/code/Magento/CatalogInventory/Model/ProductCollectionStockCondition.php @@ -6,7 +6,6 @@ namespace Magento\CatalogInventory\Model; use Magento\Catalog\Model\CollectionConditionInterface; -use Magento\Eav\Model\Entity\Collection\AbstractCollection; use Magento\Framework\Data\Collection\AbstractDb; use Magento\Framework\Data\CollectionModifierInterface; diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Item/StockItemCriteria.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Item/StockItemCriteria.php index 3d82ab247c4a..bb88312e16e9 100644 --- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Item/StockItemCriteria.php +++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Item/StockItemCriteria.php @@ -6,13 +6,13 @@ namespace Magento\CatalogInventory\Model\ResourceModel\Stock\Item; +use Magento\CatalogInventory\Api\StockItemCriteriaInterface; use Magento\Framework\Data\AbstractCriteria; -use Magento\CatalogInventory\Model\ResourceModel\Stock\Item\StockItemCriteriaMapper; /** * Class StockItemCriteria */ -class StockItemCriteria extends AbstractCriteria implements \Magento\CatalogInventory\Api\StockItemCriteriaInterface +class StockItemCriteria extends AbstractCriteria implements StockItemCriteriaInterface { /** * @param string $mapper @@ -80,10 +80,10 @@ public function setQtyFilter($comparisonMethod, $qty) /** * Add Criteria object * - * @param \Magento\CatalogInventory\Api\StockItemCriteriaInterface $criteria + * @param StockItemCriteriaInterface $criteria * @return bool */ - public function addCriteria(\Magento\CatalogInventory\Api\StockItemCriteriaInterface $criteria) + public function addCriteria(StockItemCriteriaInterface $criteria) { $this->data[self::PART_CRITERIA_LIST]['list'][] = $criteria; return true; diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Status/StockStatusCriteria.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Status/StockStatusCriteria.php index 5ae69362ab6a..7509bb4544bf 100644 --- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Status/StockStatusCriteria.php +++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Status/StockStatusCriteria.php @@ -6,13 +6,13 @@ namespace Magento\CatalogInventory\Model\ResourceModel\Stock\Status; +use Magento\CatalogInventory\Api\StockStatusCriteriaInterface; use Magento\Framework\Data\AbstractCriteria; -use Magento\CatalogInventory\Model\ResourceModel\Stock\Status\StockStatusCriteriaMapper; /** * Class StockStatusCriteria */ -class StockStatusCriteria extends AbstractCriteria implements \Magento\CatalogInventory\Api\StockStatusCriteriaInterface +class StockStatusCriteria extends AbstractCriteria implements StockStatusCriteriaInterface { /** * @param string $mapper @@ -50,7 +50,7 @@ public function setQtyFilter($qty) /** * @inheritdoc */ - public function addCriteria(\Magento\CatalogInventory\Api\StockStatusCriteriaInterface $criteria) + public function addCriteria(StockStatusCriteriaInterface $criteria) { $this->data[self::PART_CRITERIA_LIST]['list'][] = $criteria; } diff --git a/app/code/Magento/CatalogInventory/Model/StockRegistry.php b/app/code/Magento/CatalogInventory/Model/StockRegistry.php index f60edee33019..9f0ad4f73599 100644 --- a/app/code/Magento/CatalogInventory/Model/StockRegistry.php +++ b/app/code/Magento/CatalogInventory/Model/StockRegistry.php @@ -80,7 +80,7 @@ public function getStock($scopeId = null) /** * @param int $productId * @param int $scopeId - * @return \Magento\CatalogInventory\Api\Data\StockItemInterface + * @return StockItemInterface */ public function getStockItem($productId, $scopeId = null) { @@ -91,7 +91,7 @@ public function getStockItem($productId, $scopeId = null) /** * @param string $productSku * @param int $scopeId - * @return \Magento\CatalogInventory\Api\Data\StockItemInterface + * @return StockItemInterface * @throws \Magento\Framework\Exception\NoSuchEntityException */ public function getStockItemBySku($productSku, $scopeId = null) @@ -167,7 +167,7 @@ public function getLowStockItems($scopeId, $qty, $currentPage = 1, $pageSize = 0 /** * @inheritdoc */ - public function updateStockItemBySku($productSku, \Magento\CatalogInventory\Api\Data\StockItemInterface $stockItem) + public function updateStockItemBySku($productSku, StockItemInterface $stockItem) { $productId = $this->resolveProductId($productSku); $websiteId = $stockItem->getWebsiteId() ?: null; diff --git a/app/code/Magento/CatalogInventory/Model/StockRegistryProvider.php b/app/code/Magento/CatalogInventory/Model/StockRegistryProvider.php index 8bdc4288445c..ef0c8755c293 100644 --- a/app/code/Magento/CatalogInventory/Model/StockRegistryProvider.php +++ b/app/code/Magento/CatalogInventory/Model/StockRegistryProvider.php @@ -15,7 +15,6 @@ use Magento\CatalogInventory\Api\StockCriteriaInterfaceFactory; use Magento\CatalogInventory\Api\StockItemCriteriaInterfaceFactory; use Magento\CatalogInventory\Api\StockStatusCriteriaInterfaceFactory; -use Magento\Store\Model\StoreManagerInterface; /** * Class StockRegistryProvider diff --git a/app/code/Magento/CatalogInventory/Setup/Patch/Data/ConvertSerializedDataToJson.php b/app/code/Magento/CatalogInventory/Setup/Patch/Data/ConvertSerializedDataToJson.php index d0ea3da59c51..7a6a581d8fce 100644 --- a/app/code/Magento/CatalogInventory/Setup/Patch/Data/ConvertSerializedDataToJson.php +++ b/app/code/Magento/CatalogInventory/Setup/Patch/Data/ConvertSerializedDataToJson.php @@ -6,7 +6,6 @@ namespace Magento\CatalogInventory\Setup\Patch\Data; -use Magento\Framework\App\ResourceConnection; use Magento\Framework\DB\DataConverter\SerializedToJson; use Magento\Framework\DB\FieldDataConverterFactory; use Magento\Framework\DB\Select\QueryModifierFactory; diff --git a/app/code/Magento/CatalogInventory/Setup/Patch/Data/CreateDefaultStock.php b/app/code/Magento/CatalogInventory/Setup/Patch/Data/CreateDefaultStock.php index ceb353a8091a..6c288144e692 100644 --- a/app/code/Magento/CatalogInventory/Setup/Patch/Data/CreateDefaultStock.php +++ b/app/code/Magento/CatalogInventory/Setup/Patch/Data/CreateDefaultStock.php @@ -8,7 +8,6 @@ use Magento\Eav\Setup\EavSetup; use Magento\Eav\Setup\EavSetupFactory; -use Magento\Framework\App\ResourceConnection; use Magento\Framework\Setup\ModuleDataSetupInterface; use Magento\Framework\Setup\Patch\DataPatchInterface; use Magento\Framework\Setup\Patch\PatchVersionInterface; diff --git a/app/code/Magento/CatalogInventory/Setup/Patch/Data/UpdateStockItemsWebsite.php b/app/code/Magento/CatalogInventory/Setup/Patch/Data/UpdateStockItemsWebsite.php index 9c73da8915b6..7f30eb9bf4bf 100644 --- a/app/code/Magento/CatalogInventory/Setup/Patch/Data/UpdateStockItemsWebsite.php +++ b/app/code/Magento/CatalogInventory/Setup/Patch/Data/UpdateStockItemsWebsite.php @@ -7,7 +7,6 @@ namespace Magento\CatalogInventory\Setup\Patch\Data; use Magento\CatalogInventory\Model\Indexer\Stock\Processor; -use Magento\Framework\App\ResourceConnection; use Magento\Framework\Setup\ModuleDataSetupInterface; use Magento\Framework\Setup\Patch\DataPatchInterface; use Magento\Framework\Setup\Patch\PatchVersionInterface; From 393f69527588bb55d618f6642cb6020e7f922039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anna=20V=C3=B6lkl?= Date: Tue, 20 Jul 2021 12:04:09 +0200 Subject: [PATCH 05/20] :bug: Rename variable Fix variable name, the search engine has nothing to do with a default country in here --- .../Model/Adminhtml/System/Config/Backend/Engine.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/CatalogSearch/Model/Adminhtml/System/Config/Backend/Engine.php b/app/code/Magento/CatalogSearch/Model/Adminhtml/System/Config/Backend/Engine.php index 26edfecea29a..656d09dea747 100644 --- a/app/code/Magento/CatalogSearch/Model/Adminhtml/System/Config/Backend/Engine.php +++ b/app/code/Magento/CatalogSearch/Model/Adminhtml/System/Config/Backend/Engine.php @@ -61,8 +61,8 @@ public function beforeSave() parent::beforeSave(); $value = (string)$this->getValue(); if (empty($value)) { - $defaultCountry = $this->engineResolver->getCurrentSearchEngine(); - $this->setValue($defaultCountry); + $searchEngine = $this->engineResolver->getCurrentSearchEngine(); + $this->setValue($searchEngine); } return $this; } From 41b69117e5a32283184b80da9919c38ad42f2c66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anna=20V=C3=B6lkl?= Date: Tue, 20 Jul 2021 13:54:30 +0200 Subject: [PATCH 06/20] :wrench: Remove uneccessary variable Remove variable assignment --- .../Model/Adminhtml/System/Config/Backend/Engine.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/CatalogSearch/Model/Adminhtml/System/Config/Backend/Engine.php b/app/code/Magento/CatalogSearch/Model/Adminhtml/System/Config/Backend/Engine.php index 656d09dea747..4ac76989516d 100644 --- a/app/code/Magento/CatalogSearch/Model/Adminhtml/System/Config/Backend/Engine.php +++ b/app/code/Magento/CatalogSearch/Model/Adminhtml/System/Config/Backend/Engine.php @@ -61,8 +61,7 @@ public function beforeSave() parent::beforeSave(); $value = (string)$this->getValue(); if (empty($value)) { - $searchEngine = $this->engineResolver->getCurrentSearchEngine(); - $this->setValue($searchEngine); + $this->setValue($this->engineResolver->getCurrentSearchEngine()); } return $this; } From 729dfb0f8fe8576948f2c24e697c337475d54945 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Mon, 6 Mar 2023 17:55:31 +0000 Subject: [PATCH 07/20] Remove forbidden @author tag --- app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php | 2 -- app/code/Magento/Backend/Block/Dashboard/Bar.php | 2 -- app/code/Magento/Backend/Block/Dashboard/Diagrams.php | 2 -- app/code/Magento/Backend/Block/Dashboard/Graph.php | 2 -- app/code/Magento/Backend/Block/Dashboard/Grid.php | 1 - app/code/Magento/Backend/Block/Dashboard/Grids.php | 1 - app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php | 1 - app/code/Magento/Backend/Block/Dashboard/Sales.php | 1 - app/code/Magento/Backend/Block/Dashboard/Tab/Amounts.php | 2 -- app/code/Magento/Backend/Block/Dashboard/Tab/Orders.php | 2 -- .../Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php | 1 - app/code/Magento/Backend/Block/Page.php | 2 -- app/code/Magento/Backend/Block/Page/Footer.php | 1 - app/code/Magento/Backend/Block/Page/Header.php | 1 - app/code/Magento/Backend/Block/Page/Notices.php | 2 -- .../Magento/Backend/Block/Page/System/Config/Robots/Reset.php | 1 - app/code/Magento/Backend/Block/System/Account/Edit.php | 1 - app/code/Magento/Backend/Block/System/Account/Edit/Form.php | 2 -- app/code/Magento/Backend/Block/System/Cache/Edit.php | 2 -- app/code/Magento/Backend/Block/System/Cache/Form.php | 2 -- app/code/Magento/Backend/Block/System/Store/Delete.php | 2 -- app/code/Magento/Backend/Block/System/Store/Delete/Form.php | 2 -- app/code/Magento/Backend/Block/System/Store/Delete/Group.php | 2 -- app/code/Magento/Backend/Block/System/Store/Delete/Website.php | 2 -- .../Magento/Backend/Block/System/Store/Edit/AbstractForm.php | 2 -- app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php | 2 -- app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php | 2 -- .../Magento/Backend/Block/System/Store/Edit/Form/Website.php | 2 -- .../Magento/Backend/Block/System/Store/Grid/Render/Group.php | 2 -- .../Magento/Backend/Block/System/Store/Grid/Render/Store.php | 2 -- .../Magento/Backend/Block/System/Store/Grid/Render/Website.php | 2 -- app/code/Magento/Backend/Block/System/Store/Store.php | 1 - app/code/Magento/Backend/Block/Text/ListText.php | 2 -- app/code/Magento/Backend/Block/Widget/Accordion/Item.php | 2 -- app/code/Magento/Backend/Block/Widget/Breadcrumbs.php | 1 - app/code/Magento/Backend/Block/Widget/Button.php | 1 - app/code/Magento/Backend/Block/Widget/Form/Element.php | 2 -- app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php | 2 -- .../Magento/Backend/Block/Widget/Form/Renderer/Fieldset.php | 1 - .../Backend/Block/Widget/Grid/Column/Filter/Checkbox.php | 2 -- .../Backend/Block/Widget/Grid/Column/Filter/Datetime.php | 1 - .../Backend/Block/Widget/Grid/Column/Filter/Massaction.php | 2 -- .../Magento/Backend/Block/Widget/Grid/Column/Filter/Price.php | 2 -- .../Magento/Backend/Block/Widget/Grid/Column/Filter/Radio.php | 2 -- .../Magento/Backend/Block/Widget/Grid/Column/Filter/Range.php | 2 -- .../Backend/Block/Widget/Grid/Column/Filter/SkipList.php | 2 -- .../Magento/Backend/Block/Widget/Grid/Column/Filter/Text.php | 1 - .../Magento/Backend/Block/Widget/Grid/Massaction/Extended.php | 1 - .../Grid/Massaction/Item/Additional/AdditionalInterface.php | 1 - .../Grid/Massaction/Item/Additional/DefaultAdditional.php | 2 -- app/code/Magento/Backend/Controller/Adminhtml/Dashboard.php | 2 -- app/code/Magento/Backend/Controller/Adminhtml/System.php | 2 -- .../Magento/Backend/Controller/Adminhtml/System/Account.php | 2 -- app/code/Magento/Backend/Controller/Adminhtml/System/Store.php | 1 - app/code/Magento/Backend/Helper/Js.php | 2 -- .../Magento/Backend/Model/Auth/Credential/StorageInterface.php | 1 - app/code/Magento/Backend/Model/Locale/Manager.php | 1 - app/code/Magento/Backend/Model/Search/Order.php | 1 - 58 files changed, 95 deletions(-) diff --git a/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php b/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php index fcd1243ffa9d..afc1674edaff 100644 --- a/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php +++ b/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php @@ -10,8 +10,6 @@ /** * Adminhtml dashboard tab abstract - * - * @author Magento Core Team */ abstract class AbstractDashboard extends \Magento\Backend\Block\Widget { diff --git a/app/code/Magento/Backend/Block/Dashboard/Bar.php b/app/code/Magento/Backend/Block/Dashboard/Bar.php index 65c0aa961edf..0b39e6e9dd7a 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Bar.php +++ b/app/code/Magento/Backend/Block/Dashboard/Bar.php @@ -10,8 +10,6 @@ /** * Adminhtml dashboard bar block - * - * @author Magento Core Team */ class Bar extends \Magento\Backend\Block\Dashboard\AbstractDashboard { diff --git a/app/code/Magento/Backend/Block/Dashboard/Diagrams.php b/app/code/Magento/Backend/Block/Dashboard/Diagrams.php index 7ebb81e3e2fb..944b5ed31a74 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Diagrams.php +++ b/app/code/Magento/Backend/Block/Dashboard/Diagrams.php @@ -9,8 +9,6 @@ * Adminhtml dashboard diagram tabs * @deprecated dashboard graphs were migrated to dynamic chart.js solution * @see dashboard.diagrams in adminhtml_dashboard_index.xml - * - * @author Magento Core Team */ class Diagrams extends \Magento\Backend\Block\Widget\Tabs { diff --git a/app/code/Magento/Backend/Block/Dashboard/Graph.php b/app/code/Magento/Backend/Block/Dashboard/Graph.php index 7811ee948f76..022fb4a06ff4 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Graph.php +++ b/app/code/Magento/Backend/Block/Dashboard/Graph.php @@ -11,8 +11,6 @@ * Adminhtml dashboard google chart block * @deprecated dashboard graphs were migrated to dynamic chart.js solution * @see dashboard.chart.amounts and dashboard.chart.orders in adminhtml_dashboard_index.xml - * - * @author Magento Core Team */ class Graph extends \Magento\Backend\Block\Dashboard\AbstractDashboard { diff --git a/app/code/Magento/Backend/Block/Dashboard/Grid.php b/app/code/Magento/Backend/Block/Dashboard/Grid.php index f7f9a79f17eb..9c4cc6269b66 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Grid.php +++ b/app/code/Magento/Backend/Block/Dashboard/Grid.php @@ -8,7 +8,6 @@ /** * Adminhtml dashboard grid * - * @author Magento Core Team * @api * @since 100.0.2 */ diff --git a/app/code/Magento/Backend/Block/Dashboard/Grids.php b/app/code/Magento/Backend/Block/Dashboard/Grids.php index 9820d8b868d8..2e919e88013b 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Grids.php +++ b/app/code/Magento/Backend/Block/Dashboard/Grids.php @@ -14,7 +14,6 @@ * Adminhtml dashboard bottom tabs * * @api - * @author Magento Core Team * @since 100.0.2 */ class Grids extends Tabs diff --git a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php index dd21a215ea6f..ea2582232020 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php +++ b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php @@ -14,7 +14,6 @@ * Adminhtml dashboard recent orders grid * * @api - * @author Magento Core Team * @SuppressWarnings(PHPMD.DepthOfInheritance) * @since 100.0.2 */ diff --git a/app/code/Magento/Backend/Block/Dashboard/Sales.php b/app/code/Magento/Backend/Block/Dashboard/Sales.php index 098580b1369e..2e58d7edd142 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Sales.php +++ b/app/code/Magento/Backend/Block/Dashboard/Sales.php @@ -15,7 +15,6 @@ * Adminhtml dashboard sales statistics bar * * @api - * @author Magento Core Team * @since 100.0.2 */ class Sales extends Bar diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Amounts.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Amounts.php index 26243891fa00..1dbfee48e03a 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Amounts.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Amounts.php @@ -10,8 +10,6 @@ * Adminhtml dashboard order amounts diagram * @deprecated dashboard graphs were migrated to dynamic chart.js solution * @see dashboard.chart.amounts in adminhtml_dashboard_index.xml - * - * @author Magento Core Team */ class Amounts extends \Magento\Backend\Block\Dashboard\Graph { diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Orders.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Orders.php index f88e6bb69467..a5cfadbc7c50 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Orders.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Orders.php @@ -10,8 +10,6 @@ * Adminhtml dashboard orders diagram * @deprecated dashboard graphs were migrated to dynamic chart.js solution * @see dashboard.chart.orders in adminhtml_dashboard_index.xml - * - * @author Magento Core Team */ class Orders extends \Magento\Backend\Block\Dashboard\Graph { 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 a0b1571bd17b..68e5b8ba1c4e 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php @@ -8,7 +8,6 @@ /** * 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/Page.php b/app/code/Magento/Backend/Block/Page.php index 6c9bb15417c9..1c432e380097 100644 --- a/app/code/Magento/Backend/Block/Page.php +++ b/app/code/Magento/Backend/Block/Page.php @@ -6,8 +6,6 @@ /** * Adminhtml page - * - * @author Magento Core Team */ namespace Magento\Backend\Block; diff --git a/app/code/Magento/Backend/Block/Page/Footer.php b/app/code/Magento/Backend/Block/Page/Footer.php index 610d28b0f53e..bf776e518a44 100644 --- a/app/code/Magento/Backend/Block/Page/Footer.php +++ b/app/code/Magento/Backend/Block/Page/Footer.php @@ -9,7 +9,6 @@ * Adminhtml footer block * * @api - * @author Magento Core Team * @since 100.0.2 */ class Footer extends \Magento\Backend\Block\Template diff --git a/app/code/Magento/Backend/Block/Page/Header.php b/app/code/Magento/Backend/Block/Page/Header.php index c2c5f7472b37..122c48ab916a 100644 --- a/app/code/Magento/Backend/Block/Page/Header.php +++ b/app/code/Magento/Backend/Block/Page/Header.php @@ -10,7 +10,6 @@ * Adminhtml header block * * @api - * @author Magento Core Team * @since 100.0.2 */ class Header extends \Magento\Backend\Block\Template diff --git a/app/code/Magento/Backend/Block/Page/Notices.php b/app/code/Magento/Backend/Block/Page/Notices.php index d34b50d21f93..da25fd494475 100644 --- a/app/code/Magento/Backend/Block/Page/Notices.php +++ b/app/code/Magento/Backend/Block/Page/Notices.php @@ -6,8 +6,6 @@ /** * Adminhtml header notices block - * - * @author Magento Core Team */ namespace Magento\Backend\Block\Page; 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 d290b89b2a6b..817e1a6e8463 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 @@ -12,7 +12,6 @@ * "Reset to Defaults" button renderer * * @deprecated 100.1.6 - * @author Magento Core Team */ class Reset extends \Magento\Config\Block\System\Config\Form\Field { diff --git a/app/code/Magento/Backend/Block/System/Account/Edit.php b/app/code/Magento/Backend/Block/System/Account/Edit.php index f12c1f421141..2e88267d26ac 100644 --- a/app/code/Magento/Backend/Block/System/Account/Edit.php +++ b/app/code/Magento/Backend/Block/System/Account/Edit.php @@ -9,7 +9,6 @@ * Adminhtml edit admin user account * * @api - * @author Magento Core Team * @since 100.0.2 */ class Edit extends \Magento\Backend\Block\Widget\Form\Container diff --git a/app/code/Magento/Backend/Block/System/Account/Edit/Form.php b/app/code/Magento/Backend/Block/System/Account/Edit/Form.php index c075585a6e4e..2ce7c1d49cad 100644 --- a/app/code/Magento/Backend/Block/System/Account/Edit/Form.php +++ b/app/code/Magento/Backend/Block/System/Account/Edit/Form.php @@ -10,8 +10,6 @@ /** * Adminhtml edit admin user account form - * - * @author Magento Core Team */ class Form extends \Magento\Backend\Block\Widget\Form\Generic { diff --git a/app/code/Magento/Backend/Block/System/Cache/Edit.php b/app/code/Magento/Backend/Block/System/Cache/Edit.php index be4de9346013..03f7b36d8914 100644 --- a/app/code/Magento/Backend/Block/System/Cache/Edit.php +++ b/app/code/Magento/Backend/Block/System/Cache/Edit.php @@ -7,8 +7,6 @@ /** * Cache management edit page - * - * @author Magento Core Team */ class Edit extends \Magento\Backend\Block\Widget { diff --git a/app/code/Magento/Backend/Block/System/Cache/Form.php b/app/code/Magento/Backend/Block/System/Cache/Form.php index a0f495c784d2..fae6717d9c58 100644 --- a/app/code/Magento/Backend/Block/System/Cache/Form.php +++ b/app/code/Magento/Backend/Block/System/Cache/Form.php @@ -7,8 +7,6 @@ /** * Cache management form page - * - * @author Magento Core Team */ class Form extends \Magento\Backend\Block\Widget\Form\Generic { diff --git a/app/code/Magento/Backend/Block/System/Store/Delete.php b/app/code/Magento/Backend/Block/System/Store/Delete.php index 8d2cc4039aaf..ed1fa716116f 100644 --- a/app/code/Magento/Backend/Block/System/Store/Delete.php +++ b/app/code/Magento/Backend/Block/System/Store/Delete.php @@ -7,8 +7,6 @@ /** * Store / store view / website delete form container - * - * @author Magento Core Team */ class Delete extends \Magento\Backend\Block\Widget\Form\Container { diff --git a/app/code/Magento/Backend/Block/System/Store/Delete/Form.php b/app/code/Magento/Backend/Block/System/Store/Delete/Form.php index 47a156c16ce3..39a622a9a3a2 100644 --- a/app/code/Magento/Backend/Block/System/Store/Delete/Form.php +++ b/app/code/Magento/Backend/Block/System/Store/Delete/Form.php @@ -10,8 +10,6 @@ /** * Adminhtml cms block edit form - * - * @author Magento Core Team */ class Form extends \Magento\Backend\Block\Widget\Form\Generic { diff --git a/app/code/Magento/Backend/Block/System/Store/Delete/Group.php b/app/code/Magento/Backend/Block/System/Store/Delete/Group.php index e95f3bbf9f8c..1ec6cf706c24 100644 --- a/app/code/Magento/Backend/Block/System/Store/Delete/Group.php +++ b/app/code/Magento/Backend/Block/System/Store/Delete/Group.php @@ -7,8 +7,6 @@ /** * Adminhtml store delete group block - * - * @author Magento Core Team */ class Group extends \Magento\Backend\Block\Template { diff --git a/app/code/Magento/Backend/Block/System/Store/Delete/Website.php b/app/code/Magento/Backend/Block/System/Store/Delete/Website.php index 82cbb780137b..2165e65b07b0 100644 --- a/app/code/Magento/Backend/Block/System/Store/Delete/Website.php +++ b/app/code/Magento/Backend/Block/System/Store/Delete/Website.php @@ -7,8 +7,6 @@ /** * Adminhtml store delete group block - * - * @author Magento Core Team */ class Website extends \Magento\Backend\Block\Template { diff --git a/app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php b/app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php index 034887c67d1e..be86ecb9dd04 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php @@ -8,8 +8,6 @@ /** * Adminhtml store edit form * - * @author Magento Core Team - * * @SuppressWarnings(PHPMD.DepthOfInheritance) */ abstract class AbstractForm extends \Magento\Backend\Block\Widget\Form\Generic diff --git a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php index c8d04cef86d0..4141e5567872 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php @@ -8,8 +8,6 @@ /** * Adminhtml store edit form for group * - * @author Magento Core Team - * * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Group extends \Magento\Backend\Block\System\Store\Edit\AbstractForm diff --git a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php index fee756b5d66b..7101f98c3567 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php @@ -11,8 +11,6 @@ /** * Adminhtml store edit form for store * - * @author Magento Core Team - * * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Store extends \Magento\Backend\Block\System\Store\Edit\AbstractForm diff --git a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php index 545620d99c4c..f6baae9a87a2 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php @@ -11,8 +11,6 @@ /** * Adminhtml store edit form for website * - * @author Magento Core Team - * * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Website extends \Magento\Backend\Block\System\Store\Edit\AbstractForm diff --git a/app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php index 3d7154eb20f9..8dc669642910 100644 --- a/app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php +++ b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php @@ -7,8 +7,6 @@ /** * Store render group - * - * @author Magento Core Team */ class Group extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer { diff --git a/app/code/Magento/Backend/Block/System/Store/Grid/Render/Store.php b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Store.php index 9cfc8bfc5269..b42136b2443e 100644 --- a/app/code/Magento/Backend/Block/System/Store/Grid/Render/Store.php +++ b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Store.php @@ -7,8 +7,6 @@ /** * Store render store - * - * @author Magento Core Team */ class Store extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer { diff --git a/app/code/Magento/Backend/Block/System/Store/Grid/Render/Website.php b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Website.php index 487eb4f8acfd..9021bc2e5456 100644 --- a/app/code/Magento/Backend/Block/System/Store/Grid/Render/Website.php +++ b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Website.php @@ -7,8 +7,6 @@ /** * Store render website - * - * @author Magento Core Team */ class Website extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer { diff --git a/app/code/Magento/Backend/Block/System/Store/Store.php b/app/code/Magento/Backend/Block/System/Store/Store.php index 63187ec02406..7d95cdce6681 100644 --- a/app/code/Magento/Backend/Block/System/Store/Store.php +++ b/app/code/Magento/Backend/Block/System/Store/Store.php @@ -9,7 +9,6 @@ * Adminhtml store content block * * @api - * @author Magento Core Team * @since 100.0.2 */ class Store extends \Magento\Backend\Block\Widget\Grid\Container diff --git a/app/code/Magento/Backend/Block/Text/ListText.php b/app/code/Magento/Backend/Block/Text/ListText.php index 9f24239abdc8..12eba6329858 100644 --- a/app/code/Magento/Backend/Block/Text/ListText.php +++ b/app/code/Magento/Backend/Block/Text/ListText.php @@ -6,8 +6,6 @@ /** * Adminhtml text list block - * - * @author Magento Core Team */ namespace Magento\Backend\Block\Text; diff --git a/app/code/Magento/Backend/Block/Widget/Accordion/Item.php b/app/code/Magento/Backend/Block/Widget/Accordion/Item.php index 4650609a5802..a129e0a80afa 100644 --- a/app/code/Magento/Backend/Block/Widget/Accordion/Item.php +++ b/app/code/Magento/Backend/Block/Widget/Accordion/Item.php @@ -9,8 +9,6 @@ /** * Accordion item - * - * @author Magento Core Team */ class Item extends \Magento\Backend\Block\Widget { diff --git a/app/code/Magento/Backend/Block/Widget/Breadcrumbs.php b/app/code/Magento/Backend/Block/Widget/Breadcrumbs.php index d85ee72365e3..a1ae896b64ee 100644 --- a/app/code/Magento/Backend/Block/Widget/Breadcrumbs.php +++ b/app/code/Magento/Backend/Block/Widget/Breadcrumbs.php @@ -9,7 +9,6 @@ * Magento_Backend page breadcrumbs * * @api - * @author Magento Core Team * @since 100.0.2 */ class Breadcrumbs extends \Magento\Backend\Block\Template diff --git a/app/code/Magento/Backend/Block/Widget/Button.php b/app/code/Magento/Backend/Block/Widget/Button.php index 8194d4fcf7ae..e67c87603bce 100644 --- a/app/code/Magento/Backend/Block/Widget/Button.php +++ b/app/code/Magento/Backend/Block/Widget/Button.php @@ -14,7 +14,6 @@ * Button widget * * @api - * @author Magento Core Team * @since 100.0.2 */ class Button extends \Magento\Backend\Block\Widget diff --git a/app/code/Magento/Backend/Block/Widget/Form/Element.php b/app/code/Magento/Backend/Block/Widget/Form/Element.php index c3224d62b627..5bdde08f4e27 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Element.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Element.php @@ -9,8 +9,6 @@ /** * Form element widget block - * - * @author Magento Core Team */ class Element extends \Magento\Backend\Block\Template { 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 25ea5b6100e2..934e6a83102f 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php @@ -13,8 +13,6 @@ /** * Backend image gallery item renderer - * - * @author Magento Core Team */ class Gallery extends \Magento\Backend\Block\Template implements \Magento\Framework\Data\Form\Element\Renderer\RendererInterface 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 99a931d0f6b7..a31ee9cac15c 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Renderer/Fieldset.php @@ -13,7 +13,6 @@ * Form fieldset default renderer * * @api - * @author Magento Core Team * @since 100.0.2 */ class Fieldset extends \Magento\Backend\Block\Template implements RendererInterface diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Checkbox.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Checkbox.php index 6ba8c37b0e4a..32ec30353726 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Checkbox.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Checkbox.php @@ -7,8 +7,6 @@ /** * Checkbox grid column filter - * - * @author Magento Core Team */ class Checkbox extends \Magento\Backend\Block\Widget\Grid\Column\Filter\Select { 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 a139d20191b5..629302df7e87 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 @@ -9,7 +9,6 @@ /** * Date grid column filter * - * @author Magento Core Team * @todo date format */ class Datetime extends \Magento\Backend\Block\Widget\Grid\Column\Filter\Date diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Massaction.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Massaction.php index 9da793dc9fc6..edda37aa34e9 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Massaction.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Massaction.php @@ -7,8 +7,6 @@ /** * Massaction grid column filter - * - * @author Magento Core Team */ class Massaction extends \Magento\Backend\Block\Widget\Grid\Column\Filter\Checkbox { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Price.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Price.php index 40106833b6a9..825ec5884a72 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Price.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Price.php @@ -8,8 +8,6 @@ /** * Range grid column filter * - * @author Magento Core Team - * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Price extends \Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFilter diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Radio.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Radio.php index 479a2b6b2029..dd093283aaf4 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Radio.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Radio.php @@ -7,8 +7,6 @@ /** * Checkbox grid column filter - * - * @author Magento Core Team */ class Radio extends \Magento\Backend\Block\Widget\Grid\Column\Filter\Select { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Range.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Range.php index 5c7793b6312a..fff33a213a15 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Range.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Range.php @@ -6,8 +6,6 @@ /** * Range grid column filter - * - * @author Magento Core Team */ namespace Magento\Backend\Block\Widget\Grid\Column\Filter; diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/SkipList.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/SkipList.php index 4256732a1f25..3386d27588c4 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/SkipList.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/SkipList.php @@ -7,8 +7,6 @@ /** * Massaction grid column filter - * - * @author Magento Core Team */ class SkipList extends \Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFilter { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Text.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Text.php index 0cc6a852ef1e..b3a31b3c9d9a 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Text.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Text.php @@ -8,7 +8,6 @@ /** * Text grid column filter * - * @author Magento Core Team * @api * @since 100.0.2 */ 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 28200323a3ae..07bf3f0daca7 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php @@ -15,7 +15,6 @@ * @deprecated 100.2.0 in favour of UI component implementation * @method \Magento\Quote\Model\Quote setHideFormElement(boolean $value) Hide Form element to prevent IE errors * @method boolean getHideFormElement() - * @author Magento Core Team * @TODO MAGETWO-31510: Remove deprecated class * @since 100.0.2 */ diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item/Additional/AdditionalInterface.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item/Additional/AdditionalInterface.php index eb35f14d43fd..316d53e591c3 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item/Additional/AdditionalInterface.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item/Additional/AdditionalInterface.php @@ -8,7 +8,6 @@ /** * Backend grid widget massaction item additional action interface * - * @author Magento Core Team * @api */ interface AdditionalInterface diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item/Additional/DefaultAdditional.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item/Additional/DefaultAdditional.php index be7bd4105a37..fc0d98e63ab0 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item/Additional/DefaultAdditional.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item/Additional/DefaultAdditional.php @@ -7,8 +7,6 @@ /** * Backend grid widget massaction item additional action default - * - * @author Magento Core Team */ class DefaultAdditional extends \Magento\Backend\Block\Widget\Form\Generic implements \Magento\Backend\Block\Widget\Grid\Massaction\Item\Additional\AdditionalInterface diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Dashboard.php b/app/code/Magento/Backend/Controller/Adminhtml/Dashboard.php index 9fb3a2719042..dcb55eda28f9 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/Dashboard.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/Dashboard.php @@ -6,8 +6,6 @@ /** * Dashboard admin controller - * - * @author Magento Core Team */ namespace Magento\Backend\Controller\Adminhtml; diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System.php b/app/code/Magento/Backend/Controller/Adminhtml/System.php index ce7bd87cb95d..4381c5cb3823 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System.php @@ -9,8 +9,6 @@ /** * System admin controller - * - * @author Magento Core Team */ abstract class System extends AbstractAction { diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Account.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Account.php index be2cbbdeb804..f9f88dc9c2ab 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Account.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Account.php @@ -9,8 +9,6 @@ /** * Adminhtml account controller - * - * @author Magento Core Team */ abstract class Account extends Action { diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php index 7bef74862f02..d91f83428f93 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php @@ -13,7 +13,6 @@ /** * Store controller * - * @author Magento Core Team * @SuppressWarnings(PHPMD.AllPurposeAction) */ abstract class Store extends Action diff --git a/app/code/Magento/Backend/Helper/Js.php b/app/code/Magento/Backend/Helper/Js.php index a71b9c676338..5de0fc7ced30 100644 --- a/app/code/Magento/Backend/Helper/Js.php +++ b/app/code/Magento/Backend/Helper/Js.php @@ -6,8 +6,6 @@ /** * Adminhtml JavaScript helper - * - * @author Magento Core Team */ namespace Magento\Backend\Helper; diff --git a/app/code/Magento/Backend/Model/Auth/Credential/StorageInterface.php b/app/code/Magento/Backend/Model/Auth/Credential/StorageInterface.php index a303418cfe59..1b157548ff6c 100644 --- a/app/code/Magento/Backend/Model/Auth/Credential/StorageInterface.php +++ b/app/code/Magento/Backend/Model/Auth/Credential/StorageInterface.php @@ -8,7 +8,6 @@ /** * Backend Auth Credential Storage interface * - * @author Magento Core Team * @api * @since 100.0.2 */ diff --git a/app/code/Magento/Backend/Model/Locale/Manager.php b/app/code/Magento/Backend/Model/Locale/Manager.php index 24adafc7635a..46775f0946c5 100644 --- a/app/code/Magento/Backend/Model/Locale/Manager.php +++ b/app/code/Magento/Backend/Model/Locale/Manager.php @@ -8,7 +8,6 @@ /** * Locale manager model * - * @author Magento Core Team * @api * @since 100.0.2 */ diff --git a/app/code/Magento/Backend/Model/Search/Order.php b/app/code/Magento/Backend/Model/Search/Order.php index 728cf7414f3d..ec8ab6460d5b 100644 --- a/app/code/Magento/Backend/Model/Search/Order.php +++ b/app/code/Magento/Backend/Model/Search/Order.php @@ -8,7 +8,6 @@ /** * Search Order Model * - * @author Magento Core Team * @api * @since 100.0.2 */ From 0059b1fc92c18f38fb510c6a6e7ab4862e7eaf10 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Tue, 7 Mar 2023 17:18:49 +0000 Subject: [PATCH 08/20] Fix static test failures --- .../Block/Dashboard/AbstractDashboard.php | 8 ++++++++ .../Magento/Backend/Block/Dashboard/Graph.php | 10 +--------- app/code/Magento/Backend/Block/Page.php | 2 ++ app/code/Magento/Backend/Block/Page/Header.php | 8 ++++++-- .../Block/Page/System/Config/Robots/Reset.php | 16 +++------------- .../Backend/Block/System/Account/Edit.php | 4 ++++ .../Backend/Block/System/Account/Edit/Form.php | 2 +- .../Magento/Backend/Block/System/Cache/Edit.php | 10 +++++++++- .../Backend/Block/System/Store/Delete/Group.php | 2 +- .../Block/System/Store/Delete/Website.php | 2 +- .../Block/System/Store/Grid/Render/Group.php | 2 +- .../Block/System/Store/Grid/Render/Store.php | 2 +- .../Block/System/Store/Grid/Render/Website.php | 2 +- .../Backend/Block/Widget/Accordion/Item.php | 12 ++++++++++++ .../Magento/Backend/Block/Widget/Breadcrumbs.php | 14 ++++---------- .../Backend/Block/Widget/Form/Element.php | 8 +++++++- .../Block/Widget/Grid/Column/Filter/Checkbox.php | 7 ++++++- .../Block/Widget/Grid/Column/Filter/Datetime.php | 2 +- .../Widget/Grid/Column/Filter/Massaction.php | 2 +- .../Block/Widget/Grid/Column/Filter/Radio.php | 4 +++- .../Block/Widget/Grid/Column/Filter/Range.php | 6 +++++- .../Block/Widget/Grid/Column/Filter/SkipList.php | 2 +- .../Block/Widget/Grid/Column/Filter/Text.php | 2 +- .../Block/Widget/Grid/Massaction/Extended.php | 2 -- .../Item/Additional/DefaultAdditional.php | 2 +- .../Backend/Controller/Adminhtml/Dashboard.php | 2 +- .../Backend/Controller/Adminhtml/System.php | 2 +- .../Controller/Adminhtml/System/Account.php | 2 +- .../Controller/Adminhtml/System/Store.php | 4 +--- app/code/Magento/Backend/Helper/Js.php | 2 ++ app/code/Magento/Backend/Model/Search/Order.php | 2 -- 31 files changed, 87 insertions(+), 60 deletions(-) diff --git a/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php b/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php index afc1674edaff..3c18c5b37633 100644 --- a/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php +++ b/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php @@ -38,6 +38,8 @@ public function __construct( } /** + * Return a collection + * * @return array|AbstractCollection|\Magento\Eav\Model\Entity\Collection\Abstract */ public function getCollection() @@ -46,6 +48,8 @@ public function getCollection() } /** + * Return items count + * * @return int */ public function getCount() @@ -64,6 +68,8 @@ public function getDataHelper() } /** + * Prepare any data for display, if required + * * @return $this */ protected function _prepareData() @@ -72,6 +78,8 @@ protected function _prepareData() } /** + * Ensure data is prepared before layout + * * @return $this */ protected function _prepareLayout() diff --git a/app/code/Magento/Backend/Block/Dashboard/Graph.php b/app/code/Magento/Backend/Block/Dashboard/Graph.php index 022fb4a06ff4..b5c94ce82782 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Graph.php +++ b/app/code/Magento/Backend/Block/Dashboard/Graph.php @@ -14,32 +14,24 @@ */ class Graph extends \Magento\Backend\Block\Dashboard\AbstractDashboard { - const API_URL = 'https://image-charts.com/chart'; + public const API_URL = 'https://image-charts.com/chart'; /** - * All series - * * @var array */ protected $_allSeries = []; /** - * Axis labels - * * @var array */ protected $_axisLabels = []; /** - * Axis maps - * * @var array */ protected $_axisMaps = []; /** - * Data rows - * * @var array */ protected $_dataRows = []; diff --git a/app/code/Magento/Backend/Block/Page.php b/app/code/Magento/Backend/Block/Page.php index 1c432e380097..c9e29eedf729 100644 --- a/app/code/Magento/Backend/Block/Page.php +++ b/app/code/Magento/Backend/Block/Page.php @@ -60,6 +60,8 @@ public function getLang() } /** + * Returns true if we are running in single store mode + * * @return bool */ public function isSingleStoreMode() diff --git a/app/code/Magento/Backend/Block/Page/Header.php b/app/code/Magento/Backend/Block/Page/Header.php index 122c48ab916a..b4e41895c3bd 100644 --- a/app/code/Magento/Backend/Block/Page/Header.php +++ b/app/code/Magento/Backend/Block/Page/Header.php @@ -20,8 +20,6 @@ class Header extends \Magento\Backend\Block\Template protected $_template = 'Magento_Backend::page/header.phtml'; /** - * Backend data - * * @var \Magento\Backend\Helper\Data */ protected $_backendData = null; @@ -49,6 +47,8 @@ public function __construct( } /** + * Return URL to homepage + * * @return string */ public function getHomeLink() @@ -57,6 +57,8 @@ public function getHomeLink() } /** + * Return the current user + * * @return \Magento\User\Model\User|null */ public function getUser() @@ -65,6 +67,8 @@ public function getUser() } /** + * Return URL to log out from admin + * * @return string */ public function getLogoutLink() 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 817e1a6e8463..7dc744cec117 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 @@ -16,20 +16,10 @@ class Reset extends \Magento\Config\Block\System\Config\Form\Field { /** - * Pasge robots default instructions + * Page robots default instructions */ - const XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS = 'design/search_engine_robots/default_custom_instructions'; - - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data - */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - array $data = [] - ) { - parent::__construct($context, $data); - } + public const XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS = + 'design/search_engine_robots/default_custom_instructions'; /** * Set template diff --git a/app/code/Magento/Backend/Block/System/Account/Edit.php b/app/code/Magento/Backend/Block/System/Account/Edit.php index 2e88267d26ac..baea47683602 100644 --- a/app/code/Magento/Backend/Block/System/Account/Edit.php +++ b/app/code/Magento/Backend/Block/System/Account/Edit.php @@ -14,6 +14,8 @@ class Edit extends \Magento\Backend\Block\Widget\Form\Container { /** + * Initialise the page + * * @return void */ protected function _construct() @@ -28,6 +30,8 @@ protected function _construct() } /** + * Return a Phrase for the header text + * * @return \Magento\Framework\Phrase */ public function getHeaderText() diff --git a/app/code/Magento/Backend/Block/System/Account/Edit/Form.php b/app/code/Magento/Backend/Block/System/Account/Edit/Form.php index 2ce7c1d49cad..926a3f907c46 100644 --- a/app/code/Magento/Backend/Block/System/Account/Edit/Form.php +++ b/app/code/Magento/Backend/Block/System/Account/Edit/Form.php @@ -13,7 +13,7 @@ */ class Form extends \Magento\Backend\Block\Widget\Form\Generic { - const IDENTITY_VERIFICATION_PASSWORD_FIELD = 'current_password'; + public const IDENTITY_VERIFICATION_PASSWORD_FIELD = 'current_password'; /** * @var \Magento\Backend\Model\Auth\Session diff --git a/app/code/Magento/Backend/Block/System/Cache/Edit.php b/app/code/Magento/Backend/Block/System/Cache/Edit.php index 03f7b36d8914..7ec8e224ad69 100644 --- a/app/code/Magento/Backend/Block/System/Cache/Edit.php +++ b/app/code/Magento/Backend/Block/System/Cache/Edit.php @@ -16,6 +16,8 @@ class Edit extends \Magento\Backend\Block\Widget protected $_template = 'Magento_Backend::system/cache/edit.phtml'; /** + * Set the page title + * * @return void */ protected function _construct() @@ -26,7 +28,7 @@ protected function _construct() } /** - * {@inheritdoc} + * @inheritDoc */ protected function _prepareLayout() { @@ -45,6 +47,8 @@ protected function _prepareLayout() } /** + * Return the HTML for the save button + * * @return string */ public function getSaveButtonHtml() @@ -53,6 +57,8 @@ public function getSaveButtonHtml() } /** + * Return the URL to save an item + * * @return string */ public function getSaveUrl() @@ -61,6 +67,8 @@ public function getSaveUrl() } /** + * Initialise the form + * * @return $this */ public function initForm() diff --git a/app/code/Magento/Backend/Block/System/Store/Delete/Group.php b/app/code/Magento/Backend/Block/System/Store/Delete/Group.php index 1ec6cf706c24..14e383f9a1bf 100644 --- a/app/code/Magento/Backend/Block/System/Store/Delete/Group.php +++ b/app/code/Magento/Backend/Block/System/Store/Delete/Group.php @@ -11,7 +11,7 @@ class Group extends \Magento\Backend\Block\Template { /** - * {@inheritdoc} + * @inheritDoc */ protected function _prepareLayout() { diff --git a/app/code/Magento/Backend/Block/System/Store/Delete/Website.php b/app/code/Magento/Backend/Block/System/Store/Delete/Website.php index 2165e65b07b0..e29e4d9279b3 100644 --- a/app/code/Magento/Backend/Block/System/Store/Delete/Website.php +++ b/app/code/Magento/Backend/Block/System/Store/Delete/Website.php @@ -11,7 +11,7 @@ class Website extends \Magento\Backend\Block\Template { /** - * {@inheritdoc} + * @inheritDoc */ protected function _prepareLayout() { diff --git a/app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php index 8dc669642910..fe3d75f91c75 100644 --- a/app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php +++ b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php @@ -11,7 +11,7 @@ class Group extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer { /** - * {@inheritdoc} + * @inheritDoc */ public function render(\Magento\Framework\DataObject $row) { diff --git a/app/code/Magento/Backend/Block/System/Store/Grid/Render/Store.php b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Store.php index b42136b2443e..f5635e8ab8a4 100644 --- a/app/code/Magento/Backend/Block/System/Store/Grid/Render/Store.php +++ b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Store.php @@ -11,7 +11,7 @@ class Store extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer { /** - * {@inheritdoc} + * @inheritDoc */ public function render(\Magento\Framework\DataObject $row) { diff --git a/app/code/Magento/Backend/Block/System/Store/Grid/Render/Website.php b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Website.php index 9021bc2e5456..8b2b87e21cc6 100644 --- a/app/code/Magento/Backend/Block/System/Store/Grid/Render/Website.php +++ b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Website.php @@ -11,7 +11,7 @@ class Website extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer { /** - * {@inheritdoc} + * @inheritDoc */ public function render(\Magento\Framework\DataObject $row) { diff --git a/app/code/Magento/Backend/Block/Widget/Accordion/Item.php b/app/code/Magento/Backend/Block/Widget/Accordion/Item.php index a129e0a80afa..6c3162f64de6 100644 --- a/app/code/Magento/Backend/Block/Widget/Accordion/Item.php +++ b/app/code/Magento/Backend/Block/Widget/Accordion/Item.php @@ -18,6 +18,8 @@ class Item extends \Magento\Backend\Block\Widget protected $_accordion; /** + * Set accordion objet and return self + * * @param Accordion $accordion * @return $this */ @@ -28,6 +30,8 @@ public function setAccordion($accordion) } /** + * Return the target for this item + * * @return string */ public function getTarget() @@ -36,6 +40,8 @@ public function getTarget() } /** + * Return the HTML title for this item + * * @return string */ public function getTitle() @@ -50,6 +56,8 @@ public function getTitle() } /** + * Return the HTML content for this item + * * @return null|string */ public function getContent() @@ -65,6 +73,8 @@ public function getContent() } /** + * Get the CSS class for this item + * * @return string */ public function getClass() @@ -77,6 +87,8 @@ public function getClass() } /** + * Return formatted HTML + * * @return string */ protected function _toHtml() diff --git a/app/code/Magento/Backend/Block/Widget/Breadcrumbs.php b/app/code/Magento/Backend/Block/Widget/Breadcrumbs.php index a1ae896b64ee..1d1f13c553d8 100644 --- a/app/code/Magento/Backend/Block/Widget/Breadcrumbs.php +++ b/app/code/Magento/Backend/Block/Widget/Breadcrumbs.php @@ -26,6 +26,8 @@ class Breadcrumbs extends \Magento\Backend\Block\Template protected $_template = 'Magento_Backend::widget/breadcrumbs.phtml'; /** + * Add homepage to breadcrumbs + * * @return void */ protected function _construct() @@ -34,6 +36,8 @@ protected function _construct() } /** + * Add a link to the breadcrumbs + * * @param string $label * @param string|null $title * @param string|null $url @@ -47,14 +51,4 @@ public function addLink($label, $title = null, $url = null) $this->_links[] = ['label' => $label, 'title' => $title, 'url' => $url]; return $this; } - - /** - * {@inheritdoc} - */ - protected function _beforeToHtml() - { - // TODO - Moved to Beta 2, no breadcrumbs displaying in Beta 1 - // $this->assign('links', $this->_links); - return parent::_beforeToHtml(); - } } diff --git a/app/code/Magento/Backend/Block/Widget/Form/Element.php b/app/code/Magento/Backend/Block/Widget/Form/Element.php index 5bdde08f4e27..db28cacdcf59 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Element.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Element.php @@ -33,6 +33,8 @@ class Element extends \Magento\Backend\Block\Template protected $_template = 'Magento_Backend::widget/form/element.phtml'; /** + * Set element and return self + * * @param string $element * @return $this */ @@ -43,6 +45,8 @@ public function setElement($element) } /** + * Set form and return self + * * @param Form $form * @return $this */ @@ -53,6 +57,8 @@ public function setForm($form) } /** + * Set form block and return self + * * @param \Magento\Framework\DataObject $formBlock * @return $this */ @@ -63,7 +69,7 @@ public function setFormBlock($formBlock) } /** - * {@inheritdoc} + * @inheritDoc */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Checkbox.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Checkbox.php index 32ec30353726..02e3077b217e 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Checkbox.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Checkbox.php @@ -11,6 +11,8 @@ class Checkbox extends \Magento\Backend\Block\Widget\Grid\Column\Filter\Select { /** + * Return formatted HTML + * * @return string */ public function getHtml() @@ -19,6 +21,8 @@ public function getHtml() } /** + * Return an array of options + * * @return array */ protected function _getOptions() @@ -31,6 +35,8 @@ protected function _getOptions() } /** + * Return expression for SQL 'where' clause + * * @return array */ public function getCondition() @@ -40,6 +46,5 @@ public function getCondition() } else { return [['neq' => $this->getColumn()->getValue()], ['is' => new \Zend_Db_Expr('NULL')]]; } - // return array('like'=>'%'.$this->getValue().'%'); } } 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 629302df7e87..b3e110ed90ef 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 @@ -16,7 +16,7 @@ class Datetime extends \Magento\Backend\Block\Widget\Grid\Column\Filter\Date /** * full day is 86400, we need 23 hours:59 minutes:59 seconds = 86399 */ - const END_OF_DAY_IN_SECONDS = 86399; + public const END_OF_DAY_IN_SECONDS = 86399; /** * @inheritdoc diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Massaction.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Massaction.php index edda37aa34e9..989192dbf6b3 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Massaction.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Massaction.php @@ -11,7 +11,7 @@ class Massaction extends \Magento\Backend\Block\Widget\Grid\Column\Filter\Checkbox { /** - * {@inheritdoc} + * @inheritDoc */ public function getCondition() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Radio.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Radio.php index dd093283aaf4..453b679739ea 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Radio.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Radio.php @@ -11,6 +11,8 @@ class Radio extends \Magento\Backend\Block\Widget\Grid\Column\Filter\Select { /** + * Return array of options + * * @return array */ protected function _getOptions() @@ -23,7 +25,7 @@ protected function _getOptions() } /** - * {@inheritdoc} + * @inheritDoc */ public function getCondition() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Range.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Range.php index fff33a213a15..05b1a7dd74cd 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Range.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Range.php @@ -16,6 +16,8 @@ class Range extends \Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFilter { /** + * Return formatted HTML + * * @return string */ public function getHtml() @@ -54,6 +56,8 @@ public function getHtml() } /** + * Return the value at the specified index + * * @param string|null $index * @return mixed */ @@ -70,7 +74,7 @@ public function getValue($index = null) } /** - * {@inheritdoc} + * @inheritDoc */ public function getCondition() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/SkipList.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/SkipList.php index 3386d27588c4..3b0a9936d0fe 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/SkipList.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/SkipList.php @@ -11,7 +11,7 @@ class SkipList extends \Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFilter { /** - * {@inheritdoc} + * @inheritDoc */ public function getCondition() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Text.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Text.php index b3a31b3c9d9a..216477357f08 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Text.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Text.php @@ -14,7 +14,7 @@ class Text extends \Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFilter { /** - * {@inheritdoc} + * @inheritDoc */ public function getHtml() { 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 07bf3f0daca7..80d311acec34 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php @@ -35,8 +35,6 @@ class Extended extends \Magento\Backend\Block\Widget protected $_template = 'Magento_Backend::widget/grid/massaction_extended.phtml'; /** - * Backend data - * * @var \Magento\Backend\Helper\Data */ protected $_backendData = null; diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item/Additional/DefaultAdditional.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item/Additional/DefaultAdditional.php index fc0d98e63ab0..11fc7fa56b67 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item/Additional/DefaultAdditional.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item/Additional/DefaultAdditional.php @@ -12,7 +12,7 @@ class DefaultAdditional extends \Magento\Backend\Block\Widget\Form\Generic imple \Magento\Backend\Block\Widget\Grid\Massaction\Item\Additional\AdditionalInterface { /** - * {@inheritdoc} + * @inheritDoc */ public function createFromConfiguration(array $configuration) { diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Dashboard.php b/app/code/Magento/Backend/Controller/Adminhtml/Dashboard.php index dcb55eda28f9..84129b6c53be 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/Dashboard.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/Dashboard.php @@ -16,5 +16,5 @@ abstract class Dashboard extends \Magento\Backend\App\Action * * @see _isAllowed() */ - const ADMIN_RESOURCE = 'Magento_Backend::dashboard'; + public const ADMIN_RESOURCE = 'Magento_Backend::dashboard'; } diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System.php b/app/code/Magento/Backend/Controller/Adminhtml/System.php index 4381c5cb3823..506ef106837a 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System.php @@ -17,5 +17,5 @@ abstract class System extends AbstractAction * * @see _isAllowed() */ - const ADMIN_RESOURCE = 'Magento_Backend::system'; + public const ADMIN_RESOURCE = 'Magento_Backend::system'; } diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Account.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Account.php index f9f88dc9c2ab..b47e8c87925c 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Account.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Account.php @@ -17,5 +17,5 @@ abstract class Account extends Action * * @see _isAllowed() */ - const ADMIN_RESOURCE = 'Magento_Backend::myaccount'; + public const ADMIN_RESOURCE = 'Magento_Backend::myaccount'; } diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php index d91f83428f93..1ca62c6223cd 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php @@ -22,11 +22,9 @@ abstract class Store extends Action * * @see _isAllowed() */ - const ADMIN_RESOURCE = 'Magento_Backend::store'; + public const ADMIN_RESOURCE = 'Magento_Backend::store'; /** - * Core registry - * * @var \Magento\Framework\Registry */ protected $_coreRegistry; diff --git a/app/code/Magento/Backend/Helper/Js.php b/app/code/Magento/Backend/Helper/Js.php index 5de0fc7ced30..375815a59cac 100644 --- a/app/code/Magento/Backend/Helper/Js.php +++ b/app/code/Magento/Backend/Helper/Js.php @@ -37,6 +37,7 @@ public function decodeGridSerializedInput($encoded) { $isSimplified = false === strpos($encoded, '='); $result = []; + // phpcs:ignore Magento2.Functions.DiscouragedFunction.Discouraged parse_str($encoded, $decoded); foreach ($decoded as $key => $value) { if (is_numeric($key)) { @@ -44,6 +45,7 @@ public function decodeGridSerializedInput($encoded) $result[] = $key; } else { $result[$key] = null; + // phpcs:ignore Magento2.Functions.DiscouragedFunction.Discouraged parse_str(base64_decode($value), $result[$key]); } } diff --git a/app/code/Magento/Backend/Model/Search/Order.php b/app/code/Magento/Backend/Model/Search/Order.php index ec8ab6460d5b..05cb109f6112 100644 --- a/app/code/Magento/Backend/Model/Search/Order.php +++ b/app/code/Magento/Backend/Model/Search/Order.php @@ -14,8 +14,6 @@ class Order extends \Magento\Framework\DataObject { /** - * Adminhtml data - * * @var \Magento\Backend\Helper\Data */ protected $_adminhtmlData = null; From a1680e15726e7ad8a6202b3e70c97aabf9a2d54f Mon Sep 17 00:00:00 2001 From: abhattGlo Date: Mon, 18 Dec 2023 12:50:20 +0530 Subject: [PATCH 09/20] Fixed static test failure --- app/code/Magento/Backend/Block/Dashboard/Graph.php | 1 + .../Magento/Backend/Block/Page/System/Config/Robots/Reset.php | 1 + .../Magento/Backend/Block/Widget/Grid/Massaction/Extended.php | 1 + app/code/Magento/Backend/Controller/Adminhtml/System/Store.php | 1 + 4 files changed, 4 insertions(+) diff --git a/app/code/Magento/Backend/Block/Dashboard/Graph.php b/app/code/Magento/Backend/Block/Dashboard/Graph.php index b5c94ce82782..fde2b3b49b7f 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Graph.php +++ b/app/code/Magento/Backend/Block/Dashboard/Graph.php @@ -68,6 +68,7 @@ class Graph extends \Magento\Backend\Block\Dashboard\AbstractDashboard * Google chart api data encoding * * @deprecated 101.0.2 since the Google Image Charts API not accessible from March 14, 2019 + * @see Nothing * @var string */ protected $_encoding = 'e'; 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 7dc744cec117..ec783004e5d4 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 @@ -12,6 +12,7 @@ * "Reset to Defaults" button renderer * * @deprecated 100.1.6 + * @see Nothing */ class Reset extends \Magento\Config\Block\System\Config\Form\Field { 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 80d311acec34..8c1cb36c21dd 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php @@ -13,6 +13,7 @@ * * @api * @deprecated 100.2.0 in favour of UI component implementation + * @see Nothing * @method \Magento\Quote\Model\Quote setHideFormElement(boolean $value) Hide Form element to prevent IE errors * @method boolean getHideFormElement() * @TODO MAGETWO-31510: Remove deprecated class diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php index 1ca62c6223cd..4f7a5bbf3309 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php @@ -86,6 +86,7 @@ protected function createPage() * @return bool * * @deprecated 100.2.7 Backup module is to be removed. + * @see Nothing */ protected function _backupDatabase() { From c55ababc52d4263bc649da3ddcb447d365308995 Mon Sep 17 00:00:00 2001 From: engcom-Echo Date: Thu, 30 May 2024 09:33:28 +0530 Subject: [PATCH 10/20] Fixed static test failure --- .../view/adminhtml/templates/widget/grid.phtml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml index 1b2cee5cf327..af22e9bf58c9 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml @@ -127,8 +127,8 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()) : 0; '#' . $escaper->escapeHtml($block->getHtmlId()) . '_page-current' ) ?> -