Skip to content

Commit 4af1488

Browse files
authored
Update README: Fixed namespace for some rules. (#205)
* Update README: Fixed namespace for some rules. * Added back rule sets.
1 parent 21d0c44 commit 4af1488

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ composer require symplify/phpstan-rules --dev
2626

2727
## Usage
2828

29-
Later, once you have most rules applied, it's best practice to include whole sets:
29+
Configuration should be added to your `phpstan.neon` file.
30+
31+
<br>
32+
33+
Once you have most rules applied, it's best practice to include whole sets:
3034

3135
```yaml
3236
includes:
@@ -202,7 +206,7 @@ Possible __construct() override, this can cause missing dependencies or setup
202206

203207
```yaml
204208
rules:
205-
- Symplify\PHPStanRules\Rules\NoConstructorOverrideRule
209+
- Symplify\PHPStanRules\Rules\Complexity\NoConstructorOverrideRule
206210
```
207211

208212
```php
@@ -409,7 +413,7 @@ Type "%s" is forbidden to be created manually with `new X()`. Use service and co
409413
```yaml
410414
services:
411415
-
412-
class: Symplify\PHPStanRules\Rules\ForbiddenNewArgumentRule
416+
class: Symplify\PHPStanRules\Rules\Complexity\ForbiddenNewArgumentRule
413417
tag: [phpstan.rules.rule]
414418
arguments:
415419
forbiddenTypes:
@@ -1940,8 +1944,8 @@ Instead of entity or document mocking, create object directly to get better type
19401944

19411945
```yaml
19421946
rules:
1943-
- Symplify\PHPStanRules\Rules\PHPUnit\NoEntityMockingRule
1944-
- Symplify\PHPStanRules\Rules\PHPUnit\NoDocumentMockingRule
1947+
- Symplify\PHPStanRules\Rules\Doctrine\NoEntityMockingRule
1948+
- Symplify\PHPStanRules\Rules\Doctrine\NoDocumentMockingRule
19451949
```
19461950

19471951
```php
@@ -2096,5 +2100,4 @@ final class SomeTest extends TestCase
20962100

20972101
<br>
20982102

2099-
21002103
Happy coding!

0 commit comments

Comments
 (0)