public function removeBasketElement(BasketElementInterface $element) { $pos = $element->getPosition(); --$this->cptElement; unset($this->positions[$element->getProduct()->getId()], $this->basketElements[$pos]); if (!$this->inBuild) { $this->buildPrices(); } return $element; }