Skip to content

Commit ad9fcff

Browse files
clxmstaabsebastianbergmann
authored andcommitted
Fix phpstan-type declarations
the syntax does not have a `=`
1 parent 48b98da commit ad9fcff

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

src/CodeCoverage.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
/**
3939
* Provides collection functionality for PHP code coverage information.
4040
*
41-
* @phpstan-type TestType = array{
41+
* @phpstan-type TestType array{
4242
* size: string,
4343
* status: string,
4444
* }

src/Data/ProcessedCodeCoverageData.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
* @phpstan-import-type XdebugFunctionCoverageType from XdebugDriver
2626
*
27-
* @phpstan-type TestIdType = string
27+
* @phpstan-type TestIdType string
2828
*/
2929
final class ProcessedCodeCoverageData
3030
{

src/Driver/XdebugDriver.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
*
3535
* @see https://xdebug.org/docs/code_coverage#xdebug_get_code_coverage
3636
*
37-
* @phpstan-type XdebugLinesCoverageType = array<int, int>
38-
* @phpstan-type XdebugBranchCoverageType = array{
37+
* @phpstan-type XdebugLinesCoverageType array<int, int>
38+
* @phpstan-type XdebugBranchCoverageType array{
3939
* op_start: int,
4040
* op_end: int,
4141
* line_start: int,
@@ -44,21 +44,21 @@
4444
* out: array<int, int>,
4545
* out_hit: array<int, int>,
4646
* }
47-
* @phpstan-type XdebugPathCoverageType = array{
47+
* @phpstan-type XdebugPathCoverageType array{
4848
* path: array<int, int>,
4949
* hit: int,
5050
* }
51-
* @phpstan-type XdebugFunctionCoverageType = array{
51+
* @phpstan-type XdebugFunctionCoverageType array{
5252
* branches: array<int, XdebugBranchCoverageType>,
5353
* paths: array<int, XdebugPathCoverageType>,
5454
* }
55-
* @phpstan-type XdebugFunctionsCoverageType = array<string, XdebugFunctionCoverageType>
56-
* @phpstan-type XdebugPathAndBranchesCoverageType = array{
55+
* @phpstan-type XdebugFunctionsCoverageType array<string, XdebugFunctionCoverageType>
56+
* @phpstan-type XdebugPathAndBranchesCoverageType array{
5757
* lines: XdebugLinesCoverageType,
5858
* functions: XdebugFunctionsCoverageType,
5959
* }
60-
* @phpstan-type XdebugCodeCoverageWithoutPathCoverageType = array<string, XdebugLinesCoverageType>
61-
* @phpstan-type XdebugCodeCoverageWithPathCoverageType = array<string, XdebugPathAndBranchesCoverageType>
60+
* @phpstan-type XdebugCodeCoverageWithoutPathCoverageType array<string, XdebugLinesCoverageType>
61+
* @phpstan-type XdebugCodeCoverageWithPathCoverageType array<string, XdebugPathAndBranchesCoverageType>
6262
*/
6363
final class XdebugDriver extends Driver
6464
{

src/Node/File.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
* @phpstan-import-type LinesType from FileAnalyser
2626
*
27-
* @phpstan-type ProcessedFunctionType = array{
27+
* @phpstan-type ProcessedFunctionType array{
2828
* functionName: string,
2929
* namespace: string,
3030
* signature: string,
@@ -41,7 +41,7 @@
4141
* crap: int|string,
4242
* link: string
4343
* }
44-
* @phpstan-type ProcessedMethodType = array{
44+
* @phpstan-type ProcessedMethodType array{
4545
* methodName: string,
4646
* visibility: string,
4747
* signature: string,
@@ -58,7 +58,7 @@
5858
* crap: int|string,
5959
* link: string
6060
* }
61-
* @phpstan-type ProcessedClassType = array{
61+
* @phpstan-type ProcessedClassType array{
6262
* className: string,
6363
* namespace: string,
6464
* methods: array<string, ProcessedMethodType>,
@@ -74,7 +74,7 @@
7474
* crap: int|string,
7575
* link: string
7676
* }
77-
* @phpstan-type ProcessedTraitType = array{
77+
* @phpstan-type ProcessedTraitType array{
7878
* traitName: string,
7979
* namespace: string,
8080
* methods: array<string, ProcessedMethodType>,

src/StaticAnalysis/FileAnalyser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/**
1313
* @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage
1414
*
15-
* @phpstan-type LinesType = array<int, int>
15+
* @phpstan-type LinesType array<int, int>
1616
*/
1717
interface FileAnalyser
1818
{

src/Target/Mapper.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
use function sort;
1515

1616
/**
17-
* @phpstan-type TargetMap = array{namespaces: TargetMapPart, classes: TargetMapPart, classesThatExtendClass: TargetMapPart, classesThatImplementInterface: TargetMapPart, traits: TargetMapPart, methods: TargetMapPart, functions: TargetMapPart, reverseLookup: ReverseLookup}
18-
* @phpstan-type TargetMapPart = array<non-empty-string, array<non-empty-string, list<positive-int>>>
19-
* @phpstan-type ReverseLookup = array<non-empty-string, non-empty-string>
17+
* @phpstan-type TargetMap array{namespaces: TargetMapPart, classes: TargetMapPart, classesThatExtendClass: TargetMapPart, classesThatImplementInterface: TargetMapPart, traits: TargetMapPart, methods: TargetMapPart, functions: TargetMapPart, reverseLookup: ReverseLookup}
18+
* @phpstan-type TargetMapPart array<non-empty-string, array<non-empty-string, list<positive-int>>>
19+
* @phpstan-type ReverseLookup array<non-empty-string, non-empty-string>
2020
*
2121
* @immutable
2222
*

0 commit comments

Comments
 (0)