Skip to content

Commit 74ad37a

Browse files
committed
Standardize nullable type hints to 'null|Type' order
Refactors type hints and docblocks across the codebase to consistently use the 'null|Type' order for nullable types, improving code readability and alignment with modern PHP standards. No functional changes are introduced; this is a documentation and type annotation update only.
1 parent 12cd0a3 commit 74ad37a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/SignalRegistry.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ public function register(int|array $signo, callable $signalHandler): void
4949
}
5050

5151
/**
52-
* @param int|int[]|null $signo
52+
* @param null|int|int[] $signo
5353
*/
54-
public function unregister(int|array|null $signo = null): void
54+
public function unregister(null|int|array $signo = null): void
5555
{
5656
match (true) {
5757
// Unregister all signals

src/Traits/InteractsWithSignals.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protected function trap(array|int $signo, callable $callback): void
3636
$this->signalRegistry->register($signo, $callback);
3737
}
3838

39-
protected function untrap(array|int|null $signo = null): void
39+
protected function untrap(null|array|int $signo = null): void
4040
{
4141
$this->signalRegistry?->unregister($signo);
4242
}

0 commit comments

Comments
 (0)