Review main Merged

62095[TASK] Call static PHPUnit methods via self:: instead of $this->

Alexander Schnitzler CR +2 V +2 Impossible +10166 −10165 updated 10/24/19, 12:42

Commit message

Class \PHPUnit\Framework\TestCase provides many assertion methods
that can be called statically and dynamically in the context of
tests. Sebastian Bergmann states that neither using $this nor
self/static is right or wrong.

There are two reasons to use self/static however. First of all
IDE's like PhpStorm support code inspections that tell you to
not call static methods dynamically and therefore make your
code look like a christmas tree. Secondly, there is a rule
for php-cs-fixer that can take care of the initial change
and which helps sticking to one specific format, unifying
the code style overall.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Oliver Klee +1
    • Manuel Selbach +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Oliver Klee +1
    • Manuel Selbach +1
    • TYPO3com +1 CI

Issues 1

Files 796

Show 776 more files

Review log 1620

  1. Alexander Schnitzler uploaded patch set 1 10/24/19, 11:02

  2. Oliver Klee commented on patch set 1 10/24/19, 11:08

  3. Oliver Klee commented on patch set 1 10/24/19, 11:10

    BackendConfigurationManagerTest.php:49 Unresolved

    I propose using self:: instead of static:: to communicate to the reader that these methods are not intended to be overridden. (And it's also a little bit shorter.)
  4. TYPO3com voted on patch set 1 V +1 10/24/19, 11:12 Completed build in 09m 21s on Thu, 24 Oct, 11:12 AM Test Summary: 48017 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37577

  5. Alexander Schnitzler uploaded patch set 2 10/24/19, 11:43

  6. TYPO3com voted on patch set 2 V +1 10/24/19, 11:54 Completed build in 11m 23s on Thu, 24 Oct, 11:54 AM Test Summary: 48017 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37578

  7. Alexander Schnitzler updated the commit message in patch set 3 10/24/19, 11:55

  8. Oliver Klee commented on patch set 3 10/24/19, 12:04

    Unresolved

    I like the Christmas tree expression. :-)
  9. Oliver Klee voted on patch set 3 CR +1 10/24/19, 12:04

  10. TYPO3com voted on patch set 3 V +1 10/24/19, 12:07 Completed build in 11m 45s on Thu, 24 Oct, 12:07 PM Test Summary: 48017 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37579

  11. Alexander Schnitzler uploaded patch set 4 10/24/19, 12:24

  12. Alexander Schnitzler wrote 10/24/19, 12:24

    Description set to "Changed the order of the php-cs-fixer rules"
  13. Oliver Klee voted on patch set 4 CR +1 10/24/19, 12:25

  14. Manuel Selbach voted on patch set 4 CR +1 10/24/19, 12:29

  15. Alexander Schnitzler commented on patch set 4 10/24/19, 12:31

    @Oli: If you trust the php-cs-fixer and bamboo, would you mind adding a +1 on verified as well?
  16. Oliver Klee voted on patch set 4 V +1 10/24/19, 12:31

  17. TYPO3com voted on patch set 4 V +1 10/24/19, 12:35 Completed build in 10m 49s on Thu, 24 Oct, 12:35 PM Test Summary: 48017 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37581

  18. Manuel Selbach voted on patch set 4 V +1 10/24/19, 12:37

  19. Andreas Kienast voted on patch set 4 V +2 CR +2 10/24/19, 12:42

  20. Andreas Kienast merged patch set 5 10/24/19, 12:42