Repository navigation
Commit 41a4f4f
committed
Code Quality: Improve typing for
Both the parameters and the return value have been documented as a bare `array` since the function entered trunk in r5234. They now describe the string-keyed arrays it is used with, and the signature gains a native `array` return type. Every caller treats those keys as strings, but the function cannot guarantee it, since `get_object_vars()` reports a numeric-string property under an integer key and `parse_str()` reads `0=a` as one, so the `@phpstan-return` records what can actually come back.
Developed in WordPress#13430.
Follow-up to r5234, r47429.
See #65817, #65860.
git-svn-id: https://develop.svn.wordpress.org/trunk@63522 602fd350-edb4-49c9-b593-d223f7449a82wp_parse_args().1 parent 4035d38 commit 41a4f4f
2 files changed
Lines changed: 18 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5021 | 5021 | | |
5022 | 5022 | | |
5023 | 5023 | | |
| 5024 | + | |
| 5025 | + | |
| 5026 | + | |
| 5027 | + | |
| 5028 | + | |
| 5029 | + | |
5024 | 5030 | | |
5025 | 5031 | | |
5026 | 5032 | | |
5027 | | - | |
5028 | | - | |
5029 | | - | |
5030 | | - | |
| 5033 | + | |
| 5034 | + | |
| 5035 | + | |
| 5036 | + | |
| 5037 | + | |
5031 | 5038 | | |
5032 | | - | |
| 5039 | + | |
5033 | 5040 | | |
5034 | 5041 | | |
5035 | 5042 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1129 | 1129 | | |
1130 | 1130 | | |
1131 | 1131 | | |
1132 | | - | |
| 1132 | + | |
1133 | 1133 | | |
1134 | 1134 | | |
1135 | 1135 | | |
| |||
1248 | 1248 | | |
1249 | 1249 | | |
1250 | 1250 | | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
1251 | 1256 | | |
1252 | 1257 | | |
1253 | 1258 | | |
| |||
0 commit comments