|
4 | 4 | This repository contains the ruleset for the PHP code we develop at [FLYERALARM](https://flyeralarm.com). |
5 | 5 | It mostly consists of PSR-2 with some custom additions. The rules are enforced with the help of squizlabs/PHP_CodeSniffer |
6 | 6 |
|
| 7 | +The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, |
| 8 | +“SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be |
| 9 | +interpreted as described in [RFC 2119](http://www.ietf.org/rfc/rfc2119.txt). |
7 | 10 |
|
8 | 11 | ## Custom Rules in addition to PSR-2 |
9 | 12 |
|
10 | | -* Variable names must be in lowerCamelCase |
11 | | -* Yoda conditions are forbidden |
12 | | -* Unit tests with @expectedException must contain @expectedExceptionMessage annotation |
13 | | -* Return type annotations (@return) must only contain one of scalar type, object (e.g. no "@return string|null") or |
| 13 | +* Variable names MUST be in lowerCamelCase |
| 14 | +* Yoda conditions MUST NOT be used |
| 15 | +* Unit tests with @expectedException MUST contain @expectedExceptionMessage annotation |
| 16 | +* Return type annotations (@return) MUST only contain one of scalar type, object (e.g. no "@return string|null") or |
14 | 17 | an array of one these |
15 | | -* Exceptions messages must not contain exclamation marks or full stops |
16 | | -* Keywords GOTO and EVAL are forbidden |
17 | | -* Underscores in namespaces are forbidden |
18 | | -* Classtype suffixes like Interface, Abstract or Trait are forbidden (e.g. LoggerInterface) |
| 18 | +* Exceptions messages MUST not contain exclamation marks or full stops |
| 19 | +* Keywords GOTO and EVAL MUST NOT be used |
| 20 | +* Underscores in namespaces MUST NOT be used |
| 21 | +* Classtype suffixes like Interface, Abstract or Trait MUST NOT be used (e.g. LoggerInterface) |
19 | 22 |
|
20 | 23 |
|
21 | 24 | ## How-To work within *this* project |
|
0 commit comments