contao/easy-coding-standard

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?

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.

Do @codingStandardsIgnoreStart and @codingStandardsIgnoreEnd work?

No, unfortunately not.