From c40c686e5baac650a73f95958bb9f31076de8e97 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Mon, 6 Mar 2023 18:02:12 +0000 Subject: [PATCH 1/5] Remove forbidden @author tag --- app/code/Magento/Review/Block/Adminhtml/Add.php | 2 -- app/code/Magento/Review/Block/Adminhtml/Add/Form.php | 2 -- app/code/Magento/Review/Block/Adminhtml/Grid/Filter/Type.php | 2 -- app/code/Magento/Review/Block/Adminhtml/Grid/Renderer/Type.php | 2 -- app/code/Magento/Review/Block/Adminhtml/Product/Grid.php | 1 - app/code/Magento/Review/Block/Adminhtml/Rating.php | 1 - app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Form.php | 2 -- app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tabs.php | 2 -- app/code/Magento/Review/Block/Customer/View.php | 1 - app/code/Magento/Review/Block/Form.php | 1 - app/code/Magento/Review/Block/Form/Configure.php | 1 - app/code/Magento/Review/Block/Product/Review.php | 1 - app/code/Magento/Review/Block/Product/View.php | 1 - app/code/Magento/Review/Block/Rating/Entity/Detailed.php | 2 -- app/code/Magento/Review/Block/View.php | 1 - app/code/Magento/Review/Model/Rating.php | 1 - app/code/Magento/Review/Model/Rating/Entity.php | 1 - app/code/Magento/Review/Model/Rating/Option.php | 1 - app/code/Magento/Review/Model/Rating/Option/Vote.php | 2 -- app/code/Magento/Review/Model/ResourceModel/Rating.php | 2 -- .../Magento/Review/Model/ResourceModel/Rating/Collection.php | 2 -- app/code/Magento/Review/Model/ResourceModel/Rating/Entity.php | 2 -- .../Review/Model/ResourceModel/Rating/Grid/Collection.php | 2 -- .../Review/Model/ResourceModel/Rating/Option/Collection.php | 2 -- .../Magento/Review/Model/ResourceModel/Rating/Option/Vote.php | 2 -- .../Model/ResourceModel/Rating/Option/Vote/Collection.php | 1 - app/code/Magento/Review/Model/ResourceModel/Review/Status.php | 2 -- .../Review/Model/ResourceModel/Review/Status/Collection.php | 2 -- app/code/Magento/Review/Model/ResourceModel/Review/Summary.php | 2 -- .../Review/Model/ResourceModel/Review/Summary/Collection.php | 2 -- app/code/Magento/Review/Model/Review/Status.php | 1 - 31 files changed, 49 deletions(-) diff --git a/app/code/Magento/Review/Block/Adminhtml/Add.php b/app/code/Magento/Review/Block/Adminhtml/Add.php index 5f739b2595418..fca6419ca6037 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Add.php +++ b/app/code/Magento/Review/Block/Adminhtml/Add.php @@ -8,8 +8,6 @@ /** * Adminhtml add Review main block - * - * @author Magento Core Team */ class Add extends \Magento\Backend\Block\Widget\Form\Container { diff --git a/app/code/Magento/Review/Block/Adminhtml/Add/Form.php b/app/code/Magento/Review/Block/Adminhtml/Add/Form.php index efffa7a02678a..a3566adcb3387 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Add/Form.php +++ b/app/code/Magento/Review/Block/Adminhtml/Add/Form.php @@ -10,8 +10,6 @@ /** * Adminhtml add product review form - * - * @author Magento Core Team */ class Form extends \Magento\Backend\Block\Widget\Form\Generic { diff --git a/app/code/Magento/Review/Block/Adminhtml/Grid/Filter/Type.php b/app/code/Magento/Review/Block/Adminhtml/Grid/Filter/Type.php index b042def8dac77..76158272baeeb 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Grid/Filter/Type.php +++ b/app/code/Magento/Review/Block/Adminhtml/Grid/Filter/Type.php @@ -7,8 +7,6 @@ /** * Adminhtml review grid filter by type - * - * @author Magento Core Team */ class Type extends \Magento\Backend\Block\Widget\Grid\Column\Filter\Select { diff --git a/app/code/Magento/Review/Block/Adminhtml/Grid/Renderer/Type.php b/app/code/Magento/Review/Block/Adminhtml/Grid/Renderer/Type.php index 83108ad6cb514..535dea3da46b7 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Grid/Renderer/Type.php +++ b/app/code/Magento/Review/Block/Adminhtml/Grid/Renderer/Type.php @@ -7,8 +7,6 @@ /** * Adminhtml review grid item renderer for item type - * - * @author Magento Core Team */ class Type extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer { diff --git a/app/code/Magento/Review/Block/Adminhtml/Product/Grid.php b/app/code/Magento/Review/Block/Adminhtml/Product/Grid.php index d3bbdf9a7eb40..282df148991a6 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Product/Grid.php +++ b/app/code/Magento/Review/Block/Adminhtml/Product/Grid.php @@ -8,7 +8,6 @@ /** * 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.php b/app/code/Magento/Review/Block/Adminhtml/Rating.php index a9b6c89176283..3d9545518374e 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Rating.php +++ b/app/code/Magento/Review/Block/Adminhtml/Rating.php @@ -9,7 +9,6 @@ * Ratings grid * * @api - * @author Magento Core Team * @since 100.0.2 */ class Rating extends \Magento\Backend\Block\Widget\Grid\Container diff --git a/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Form.php b/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Form.php index 61bb2ce2e903a..9a004513d8faf 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Form.php +++ b/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Form.php @@ -7,8 +7,6 @@ /** * Rating edit form block - * - * @author Magento Core Team */ class Form extends \Magento\Backend\Block\Widget\Form\Generic { diff --git a/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tabs.php b/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tabs.php index 86c7ee6a24597..ddf83d6e86197 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tabs.php +++ b/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tabs.php @@ -7,8 +7,6 @@ /** * Admin rating left menu - * - * @author Magento Core Team */ class Tabs extends \Magento\Backend\Block\Widget\Tabs { diff --git a/app/code/Magento/Review/Block/Customer/View.php b/app/code/Magento/Review/Block/Customer/View.php index bb322f17b6ce9..76d2609d3094d 100644 --- a/app/code/Magento/Review/Block/Customer/View.php +++ b/app/code/Magento/Review/Block/Customer/View.php @@ -14,7 +14,6 @@ * Customer Review detailed view block * * @api - * @author Magento Core Team * @since 100.0.2 */ class View extends \Magento\Catalog\Block\Product\AbstractProduct diff --git a/app/code/Magento/Review/Block/Form.php b/app/code/Magento/Review/Block/Form.php index c6dfad8265ac7..7739c94b0cf1e 100644 --- a/app/code/Magento/Review/Block/Form.php +++ b/app/code/Magento/Review/Block/Form.php @@ -14,7 +14,6 @@ * Review form block * * @api - * @author Magento Core Team * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @since 100.0.2 */ diff --git a/app/code/Magento/Review/Block/Form/Configure.php b/app/code/Magento/Review/Block/Form/Configure.php index e76fa8bd1c6d5..cedb01e063e29 100644 --- a/app/code/Magento/Review/Block/Form/Configure.php +++ b/app/code/Magento/Review/Block/Form/Configure.php @@ -9,7 +9,6 @@ * Review form block * * @api - * @author Magento Core Team * @since 100.0.2 */ class Configure extends \Magento\Review\Block\Form diff --git a/app/code/Magento/Review/Block/Product/Review.php b/app/code/Magento/Review/Block/Product/Review.php index 569105f60490a..d1080e471a109 100644 --- a/app/code/Magento/Review/Block/Product/Review.php +++ b/app/code/Magento/Review/Block/Product/Review.php @@ -12,7 +12,6 @@ * Product Review Tab * * @api - * @author Magento Core Team * @since 100.0.2 */ class Review extends Template implements IdentityInterface diff --git a/app/code/Magento/Review/Block/Product/View.php b/app/code/Magento/Review/Block/Product/View.php index c66e3e50b919b..7256c8194626e 100644 --- a/app/code/Magento/Review/Block/Product/View.php +++ b/app/code/Magento/Review/Block/Product/View.php @@ -11,7 +11,6 @@ /** * Product Reviews Page * - * @author Magento Core Team * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class View extends \Magento\Catalog\Block\Product\View diff --git a/app/code/Magento/Review/Block/Rating/Entity/Detailed.php b/app/code/Magento/Review/Block/Rating/Entity/Detailed.php index d496b3955de7b..af03734517285 100644 --- a/app/code/Magento/Review/Block/Rating/Entity/Detailed.php +++ b/app/code/Magento/Review/Block/Rating/Entity/Detailed.php @@ -7,8 +7,6 @@ /** * Entity rating block - * - * @author Magento Core Team */ class Detailed extends \Magento\Framework\View\Element\Template { diff --git a/app/code/Magento/Review/Block/View.php b/app/code/Magento/Review/Block/View.php index bbdd246835f9e..ed0f63c0bf6a8 100644 --- a/app/code/Magento/Review/Block/View.php +++ b/app/code/Magento/Review/Block/View.php @@ -9,7 +9,6 @@ * Review detailed view block * * @api - * @author Magento Core Team * @since 100.0.2 */ class View extends \Magento\Catalog\Block\Product\AbstractProduct diff --git a/app/code/Magento/Review/Model/Rating.php b/app/code/Magento/Review/Model/Rating.php index c8506926f5160..ddcc1d6369a05 100644 --- a/app/code/Magento/Review/Model/Rating.php +++ b/app/code/Magento/Review/Model/Rating.php @@ -17,7 +17,6 @@ * @method \Magento\Review\Model\Rating setStores(array $value) * @method string getRatingCode() * - * @author Magento Core Team * @since 100.0.2 */ class Rating extends \Magento\Framework\Model\AbstractModel implements IdentityInterface diff --git a/app/code/Magento/Review/Model/Rating/Entity.php b/app/code/Magento/Review/Model/Rating/Entity.php index cc2d5ab852518..e20df83394f62 100644 --- a/app/code/Magento/Review/Model/Rating/Entity.php +++ b/app/code/Magento/Review/Model/Rating/Entity.php @@ -11,7 +11,6 @@ * @method string getEntityCode() * @method \Magento\Review\Model\Rating\Entity setEntityCode(string $value) * - * @author Magento Core Team * @codeCoverageIgnore */ class Entity extends \Magento\Framework\Model\AbstractModel diff --git a/app/code/Magento/Review/Model/Rating/Option.php b/app/code/Magento/Review/Model/Rating/Option.php index 2f5ece53d1bb1..5517a34528fac 100644 --- a/app/code/Magento/Review/Model/Rating/Option.php +++ b/app/code/Magento/Review/Model/Rating/Option.php @@ -18,7 +18,6 @@ * @method int getPosition() * @method \Magento\Review\Model\Rating\Option setPosition(int $value) * - * @author Magento Core Team * @codeCoverageIgnore * @since 100.0.2 */ diff --git a/app/code/Magento/Review/Model/Rating/Option/Vote.php b/app/code/Magento/Review/Model/Rating/Option/Vote.php index 1cf720092fb3e..da4cd527d15c5 100644 --- a/app/code/Magento/Review/Model/Rating/Option/Vote.php +++ b/app/code/Magento/Review/Model/Rating/Option/Vote.php @@ -9,8 +9,6 @@ * Rating vote model * * @api - * - * @author Magento Core Team * @codeCoverageIgnore * @since 100.0.2 */ diff --git a/app/code/Magento/Review/Model/ResourceModel/Rating.php b/app/code/Magento/Review/Model/ResourceModel/Rating.php index 81f732f1b9ea1..5040fe31c3bd0 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Rating.php +++ b/app/code/Magento/Review/Model/ResourceModel/Rating.php @@ -12,8 +12,6 @@ * Rating resource model * * @api - * - * @author Magento Core Team * @since 100.0.2 * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ diff --git a/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php b/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php index 0dcb9da6a8c75..d5aca0c5605cf 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php +++ b/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php @@ -9,8 +9,6 @@ * Rating collection resource model * * @api - * - * @author Magento Core Team * @since 100.0.2 */ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection diff --git a/app/code/Magento/Review/Model/ResourceModel/Rating/Entity.php b/app/code/Magento/Review/Model/ResourceModel/Rating/Entity.php index f19a2bb328efa..b60412f67bfab 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Rating/Entity.php +++ b/app/code/Magento/Review/Model/ResourceModel/Rating/Entity.php @@ -7,8 +7,6 @@ /** * Rating entity resource - * - * @author Magento Core Team */ class Entity extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb { diff --git a/app/code/Magento/Review/Model/ResourceModel/Rating/Grid/Collection.php b/app/code/Magento/Review/Model/ResourceModel/Rating/Grid/Collection.php index 3a6e880bf6f28..0dac595d68270 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Rating/Grid/Collection.php +++ b/app/code/Magento/Review/Model/ResourceModel/Rating/Grid/Collection.php @@ -7,8 +7,6 @@ /** * Rating grid collection - * - * @author Magento Core Team */ class Collection extends \Magento\Review\Model\ResourceModel\Rating\Collection { diff --git a/app/code/Magento/Review/Model/ResourceModel/Rating/Option/Collection.php b/app/code/Magento/Review/Model/ResourceModel/Rating/Option/Collection.php index 394eb5c3e077a..346d8ded6ab5d 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Rating/Option/Collection.php +++ b/app/code/Magento/Review/Model/ResourceModel/Rating/Option/Collection.php @@ -7,8 +7,6 @@ /** * Rating option collection - * - * @author Magento Core Team */ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection { diff --git a/app/code/Magento/Review/Model/ResourceModel/Rating/Option/Vote.php b/app/code/Magento/Review/Model/ResourceModel/Rating/Option/Vote.php index ed20396bb382d..e90182461b9ee 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Rating/Option/Vote.php +++ b/app/code/Magento/Review/Model/ResourceModel/Rating/Option/Vote.php @@ -7,8 +7,6 @@ /** * Rating vote resource model - * - * @author Magento Core Team */ class Vote extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb { diff --git a/app/code/Magento/Review/Model/ResourceModel/Rating/Option/Vote/Collection.php b/app/code/Magento/Review/Model/ResourceModel/Rating/Option/Vote/Collection.php index 134fa7771633f..34a4e734ef801 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Rating/Option/Vote/Collection.php +++ b/app/code/Magento/Review/Model/ResourceModel/Rating/Option/Vote/Collection.php @@ -9,7 +9,6 @@ * Rating votes collection * * @api - * @author Magento Core Team * @since 100.0.2 */ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection diff --git a/app/code/Magento/Review/Model/ResourceModel/Review/Status.php b/app/code/Magento/Review/Model/ResourceModel/Review/Status.php index 0c865e0ab8fc4..4112fdb7cee22 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Review/Status.php +++ b/app/code/Magento/Review/Model/ResourceModel/Review/Status.php @@ -7,8 +7,6 @@ /** * Review status resource model - * - * @author Magento Core Team */ class Status extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb { diff --git a/app/code/Magento/Review/Model/ResourceModel/Review/Status/Collection.php b/app/code/Magento/Review/Model/ResourceModel/Review/Status/Collection.php index 05a3ae4728f7c..1374fff9c28f7 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Review/Status/Collection.php +++ b/app/code/Magento/Review/Model/ResourceModel/Review/Status/Collection.php @@ -6,8 +6,6 @@ /** * Review statuses collection - * - * @author Magento Core Team */ namespace Magento\Review\Model\ResourceModel\Review\Status; diff --git a/app/code/Magento/Review/Model/ResourceModel/Review/Summary.php b/app/code/Magento/Review/Model/ResourceModel/Review/Summary.php index e7597f7c313e4..19e0d6ce66d01 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Review/Summary.php +++ b/app/code/Magento/Review/Model/ResourceModel/Review/Summary.php @@ -10,8 +10,6 @@ /** * Review summary resource model - * - * @author Magento Core Team */ class Summary extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb { diff --git a/app/code/Magento/Review/Model/ResourceModel/Review/Summary/Collection.php b/app/code/Magento/Review/Model/ResourceModel/Review/Summary/Collection.php index 04f6127e6fe00..14a9ebd96792c 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Review/Summary/Collection.php +++ b/app/code/Magento/Review/Model/ResourceModel/Review/Summary/Collection.php @@ -7,8 +7,6 @@ /** * Review summery collection - * - * @author Magento Core Team */ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection { diff --git a/app/code/Magento/Review/Model/Review/Status.php b/app/code/Magento/Review/Model/Review/Status.php index 1ea151cf23173..5cc3dd142a7d7 100644 --- a/app/code/Magento/Review/Model/Review/Status.php +++ b/app/code/Magento/Review/Model/Review/Status.php @@ -7,7 +7,6 @@ /** * Review status * - * @author Magento Core Team * @codeCoverageIgnore */ namespace Magento\Review\Model\Review; From dda20f507d341b86933af87dac79b49fbd1efbce Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Tue, 7 Mar 2023 17:27:40 +0000 Subject: [PATCH 2/5] Fix static tests --- app/code/Magento/Review/Block/Adminhtml/Add/Form.php | 2 -- app/code/Magento/Review/Block/Adminhtml/Rating.php | 2 ++ app/code/Magento/Review/Block/Form.php | 2 -- app/code/Magento/Review/Block/Product/Review.php | 2 -- app/code/Magento/Review/Model/Rating.php | 6 +++--- app/code/Magento/Review/Model/Rating/Option/Vote.php | 2 ++ app/code/Magento/Review/Model/ResourceModel/Rating.php | 4 +--- .../Review/Model/ResourceModel/Rating/Collection.php | 1 - .../Review/Model/ResourceModel/Rating/Grid/Collection.php | 2 -- .../Review/Model/ResourceModel/Review/Status/Collection.php | 2 -- 10 files changed, 8 insertions(+), 17 deletions(-) diff --git a/app/code/Magento/Review/Block/Adminhtml/Add/Form.php b/app/code/Magento/Review/Block/Adminhtml/Add/Form.php index a3566adcb3387..452f716800296 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Add/Form.php +++ b/app/code/Magento/Review/Block/Adminhtml/Add/Form.php @@ -14,8 +14,6 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic { /** - * Review data - * * @var \Magento\Review\Helper\Data */ protected $_reviewData = null; diff --git a/app/code/Magento/Review/Block/Adminhtml/Rating.php b/app/code/Magento/Review/Block/Adminhtml/Rating.php index 3d9545518374e..af5e2cfe088da 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Rating.php +++ b/app/code/Magento/Review/Block/Adminhtml/Rating.php @@ -14,6 +14,8 @@ class Rating extends \Magento\Backend\Block\Widget\Grid\Container { /** + * Initialise the block + * * @return void */ protected function _construct() diff --git a/app/code/Magento/Review/Block/Form.php b/app/code/Magento/Review/Block/Form.php index 7739c94b0cf1e..14f8c79005b0b 100644 --- a/app/code/Magento/Review/Block/Form.php +++ b/app/code/Magento/Review/Block/Form.php @@ -20,8 +20,6 @@ class Form extends \Magento\Framework\View\Element\Template { /** - * Review data - * * @var \Magento\Review\Helper\Data */ protected $_reviewData = null; diff --git a/app/code/Magento/Review/Block/Product/Review.php b/app/code/Magento/Review/Block/Product/Review.php index d1080e471a109..a8b32212b7aa5 100644 --- a/app/code/Magento/Review/Block/Product/Review.php +++ b/app/code/Magento/Review/Block/Product/Review.php @@ -17,8 +17,6 @@ class Review extends Template implements IdentityInterface { /** - * Core registry - * * @var \Magento\Framework\Registry */ protected $_coreRegistry; diff --git a/app/code/Magento/Review/Model/Rating.php b/app/code/Magento/Review/Model/Rating.php index ddcc1d6369a05..eff5ff20b6442 100644 --- a/app/code/Magento/Review/Model/Rating.php +++ b/app/code/Magento/Review/Model/Rating.php @@ -24,11 +24,11 @@ class Rating extends \Magento\Framework\Model\AbstractModel implements IdentityI /** * rating entity codes */ - const ENTITY_PRODUCT_CODE = 'product'; + public const ENTITY_PRODUCT_CODE = 'product'; - const ENTITY_PRODUCT_REVIEW_CODE = 'product_review'; + public const ENTITY_PRODUCT_REVIEW_CODE = 'product_review'; - const ENTITY_REVIEW_CODE = 'review'; + public const ENTITY_REVIEW_CODE = 'review'; /** * @var \Magento\Review\Model\Rating\OptionFactory diff --git a/app/code/Magento/Review/Model/Rating/Option/Vote.php b/app/code/Magento/Review/Model/Rating/Option/Vote.php index da4cd527d15c5..26f5fd1fdcb0b 100644 --- a/app/code/Magento/Review/Model/Rating/Option/Vote.php +++ b/app/code/Magento/Review/Model/Rating/Option/Vote.php @@ -15,6 +15,8 @@ class Vote extends \Magento\Framework\Model\AbstractModel { /** + * Initialise the class + * * @return void */ protected function _construct() diff --git a/app/code/Magento/Review/Model/ResourceModel/Rating.php b/app/code/Magento/Review/Model/ResourceModel/Rating.php index 5040fe31c3bd0..edaffaf498420 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Rating.php +++ b/app/code/Magento/Review/Model/ResourceModel/Rating.php @@ -17,11 +17,9 @@ */ class Rating extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb { - const RATING_STATUS_APPROVED = 'Approved'; + public const RATING_STATUS_APPROVED = 'Approved'; /** - * Store manager - * * @var \Magento\Store\Model\StoreManagerInterface */ protected $_storeManager; diff --git a/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php b/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php index d5aca0c5605cf..bce7ab92cd77a 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php +++ b/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php @@ -24,7 +24,6 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\Ab protected $_ratingCollectionF; /** - * Add store data flag * @var bool */ protected $_addStoreDataFlag = false; diff --git a/app/code/Magento/Review/Model/ResourceModel/Rating/Grid/Collection.php b/app/code/Magento/Review/Model/ResourceModel/Rating/Grid/Collection.php index 0dac595d68270..3a3fa215ce4c1 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Rating/Grid/Collection.php +++ b/app/code/Magento/Review/Model/ResourceModel/Rating/Grid/Collection.php @@ -11,8 +11,6 @@ class Collection extends \Magento\Review\Model\ResourceModel\Rating\Collection { /** - * Core registry - * * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; diff --git a/app/code/Magento/Review/Model/ResourceModel/Review/Status/Collection.php b/app/code/Magento/Review/Model/ResourceModel/Review/Status/Collection.php index 1374fff9c28f7..44a0dcffa7bec 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Review/Status/Collection.php +++ b/app/code/Magento/Review/Model/ResourceModel/Review/Status/Collection.php @@ -12,8 +12,6 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection { /** - * Review status table - * * @var string */ protected $_reviewStatusTable; From 7606dd00c522e9122c810e048a521d1747ac763d Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Tue, 14 Mar 2023 17:16:22 +0000 Subject: [PATCH 3/5] Fix static test failures --- .../Magento/Review/Block/Adminhtml/Rating/Edit/Form.php | 2 ++ .../Magento/Review/Block/Adminhtml/Rating/Edit/Tabs.php | 4 ++++ app/code/Magento/Review/Block/Customer/View.php | 9 ++++++--- app/code/Magento/Review/Block/Form.php | 4 ++-- app/code/Magento/Review/Model/Rating.php | 8 +++++++- app/code/Magento/Review/Model/Rating/Entity.php | 4 ++++ app/code/Magento/Review/Model/Rating/Option.php | 6 ++++++ .../Review/Model/ResourceModel/Rating/Collection.php | 4 +++- 8 files changed, 34 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Form.php b/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Form.php index 9a004513d8faf..3051039abae23 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Form.php +++ b/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Form.php @@ -11,6 +11,8 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic { /** + * Prepare the form + * * @return $this */ protected function _prepareForm() diff --git a/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tabs.php b/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tabs.php index ddf83d6e86197..6d894a0b44805 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tabs.php +++ b/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tabs.php @@ -11,6 +11,8 @@ class Tabs extends \Magento\Backend\Block\Widget\Tabs { /** + * Initialise the block + * * @return void */ protected function _construct() @@ -22,6 +24,8 @@ protected function _construct() } /** + * Add rating information tab + * * @return $this */ protected function _beforeToHtml() diff --git a/app/code/Magento/Review/Block/Customer/View.php b/app/code/Magento/Review/Block/Customer/View.php index 76d2609d3094d..ef462353f7fd2 100644 --- a/app/code/Magento/Review/Block/Customer/View.php +++ b/app/code/Magento/Review/Block/Customer/View.php @@ -182,11 +182,14 @@ public function getTotalReviews() { if (!$this->getTotalReviewsCache()) { $this->setTotalReviewsCache( - $this->_reviewFactory->create()->getTotalReviews($this->getProductData()->getId()), - false, - $this->_storeManager->getStore()->getId() + $this->_reviewFactory->create()->getTotalReviews( + $this->getProductData()->getId(), + false, + $this->_storeManager->getStore()->getId() + ) ); } + return $this->getTotalReviewsCache(); } diff --git a/app/code/Magento/Review/Block/Form.php b/app/code/Magento/Review/Block/Form.php index 14f8c79005b0b..35a47aca8715a 100644 --- a/app/code/Magento/Review/Block/Form.php +++ b/app/code/Magento/Review/Block/Form.php @@ -71,8 +71,6 @@ class Form extends \Magento\Framework\View\Element\Template private $serializer; /** - * Form constructor. - * * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Framework\Url\EncoderInterface $urlEncoder * @param \Magento\Review\Helper\Data $reviewData @@ -140,6 +138,8 @@ protected function _construct() } /** + * Return JavaScript layout object + * * @return string */ public function getJsLayout() diff --git a/app/code/Magento/Review/Model/Rating.php b/app/code/Magento/Review/Model/Rating.php index eff5ff20b6442..093a73ae86442 100644 --- a/app/code/Magento/Review/Model/Rating.php +++ b/app/code/Magento/Review/Model/Rating.php @@ -74,6 +74,8 @@ protected function _construct() } /** + * Add a vote to an option + * * @param int $optionId * @param int $entityPkValue * @return $this @@ -93,6 +95,8 @@ public function addOptionVote($optionId, $entityPkValue) } /** + * Update a vote for an option + * * @param int $optionId * @return $this */ @@ -111,7 +115,7 @@ public function updateOptionVote($optionId) } /** - * retrieve rating options + * Retrieve rating options * * @return array */ @@ -142,6 +146,8 @@ public function getEntitySummary($entityPkValue, $onlyForCurrentStore = true) } /** + * Get summary of review + * * @param int $reviewId * @param bool $onlyForCurrentStore * @return array diff --git a/app/code/Magento/Review/Model/Rating/Entity.php b/app/code/Magento/Review/Model/Rating/Entity.php index e20df83394f62..d69252806ff7a 100644 --- a/app/code/Magento/Review/Model/Rating/Entity.php +++ b/app/code/Magento/Review/Model/Rating/Entity.php @@ -16,6 +16,8 @@ class Entity extends \Magento\Framework\Model\AbstractModel { /** + * Initialise the model + * * @return void */ protected function _construct() @@ -24,6 +26,8 @@ protected function _construct() } /** + * Return the ID for the specified code + * * @param string $entityCode * @return int */ diff --git a/app/code/Magento/Review/Model/Rating/Option.php b/app/code/Magento/Review/Model/Rating/Option.php index 5517a34528fac..8530e43270925 100644 --- a/app/code/Magento/Review/Model/Rating/Option.php +++ b/app/code/Magento/Review/Model/Rating/Option.php @@ -24,6 +24,8 @@ class Option extends \Magento\Framework\Model\AbstractModel { /** + * Initialise the model + * * @return void */ protected function _construct() @@ -32,6 +34,8 @@ protected function _construct() } /** + * Add a vote + * * @return $this */ public function addVote() @@ -41,6 +45,8 @@ public function addVote() } /** + * Set the identifier + * * @param mixed $id * @return $this */ diff --git a/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php b/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php index bce7ab92cd77a..2dca11d59c129 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php +++ b/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php @@ -311,7 +311,9 @@ protected function _addStoreData() if (is_array($data) && count($data) > 0) { foreach ($data as $row) { $item = $this->getItemById($row['rating_id']); - $item->setStores(array_merge($item->getStores(), [$row['store_id']])); + $stores = $item->getStores(); + $stores[] = $row['store_id']; + $item->setStores(array_unique($stores)); } } return $this; From 5b59ad3fb6c8b5576593d4ed043107dd1f67ad19 Mon Sep 17 00:00:00 2001 From: engcom-Delta Date: Fri, 24 Mar 2023 12:23:35 +0530 Subject: [PATCH 4/5] PR:36977 fix for static test failures --- app/code/Magento/Review/Block/Customer/View.php | 1 + app/code/Magento/Review/Block/View.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/code/Magento/Review/Block/Customer/View.php b/app/code/Magento/Review/Block/Customer/View.php index ef462353f7fd2..803b073040620 100644 --- a/app/code/Magento/Review/Block/Customer/View.php +++ b/app/code/Magento/Review/Block/Customer/View.php @@ -161,6 +161,7 @@ public function getRating() * Get rating summary * * @deprecated 100.3.3 + * @see f72f74d3 * @return array */ public function getRatingSummary() diff --git a/app/code/Magento/Review/Block/View.php b/app/code/Magento/Review/Block/View.php index ed0f63c0bf6a8..37a61a9032eed 100644 --- a/app/code/Magento/Review/Block/View.php +++ b/app/code/Magento/Review/Block/View.php @@ -120,6 +120,7 @@ public function getRating() * Retrieve rating summary for current product * * @deprecated 100.3.3 + * @see f72f74d3 * @return string */ public function getRatingSummary() From cfae994c65b217fc4296a05be29b1fa88d49b4d1 Mon Sep 17 00:00:00 2001 From: engcom-Delta Date: Fri, 24 Mar 2023 15:05:59 +0530 Subject: [PATCH 5/5] fix for static test failure --- .../Magento/Review/Model/ResourceModel/Rating/Collection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php b/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php index 2dca11d59c129..f18c5f0b44a22 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php +++ b/app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php @@ -127,7 +127,7 @@ public function setStoreFilter($storeId) if (!is_array($storeId)) { $storeId = [$storeId === null ? -1 : $storeId]; } - if (empty($storeId)) { + if ($storeId == 0) { return $this; } if (!$this->_isStoreJoined) {