Passed
Pull Request — master (#138)
by Arnaud
08:18 queued 05:22
created

MenuItem::getConfiguration()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace LAG\AdminBundle\Menu;
4
5
use LAG\AdminBundle\Configuration\MenuItemConfiguration;
6
7
class MenuItem
8
{
9
    /**
10
     * @var MenuItemConfiguration
11
     */
12
    private $configuration;
13
14
    /**
15
     * MenuItem constructor.
16
     */
17
    public function __construct(MenuItemConfiguration $configuration)
18
    {
19
        $this->configuration = $configuration;
20
    }
21
22
    public function getConfiguration(): MenuItemConfiguration
23
    {
24
        return $this->configuration;
25
    }
26
27
    /**
28
     * @return mixed
29
     */
30
    public function get(string $parameter)
31
    {
32
        return $this->configuration->get($parameter);
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function getName(): string
39
    {
40
        return $this->configuration->getName();
41
    }
42
43
    /**
44
     * @return string|null
45
     */
46
    public function getPosition(): ?string
47
    {
48
        return $this->configuration->getPosition();
49
    }
50
}
51