Total Complexity | 7 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
6 | abstract class AbstractStaticEntity implements StaticEntityInterface |
||
7 | { |
||
8 | protected $id; |
||
9 | |||
10 | 4 | /** |
|
11 | * @param $id |
||
12 | 4 | * |
|
13 | * @return $this |
||
14 | */ |
||
15 | 3 | static public function get($id): StaticEntityInterface |
|
16 | { |
||
17 | 3 | return Provider::get(get_called_class(), $id); |
|
18 | } |
||
19 | |||
20 | 1 | static public function getAll(): array |
|
21 | { |
||
22 | 1 | return Provider::getAll(get_called_class()); |
|
23 | } |
||
24 | |||
25 | 3 | static public function hasId($id): bool |
|
26 | { |
||
27 | 3 | return Provider::hasId(get_called_class(), $id); |
|
28 | } |
||
29 | |||
30 | 1 | static public function toId($classOrId) |
|
33 | } |
||
34 | |||
35 | 1 | static public function getAssociative(string $key = 'name'): array |
|
38 | } |
||
39 | |||
40 | 4 | static public function getIds(): array |
|
43 | } |
||
44 | |||
45 | public function getId() |
||
48 | } |
||
49 | } |
||
50 |