| 1 | <?php  | 
            ||
| 20 | trait ProductsAwareTrait  | 
            ||
| 21 | { | 
            ||
| 22 | /**  | 
            ||
| 23 | * @var Collection|ProductInterface[]  | 
            ||
| 24 | */  | 
            ||
| 25 | protected $products;  | 
            ||
| 26 | |||
| 27 | public function initializeProductsCollection(): void  | 
            ||
| 31 | |||
| 32 | /**  | 
            ||
| 33 | * @return Collection|ProductInterface[]  | 
            ||
| 34 | */  | 
            ||
| 35 | public function getProducts(): Collection  | 
            ||
| 39 | |||
| 40 | /**  | 
            ||
| 41 | * @param ProductInterface $product  | 
            ||
| 42 | *  | 
            ||
| 43 | * @return bool  | 
            ||
| 44 | */  | 
            ||
| 45 | public function hasProduct(ProductInterface $product): bool  | 
            ||
| 49 | |||
| 50 | /**  | 
            ||
| 51 | * @param ProductInterface $product  | 
            ||
| 52 | */  | 
            ||
| 53 | public function addProduct(ProductInterface $product): void  | 
            ||
| 57 | |||
| 58 | /**  | 
            ||
| 59 | * @param ProductInterface $product  | 
            ||
| 60 | */  | 
            ||
| 61 | public function removeProduct(ProductInterface $product): void  | 
            ||
| 67 | }  | 
            ||
| 68 | 
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..