Skip to content

Commit

Permalink
Improves annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Aug 1, 2023
1 parent 48eecfe commit 3f3f28d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/FolioManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class FolioManager
/**
* Register a route to handle page based routing at the given paths.
*
* @param array<string, array<int, string>> $middleware
*
* @throws \InvalidArgumentException
*/
public function route(string $path = null, ?string $uri = '/', array $middleware = []): PendingRoute
Expand All @@ -42,6 +44,8 @@ public function route(string $path = null, ?string $uri = '/', array $middleware

/**
* Registers the given route.
*
* @param array<string, array<int, string>> $middleware
*/
public function registerRoute(string $path, string $uri, array $middleware, ?string $domain): void
{
Expand Down Expand Up @@ -83,6 +87,8 @@ protected function handler(MountPath $mountPath): Closure

/**
* Get the middleware that should be applied to the Folio handled URI.
*
* @return array<int, string>
*/
public function middlewareFor(string $uri): array
{
Expand Down
2 changes: 2 additions & 0 deletions src/PendingRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ class PendingRoute
{
/**
* Creates a new pending route instance.
*
* @param array<string, array<int, string>> $middleware
*/
public function __construct(
protected FolioManager $manager,
Expand Down

0 comments on commit 3f3f28d

Please sign in to comment.