Skip to content

Commit f7c95d6

Browse files
author
Yuri Kovsher
committed
MAGETWO-36729: Refactor controller actions in the Review module
1 parent 64912a3 commit f7c95d6

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

app/code/Magento/Review/Controller/Product/Post.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class Post extends ProductController
1616
*
1717
* @return \Magento\Framework\Controller\Result\Redirect
1818
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
19+
* @SuppressWarnings(PHPMD.NPathComplexity)
1920
*/
2021
public function execute()
2122
{

app/code/Magento/Review/Test/Unit/Controller/Adminhtml/Product/PostTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
/**
1111
* @SuppressWarnings(PHPMD.TooManyFields)
12+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1213
*/
1314
class PostTest extends \PHPUnit_Framework_TestCase
1415
{
@@ -132,7 +133,8 @@ protected function _prepareMockObjects()
132133
['__wakeup', 'setRatingId', 'setReviewId', 'addOptionVote'],
133134
[],
134135
'',
135-
false);
136+
false
137+
);
136138
$this->ratingFactoryMock = $this->getMock(
137139
'Magento\Review\Model\RatingFactory',
138140
['create'],

app/code/Magento/Review/Test/Unit/Controller/Product/PostTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
use Magento\Review\Model\Review;
99
use Magento\Framework\Controller\ResultFactory;
1010

11+
/**
12+
* @SuppressWarnings(PHPMD.TooManyFields)
13+
*/
1114
class PostTest extends \PHPUnit_Framework_TestCase
1215
{
1316
/**
@@ -95,6 +98,9 @@ class PostTest extends \PHPUnit_Framework_TestCase
9598
*/
9699
protected $resultRedirectMock;
97100

101+
/**
102+
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
103+
*/
98104
public function setUp()
99105
{
100106
$this->redirect = $this->getMock('\Magento\Framework\App\Response\RedirectInterface');

0 commit comments

Comments
 (0)