| Conditions | 3 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 22 | private function createInjector(/*object */$target): \Closure |
|
| 24 | { |
||
| 25 | $injector = function (string $property, /*object */$object): void { |
||
| 26 | 22 | if (\property_exists($this, $property) && null === $this->$property) { |
|
| 27 | 20 | $this->$property = $object; |
|
| 28 | } |
||
| 29 | 22 | }; |
|
| 30 | |||
| 31 | 22 | return $injector->bindTo($target, $this->classContext ?? $target); |
|
| 32 | } |
||
| 34 |