Code Duplication    Length = 44-46 lines in 4 locations

src/WebHemi/Middleware/Action/Admin/Applications/AddAction.php 1 location

@@ 24-69 (lines=46) @@
21
/**
22
 * Class AddAction
23
 */
24
class AddAction extends AbstractMiddlewareAction
25
{
26
    /** @var ConfigInterface */
27
    private $configuration;
28
    /** @var AuthAdapterInterface */
29
    private $authAdapter;
30
    /** @var EnvironmentManager */
31
    private $environmentManager;
32
33
    /**
34
     * DashboardAction constructor.
35
     *
36
     * @param ConfigInterface $configuration
37
     * @param AuthAdapterInterface $authAdapter
38
     * @param EnvironmentManager $environmentManager
39
     */
40
    public function __construct(
41
        ConfigInterface $configuration,
42
        AuthAdapterInterface $authAdapter,
43
        EnvironmentManager $environmentManager
44
    ) {
45
        $this->configuration = $configuration;
46
        $this->authAdapter = $authAdapter;
47
        $this->environmentManager = $environmentManager;
48
    }
49
50
    /**
51
     * Gets template map name or template file path.
52
     *
53
     * @return string
54
     */
55
    public function getTemplateName() : string
56
    {
57
        return 'admin-applications-add';
58
    }
59
60
    /**
61
     * Gets template data.
62
     *
63
     * @return array
64
     */
65
    public function getTemplateData() : array
66
    {
67
        return [];
68
    }
69
}
70

src/WebHemi/Middleware/Action/Admin/Applications/EditAction.php 1 location

@@ 24-69 (lines=46) @@
21
/**
22
 * Class EditAction
23
 */
24
class EditAction extends AbstractMiddlewareAction
25
{
26
    /** @var ConfigInterface */
27
    private $configuration;
28
    /** @var AuthAdapterInterface */
29
    private $authAdapter;
30
    /** @var EnvironmentManager */
31
    private $environmentManager;
32
33
    /**
34
     * DashboardAction constructor.
35
     *
36
     * @param ConfigInterface $configuration
37
     * @param AuthAdapterInterface $authAdapter
38
     * @param EnvironmentManager $environmentManager
39
     */
40
    public function __construct(
41
        ConfigInterface $configuration,
42
        AuthAdapterInterface $authAdapter,
43
        EnvironmentManager $environmentManager
44
    ) {
45
        $this->configuration = $configuration;
46
        $this->authAdapter = $authAdapter;
47
        $this->environmentManager = $environmentManager;
48
    }
49
50
    /**
51
     * Gets template map name or template file path.
52
     *
53
     * @return string
54
     */
55
    public function getTemplateName() : string
56
    {
57
        return 'admin-applications-edit';
58
    }
59
60
    /**
61
     * Gets template data.
62
     *
63
     * @return array
64
     */
65
    public function getTemplateData() : array
66
    {
67
        return [];
68
    }
69
}
70

src/WebHemi/Middleware/Action/Admin/Applications/ViewAction.php 1 location

@@ 24-69 (lines=46) @@
21
/**
22
 * Class ViewAction
23
 */
24
class ViewAction extends AbstractMiddlewareAction
25
{
26
    /** @var ConfigInterface */
27
    private $configuration;
28
    /** @var AuthAdapterInterface */
29
    private $authAdapter;
30
    /** @var EnvironmentManager */
31
    private $environmentManager;
32
33
    /**
34
     * DashboardAction constructor.
35
     *
36
     * @param ConfigInterface $configuration
37
     * @param AuthAdapterInterface $authAdapter
38
     * @param EnvironmentManager $environmentManager
39
     */
40
    public function __construct(
41
        ConfigInterface $configuration,
42
        AuthAdapterInterface $authAdapter,
43
        EnvironmentManager $environmentManager
44
    ) {
45
        $this->configuration = $configuration;
46
        $this->authAdapter = $authAdapter;
47
        $this->environmentManager = $environmentManager;
48
    }
49
50
    /**
51
     * Gets template map name or template file path.
52
     *
53
     * @return string
54
     */
55
    public function getTemplateName() : string
56
    {
57
        return 'admin-applications-view';
58
    }
59
60
    /**
61
     * Gets template data.
62
     *
63
     * @return array
64
     */
65
    public function getTemplateData() : array
66
    {
67
        return [];
68
    }
69
}
70

src/WebHemi/Middleware/Action/Admin/DashboardAction.php 1 location

@@ 23-66 (lines=44) @@
20
/**
21
 * Class DashboardAction
22
 */
23
class DashboardAction extends AbstractMiddlewareAction
24
{
25
    /** @var AuthAdapterInterface */
26
    private $authAdapter;
27
    /** @var EnvironmentManager */
28
    private $environmentManager;
29
30
    /**
31
     * DashboardAction constructor.
32
     *
33
     * @param AuthAdapterInterface $authAdapter
34
     * @param EnvironmentManager $environmentManager
35
     */
36
    public function __construct(
37
        AuthAdapterInterface $authAdapter,
38
        EnvironmentManager $environmentManager
39
    ) {
40
        $this->authAdapter = $authAdapter;
41
        $this->environmentManager = $environmentManager;
42
    }
43
44
    /**
45
     * Gets template map name or template file path.
46
     *
47
     * @return string
48
     */
49
    public function getTemplateName() : string
50
    {
51
        return 'admin-dashboard';
52
    }
53
54
    /**
55
     * Gets template data.
56
     *
57
     * @return array
58
     */
59
    public function getTemplateData() : array
60
    {
61
        // @TODO TBD
62
        return [
63
            'user' => $this->authAdapter->getIdentity(),
64
        ];
65
    }
66
}
67