Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
6 | class HelperFactory |
||
7 | { |
||
8 | const ERROR_INEXISTANT_KEY = 'Inexistant key "%s".'; |
||
9 | |||
10 | protected static function getAliases(): array |
||
13 | } |
||
14 | |||
15 | private static function getDefaultAliases(): array |
||
16 | { |
||
17 | return [ |
||
18 | 'collection' => CollectionFactory::class, |
||
19 | 'jsonapi' => JsonapiFactory::class, |
||
20 | 'relationship' => RelationshipFactory::class, |
||
21 | 'resource-identifier' => ResourceIdentifierFactory::class, |
||
22 | 'resource-object' => ResourceObjectFactory::class |
||
23 | ]; |
||
24 | } |
||
25 | |||
26 | public static function getClassName(string $key): string |
||
36 | } |
||
37 | |||
38 | public static function create($alias, ...$args) |
||
45 |