Review main Merged

29876[BUGFIX] DependencyUtility does count() on an integer

Markus Klein CR +2 V +2 Easy +6 −3 updated 05/05/14, 21:50

Commit message

Remove the superfluous count() call.

Review

  • Code review CR +2
    • Stefan Neufeind +2
    • Wouter Wolters +1
    • Markus Klein +1
  • Verified V +2
    • Stefan Neufeind +2
    • Markus Klein +1

Issues 1

Files 2

Review log 16

  1. Stefan Neufeind commented on patch set 1 05/05/14, 17:04

    What is the output of the count? Is the int magically typecasted to array and count of that will always be 1 (one element)?
  2. Markus Klein commented on patch set 1 05/05/14, 17:24

    Citing the docs: "If the parameter is not an array or not an object with implemented Countable interface, 1 will be returned." So yes, this was always 1
  3. Stefan Neufeind voted on patch set 1 CR +1 05/05/14, 17:32

  4. Mr. Jenkins commented on patch set 1 05/05/14, 17:59

  5. Nicole Hummel commented on patch set 1 V -1 CR -1 05/05/14, 18:35

    Missing adjustment in Unit Tests. Will provide update
  6. Nicole Hummel uploaded patch set 2 05/05/14, 18:45

  7. Nicole Hummel commented on patch set 2 05/05/14, 18:46

    DependencyUtility.php:363

    Would like to store the value in a variable before for debugging reason
  8. Mr. Jenkins commented on patch set 2 05/05/14, 20:28

  9. Markus Klein commented on patch set 2 CR +1 05/05/14, 21:11

    Thanks for fixing the tests.
  10. Markus Klein voted on patch set 2 V +1 05/05/14, 21:18

  11. Stefan Neufeind commented on patch set 2 V +1 CR +1 05/05/14, 21:20

    DependencyUtility.php:363 Reply

    $count is already a variable :-) imho enough as is
  12. Nicole Hummel commented on patch set 2 05/05/14, 21:36

    DependencyUtility.php:363 Reply

    what do you mean? - This was just a notice, why i would like to store the return of the function in a variable.
  13. Markus Klein commented on patch set 2 05/05/14, 21:45

    I'd say Nicole you should vote too and merge it.
  14. Wouter Wolters voted on patch set 2 CR +1 05/05/14, 21:47

  15. Stefan Neufeind commented on patch set 2 V +2 CR +2 05/05/14, 21:50

    DependencyUtility.php:363 Reply

    ah, I thought you wanted to have the result from !empty() in yet another variable before the return. all fine.
  16. Stefan Neufeind merged patch set 3 05/05/14, 21:50