Skip to content

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.

For the authoritative behavior, see PHP_CodeSniffer’s wiki on ignoring code.