Passed
Push — master ( c12552...22ad80 )
by Gabor
04:56
created

ArchiveAction::getTemplateName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * WebHemi.
4
 *
5
 * PHP version 7.1
6
 *
7
 * @copyright 2012 - 2017 Gixx-web (http://www.gixx-web.com)
8
 * @license   https://opensource.org/licenses/MIT The MIT License (MIT)
9
 *
10
 * @link      http://www.gixx-web.com
11
 */
12
declare(strict_types = 1);
13
14
namespace WebHemi\Middleware\Action\Website\Directory;
15
16
use WebHemi\Data\StorageInterface;
17
use WebHemi\Data\Storage;
18
use WebHemi\Data\Entity;
19
use WebHemi\DateTime;
20
use WebHemi\Environment\ServiceInterface as EnvironmentInterface;
21
use WebHemi\Middleware\Action\AbstractMiddlewareAction;
22
use WebHemi\Router\ProxyInterface;
23
use WebHemi\StorageTrait;
24
25
/**
26
 * Class ArchiveAction.
27
 */
28 View Code Duplication
class ArchiveAction extends AbstractMiddlewareAction
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
29
{
30
    /**
31
     * Gets template map name or template file path.
32
     *
33
     * @return string
34
     */
35
    public function getTemplateName() : string
36
    {
37
        return 'website-post-list';
38
    }
39
40
    /**
41
     * Gets template data.
42
     *
43
     * @return array
44
     */
45
    public function getTemplateData() : array
46
    {
47
        $blogPosts = [];
48
        $title = '';
49
        $parameters = $this->getRoutingParameters();
50
51
52
        return [
53
            'title' => $title,
54
            'activeMenu' => $parameters['uri_parameter'],
55
            'blogPosts' => $blogPosts,
56
        ];
57
    }
58
}
59