| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function __construct(string $abstract, $concrete) |
||
| 32 | { |
||
| 33 | if (!is_object($concrete)) { |
||
| 34 | throw new ContainerException("Cannot create binding for '{$abstract}', the provided concrete must be an object."); |
||
| 35 | } |
||
| 36 | |||
| 37 | if (!($concrete instanceof $abstract)) { |
||
| 38 | throw new ContainerException("Cannot create binding for '{$abstract}', the provided concrete must be an instance of '{$abstract}'."); |
||
| 39 | } |
||
| 40 | |||
| 41 | $this->concrete = $concrete; |
||
| 42 | } |
||
| 52 |