| Conditions | 5 |
| Paths | 4 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | public function matches($point, $context = null, $instance = null, array $arguments = null): bool |
||
| 37 | { |
||
| 38 | if (!$context instanceof ReflectionClass) { |
||
| 39 | return false; |
||
| 40 | } |
||
| 41 | |||
| 42 | $isPointMethod = $point instanceof ReflectionMethod; |
||
| 43 | $isPointProperty = $point instanceof ReflectionProperty; |
||
| 44 | if (!$isPointMethod && !$isPointProperty) { |
||
| 45 | return false; |
||
| 46 | } |
||
| 47 | |||
| 48 | $declaringClassName = $point->getDeclaringClass()->name; |
||
| 49 | |||
| 50 | return $context->name !== $declaringClassName && $context->isSubclassOf($declaringClassName); |
||
| 51 | } |
||
| 52 | |||
| 61 |