src/Task/AbstractTask.php
public function setMaxRetries($retries)
    {
        switch (gettype($retries)) {
            case 'integer':
                $this->maxRetries = new Retries($retries);
                break;
            case 'object':
                $this->maxRetries = $retries;
                break;
            default:
                throw new InvalidArgumentException('Invalid type for max retries given.');
                break;
        }
    }
public function setMaxRetries($retries)
    {
        switch (gettype($retries)) {
            case 'integer':
                $this->maxRetries = new Retries($retries);
                break;
            case 'object':
                $this->maxRetries = $retries;
                break;
            default:
                throw new InvalidArgumentException('Invalid type for max retries given.');
                break;
        }
    }
Sets the max allowed retries.

@param int|Retries $retries

@return $this