Skip to content

Commit 6bff1e1

Browse files
committed
MAGETWO-32872: Create pull request for S45 Controller Refactoring
1 parent d75d4c9 commit 6bff1e1

File tree

16 files changed

+31
-3
lines changed

16 files changed

+31
-3
lines changed

app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/View.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected function _isAllowed()
4040
public function execute()
4141
{
4242
$resultForward = $this->resultForwardFactory->create();
43-
if ($creditmemoId = $this->getRequest()->getParam('creditmemo_id')) {
43+
if ($this->getRequest()->getParam('creditmemo_id')) {
4444
$resultForward->setController('order_creditmemo');
4545
$resultForward->setParams(['come_from' => 'sales_creditmemo']);
4646
$resultForward->forward('view');

app/code/Magento/Sales/Controller/Adminhtml/Order/CommentsHistory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class CommentsHistory extends \Magento\Sales\Controller\Adminhtml\Order
2626
* @param \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory
2727
* @param \Magento\Framework\Controller\Result\RawFactory $resultRawFactory
2828
* @param \Magento\Framework\View\LayoutFactory $layoutFactory
29+
*
30+
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
2931
*/
3032
public function __construct(
3133
Action\Context $context,

app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Save.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ class Save extends \Magento\Sales\Controller\Adminhtml\Order\Create
1111
* Saving quote and create order
1212
*
1313
* @return \Magento\Backend\Model\View\Result\Forward|\Magento\Backend\Model\View\Result\Redirect
14+
*
15+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
1416
*/
1517
public function execute()
1618
{

app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/Save.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ protected function _isAllowed()
6565
* We can save only new creditmemo. Existing creditmemos are not editable
6666
*
6767
* @return \Magento\Backend\Model\View\Result\Redirect|\Magento\Backend\Model\View\Result\Forward
68+
*
69+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
70+
* @SuppressWarnings(PHPMD.NPathComplexity)
6871
*/
6972
public function execute()
7073
{

app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/Save.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ protected function _prepareShipment($invoice)
104104
* We can save only new invoice. Existing invoices are not editable
105105
*
106106
* @return \Magento\Framework\Controller\ResultInterface
107+
*
108+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
109+
* @SuppressWarnings(PHPMD.NPathComplexity)
110+
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
107111
*/
108112
public function execute()
109113
{

app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfdocs.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class Pdfdocs extends \Magento\Sales\Controller\Adminhtml\Order
1414
* Print all documents for selected orders
1515
*
1616
* @return ResponseInterface|\Magento\Backend\Model\View\Result\Redirect
17+
*
18+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
1719
*/
1820
public function execute()
1921
{

app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/View.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function execute()
4545
{
4646
/** @var \Magento\Backend\Model\View\Result\Forward $resultForward */
4747
$resultForward = $this->resultForwardFactory->create();
48-
if ($shipmentId = $this->getRequest()->getParam('shipment_id')) {
48+
if ($this->getRequest()->getParam('shipment_id')) {
4949
$resultForward->setController('order_shipment')
5050
->setModule('admin')
5151
->setParams(['come_from' => 'shipment'])

app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ public function __construct(
4242
* Custom options download action
4343
*
4444
* @return void|\Magento\Framework\Controller\Result\Forward
45+
*
46+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
4547
*/
4648
public function execute()
4749
{

dev/tests/unit/testsuite/Magento/Customer/Controller/Account/ConfirmTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
/**
1616
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
17+
* @SuppressWarnings(PHPMD.TooManyFields)
1718
*/
1819
class ConfirmTest extends \PHPUnit_Framework_TestCase
1920
{

dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice/EmailTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Class EmailTest
1414
*
1515
* @package Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoice
16+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1617
*/
1718
class EmailTest extends \PHPUnit_Framework_TestCase
1819
{
@@ -85,7 +86,7 @@ public function setUp()
8586
{
8687
$objectManagerHelper = new ObjectManagerHelper($this);
8788
$this->context = $this->getMock('Magento\Backend\App\Action\Context', [], [], '', false);
88-
$this->response = $this->getMock('Magento\Framework\App\ResponseInterface', [], [], '', false );
89+
$this->response = $this->getMock('Magento\Framework\App\ResponseInterface', [], [], '', false);
8990
$this->request = $this->getMock('Magento\Framework\App\RequestInterface', [], [], '', false);
9091
$this->objectManager = $this->getMock('Magento\Framework\ObjectManager\ObjectManager', [], [], '', false);
9192
$this->messageManager = $this->getMock('Magento\Framework\Message\Manager', [], [], '', false);

0 commit comments

Comments
 (0)