Skip to content

Commit 307abb1

Browse files
Add back @return $this annotations
1 parent 6b6d562 commit 307abb1

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

Loader/Configurator/CollectionConfigurator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ final public function collection(string $name = ''): self
7272
* Sets the prefix to add to the path of all child routes.
7373
*
7474
* @param string|array $prefix the prefix, or the localized prefixes
75+
*
76+
* @return $this
7577
*/
7678
final public function prefix(string|array $prefix): static
7779
{
@@ -103,6 +105,8 @@ final public function prefix(string|array $prefix): static
103105
* Sets the host to use for all child routes.
104106
*
105107
* @param string|array $host the host, or the localized hosts
108+
*
109+
* @return $this
106110
*/
107111
final public function host(string|array $host): static
108112
{

Loader/Configurator/ImportConfigurator.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public function __destruct()
4949
* Sets the prefix to add to the path of all child routes.
5050
*
5151
* @param string|array $prefix the prefix, or the localized prefixes
52+
*
53+
* @return $this
5254
*/
5355
final public function prefix(string|array $prefix, bool $trailingSlashOnRoot = true): static
5456
{
@@ -59,6 +61,8 @@ final public function prefix(string|array $prefix, bool $trailingSlashOnRoot = t
5961

6062
/**
6163
* Sets the prefix to add to the name of all child routes.
64+
*
65+
* @return $this
6266
*/
6367
final public function namePrefix(string $namePrefix): static
6468
{
@@ -71,6 +75,8 @@ final public function namePrefix(string $namePrefix): static
7175
* Sets the host to use for all child routes.
7276
*
7377
* @param string|array $host the host, or the localized hosts
78+
*
79+
* @return $this
7480
*/
7581
final public function host(string|array $host): static
7682
{

Loader/Configurator/RouteConfigurator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public function __construct(RouteCollection $collection, RouteCollection $route,
3737
* Sets the host to use for all child routes.
3838
*
3939
* @param string|array $host the host, or the localized hosts
40+
*
41+
* @return $this
4042
*/
4143
final public function host(string|array $host): static
4244
{

Loader/Configurator/Traits/RouteTrait.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ trait RouteTrait
2323

2424
/**
2525
* Adds defaults.
26+
*
27+
* @return $this
2628
*/
2729
final public function defaults(array $defaults): static
2830
{
@@ -33,6 +35,8 @@ final public function defaults(array $defaults): static
3335

3436
/**
3537
* Adds requirements.
38+
*
39+
* @return $this
3640
*/
3741
final public function requirements(array $requirements): static
3842
{
@@ -43,6 +47,8 @@ final public function requirements(array $requirements): static
4347

4448
/**
4549
* Adds options.
50+
*
51+
* @return $this
4652
*/
4753
final public function options(array $options): static
4854
{
@@ -53,6 +59,8 @@ final public function options(array $options): static
5359

5460
/**
5561
* Whether paths should accept utf8 encoding.
62+
*
63+
* @return $this
5664
*/
5765
final public function utf8(bool $utf8 = true): static
5866
{
@@ -63,6 +71,8 @@ final public function utf8(bool $utf8 = true): static
6371

6472
/**
6573
* Sets the condition.
74+
*
75+
* @return $this
6676
*/
6777
final public function condition(string $condition): static
6878
{
@@ -73,6 +83,8 @@ final public function condition(string $condition): static
7383

7484
/**
7585
* Sets the pattern for the host.
86+
*
87+
* @return $this
7688
*/
7789
final public function host(string $pattern): static
7890
{
@@ -86,6 +98,8 @@ final public function host(string $pattern): static
8698
* So an empty array means that any scheme is allowed.
8799
*
88100
* @param string[] $schemes
101+
*
102+
* @return $this
89103
*/
90104
final public function schemes(array $schemes): static
91105
{
@@ -99,6 +113,8 @@ final public function schemes(array $schemes): static
99113
* So an empty array means that any method is allowed.
100114
*
101115
* @param string[] $methods
116+
*
117+
* @return $this
102118
*/
103119
final public function methods(array $methods): static
104120
{
@@ -111,6 +127,8 @@ final public function methods(array $methods): static
111127
* Adds the "_controller" entry to defaults.
112128
*
113129
* @param callable|string|array $controller a callable or parseable pseudo-callable
130+
*
131+
* @return $this
114132
*/
115133
final public function controller(callable|string|array $controller): static
116134
{
@@ -121,6 +139,8 @@ final public function controller(callable|string|array $controller): static
121139

122140
/**
123141
* Adds the "_locale" entry to defaults.
142+
*
143+
* @return $this
124144
*/
125145
final public function locale(string $locale): static
126146
{
@@ -131,6 +151,8 @@ final public function locale(string $locale): static
131151

132152
/**
133153
* Adds the "_format" entry to defaults.
154+
*
155+
* @return $this
134156
*/
135157
final public function format(string $format): static
136158
{
@@ -141,6 +163,8 @@ final public function format(string $format): static
141163

142164
/**
143165
* Adds the "_stateless" entry to defaults.
166+
*
167+
* @return $this
144168
*/
145169
final public function stateless(bool $stateless = true): static
146170
{

0 commit comments

Comments
 (0)