Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

50 lines (46 sloc) 2.126 kb
Roadmap (tasks listed in decreasing priority)
* Make error/warning know which rule has caused them
* Add XML output to comply with phpcs for ci integration
* Port "interesting" rules from phpcs
* write a source code highlighter that highlights violations in the source code and attaches the error message as popup
* write output statistics that aggregate how often each rule has been violated (these are the rules you must teach the developers)
* trySeekTokenId -> seekTokenId
Rules to add (in no particular order, just a collection of ideas)
* disallow PHP 4 style constructors (methods inside a class that have the name of the class) (T)
* No inline if (T)
* Correct indentation
* no trailing whitespace (T)
* no elseif (warning?) (T)
* no brackets around return value
* no deprecated PHPDoc tags (@access, ...)
* one blank after comma in argument lists
* test method has @covers tag
* all thrown exceptions are documented in docblocks
* all parameters are documented in docblocks
* there is a @return in every docblock, @return void or @return null
* type hints and docblock parameter types match
* test method must either have at least one assertion or @expects annotation
* disallow variable variables (T)
* disallow ereg + split
* disallow access superglobals rule
* disablow write to superglobals
* no print_r
* call-time references (?)
* FIX: make sure do ... while closing brace is at correct level
* FIX: ${ token opens block level
* disallow multiple comma-separated variable declarations (also for globals)
* disallow $a = $b = $c statements
* class/function/variable names capitalization
* one blank line above docblock comments
* docblock comments for member variables
* check docblock star lines alignment
* empty catch statements
* all comments must be on new line
* disallow T_INLINE_THEN
* disallow trigger_error
* warn when private/protected method is never called?
* disallow interface without methods
* find classes that are aliased in a namespace, but not used
* single = in if comparison
* print rule and printf-family?
* disallow explicit calling of magic methods (except parent::__construct etc.)
Jump to Line
Something went wrong with that request. Please try again.