@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | |
| 89 | 89 | // Explodes rows |
| 90 | 90 | $dataArray = static::explodeWith($data, [PHP_EOL, "\r", "\n"]); |
| 91 | - $dataArray = array_map(function ($row) { |
|
| 91 | + $dataArray = array_map(function($row) { |
|
| 92 | 92 | return Parse::explodeWith($row, [';', "\t", ',']); |
| 93 | 93 | }, $dataArray); |
| 94 | 94 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | |
| 125 | 125 | // Convert objects to arrays |
| 126 | 126 | if (\is_object($data)) { |
| 127 | - $data = (array) $data; |
|
| 127 | + $data = (array)$data; |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | // Don't convert if it's not an array |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | $data = $data->toArray(); |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | - return (array) $data; |
|
| 178 | + return (array)$data; |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | /** |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | return static::toJSON($data); |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | - return (string) $data; |
|
| 196 | + return (string)$data; |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | /** |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | return \strlen($data); |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | - return (int) $data; |
|
| 218 | + return (int)$data; |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | /** |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | */ |
| 228 | 228 | public static function toBoolean(mixed $data) : bool |
| 229 | 229 | { |
| 230 | - return (bool) $data; |
|
| 230 | + return (bool)$data; |
|
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | /** |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | */ |
| 240 | 240 | public static function toObject(mixed $data) : object |
| 241 | 241 | { |
| 242 | - return (object) $data; |
|
| 242 | + return (object)$data; |
|
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | //////////////////////////////////////////////////////////////////// |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | public static function option(string $option) : mixed |
| 60 | 60 | { |
| 61 | 61 | // Get config file |
| 62 | - if (!static::$options) { |
|
| 62 | + if ( ! static::$options) { |
|
| 63 | 63 | static::$options = include __DIR__.'/../config/underscore.php'; |
| 64 | 64 | } |
| 65 | 65 | |
@@ -160,11 +160,11 @@ |
||
| 160 | 160 | public static function randomStrings(int $words, int $length = 10) : string |
| 161 | 161 | { |
| 162 | 162 | return Strings::from('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') |
| 163 | - ->shuffle() |
|
| 164 | - ->split($length) |
|
| 165 | - ->slice(0, $words) |
|
| 166 | - ->implode(' ') |
|
| 167 | - ->obtain(); |
|
| 163 | + ->shuffle() |
|
| 164 | + ->split($length) |
|
| 165 | + ->slice(0, $words) |
|
| 166 | + ->implode(' ') |
|
| 167 | + ->obtain(); |
|
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | //////////////////////////////////////////////////////////////////// |
@@ -181,10 +181,10 @@ discard block |
||
| 181 | 181 | * |
| 182 | 182 | * @return bool |
| 183 | 183 | */ |
| 184 | - public static function endsWith(string $haystack, array|string $needles) : bool |
|
| 184 | + public static function endsWith(string $haystack, array | string $needles) : bool |
|
| 185 | 185 | { |
| 186 | - foreach ((array) $needles as $needle) { |
|
| 187 | - if ((string) $needle === substr($haystack, -\strlen($needle))) { |
|
| 186 | + foreach ((array)$needles as $needle) { |
|
| 187 | + if ((string)$needle === substr($haystack, -\strlen($needle))) { |
|
| 188 | 188 | return true; |
| 189 | 189 | } |
| 190 | 190 | } |
@@ -238,9 +238,9 @@ discard block |
||
| 238 | 238 | * |
| 239 | 239 | * @return bool |
| 240 | 240 | */ |
| 241 | - public static function startsWith(string $haystack, array|string $needles) : bool |
|
| 241 | + public static function startsWith(string $haystack, array | string $needles) : bool |
|
| 242 | 242 | { |
| 243 | - foreach ((array) $needles as $needle) { |
|
| 243 | + foreach ((array)$needles as $needle) { |
|
| 244 | 244 | if ($needle !== '' && str_starts_with($haystack, $needle)) { |
| 245 | 245 | return true; |
| 246 | 246 | } |
@@ -264,8 +264,8 @@ discard block |
||
| 264 | 264 | * @return bool Found or not |
| 265 | 265 | */ |
| 266 | 266 | public static function find( |
| 267 | - array|string $string, |
|
| 268 | - array|string $needle, |
|
| 267 | + array | string $string, |
|
| 268 | + array | string $needle, |
|
| 269 | 269 | bool $caseSensitive = false, |
| 270 | 270 | bool $absolute = false |
| 271 | 271 | ) : bool |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | // If not case sensitive |
| 294 | - if (!$caseSensitive) { |
|
| 294 | + if ( ! $caseSensitive) { |
|
| 295 | 295 | $string = strtolower($string); |
| 296 | 296 | $needle = strtolower($needle); |
| 297 | 297 | } |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | // If string found |
| 300 | 300 | $pos = strpos($string, $needle); |
| 301 | 301 | |
| 302 | - return !($pos === false); |
|
| 302 | + return ! ($pos === false); |
|
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | /** |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | * |
| 327 | 327 | * @return false|string |
| 328 | 328 | */ |
| 329 | - public static function sliceFrom($string, $slice) : bool|string |
|
| 329 | + public static function sliceFrom($string, $slice) : bool | string |
|
| 330 | 330 | { |
| 331 | 331 | $slice = strpos($string, $slice); |
| 332 | 332 | |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | * |
| 342 | 342 | * @return false|string |
| 343 | 343 | */ |
| 344 | - public static function sliceTo($string, $slice) : bool|string |
|
| 344 | + public static function sliceTo($string, $slice) : bool | string |
|
| 345 | 345 | { |
| 346 | 346 | $slice = strpos($string, $slice); |
| 347 | 347 | |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | * |
| 440 | 440 | * @return string|string[] |
| 441 | 441 | */ |
| 442 | - public static function replace($string, $replace, $with) : array|string |
|
| 442 | + public static function replace($string, $replace, $with) : array | string |
|
| 443 | 443 | { |
| 444 | 444 | return str_replace($replace, $with, $string); |
| 445 | 445 | } |
@@ -73,9 +73,9 @@ discard block |
||
| 73 | 73 | $unique = random_int(0, mt_getrandmax()); |
| 74 | 74 | |
| 75 | 75 | // Create a closure that check if the function was already called |
| 76 | - return function (...$arguments) use ($function, $canBeCalledTimes, $unique) { |
|
| 76 | + return function(...$arguments) use ($function, $canBeCalledTimes, $unique) { |
|
| 77 | 77 | |
| 78 | - $signature = FunctionsMethods::getSignature((string) $unique, $function, $arguments); |
|
| 78 | + $signature = FunctionsMethods::getSignature((string)$unique, $function, $arguments); |
|
| 79 | 79 | |
| 80 | 80 | // Get counter |
| 81 | 81 | $numberOfTimesCalled = FunctionsMethods::hasBeenCalledTimes($signature); |
@@ -84,9 +84,7 @@ discard block |
||
| 84 | 84 | // Else, increment the count |
| 85 | 85 | if ($numberOfTimesCalled >= $canBeCalledTimes) { |
| 86 | 86 | return false; |
| 87 | - } |
|
| 88 | - |
|
| 89 | - ++FunctionsMethods::$canBeCalledTimes[$signature]; |
|
| 87 | + }++FunctionsMethods::$canBeCalledTimes[$signature]; |
|
| 90 | 88 | |
| 91 | 89 | return \call_user_func_array($function, $arguments); |
| 92 | 90 | }; |
@@ -106,16 +104,15 @@ discard block |
||
| 106 | 104 | $unique = random_int(0, mt_getrandmax()); |
| 107 | 105 | |
| 108 | 106 | // Create a closure that check if the function was already called |
| 109 | - return function (...$arguments) use ($function, $times, $unique) { |
|
| 107 | + return function(...$arguments) use ($function, $times, $unique) { |
|
| 110 | 108 | |
| 111 | - $signature = FunctionsMethods::getSignature((string) $unique, $function, $arguments); |
|
| 109 | + $signature = FunctionsMethods::getSignature((string)$unique, $function, $arguments); |
|
| 112 | 110 | |
| 113 | 111 | // Get counter |
| 114 | 112 | $called = FunctionsMethods::hasBeenCalledTimes($signature); |
| 115 | 113 | |
| 116 | 114 | // Prevent calling before a certain number |
| 117 | - if ($called < $times) { |
|
| 118 | - ++FunctionsMethods::$canBeCalledTimes[$signature]; |
|
| 115 | + if ($called < $times) {++FunctionsMethods::$canBeCalledTimes[$signature]; |
|
| 119 | 116 | |
| 120 | 117 | return false; |
| 121 | 118 | } |
@@ -136,9 +133,9 @@ discard block |
||
| 136 | 133 | { |
| 137 | 134 | $unique = random_int(0, mt_getrandmax()); |
| 138 | 135 | |
| 139 | - return function (...$arguments) use ($function, $unique) { |
|
| 136 | + return function(...$arguments) use ($function, $unique) { |
|
| 140 | 137 | |
| 141 | - $signature = FunctionsMethods::getSignature((string) $unique, $function, $arguments); |
|
| 138 | + $signature = FunctionsMethods::getSignature((string)$unique, $function, $arguments); |
|
| 142 | 139 | |
| 143 | 140 | if (isset(FunctionsMethods::$cached[$signature])) { |
| 144 | 141 | return FunctionsMethods::$cached[$signature]; |
@@ -164,9 +161,9 @@ discard block |
||
| 164 | 161 | { |
| 165 | 162 | $unique = random_int(0, mt_getrandmax()); |
| 166 | 163 | |
| 167 | - return function (...$arguments) use ($function, $ms, $unique) { |
|
| 164 | + return function(...$arguments) use ($function, $ms, $unique) { |
|
| 168 | 165 | |
| 169 | - $signature = FunctionsMethods::getSignature((string) $unique, $function, $arguments); |
|
| 166 | + $signature = FunctionsMethods::getSignature((string)$unique, $function, $arguments); |
|
| 170 | 167 | |
| 171 | 168 | // Check last called time and update it if necessary |
| 172 | 169 | $last = FunctionsMethods::getLastCalledTime($signature); |
@@ -193,7 +190,7 @@ discard block |
||
| 193 | 190 | { |
| 194 | 191 | $boundArgs = \array_slice(\func_get_args(), 1); |
| 195 | 192 | |
| 196 | - return function () use ($boundArgs, $func) { |
|
| 193 | + return function() use ($boundArgs, $func) { |
|
| 197 | 194 | $args = []; |
| 198 | 195 | $calledArgs = \func_get_args(); |
| 199 | 196 | $position = 0; |
@@ -240,7 +237,7 @@ discard block |
||
| 240 | 237 | */ |
| 241 | 238 | public static function getSignature(string $unique, Closure $function, array $arguments) : string |
| 242 | 239 | { |
| 243 | - $function = var_export($function, true); |
|
| 240 | + $function = var_export($function, true); |
|
| 244 | 241 | $argumentsStr = var_export($arguments, true); |
| 245 | 242 | |
| 246 | 243 | return md5($unique.'_'.$function.'_'.$argumentsStr); |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | public static function padding(mixed $number, int $padding = 1, int $direction = STR_PAD_BOTH) : string |
| 31 | 31 | { |
| 32 | - return str_pad((string) $number, $padding, '0', $direction); |
|
| 32 | + return str_pad((string)$number, $padding, '0', $direction); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | * |
| 75 | 75 | * @return bool|string The correct function to call |
| 76 | 76 | */ |
| 77 | - public static function toNative(string $class, string $method) : bool|string |
|
| 77 | + public static function toNative(string $class, string $method) : bool | string |
|
| 78 | 78 | { |
| 79 | 79 | // Aliased native function |
| 80 | 80 | $native = Method::getNative($method); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | // If no function prefix found, return false |
| 97 | - if (!isset($prefix)) { |
|
| 97 | + if ( ! isset($prefix)) { |
|
| 98 | 98 | return false; |
| 99 | 99 | } |
| 100 | 100 | |
@@ -145,7 +145,7 @@ |
||
| 145 | 145 | * |
| 146 | 146 | * @return string|false The native function |
| 147 | 147 | */ |
| 148 | - public static function getNative(string $method) : bool|string |
|
| 148 | + public static function getNative(string $method) : bool | string |
|
| 149 | 149 | { |
| 150 | 150 | // If a defered method exist |
| 151 | 151 | if (\in_array($method, static::$defer, true)) { |
@@ -40,11 +40,11 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | public static function unpack(object $object, mixed $attribute = null) : object |
| 42 | 42 | { |
| 43 | - $object = (array) $object; |
|
| 43 | + $object = (array)$object; |
|
| 44 | 44 | $object = $attribute |
| 45 | 45 | ? ArraysMethods::get($object, $attribute) |
| 46 | 46 | : ArraysMethods::first($object); |
| 47 | 47 | |
| 48 | - return (object) $object; |
|
| 48 | + return (object)$object; |
|
| 49 | 49 | } |
| 50 | 50 | } |
@@ -58,17 +58,17 @@ discard block |
||
| 58 | 58 | return $collection; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - $collection = (array) $collection; |
|
| 61 | + $collection = (array)$collection; |
|
| 62 | 62 | |
| 63 | 63 | if (isset($collection[$key])) { |
| 64 | 64 | return $collection[$key]; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | // Crawl through collection, get key according to object or not |
| 68 | - foreach (explode('.', (string) $key) as $segment) { |
|
| 69 | - $collection = (array) $collection; |
|
| 68 | + foreach (explode('.', (string)$key) as $segment) { |
|
| 69 | + $collection = (array)$collection; |
|
| 70 | 70 | |
| 71 | - if (!isset($collection[$segment])) { |
|
| 71 | + if ( ! isset($collection[$segment])) { |
|
| 72 | 72 | return $default instanceof Closure ? $default() : $default; |
| 73 | 73 | } |
| 74 | 74 | |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | public static function setAndGet(mixed &$collection, string $key, mixed $default = null) : mixed |
| 107 | 107 | { |
| 108 | 108 | // If the key doesn't exist, set it |
| 109 | - if (!static::has($collection, $key)) { |
|
| 109 | + if ( ! static::has($collection, $key)) { |
|
| 110 | 110 | $collection = static::set($collection, $key, $default); |
| 111 | 111 | } |
| 112 | 112 | |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | * |
| 122 | 122 | * @return mixed |
| 123 | 123 | */ |
| 124 | - public static function remove(mixed $collection, string|array $key) : mixed |
|
| 124 | + public static function remove(mixed $collection, string | array $key) : mixed |
|
| 125 | 125 | { |
| 126 | 126 | // Recursive call |
| 127 | 127 | if (\is_array($key)) { |
@@ -145,13 +145,13 @@ discard block |
||
| 145 | 145 | * |
| 146 | 146 | * @return array|object |
| 147 | 147 | */ |
| 148 | - public static function pluck($collection, $property) : object|array |
|
| 148 | + public static function pluck($collection, $property) : object | array |
|
| 149 | 149 | { |
| 150 | - $plucked = array_map(fn($value) => ArraysMethods::get($value, $property), (array) $collection); |
|
| 150 | + $plucked = array_map(fn($value) => ArraysMethods::get($value, $property), (array)$collection); |
|
| 151 | 151 | |
| 152 | 152 | // Convert back to object if necessary |
| 153 | 153 | if (\is_object($collection)) { |
| 154 | - return (object) $plucked; |
|
| 154 | + return (object)$plucked; |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | return $plucked; |
@@ -169,9 +169,9 @@ discard block |
||
| 169 | 169 | * @return array|object |
| 170 | 170 | */ |
| 171 | 171 | public static function filterBy($collection, string $property, mixed $value, string $comparisonOp = null) : |
| 172 | - object|array |
|
| 172 | + object | array |
|
| 173 | 173 | { |
| 174 | - if (!$comparisonOp) { |
|
| 174 | + if ( ! $comparisonOp) { |
|
| 175 | 175 | $comparisonOp = \is_array($value) ? 'contains' : 'eq'; |
| 176 | 176 | } |
| 177 | 177 | |
@@ -182,32 +182,32 @@ discard block |
||
| 182 | 182 | 'lt' => fn($item, $prop, $value) : bool => $item[$prop] < $value, |
| 183 | 183 | 'lte' => fn($item, $prop, $value) : bool => $item[$prop] <= $value, |
| 184 | 184 | 'ne' => fn($item, $prop, $value) : bool => $item[$prop] !== $value, |
| 185 | - 'contains' => fn($item, $prop, $value) : bool => \in_array($item[$prop], (array) $value, true), |
|
| 186 | - 'notContains' => fn($item, $prop, $value) : bool => ! \in_array($item[$prop], (array) $value, true), |
|
| 185 | + 'contains' => fn($item, $prop, $value) : bool => \in_array($item[$prop], (array)$value, true), |
|
| 186 | + 'notContains' => fn($item, $prop, $value) : bool => ! \in_array($item[$prop], (array)$value, true), |
|
| 187 | 187 | 'newer' => fn( |
| 188 | 188 | $item, |
| 189 | 189 | $prop, |
| 190 | 190 | $value |
| 191 | - ) : bool => strtotime((string) $item[$prop]) > strtotime((string) $value), |
|
| 191 | + ) : bool => strtotime((string)$item[$prop]) > strtotime((string)$value), |
|
| 192 | 192 | 'older' => fn( |
| 193 | 193 | $item, |
| 194 | 194 | $prop, |
| 195 | 195 | $value |
| 196 | - ) : bool => strtotime((string) $item[$prop]) < strtotime((string) $value), |
|
| 196 | + ) : bool => strtotime((string)$item[$prop]) < strtotime((string)$value), |
|
| 197 | 197 | ]; |
| 198 | - $result = array_values(array_filter((array) $collection, function ($item) use ( |
|
| 198 | + $result = array_values(array_filter((array)$collection, function($item) use ( |
|
| 199 | 199 | $property, |
| 200 | 200 | $value, |
| 201 | 201 | $ops, |
| 202 | 202 | $comparisonOp |
| 203 | 203 | ) { |
| 204 | - $item = (array) $item; |
|
| 204 | + $item = (array)$item; |
|
| 205 | 205 | $item[$property] = static::get($item, $property, []); |
| 206 | 206 | |
| 207 | 207 | return $ops[$comparisonOp]($item, $property, $value); |
| 208 | 208 | })); |
| 209 | 209 | if (\is_object($collection)) { |
| 210 | - return (object) $result; |
|
| 210 | + return (object)$result; |
|
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | return $result; |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | { |
| 226 | 226 | $filtered = static::filterBy($collection, $property, $value, $comparisonOp); |
| 227 | 227 | |
| 228 | - return ArraysMethods::first(\is_array($filtered) ? $filtered : (array) $filtered); |
|
| 228 | + return ArraysMethods::first(\is_array($filtered) ? $filtered : (array)$filtered); |
|
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | //////////////////////////////////////////////////////////////////// |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | */ |
| 241 | 241 | public static function keys($collection) : array |
| 242 | 242 | { |
| 243 | - return array_keys((array) $collection); |
|
| 243 | + return array_keys((array)$collection); |
|
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | /** |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | */ |
| 253 | 253 | public static function values($collection) : array |
| 254 | 254 | { |
| 255 | - return array_values((array) $collection); |
|
| 255 | + return array_values((array)$collection); |
|
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | //////////////////////////////////////////////////////////////////// |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | * |
| 270 | 270 | * @return mixed |
| 271 | 271 | */ |
| 272 | - public static function replace(array|object $collection, string $replace, string $key, mixed $value) : mixed |
|
| 272 | + public static function replace(array | object $collection, string $replace, string $key, mixed $value) : mixed |
|
| 273 | 273 | { |
| 274 | 274 | $collection = static::remove($collection, $replace); |
| 275 | 275 | |
@@ -286,10 +286,10 @@ discard block |
||
| 286 | 286 | * |
| 287 | 287 | * @return array |
| 288 | 288 | */ |
| 289 | - public static function sort(array|object $collection, string|callable $sorter = null, string $direction = 'asc') : |
|
| 289 | + public static function sort(array | object $collection, string | callable $sorter = null, string $direction = 'asc') : |
|
| 290 | 290 | array |
| 291 | 291 | { |
| 292 | - $collection = (array) $collection; |
|
| 292 | + $collection = (array)$collection; |
|
| 293 | 293 | |
| 294 | 294 | // Get correct PHP constant for direction |
| 295 | 295 | $directionNumber = (strtolower($direction) === 'desc') ? SORT_DESC : SORT_ASC; |
@@ -319,9 +319,9 @@ discard block |
||
| 319 | 319 | * |
| 320 | 320 | * @return array |
| 321 | 321 | */ |
| 322 | - public static function group(mixed $collection, callable|string $grouper, bool $saveKeys = false) : array |
|
| 322 | + public static function group(mixed $collection, callable | string $grouper, bool $saveKeys = false) : array |
|
| 323 | 323 | { |
| 324 | - $collection = (array) $collection; |
|
| 324 | + $collection = (array)$collection; |
|
| 325 | 325 | $result = []; |
| 326 | 326 | |
| 327 | 327 | // Iterate over values, group by property/results from closure |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | } |
| 363 | 363 | |
| 364 | 364 | // Explode the keys |
| 365 | - $keys = explode('.', (string) $key); |
|
| 365 | + $keys = explode('.', (string)$key); |
|
| 366 | 366 | |
| 367 | 367 | // Crawl through the keys |
| 368 | 368 | while (\count($keys) > 1) { |
@@ -398,7 +398,7 @@ discard block |
||
| 398 | 398 | * |
| 399 | 399 | * @return mixed |
| 400 | 400 | */ |
| 401 | - protected static function internalRemove(array|object &$collection, mixed $key) : bool |
|
| 401 | + protected static function internalRemove(array | object &$collection, mixed $key) : bool |
|
| 402 | 402 | { |
| 403 | 403 | // Explode keys |
| 404 | 404 | $keys = explode('.', $key); |