From ad187fb945f0465e273e0f234174ab0817fdbc34 Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Sun, 15 Feb 2026 01:04:49 +0800 Subject: [PATCH] refactor: add strict types to tests --- .php-cs-fixer.tests.php | 1 + tests/_support/Commands/Foobar.php | 2 ++ utils/src/PhpCsFixer/CodeIgniterRuleCustomisationPolicy.php | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/.php-cs-fixer.tests.php b/.php-cs-fixer.tests.php index 09ea5a62c55a..ca74f7f5e404 100644 --- a/.php-cs-fixer.tests.php +++ b/.php-cs-fixer.tests.php @@ -30,6 +30,7 @@ ]); $overrides = [ + 'declare_strict_types' => true, 'phpdoc_to_return_type' => true, 'void_return' => true, ]; diff --git a/tests/_support/Commands/Foobar.php b/tests/_support/Commands/Foobar.php index 7ca79a9db7a5..edd0c769590e 100644 --- a/tests/_support/Commands/Foobar.php +++ b/tests/_support/Commands/Foobar.php @@ -1,5 +1,7 @@ str_ends_with(str_replace('\\', '/', $haystack), $needle); return [ + 'declare_strict_types' => static fn (SplFileInfo $file): bool => ! $normalisedStrEndsWith( + $file->getPathname(), + '/tests/system/Debug/ExceptionsTest.php', + ), 'native_function_casing' => static fn (SplFileInfo $file): bool => ! $normalisedStrEndsWith( $file->getPathname(), '/tests/system/Database/Live/PreparedQueryTest.php',