Run   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 18
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 12 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * File:Run.php
7
 *
8
 * @author Maciej Sławik <[email protected]>
9
 * @copyright Copyright (C) 2019 Lizard Media (http://lizardmedia.pl)
10
 */
11
12
namespace LizardMedia\VarnishWarmer\Controller\Adminhtml\PurgeMultiple;
13
14
use LizardMedia\VarnishWarmer\Block\Adminhtml\PurgeMultiple\Form\Edit\Form as PurgeMultipleForm;
15
use LizardMedia\VarnishWarmer\Block\Adminhtml\PurgeSingle\Form\Edit\Form as PurgeSingleForm;
16
use Magento\Backend\App\Action;
17
use Magento\Framework\App\ResponseInterface;
18
19
/**
20
 * Class Run
21
 * @package LizardMedia\VarnishWarmer\Controller\Adminhtml\PurgeSingle
22
 */
23
class Run extends Action
24
{
25
    /**
26
     * @return ResponseInterface
27
     */
28
    public function execute(): ResponseInterface
29
    {
30
        $storeId = $this->getRequest()->getParam(PurgeMultipleForm::STORE_VIEW_FORM_PARAM);
31
        $destinationUrl = $this->getRequest()->getParam(PurgeMultipleForm::PROCESS_URL_FORM_PARAM);
32
33
        return $this->_redirect(
34
            $destinationUrl,
35
            [
36
                PurgeSingleForm::STORE_VIEW_FORM_PARAM => $storeId
37
            ]
38
        );
39
    }
40
}
41