Conditions | 5 |
Paths | 5 |
Total Lines | 26 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function execute($input = null) |
||
20 | { |
||
21 | if (!is_array($input)) { |
||
22 | throw new ExecutableException( |
||
23 | 'input must be an array' |
||
24 | ); |
||
25 | } |
||
26 | |||
27 | if (isset($input['bootstrap_file'])) { |
||
28 | if (!is_file($input['bootstrap_file'])) { |
||
29 | throw new ExecutableException( |
||
30 | 'provided bootstrap path "' . $input['bootstrap_file'] . '" must be a valid file' |
||
31 | ); |
||
32 | } |
||
33 | |||
34 | if (!is_readable($input['bootstrap_file'])) { |
||
35 | throw new ExecutableException( |
||
36 | 'provided bootstrap file "' . $input['bootstrap_file'] . '" must be readable' |
||
37 | ); |
||
38 | } |
||
39 | |||
40 | require_once $input['bootstrap_file']; |
||
41 | } |
||
42 | |||
43 | return $input; |
||
44 | } |
||
45 | } |