Issues (26)

index.php (2 issues)

Labels
Severity
1
<?php
2
3
if (!file_exists(__DIR__ . '/vendor/autoload.php')) {
4
    print('Autoloader not found! Did you follow the instructions from the INSTALL.md?<br />');
5
    print('(If you want to keep the old version, switch to the <tt>legacy</tt> branch by running: <tt>git checkout legacy</tt>');
6
    exit();
7
}
8
9
require_once __DIR__ . '/vendor/autoload.php';
10
11
use \SSpkS\Config;
0 ignored issues
show
The type \SSpkS\Config was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
use \SSpkS\Handler;
0 ignored issues
show
The type \SSpkS\Handler was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
14
$config = new Config(__DIR__, 'conf/sspks.yaml');
15
$config->baseUrlRelative = substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVER['REQUEST_URI'], '/')) . '/';
16
$config->baseUrl = 'http' . ((array_key_exists('HTTP_X_FORWARDED_PROTO', $_SERVER) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == "https" || (array_key_exists('HTTPS', $_SERVER) && $_SERVER['HTTPS']))?'s':'') . '://' . $_SERVER['HTTP_HOST'] . $config->baseUrlRelative;
17
18
$handler = new Handler($config);
19
$handler->handle();
20