Skip to content

Commit 28694e8

Browse files
committed
More precise return type for gatherAssertTypes
1 parent 19dfc5e commit 28694e8

File tree

5 files changed

+6
-14
lines changed

5 files changed

+6
-14
lines changed

src/Testing/TypeInferenceTestCase.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,13 @@ public function assertFileAsserts(
220220
}
221221

222222
/**
223+
* @return array<string, (
224+
* array{0: 'type', 1: string, 2: string, 3: string, 4: int, 5?: string}|
225+
* array{0: 'superType', 1: string, 2: string, 3: string, 4: bool, 5: int, 6?: string}|
226+
* array{0: 'variableCertainty', 1: string, 2: TrinaryLogic, 3: TrinaryLogic, 4: string, 5: int, 6?: string}
227+
* )>
228+
*
223229
* @api
224-
* @return array<string, mixed[]>
225230
*/
226231
public static function gatherAssertTypes(string $file): array
227232
{

tests/PHPStan/Analyser/LooseConstComparisonPhp7Test.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
class LooseConstComparisonPhp7Test extends TypeInferenceTestCase
99
{
1010

11-
/**
12-
* @return iterable<array<string, mixed[]>>
13-
*/
1411
public static function dataFileAsserts(): iterable
1512
{
1613
// compares constants according to the php-version phpstan configuration,

tests/PHPStan/Analyser/LooseConstComparisonPhp8Test.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
class LooseConstComparisonPhp8Test extends TypeInferenceTestCase
99
{
1010

11-
/**
12-
* @return iterable<array<string, mixed[]>>
13-
*/
1411
public static function dataFileAsserts(): iterable
1512
{
1613
// compares constants according to the php-version phpstan configuration,

tests/PHPStan/Analyser/SubstrPhp7Test.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77

88
class SubstrPhp7Test extends TypeInferenceTestCase
99
{
10-
11-
/**
12-
* @return iterable<array<string, mixed[]>>
13-
*/
1410
public static function dataFileAsserts(): iterable
1511
{
1612
yield from self::gatherAssertTypes(__DIR__ . '/data/bug-13129-php7.php');

tests/PHPStan/Analyser/SubstrPhp8Test.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
class SubstrPhp8Test extends TypeInferenceTestCase
99
{
1010

11-
/**
12-
* @return iterable<array<string, mixed[]>>
13-
*/
1411
public static function dataFileAsserts(): iterable
1512
{
1613
yield from self::gatherAssertTypes(__DIR__ . '/data/bug-13129-php8.php');

0 commit comments

Comments
 (0)