Total Complexity | 4 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | class InstanceBinding implements BindingInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var object The instance to use as underlying value. |
||
20 | */ |
||
21 | protected $concrete; |
||
22 | |||
23 | /** |
||
24 | * Constructs the InstanceBinding. |
||
25 | * |
||
26 | * @param string $abstract The class / interface type the concrete is bound to. |
||
27 | * @param object $concrete The instance which is a concrete of abstract. |
||
28 | * |
||
29 | * @throws ContainerException If concrete does not satisfy the requirements. |
||
30 | */ |
||
31 | public function __construct(string $abstract, $concrete) |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @inheritDoc |
||
46 | */ |
||
47 | public function resolve() |
||
52 |