Review main Merged

24598[FEATURE] Introduce a PHP Enumeration type

Sascha Egerer CR +2 V +2 Normal +159 −0 updated 10/12/13, 15:07

Commit message

Implement a enumeration type without a
relation to 3rd party php modules.

Review

  • Code review CR +2
    • Christian Kuhn +2
    • Sebastian Fischer +1
  • Verified V +2
    • Christian Kuhn +2
    • Sebastian Fischer +1

Issues 1

Files 1

Review log 20

  1. Sascha Egerer commented on patch set 1 10/11/13, 17:09

    Do we have to rename this to EnumAbstract because it is an abstract class?
  2. Wouter Wolters commented on patch set 1 CR -1 10/11/13, 17:10

    quick code review

    Enum.php:82

    space after foreach

    Enum.php:95

    space after if

    Enum.php:115

    type?

    Enum.php:130

    boolean
  3. Sascha Egerer commented on patch set 1 10/11/13, 17:16

    Enum.php:82 Reply

    Done

    Enum.php:95 Reply

    Done

    Enum.php:115 Reply

    Done

    Enum.php:130 Reply

    Done
  4. Sascha Egerer uploaded patch set 2 10/11/13, 17:19

  5. Wouter Wolters voted on patch set 2 CR +1 10/11/13, 17:19

  6. Markus Klein commented on patch set 2 CR -1 10/11/13, 17:33

    AbststractEnum.php:52

    Exception Code missing

    AbststractEnum.php:59

    here too

    AbststractEnum.php:70

    invert condition and return early.

    AbststractEnum.php:77

    code missing

    AbststractEnum.php:121

    return in_array($value, static::$enumConstants[get_called_class()]);

    AbststractEnum.php:132

    better name please: e.g. getConstantsList

    AbststractEnum.php:144

    CGL, no space after cast
  7. Sascha Egerer commented on patch set 2 10/11/13, 17:41

    AbststractEnum.php:52 Reply

    Done

    AbststractEnum.php:59 Reply

    Done

    AbststractEnum.php:70 Reply

    Done

    AbststractEnum.php:77 Reply

    Done

    AbststractEnum.php:121 Reply

    Done

    AbststractEnum.php:132 Reply

    I think we should keep that because this is the name from the original SplEnum http://php.net/manual/en/class.splenum.php

    AbststractEnum.php:144 Reply

    Done
  8. Sascha Egerer uploaded patch set 3 10/11/13, 17:42

  9. Xavier Perseguers voted on patch set 3 CR +1 10/11/13, 18:15

  10. Markus Klein voted on patch set 3 CR +1 10/11/13, 18:24

  11. Mr. Jenkins commented on patch set 1 10/11/13, 19:41

  12. Mr. Jenkins commented on patch set 2 10/11/13, 19:54

  13. Mr. Jenkins commented on patch set 3 10/11/13, 20:07

  14. Sascha Egerer uploaded patch set 4 10/12/13, 10:33

  15. Mr. Jenkins commented on patch set 4 10/12/13, 11:10

  16. Xavier Perseguers commented on patch set 4 10/12/13, 14:17

    Enumeration.php:145

    I thought you wanted to have the same interface than the Spl class?
  17. Sascha Egerer commented on patch set 4 10/12/13, 14:46

    Enumeration.php:145 Reply

    We have discussed this again and decided to rename it. We have also removed the info that it emulates the SplEnum because it dousn't.
  18. Sebastian Fischer voted on patch set 4 V +1 CR +1 10/12/13, 14:48

  19. Christian Kuhn voted on patch set 4 V +2 CR +2 10/12/13, 15:07

  20. Christian Kuhn merged patch set 5 10/12/13, 15:07