PaulaoDev /
khan
| 1 | <?php |
||||||
| 2 | |||||||
| 3 | use \App\Khan\Component\Router\Router; |
||||||
| 4 | |||||||
| 5 | Container::bind("teste", function () { |
||||||
|
0 ignored issues
–
show
|
|||||||
| 6 | return "Init development!!"; |
||||||
| 7 | }); |
||||||
| 8 | |||||||
| 9 | Router\notFound(function ($req, $res) { |
||||||
|
0 ignored issues
–
show
The function
notFound was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 10 | $res->setStatusCode(404); |
||||||
| 11 | return die("Route not found insert in router!!"); |
||||||
|
0 ignored issues
–
show
|
|||||||
| 12 | }); |
||||||
| 13 | |||||||
| 14 | Router\get('/', function ($req, $res) { |
||||||
|
0 ignored issues
–
show
The function
get was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 15 | $message = Container::get('teste')(); |
||||||
| 16 | $res->render('index.html', [ |
||||||
| 17 | 'message' => $message, |
||||||
| 18 | ]); |
||||||
| 19 | }); |
||||||
| 20 | |||||||
| 21 | Router\get('/form', function ($req, $res) { |
||||||
| 22 | return $res->render('csrf.html'); |
||||||
| 23 | }); |
||||||
| 24 | |||||||
| 25 | Router\post('/form', function ($req, $res) { |
||||||
|
0 ignored issues
–
show
The function
post was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 26 | return Router\Router::csrf_token_verify($req->post('token')) |
||||||
| 27 | ? 'verdadeiro' : 'falso'; |
||||||
| 28 | }); |
||||||
| 29 | |||||||
| 30 | Router\get('/teste', "Controllers\TesteController->index"); |
||||||
| 31 |
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