Total Complexity | 2 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
13 | final class StartsWithMatcher extends AbstractMatcher |
||
14 | { |
||
15 | /** |
||
16 | * {@inheritdoc} |
||
17 | */ |
||
18 | 5 | public function matchesClass(ReflectionClass $class, array $arguments): bool |
|
19 | { |
||
20 | 5 | /** @var array<string> $arguments */ |
|
21 | [$startsWith] = $arguments; |
||
22 | 5 | ||
23 | return strpos($class->name, $startsWith) === 0; |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * {@inheritdoc} |
||
28 | 32 | */ |
|
29 | public function matchesMethod(ReflectionMethod $method, array $arguments): bool |
||
35 | } |
||
36 | } |
||
37 |