src/Robo/Common/Executor.php
public function checkUrl($url) {
    try {
      $client = new Client();
      $res = $client->request('GET', $url, [
        'connection_timeout' => 2,
        'timeout' => 2,
        'exceptions' => FALSE,
      ]);
      if ($res->getStatusCode() && substr($res->getStatusCode(), 0, 1) != '5') {
        return TRUE;
      }
      else {
        $this->logger->debug($res->getBody());
        return FALSE;
      }
    }
    catch (\Exception $e) {
      $this->logger->debug($e->getMessage());
    }
    return FALSE;
  }
public function checkUrl($url) {
    try {
      $client = new Client();
      $res = $client->request('GET', $url, [
        'connection_timeout' => 2,
        'timeout' => 2,
        'exceptions' => FALSE,
      ]);
      if ($res->getStatusCode() && substr($res->getStatusCode(), 0, 1) != '5') {
        return TRUE;
      }
      else {
        $this->logger->debug($res->getBody());
        return FALSE;
      }
    }
    catch (\Exception $e) {
      $this->logger->debug($e->getMessage());
    }
    return FALSE;
  }
public function checkUrl ( $ url ) { try { $ client = new Client ( ) ; $ res = $ client -> request ( 'GET' , $ url , [ 'connection_timeout' => 2 , 'timeout' => 2 , 'exceptions' => FALSE , ] ) ; if ( $ res -> getStatusCode ( ) && substr ( $ res -> getStatusCode ( ) , 0 , 1 ) != '5' ) { return TRUE ; } else { $ this -> logger -> debug ( $ res -> getBody ( ) ) ; return FALSE ; } } catch ( \ Exception $ e ) { $ this -> logger -> debug ( $ e -> getMessage ( ) ) ; } return FALSE ; }
Checks a URL for a non-50x response.

@param string $url
The URL to check.

@return bool
TRUE if URL responded with a non-50x response.
Checks a URL for a non - 50x response .