Php_codesniffer: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"

Created on 10 Jul 2018  路  6Comments  路  Source: squizlabs/PHP_CodeSniffer

Travis is failing on this issue for below files:

vendor/squizlabs/php_codesniffer/src/Tokenizers/Tokenizer.php:637
vendor/squizlabs/php_codesniffer/src/Files/File.php:1341

Most helpful comment

This has already been fixed via https://github.com/squizlabs/PHP_CodeSniffer/pull/2086. I suggest closing this issue.

All 6 comments

This has already been fixed via https://github.com/squizlabs/PHP_CodeSniffer/pull/2086. I suggest closing this issue.

@jrfnl i guess the version isn't released yet!

@CMalvika Correct, the fix will be included in the upcoming 3.3.1 release.

face the same question too.

@OneCodeMonkey As stated above: upgrade your PHPCS version to 3.3.1 or higher.

You install the Latest PHPCS version (above 3.3.x).

Try the following command

uninstall the PHPCS
sudo apt-get autoremove --purge php-codesniffer

Install the new version of PHPCS
sudo apt install php-pear
sudo apt-get update -y
sudo pear install PHP_CodeSniffer-3.5.4

Was this page helpful?
0 / 5 - 0 ratings