lib/AcmeService.php
private function parseRetryAfter(string $header): int {
        if (preg_match('#^\d+$#', $header)) {
            return (int) $header;
        }

        $time = @strtotime($header);

        if ($time === false) {
            throw new AcmeException("Invalid retry-after header: '{$header}'");
        }

        return max($time - time(), 0);
    }
private function parseRetryAfter(string $header): int {
        if (preg_match('#^\d+$#', $header)) {
            return (int) $header;
        }

        $time = @strtotime($header);

        if ($time === false) {
            throw new AcmeException("Invalid retry-after header: '{$header}'");
        }

        return max($time - time(), 0);
    }
private function parseRetryAfter ( string $ header ) : int { if ( preg_match ( '#^\d+$#' , $ header ) ) { return ( int ) $ header ; } $ time = @ strtotime ( $ header ) ; if ( $ time === false ) { throw new AcmeException ( "Invalid retry-after header: '{$header}'" ) ; } return max ( $ time - time ( ) , 0 ) ; }
Parses a retry header into seconds to wait until a request should be retried.

@param string $header header value

@return int seconds to wait until retry
@throws AcmeException If the header value cannot be parsed.
Parses a retry header into seconds to wait until a request should be retried .