Coding Guidelines
PHP
- PSR-1
- PSR-2
- Entities must implement the Fluent Interface
- Use Yoda conditions
- Do not use
is_null($vars)
but test the actual valuenull === $vars
- Do not use
!
for the NOT expression in conditional expressions but usefalse
instead:
// Wrong
if (!$expr) {
...
}
// Good
if (false === $expr) {
...
}
-
Symfony conventions
-
Annotations
- Vocabulary: check lexicon