[wp-trac] [WordPress Trac] #49922: PHP Compatibility fixes for 5.5

WordPress Trac noreply at wordpress.org
Wed Jun 3 17:51:57 UTC 2020


#49922: PHP Compatibility fixes for 5.5
----------------------------+-------------------------------
 Reporter:  desrosj         |       Owner:  desrosj
     Type:  task (blessed)  |      Status:  assigned
 Priority:  normal          |   Milestone:  5.5
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:  coding-standards
----------------------------+-------------------------------

Comment (by jrf):

 @desrosj I've reviewed the patch and all looks good (and while I'm typing
 this I notice you've just committed it ;-) ).

 One side-note which is not specific to this ticket: I notice that you
 generally use trailing comments for the `// phpcs:ignore` comments.

 As this makes for very long lines, from a readability perspective using
 the "ignore comment on its own line" pattern may be better.
 When an ignore comment is on its own line, it will ignore that line and
 the line after, so functionality-wise they are equivalent.

 I.e. both the below have the same effect, but IMO the second one is better
 from a readability perspective, especially when the line being ignored is
 long.
 {{{#!php
 <?php

 eval('1+2'); // phpcs:ignore Squiz.PHP.Eval
 }}}


 {{{#!php
 <?php

 // phpcs:ignore Squiz.PHP.Eval
 eval('1+2');
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49922#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list