tzachi / coding-standard
Coding Standard for TZachi's projects
Package info
github.com/TimoZachi/coding-standard
Type:phpcodesniffer-standard
pkg:composer/tzachi/coding-standard
0.1.1
2019-04-21 10:12 UTC
Requires
- php: ^7.1
- doctrine/coding-standard: ^6.0
Requires (Dev)
- roave/security-advisories: dev-master
This package is auto-updated.
Last update: 2026-03-25 10:28:53 UTC
README
This project has a set of PHP_CodeSniffer rules that are based on doctrine/coding-standard rules, but with some small changes and additions.
Differences from doctrine coding-standards
- Inline comments should begin with a space, for example:
// This is an inline comment - Docblock annotation groups are grouped a bit different
- Empty catch in try...catch must have a comment explaining why the exception is not handled
- There shouldn't be a space after the negation operator
if (!$cond) - No space before colon in return type:
public function test(): void - Property doc comments shouldn't be a single line, but multiline instead:
/** * @var int */
- Variable/property/function names should be camelCased:
$camelCaseVariable - A @throw tag comment doesn't need to end in full stop:
class Abc { /** * @throw InvalidArgumentException This is a comment that doesn't end in a full stop */ public function def(): void { ... }