Total Complexity | 3 |
Total Lines | 40 |
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 $baseNamespaces = [ |
||
13 | 'Formularium' |
||
14 | ]; |
||
15 | |||
16 | /** |
||
17 | * External factory functions. |
||
18 | * |
||
19 | * @var callable[] |
||
20 | */ |
||
21 | protected static $factories = []; |
||
22 | |||
23 | public static function registerFactory(callable $factory): void |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * @param string $ns The namespace to add |
||
30 | * @return void |
||
31 | * @codeCoverageIgnore |
||
32 | */ |
||
33 | public static function appendBaseNamespace(string $ns): void |
||
34 | { |
||
35 | static::$baseNamespaces[] = $ns; |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * @return string[] |
||
40 | * @codeCoverageIgnore |
||
41 | */ |
||
42 | public static function getBaseNamespaces(): array |
||
45 | } |
||
46 | } |
||
47 |