1 | <?php |
||
2 | |||
3 | namespace Firegento\DevDashboard\Plugin; |
||
4 | |||
5 | use Magento\Config\Controller\Adminhtml\System\Config\Save as Subject; |
||
6 | |||
7 | class ConfigSystemConfigSave |
||
8 | { |
||
9 | /** |
||
10 | * @var \Magento\Store\App\Response\Redirect |
||
11 | */ |
||
12 | protected $redirect; |
||
13 | |||
14 | public function __construct(\Magento\Framework\App\Action\Context $context) |
||
15 | { |
||
16 | $this->redirect = $context->getRedirect(); |
||
17 | } |
||
18 | |||
19 | public function afterExecute(Subject $subject, \Magento\Backend\Model\View\Result\Redirect $resultRedirect) |
||
0 ignored issues
–
show
|
|||
20 | { |
||
21 | if (false !== strpos($this->redirect->getRefererUrl(), 'devdashboard/index/index')) { |
||
22 | /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */ |
||
23 | return $resultRedirect->setPath('devdashboard/index/index'); |
||
24 | } |
||
25 | return $resultRedirect; |
||
26 | } |
||
27 | } |
||
28 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.