| Total Complexity | 4 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 42.86% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | trait HasSubscriptionLastReview |
||
| 14 | { |
||
| 15 | #[ORM\JoinColumn(onDelete: 'SET NULL')] |
||
| 16 | #[ORM\ManyToOne(targetEntity: Product::class)] |
||
| 17 | private ?Product $subscriptionLastReview = null; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Get last review number available through a subscription, bypassing all ACL so it also work even if review is not active yet. |
||
| 21 | */ |
||
| 22 | 2 | public function getSubscriptionLastReviewNumber(): ?int |
|
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Set last review available through a subscription. |
||
| 32 | */ |
||
| 33 | #[API\Exclude] |
||
| 43 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
integervalues, zero is a special case, in particular the following results might be unexpected: