Issues (20)

public/index.php (1 issue)

Labels
Severity
1
<?php
2
3
use Gvera\Gv;
4
use Gvera\Helpers\bootstrap\Bootstrap;
5
6
require_once __DIR__ . '/../vendor/autoload.php';
7
include_once __DIR__ . '/../config/locale_setup.php';
8
ob_start();
9
10
define("CONFIG_ROOT", $_SERVER['DOCUMENT_ROOT'].'/../config/');
11
define("LOCALE_ROOT", $_SERVER['DOCUMENT_ROOT'].'/../resources/locale/');
12
13
$bootstrap = new Bootstrap();
14
$diContainer = $bootstrap->getDiContainer();
15
$app = new Gv($diContainer);
16
17
// DEV MODE
18
$isDevMode = $bootstrap->isDevMode();
19
ini_set('display_errors', $isDevMode);
0 ignored issues
show
$isDevMode of type boolean is incompatible with the type string expected by parameter $value of ini_set(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

19
ini_set('display_errors', /** @scrutinizer ignore-type */ $isDevMode);
Loading history...
20
ini_set('display_startup_errors', $isDevMode);
21
$reporting = (true === $isDevMode) ? E_ALL : 0;
22
error_reporting($reporting);
23
24
25
try {
26
    $app->run();
27
} catch (Throwable $e) {
28
    $app->handleThrowable($e, $isDevMode);
29
}
30