Review main Abandoned

86113[TASK] Use early return instead of deeply nested code

Simon Schaufelberger CR 0 V 0 Expert +545 −501 updated 03/24/25, 20:46

Commit message

Review

  • Code review CR 0
  • Verified V 0

Files 22

Show 2 more files

Review log 56

  1. Simon Schaufelberger uploaded patch set 1 09/15/24, 21:21

  2. core-ci voted on patch set 1 V +1 09/15/24, 21:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65828

  3. Christian Kuhn commented on patch set 1 CR -1 09/16/24, 09:35

    I don't get it: these structures are NOT deeply nested? Various case are just one level deep. What's the point? We don't need to obsessively turn all if's around by negating it for the sake of having an early return. I'm thankful for your aims to clean up stuff, but this particular one feels too much like wasting reviewer time to me.
  4. Simon Schaufelberger commented on patch set 1 09/16/24, 12:51

    Reply Unresolved

    This code came just in and I asked to reduce the level but then Garvin said that he will keep it for consistency reasons and said I should change all at the same time which I did with this patch. See https://review.typo3.org/c/Packages/TYPO3.CMS/+/86113/1/typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/AbstractMethodImplementationMatcher.php I would be fine with adjusting only this class.
  5. Christian Kuhn commented on patch set 1 09/17/24, 12:34

    AbstractMethodImplementationMatcher.php:115 Unresolved

    i still miss the point. this if() could be merged into the upper if you are so curious about nesting. i personally would avoid an early return here, it simply does not help much, and is matter of taste. this is still not "deeply nested" from my point of view.
  6. Simon Schaufelberger abandoned the change 03/24/25, 20:46