diff --git a/flight/net/Response.php b/flight/net/Response.php index 5d81f3a..100c3a8 100644 --- a/flight/net/Response.php +++ b/flight/net/Response.php @@ -83,7 +83,11 @@ class Response { * @return object Self reference * @throws \Exception If invalid status code */ - public function status($code) { + public function status($code = null) { + if ($code === null) { + return $this->status; + } + if (array_key_exists($code, self::$codes)) { $this->status = $code; }