Skip to content

Tag reference

@phpstan-ignore-next-line

The @phpstan-ignore-next-line tag silences any error reported on the next line, defined by PHPStan. It behaves like @phpstan-ignore-line, aimed one line ahead.

Grammar

"@phpstan-ignore-next-line" [ <Description> ]

Examples

Silencing every error on the next line.
/** @phpstan-ignore-next-line */
$value = $legacy->call();

Names by platform

phpstan
@phpstan-ignore-next-line

Parsing a phpstan-ignore-next-line tag produces a PhpStanIgnoreNextLineTag instance. Being a pure marker, it adds nothing beyond the $name and optional $description every Tag already carries.

final class PhpStanIgnoreNextLineTag extends FlagTag {}

Documented by PHPStan.