Skip to content

Commit e18b860

Browse files
author
d.wagner
committed
added RFC 2119 information, changed wording
1 parent 98aad80 commit e18b860

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@
44
This repository contains the ruleset for the PHP code we develop at [FLYERALARM](https://flyeralarm.com).
55
It mostly consists of PSR-2 with some custom additions. The rules are enforced with the help of squizlabs/PHP_CodeSniffer
66

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).
710

811
## Custom Rules in addition to PSR-2
912

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
1417
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)
1922

2023

2124
## How-To work within *this* project

0 commit comments

Comments
 (0)