When you use the phpcs:disable all of the following code will not be checked for phpcs issues, that means for the rest of the file unless you call phpcs:enable the code will not checked for coding standard violations.
I suggest to use phpcs:ignore Sniff_Name if you want to ignore a single line of code and use phpcs:disable Sniff_Name when you want to ignore more line of code but call phpcs:enable after the code you want to ignore.
When you use the
phpcs:disable
all of the following code will not be checked for phpcs issues, that means for the rest of the file unless you callphpcs:enable
the code will not checked for coding standard violations.I suggest to use
phpcs:ignore Sniff_Name
if you want to ignore a single line of code and usephpcs:disable Sniff_Name
when you want to ignore more line of code but callphpcs:enable
after the code you want to ignore.Adding the sniff name allow us to know which kind of violation we want to ignore. See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-parts-of-a-file for more info and examples.