Conditions | 5 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | public function hasMethod(ClassReflection $classReflection, string $methodName): bool |
||
25 | { |
||
26 | if (0 !== mb_strpos($methodName, 'findBy') |
||
27 | && 0 !== mb_strpos($methodName, 'findOneBy') |
||
28 | ) { |
||
29 | return false; |
||
30 | } |
||
31 | if ('Mapado\RestClientSdk\EntityRepository' === $classReflection->getName()) { |
||
32 | return true; |
||
33 | } |
||
34 | if (!$this->broker->hasClass('Mapado\RestClientSdk\EntityRepository')) { |
||
35 | return false; |
||
36 | } |
||
37 | |||
38 | return $classReflection->isSubclassOf('Mapado\RestClientSdk\EntityRepository'); |
||
39 | } |
||
46 |