Completed
Branch master (893650)
by Markus
04:08
created

index.php ➔ DisplayPackagesHTML()   B

Complexity

Conditions 3
Paths 2

Size

Total Lines 28
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 13
nc 2
nop 1
dl 0
loc 28
rs 8.8571
c 0
b 0
f 0
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;
12
use \SSpkS\Handler;
13
14
$config = new Config(__DIR__, 'conf/sspks.yaml');
15
$config->baseUrl = 'http' . ($_SERVER['HTTPS']?'s':'') . '://' . $_SERVER['HTTP_HOST'] . substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVER['REQUEST_URI'], '/')) . '/';
16
17
$handler = new Handler($config);
18
$handler->handle();
19