Review main Merged

47505[CLEANUP] Fix faulty type hint in install tool

Helmut Hummel CR +2 V +2 Easy +1 −15 updated 04/05/16, 09:20

Commit message

The DefaultFactory::getStructure method obviously has a wrong
type hint annotated. Besides that, the type checks inside the method
are obsolete, as the types can never change after instantiation.

Review

  • Code review CR +2
    • Christian Kuhn +2
    • Markus Klein +1
  • Verified V +2
    • Christian Kuhn +2
    • Markus Klein +1

Issues 1

Files 2

Review log 11

  1. Helmut Hummel uploaded patch set 1 04/05/16, 04:31

  2. Markus Klein commented on patch set 1 CR +1 04/05/16, 06:11

    Fix that in 7.6 too?
  3. Xavier Perseguers voted on patch set 1 CR +1 04/05/16, 07:57

  4. Xavier Perseguers voted on patch set 1 V +1 04/05/16, 07:58

  5. Christian Kuhn commented on patch set 1 04/05/16, 08:11

    DefaultFactory.php:27

    i don't really understand why you want to remove the two exceptions, they don't harm and are a measure if something goes wrong in underlying classes. but if they are removed, @throws Exception annotation should be removed, too.
  6. Markus Klein commented on patch set 1 04/05/16, 08:50

    DefaultFactory.php:27 Reply

    Can you explain what CAN go wrong here? How can these conditions ever be true, except if you adjust the class' code?
  7. Helmut Hummel commented on patch set 1 04/05/16, 08:57

    DefaultFactory.php:27 Reply

    I don't care much. They can stay, but I would say such checks should be done in the tests, not in the code. besides that, at least the root node is checked by the type hint in the structurefacade constructor
  8. Helmut Hummel uploaded patch set 2 04/05/16, 08:59

  9. Markus Klein voted on patch set 2 CR +1 V +1 04/05/16, 09:11

  10. Christian Kuhn voted on patch set 2 CR +2 V +2 04/05/16, 09:20

  11. Gerrit merged patch set 2 04/05/16, 09:20