Completed
Push — master ( b71768...84d637 )
by Vincenzo
06:09
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
require_once("vendor/autoload.php");
3
4
5
use App\Lib\Helpers\Config;
6
use App\Lib\Helpers\RouteLoader;
7
use Slim\App;
8
use Slim\Container;
9
10
$api = new App(
11
    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...
12
);
13
14
// Here you can add all the middleware
15
$api->add(
16
    new RKA\Middleware\IpAddress()
17
);
18
$api->add(
19
    new \CorsSlim\CorsSlim()
20
);
21
22
$routes = RouteLoader::load();
23
foreach ($routes as $route) {
24
    require_once($route);
25
}
26
27
$api->run();