how to 'ignore a single line with a unused variable'
Closed this issue · 4 comments
cmette commented
We want to suppress the error message 'unused variable' for a single line. We do not want to configure this globally. How can we achieve this?
MDevster commented
The following function from the documentation is to be used: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-parts-of-a-file
Unfortunately // phpcs:disable
, // phpcs:enable
or // phpcs:ignore
is currently not supported.
leofeyer commented
Do @codingStandardsIgnoreStart
and @codingStandardsIgnoreEnd
work?
MDevster commented
No, unfortunately not.
leofeyer commented