From f61361d4db4fae88b1d939c2366c0ed37b17b3bd Mon Sep 17 00:00:00 2001 From: neznaika0 Date: Sun, 5 Jan 2025 20:40:55 +0300 Subject: [PATCH] refactor: Fix phpstan generator.returnType --- tests/system/Database/Builder/SelectTest.php | 3 ++- utils/phpstan-baseline/generator.returnType.neon | 8 -------- utils/phpstan-baseline/loader.neon | 1 - 3 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 utils/phpstan-baseline/generator.returnType.neon diff --git a/tests/system/Database/Builder/SelectTest.php b/tests/system/Database/Builder/SelectTest.php index 411e26a695bf..7a1027bc62ce 100644 --- a/tests/system/Database/Builder/SelectTest.php +++ b/tests/system/Database/Builder/SelectTest.php @@ -19,6 +19,7 @@ use CodeIgniter\Database\SQLSRV\Builder as SQLSRVBuilder; use CodeIgniter\Test\CIUnitTestCase; use CodeIgniter\Test\Mock\MockConnection; +use Generator; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\Attributes\Group; @@ -82,7 +83,7 @@ public function testSelectAcceptsArrayWithRawSql(array $select, string $expected } /** - * @return list|string> + * @return Generator|string> */ public static function provideSelectAcceptsArrayWithRawSql(): iterable { diff --git a/utils/phpstan-baseline/generator.returnType.neon b/utils/phpstan-baseline/generator.returnType.neon deleted file mode 100644 index 362eba792702..000000000000 --- a/utils/phpstan-baseline/generator.returnType.neon +++ /dev/null @@ -1,8 +0,0 @@ -# total 1 error - -parameters: - ignoreErrors: - - - message: '#^Yield can be used only with these return types\: Generator, Iterator, Traversable, iterable\.$#' - count: 1 - path: ../../tests/system/Database/Builder/SelectTest.php diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index 3fa0e75a7e12..7a758b2b8e94 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -18,7 +18,6 @@ includes: - expr.resultUnused.neon - function.alreadyNarrowedType.neon - function.inner.neon - - generator.returnType.neon - generator.valueType.neon - isset.offset.neon - isset.property.neon