Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
miladrahimi committed Jan 30, 2021
1 parent f8c06d7 commit c25899c
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 14 deletions.
4 changes: 3 additions & 1 deletion src/Dispatching/Caller.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
class Caller
{
/**
* The dependency injection IoC container
*
* @var Container
*/
private $container;

/**
* Caller constructor.
* Constructor
*
* @param Container $container
*/
Expand Down
4 changes: 3 additions & 1 deletion src/Dispatching/Matcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
class Matcher
{
/**
* Route repository that holds all the declared routes
*
* @var Repository
*/
private $repository;

/**
* Matcher constructor.
* Constructor
*
* @param Repository $repository
*/
Expand Down
12 changes: 6 additions & 6 deletions src/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ class Router
private $container;

/**
* The storekeeper of route repository
* The storekeeper of the route repository
*
* @var Storekeeper
*/
private $storekeeper;

/**
* The route matcher that finds appropriate routes for requests
* The route matcher that finds appropriate routes for incoming requests
*
* @var Matcher
*/
Expand All @@ -48,7 +48,7 @@ class Router
private $caller;

/**
* The publisher that publish controller outputs
* The publisher that publish controller outputs (responses)
*
* @var Publisher
*/
Expand All @@ -62,7 +62,7 @@ class Router
private $patterns = [];

/**
* Router constructor.
* Constructor
*
* @param Container $container
* @param Storekeeper $storekeeper
Expand Down Expand Up @@ -104,7 +104,7 @@ public static function create(): self
/**
* Group routes with the given attributes
*
* @param array $attributes
* @param string[] $attributes
* @param Closure $body
*/
public function group(array $attributes, Closure $body): void
Expand Down Expand Up @@ -132,7 +132,7 @@ public function map(string $method, string $path, $controller, ?string $name = n
}

/**
* Dispatch routes and run the application
* Dispatch routes (and run the application)
*
* @throws ContainerException
* @throws InvalidCallableException
Expand Down
2 changes: 1 addition & 1 deletion src/Routing/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function findByMethod(string $method): array
}

/**
* Find route by given name
* Find route by the given name
*
* @param string $name
* @return Route|null
Expand Down
2 changes: 1 addition & 1 deletion src/Routing/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Route
private $parameters = [];

/**
* Route constructor.
* Constructor
*
* @param string|null $name
* @param string $path
Expand Down
2 changes: 1 addition & 1 deletion src/Routing/State.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class State
private $domain;

/**
* Attributes constructor.
* Constructor
*
* @param string $prefix
* @param array $middleware
Expand Down
6 changes: 5 additions & 1 deletion src/Routing/Storekeeper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@
class Storekeeper
{
/**
* Route repository that holds all the declared routes
*
* @var Repository
*/
private $repository;

/**
* The state that holds all the attributes for the prospective routes
*
* @var State
*/
private $state;

/**
* Storekeeper constructor.
* Constructor
*
* @param Repository $repository
* @param State $state
Expand Down
6 changes: 4 additions & 2 deletions src/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
class Url
{
/**
* Route repository that holds all the declared routes
*
* @var Repository
*/
private $repository;

/**
* Url constructor.
* Constructor
*
* @param Repository $repository
*/
Expand All @@ -23,7 +25,7 @@ public function __construct(Repository $repository)
}

/**
* Generate URL for given route name
* Generate URL for the given route name considering the given parameters
*
* @param string $routeName
* @param string[] $parameters
Expand Down

0 comments on commit c25899c

Please sign in to comment.