Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| MenuNode | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\Common\MenuStructure; |
| 3 | |
| 4 | use Apie\Core\Dto\DtoInterface; |
| 5 | |
| 6 | final class MenuNode implements DtoInterface |
| 7 | { |
| 8 | public MenuNodeChildren $children; |
| 9 | public function __construct( |
| 10 | public readonly string $id, |
| 11 | public string $name, |
| 12 | public ?string $route = null, |
| 13 | public ?string $icon = null, |
| 14 | ?MenuNodeChildren $children = null, |
| 15 | ) { |
| 16 | $this->children = $children ?? new MenuNodeChildren(); |
| 17 | } |
| 18 | } |