Conditions | 5 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 5 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
1849 | 2 | private static function arraySearch(string $needle, array $haystack): string |
|
1850 | { |
||
1851 | 2 | foreach ($haystack as $key => $value) { |
|
1852 | 2 | if ($needle === $value || (is_array($value) && self::arraySearch($needle, $value) !== '')) { |
|
1853 | 1 | return $key; |
|
1854 | } |
||
1855 | } |
||
1856 | |||
1857 | 2 | return ''; |
|
1858 | } |
||
1860 |