From d5d76544e28b5f7bde3aac229474a201be08b6aa Mon Sep 17 00:00:00 2001 From: Pooya Parsa Dadashi Date: Fri, 20 Sep 2024 23:26:29 +0330 Subject: [PATCH 1/2] chore: add `psalm_autoload.php` for linter --- .php-cs-fixer.dist.php | 1 + psalm_autoload.php | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 0e986f3c2..2979b15aa 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -25,6 +25,7 @@ ->append([ __FILE__, __DIR__ . '/rector.php', + __DIR__ . '/psalm_autoload.php', ]); $overrides = [ diff --git a/psalm_autoload.php b/psalm_autoload.php index f68b2665a..c7c0b0736 100644 --- a/psalm_autoload.php +++ b/psalm_autoload.php @@ -2,6 +2,15 @@ declare(strict_types=1); +/** + * This file is part of CodeIgniter Shield. + * + * (c) CodeIgniter Foundation + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + require __DIR__ . '/vendor/codeigniter4/framework/system/Test/bootstrap.php'; $helperDirs = [ From 7f17d8d841232a53da6e8fffe48d7754823c13ee Mon Sep 17 00:00:00 2001 From: Pooya Parsa Dadashi Date: Fri, 20 Sep 2024 23:32:39 +0330 Subject: [PATCH 2/2] fix: run rector for fix error --- tests/Language/AbstractTranslationTestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Language/AbstractTranslationTestCase.php b/tests/Language/AbstractTranslationTestCase.php index daf0cfbd0..376a48783 100644 --- a/tests/Language/AbstractTranslationTestCase.php +++ b/tests/Language/AbstractTranslationTestCase.php @@ -332,7 +332,7 @@ final public function testAllLocalizationParametersAreNotTranslated(string $loca foreach ($matches as $match) { foreach ($match as $parameter) { - if (strpos($translated[$key], (string) $parameter) === false) { + if (strpos($translated[$key], $parameter) === false) { $id = sprintf('%s.%s', substr($file, 0, -4), $key); $diffs[$id] ??= [];