src/Request.php
public function isValid(array $validCodes = null)
    {
        if ($validCodes === null) {
            return $this->getHttpCode() === 200;
        }

        return in_array($this->getHttpCode(), $validCodes, true);
    }
public function isValid(array $validCodes = null)
    {
        if ($validCodes === null) {
            return $this->getHttpCode() === 200;
        }

        return in_array($this->getHttpCode(), $validCodes, true);
    }
public function isValid ( array $ validCodes = null ) { if ( $ validCodes === null ) { return $ this -> getHttpCode ( ) === 200 ; } return in_array ( $ this -> getHttpCode ( ) , $ validCodes , true ) ; }
Check if the response is valid or not

@param array $validCodes

@return boolean True if it's valid, false if not
Check if the response is valid or not