Completed
Push — master ( e8bfce...313e31 )
by Arnaud
13s queued 11s
created

MenuItem   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 7
c 2
b 0
f 0
dl 0
loc 36
ccs 0
cts 19
cp 0
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getPosition() 0 3 1
A get() 0 3 1
A getName() 0 3 1
A __construct() 0 3 1
A getConfiguration() 0 3 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
    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
    public function getName(): string
36
    {
37
        return $this->configuration->getName();
38
    }
39
40
    public function getPosition(): ?string
41
    {
42
        return $this->configuration->getPosition();
0 ignored issues
show
Bug introduced by
The method getPosition() does not exist on LAG\AdminBundle\Configur...n\MenuItemConfiguration. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

42
        return $this->configuration->/** @scrutinizer ignore-call */ getPosition();

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
43
    }
44
}
45