Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
48 | public function extract(object $object, string $property) |
||
49 | 3 | { |
|
50 | 1 | if (!$this->supports($object, $property)) { |
|
51 | throw new LogicException; |
||
52 | } |
||
53 | 2 | ||
54 | 2 | $isser = $this |
|
55 | ->isser |
||
56 | ->sprintf(Str::of($property)->camelize()->ucfirst()->toString()) |
||
57 | 2 | ->toString(); |
|
58 | |||
59 | /** @psalm-suppress MixedMethodCall */ |
||
60 | return $object->$isser(); |
||
61 | } |
||
63 |