@@ -14,8 +14,8 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | public static function startsWith($haystack, $needles) |
| 16 | 16 | { |
| 17 | - foreach ((array) $needles as $needle) { |
|
| 18 | - if ((string) $needle !== '' && strncmp($haystack, $needle, strlen($needle)) === 0) { |
|
| 17 | + foreach ((array)$needles as $needle) { |
|
| 18 | + if ((string)$needle !== '' && strncmp($haystack, $needle, strlen($needle)) === 0) { |
|
| 19 | 19 | return true; |
| 20 | 20 | } |
| 21 | 21 | } |
@@ -32,8 +32,8 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | public static function endsWith($haystack, $needles) |
| 34 | 34 | { |
| 35 | - foreach ((array) $needles as $needle) { |
|
| 36 | - if ($needle !== '' && substr($haystack, -strlen($needle)) === (string) $needle) { |
|
| 35 | + foreach ((array)$needles as $needle) { |
|
| 36 | + if ($needle !== '' && substr($haystack, -strlen($needle)) === (string)$needle) { |
|
| 37 | 37 | return true; |
| 38 | 38 | } |
| 39 | 39 | } |