protected function countRemainingRetries(array $options)
    {
        $retryCount  = isset($options['retry_count']) ? (int) $options['retry_count'] : 0;

        $numAllowed  = isset($options['max_retry_attempts'])
            ? (int) $options['max_retry_attempts']
            : $this->defaultOptions['max_retry_attempts'];

        return max([$numAllowed - $retryCount, 0]);
    }
protected function countRemainingRetries(array $options)
    {
        $retryCount  = isset($options['retry_count']) ? (int) $options['retry_count'] : 0;

        $numAllowed  = isset($options['max_retry_attempts'])
            ? (int) $options['max_retry_attempts']
            : $this->defaultOptions['max_retry_attempts'];

        return max([$numAllowed - $retryCount, 0]);
    }
protected function countRemainingRetries ( array $ options ) { $ retryCount = isset ( $ options [ 'retry_count' ] ) ? ( int ) $ options [ 'retry_count' ] : 0 ; $ numAllowed = isset ( $ options [ 'max_retry_attempts' ] ) ? ( int ) $ options [ 'max_retry_attempts' ] : $ this -> defaultOptions [ 'max_retry_attempts' ] ; return max ( [ $ numAllowed - $ retryCount , 0 ] ) ; }
Count the number of retries remaining.  Always returns 0 or greater.
@param array $options
@return int
Count the number of retries remaining . Always returns 0 or greater .