Skip to content

Commit

Permalink
Merge pull request #88 from weirdan/fix-psalm-compatibility
Browse files Browse the repository at this point in the history
Fix psalm compatibility
  • Loading branch information
weirdan committed Sep 18, 2020
2 parents fca9b22 + 54c50d6 commit a5e0ba6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/Hooks/TestCaseHandler.php
Expand Up @@ -572,7 +572,10 @@ private static function queueClassLikeForScanning(
if (method_exists($codebase, 'queueClassLikeForScanning')) {
$codebase->queueClassLikeForScanning($fq_class_name);
} else {
/** @psalm-suppress InvalidScalarArgument */
/**
* @psalm-suppress InvalidScalarArgument
* @psalm-suppress InvalidArgument
*/
$codebase->scanner->queueClassLikeForScanning($fq_class_name, $file_path);
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/Prophecy.feature
Expand Up @@ -89,8 +89,8 @@ Feature: Prophecy
"""
When I run Psalm
Then I see these errors
| Type | Message |
| InvalidScalarArgument | Argument 1 of Prophecy\Argument::that expects callable(mixed...):bool, Closure():string(hello) provided |
| Type | Message |
| InvalidScalarArgument | /Argument 1 of Prophecy\\Argument::that expects callable\(mixed...\):bool, (pure-)?Closure\(\):string\(hello\) provided/ |
And I see no other errors

Scenario: prophesize() provided by ProphecyTrait is generic
Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/TestCase.feature
Expand Up @@ -142,8 +142,8 @@ Feature: TestCase
"""
When I run Psalm
Then I see these errors
| Type | Message |
| MissingConstructor | NS\MyTestCase has an uninitialized variable $this->i, but no constructor |
| Type | Message |
| MissingConstructor | /NS\\MyTestCase has an uninitialized (variable\|property) \$this->i, but no constructor/ |
And I see no other errors

Scenario: Missing data provider is reported
Expand Down

0 comments on commit a5e0ba6

Please sign in to comment.