diff --git a/tests/_support/Entity/CustomUser.php b/tests/_support/Entity/CustomUser.php index 94a6ae3345ab..67d381ca6fde 100644 --- a/tests/_support/Entity/CustomUser.php +++ b/tests/_support/Entity/CustomUser.php @@ -38,6 +38,9 @@ private function __construct( ) { } + /** + * @param array|string|Time|null> $data + */ public static function reconstruct(array $data): static { return new self( diff --git a/tests/_support/Log/Handlers/TestHandler.php b/tests/_support/Log/Handlers/TestHandler.php index b87b5aff743b..025943ffe588 100644 --- a/tests/_support/Log/Handlers/TestHandler.php +++ b/tests/_support/Log/Handlers/TestHandler.php @@ -35,6 +35,8 @@ class TestHandler extends FileHandler /** * Where would the log be written? + * + * @param array $config */ public function __construct(array $config) { diff --git a/tests/_support/Models/EventModel.php b/tests/_support/Models/EventModel.php index 4057c05d2f6f..00a11ac132fc 100644 --- a/tests/_support/Models/EventModel.php +++ b/tests/_support/Models/EventModel.php @@ -129,6 +129,9 @@ protected function afterDeleteMethod(array $data) return $data; } + /** + * @param array $data + */ protected function beforeFindMethod(array $data) { $this->tokens[] = 'beforeFind'; diff --git a/tests/system/Database/Live/UpdateTest.php b/tests/system/Database/Live/UpdateTest.php index 64a84ad03242..e1fed75e660e 100644 --- a/tests/system/Database/Live/UpdateTest.php +++ b/tests/system/Database/Live/UpdateTest.php @@ -114,6 +114,9 @@ public function testUpdateWithWhereAndLimit(): void } } + /** + * @param array $expected + */ #[DataProvider('provideUpdateBatch')] public function testUpdateBatch(string $constraints, array $data, array $expected): void { diff --git a/tests/system/HTTP/CURLRequestShareOptionsTest.php b/tests/system/HTTP/CURLRequestShareOptionsTest.php index 8f6277cf9501..a2a7f3be8e70 100644 --- a/tests/system/HTTP/CURLRequestShareOptionsTest.php +++ b/tests/system/HTTP/CURLRequestShareOptionsTest.php @@ -28,6 +28,9 @@ #[Group('Others')] final class CURLRequestShareOptionsTest extends CURLRequestTest { + /** + * @param array $options + */ protected function getRequest(array $options = []): MockCURLRequest { $uri = isset($options['baseURI']) ? new URI($options['baseURI']) : new URI(); diff --git a/tests/system/Validation/StrictRules/CreditCardRulesTest.php b/tests/system/Validation/StrictRules/CreditCardRulesTest.php index 7cbe81038e66..a1bc09aa6c0f 100644 --- a/tests/system/Validation/StrictRules/CreditCardRulesTest.php +++ b/tests/system/Validation/StrictRules/CreditCardRulesTest.php @@ -1226,6 +1226,9 @@ protected static function generateCardNumber(int $prefix, int $length): string return implode('', $digits); } + /** + * @param array $digits + */ protected static function calculateLuhnChecksum(array $digits, int $length): int { $parity = $length % 2; diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index 14cccb8bd4d3..e155430838ce 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -1,4 +1,4 @@ -# total 2790 errors +# total 2788 errors includes: - argument.type.neon diff --git a/utils/phpstan-baseline/missingType.iterableValue.neon b/utils/phpstan-baseline/missingType.iterableValue.neon index cba1a519c0e4..1c05e47ee86b 100644 --- a/utils/phpstan-baseline/missingType.iterableValue.neon +++ b/utils/phpstan-baseline/missingType.iterableValue.neon @@ -1,4 +1,4 @@ -# total 1378 errors +# total 1376 errors parameters: ignoreErrors: @@ -5612,11 +5612,6 @@ parameters: count: 1 path: ../../tests/system/Database/Live/UpdateTest.php - - - message: '#^Method CodeIgniter\\Database\\Live\\UpdateTest\:\:testUpdateBatch\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - count: 1 - path: ../../tests/system/Database/Live/UpdateTest.php - - message: '#^Method CodeIgniter\\Debug\\ExceptionHandlerTest\:\:backupIniValues\(\) has parameter \$keys with no value type specified in iterable type array\.$#' count: 1 @@ -6647,11 +6642,6 @@ parameters: count: 1 path: ../../tests/system/Validation/RulesTest.php - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\CreditCardRulesTest\:\:calculateLuhnChecksum\(\) has parameter \$digits with no value type specified in iterable type array\.$#' - count: 1 - path: ../../tests/system/Validation/StrictRules/CreditCardRulesTest.php - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\CreditCardRulesTest\:\:provideValidCCNumber\(\) return type has no value type specified in iterable type iterable\.$#' count: 1