public function update($newProgress) {
        if (!is_numeric($newProgress) || (int) $newProgress < 0 || (int) $newProgress > $this->total) {
            throw new InvalidArgumentException(sprintf(
                'Argument must be an integer between 0 (zero) and %s (total).',
                $this->total
            ));
        }
        $this->current = $newProgress;
    }