Commit 6ff4aa5
authored
The variable is either a string or it isn't.
The best practice for when it isn't is for it to be `null` or `unset()`.
Using `false` for when it isn't can lead to type-safety issues.
Reference:
https://vulke.medium.com/when-should-variables-be-null-false-undefined-or-an-empty-string-in-php-4ebd73c7a954
Also use `===` in a comparison in the affected code.
Resolves #975.
Part of #976.
1 parent 77019a4 commit 6ff4aa5
File tree
2 files changed
+4
-11
lines changed- config
- src/RuleSet
2 files changed
+4
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | 333 | | |
340 | 334 | | |
341 | 335 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
| 52 | + | |
54 | 53 | | |
55 | | - | |
56 | | - | |
| 54 | + | |
| 55 | + | |
57 | 56 | | |
58 | 57 | | |
59 | | - | |
| 58 | + | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
| |||
0 commit comments