| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| 1 | <?php |
||
| 36 | 4 | public function inject($object, string $property, $value) |
|
| 37 | { |
||
| 38 | 4 | if (!$this->supports($object, $property, $value)) { |
|
| 39 | 1 | throw new LogicException; |
|
| 40 | } |
||
| 41 | |||
| 42 | 3 | $setter = (string) $this->setter->sprintf( |
|
| 43 | 3 | (string) (new StringPrimitive($property))->camelize() |
|
| 44 | ); |
||
| 45 | 3 | $object->$setter($value); |
|
| 46 | 3 | } |
|
| 47 | } |
||
| 48 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.