Skip to content

PHPStan Rule Level 5 error in src/Data/ProcessedCodeCoverageData.php #1049

@sebastianbergmann

Description

@sebastianbergmann

The "only" errors left (after reapplying 60fe3d7 which was reverted in 48b98da) before we can go to PHPStan Rule Level 5 for #1039 are these:

 ------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   src/Data/ProcessedCodeCoverageData.php                                                                                                                                                                                                                                                                                                                                           
 ------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  195    Parameter #3 $functionData of method SebastianBergmann\CodeCoverage\Data\ProcessedCodeCoverageData::initPreviouslySeenFunction() expects array{branches: array<int, array{op_start: int, op_end: int, line_start: int, line_end: int, hit: int, out: array<int, int>, out_hit: array<int, int>}>, paths: array<int, array{path: array<int, int>, hit: int}>}, array{branches:    
         array<int, array{op_start: int, op_end: int, line_start: int, line_end: int, hit: list<string>, out: array<int, int>, out_hit: array<int, int>}>, paths: array<int, array{path: array<int, int>, hit: list<string>}>, hit: list<string>} given.                                                                                                                                  
         🪪  argument.type                                                                                                                                                                                                                                                                                                                                                                
         💡 Offset 'branches' (array<int, array{op_start: int, op_end: int, line_start: int, line_end: int, hit: int, out: array<int, int>, out_hit: array<int, int>}>) does not accept type array<int, array{op_start: int, op_end: int, line_start: int, line_end: int, hit: list<string>, out: array<int, int>, out_hit: array<int, int>}>: Offset 'hit' (int) does not accept type    
            list<string>.                                                                                                                                                                                                                                                                                                                                                                 
  197    Parameter #3 $functionData of method SebastianBergmann\CodeCoverage\Data\ProcessedCodeCoverageData::initPreviouslyUnseenFunction() expects array{branches: array<int, array{op_start: int, op_end: int, line_start: int, line_end: int, hit: int, out: array<int, int>, out_hit: array<int, int>}>, paths: array<int, array{path: array<int, int>, hit: int}>}, array{branches:  
         array<int, array{op_start: int, op_end: int, line_start: int, line_end: int, hit: list<string>, out: array<int, int>, out_hit: array<int, int>}>, paths: array<int, array{path: array<int, int>, hit: list<string>}>, hit: list<string>} given.                                                                                                                                  
         🪪  argument.type                                                                                                                                                                                                                                                                                                                                                                
         💡 Offset 'branches' (array<int, array{op_start: int, op_end: int, line_start: int, line_end: int, hit: int, out: array<int, int>, out_hit: array<int, int>}>) does not accept type array<int, array{op_start: int, op_end: int, line_start: int, line_end: int, hit: list<string>, out: array<int, int>, out_hit: array<int, int>}>: Offset 'hit' (int) does not accept type    
            list<string>.                                                                                                                                                                                                                                                                                                                                                                 
 ------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 

However, I cannot seem to see the forest for the trees at the moment. May I bother you, @staabm, to have a look? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions