Commit 54e1b4b
Coding Standards: Use pre-increment/decrement for stand-alone statements.
Note: This is enforced by WPCS 3.0.0:
1. There should be no space between an increment/decrement operator and the variable it applies to.
2. Pre-increment/decrement should be favoured over post-increment/decrement for stand-alone statements. “Pre” will in/decrement and then return, “post” will return and then in/decrement. Using the “pre” version is slightly more performant and can prevent future bugs when code gets moved around.
References:
* [https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#increment-decrement-operators WordPress PHP Coding Standards: Increment/decrement operators]
* [WordPress/WordPress-Coding-Standards#2130 WPCS: PR #2130 Core: add sniffs to check formatting of increment/decrement operators]
Props jrf.
See #59161, #58831.
git-svn-id: https://develop.svn.wordpress.org/trunk@56549 602fd350-edb4-49c9-b593-d223f7449a821 parent 1118e37 commit 54e1b4b
File tree
95 files changed
+212
-212
lines changed- src
- wp-admin
- includes
- network
- wp-content/themes
- twentyeleven
- twentyseventeen/inc
- twentyten
- twentytwelve
- twentytwentyone/inc
- twentytwenty
- wp-includes
- html-api
- pomo
- widgets
- tests/phpunit
- includes
- factory
- tests
- blocks
- comment
- date
- feed
- import
- multisite
- oembed
- pluggable
- pomo
- post
- rest-api
- term
- theme
- widgets
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
95 files changed
+212
-212
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2149 | 2149 | | |
2150 | 2150 | | |
2151 | 2151 | | |
2152 | | - | |
| 2152 | + | |
2153 | 2153 | | |
2154 | 2154 | | |
2155 | 2155 | | |
| |||
2211 | 2211 | | |
2212 | 2212 | | |
2213 | 2213 | | |
2214 | | - | |
| 2214 | + | |
2215 | 2215 | | |
2216 | 2216 | | |
2217 | 2217 | | |
| |||
2821 | 2821 | | |
2822 | 2822 | | |
2823 | 2823 | | |
2824 | | - | |
| 2824 | + | |
2825 | 2825 | | |
2826 | 2826 | | |
2827 | 2827 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
429 | | - | |
| 429 | + | |
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1390 | 1390 | | |
1391 | 1391 | | |
1392 | 1392 | | |
1393 | | - | |
| 1393 | + | |
1394 | 1394 | | |
1395 | 1395 | | |
1396 | 1396 | | |
| |||
1432 | 1432 | | |
1433 | 1433 | | |
1434 | 1434 | | |
1435 | | - | |
| 1435 | + | |
1436 | 1436 | | |
1437 | 1437 | | |
1438 | 1438 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1410 | 1410 | | |
1411 | 1411 | | |
1412 | 1412 | | |
1413 | | - | |
| 1413 | + | |
1414 | 1414 | | |
1415 | 1415 | | |
1416 | 1416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
728 | 728 | | |
729 | 729 | | |
730 | 730 | | |
731 | | - | |
| 731 | + | |
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
898 | 898 | | |
899 | 899 | | |
900 | 900 | | |
901 | | - | |
| 901 | + | |
902 | 902 | | |
903 | 903 | | |
904 | 904 | | |
| |||
917 | 917 | | |
918 | 918 | | |
919 | 919 | | |
920 | | - | |
| 920 | + | |
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
| |||
992 | 992 | | |
993 | 993 | | |
994 | 994 | | |
995 | | - | |
| 995 | + | |
996 | 996 | | |
997 | 997 | | |
998 | 998 | | |
999 | 999 | | |
1000 | 1000 | | |
1001 | 1001 | | |
1002 | 1002 | | |
1003 | | - | |
| 1003 | + | |
1004 | 1004 | | |
1005 | 1005 | | |
1006 | 1006 | | |
| |||
1097 | 1097 | | |
1098 | 1098 | | |
1099 | 1099 | | |
1100 | | - | |
| 1100 | + | |
1101 | 1101 | | |
1102 | 1102 | | |
1103 | 1103 | | |
| |||
2085 | 2085 | | |
2086 | 2086 | | |
2087 | 2087 | | |
2088 | | - | |
| 2088 | + | |
2089 | 2089 | | |
2090 | 2090 | | |
2091 | 2091 | | |
| |||
0 commit comments