Commit 09a1cef
Also warn about ?? on $this->prop when property has a default value
For $this->prop access on native-typed properties with a default value,
the property is always initialized so ?? on non-nullable types is useless.
Only skip the warning for $this->prop when the property has no default
value (could be uninitialized).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent bfa4708 commit 09a1cef
2 files changed
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | 185 | | |
194 | 186 | | |
195 | 187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
376 | 380 | | |
377 | 381 | | |
378 | 382 | | |
| |||
0 commit comments