From 50cb3e5c692f71256236461f3831ea865b767aab Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Fri, 28 Aug 2026 12:25:48 +0800 Subject: [PATCH] style: fix native type ordering in lambda functions --- system/Database/Postgre/Builder.php | 2 +- tests/system/Router/Attributes/CacheTest.php | 2 +- utils/src/Rector/RemoveErrorSuppressInTryCatchStmtsRector.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/system/Database/Postgre/Builder.php b/system/Database/Postgre/Builder.php index 4723a58e7cc8..4e5245bca994 100644 --- a/system/Database/Postgre/Builder.php +++ b/system/Database/Postgre/Builder.php @@ -372,7 +372,7 @@ protected function _updateBatch(string $table, array $keys, array $values): stri $sql .= 'WHERE ' . implode( ' AND ', array_map( - static function ($key, $value) use ($table, $alias, $that): string|RawSql { + static function ($key, $value) use ($table, $alias, $that): RawSql|string { if ($value instanceof RawSql && is_string($key)) { return $table . '.' . $key . ' = ' . $value; } diff --git a/tests/system/Router/Attributes/CacheTest.php b/tests/system/Router/Attributes/CacheTest.php index 1570c9658938..f31045336973 100644 --- a/tests/system/Router/Attributes/CacheTest.php +++ b/tests/system/Router/Attributes/CacheTest.php @@ -221,7 +221,7 @@ private function createMockRequest(string $method, string $path, string $query = ->getMock(); $request->method('isCLI')->willReturn(false); $request->method('withMethod')->willReturnCallback( - static function (string $method) use ($request): MockObject&IncomingRequest { + static function (string $method) use ($request): IncomingRequest&MockObject { $request->method('getMethod')->willReturn($method); return $request; diff --git a/utils/src/Rector/RemoveErrorSuppressInTryCatchStmtsRector.php b/utils/src/Rector/RemoveErrorSuppressInTryCatchStmtsRector.php index db84e7bc4bd7..592718837e2e 100644 --- a/utils/src/Rector/RemoveErrorSuppressInTryCatchStmtsRector.php +++ b/utils/src/Rector/RemoveErrorSuppressInTryCatchStmtsRector.php @@ -61,7 +61,7 @@ public function refactor(Node $node): ?Node $this->traverseNodesWithCallable( $node->stmts, - static function (Node $subNode) use (&$hasChanged): int|Expr|null { + static function (Node $subNode) use (&$hasChanged): Expr|int|null { if ($subNode instanceof Class_ || $subNode instanceof Function_) { return NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN; }