Review main Merged

73255[TASK] Remove superfluous elseif condition check in TcaPreparation

Stefan Bürk CR +2 V +2 Easy +8 −17 updated 02/05/22, 08:16

Commit message

phpstan complained about a superfluous 'elseif()' condition
in 'TcaPreparation::configureCategoryRelations()'.

This patch eliminates the superfluous condition by replacing
the condition with a nested inner condition. This makes phpstan
happy and removes one entry from the phpstan baseline file.

used commands:

> Build/Scripts/runTests.sh -s phpstanGenerateBaseline

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Oli Bartsch +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1622

  1. Stefan Bürk uploaded patch set 1 01/31/22, 23:56

  2. core-ci voted on patch set 1 V +1 02/01/22, 00:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22839

  3. Christian Kuhn updated the commit message in patch set 2 02/01/22, 00:54

  4. Christian Kuhn voted on patch set 2 V +1 CR +1 02/01/22, 00:56

  5. Christian Kuhn commented on patch set 2 02/01/22, 00:58

    let's have a second vote from oli on this one if possible.
  6. core-ci voted on patch set 2 V +1 02/01/22, 01:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22846

  7. Benni Mack voted on patch set 2 V +1 CR +1 02/01/22, 09:20

  8. Oli Bartsch commented on patch set 2 02/01/22, 09:20

    TcaPreparation.php:119

    Shouldn't this then be the elseif ?
  9. Wouter Wolters commented on patch set 2 02/01/22, 11:51

    phpstan
  10. Stefan Bürk commented on patch set 2 CR -1 02/01/22, 12:09

    on it

    Reply

    Thanks, will fix it with the next push. Insider: noted same typo3 on another patch recently ;)

    TcaPreparation.php:119 Reply

    Yeah, ack .. and thanks for your comment Oliver, that made me rethink about that all. I have eventually an idea to solve the phpstan issue here in another way, but keep it obious to humans which is checked, and also eleminating this nested if/else. Will push shortly.
  11. Stefan Bürk uploaded patch set 3 02/01/22, 13:14

  12. Stefan Bürk commented on patch set 3 02/01/22, 13:19

    Reply

    Done

    TcaPreparation.php:119 Reply

    Hopefully my new solution makes more sense at all and satisfies your rightfull comment, Oliver.
  13. core-ci voted on patch set 3 V +1 02/01/22, 13:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22873

  14. Stefan Bürk uploaded patch set 4 02/01/22, 15:39

  15. Stefan Bürk uploaded patch set 5 02/01/22, 15:40

  16. core-ci voted on patch set 4 V +1 02/01/22, 15:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22878

  17. core-ci voted on patch set 5 V +1 02/01/22, 15:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22879

  18. Oli Bartsch updated the commit message in patch set 6 02/01/22, 16:35

  19. Oli Bartsch voted on patch set 6 V +1 CR +1 02/01/22, 16:35

  20. core-ci voted on patch set 6 V +1 02/01/22, 16:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22882

  21. Christian Kuhn voted on patch set 6 V +2 CR +2 02/05/22, 08:16

  22. Christian Kuhn merged patch set 7 02/05/22, 08:16