Review main Merged

72741[TASK] Modernize ViewHelper classes

Christian Kuhn CR +2 V +2 Expert +707 −1647 updated 12/20/21, 20:22

Commit message

The patch makes the bulk of ViewHelper classes more
strict and applies some general love. Some ViewHelpers
have been left, those will see bigger refactorings
soon. All affected classes are final, the changes are
(hopefully) non-breaking.

* declare(strict_types=1) if missing.
* Use self:: instead of static:: since all VH's
  are final, so there is not point in using late
  static binding.
* Return and argument type hints where possible and
  reduction of methods doc annotations which are
  covered by PHP method signatures.
* Add types to some class properties.
* Protect some detail methods that were apparently
  public by accident. This is not considered breaking.
* Avoid extbase LocalizationUtility::translate() in
  favor of core LanguageService.
* Avoid static class state, especially with TSFE.
* Minor comment fixes.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 115

Show 95 more files