| Total Complexity | 3 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | final class NavigationData extends \ArrayObject implements NavigationSchema, Arrayable, \JsonSerializable |
||
| 10 | { |
||
| 11 | use JsonSerializesArrayable; |
||
| 12 | |||
| 13 | public ?string $label = null; |
||
| 14 | public ?string $group = null; |
||
| 15 | public ?bool $hidden = null; |
||
| 16 | public ?int $priority = null; |
||
| 17 | |||
| 18 | public function __construct(?string $label = null, ?string $group = null, ?bool $hidden = null, ?int $priority = null) |
||
| 19 | { |
||
| 20 | $this->label = $label; |
||
| 21 | $this->group = $group; |
||
| 22 | $this->hidden = $hidden; |
||
| 23 | $this->priority = $priority; |
||
| 24 | |||
| 25 | parent::__construct($this->toArray()); |
||
| 26 | } |
||
| 27 | |||
| 28 | public static function make(array $data): self |
||
| 35 | ); |
||
| 36 | } |
||
| 37 | |||
| 38 | public function toArray(): array |
||
| 45 | ]; |
||
| 46 | } |
||
| 48 |