RoutableItem::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
3
/**
4
 * (c) FSi sp. z o.o. <[email protected]>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
declare(strict_types=1);
11
12
namespace FSi\Bundle\AdminBundle\Menu\Item;
13
14
class RoutableItem extends Item
15
{
16
    /**
17
     * @var string
18
     */
19
    private $route;
20
21
    /**
22
     * @var array
23
     */
24
    private $routeParameters;
25
26
    public function __construct(string $name, ?string $route = null, array $routeParameters = [])
27
    {
28
        parent::__construct($name);
29
30
        $this->route = $route;
31
        $this->routeParameters = $routeParameters;
32
    }
33
34
    public function getRoute(): string
35
    {
36
        return $this->route;
37
    }
38
39
    public function getRouteParameters(): array
40
    {
41
        return $this->routeParameters;
42
    }
43
}
44