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