Completed
Push — master ( 77700b...7314e6 )
by Gabor
09:11
created

index.php (1 issue)

Labels
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
 * WebHemi.
4
 *
5
 * PHP version 5.6
6
 *
7
 * @copyright 2012 - 2016 Gixx-web (http://www.gixx-web.com)
8
 * @license   https://opensource.org/licenses/MIT The MIT License (MIT)
9
 *
10
 * @link      http://www.gixx-web.com
11
 */
12
use WebHemi\Adapter\DependencyInjection\Symfony\SymfonyAdapter as DependencyInjectionAdapter;
13
use WebHemi\Application\Web\WebApplication as Application;
14
use WebHemi\Config\Config;
15
16
require_once __DIR__.'/vendor/autoload.php';
17
18
$config = new Config(require __DIR__.'/config/config.php');
19
$diAdapter = new DependencyInjectionAdapter($config->get('dependencies', Config::CONFIG_AS_OBJECT));
0 ignored issues
show
It seems like $config->get('dependenci...nfig::CONFIG_AS_OBJECT) targeting WebHemi\Config\Config::get() can also be of type array; however, WebHemi\Adapter\Dependen...yAdapter::__construct() does only seem to accept object<WebHemi\Config\ConfigInterface>, maybe add an additional type check?

This check looks at variables that are passed out again to other methods.

If the outgoing method call has stricter type requirements than the method itself, an issue is raised.

An additional type check may prevent trouble.

Loading history...
20
21
$app = new Application($diAdapter, $config);
22
$app->setEnvironmentFromGlobals($_GET, $_POST, $_SERVER, $_COOKIE, $_FILES);
23
$app->run();
24