Commit b7c3778
committed
PHP 8.2 | Generic/LowerCaseType: allow for stand-alone true/false/null
As of PHP 8.2, `true`, `false` and `null` will be allowed as stand-alone types.
The `true` and the `false` types are allowed to be nullable, the `null` type is not (but that's not the concern of the sniff).
Also see: https://3v4l.org/ZpfID
This commit adjusts the sniff to take `true` into account. `false` and `null` were already handled due to these previously already being allowed in union types.
Includes unit tests.
Refs:
* https://wiki.php.net/rfc/null-false-standalone-types
* https://wiki.php.net/rfc/true-type1 parent e038e40 commit b7c3778
File tree
4 files changed
+6
-0
lines changed- src/Standards/Generic
- Sniffs/PHP
- Tests/PHP
4 files changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
0 commit comments