| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 32 | public function load($file, $type = null) |
||
| 33 | { |
||
| 34 | $path = $this->locator->locate($file); |
||
| 35 | $this->setCurrentDir(dirname($path)); |
||
| 36 | |||
| 37 | $config = require $path; |
||
| 38 | |||
| 39 | // not an array |
||
| 40 | if (!is_array($config)) { |
||
| 41 | throw new \InvalidArgumentException(sprintf('The file "%s" must contain a PHP array.', $path)); |
||
| 42 | } |
||
| 43 | |||
| 44 | return $config; |
||
| 45 | } |
||
| 46 | |||
| 60 |