| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function execute($input = null) |
||
| 20 | { |
||
| 21 | if (!is_string($input)) { |
||
| 22 | throw new ExecutableException( |
||
| 23 | 'input must be a string' |
||
| 24 | ); |
||
| 25 | } |
||
| 26 | |||
| 27 | if ($this->pathIsExistingAndReadableFile($input)) { |
||
| 28 | $configuration = require_once $input; |
||
| 29 | } else { |
||
| 30 | throw new ExecutableException( |
||
| 31 | 'provided path must be a readable file' |
||
| 32 | ); |
||
| 33 | } |
||
| 34 | |||
| 35 | return $configuration; |
||
| 36 | } |
||
| 37 | |||
| 46 | } |