You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of phpstan 1.11, we have @phpstan-ignore. Was supporting this annotation out of scope for this project, or is this a missing feature. Thanks in advance!
If it is your intention to implement this project to support @phpstan-ignore, this would be the fastest approach:
publicfunctiongetNodeType(): string
{
return FileNode::class;
}
publicfunctionprocessNode(Node$node, Scope$scope): array
{
/** @var array<int, non-empty-list<string>|null> $linesToIgnore */$linesToIgnore = $node->getAttribute('linesToIgnore');
$errors = [];
// identifiersToIgnore is null in case no specific identifiers are set, and a (non-empty) array in case specific identifiers are setforeach ($linesToIgnoreas$lineToIgnore => $identifiersToIgnore) {
$errors[] = RuleErrorBuilder::message('PHPStan ignored line')
->tip('Just fix the issue instead of ignoring it.')
->nonIgnorable()
->line($lineToIgnore)
->identifier('phpstan.ignore')
->build()
;
}
return$errors;
}
As of phpstan 1.11, we have
@phpstan-ignore
. Was supporting this annotation out of scope for this project, or is this a missing feature. Thanks in advance!p.s. perhaps also wise to follow phpstan/phpstan#11340
The text was updated successfully, but these errors were encountered: