Review main Merged

57127[CLEANUP] Introduce early returns in class LinkAnalyzer

Andreas Wolf CR +2 V +2 Hard +222 −205 updated 06/23/18, 10:32

Commit message

Some methods in the class were deeply nested and thus hard to
understand; the early returns make the flow more linearly and more
easily comprehensible.

Review

  • Code review CR +2
    • Stefan Neufeind +2
    • Andreas Wolf +2
    • Markus Klein +1
    • Jörg Bösche +1
    • Willi Wehmeier +1
  • Verified V +2
    • Stefan Neufeind +2
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 1112

  1. Andreas Wolf uploaded patch set 1 06/05/18, 18:51

  2. Andreas Wolf commented on patch set 1 06/05/18, 18:55

    Note: when reviewing this patch, best view it locally in Git, using `git show -b`. This will hide all whitespace-only changes, so you can see only the newly introduced early return clauses. There is one particularly tricky refactoring of a condition. The rationale behind it is like this: 1. the initial form: (A && B) || (A && C) 2. with boolean logic, we can change that to: A && (B || C) 3. inverting it twice yields the same result: !!(A && (B || C) 4. by boolean logic rules, this is the same as !(!A || !(B || C)) 5. moving the second inner negation inside the braces: !(!A || (!B && !C) 6. as we want the negation of the initial rule (because we need it for the early return clause), we get as the final result: (!A || (!B && !C)
  3. TYPO3com voted on patch set 1 V +1 06/05/18, 18:58 Completed build in 06m 49s on Tue, 5 Jun, 08:58 PM Test Summary: 31143 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-24079

  4. Markus Klein commented on patch set 1 CR +1 06/05/18, 23:19

    Note: You can also set gerrit ui to ignore whitespaces (at least in the old UI)
  5. Stefan Neufeind voted on patch set 1 CR +1 06/12/18, 15:29

  6. Jörg Bösche voted on patch set 1 CR +1 06/21/18, 21:11

  7. Stefan Neufeind voted on patch set 1 V +1 06/22/18, 09:58

  8. Willi Wehmeier voted on patch set 1 CR +1 06/22/18, 12:55

  9. Andreas Wolf commented on patch set 1 V +2 CR +2 06/23/18, 09:06

    Merging this as it has enough positive reviews.
  10. Andreas Wolf commented on patch set 1 V 0 06/23/18, 09:07

    Ahhh, no. There's a second verified missing.
  11. Stefan Neufeind commented on patch set 1 V +2 CR +2 06/23/18, 10:32

    let's have it
  12. Stefan Neufeind merged patch set 2 06/23/18, 10:32