src/Context/ApiContext.php
protected function validateResponseCode($code) {
        $code = (int) $code;

        try {
            Assertion::range($code, 100, 599, sprintf('Response code must be between 100 and 599, got %d.', $code));
        } catch (AssertionFailure $e) {
            throw new InvalidArgumentException($e->getMessage());
        }

        return $code;
    }
protected function validateResponseCode($code) {
        $code = (int) $code;

        try {
            Assertion::range($code, 100, 599, sprintf('Response code must be between 100 and 599, got %d.', $code));
        } catch (AssertionFailure $e) {
            throw new InvalidArgumentException($e->getMessage());
        }

        return $code;
    }
protected function validateResponseCode ( $ code ) { $ code = ( int ) $ code ; try { Assertion :: range ( $ code , 100 , 599 , sprintf ( 'Response code must be between 100 and 599, got %d.' , $ code ) ) ; } catch ( AssertionFailure $ e ) { throw new InvalidArgumentException ( $ e -> getMessage ( ) ) ; } return $ code ; }
Validate a response code

@param int $code
@throws InvalidArgumentException
@return int
Validate a response code