Commit f327dc3
committed
AbstractArrayDeclarationSniff: improve the property reset
Unsetting a property leaves a property in a different PHP internal state then (re)setting it to an empty value.
Most notably, an unset property triggers the magic `__set()`/`__get()` etc methods if available, and while this abstract doesn't declare those methods, a sniff implementing the abstract _may_.
This change maintains the target behaviour (resetting the property values to save memory), while preventing side-effects from using `unset()` on these properties.1 parent bb9d361 commit f327dc3
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
| 208 | + | |
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
| |||
0 commit comments