The return type could not be reliably inferred; please add a @return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a @return
annotation as described here.
Loading history...
21
{
22
22
if ($request->path() === config('auto-deploy.route')) {
23
20
if (!config('auto-deploy.require-ssl') || $request->secure()) {
24
18
$origin = $this->determineOrigin();
25
18
if (null !== $origin) {
26
16
if ($origin->verify()) {
27
// set the origin type in the controller
28
12
$request->offsetSet('origin', $origin);
29
30
12
return $next($request);
31
} else {
32
4
abort(403, 'Forbidden. Could not verify the origin of the request.');
33
}
34
} else {
35
2
abort(403, 'Forbidden. Could not determine the origin of the request.');
36
}
37
} else {
38
2
abort(403, 'Forbidden. Webhook requests must be sent using SSL.');
39
}
40
}
41
// Passthrough if it's not our specific route
42
2
return $next($request);
43
}
44
45
/**
46
* Determine the origin of a deploy request.
47
*
48
* @param Illuminate\Http\Request $request The Request object.
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.