Skip to content

Commit

Permalink
Fix phpstan-type declarations
Browse files Browse the repository at this point in the history
the syntax does not have a `=`
  • Loading branch information
clxmstaab authored and staabm committed Dec 9, 2024
1 parent 48b98da commit fc41dd1
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/CodeCoverage.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
/**
* Provides collection functionality for PHP code coverage information.
*
* @phpstan-type TestType = array{
* @phpstan-type TestType array{
* size: string,
* status: string,
* }
Expand Down
2 changes: 1 addition & 1 deletion src/Data/ProcessedCodeCoverageData.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
* @phpstan-import-type XdebugFunctionCoverageType from XdebugDriver
*
* @phpstan-type TestIdType = string
* @phpstan-type TestIdType string
*/
final class ProcessedCodeCoverageData
{
Expand Down
16 changes: 8 additions & 8 deletions src/Driver/XdebugDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
*
* @see https://xdebug.org/docs/code_coverage#xdebug_get_code_coverage
*
* @phpstan-type XdebugLinesCoverageType = array<int, int>
* @phpstan-type XdebugBranchCoverageType = array{
* @phpstan-type XdebugLinesCoverageType array<int, int>
* @phpstan-type XdebugBranchCoverageType array{
* op_start: int,
* op_end: int,
* line_start: int,
Expand All @@ -44,21 +44,21 @@
* out: array<int, int>,
* out_hit: array<int, int>,
* }
* @phpstan-type XdebugPathCoverageType = array{
* @phpstan-type XdebugPathCoverageType array{
* path: array<int, int>,
* hit: int,
* }
* @phpstan-type XdebugFunctionCoverageType = array{
* @phpstan-type XdebugFunctionCoverageType array{
* branches: array<int, XdebugBranchCoverageType>,
* paths: array<int, XdebugPathCoverageType>,
* }
* @phpstan-type XdebugFunctionsCoverageType = array<string, XdebugFunctionCoverageType>
* @phpstan-type XdebugPathAndBranchesCoverageType = array{
* @phpstan-type XdebugFunctionsCoverageType array<string, XdebugFunctionCoverageType>
* @phpstan-type XdebugPathAndBranchesCoverageType array{
* lines: XdebugLinesCoverageType,
* functions: XdebugFunctionsCoverageType,
* }
* @phpstan-type XdebugCodeCoverageWithoutPathCoverageType = array<string, XdebugLinesCoverageType>
* @phpstan-type XdebugCodeCoverageWithPathCoverageType = array<string, XdebugPathAndBranchesCoverageType>
* @phpstan-type XdebugCodeCoverageWithoutPathCoverageType array<string, XdebugLinesCoverageType>
* @phpstan-type XdebugCodeCoverageWithPathCoverageType array<string, XdebugPathAndBranchesCoverageType>
*/
final class XdebugDriver extends Driver
{
Expand Down
8 changes: 4 additions & 4 deletions src/Node/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
* @phpstan-import-type LinesType from FileAnalyser
*
* @phpstan-type ProcessedFunctionType = array{
* @phpstan-type ProcessedFunctionType array{
* functionName: string,
* namespace: string,
* signature: string,
Expand All @@ -41,7 +41,7 @@
* crap: int|string,
* link: string
* }
* @phpstan-type ProcessedMethodType = array{
* @phpstan-type ProcessedMethodType array{
* methodName: string,
* visibility: string,
* signature: string,
Expand All @@ -58,7 +58,7 @@
* crap: int|string,
* link: string
* }
* @phpstan-type ProcessedClassType = array{
* @phpstan-type ProcessedClassType array{
* className: string,
* namespace: string,
* methods: array<string, ProcessedMethodType>,
Expand All @@ -74,7 +74,7 @@
* crap: int|string,
* link: string
* }
* @phpstan-type ProcessedTraitType = array{
* @phpstan-type ProcessedTraitType array{
* traitName: string,
* namespace: string,
* methods: array<string, ProcessedMethodType>,
Expand Down
2 changes: 1 addition & 1 deletion src/StaticAnalysis/FileAnalyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage
*
* @phpstan-type LinesType = array<int, int>
* @phpstan-type LinesType array<int, int>
*/
interface FileAnalyser
{
Expand Down
6 changes: 3 additions & 3 deletions src/Target/Mapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
use function sort;

/**
* @phpstan-type TargetMap = array{namespaces: TargetMapPart, classes: TargetMapPart, classesThatExtendClass: TargetMapPart, classesThatImplementInterface: TargetMapPart, traits: TargetMapPart, methods: TargetMapPart, functions: TargetMapPart, reverseLookup: ReverseLookup}
* @phpstan-type TargetMapPart = array<non-empty-string, array<non-empty-string, list<positive-int>>>
* @phpstan-type ReverseLookup = array<non-empty-string, non-empty-string>
* @phpstan-type TargetMap array{namespaces: TargetMapPart, classes: TargetMapPart, classesThatExtendClass: TargetMapPart, classesThatImplementInterface: TargetMapPart, traits: TargetMapPart, methods: TargetMapPart, functions: TargetMapPart, reverseLookup: ReverseLookup}
* @phpstan-type TargetMapPart array<non-empty-string, array<non-empty-string, list<positive-int>>>
* @phpstan-type ReverseLookup array<non-empty-string, non-empty-string>
*
* @immutable
*
Expand Down

0 comments on commit fc41dd1

Please sign in to comment.