Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
19 | 11 | public function supports($value): bool |
|
20 | { |
||
21 | 11 | if (!$value instanceof Closure) { |
|
22 | 8 | return false; |
|
23 | } |
||
24 | 10 | $reflection = new ReflectionClosure($value); |
|
25 | |||
26 | 10 | $closureReflection = $reflection->getClosureScopeClass(); |
|
27 | 10 | $closureClassOwnerName = $closureReflection->getName(); |
|
28 | |||
29 | 10 | return is_a($closureClassOwnerName, Builder::class, true); |
|
30 | } |
||
48 |