Browse Source

chore: add `@return` tags for data providers already having PHPDoc (#8176)

Kuba Werłos 6 months ago
parent
commit
27e4156dad

+ 1 - 1
phpstan.dist.neon

@@ -56,6 +56,6 @@ parameters:
         -
             message: '#^Method PhpCsFixer\\Tests\\.+::provide.+Cases\(\) return type has no value type specified in iterable type iterable\.$#'
             path: tests
-            count: 1008
+            count: 1005
     tipsOfTheDay: false
     tmpDir: dev-tools/phpstan/cache

+ 2 - 2
tests/Fixer/Whitespace/BlankLineBeforeStatementFixerTest.php

@@ -1148,7 +1148,7 @@ do {
     }
 
     /**
-     * @yield array
+     * @return iterable<array{0: string, 1?: string}>
      */
     public static function provideFixWithYieldCases(): iterable
     {
@@ -1310,7 +1310,7 @@ function foo() {
     }
 
     /**
-     * @yield array
+     * @return iterable<array{0: string, 1?: string}>
      */
     public static function provideFixWithYieldFromCases(): iterable
     {

+ 2 - 0
tests/Tokenizer/Analyzer/AttributeAnalyzerTest.php

@@ -64,6 +64,8 @@ final class AttributeAnalyzerTest extends TestCase
 
     /**
      * Test case requires to having "Foo" as it will be searched for to test its index.
+     *
+     * @return iterable<array{bool, string}>
      */
     public static function provideIsAttributeCases(): iterable
     {