Skip to content

Commit b88cb8b

Browse files
authored
[BUGFIX] Use @phpstan-ignore not @phpstan-ignore-next-line (#1591)
`@phpstan-ignore` has the parameter which is the specific warning to ignore. `@phpstan-ignore-next-line` does not, and will result in suppression of all warnings for the next line. `@phpstan-ignore` also only applies to the next line (or whatever is relevent in context).
1 parent f3635b0 commit b88cb8b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/Unit/Parsing/UnexpectedEOFExceptionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function messageForInvalidMatchTypeRefersToTokenNotFound(): void
8585
$expected = 'tea';
8686
$found = 'coffee';
8787

88-
// @phpstan-ignore-next-line argument.type We're explicitly testing with an invalid value here.
88+
// @phpstan-ignore argument.type (We're explicitly testing with an invalid value here.)
8989
$exception = new UnexpectedEOFException($expected, $found, 'coding');
9090

9191
$expectedMessage = 'Token “' . $expected . '” (coding) not found. Got “' . $found . '”.';

tests/Unit/Parsing/UnexpectedTokenExceptionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function messageForInvalidMatchTypeRefersToTokenNotFound(): void
8585
$expected = 'tea';
8686
$found = 'coffee';
8787

88-
// @phpstan-ignore-next-line argument.type We're explicitly testing with an invalid value here.
88+
// @phpstan-ignore argument.type (We're explicitly testing with an invalid value here.)
8989
$exception = new UnexpectedTokenException($expected, $found, 'coding');
9090

9191
$expectedMessage = 'Token “' . $expected . '” (coding) not found. Got “' . $found . '”.';

0 commit comments

Comments
 (0)