This repository was archived by the owner on Nov 21, 2019. It is now read-only.
Releases: libero/php-coding-standard
Releases · libero/php-coding-standard
v0.5.0
- Arrays must be created before being used. (#48)
- Late-static binding must not be used for constants and in final classes. (#49)
- Closures must be declared as static when not referencing
$this. (#51) - Improve use of ternary expressions. (#50)
- Shorthand types must be used. (#52)
- Trailing comma is required in multi-line arrays. (#53)
- Final methods must not be used in final classes. (#54)
- Semicolons must not be used unnecessarily. (#55)
v0.4.0
- PHP files must only contain PHP. (#24)
- Functions, methods and closures must not have unnecessary whitespace. (#30)
- Parentheses must not be used unnecessarily. (#39)
- Comments must be meaningful and aligned. (#35)
- No spacing after spread/splat operator. (#45)
Traitsuffix must not be used. (#44)- Generic types must be used (eg
array<string>notstring[]). (#43) - Statements must not be empty, except catch blocks. (#34)
- Comment annotations must be grouped. (#46)
- Inline doc comments must be valid. (#47)
v0.3.1
v0.3.0
- Nullable types must be used. (#19)
- Strict comparisons must be used. (#20)
- Backticks must not be used. (#21)
- Functions must not be nested. (#23)
- Shorthand cast operators must be used. (#27)
- Single space after type casting and none inside. (#27)
- Short arrays/list must be used. (#28)
- Combined assignment operators must be used. (#22)
- Use single-quoted strings where possible. (#31)
v0.2.1
v0.2.0
usestatements must be actually used. (#5)usestatements must be ordered alphabetically. (#6)- The
strict_typesdirective must be used. (#8) - Class and interface constants must have visibility declared. (#10)
- The
nullcoalesce operator must be used when possible. (#15) - Primitive types must be in lower case. (#13)
Abstractprefixes, andExceptionandInterfacesuffixes must not be used. (#11)- Multi-line method chaining is allowed. (#7)
usestatements must be used everywhere. (#14)