[wp-trac] [WordPress Trac] #46500: Performs minor code improvements in abstract-testcase.php

WordPress Trac noreply at wordpress.org
Fri Mar 15 10:19:36 UTC 2019


#46500: Performs minor code improvements in abstract-testcase.php
------------------------------+-----------------------------
 Reporter:  andizer           |      Owner:  (none)
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Build/Test Tools  |    Version:  trunk
 Severity:  normal            |   Keywords:  has-patch
  Focuses:                    |
------------------------------+-----------------------------
 I've done some minor code improvements to make the code in abstract-
 testcase a little bit better:
 - Added `TRUE` as third argument for `in_array` checks
 - Used `strpos` instead of `substr` where possible
 - Add value directly to array by key instead of `array_push`
 - Removed an else statement because the if already returns a value.

 I hope these changes are desirable. I would love to hear this, because I
 can continue performing equal changes elsewhere in the testing framework.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46500>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list