From 7887b33e07a8b92c308f421a794bbcf033c58ed2 Mon Sep 17 00:00:00 2001 From: fadrian06 Date: Tue, 20 Feb 2024 23:21:44 -0400 Subject: [PATCH 1/2] Spaces my friend, spaces... --- .vscode/settings.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 2e9942f..fcf56e7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { - "php.suggest.basic": false, - "editor.detectIndentation": false, - "editor.insertSpaces": true -} \ No newline at end of file + "php.suggest.basic": false, + "editor.detectIndentation": false, + "editor.insertSpaces": true +} From c40b0b775947df790c02d1b7bbd3fe89d0abdc95 Mon Sep 17 00:00:00 2001 From: fadrian06 Date: Tue, 20 Feb 2024 23:22:09 -0400 Subject: [PATCH 2/2] Simplified docblocks --- flight/net/Route.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/flight/net/Route.php b/flight/net/Route.php index 480ff7c..baf5ea1 100644 --- a/flight/net/Route.php +++ b/flight/net/Route.php @@ -63,15 +63,11 @@ class Route /** * The middleware to be applied to the route * - * @var array + * @var array */ public array $middleware = []; - /** - * Whether the response for this route should be streamed. - * - * @var boolean - */ + /** Whether the response for this route should be streamed. */ public bool $is_streamed = false; /** @@ -193,7 +189,7 @@ class Route /** * Hydrates the route url with the given parameters * - * @param array $params the parameters to pass to the route + * @param array $params the parameters to pass to the route */ public function hydrateUrl(array $params = []): string { @@ -226,9 +222,7 @@ class Route /** * Sets the route middleware * - * @param array|callable $middleware - * - * @return self + * @param array|callable $middleware */ public function addMiddleware($middleware): self { @@ -245,12 +239,13 @@ class Route * * @param array $headers a key value of headers to set before the stream starts. * - * @return self + * @return $this */ public function streamWithHeaders(array $headers): self { $this->is_streamed = true; $this->streamed_headers = $headers; + return $this; } }