Total Complexity | 5 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
8 | final class ContainerBagLocator |
||
9 | { |
||
10 | /** |
||
11 | * @var ContainerBagInterface |
||
12 | */ |
||
13 | private static $bag; |
||
14 | |||
15 | /** |
||
16 | * @param ContainerInterface $container |
||
17 | */ |
||
18 | 7 | public static function init(ContainerInterface $container) |
|
25 | 7 | } |
|
26 | |||
27 | /** |
||
28 | * @return ContainerBagInterface |
||
29 | */ |
||
30 | 7 | public static function get() |
|
31 | { |
||
32 | 7 | if (self::$bag === null) { |
|
33 | 1 | throw new \LogicException('ContainerBagLocator has not been initialized.'); |
|
34 | } |
||
35 | |||
36 | 6 | return self::$bag; |
|
37 | } |
||
38 | |||
39 | 8 | public static function flush() |
|
42 | 8 | } |
|
43 | } |
||
44 |