@@ -92,10 +92,8 @@ public function __construct(Reader $reader = null, string $env = null)
92
92
93
93
/**
94
94
* Sets the annotation class to read route properties from.
95
- *
96
- * @return void
97
95
*/
98
- public function setRouteAnnotationClass (string $ class )
96
+ public function setRouteAnnotationClass (string $ class ): void
99
97
{
100
98
$ this ->routeAnnotationClass = $ class ;
101
99
}
@@ -160,10 +158,8 @@ public function load(mixed $class, string $type = null): RouteCollection
160
158
161
159
/**
162
160
* @param RouteAnnotation $annot or an object that exposes a similar interface
163
- *
164
- * @return void
165
161
*/
166
- protected function addRoute (RouteCollection $ collection , object $ annot , array $ globals , \ReflectionClass $ class , \ReflectionMethod $ method )
162
+ protected function addRoute (RouteCollection $ collection , object $ annot , array $ globals , \ReflectionClass $ class , \ReflectionMethod $ method ): void
167
163
{
168
164
if ($ annot ->getEnv () && $ annot ->getEnv () !== $ this ->env ) {
169
165
return ;
@@ -253,10 +249,7 @@ public function supports(mixed $resource, string $type = null): bool
253
249
return \is_string ($ resource ) && preg_match ('/^(?: \\\\?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)+$/ ' , $ resource ) && (!$ type || \in_array ($ type , ['annotation ' , 'attribute ' ], true ));
254
250
}
255
251
256
- /**
257
- * @return void
258
- */
259
- public function setResolver (LoaderResolverInterface $ resolver )
252
+ public function setResolver (LoaderResolverInterface $ resolver ): void
260
253
{
261
254
}
262
255
@@ -266,10 +259,8 @@ public function getResolver(): LoaderResolverInterface
266
259
267
260
/**
268
261
* Gets the default route name for a class method.
269
- *
270
- * @return string
271
262
*/
272
- protected function getDefaultRouteName (\ReflectionClass $ class , \ReflectionMethod $ method )
263
+ protected function getDefaultRouteName (\ReflectionClass $ class , \ReflectionMethod $ method ): string
273
264
{
274
265
$ name = str_replace ('\\' , '_ ' , $ class ->name ).'_ ' .$ method ->name ;
275
266
$ name = \function_exists ('mb_strtolower ' ) && preg_match ('//u ' , $ name ) ? mb_strtolower ($ name , 'UTF-8 ' ) : strtolower ($ name );
@@ -281,10 +272,7 @@ protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMetho
281
272
return $ name ;
282
273
}
283
274
284
- /**
285
- * @return array
286
- */
287
- protected function getGlobals (\ReflectionClass $ class )
275
+ protected function getGlobals (\ReflectionClass $ class ): array
288
276
{
289
277
$ globals = $ this ->resetGlobals ();
290
278
@@ -366,18 +354,12 @@ private function resetGlobals(): array
366
354
];
367
355
}
368
356
369
- /**
370
- * @return Route
371
- */
372
- protected function createRoute (string $ path , array $ defaults , array $ requirements , array $ options , ?string $ host , array $ schemes , array $ methods , ?string $ condition )
357
+ protected function createRoute (string $ path , array $ defaults , array $ requirements , array $ options , ?string $ host , array $ schemes , array $ methods , ?string $ condition ): Route
373
358
{
374
359
return new Route ($ path , $ defaults , $ requirements , $ options , $ host , $ schemes , $ methods , $ condition );
375
360
}
376
361
377
- /**
378
- * @return void
379
- */
380
- abstract protected function configureRoute (Route $ route , \ReflectionClass $ class , \ReflectionMethod $ method , object $ annot );
362
+ abstract protected function configureRoute (Route $ route , \ReflectionClass $ class , \ReflectionMethod $ method , object $ annot ): void ;
381
363
382
364
/**
383
365
* @param \ReflectionClass|\ReflectionMethod $reflection
0 commit comments