Skip to content

Commit 421b084

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 0fadf43 commit 421b084

File tree

9 files changed

+11
-11
lines changed

9 files changed

+11
-11
lines changed

src/Contract/HubInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface HubInterface
1717
* Send an object through one of the available pipelines.
1818
*
1919
* @param mixed $object
20-
* @param string|null $pipeline
20+
* @param null|string $pipeline
2121
* @return mixed
2222
*/
2323
public function pipe($object, $pipeline = null);

src/Env.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Env
3030
/**
3131
* The environment repository instance.
3232
*
33-
* @var \Dotenv\Repository\RepositoryInterface|null
33+
* @var null|\Dotenv\Repository\RepositoryInterface
3434
*/
3535
protected static $repository;
3636

src/Functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* @param array|int $times
2424
* @param callable(int):TReturn $callback
2525
* @param Closure|int $sleepMilliseconds
26-
* @param callable|null $when
26+
* @param null|callable $when
2727
* @return TReturn|void
2828
* @throws Exception
2929
*/

src/Number.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static function parseInt(string $string, ?string $locale = null): int
7272
* Parse a string into a float according to the specified locale.
7373
*
7474
* @param string $string The string to parse
75-
* @param string|null $locale The locale to use
75+
* @param null|string $locale The locale to use
7676
*/
7777
public static function parseFloat(string $string, ?string $locale = null): float
7878
{

src/Once.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Once
1818
/**
1919
* The current globally used instance.
2020
*
21-
* @var static|null
21+
* @var null|static
2222
*/
2323
protected static ?self $instance = null;
2424

src/Once/Cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Cache implements Countable
2323

2424
/**
2525
* The cache instance.
26-
* @var static|null
26+
* @var null|static
2727
*/
2828
protected static $cache;
2929

src/Onceable.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(
3232
* Tries to create a new onceable instance from the given trace.
3333
*
3434
* @param array<int, array<string, mixed>> $trace
35-
* @return static|null
35+
* @return null|static
3636
*/
3737
public static function tryFromTrace(array $trace, callable $callable)
3838
{
@@ -49,7 +49,7 @@ public static function tryFromTrace(array $trace, callable $callable)
4949
* Computes the object of the onceable from the given trace, if any.
5050
*
5151
* @param array<int, array<string, mixed>> $trace
52-
* @return object|null
52+
* @return null|object
5353
*/
5454
protected static function objectFromTrace(array $trace)
5555
{
@@ -60,7 +60,7 @@ protected static function objectFromTrace(array $trace)
6060
* Computes the hash of the onceable from the given trace.
6161
*
6262
* @param array<int, array<string, mixed>> $trace
63-
* @return string|null
63+
* @return null|string
6464
*/
6565
protected static function hashFromTrace(array $trace, callable $callable)
6666
{

src/Pipeline/Hub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function pipeline(string $name, Closure $callback)
5151
* Send an object through one of the available pipelines.
5252
*
5353
* @param mixed $object
54-
* @param string|null $pipeline
54+
* @param null|string $pipeline
5555
* @return mixed
5656
*/
5757
public function pipe($object, $pipeline = null)

src/Sleep.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Sleep
5252
/**
5353
* The pending duration to sleep.
5454
*
55-
* @var int|float|null
55+
* @var null|int|float
5656
*/
5757
protected $pending;
5858

0 commit comments

Comments
 (0)