PHP_CodeSniffer

Software Screenshot:
PHP_CodeSniffer
Software Details:
Version: 2.3.3 updated
Upload Date: 20 Jul 15
Developer: Squiz Pty Ltd
Distribution Type: Freeware
Downloads: 30

Rating: 1.0/5 (Total Votes: 1)

PHP_CodeSniffer is available as a PEAR package.

Under the hood, it works by tokenising PHP, JavaScript and CSS files and checking it against a defined set of coding standards.

PHP_CodeSniffer is one of the best test tools during development because it allows programmers to keep their app's source code clean and standards consistent.

What is new in this release:

  • Generic OpeningFunctionBraceKernighanRitchieSniff can now fix all the errors it finds.
  • Generic OpeningFunctionBraceKernighanRitchieSniff now allows empty functions with braces next to each other.
  • Generic OpeningFunctionBraceBsdAllmanSniff now allows empty functions with braces next to each other.
  • Improved auto report width for the "full" report.
  • Improved conflict detection during auto fixing.
  • Generic ScopeIndentSniff is no longer confused by empty closures.
  • Squiz ControlSignatureSniff now always ignores comments.
  • The existence of the main config file is now cached to reduce is_file() calls when it doesn't exist.
  • Abstract classes inside the Sniffs directory are now ignored even if they are named.
  • Generic ForbiddenFunctionsSniff now supports setting null replacements in ruleset files.
  • PEAR MultiLineConditionSniff now allows comment lines inside multi-line IF statement conditions.
  • PEAR and Squiz FileComment sniffs no longer have @ in their error codes.
  • Generic opening function brace sniffs now support checking of closures.

What is new in version 2.3.2:

  • Generic OpeningFunctionBraceKernighanRitchieSniff can now fix all the errors it finds.
  • Generic OpeningFunctionBraceKernighanRitchieSniff now allows empty functions with braces next to each other.
  • Generic OpeningFunctionBraceBsdAllmanSniff now allows empty functions with braces next to each other.
  • Improved auto report width for the "full" report.
  • Improved conflict detection during auto fixing.
  • Generic ScopeIndentSniff is no longer confused by empty closures.
  • Squiz ControlSignatureSniff now always ignores comments.
  • The existence of the main config file is now cached to reduce is_file() calls when it doesn't exist.
  • Abstract classes inside the Sniffs directory are now ignored even if they are named.
  • Generic ForbiddenFunctionsSniff now supports setting null replacements in ruleset files.
  • PEAR MultiLineConditionSniff now allows comment lines inside multi-line IF statement conditions.
  • PEAR and Squiz FileComment sniffs no longer have @ in their error codes.
  • Generic opening function brace sniffs now support checking of closures.

What is new in version 2.3.0:

  • Generic OpeningFunctionBraceKernighanRitchieSniff can now fix all the errors it finds.
  • Generic OpeningFunctionBraceKernighanRitchieSniff now allows empty functions with braces next to each other.
  • Generic OpeningFunctionBraceBsdAllmanSniff now allows empty functions with braces next to each other.
  • Improved auto report width for the "full" report.
  • Improved conflict detection during auto fixing.
  • Generic ScopeIndentSniff is no longer confused by empty closures.
  • Squiz ControlSignatureSniff now always ignores comments.
  • The existence of the main config file is now cached to reduce is_file() calls when it doesn't exist.
  • Abstract classes inside the Sniffs directory are now ignored even if they are named.
  • Generic ForbiddenFunctionsSniff now supports setting null replacements in ruleset files.
  • PEAR MultiLineConditionSniff now allows comment lines inside multi-line IF statement conditions.
  • PEAR and Squiz FileComment sniffs no longer have @ in their error codes.
  • Generic opening function brace sniffs now support checking of closures.

What is new in version 2.2.0:

  • PHPCS Config File
  • Coloured Report Output
  • Auto-Sizing Reports
  • PSR2 Tab Width

What is new in version 2.1.0:

  • Time and memory output is now shown if progress information is also shown
  • Generic EmptyStatementSniff error codes now contain the type of empty statement detected
  • A tilde can now be used to reference a user's home directory in a path to a standard
  • Added PHP_CodeSniffer_File::findStartOfStatement() to find the first non-whitespace token in a statement
  • PEAR and Squiz FunctionCommentSniffs no longer ban @return tags for constructors and destructors
  • Squiz ControlSignatureSniff fixes now retain comments between the closing parenthesis and open brace
  • Squiz SuperfluousWhitespaceSniff now checks for extra blank lines inside closures
  • Squiz ArrayDeclarationSniff now skips function calls while checking multi-line arrays

What is new in version 2.0.0:

  • A completely rewritten comment parser that is design to allow for auto-fixing
  • A new information report to show you how your code is written rather than if it conforms to a standard
  • The ability to set command line arguments in ruleset.xml files
  • The ability to create your own custom reporting classes and use them with PHP_CodeSniffer
  • Distribution of PHPCS and PHPCBF as PHAR files
  • Support for running on HHVM
  • Detection of minified CSS and JS files

What is new in version 2.0.0 Alpha 2:

  • Line length warnings will now be shown for lines that refer to licence and VCS information. The line length sniff previously ignored these lines, which meant that it had to run a regular expression on every line it checked.
  • The $tokens array has a new length index that you can use to determine the length of the token's content rather than having to call strlen() yourself and deal with character encoding.
  • The use of in_array() when checking the PHP_CodeSniffer_Tokens static vars impacted performance significantly, so they have been restructured so that you can also use isset() on them.
  • Custom reports can now specify a $recordErrors member var that, when set to FALSE, will tell PHP_CodeSniffer that it doesn't need to record errors during the run. This gives a significant memory saving if you are using a custom report to output summary information rather than a full list of errors found.

What is new in version 1.5.0:

  • Generic ScopeIndentSniff now allows for ignored tokens to be set via ruleset.xml files
  • Doc generation is now working again for installed standards
  • PSR2 standard now ignores comments when checking indentation rules
  • Generic UpperCaseConstantNameSniff no longer reports errors where constants are used
  • Squiz OperatorSpacingSniff no longer throws errors for the ?: short ternary operator

What is new in version 1.4.6:

  • Clearer error message for when the sniff class name does not match the directory structure
  • Generated HTML docs now correctly show the open PHP tag in code comparison blocks
  • Added Generic InlineHTMLSniff to ensure a file only contains PHP code
  • Added Squiz ShorthandSizeSniff to check that CSS sizes are using shorthand notation only when 1 or 2 values are used
  • Added Squiz ForbiddenStylesSniff to ban the use of some deprecated browser-specific styles
  • Added Squiz NamedColoursSniff to ban the use of colour names
  • PSR2 standard no longer enforces no whitespace between the closing parenthesis of a function call and the semicolon
  • PSR2 ClassDeclarationSniff now ignores empty classes when checking the end brace position
  • PSR2 SwitchDeclarationSniff no longer reports errors for empty lines between CASE statements
  • PEAR ObjectOperatorIndentSniff now has a setting to specify how many spaces code should be indented

What is new in version 1.4.4:

  • Runs CSS Lint on CSS files.

What is new in version 1.4.3:

  • This is primarily a bug fix release.
  • Added support for the upcoming PHP 5.5 T_FINALLY token.

What is new in version 1.3.0 RC2:

  • Support for multiple output renderers.
  • The ability to show progress neatly during a run.
  • The ability to set php.ini values from the command line.
  • Rule-based exclude patterns.
  • Google ClosureLinter support.
  • 16 bug fixes.

Requirements:

  • PHP 5.1.2 or higher

Similar Software

Mockito
Mockito

5 Jun 15

MockBox
MockBox

13 Apr 15

whoops
whoops

1 Oct 15

Jest
Jest

6 Mar 16

Other Software of Developer Squiz Pty Ltd

HTML_CodeSniffer
HTML_CodeSniffer

12 May 15

Comments to PHP_CodeSniffer

Comments not found
Add Comment
Turn on images!