Total Complexity | 3 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
5 | trait NamespaceTrait |
||
6 | { |
||
7 | /** |
||
8 | * Namespaces to search |
||
9 | * |
||
10 | * @var string[] |
||
11 | */ |
||
12 | protected static $namespaces = []; |
||
13 | |||
14 | /** |
||
15 | * External factory functions. |
||
16 | * |
||
17 | * @var callable[] |
||
18 | */ |
||
19 | protected static $factories = []; |
||
20 | |||
21 | public static function registerFactory(callable $factory): void |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * @param string $ns The namespace to add |
||
28 | * @return void |
||
29 | * @codeCoverageIgnore |
||
30 | */ |
||
31 | public static function appendNamespace(string $ns): void |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @return string[] |
||
38 | * @codeCoverageIgnore |
||
39 | */ |
||
40 | public static function getNamespaces(): array |
||
45 |