| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 9 | public function supports(object $object, string $property, $value): bool |
|
| 25 | { |
||
| 26 | 9 | $refl = new \ReflectionObject($object); |
|
| 27 | 9 | $setter = $this |
|
| 28 | 9 | ->setter |
|
| 29 | ->sprintf(Str::of($property)->camelize()->ucfirst()->toString()) |
||
| 30 | ->toString(); |
||
| 31 | 9 | ||
| 32 | 7 | if (!$refl->hasMethod($setter)) { |
|
| 33 | return false; |
||
| 34 | } |
||
| 35 | 5 | ||
| 36 | return $refl->getMethod($setter)->isPublic(); |
||
| 37 | } |
||
| 59 |