public function setTotalItems( $totalItems )
    {
        if (preg_match( '/^(?:\d*\.)?\d+$/', $totalItems ) !== 1) {
            throw new InvalidArgumentException( sprintf( 'Items total value should be a non-negative number (%s)',
                $totalItems ) );
        }

        $this->totalItems = (float)number_format( $totalItems, 4, '.', '' );

        return $this;
    }
public function setTotalItems( $totalItems )
    {
        if (preg_match( '/^(?:\d*\.)?\d+$/', $totalItems ) !== 1) {
            throw new InvalidArgumentException( sprintf( 'Items total value should be a non-negative number (%s)',
                $totalItems ) );
        }

        $this->totalItems = (float)number_format( $totalItems, 4, '.', '' );

        return $this;
    }
@param  float $totalItems

@return $this