|
59 | 59 | <exclude name="WordPressVIPMinimum.JS" /> |
60 | 60 | </rule> |
61 | 61 | <rule ref="WordPress-Extra"> |
| 62 | + <!-- @todo: Determine a strategy on namespacing/merging into core. --> |
62 | 63 | <exclude name="WordPress.WP.I18n.MissingArgDomain" /> |
63 | 64 | <exclude name="WordPress.NamingConventions.PrefixAllGlobals" /> |
64 | 65 | <!-- Needed to typehint, see: https://github.com/WordPress/WordPress-Coding-Standards/issues/403 --> |
|
166 | 167 | <rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints" /> |
167 | 168 | <rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue" /> |
168 | 169 | <rule ref="SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition" /> |
169 | | - <rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint"> |
170 | | - <properties> |
171 | | - <property name="enableMixedTypeHint" value="false" /><!-- Only available in PHP 8.0+ --> |
172 | | - <property name="enableUnionTypeHint" value="false" /><!-- Only available in PHP 8.0+ --> |
173 | | - <property name="enableIntersectionTypeHint" value="false" /><!-- Only available in PHP 8.1+ --> |
174 | | - <property name="enableStandaloneNullTrueFalseTypeHints" value="false" /><!-- Only available in |
175 | | - PHP 8.2+ --> |
176 | | - </properties> |
177 | | - </rule> |
178 | | - <rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint"> |
179 | | - <properties> |
180 | | - <property name="enableNativeTypeHint" value="false" /><!-- Only available in PHP 7.4+ --> |
181 | | - <property name="enableMixedTypeHint" value="false" /><!-- Only available in PHP 8.0+ --> |
182 | | - <property name="enableUnionTypeHint" value="false" /><!-- Only available in PHP 8.0+ --> |
183 | | - <property name="enableIntersectionTypeHint" value="false" /><!-- Only available in PHP 8.1+ --> |
184 | | - <property name="enableStandaloneNullTrueFalseTypeHints" value="false" /><!-- Only available in |
185 | | - PHP 8.2+ --> |
186 | | - </properties> |
187 | | - </rule> |
188 | | - <rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint"> |
189 | | - <properties> |
190 | | - <property name="enableStaticTypeHint" value="false" /><!-- Only available in PHP 8.0+ --> |
191 | | - <property name="enableMixedTypeHint" value="false" /><!-- Only available in PHP 8.0+ --> |
192 | | - <property name="enableUnionTypeHint" value="false" /><!-- Only available in PHP 8.0+ --> |
193 | | - <property name="enableIntersectionTypeHint" value="false" /><!-- Only available in PHP 8.1+ --> |
194 | | - <property name="enableNeverTypeHint" value="false" /><!-- Only available in PHP 8.1+ --> |
195 | | - <property name="enableStandaloneNullTrueFalseTypeHints" value="false" /><!-- Only available in |
196 | | - PHP 8.2+ --> |
197 | | - </properties> |
198 | | - </rule> |
199 | | - |
200 | | - <!-- |
201 | | - Exclude REST controllers from type hint requirements. |
202 | | - WordPress core's WP_REST_Controller doesn't have type hints on its methods. |
203 | | - Adding type hints to our overridden methods causes fatal errors at runtime |
204 | | - due to signature mismatch. We must match the parent class signatures exactly. |
205 | | - --> |
206 | | - <rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint"> |
207 | | - <exclude-pattern>includes/rest-api/endpoints/class-wp-rest-abilities-*-controller.php</exclude-pattern> |
208 | | - </rule> |
209 | | - <rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint"> |
210 | | - <exclude-pattern>includes/rest-api/endpoints/class-wp-rest-abilities-*-controller.php</exclude-pattern> |
211 | | - </rule> |
212 | | - <rule ref="Squiz.Commenting.FunctionComment.TypeHintMissing"> |
213 | | - <exclude-pattern>includes/rest-api/endpoints/class-wp-rest-abilities-*-controller.php</exclude-pattern> |
214 | | - </rule> |
215 | 170 |
|
216 | 171 | <rule ref="SlevomatCodingStandard.Variables.DisallowVariableVariable" /> |
217 | 172 | <rule ref="SlevomatCodingStandard.Variables.DuplicateAssignmentToVariable" /> |
|
0 commit comments