Completed
Pull Request — master (#283)
by Phil
02:20
created
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
declare(strict_types=1);
4
5
include __DIR__ . '/vendor/autoload.php';
6
7
$request = \Laminas\Diactoros\ServerRequestFactory::fromGlobals(
8
    $_SERVER,
9
    $_GET,
10
    $_POST,
11
    $_COOKIE,
12
    $_FILES
13
);
14
15
$router = new \League\Route\Router();
16
17
$router->get('/something', function ($request) { return []; });
0 ignored issues
show
The parameter $request is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
18
$router->post('/something', function ($request) { return []; });
0 ignored issues
show
The parameter $request is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
19
20
$router->dispatch($request);
21