public function setCaptureType($type)
    {
        if ($type === static::SET
            || $type === static::APPEND
            || $type === static::PREPEND
        ) {
            $this->captureType = $type;

            return $this;
        }

        throw new InvalidArgumentException(sprintf(
            'Invalid capture type provided; must be any of the capture '
            . 'type constants, "%s" received.',
            is_scalar($type) ? $type : gettype($type)
        ));
    }