Skip to content

Commit c25899c

Browse files
committed
update docs
1 parent f8c06d7 commit c25899c

File tree

8 files changed

+24
-14
lines changed

8 files changed

+24
-14
lines changed

src/Dispatching/Caller.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
class Caller
1313
{
1414
/**
15+
* The dependency injection IoC container
16+
*
1517
* @var Container
1618
*/
1719
private $container;
1820

1921
/**
20-
* Caller constructor.
22+
* Constructor
2123
*
2224
* @param Container $container
2325
*/

src/Dispatching/Matcher.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
class Matcher
1111
{
1212
/**
13+
* Route repository that holds all the declared routes
14+
*
1315
* @var Repository
1416
*/
1517
private $repository;
1618

1719
/**
18-
* Matcher constructor.
20+
* Constructor
1921
*
2022
* @param Repository $repository
2123
*/

src/Router.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ class Router
2727
private $container;
2828

2929
/**
30-
* The storekeeper of route repository
30+
* The storekeeper of the route repository
3131
*
3232
* @var Storekeeper
3333
*/
3434
private $storekeeper;
3535

3636
/**
37-
* The route matcher that finds appropriate routes for requests
37+
* The route matcher that finds appropriate routes for incoming requests
3838
*
3939
* @var Matcher
4040
*/
@@ -48,7 +48,7 @@ class Router
4848
private $caller;
4949

5050
/**
51-
* The publisher that publish controller outputs
51+
* The publisher that publish controller outputs (responses)
5252
*
5353
* @var Publisher
5454
*/
@@ -62,7 +62,7 @@ class Router
6262
private $patterns = [];
6363

6464
/**
65-
* Router constructor.
65+
* Constructor
6666
*
6767
* @param Container $container
6868
* @param Storekeeper $storekeeper
@@ -104,7 +104,7 @@ public static function create(): self
104104
/**
105105
* Group routes with the given attributes
106106
*
107-
* @param array $attributes
107+
* @param string[] $attributes
108108
* @param Closure $body
109109
*/
110110
public function group(array $attributes, Closure $body): void
@@ -132,7 +132,7 @@ public function map(string $method, string $path, $controller, ?string $name = n
132132
}
133133

134134
/**
135-
* Dispatch routes and run the application
135+
* Dispatch routes (and run the application)
136136
*
137137
* @throws ContainerException
138138
* @throws InvalidCallableException

src/Routing/Repository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function findByMethod(string $method): array
5656
}
5757

5858
/**
59-
* Find route by given name
59+
* Find route by the given name
6060
*
6161
* @param string $name
6262
* @return Route|null

src/Routing/Route.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class Route
4747
private $parameters = [];
4848

4949
/**
50-
* Route constructor.
50+
* Constructor
5151
*
5252
* @param string|null $name
5353
* @param string $path

src/Routing/State.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class State
2020
private $domain;
2121

2222
/**
23-
* Attributes constructor.
23+
* Constructor
2424
*
2525
* @param string $prefix
2626
* @param array $middleware

src/Routing/Storekeeper.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,21 @@
55
class Storekeeper
66
{
77
/**
8+
* Route repository that holds all the declared routes
9+
*
810
* @var Repository
911
*/
1012
private $repository;
1113

1214
/**
15+
* The state that holds all the attributes for the prospective routes
16+
*
1317
* @var State
1418
*/
1519
private $state;
1620

1721
/**
18-
* Storekeeper constructor.
22+
* Constructor
1923
*
2024
* @param Repository $repository
2125
* @param State $state

src/Url.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
class Url
99
{
1010
/**
11+
* Route repository that holds all the declared routes
12+
*
1113
* @var Repository
1214
*/
1315
private $repository;
1416

1517
/**
16-
* Url constructor.
18+
* Constructor
1719
*
1820
* @param Repository $repository
1921
*/
@@ -23,7 +25,7 @@ public function __construct(Repository $repository)
2325
}
2426

2527
/**
26-
* Generate URL for given route name
28+
* Generate URL for the given route name considering the given parameters
2729
*
2830
* @param string $routeName
2931
* @param string[] $parameters

0 commit comments

Comments
 (0)