Total Complexity | 6 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 6 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | trait FactoryResolverAwareTrait |
||
15 | { |
||
16 | /** @var array<string,AbstractFactory> */ |
||
17 | private static array $factories = []; |
||
18 | |||
19 | public static function __callStatic(string $name = '', array $arguments = []) |
||
27 | } |
||
28 | |||
29 | public function __call(string $name = '', array $arguments = []) |
||
30 | { |
||
31 | if ($name === 'getFactory') { |
||
32 | return self::doGetFactory(); |
||
33 | } |
||
34 | |||
35 | /** @psalm-suppress ParentNotFound */ |
||
36 | return parent::__call($name, $arguments); |
||
37 | } |
||
38 | |||
39 | public static function resetCache(): void |
||
42 | } |
||
43 | |||
44 | private static function doGetFactory(): AbstractFactory |
||
49 | } |
||
50 | } |
||
51 |