Passed
Push — master ( 20e747...679572 )
by Ivan
01:59
created

RootNavigationItem   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getObject() 0 4 1
A getArray() 0 4 1
A config() 0 4 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Everlution\Navigation\Factory\Build\Hydrator;
6
7
use Everlution\Navigation\Factory\Build\NavigationItemConfig;
8
use Everlution\Navigation\RootNavigationItem as Root;
9
10
/**
11
 * Class RootNavigationItem.
12
 * @author Ivan Barlog <[email protected]>
13
 */
14
class RootNavigationItem extends NavigationItemConfig
15
{
16
    const OPTION_CHILDREN = 'items';
17
18
    /**
19
     * @param string $className
20
     * @param array $arguments
21
     * @return Root
22
     */
23
    protected function getObject(string $className, array $arguments)
24
    {
25
        return new Root('', '');
26
    }
27
28
    /**
29
     * @param Root $item
30
     * @return array
31
     */
32
    protected function getArray($item): array
33
    {
34
        return [];
35
    }
36
37
    protected function config()
38
    {
39
        $this->supportedClasses[] = Root::class;
40
    }
41
}
42