@@ -479,7 +479,8 @@ |
||
| 479 | 479 | public static function randomBytes(int $length): string |
| 480 | 480 | { |
| 481 | 481 | // Sanity check |
| 482 | - if ($length < 1) { // @phpstan-ignore-line |
|
| 482 | + if ($length < 1) { |
|
| 483 | +// @phpstan-ignore-line |
|
| 483 | 484 | throw new RandomException('$length must be greater than 1.'); |
| 484 | 485 | } |
| 485 | 486 | |
@@ -280,10 +280,10 @@ |
||
| 280 | 280 | * @return array<string, int|float|string> |
| 281 | 281 | */ |
| 282 | 282 | public static function haversineDistance( |
| 283 | - int|float $startingLatitude, |
|
| 284 | - int|float $startingLongitude, |
|
| 285 | - int|float $endingLatitude, |
|
| 286 | - int|float $endingLongitude, |
|
| 283 | + int | float $startingLatitude, |
|
| 284 | + int | float $startingLongitude, |
|
| 285 | + int | float $endingLatitude, |
|
| 286 | + int | float $endingLongitude, |
|
| 287 | 287 | int $precision = 0 |
| 288 | 288 | ): array { |
| 289 | 289 | // Radians |
@@ -101,7 +101,7 @@ |
||
| 101 | 101 | * |
| 102 | 102 | * @throws RuntimeException If $array is not accessible |
| 103 | 103 | */ |
| 104 | - public static function set(array | ArrayAccess &$array, string | int | null $key, mixed $value): mixed |
|
| 104 | + public static function set(array | ArrayAccess & $array, string | int | null $key, mixed $value): mixed |
|
| 105 | 105 | { |
| 106 | 106 | if (is_null($key)) { |
| 107 | 107 | return $array = $value; |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | use Rector\CodeQuality\Rector\ClassMethod\LocallyCalledStaticMethodToNonStaticRector; |
| 10 | 10 | use Rector\Core\ValueObject\PhpVersion; |
| 11 | 11 | |
| 12 | -return static function (RectorConfig $rectorConfig): void { |
|
| 12 | +return static function(RectorConfig $rectorConfig): void { |
|
| 13 | 13 | $rectorConfig->paths([ |
| 14 | 14 | __DIR__ . '/src', |
| 15 | 15 | __DIR__ . '/tests/src', |
@@ -236,7 +236,7 @@ |
||
| 236 | 236 | static fn (string $string, bool $binarySafe = false): int => Strings::length($string, $binarySafe) |
| 237 | 237 | ); |
| 238 | 238 | |
| 239 | - $filtered = array_reduce($filtered, static function (array $tmp, string $item): array { |
|
| 239 | + $filtered = array_reduce($filtered, static function(array $tmp, string $item): array { |
|
| 240 | 240 | if ($item === '..') { |
| 241 | 241 | array_pop($tmp); |
| 242 | 242 | } elseif ($item !== '.') { |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | ); |
| 177 | 177 | |
| 178 | 178 | // Traverses the $ips array. Set $ip to current value if it's a public IP. |
| 179 | - array_walk($ips, static function (string $value, int $key) use (&$ip): string { |
|
| 179 | + array_walk($ips, static function(string $value, int $key) use (&$ip): string { |
|
| 180 | 180 | if (Environment::isPublicIp($value)) { |
| 181 | 181 | $ip = $value; |
| 182 | 182 | } |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | * |
| 386 | 386 | * @throws RuntimeException|ArgumentCountError |
| 387 | 387 | */ |
| 388 | - public static function iniSet(string $option, string|int|float|bool|null $value): string | false |
|
| 388 | + public static function iniSet(string $option, string | int | float | bool | null $value): string | false |
|
| 389 | 389 | { |
| 390 | 390 | static $iniSetAvailable; |
| 391 | 391 | |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | */ |
| 46 | 46 | enum StatusCodeDescriptions: string |
| 47 | 47 | { |
| 48 | - case Continue = 'This interim response indicates that the client should continue the request or ignore the response if the request is already finished.'; |
|
| 48 | + case continue = 'This interim response indicates that the client should continue the request or ignore the response if the request is already finished.'; |
|
| 49 | 49 | case Switching_Protocols = 'This code is sent in response to an Upgrade request header from the client and indicates the protocol the server is switching to.'; |
| 50 | 50 | case Processing = '[WebDav] This code indicates that the server has received and is processing the request, but no response is available yet.'; |
| 51 | 51 | case Early_Hints = 'This status code is primarily intended to be used with the Link header, letting the user agent start preloading resources while the server prepares a response or preconnect to an origin from which the page will need resources.'; |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | enum StatusCodes: int |
| 56 | 56 | { |
| 57 | 57 | // RFC7231, Section 6.2.1 |
| 58 | - case Continue = 100; |
|
| 58 | + case continue = 100; |
|
| 59 | 59 | // RFC7231, Section 6.2.2 |
| 60 | 60 | case Switching_Protocols = 101; |
| 61 | 61 | // RFC2518 |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | public function getDescription(): StatusCodeDescriptions |
| 250 | 250 | { |
| 251 | 251 | return match($this) { |
| 252 | - self::Continue => StatusCodeDescriptions::Continue, |
|
| 252 | + self::continue => StatusCodeDescriptions::continue, |
|
| 253 | 253 | self::Switching_Protocols => StatusCodeDescriptions::Switching_Protocols, |
| 254 | 254 | self::Processing => StatusCodeDescriptions::Processing, |
| 255 | 255 | self::Early_Hints => StatusCodeDescriptions::Early_Hints, |