Review main Merged

69185[TASK] Simplify trimExplode()

crell CR +2 V +2 Easy +26 −17 updated 05/20/21, 17:07

Commit message

Make the code a bit more declarative and compact.
This also improves the documentation to make clear
the actual behavior, which was previously not self-evident.

Review

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

Issues 1

Files 1

Review log 1621

  1. crell uploaded patch set 1 05/19/21, 14:34

  2. core-ci voted on patch set 1 V -1 05/19/21, 14:36 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11679

  3. crell marked it work in progress 05/19/21, 14:36

  4. Oliver Hader commented on patch set 1 05/19/21, 14:44

    GeneralUtility.php:996

    Probably should be like in the arrow-func for `array_filter` Besides that, it should be passed through `array_values` to reindex items.

    GeneralUtility.php:1006 Unresolved

    Reindexing becomes relevant here...
  5. crell uploaded patch set 2 05/19/21, 17:00

  6. core-ci voted on patch set 2 V -1 05/19/21, 17:01 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11682

  7. crell marked it ready for review 05/19/21, 17:05

  8. crell commented on patch set 2 05/19/21, 17:40

    Why the heck doesn't running phpstan locally catch that complaint about fn() vs fn ()?

    GeneralUtility.php:996 Reply

    `$result = array_values(array_filter(array_map(fn($item) => trim($item) !== '', $result)));` doesn't work either. It actually fails even more tests. :-)
  9. crell uploaded patch set 3 05/19/21, 17:40

  10. core-ci voted on patch set 3 V +1 05/19/21, 17:50 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11683

  11. Christian Kuhn updated the commit message in patch set 4 05/20/21, 14:33

  12. core-ci voted on patch set 4 V +1 05/20/21, 14:41 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11718

  13. Christian Kuhn updated the commit message in patch set 5 05/20/21, 15:11

  14. core-ci voted on patch set 5 V +1 05/20/21, 15:23 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11722

  15. Christian Kuhn voted on patch set 5 V +1 CR +1 05/20/21, 15:25

  16. Jochen Roth voted on patch set 5 V +1 CR +1 05/20/21, 15:26

  17. Christian Kuhn voted on patch set 5 V +2 CR +2 05/20/21, 15:27

  18. Christian Kuhn merged patch set 6 05/20/21, 15:27

  19. Mathias Brodala commented on patch set 6 05/20/21, 16:20

    Post -1

    GeneralUtility.php:979

    This must be $removeEmptyValues ...
  20. Oli Bartsch commented on patch set 6 05/20/21, 16:40

    GeneralUtility.php:979 Reply

  21. crell commented on patch set 6 05/20/21, 17:07

    GeneralUtility.php:979 Reply

    Ack