Skip to content

Commit 46ef341

Browse files
authored
Set return type for closures
1 parent d639174 commit 46ef341

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

config/routes.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* So you can use `$this` to reference the application class instance
3030
* if required.
3131
*/
32-
return function (RouteBuilder $routes) {
32+
return function (RouteBuilder $routes): void {
3333
/*
3434
* The default class to use for all routes
3535
*
@@ -49,7 +49,7 @@
4949
*/
5050
$routes->setRouteClass(DashedRoute::class);
5151

52-
$routes->scope('/', function (RouteBuilder $builder) {
52+
$routes->scope('/', function (RouteBuilder $builder): void {
5353
/*
5454
* Here, we are connecting '/' (base path) to a controller called 'Pages',
5555
* its action called 'display', and we pass a param to select the view file
@@ -83,7 +83,7 @@
8383
* open new scope and define routes there.
8484
*
8585
* ```
86-
* $routes->scope('/api', function (RouteBuilder $builder) {
86+
* $routes->scope('/api', function (RouteBuilder $builder): void {
8787
* // No $builder->applyMiddleware() here.
8888
*
8989
* // Parse specified extensions from URLs

0 commit comments

Comments
 (0)