@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | { |
| 53 | 53 | $languageSpecific = static::languageSpecificCharsArray($language); |
| 54 | 54 | |
| 55 | - if (! is_null($languageSpecific)) { |
|
| 55 | + if (!is_null($languageSpecific)) { |
|
| 56 | 56 | $value = str_replace($languageSpecific[0], $languageSpecific[1], $value); |
| 57 | 57 | } |
| 58 | 58 | |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | { |
| 246 | 246 | preg_match('/^\s*+(?:\S++\s*+){1,'.$words.'}/u', $value, $matches); |
| 247 | 247 | |
| 248 | - if (! isset($matches[0]) || static::length($value) === static::length($matches[0])) { |
|
| 248 | + if (!isset($matches[0]) || static::length($value) === static::length($matches[0])) { |
|
| 249 | 249 | return $value; |
| 250 | 250 | } |
| 251 | 251 | |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | return static::$snakeCache[$key][$delimiter]; |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | - if (! ctype_lower($value)) { |
|
| 450 | + if (!ctype_lower($value)) { |
|
| 451 | 451 | $value = preg_replace('/\s+/u', '', ucwords($value)); |
| 452 | 452 | |
| 453 | 453 | $value = static::lower(preg_replace('/(.)(?=[A-Z])/u', '$1'.$delimiter, $value)); |
@@ -665,14 +665,14 @@ discard block |
||
| 665 | 665 | { |
| 666 | 666 | static $languageSpecific; |
| 667 | 667 | |
| 668 | - if (! isset($languageSpecific)) { |
|
| 668 | + if (!isset($languageSpecific)) { |
|
| 669 | 669 | $languageSpecific = [ |
| 670 | 670 | 'bg' => [ |
| 671 | 671 | ['х', 'Х', 'щ', 'Щ', 'ъ', 'Ъ', 'ь', 'Ь'], |
| 672 | 672 | ['h', 'H', 'sht', 'SHT', 'a', 'А', 'y', 'Y'], |
| 673 | 673 | ], |
| 674 | 674 | 'de' => [ |
| 675 | - ['ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü'], |
|
| 675 | + ['ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü'], |
|
| 676 | 676 | ['ae', 'oe', 'ue', 'AE', 'OE', 'UE'], |
| 677 | 677 | ], |
| 678 | 678 | ]; |
@@ -2,11 +2,11 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace IlluminateAgnostic\Str\Support; |
| 4 | 4 | |
| 5 | -use Ramsey\Uuid\Uuid; |
|
| 6 | -use Ramsey\Uuid\UuidFactory; |
|
| 7 | 5 | use IlluminateAgnostic\Str\Support\Traits\Macroable; |
| 8 | -use Ramsey\Uuid\Generator\CombGenerator; |
|
| 9 | 6 | use Ramsey\Uuid\Codec\TimestampFirstCombCodec; |
| 7 | +use Ramsey\Uuid\Generator\CombGenerator; |
|
| 8 | +use Ramsey\Uuid\Uuid; |
|
| 9 | +use Ramsey\Uuid\UuidFactory; |
|
| 10 | 10 | |
| 11 | 11 | class Str |
| 12 | 12 | { |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | ]; |
| 9 | 9 | |
| 10 | 10 | foreach ($aliases as $illuminate => $tighten) { |
| 11 | - if (class_exists($illuminate) && ! interface_exists($illuminate) && ! trait_exists($illuminate)) { |
|
| 11 | + if (class_exists($illuminate) && !interface_exists($illuminate) && !trait_exists($illuminate)) { |
|
| 12 | 12 | class_alias($illuminate, $tighten); |
| 13 | 13 | } |
| 14 | 14 | } |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | use IlluminateAgnostic\Str\Support\Debug\Dumper; |
| 5 | 5 | use Illuminate\Support\Collection as IlluminateCollection; |
| 6 | 6 | |
| 7 | -if (! function_exists('camel_case')) { |
|
| 7 | +if (!function_exists('camel_case')) { |
|
| 8 | 8 | /** |
| 9 | 9 | * Convert a value to camel case. |
| 10 | 10 | * |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | } |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | -if (! function_exists('ends_with')) { |
|
| 20 | +if (!function_exists('ends_with')) { |
|
| 21 | 21 | /** |
| 22 | 22 | * Determine if a given string ends with a given substring. |
| 23 | 23 | * |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | } |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | -if (! function_exists('kebab_case')) { |
|
| 34 | +if (!function_exists('kebab_case')) { |
|
| 35 | 35 | /** |
| 36 | 36 | * Convert a string to kebab case. |
| 37 | 37 | * |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | |
| 48 | -if (! function_exists('snake_case')) { |
|
| 48 | +if (!function_exists('snake_case')) { |
|
| 49 | 49 | /** |
| 50 | 50 | * Convert a string to snake case. |
| 51 | 51 | * |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | -if (! function_exists('starts_with')) { |
|
| 62 | +if (!function_exists('starts_with')) { |
|
| 63 | 63 | /** |
| 64 | 64 | * Determine if a given string starts with a given substring. |
| 65 | 65 | * |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | -if (! function_exists('str_after')) { |
|
| 76 | +if (!function_exists('str_after')) { |
|
| 77 | 77 | /** |
| 78 | 78 | * Return the remainder of a string after a given value. |
| 79 | 79 | * |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | } |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | -if (! function_exists('str_before')) { |
|
| 90 | +if (!function_exists('str_before')) { |
|
| 91 | 91 | /** |
| 92 | 92 | * Get the portion of a string before a given value. |
| 93 | 93 | * |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | -if (! function_exists('str_contains')) { |
|
| 104 | +if (!function_exists('str_contains')) { |
|
| 105 | 105 | /** |
| 106 | 106 | * Determine if a given string contains a given substring. |
| 107 | 107 | * |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | -if (! function_exists('str_finish')) { |
|
| 118 | +if (!function_exists('str_finish')) { |
|
| 119 | 119 | /** |
| 120 | 120 | * Cap a string with a single instance of a given value. |
| 121 | 121 | * |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | } |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | -if (! function_exists('str_is')) { |
|
| 132 | +if (!function_exists('str_is')) { |
|
| 133 | 133 | /** |
| 134 | 134 | * Determine if a given string matches a given pattern. |
| 135 | 135 | * |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | } |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | -if (! function_exists('str_limit')) { |
|
| 146 | +if (!function_exists('str_limit')) { |
|
| 147 | 147 | /** |
| 148 | 148 | * Limit the number of characters in a string. |
| 149 | 149 | * |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | } |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | -if (! function_exists('str_plural')) { |
|
| 161 | +if (!function_exists('str_plural')) { |
|
| 162 | 162 | /** |
| 163 | 163 | * Get the plural form of an English word. |
| 164 | 164 | * |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | } |
| 173 | 173 | } |
| 174 | 174 | |
| 175 | -if (! function_exists('str_random')) { |
|
| 175 | +if (!function_exists('str_random')) { |
|
| 176 | 176 | /** |
| 177 | 177 | * Generate a more truly "random" alpha-numeric string. |
| 178 | 178 | * |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | } |
| 188 | 188 | } |
| 189 | 189 | |
| 190 | -if (! function_exists('str_replace_array')) { |
|
| 190 | +if (!function_exists('str_replace_array')) { |
|
| 191 | 191 | /** |
| 192 | 192 | * Replace a given value in the string sequentially with an array. |
| 193 | 193 | * |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | } |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | -if (! function_exists('str_replace_first')) { |
|
| 205 | +if (!function_exists('str_replace_first')) { |
|
| 206 | 206 | /** |
| 207 | 207 | * Replace the first occurrence of a given value in the string. |
| 208 | 208 | * |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | } |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | -if (! function_exists('str_replace_last')) { |
|
| 220 | +if (!function_exists('str_replace_last')) { |
|
| 221 | 221 | /** |
| 222 | 222 | * Replace the last occurrence of a given value in the string. |
| 223 | 223 | * |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | } |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | -if (! function_exists('str_singular')) { |
|
| 235 | +if (!function_exists('str_singular')) { |
|
| 236 | 236 | /** |
| 237 | 237 | * Get the singular form of an English word. |
| 238 | 238 | * |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | } |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | -if (! function_exists('str_slug')) { |
|
| 248 | +if (!function_exists('str_slug')) { |
|
| 249 | 249 | /** |
| 250 | 250 | * Generate a URL friendly "slug" from a given string. |
| 251 | 251 | * |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | } |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | -if (! function_exists('str_start')) { |
|
| 263 | +if (!function_exists('str_start')) { |
|
| 264 | 264 | /** |
| 265 | 265 | * Begin a string with a single instance of a given value. |
| 266 | 266 | * |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | } |
| 275 | 275 | } |
| 276 | 276 | |
| 277 | -if (! function_exists('studly_case')) { |
|
| 277 | +if (!function_exists('studly_case')) { |
|
| 278 | 278 | /** |
| 279 | 279 | * Convert a value to studly caps case. |
| 280 | 280 | * |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | |
| 291 | -if (! function_exists('title_case')) { |
|
| 291 | +if (!function_exists('title_case')) { |
|
| 292 | 292 | /** |
| 293 | 293 | * Convert a value to title case. |
| 294 | 294 | * |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | |
| 305 | -if (! function_exists('dd')) { |
|
| 305 | +if (!function_exists('dd')) { |
|
| 306 | 306 | /** |
| 307 | 307 | * Dump the passed variables and end the script. |
| 308 | 308 | * |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public static function __callStatic($method, $parameters) |
| 72 | 72 | { |
| 73 | - if (! static::hasMacro($method)) { |
|
| 73 | + if (!static::hasMacro($method)) { |
|
| 74 | 74 | throw new BadMethodCallException(sprintf( |
| 75 | 75 | 'Method %s::%s does not exist.', static::class, $method |
| 76 | 76 | )); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | public function __call($method, $parameters) |
| 96 | 96 | { |
| 97 | - if (! static::hasMacro($method)) { |
|
| 97 | + if (!static::hasMacro($method)) { |
|
| 98 | 98 | throw new BadMethodCallException(sprintf( |
| 99 | 99 | 'Method %s::%s does not exist.', static::class, $method |
| 100 | 100 | )); |