Review main Merged

25479[CLEANUP] Improve code style of RelationHandler class

Alexander Stehlik CR +2 V +2 Normal +165 −79 updated 11/24/13, 18:43

Commit message

* add missing class properties, that are used in the code
* fix invalid PHPDoc variable types
* remove unused variables
* fix or remove invalid return values
* fix invalid variable types
* make sure unused variables are initialized

Review

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

Issues 1

Files 1

Review log 39

Show 14 earlier messages
  1. Mr. Jenkins commented on patch set 1 11/17/13, 20:48

  2. Alexander Opitz commented on patch set 1 CR -1 11/18/13, 10:08

    RelationHandler.php:153

    Public? I think this is more internal use.

    RelationHandler.php:892

    Removing of this return is an API change. Also I would exspect from a function called "get..." to return something.
  3. Alexander Stehlik commented on patch set 1 11/18/13, 10:14

    RelationHandler.php:153 Reply

    Yes, it most probably is. But at the moment this field is created when used in the code on the fly. And this makes it public. I did not want to change that. But if you agree I can do that :)

    RelationHandler.php:892 Reply

    This is true. I will instead change the PHPDoc which currently says that this method returns void.
  4. Alexander Opitz commented on patch set 1 11/18/13, 10:25

    RelationHandler.php:153 Reply

    IMHO, it doesn't existed in the class documentation so it wasn't in the API. Later we may need to deprecate it to get a cleaner API. On the other side, we should deprecate all this $MM_ properties ... later ... so mark it public but with @deprecate ;)
  5. Alexander Stehlik uploaded patch set 2 11/18/13, 10:42

  6. Alexander Opitz voted on patch set 2 CR +1 11/18/13, 10:53

  7. Mr. Jenkins commented on patch set 2 11/18/13, 10:56

  8. Wouter Wolters voted on patch set 2 CR +1 11/18/13, 22:57

  9. Alexander Stehlik uploaded patch set 3 11/21/13, 13:28

  10. Alexander Stehlik uploaded patch set 4 11/21/13, 13:32

  11. Alexander Stehlik commented on patch set 4 11/21/13, 13:32

    Rebased to current master.
  12. Mr. Jenkins commented on patch set 3 CR -1 V -1 11/21/13, 13:43

  13. Mr. Jenkins commented on patch set 4 11/21/13, 13:56

  14. Markus Klein commented on patch set 4 11/21/13, 14:00

    I'd call it a [CLEANUP]

    RelationHandler.php:152

    We cannot do this, since the devs get no warning that this is used publicly. We have this damn problem everywhere.

    RelationHandler.php:947

    no need to compare against TRUE again
  1. Markus Klein commented on patch set 4 CR -1 11/21/13, 14:02

    I'll push a new version
  2. Markus Klein uploaded patch set 5 11/21/13, 14:17

  3. Mr. Jenkins commented on patch set 5 11/21/13, 14:29

  4. Alexander Stehlik commented on patch set 5 11/21/13, 14:41

    Thanks for the update :) Just one small remark.

    RelationHandler.php:1018

    Did you ignore your own comment? ;)
  5. Markus Klein uploaded patch set 6 11/21/13, 15:45

  6. Markus Klein commented on patch set 4 11/21/13, 15:46

    Reply

    Done

    RelationHandler.php:152 Reply

    Done

    RelationHandler.php:947 Reply

    Done
  7. Mr. Jenkins commented on patch set 6 11/21/13, 16:07

  8. Markus Klein voted on patch set 6 V +1 CR +1 11/21/13, 16:09

  9. Alexander Opitz voted on patch set 6 V +1 CR +1 11/21/13, 16:16

  10. Markus Klein commented on patch set 6 11/21/13, 16:21

    If it's still allowed to merge this, we can do it, otherwise it has to wait after the beta release today. @Ernesto: please decide and if positive just merge it. thx.
  11. Wouter Wolters commented on patch set 6 11/21/13, 21:10

    One question, further code looks okay to me.

    RelationHandler.php:235

    TRUE : FALSE?
  12. Markus Klein commented on patch set 6 11/21/13, 22:01

    RelationHandler.php:235 Reply

    or even a simple typecast?
  13. Stefan Neufeind commented on patch set 6 CR +1 11/24/13, 01:56

    just a nitpick

    RelationHandler.php:588

    actually: from $oldMMs_inclUid

    RelationHandler.php:1024

    Imho a change in behaviour. Currently it would have returned NULL if updateReferenceIndex was FALSE. But I think it is okay.
  14. Markus Klein uploaded patch set 7 11/24/13, 08:16

  15. Markus Klein commented on patch set 6 11/24/13, 08:16

    RelationHandler.php:235 Reply

    Done

    RelationHandler.php:588 Reply

    Done

    RelationHandler.php:1024 Reply

    Yes, doesn't matter. The return value is never used anywhere and now it complies to the phpdoc
  16. Markus Klein commented on patch set 7 V +1 CR +1 11/24/13, 08:16

    Fixed the last comments.
  17. Mr. Jenkins commented on patch set 7 11/24/13, 08:29

  18. Stefan Neufeind commented on patch set 7 11/24/13, 18:15

    RelationHandler.php:235

    boolean
  19. Markus Klein uploaded patch set 8 11/24/13, 18:30

  20. Markus Klein commented on patch set 7 11/24/13, 18:30

    RelationHandler.php:235 Reply

    Didn't know that both is correct here. Done.
  21. Markus Klein voted on patch set 8 V +1 CR +1 11/24/13, 18:31

  22. Wouter Wolters voted on patch set 8 CR +1 11/24/13, 18:32

  23. Stefan Neufeind voted on patch set 8 V +2 CR +2 11/24/13, 18:36

  24. Stefan Neufeind merged patch set 9 11/24/13, 18:36

  25. Mr. Jenkins commented on patch set 8 11/24/13, 18:43