Conditions | 4 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4 |
Changes | 3 | ||
Bugs | 2 | Features | 0 |
1 | <?php |
||
10428 | 2 | public static function strpbrk(string $haystack, string $char_list) |
|
10429 | { |
||
10430 | 2 | if ($haystack === '' || $char_list === '') { |
|
10431 | 2 | return false; |
|
10432 | } |
||
10433 | |||
10434 | 2 | if (\preg_match('/' . self::rxClass($char_list) . '/us', $haystack, $m)) { |
|
10435 | 2 | return \substr($haystack, (int) \strpos($haystack, $m[0])); |
|
10436 | } |
||
10437 | |||
10438 | 2 | return false; |
|
10439 | } |
||
14634 |