Skip to content

Commit 1d77b9c

Browse files
authored
Merge pull request #8 from CZechBoY/patch-1
created configuration file with all rules
2 parents afbc5ba + 386283e commit 1d77b9c

File tree

2 files changed

+24
-22
lines changed

2 files changed

+24
-22
lines changed

README.md

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -50,28 +50,9 @@ Let's add this package:
5050
composer require --dev thecodingmachine/phpstan-strict-rules
5151
```
5252

53-
Now, edit you `phpstan.neon` file and add these rules:
53+
Now, edit your `phpstan.neon` file and add these rules:
5454

5555
```yml
56-
services:
57-
-
58-
class: TheCodingMachine\PHPStan\Rules\Exceptions\ThrowMustBundlePreviousExceptionRule
59-
tags:
60-
- phpstan.rules.rule
61-
-
62-
class: TheCodingMachine\PHPStan\Rules\Exceptions\DoNotThrowExceptionBaseClassRule
63-
tags:
64-
- phpstan.rules.rule
65-
-
66-
class: TheCodingMachine\PHPStan\Rules\Exceptions\EmptyExceptionRule
67-
tags:
68-
- phpstan.rules.rule
69-
-
70-
class: TheCodingMachine\PHPStan\Rules\TypeHints\MissingTypeHintInFunctionRule
71-
tags:
72-
- phpstan.rules.rule
73-
-
74-
class: TheCodingMachine\PHPStan\Rules\TypeHints\MissingTypeHintInMethodRule
75-
tags:
76-
- phpstan.rules.rule
56+
includes:
57+
- vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon
7758
```

phpstan-strict-rules.neon

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
services:
2+
-
3+
class: TheCodingMachine\PHPStan\Rules\Exceptions\ThrowMustBundlePreviousExceptionRule
4+
tags:
5+
- phpstan.rules.rule
6+
-
7+
class: TheCodingMachine\PHPStan\Rules\Exceptions\DoNotThrowExceptionBaseClassRule
8+
tags:
9+
- phpstan.rules.rule
10+
-
11+
class: TheCodingMachine\PHPStan\Rules\Exceptions\EmptyExceptionRule
12+
tags:
13+
- phpstan.rules.rule
14+
-
15+
class: TheCodingMachine\PHPStan\Rules\TypeHints\MissingTypeHintInFunctionRule
16+
tags:
17+
- phpstan.rules.rule
18+
-
19+
class: TheCodingMachine\PHPStan\Rules\TypeHints\MissingTypeHintInMethodRule
20+
tags:
21+
- phpstan.rules.rule

0 commit comments

Comments
 (0)