| Total Complexity | 7 | 
| Total Lines | 43 | 
| Duplicated Lines | 0 % | 
| Coverage | 100% | 
| Changes | 3 | ||
| Bugs | 2 | Features | 0 | 
| 1 | <?php  | 
            ||
| 29 | final class Reference implements ReferenceInterface  | 
            ||
| 30 | { | 
            ||
| 31 | private string $id;  | 
            ||
| 32 | private bool $optional;  | 
            ||
| 33 | |||
| 34 | /**  | 
            ||
| 35 | * @param mixed $id  | 
            ||
| 36 | *  | 
            ||
| 37 | * @throws InvalidConfigException  | 
            ||
| 38 | */  | 
            ||
| 39 | 10 | private function __construct($id, bool $optional)  | 
            |
| 47 | }  | 
            ||
| 48 | |||
| 49 | /**  | 
            ||
| 50 | * @throws InvalidConfigException If ID is not string.  | 
            ||
| 51 | */  | 
            ||
| 52 | 9 | public static function to($id): self  | 
            |
| 55 | }  | 
            ||
| 56 | |||
| 57 | /**  | 
            ||
| 58 | * Optional reference returns `null` when there is no corresponding definition in container.  | 
            ||
| 59 | *  | 
            ||
| 60 | * @param mixed $id ID of the service or object to point to.  | 
            ||
| 61 | *  | 
            ||
| 62 | * @throws InvalidConfigException If ID is not string.  | 
            ||
| 63 | */  | 
            ||
| 64 | 1 | public static function optional($id): self  | 
            |
| 67 | }  | 
            ||
| 68 | |||
| 69 | 3 | public function resolve(ContainerInterface $container)  | 
            |
| 74 |