Skip to content

Commit

Permalink
Readme: minor improvements (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
janedbal committed Aug 14, 2024
1 parent 6d9548d commit e8b0b92
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ShipMonk PHPStan rules
# ShipMonk PHPStan strict rules
About **40 super-strict rules** we found useful in ShipMonk.
We tend to have PHPStan set up [as strict as possible](#native-phpstan-extra-strictness), but that still was not strict enough for us.
This set of rules should fill the missing gaps we found.
Expand All @@ -13,6 +13,7 @@ composer require --dev shipmonk/phpstan-rules

Use [official extension-installer](https://phpstan.org/user-guide/extension-library#installing-extensions) or enable all rules manually by:
```neon
# phpstan.neon
includes:
- vendor/shipmonk/phpstan-rules/rules.neon
```
Expand All @@ -39,8 +40,6 @@ parameters:
enabled: true
```

Few rules are enabled, but do nothing unless configured, those are marked with `*`.

When you try to configure any default array, PHPStan config is **merged by default**,
so if you want to enforce only your values and not to include our defaults, use [exclamation mark](https://doc.nette.org/en/dependency-injection/configuration#toc-merging):

Expand All @@ -52,6 +51,8 @@ parameters:
blacklist!: ['(unset)'] # force the blacklist to be only (unset)
```

Few rules are enabled, but do nothing unless configured, those are marked with `*`.

## Rules:

### allowComparingOnlyComparableTypes
Expand Down

0 comments on commit e8b0b92

Please sign in to comment.