| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| 1 | <?php |
||
| 36 | 3 | public function extract($object, string $property) |
|
| 37 | { |
||
| 38 | 3 | if (!$this->supports($object, $property)) { |
|
| 39 | 1 | throw new LogicException; |
|
| 40 | } |
||
| 41 | |||
| 42 | 2 | $getter = (string) $this->getter->sprintf( |
|
| 43 | 2 | (string) (new StringPrimitive($property))->camelize() |
|
| 44 | ); |
||
| 45 | |||
| 46 | 2 | return $object->$getter(); |
|
| 47 | } |
||
| 48 | } |
||
| 49 |
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.