| Total Complexity | 6 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 7 | trait RecursiveCheckTrait |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @param string $key |
||
| 11 | * @param mixed $value |
||
| 12 | * |
||
| 13 | * @return bool |
||
| 14 | */ |
||
| 15 | 10 | public function isRecursive(string $key, mixed $value): bool |
|
| 16 | { |
||
| 17 | 10 | return $this->checkTypeRecursion($this->getMapping($key)->getType(), $value); |
|
|
|
|||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param ReflectionType|null $type |
||
| 22 | * @param mixed $value |
||
| 23 | * |
||
| 24 | * @return bool |
||
| 25 | */ |
||
| 26 | 10 | private function checkTypeRecursion(?ReflectionType $type, mixed $value): bool |
|
| 38 | } |
||
| 39 | } |
||
| 40 |