| Conditions | 4 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4.0312 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 1 | public static function isClassSame(string $className, $validClass): bool |
|
| 17 | { |
||
| 18 | 1 | if (\get_class($validClass) === $className) { |
|
| 19 | 1 | return true; |
|
| 20 | } |
||
| 21 | 1 | if (\in_array(LazyLoadingInterface::class, class_implements($validClass), true)) { |
|
| 22 | 1 | $refl = new \ReflectionClass($validClass); |
|
| 23 | 1 | if ($refl->isSubclassOf($className)) { |
|
| 24 | 1 | return true; |
|
| 25 | } |
||
| 26 | } |
||
| 27 | return false; |
||
| 28 | } |
||
| 50 |