1 | <?php |
||
2 | |||
3 | namespace Vrajroham\LaravelBitpay\Http\Middlewares; |
||
4 | |||
5 | use Closure; |
||
6 | use Exception; |
||
7 | use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; |
||
0 ignored issues
–
show
|
|||
8 | |||
9 | class VerifyWebhookSignature |
||
10 | { |
||
11 | /** |
||
12 | * Handle the incoming request. |
||
13 | * |
||
14 | * @param \Illuminate\Http\Request $request |
||
0 ignored issues
–
show
The type
Illuminate\Http\Request was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths
Loading history...
|
|||
15 | * @param \Closure $next |
||
16 | * |
||
17 | * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException |
||
18 | * |
||
19 | * @return \Illuminate\Http\Response |
||
0 ignored issues
–
show
The type
Illuminate\Http\Response was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths
Loading history...
|
|||
20 | */ |
||
21 | public function handle($request, Closure $next) |
||
22 | { |
||
23 | try { |
||
24 | // Verify signature |
||
25 | } catch (Exception $exception) { |
||
0 ignored issues
–
show
catch (\Exception $exception) is not reachable.
This check looks for unreachable code. It uses sophisticated control flow analysis techniques to find statements which will never be executed. Unreachable code is most often the result of function fx() {
try {
doSomething();
return true;
}
catch (\Exception $e) {
return false;
}
return false;
}
In the above example, the last
Loading history...
|
|||
26 | throw new AccessDeniedHttpException($exception->getMessage(), $exception); |
||
27 | } |
||
28 | |||
29 | return $next($request); |
||
30 | } |
||
31 | } |
||
32 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths