@@ -105,9 +105,9 @@ discard block |
||
| 105 | 105 | */ |
| 106 | 106 | public static function increment(string $string, int $first = 1, string $separator = '_'): string |
| 107 | 107 | { |
| 108 | - preg_match('/(.+)' . $separator . '([0-9]+)$/', $string, $match); |
|
| 108 | + preg_match('/(.+)'.$separator.'([0-9]+)$/', $string, $match); |
|
| 109 | 109 | |
| 110 | - return isset($match[2]) ? $match[1] . $separator . ($match[2] + 1) : $string . $separator . $first; |
|
| 110 | + return isset($match[2]) ? $match[1].$separator.($match[2] + 1) : $string.$separator.$first; |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | return $string; |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | - return rtrim(mb_strimwidth($string, 0, $limit, '', 'UTF-8')) . $append; |
|
| 141 | + return rtrim(mb_strimwidth($string, 0, $limit, '', 'UTF-8')).$append; |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | /** |
@@ -209,10 +209,10 @@ discard block |
||
| 209 | 209 | return static::$cache['snake'][$key][$delimiter]; |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | - if (! ctype_lower($string)) { |
|
| 212 | + if (!ctype_lower($string)) { |
|
| 213 | 213 | $value = preg_replace('/\s+/u', '', ucwords($string)); |
| 214 | 214 | |
| 215 | - $string = static::lower(preg_replace('/(.)(?=[A-Z])/u', '$1' . $delimiter, $string)); |
|
| 215 | + $string = static::lower(preg_replace('/(.)(?=[A-Z])/u', '$1'.$delimiter, $string)); |
|
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | return static::$cache['snake'][$key][$delimiter] = $string; |
@@ -251,13 +251,13 @@ discard block |
||
| 251 | 251 | */ |
| 252 | 252 | public static function words(string $string, int $words = 100, string $append = '...'): string |
| 253 | 253 | { |
| 254 | - preg_match('/^\s*+(?:\S++\s*+){1,' . $words . '}/u', $string, $matches); |
|
| 254 | + preg_match('/^\s*+(?:\S++\s*+){1,'.$words.'}/u', $string, $matches); |
|
| 255 | 255 | |
| 256 | - if (! isset($matches[0]) || static::length($string) === static::length($matches[0])) { |
|
| 256 | + if (!isset($matches[0]) || static::length($string) === static::length($matches[0])) { |
|
| 257 | 257 | return $string; |
| 258 | 258 | } |
| 259 | 259 | |
| 260 | - return rtrim($matches[0]) . $append; |
|
| 260 | + return rtrim($matches[0]).$append; |
|
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | /** |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | public static function containsAll(string $haystack, array $needles): bool |
| 287 | 287 | { |
| 288 | 288 | foreach ($needles as $needle) { |
| 289 | - if (! static::contains($haystack, $needle)) { |
|
| 289 | + if (!static::contains($haystack, $needle)) { |
|
| 290 | 290 | return false; |
| 291 | 291 | } |
| 292 | 292 | } |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | */ |
| 303 | 303 | public static function ucfirst(string $string): string |
| 304 | 304 | { |
| 305 | - return static::upper(static::substr($string, 0, 1)) . static::substr($string, 1); |
|
| 305 | + return static::upper(static::substr($string, 0, 1)).static::substr($string, 1); |
|
| 306 | 306 | } |
| 307 | 307 | |
| 308 | 308 | /** |