public function isOK($codes = array(200, 201, 204, 206))
    {
        if (is_array($codes)) {
            return in_array($this->status, $codes);
        }

        return $this->status === $codes;
    }
public function isOK($codes = array(200, 201, 204, 206))
    {
        if (is_array($codes)) {
            return in_array($this->status, $codes);
        }

        return $this->status === $codes;
    }
public function isOK ( $ codes = array ( 200 , 201 , 204 , 206 ) ) { if ( is_array ( $ codes ) ) { return in_array ( $ this -> status , $ codes ) ; } return $ this -> status === $ codes ; }
Did we receive the status code we expected?

@param integer|array $codes (Optional) The status code(s) to expect. Pass an <php:integer> for a single acceptable value, or an <php:array> of integers for multiple acceptable values.
@return boolean Whether we received the expected status code or not.
Did we receive the status code we expected?