| Total Complexity | 8 | 
| Total Lines | 62 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 7 | class Menu  | 
            ||
| 8 | { | 
            ||
| 9 | /**  | 
            ||
| 10 | * @var MenuItem[]  | 
            ||
| 11 | */  | 
            ||
| 12 | private $items = [];  | 
            ||
| 13 | |||
| 14 | /**  | 
            ||
| 15 | * @var string  | 
            ||
| 16 | */  | 
            ||
| 17 | private $name;  | 
            ||
| 18 | |||
| 19 | /**  | 
            ||
| 20 | * @var MenuConfiguration  | 
            ||
| 21 | */  | 
            ||
| 22 | private $configuration;  | 
            ||
| 23 | |||
| 24 | /**  | 
            ||
| 25 | * Menu constructor.  | 
            ||
| 26 | */  | 
            ||
| 27 | public function __construct(string $name, MenuConfiguration $configuration)  | 
            ||
| 28 |     { | 
            ||
| 29 | $this->name = $name;  | 
            ||
| 30 | $this->configuration = $configuration;  | 
            ||
| 31 | }  | 
            ||
| 32 | |||
| 33 | public function addItem(MenuItem $item)  | 
            ||
| 36 | }  | 
            ||
| 37 | |||
| 38 | public function removeItem(int $position)  | 
            ||
| 39 |     { | 
            ||
| 40 | unset($this->items[$position]);  | 
            ||
| 41 | }  | 
            ||
| 42 | |||
| 43 | public function clear(): void  | 
            ||
| 44 |     { | 
            ||
| 45 | $this->items = [];  | 
            ||
| 46 | }  | 
            ||
| 47 | |||
| 48 | /**  | 
            ||
| 49 | * @return MenuItem[]  | 
            ||
| 50 | */  | 
            ||
| 51 | public function getItems(): array  | 
            ||
| 52 |     { | 
            ||
| 53 | return $this->items;  | 
            ||
| 54 | }  | 
            ||
| 55 | |||
| 56 | public function getName(): string  | 
            ||
| 57 |     { | 
            ||
| 58 | return $this->name;  | 
            ||
| 59 | }  | 
            ||
| 60 | |||
| 61 | public function get(string $parameter)  | 
            ||
| 64 | }  | 
            ||
| 65 | |||
| 66 | public function getConfiguration(): MenuConfiguration  | 
            ||
| 69 | }  | 
            ||
| 70 | }  | 
            ||
| 71 |