Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 5.5726 |
Changes | 0 |
1 | <?php |
||
33 | 1 | public function configure($what) |
|
34 | { |
||
35 | 1 | $anaxInstallPath = ANAX_INSTALL_PATH . "/config/$what"; |
|
36 | 1 | $anaxAppPath = ANAX_APP_PATH . "/config/$what"; |
|
37 | |||
38 | 1 | if (is_array($what)) { |
|
39 | $options = $what; |
||
40 | 1 | } elseif (is_readable($anaxAppPath)) { |
|
41 | $options = require $anaxAppPath; |
||
42 | 1 | } elseif (is_readable($anaxInstallPath)) { |
|
43 | $options = require $anaxInstallPath; |
||
44 | } else { |
||
45 | 1 | throw new ConfigurationException("Configure item '$what' is not an array nor a readable file."); |
|
46 | } |
||
47 | |||
48 | $this->config = array_merge($this->config, $options); |
||
49 | return $this->config; |
||
50 | } |
||
51 | } |
||
52 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.