$this of type Application\Traits\HasSubscriptionLastReview is incompatible with the type Application\Model\AbstractModel expected by parameter $hasSubscriptionLastReview of Application\Repository\P...ptionLastReviewNumber().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
The expression $subscriptionLastReview->getReviewNumber() of type integer|null is loosely compared to false; this is ambiguous if the integer can be 0. You might want to explicitly use === null instead.
In PHP, under loose comparison (like ==, or !=, or switch conditions),
values of different types might be equal.
For integer values, zero is a special case, in particular the following
results might be unexpected:
0==false// true0==null// true123==false// false123==null// false// It is often better to use strict comparison0===false// false0===null// false
Loading history...
43
throw new InvalidArgumentException('The last review of a subscription must be a review, not an article');