Total Complexity | 3 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
5 | class MediaRequest |
||
6 | { |
||
7 | const NEW = 'new'; |
||
8 | const REPLACE = 'replace'; |
||
9 | const DETACH = 'detach'; |
||
10 | |||
11 | /** @var array */ |
||
12 | private $items = [ |
||
13 | self::NEW => [], |
||
14 | self::REPLACE => [], |
||
15 | self::DETACH => [], |
||
16 | ]; |
||
17 | |||
18 | public function add(string $key, MediaRequestInput $mediaRequest): self |
||
19 | { |
||
20 | $this->items[$key][] = $mediaRequest; |
||
21 | |||
22 | return $this; |
||
23 | } |
||
24 | |||
25 | public function all(): array |
||
26 | { |
||
27 | return $this->items; |
||
28 | } |
||
29 | |||
30 | public function getByKey(string $key): array |
||
33 | } |
||
34 | } |
||
35 |