original_string: private static function createException(RequestInterface $request,
          ResponseInterface $altered,
          \Exception $previous = null,
          array $ctx = []
      ) {
          if ($altered->getStatusCode() >= 400 && $altered->getStatusCode() < 500) {
              return new ClientException($request, $altered, $previous, $ctx);
          }
  
          return new ServerException($request, $altered, $previous, $ctx);
      }
code: private static function createException(RequestInterface $request,
          ResponseInterface $altered,
          \Exception $previous = null,
          array $ctx = []
      ) {
          if ($altered->getStatusCode() >= 400 && $altered->getStatusCode() < 500) {
              return new ClientException($request, $altered, $previous, $ctx);
          }
  
          return new ServerException($request, $altered, $previous, $ctx);
      }
code_tokens: private static function createException ( RequestInterface $ request , ResponseInterface $ altered , \ Exception $ previous = null , array $ ctx = [ ] ) { if ( $ altered -> getStatusCode ( ) >= 400 && $ altered -> getStatusCode ( ) < 500 ) { return new ClientException ( $ request , $ altered , $ previous , $ ctx ) ; } return new ServerException ( $ request , $ altered , $ previous , $ ctx ) ; }
docstring: Create a client or server exception.
  
  @param RequestInterface  $request
  @param ResponseInterface $altered
  @param \Exception        $previous
  @param array             $ctx
  
  @return ClientException|ServerException
docstring_tokens: Create a client or server exception .