| Total Complexity | 7 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Str |
||
| 6 | { |
||
| 7 | public static function contains($haystack, $needles): bool |
||
| 8 | { |
||
| 9 | foreach ((array) $needles as $needle) { |
||
| 10 | if ($needle !== '' && mb_strpos($haystack, $needle) !== false) { |
||
| 11 | return true; |
||
| 12 | } |
||
| 13 | } |
||
| 14 | |||
| 15 | return false; |
||
| 16 | } |
||
| 17 | |||
| 18 | public static function endsWith($haystack, $needles) |
||
| 27 | } |
||
| 28 | } |
||
| 29 |