Platforms
PHP CodeSniffer tags
The PHP CodeSniffer Tags are the annotations PHP_CodeSniffer recognizes to turn its own rules on and off inside a file. Unlike every other group in this section, these tags have nothing to do with types or documentation at all — they are coding-standard directives, telling the sniffer to skip a line, a block, or a whole file when checking style.
They are the tag-based forms that PHP_CodeSniffer used before it moved to its
phpcs: comment directives. Only the tag spellings are parsed here: the
@codingStandardsIgnore* family and @phpcsSuppress.
What this group covers
Section titled “What this group covers”- Scoped suppression — @phpcsSuppress, disabling a named sniff for the element it decorates.
- Region suppression — @codingStandardsIgnoreStart and @codingStandardsIgnoreEnd bracket a block the sniffer should skip, while @codingStandardsIgnoreLine skips a single line and @codingStandardsIgnoreFile exempts the entire file.
- General marker — @codingStandards, the bare root of that family.
For the authoritative behavior, see PHP_CodeSniffer’s wiki on ignoring code.