Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
20 | 116 | public static function service( |
|
21 | Name $name, |
||
22 | Services $services |
||
23 | ): self { |
||
24 | 116 | if (!$services->has($name)) { |
|
25 | 1 | throw new ReferenceNotFound((string) $name); |
|
26 | } |
||
27 | |||
28 | 115 | return new self(static function() use ($services, $name): object { |
|
29 | 96 | return $services->build($name); |
|
30 | 115 | }); |
|
38 |