Skip to content

Commit 3ef65e4

Browse files
committed
Merge remote-tracking branch 'git-36978/no-author/review' into bluetooth_delivery
2 parents 3dfb849 + 2829610 commit 3ef65e4

File tree

31 files changed

+45
-74
lines changed

31 files changed

+45
-74
lines changed

app/code/Magento/Review/Block/Adminhtml/Add.php

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
/**
1010
* Adminhtml add Review main block
11-
*
12-
* @author Magento Core Team <[email protected]>
1311
*/
1412
class Add extends \Magento\Backend\Block\Widget\Form\Container
1513
{

app/code/Magento/Review/Block/Adminhtml/Add/Form.php

-4
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,10 @@
1010

1111
/**
1212
* Adminhtml add product review form
13-
*
14-
* @author Magento Core Team <[email protected]>
1513
*/
1614
class Form extends \Magento\Backend\Block\Widget\Form\Generic
1715
{
1816
/**
19-
* Review data
20-
*
2117
* @var \Magento\Review\Helper\Data
2218
*/
2319
protected $_reviewData = null;

app/code/Magento/Review/Block/Adminhtml/Grid/Filter/Type.php

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
/**
99
* Adminhtml review grid filter by type
10-
*
11-
* @author Magento Core Team <[email protected]>
1210
*/
1311
class Type extends \Magento\Backend\Block\Widget\Grid\Column\Filter\Select
1412
{

app/code/Magento/Review/Block/Adminhtml/Grid/Renderer/Type.php

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
/**
99
* Adminhtml review grid item renderer for item type
10-
*
11-
* @author Magento Core Team <[email protected]>
1210
*/
1311
class Type extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
1412
{

app/code/Magento/Review/Block/Adminhtml/Product/Grid.php

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
/**
99
* Adminhtml product grid block
1010
*
11-
* @author Magento Core Team <[email protected]>
1211
* @SuppressWarnings(PHPMD.DepthOfInheritance)
1312
*/
1413
class Grid extends \Magento\Catalog\Block\Adminhtml\Product\Grid

app/code/Magento/Review/Block/Adminhtml/Rating.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99
* Ratings grid
1010
*
1111
* @api
12-
* @author Magento Core Team <[email protected]>
1312
* @since 100.0.2
1413
*/
1514
class Rating extends \Magento\Backend\Block\Widget\Grid\Container
1615
{
1716
/**
17+
* Initialise the block
18+
*
1819
* @return void
1920
*/
2021
protected function _construct()

app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Form.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88
/**
99
* Rating edit form block
10-
*
11-
* @author Magento Core Team <[email protected]>
1210
*/
1311
class Form extends \Magento\Backend\Block\Widget\Form\Generic
1412
{
1513
/**
14+
* Prepare the form
15+
*
1616
* @return $this
1717
*/
1818
protected function _prepareForm()

app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tabs.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88
/**
99
* Admin rating left menu
10-
*
11-
* @author Magento Core Team <[email protected]>
1210
*/
1311
class Tabs extends \Magento\Backend\Block\Widget\Tabs
1412
{
1513
/**
14+
* Initialise the block
15+
*
1616
* @return void
1717
*/
1818
protected function _construct()
@@ -24,6 +24,8 @@ protected function _construct()
2424
}
2525

2626
/**
27+
* Add rating information tab
28+
*
2729
* @return $this
2830
*/
2931
protected function _beforeToHtml()

app/code/Magento/Review/Block/Customer/View.php

+7-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* Customer Review detailed view block
1515
*
1616
* @api
17-
* @author Magento Core Team <[email protected]>
1817
* @since 100.0.2
1918
*/
2019
class View extends \Magento\Catalog\Block\Product\AbstractProduct
@@ -162,6 +161,7 @@ public function getRating()
162161
* Get rating summary
163162
*
164163
* @deprecated 100.3.3
164+
* @see f72f74d3
165165
* @return array
166166
*/
167167
public function getRatingSummary()
@@ -183,11 +183,14 @@ public function getTotalReviews()
183183
{
184184
if (!$this->getTotalReviewsCache()) {
185185
$this->setTotalReviewsCache(
186-
$this->_reviewFactory->create()->getTotalReviews($this->getProductData()->getId()),
187-
false,
188-
$this->_storeManager->getStore()->getId()
186+
$this->_reviewFactory->create()->getTotalReviews(
187+
$this->getProductData()->getId(),
188+
false,
189+
$this->_storeManager->getStore()->getId()
190+
)
189191
);
190192
}
193+
191194
return $this->getTotalReviewsCache();
192195
}
193196

app/code/Magento/Review/Block/Form.php

+2-5
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,12 @@
1414
* Review form block
1515
*
1616
* @api
17-
* @author Magento Core Team <[email protected]>
1817
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1918
* @since 100.0.2
2019
*/
2120
class Form extends \Magento\Framework\View\Element\Template
2221
{
2322
/**
24-
* Review data
25-
*
2623
* @var \Magento\Review\Helper\Data
2724
*/
2825
protected $_reviewData = null;
@@ -74,8 +71,6 @@ class Form extends \Magento\Framework\View\Element\Template
7471
private $serializer;
7572

7673
/**
77-
* Form constructor.
78-
*
7974
* @param \Magento\Framework\View\Element\Template\Context $context
8075
* @param \Magento\Framework\Url\EncoderInterface $urlEncoder
8176
* @param \Magento\Review\Helper\Data $reviewData
@@ -143,6 +138,8 @@ protected function _construct()
143138
}
144139

145140
/**
141+
* Return JavaScript layout object
142+
*
146143
* @return string
147144
*/
148145
public function getJsLayout()

app/code/Magento/Review/Block/Form/Configure.php

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* Review form block
1010
*
1111
* @api
12-
* @author Magento Core Team <[email protected]>
1312
* @since 100.0.2
1413
*/
1514
class Configure extends \Magento\Review\Block\Form

app/code/Magento/Review/Block/Product/Review.php

-3
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,11 @@
1212
* Product Review Tab
1313
*
1414
* @api
15-
* @author Magento Core Team <[email protected]>
1615
* @since 100.0.2
1716
*/
1817
class Review extends Template implements IdentityInterface
1918
{
2019
/**
21-
* Core registry
22-
*
2320
* @var \Magento\Framework\Registry
2421
*/
2522
protected $_coreRegistry;

app/code/Magento/Review/Block/Product/View.php

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
/**
1212
* Product Reviews Page
1313
*
14-
* @author Magento Core Team <[email protected]>
1514
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1615
*/
1716
class View extends \Magento\Catalog\Block\Product\View

app/code/Magento/Review/Block/Rating/Entity/Detailed.php

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
/**
99
* Entity rating block
10-
*
11-
* @author Magento Core Team <[email protected]>
1210
*/
1311
class Detailed extends \Magento\Framework\View\Element\Template
1412
{

app/code/Magento/Review/Block/View.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* Review detailed view block
1010
*
1111
* @api
12-
* @author Magento Core Team <[email protected]>
1312
* @since 100.0.2
1413
*/
1514
class View extends \Magento\Catalog\Block\Product\AbstractProduct
@@ -121,6 +120,7 @@ public function getRating()
121120
* Retrieve rating summary for current product
122121
*
123122
* @deprecated 100.3.3
123+
* @see f72f74d3
124124
* @return string
125125
*/
126126
public function getRatingSummary()

app/code/Magento/Review/Model/Rating.php

+10-5
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,18 @@
1717
* @method \Magento\Review\Model\Rating setStores(array $value)
1818
* @method string getRatingCode()
1919
*
20-
* @author Magento Core Team <[email protected]>
2120
* @since 100.0.2
2221
*/
2322
class Rating extends \Magento\Framework\Model\AbstractModel implements IdentityInterface
2423
{
2524
/**
2625
* rating entity codes
2726
*/
28-
const ENTITY_PRODUCT_CODE = 'product';
27+
public const ENTITY_PRODUCT_CODE = 'product';
2928

30-
const ENTITY_PRODUCT_REVIEW_CODE = 'product_review';
29+
public const ENTITY_PRODUCT_REVIEW_CODE = 'product_review';
3130

32-
const ENTITY_REVIEW_CODE = 'review';
31+
public const ENTITY_REVIEW_CODE = 'review';
3332

3433
/**
3534
* @var \Magento\Review\Model\Rating\OptionFactory
@@ -75,6 +74,8 @@ protected function _construct()
7574
}
7675

7776
/**
77+
* Add a vote to an option
78+
*
7879
* @param int $optionId
7980
* @param int $entityPkValue
8081
* @return $this
@@ -94,6 +95,8 @@ public function addOptionVote($optionId, $entityPkValue)
9495
}
9596

9697
/**
98+
* Update a vote for an option
99+
*
97100
* @param int $optionId
98101
* @return $this
99102
*/
@@ -112,7 +115,7 @@ public function updateOptionVote($optionId)
112115
}
113116

114117
/**
115-
* retrieve rating options
118+
* Retrieve rating options
116119
*
117120
* @return array
118121
*/
@@ -143,6 +146,8 @@ public function getEntitySummary($entityPkValue, $onlyForCurrentStore = true)
143146
}
144147

145148
/**
149+
* Get summary of review
150+
*
146151
* @param int $reviewId
147152
* @param bool $onlyForCurrentStore
148153
* @return array

app/code/Magento/Review/Model/Rating/Entity.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
* @method string getEntityCode()
1212
* @method \Magento\Review\Model\Rating\Entity setEntityCode(string $value)
1313
*
14-
* @author Magento Core Team <[email protected]>
1514
* @codeCoverageIgnore
1615
*/
1716
class Entity extends \Magento\Framework\Model\AbstractModel
1817
{
1918
/**
19+
* Initialise the model
20+
*
2021
* @return void
2122
*/
2223
protected function _construct()
@@ -25,6 +26,8 @@ protected function _construct()
2526
}
2627

2728
/**
29+
* Return the ID for the specified code
30+
*
2831
* @param string $entityCode
2932
* @return int
3033
*/

app/code/Magento/Review/Model/Rating/Option.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@
1818
* @method int getPosition()
1919
* @method \Magento\Review\Model\Rating\Option setPosition(int $value)
2020
*
21-
* @author Magento Core Team <[email protected]>
2221
* @codeCoverageIgnore
2322
* @since 100.0.2
2423
*/
2524
class Option extends \Magento\Framework\Model\AbstractModel
2625
{
2726
/**
27+
* Initialise the model
28+
*
2829
* @return void
2930
*/
3031
protected function _construct()
@@ -33,6 +34,8 @@ protected function _construct()
3334
}
3435

3536
/**
37+
* Add a vote
38+
*
3639
* @return $this
3740
*/
3841
public function addVote()
@@ -42,6 +45,8 @@ public function addVote()
4245
}
4346

4447
/**
48+
* Set the identifier
49+
*
4550
* @param mixed $id
4651
* @return $this
4752
*/

app/code/Magento/Review/Model/Rating/Option/Vote.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
* Rating vote model
1010
*
1111
* @api
12-
*
13-
* @author Magento Core Team <[email protected]>
1412
* @codeCoverageIgnore
1513
* @since 100.0.2
1614
*/
1715
class Vote extends \Magento\Framework\Model\AbstractModel
1816
{
1917
/**
18+
* Initialise the class
19+
*
2020
* @return void
2121
*/
2222
protected function _construct()

app/code/Magento/Review/Model/ResourceModel/Rating.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,14 @@
1212
* Rating resource model
1313
*
1414
* @api
15-
*
16-
* @author Magento Core Team <[email protected]>
1715
* @since 100.0.2
1816
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1917
*/
2018
class Rating extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
2119
{
22-
const RATING_STATUS_APPROVED = 'Approved';
20+
public const RATING_STATUS_APPROVED = 'Approved';
2321

2422
/**
25-
* Store manager
26-
*
2723
* @var \Magento\Store\Model\StoreManagerInterface
2824
*/
2925
protected $_storeManager;

0 commit comments

Comments
 (0)