Completed
Push — master ( c0d0bb...d38b33 )
by Vincenzo
02:27
created

index.php (1 issue)

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
4
require_once("vendor/autoload.php");
5
6
use App\Actions\User\UserGetAll;
7
use App\Actions\Ping\PingGet;
8
use App\Lib\Helpers\Config;
9
use Slim\App;
10
use Slim\Container;
11
12
$api = new App(
13
    new Container(Config::get('app.boot'))
0 ignored issues
show
\App\Lib\Helpers\Config::get('app.boot') is of type null, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
14
);
15
16
$api->get('/ping', function ($request, $response, $args) {
17
    return (
18
    new PingGet(
19
        $request,
20
        $response,
21
        $args
22
    )
23
    )->execute();
24
});
25
26
$api->get('/users', function ($request, $response, $args) {
27
    return (
28
    new UserGetAll(
29
        $request,
30
        $response,
31
        $args
32
    )
33
    )->execute();
34
});
35
36
$api->run();