Conditions | 5 |
Paths | 6 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
43 | 4 | public function run(Configuration $configuration) |
|
44 | { |
||
45 | 4 | $filename = !empty($this->file) ? $this->file : $configuration->getBootstrap(); |
|
46 | |||
47 | 4 | if (!empty($filename)) { |
|
48 | 4 | $pathToFile = stream_resolve_include_path($filename); |
|
49 | 4 | if (!$pathToFile || !is_readable($pathToFile)) { |
|
50 | 1 | throw new Exception(sprintf('Cannot open bootstrap file "%s".' . PHP_EOL, $filename)); |
|
51 | } |
||
52 | 3 | require $pathToFile; |
|
53 | } |
||
54 | 3 | } |
|
55 | } |
||
56 |