Skip to content

Commit 2a2e9f4

Browse files
committed
[Bugfix] Add missing return type on resource registrar method
1 parent 624b1fe commit 2a2e9f4

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/Routing/ResourceRegistrar.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
namespace LaravelJsonApi\Laravel\Routing;
2121

22+
use Closure;
2223
use Illuminate\Contracts\Routing\Registrar as RegistrarContract;
2324
use Illuminate\Routing\Route as IlluminateRoute;
2425
use Illuminate\Routing\RouteCollection;
@@ -51,6 +52,8 @@ public function __construct(RegistrarContract $router, Server $server)
5152
}
5253

5354
/**
55+
* Start to register resource routes.
56+
*
5457
* @param string $resourceType
5558
* @param string|null $controller
5659
* @return PendingResourceRegistration
@@ -65,13 +68,20 @@ public function resource(string $resourceType, string $controller = null): Pendi
6568
}
6669

6770
/**
71+
* Register resource relationship routes.
72+
*
6873
* @param string $resourceType
6974
* @param string $controller
7075
* @param array $options
71-
* @param \Closure $callback
76+
* @param Closure $callback
7277
* @return RouteCollection
7378
*/
74-
public function relationships(string $resourceType, string $controller, array $options, \Closure $callback)
79+
public function relationships(
80+
string $resourceType,
81+
string $controller,
82+
array $options,
83+
Closure $callback
84+
): RouteCollection
7585
{
7686
$parameter = $this->getResourceParameterName($resourceType, $options);
7787
$attributes = $this->getRelationshipsAction($resourceType, $parameter, $options);

0 commit comments

Comments
 (0)