vikkio88 /
slime
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
|
|||
| 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(); |
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: