The expression return $this->product could return the type null which is incompatible with the type-hinted return Sylius\Component\Core\Model\ProductInterface. Consider adding an additional type-check to rule them out.
Loading history...
53
}
54
55
public function setProduct(ProductInterface $product): void
56
{
57
$this->product = $product;
58
}
59
60
public function getVariant(): ?ProductVariantInterface
61
{
62
return $this->variant;
63
}
64
65
public function setVariant(?ProductVariantInterface $variant): void