From e94aa50fbdf1f98c42092a43a46362ec00f12b79 Mon Sep 17 00:00:00 2001 From: Adi Prasetyo Date: Fri, 27 Feb 2026 09:23:38 +0700 Subject: [PATCH 1/5] refactor: fix phpstan no type specified ValidationModelTest --- tests/system/Models/ValidationModelTest.php | 1 + utils/phpstan-baseline/loader.neon | 2 +- utils/phpstan-baseline/missingType.property.neon | 7 +------ 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/system/Models/ValidationModelTest.php b/tests/system/Models/ValidationModelTest.php index 744238076e13..25bd8e09f475 100644 --- a/tests/system/Models/ValidationModelTest.php +++ b/tests/system/Models/ValidationModelTest.php @@ -243,6 +243,7 @@ public function testValidationPassesWithMissingFields(): void public function testValidationWithGroupName(): void { $config = new class () extends Validation { + /** @var array> @grouptest */ public $grouptest = [ 'id' => 'is_natural_no_zero', 'name' => [ diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index 91d2bdc61339..b277717823bf 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -1,4 +1,4 @@ -# total 2117 errors +# total 2116 errors includes: - argument.type.neon diff --git a/utils/phpstan-baseline/missingType.property.neon b/utils/phpstan-baseline/missingType.property.neon index b708adad5fab..df409e85e4df 100644 --- a/utils/phpstan-baseline/missingType.property.neon +++ b/utils/phpstan-baseline/missingType.property.neon @@ -1,4 +1,4 @@ -# total 102 errors +# total 101 errors parameters: ignoreErrors: @@ -506,8 +506,3 @@ parameters: message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:401\:\:\$updated_at has no type specified\.$#' count: 1 path: ../../tests/system/Models/UpdateModelTest.php - - - - message: '#^Property Config\\Validation@anonymous/tests/system/Models/ValidationModelTest\.php\:245\:\:\$grouptest has no type specified\.$#' - count: 1 - path: ../../tests/system/Models/ValidationModelTest.php From 57b0ae44ac1ac2348cfdc6de94953db8c9d2260a Mon Sep 17 00:00:00 2001 From: Adi Prasetyo Date: Fri, 27 Feb 2026 11:04:18 +0700 Subject: [PATCH 2/5] Conform docblock style based on PHP 8.2 Lint --- tests/system/Models/ValidationModelTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/system/Models/ValidationModelTest.php b/tests/system/Models/ValidationModelTest.php index 25bd8e09f475..456bf6122dcc 100644 --- a/tests/system/Models/ValidationModelTest.php +++ b/tests/system/Models/ValidationModelTest.php @@ -243,7 +243,9 @@ public function testValidationPassesWithMissingFields(): void public function testValidationWithGroupName(): void { $config = new class () extends Validation { - /** @var array> @grouptest */ + /** + * @var array> @grouptest + */ public $grouptest = [ 'id' => 'is_natural_no_zero', 'name' => [ From 33304bb9020df99efb52492307b5a0e18d40cf61 Mon Sep 17 00:00:00 2001 From: Adi Prasetyo Date: Fri, 27 Feb 2026 11:16:33 +0700 Subject: [PATCH 3/5] Apply suggestion from @neznaika0 Co-authored-by: neznaika0 --- tests/system/Models/ValidationModelTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system/Models/ValidationModelTest.php b/tests/system/Models/ValidationModelTest.php index 456bf6122dcc..65905e6a2ae1 100644 --- a/tests/system/Models/ValidationModelTest.php +++ b/tests/system/Models/ValidationModelTest.php @@ -244,7 +244,7 @@ public function testValidationWithGroupName(): void { $config = new class () extends Validation { /** - * @var array> @grouptest + * @var array|string> */ public $grouptest = [ 'id' => 'is_natural_no_zero', From 5c82b83c0a7377dfebaa67a59b5afadf9373dc02 Mon Sep 17 00:00:00 2001 From: Adi Prasetyo Date: Fri, 27 Feb 2026 17:15:56 +0700 Subject: [PATCH 4/5] Remove trailing whitespace in comment --- tests/system/Models/ValidationModelTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system/Models/ValidationModelTest.php b/tests/system/Models/ValidationModelTest.php index 65905e6a2ae1..77e37f19353b 100644 --- a/tests/system/Models/ValidationModelTest.php +++ b/tests/system/Models/ValidationModelTest.php @@ -243,7 +243,7 @@ public function testValidationPassesWithMissingFields(): void public function testValidationWithGroupName(): void { $config = new class () extends Validation { - /** + /** * @var array|string> */ public $grouptest = [ From ea64bf8dda1cd5bd2ca78f04d0ec9d0c0c702741 Mon Sep 17 00:00:00 2001 From: Adi Prasetyo Date: Sat, 28 Feb 2026 19:09:07 +0700 Subject: [PATCH 5/5] use PHPDOC array shape --- tests/system/Models/ValidationModelTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system/Models/ValidationModelTest.php b/tests/system/Models/ValidationModelTest.php index 77e37f19353b..ba03bea98231 100644 --- a/tests/system/Models/ValidationModelTest.php +++ b/tests/system/Models/ValidationModelTest.php @@ -244,7 +244,7 @@ public function testValidationWithGroupName(): void { $config = new class () extends Validation { /** - * @var array|string> + * @var array{'id': string, 'name': array{string, string}, 'token': string} */ public $grouptest = [ 'id' => 'is_natural_no_zero',