Conditions | 6 |
Paths | 8 |
Total Lines | 25 |
Code Lines | 15 |
Lines | 14 |
Ratio | 56 % |
Tests | 7 |
CRAP Score | 9.5384 |
Changes | 0 |
1 | <?php |
||
28 | 1 | public function configure($what) |
|
29 | { |
||
30 | 1 | if (is_array($what)) { |
|
31 | 1 | $this->config = $what; |
|
32 | return $this; |
||
33 | 1 | } |
|
34 | |||
35 | 1 | View Code Duplication | if (defined("ANAX_APP_PATH")) { |
36 | $path = ANAX_APP_PATH . "/config/$what"; |
||
37 | 1 | if (is_readable($path)) { |
|
38 | $this->config = require $path; |
||
39 | return $this; |
||
40 | 1 | } |
|
41 | } |
||
42 | |||
43 | View Code Duplication | if (defined("ANAX_INSTALL_PATH")) { |
|
44 | $path = ANAX_INSTALL_PATH . "/config/$what"; |
||
45 | if (is_readable($path)) { |
||
46 | $this->config = require $path; |
||
47 | return $this; |
||
48 | } |
||
49 | } |
||
50 | |||
51 | throw new ConfigurationException("Configure item '$what' is not an array nor a readable file."); |
||
52 | } |
||
53 | } |
||
54 |
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.