Skip to content

Commit fa0879c

Browse files
Update readme
1 parent 1f818d4 commit fa0879c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
[PHPStan](https://phpstan.org/) focuses on finding bugs in your code. But in PHP there's a lot of leeway in how stuff can be written. This repository contains additional rules that revolve around strictly and strongly typed code with no loose casting for those who want additional safety in extremely defensive programming:
88

99
* Require booleans in `if`, `elseif`, ternary operator, after `!`, and on both sides of `&&` and `||`.
10+
* Require booleans in `while` and `do while` loop conditions.
1011
* Require numeric operands or arrays in `+` and numeric operands in `-`/`*`/`/`/`**`/`%`.
1112
* Require numeric operand in `$var++`, `$var--`, `++$var`and `--$var`.
1213
* These functions contain a `$strict` parameter for better type safety, it must be set to `true`:
@@ -64,6 +65,7 @@ parameters:
6465
strictRules:
6566
disallowedLooseComparison: false
6667
booleansInConditions: false
68+
booleansInLoopConditions: false
6769
uselessCast: false
6870
requireParentConstructorCall: false
6971
disallowedBacktick: false

0 commit comments

Comments
 (0)