File tree Expand file tree Collapse file tree
tests/Integration/Statistics/Fixtures Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,13 +22,15 @@ class UserMessageFixture extends Fixture
2222
2323 public function load (ObjectManager $ manager ): void
2424 {
25- /** @var Subscriber $subscriber */
25+ /** @var Subscriber|null $subscriber */
2626 $ subscriber = $ manager ->getRepository (Subscriber::class)->find (self ::SUBSCRIBER_ID );
27- /** @var Message $message */
27+ /** @var Message|null $message */
2828 $ message = $ manager ->getRepository (Message::class)->find (self ::MESSAGE_ID );
2929
30+ // Doctrine may return null here when prerequisite fixtures are not loaded.
31+ // PHPStan infers non-null from PHPDoc in some environments; suppress that false positive.
3032 if ($ subscriber === null || $ message === null ) {
31- // Pre-requisite fixtures not loaded; nothing to do.
33+ // Pre-requisite fixtures aren't loaded; nothing to do.
3234 return ;
3335 }
3436
You can’t perform that action at this time.
0 commit comments