Top "Codesniffer" questions

This tag is for questions having to do with the PHP_CodeSniffer PEAR package from Squiz Labs, which is used for static analysis of PHP code.

PHPCS not running on the command line?

When I type in phpcs --version, instead of getting the version number, I get something like this: /Applications/drupal/php/…

php codesniffer
How to Ignore Line Length PHP_CodeSniffer

I have been using PHP_CodeSniffer with jenkins, my build.xml was configured for phpcs as below <target name="…

php jenkins continuous-integration pear codesniffer
Ignore code snippets in PHP_CodeSniffer

It is possible to ignore some parts of code from a php file when it's analyzed by PHP_CodeSniffer?

php codesniffer
Missing file doc comment?

I used drupal coder module to check my code and always get missing file doc as an error. I used …

drupal codesniffer
Add an empty line at end of file according to PSR-2 on PhpStorm

I use PSR-2 for code styling my code. When I inspect a file using Codesniffer most of the times I …

php phpstorm codesniffer phpcodesniffer psr-2
PHP CodeSniffer include_once error

I'm trying to install PHP CodeSniffer on OS X Mountain Lion - and I appear to be getting a strange …

php macos codesniffer
Opening parenthesis of a multi-line function call must be the last content on the line

I Write this code in my PHP file : public function ScriptsStyles() { wp_enqueue_style( 'fontawesome', plugins_url("/css/font-awesome.css", __…

php codesniffer psr-3
How to use CodeSniffer in Netbeans 8.1

I have installed Netbeans 8.1 and Xampp for Windows with PHP 5.6. Netbeans 8.1 has the CodeSniffer installed by default. Xampp too (pear). …

php netbeans codesniffer phpcodesniffer netbeans-8.1
How to call a custom ruleset.xml for php code sniffer

I'm trying to write an custom ruleset.xml for php code sniffer but calling it from the commandline without putting …

php codesniffer phpundercontrol
phpcs - class must be in a namespace of at least one level - how to fix?

I am using laravel 4.2. Lets say there is such class: class BShopsController extends ShopsController To fix this, I try to …

php laravel-4 namespaces codesniffer laravel-4.2