Completed
Push — refonte ( 1242fa...069864 )
by Arnaud
13:36 queued 11:30
created

MenuItem   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 35
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getConfiguration() 0 4 1
A get() 0 4 1
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
     * @param MenuItemConfiguration $configuration
18
     */
19
    public function __construct(MenuItemConfiguration $configuration)
20
    {
21
        $this->configuration = $configuration;
22
    }
23
24
    /**
25
     * @return MenuItemConfiguration
26
     */
27
    public function getConfiguration(): MenuItemConfiguration
28
    {
29
        return $this->configuration;
30
    }
31
32
    /**
33
     * @param string $parameter
34
     *
35
     * @return mixed
36
     */
37
    public function get(string $parameter)
38
    {
39
        return $this->configuration->getParameter($parameter);
40
    }
41
}
42