Total Complexity | 7 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class Container |
||
14 | { |
||
15 | /** |
||
16 | * @return false|ContainerInterface|NipContainer |
||
17 | * @noinspection PhpDocMissingThrowsInspection |
||
18 | */ |
||
19 | public static function container($reset = false) |
||
20 | { |
||
21 | static $instance; |
||
22 | if ($reset || !($instance instanceof ContainerInterface)) { |
||
23 | /** @noinspection PhpUnhandledExceptionInspection */ |
||
24 | $instance = static::detect(); |
||
25 | } |
||
26 | return $instance; |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @return ContainerInterface |
||
31 | * @throws Exception |
||
32 | */ |
||
33 | public static function detect() |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @param null $make |
||
|
|||
43 | * @return mixed |
||
44 | */ |
||
45 | public static function get($make = null) |
||
54 |