Review main Merged

73238[BUGFIX] Fix some incorrect usages of Prophecy

Oliver Klee CR +2 V +2 Expert +276 −880 updated 02/01/22, 16:51

Commit message

With the following changes, we can get rid of a whole bunch
of warnings from the PHPStan baseline:

1. Now that we are using the Prophecy plugin for PHPStan,
   we don't need type annotations for prophecies anymore.
2. Prophecies are not instances of the prophesized classes.
   So we need to fix/remove type annotations that incorrectly
   state this, and also move accesses on properties from the
   prophecies to the revelations.
3. Revelations are not instances of ObjectProphecy. They
   implement ProphecySubjectInterface, but that usually is
   of no relevance to our test classes. So we can simplify
   the type annotations and usually convert those to native
   type annotations.
4. Have PHPStan ignore false positive related to class aliasing
   (that probably is outside of what PHPStan can do).
5. Drop extraneous arguments to Argument::any().

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 1

Files 79

Show 59 more files