Skip to content

Commit 414dbe8

Browse files
authored
chore(deps): update huangdijia/php-coding-standard to ^2.4 (#911)
* chore(deps): update huangdijia/php-coding-standard to ^2.4 Updates the PHP coding standard package from ^2.0 to ^2.4 to get the latest improvements and fixes. * style: apply PHP coding standard fixes after updating to ^2.4 Reorders union types to follow null-first convention and applies other code style improvements as required by the updated huangdijia/php-coding-standard package. This commit includes automatic fixes across multiple components: - Union type reordering (Type|null → null|Type) - Consistent formatting and style improvements - No functional changes, only code style compliance --------- Co-authored-by: Deeka Wong <8337659+huangdijia@users.noreply.github.com>
1 parent e1de332 commit 414dbe8

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

src/Functions.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
*
6565
* @return ($abstract is callable ? Closure : ($abstract is class-string<TClass> ? TClass : mixed))
6666
*/
67-
function app(string|callable|null $abstract = null, array $parameters = [])
67+
function app(null|string|callable $abstract = null, array $parameters = [])
6868
{
6969
if (is_callable($abstract)) {
7070
return Closure::fromCallable($abstract);
@@ -161,7 +161,7 @@ function class_namespace($class): string
161161
*
162162
* @template TClass
163163
*
164-
* @param class-string<TClass>|string|null $abstract
164+
* @param null|class-string<TClass>|string $abstract
165165
*
166166
* @return ($abstract is null ? ContainerInterface : ($abstract is class-string<TClass> ? TClass : mixed))
167167
*/
@@ -323,7 +323,7 @@ function literal(...$arguments)
323323
}
324324

325325
/**
326-
* @param string|Stringable|null $message
326+
* @param null|string|Stringable $message
327327
* @return ($message is null ? LoggerInterface : mixed)
328328
*/
329329
function logger($message = null, array $context = [], bool $backtrace = false)
@@ -348,7 +348,7 @@ function logs(string $name = 'hyperf', string $group = 'default'): LoggerInterfa
348348
/**
349349
* Create a new Carbon instance for the current time.
350350
*
351-
* @param DateTimeZone|string|null $tz
351+
* @param null|DateTimeZone|string $tz
352352
*
353353
* @deprecated since v3.1, use Hyperf\Support\now() instead, will be removed in v3.2
354354
*/
@@ -363,7 +363,7 @@ function now($tz = null): Carbon
363363
* @template TValue of object
364364
*
365365
* @param TValue $object
366-
* @param string|null $key
366+
* @param null|string $key
367367
* @param mixed $default
368368
* @return ($key is empty ? TValue : mixed)
369369
*/
@@ -416,7 +416,7 @@ function resolve(string|callable $abstract, array $parameters = [])
416416

417417
/**
418418
* Get an instance of the current request or an input item from the request.
419-
* @param array|string|null $key
419+
* @param null|array|string $key
420420
* @param mixed $default
421421
* @return ($key is null ? RequestInterface : ($key is array ? array : mixed))
422422
*/
@@ -438,7 +438,7 @@ function request($key = null, $default = null)
438438
/**
439439
* Return a new response from the application.
440440
*
441-
* @param array|string|null $content
441+
* @param null|array|string $content
442442
* @param int $status
443443
* @return PsrResponseInterface|ResponseInterface
444444
*/
@@ -475,7 +475,7 @@ function ($response) use ($headers) {
475475
*
476476
* @param callable(): TValue $callback
477477
* @param (callable(Throwable): TFallback)|TFallback $rescue
478-
* @param Closure(Throwable): void|null $exceptionHandler
478+
* @param null|Closure(Throwable): void $exceptionHandler
479479
* @return TValue|TFallback
480480
*/
481481
function rescue(callable $callback, mixed $rescue = null, ?Closure $exceptionHandler = null)
@@ -496,7 +496,7 @@ function rescue(callable $callback, mixed $rescue = null, ?Closure $exceptionHan
496496
*
497497
* If an array is passed as the key, we will assume you want to set an array of values.
498498
*
499-
* @param array|string|null $key
499+
* @param null|array|string $key
500500
* @param mixed $default
501501
* @return ($key is null ? SessionInterface : ($key is array ? void : mixed))
502502
*/
@@ -519,7 +519,7 @@ function session($key = null, $default = null)
519519
/**
520520
* Create a new Carbon instance for the current date.
521521
*
522-
* @param DateTimeZone|string|null $tz
522+
* @param null|DateTimeZone|string $tz
523523
*
524524
* @deprecated since v3.1, use Hyperf\Support\today() instead, will be removed in v3.2
525525
*/

0 commit comments

Comments
 (0)