Passed
Push — master ( b0e895...df6b34 )
by
unknown
04:06
created

BackendCacheMassDisable::afterExecute()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 2
1
<?php
2
3
namespace Firegento\DevDashboard\Plugin;
4
5
use Magento\Backend\Controller\Adminhtml\Cache\MassDisable as Subject;
6
7
class BackendCacheMassDisable extends BackendCacheMassAbstract
8
{
9
    public function afterExecute(Subject $subject, \Magento\Backend\Model\View\Result\Redirect $resultRedirect)
0 ignored issues
show
Unused Code introduced by
The parameter $subject is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

9
    public function afterExecute(/** @scrutinizer ignore-unused */ Subject $subject, \Magento\Backend\Model\View\Result\Redirect $resultRedirect)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The method parameter $subject is never used
Loading history...
10
    {
11
        if (false !== strpos($this->redirect->getRefererUrl(), 'devdashboard/index/index')) {
12
            /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
13
            return $resultRedirect->setPath('devdashboard/index/index');
14
        }
15
        return $resultRedirect;
16
    }
17
}