diff --git a/system/Database/BaseBuilder.php b/system/Database/BaseBuilder.php index 17f0690d8fb9..1383f006023a 100644 --- a/system/Database/BaseBuilder.php +++ b/system/Database/BaseBuilder.php @@ -3591,13 +3591,16 @@ protected function setBind(string $key, $value = null, bool $escape = true): str /** * Returns a clone of a Base Builder with reset query builder values. * - * @return $this + * @return static * * @deprecated */ protected function cleanClone() { - return (clone $this)->from([], true)->resetQuery(); + $clone = clone $this; + $clone->from([], true); + + return $clone->resetQuery(); } /** diff --git a/system/Router/Router.php b/system/Router/Router.php index cb53b439ea30..c886bf45f396 100644 --- a/system/Router/Router.php +++ b/system/Router/Router.php @@ -914,7 +914,7 @@ public function executeAfterAttributes(RequestInterface $request, ResponseInterf * Returns the route attributes collected during routing * for the current route. * - * @return array{class: list, method: list} + * @return array{class: list, method: list} */ public function getRouteAttributes(): array { diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index 37ac9a181531..5c569b16cf71 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -1,4 +1,4 @@ -# total 1480 errors +# total 1478 errors includes: - argument.type.neon @@ -17,5 +17,4 @@ includes: - property.nonObject.neon - property.notFound.neon - property.phpDocType.neon - - return.type.neon - staticMethod.notFound.neon diff --git a/utils/phpstan-baseline/return.type.neon b/utils/phpstan-baseline/return.type.neon deleted file mode 100644 index acfc78a3c171..000000000000 --- a/utils/phpstan-baseline/return.type.neon +++ /dev/null @@ -1,13 +0,0 @@ -# total 2 errors - -parameters: - ignoreErrors: - - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:cleanClone\(\) should return \$this\(CodeIgniter\\Database\\BaseBuilder\) but returns CodeIgniter\\Database\\BaseBuilder\.$#' - count: 1 - path: ../../system/Database/BaseBuilder.php - - - - message: '#^Method CodeIgniter\\Router\\Router\:\:getRouteAttributes\(\) should return array\{class\: list\, method\: list\\} but returns array\{class\: list\, method\: list\\}\.$#' - count: 1 - path: ../../system/Router/Router.php