Review main Merged

27559[TASK] Cleanup ArrayUtility::sortArraysByKey()

Michiel Roos CR +2 V +2 Easy +5 −16 updated 02/11/14, 22:16

Commit message

Replace strtolower and ternary operations with strcasecmp.

Review

  • Code review CR +2
    • Wouter Wolters +2
    • Oliver Klee +1
    • Christian Kuhn +1
  • Verified V +2
    • Wouter Wolters +2
    • Christian Kuhn +1

Issues 1

Files 1

Review log 13

  1. Oliver Klee commented on patch set 1 02/11/14, 21:13

    ArrayUtility.php:285

    While this method is touched: I propose changing this to !empty (should be faster), and to add the missing curly braces.

    ArrayUtility.php:287

    $a and $b could have type hinting here.

    ArrayUtility.php:294

    Or shorter (and more clean IMHO): return $ascending ? strcasecmp(...) : strcasecmp(...);
  2. Michiel Roos commented on patch set 1 02/11/14, 21:21

    ArrayUtility.php:285 Reply

    empty() then, without the !
  3. Michiel Roos uploaded patch set 2 02/11/14, 21:24

  4. Oliver Klee commented on patch set 1 02/11/14, 21:28

    ArrayUtility.php:285 Reply

    Right, of course! ;-)
  5. Oliver Klee commented on patch set 2 CR +1 02/11/14, 21:29

    ArrayUtility.php:279

    bool
  6. Michiel Roos uploaded patch set 3 02/11/14, 21:38

  7. Oliver Klee commented on patch set 3 CR +1 02/11/14, 21:41

    Nice cleanup!
  8. Christian Kuhn voted on patch set 3 V +1 CR +1 02/11/14, 21:47

  9. Mr. Jenkins commented on patch set 1 02/11/14, 21:48

  10. Mr. Jenkins commented on patch set 2 02/11/14, 22:02

  11. Wouter Wolters voted on patch set 3 V +2 CR +2 02/11/14, 22:02

  12. Wouter Wolters merged patch set 4 02/11/14, 22:02

  13. Mr. Jenkins commented on patch set 3 02/11/14, 22:16