src/Entity/Product.php
/**
     * @param Entity $entity
     *
     * @return Product|null Product if this collection contained the specified entity, null otherwise.
     */
@param Entity $entity
@return Product|null Product if this collection contained the specified entity, null otherwise.
@param Entity $entity @return Product|null Product if this collection contained the specified entity null otherwise .
public function removeEntity(Entity $entity): ?Product
    {
        if (!$this->containsEntity($entity)) {
            return null;
        }
        $this->entities->removeElement($entity);
        return $this;
    }
public function removeEntity ( Entity $ entity ) : ? Product { if ( ! $ this -> containsEntity ( $ entity ) ) { return null ; } $ this -> entities -> removeElement ( $ entity ) ; return $ this ; }
@param Entity $entity
 @return Product|null Product if this collection contained the specified entity, null otherwise.
@param Entity $entity @return Product|null Product if this collection contained the specified entity null otherwise .