I'm working on a WordPress project using PHPStorm. To beautify my code I downloaded the following CodeSniffer rules for WP and put them in my build directory in my project folder: https://github.com/mrchrisadams/WordPress-Coding-Standards
Now When I set PHPStorm to use the ruleset.xml, I get the following error:
PHP Code Sniffer
phpcs: PHP Fatal error: Cannot redeclare class WordPress_Sniffs_Strings_DoubleQuoteUsageSniff in /var/www/projectname/build/CodeSniffer/Sniffs/Strings/DoubleQuoteUsageSniff.php on line 31
PHP Stack trace:
PHP 1. {main}() /usr/bin/phpcs:0
PHP 2. PHP_CodeSniffer_CLI->process() /usr/bin/phpcs:37
PHP 3. PHP_CodeSniffer->process() /usr/share/php/PHP/CodeSniffer/CLI.php:561
PHP 4. PHP_CodeSniffer->populateTokenListeners() /usr/share/phpPHP/CodeSniffer.php:458
PHP 5. PHP_CodeSniffer::autoload() /usr/share/php/PHP/CodeSniffer.php:0
I also work on another project (not at the same time) based on Drupal having its own ruleset.xml - it works without any problems.
Does anyone know that kind of issue?