@@ -23,10 +23,8 @@ trait RouteTrait
23
23
24
24
/**
25
25
* Adds defaults.
26
- *
27
- * @return $this
28
26
*/
29
- final public function defaults (array $ defaults ): self
27
+ final public function defaults (array $ defaults ): static
30
28
{
31
29
$ this ->route ->addDefaults ($ defaults );
32
30
@@ -35,10 +33,8 @@ final public function defaults(array $defaults): self
35
33
36
34
/**
37
35
* Adds requirements.
38
- *
39
- * @return $this
40
36
*/
41
- final public function requirements (array $ requirements ): self
37
+ final public function requirements (array $ requirements ): static
42
38
{
43
39
$ this ->route ->addRequirements ($ requirements );
44
40
@@ -47,10 +43,8 @@ final public function requirements(array $requirements): self
47
43
48
44
/**
49
45
* Adds options.
50
- *
51
- * @return $this
52
46
*/
53
- final public function options (array $ options ): self
47
+ final public function options (array $ options ): static
54
48
{
55
49
$ this ->route ->addOptions ($ options );
56
50
@@ -59,10 +53,8 @@ final public function options(array $options): self
59
53
60
54
/**
61
55
* Whether paths should accept utf8 encoding.
62
- *
63
- * @return $this
64
56
*/
65
- final public function utf8 (bool $ utf8 = true ): self
57
+ final public function utf8 (bool $ utf8 = true ): static
66
58
{
67
59
$ this ->route ->addOptions (['utf8 ' => $ utf8 ]);
68
60
@@ -71,10 +63,8 @@ final public function utf8(bool $utf8 = true): self
71
63
72
64
/**
73
65
* Sets the condition.
74
- *
75
- * @return $this
76
66
*/
77
- final public function condition (string $ condition ): self
67
+ final public function condition (string $ condition ): static
78
68
{
79
69
$ this ->route ->setCondition ($ condition );
80
70
@@ -83,10 +73,8 @@ final public function condition(string $condition): self
83
73
84
74
/**
85
75
* Sets the pattern for the host.
86
- *
87
- * @return $this
88
76
*/
89
- final public function host (string $ pattern ): self
77
+ final public function host (string $ pattern ): static
90
78
{
91
79
$ this ->route ->setHost ($ pattern );
92
80
@@ -98,10 +86,8 @@ final public function host(string $pattern): self
98
86
* So an empty array means that any scheme is allowed.
99
87
*
100
88
* @param string[] $schemes
101
- *
102
- * @return $this
103
89
*/
104
- final public function schemes (array $ schemes ): self
90
+ final public function schemes (array $ schemes ): static
105
91
{
106
92
$ this ->route ->setSchemes ($ schemes );
107
93
@@ -113,10 +99,8 @@ final public function schemes(array $schemes): self
113
99
* So an empty array means that any method is allowed.
114
100
*
115
101
* @param string[] $methods
116
- *
117
- * @return $this
118
102
*/
119
- final public function methods (array $ methods ): self
103
+ final public function methods (array $ methods ): static
120
104
{
121
105
$ this ->route ->setMethods ($ methods );
122
106
@@ -127,10 +111,8 @@ final public function methods(array $methods): self
127
111
* Adds the "_controller" entry to defaults.
128
112
*
129
113
* @param callable|string|array $controller a callable or parseable pseudo-callable
130
- *
131
- * @return $this
132
114
*/
133
- final public function controller (callable |string |array $ controller ): self
115
+ final public function controller (callable |string |array $ controller ): static
134
116
{
135
117
$ this ->route ->addDefaults (['_controller ' => $ controller ]);
136
118
@@ -139,10 +121,8 @@ final public function controller(callable|string|array $controller): self
139
121
140
122
/**
141
123
* Adds the "_locale" entry to defaults.
142
- *
143
- * @return $this
144
124
*/
145
- final public function locale (string $ locale ): self
125
+ final public function locale (string $ locale ): static
146
126
{
147
127
$ this ->route ->addDefaults (['_locale ' => $ locale ]);
148
128
@@ -151,10 +131,8 @@ final public function locale(string $locale): self
151
131
152
132
/**
153
133
* Adds the "_format" entry to defaults.
154
- *
155
- * @return $this
156
134
*/
157
- final public function format (string $ format ): self
135
+ final public function format (string $ format ): static
158
136
{
159
137
$ this ->route ->addDefaults (['_format ' => $ format ]);
160
138
@@ -163,10 +141,8 @@ final public function format(string $format): self
163
141
164
142
/**
165
143
* Adds the "_stateless" entry to defaults.
166
- *
167
- * @return $this
168
144
*/
169
- final public function stateless (bool $ stateless = true ): self
145
+ final public function stateless (bool $ stateless = true ): static
170
146
{
171
147
$ this ->route ->addDefaults (['_stateless ' => $ stateless ]);
172
148
0 commit comments