public function getTotalItemNumber()
    {
        return array_reduce(
            $this->cartLines->toArray(),
            function ($previousTotal, CartLineInterface $current) {
                return $previousTotal + $current->getQuantity();
            },
            0
        );
    }
public function getTotalItemNumber()
    {
        return array_reduce(
            $this->cartLines->toArray(),
            function ($previousTotal, CartLineInterface $current) {
                return $previousTotal + $current->getQuantity();
            },
            0
        );
    }
public function getTotalItemNumber ( ) { return array_reduce ( $ this -> cartLines -> toArray ( ) , function ( $ previousTotal , CartLineInterface $ current ) { return $ previousTotal + $ current -> getQuantity ( ) ; } , 0 ) ; }
Return the total amount of items added to the Cart.

@return int
Return the total amount of items added to the Cart .