The base is PSR-12 from https://www.php-fig.org/psr/psr-12/
Here is some aditions that are allowed, but not enforced by PSR-12:
- PSR-12 says:
- Blank lines MAY be added to improve readability and to indicate related blocks of code except where explicitly forbidden.
- I add:
- There MUST NOT be more then one consecutive blank line.
- PSR-12 says:
- Compound namespaces with a depth of more than two MUST NOT be used.
- I add:
- Compound namespaces MUST NOT be used.
- PSR-12 says:
- Boolean operators between conditions MUST always be at the beginning or at the end of the line, not a mix of both.
- I add:
- Boolean operators between conditions MUST always be at the end of the line.
- PSR-12 says:
- nothing about the ! operator
- I add:
- The ! Operator MUST NOT have any space between the operator and operand.