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

MenuItem::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
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
    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