Completed
Push — master ( 3523cb...ac48e3 )
by Tom
9s
created

N98_Magerun_Bootstrap   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 25
rs 10
1
<?php
2
3
if (!class_exists('N98\MagerunBootstrap')) {
4
    require_once __DIR__ . '/N98/MagerunBootstrap.php';
5
}
6
7
try {
8
    if (version_compare(PHP_VERSION, '5.4.11', '<')) {
9
        throw new \ErrorException('PHP Version is lower than 5.4.11. Please upgrade your runtime.');
10
    }
11
    return N98\MagerunBootstrap::createApplication();
12
} catch (Exception $e) {
13
    printf("%s: %s\n", get_class($e), $e->getMessage());
14
    if (array_intersect(array('-vvv', '-vv', '-v', '--verbose'), $argv)) {
15
        printf("%s\n", $e->getTraceAsString());
16
    }
17
    exit(1);
18
}
19