From b9bc38bad8ffceae40ae3de322272a92642eb465 Mon Sep 17 00:00:00 2001 From: Yada Clintjens Date: Thu, 2 Nov 2023 16:31:28 +0100 Subject: [PATCH] Fix typos in documentation --- docs/api/middleware.md | 2 +- docs/async/promises.md | 2 +- src/FilesystemHandler.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api/middleware.md b/docs/api/middleware.md index 3366161..b72ec21 100644 --- a/docs/api/middleware.md +++ b/docs/api/middleware.md @@ -110,7 +110,7 @@ class DemoMiddleware $app->get('/user', DemoMiddleware::class, UserController::class); ``` -This highlights how middleware classes provide the exact same functionaly as using inline functions, +This highlights how middleware classes provide the exact same functionality as using inline functions, yet provide a cleaner and more reusable structure. Accordingly, all examples below use middleware classes as the recommended style. diff --git a/docs/async/promises.md b/docs/async/promises.md index 0fb1fe3..282b1ad 100644 --- a/docs/async/promises.md +++ b/docs/async/promises.md @@ -189,7 +189,7 @@ you'll end up using promises one way or another no matter what. The major feature is that this means that anything that takes some time will no longer block the entire execution. -These non-blocking operations are especially benefitial for anything that incurs +These non-blocking operations are especially beneficial for anything that incurs some kind of I/O, such as [database queries](../integrations/database.md), HTTP API requests, [filesystem access](../integrations/filesystem.md) and much more. diff --git a/src/FilesystemHandler.php b/src/FilesystemHandler.php index b29ddb9..567b53c 100644 --- a/src/FilesystemHandler.php +++ b/src/FilesystemHandler.php @@ -103,7 +103,7 @@ public function __invoke(ServerRequestInterface $request): ResponseInterface } // Assign MIME type based on file extension (same as nginx/Apache) or fall back to given default otherwise. - // Browers are pretty good at figuring out the correct type if no charset attribute is given. + // Browsers are pretty good at figuring out the correct type if no charset attribute is given. $ext = \strtolower(\substr($path, \strrpos($path, '.') + 1)); $headers = [ 'Content-Type' => $this->mimetypes[$ext] ?? $this->defaultMimetype