| Total Complexity | 6 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class NamedClassDependency implements DependencyInterface |
||
| 19 | { |
||
| 20 | private $id; |
||
| 21 | |||
| 22 | private $class; |
||
| 23 | |||
| 24 | private $optional; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Constructor. |
||
| 28 | * @param string $id the component ID |
||
| 29 | */ |
||
| 30 | public function __construct(string $id, string $class, bool $optional) |
||
| 31 | { |
||
| 32 | $this->id = $id; |
||
| 33 | $this->class = $class; |
||
| 34 | $this->optional = $optional; |
||
| 35 | } |
||
| 36 | |||
| 37 | public static function to(string $id, string $class) |
||
| 38 | { |
||
| 39 | return new self($id, $class, false); |
||
| 40 | } |
||
| 41 | |||
| 42 | public function resolve(ContainerInterface $container) |
||
| 61 | } |
||
| 62 | } |
||
| 63 |