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

CategoryAction::getTemplateData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 8

Duplication

Lines 14
Ratio 100 %

Importance

Changes 0
Metric Value
dl 14
loc 14
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
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 CategoryAction.
27
 */
28 View Code Duplication
class CategoryAction 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
53
        return [
54
            'title' => $title,
55
            'activeMenu' => $parameters['uri_parameter'],
56
            'blogPosts' => $blogPosts,
57
        ];
58
    }
59
}
60