@@ -271,15 +271,12 @@ switch_to_blog( $blogid ); // Warning + Message.
271271// WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn
272272$ args ( [
273273 'post__not_in ' => array ( 1 , 2 , 3 ), // Warning.
274- 'posts_per_page ' => 1 ,
275274] );
276275
277276/* Rules that are being silenced and should NOT be flagged. */
278277
279278// WordPress.DB.SlowDBQuery.slow_db_query_meta_key
280- $ query = new WP_Query ( [
281- 'meta_key ' => 'foo ' , // Ok.
282- ] );
279+ $ query = new WP_Query ( ['meta_key ' => 'foo ' ] ); // Ok.
283280$ args = 'foo=bar&meta_key=foo ' ; // Ok.
284281
285282// WordPressVIPMinimum.Performance.BatcacheWhitelistedParams
@@ -311,16 +308,19 @@ update_site_option( $bar, $foo, true ); // Ok.
311308// WordPressVIPMinimum.Functions.RestrictedFunctions.site_option_add_site_option
312309add_site_option ( 'foo ' , $ bar ); // Ok.
313310
311+ // Generic.PHP.DisallowShortOpenTag.EchoFound
312+ ?> <?= esc_html ( $ var ); // Ok. ?> <?php
313+
314314/* The below rules are inherited from WordPressVIPMinimum */
315315
316316// WordPressVIPMinimum.Classes.DeclarationCompatibility
317317class MyWidget extends WP_Widget {
318- function widget () { // Error.
319- }
318+ function widget () { } // Error.
320319}
321320
322321// WordPressVIPMinimum.Classes.RestrictedExtendClasses
323- class BadTestClass extends WP_CLI_Command { } // Warning.
322+ class BadTestClass extends WP_CLI_Command { // Warning.
323+ }
324324
325325// WordPressVIPMinimum.Compatibility.ZoninatorSniff
326326wpcom_vip_load_plugin ( 'zoninator ' , 'plugins ' , '0.8 ' ); // Warning.
0 commit comments