Skip to content

Commit 767ef2e

Browse files
Added explanation of custom checks in README
1 parent f9b5024 commit 767ef2e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ This repository contains the ruleset for the PHP code we develop at [FLYERALARM]
55
It mostly consists of PSR-2 with some custom additions. The rules are enforced with the help of squizlabs/PHP_CodeSniffer
66

77

8+
## Custom Rules in addition to PSR-2
9+
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 or object (e.g. no "@return string|null")
14+
* Exceptions messages must not contain exclamation marks or full stops
15+
* Keywords GOTO and EVAL are forbidden
16+
* Underscores in namespaces are forbidden
17+
* Classtype suffixes like Interface, Abstract or Trait are forbidden (e.g. LoggerInterface)
18+
19+
820
## How-To work within *this* project
921
To prepare run command:
1022
```
@@ -60,4 +72,4 @@ make test
6072
7) Confirm dialogs by pressing `ok`
6173

6274

63-
On a side note: [We are searching for talented people to join our various teams of developers in multiple locations](https://karriere.flyeralarm.com/jobs)
75+
On a side note: [We are searching for talented people to join our various teams of developers in multiple locations](https://karriere.flyeralarm.com/jobs)

0 commit comments

Comments
 (0)