| Conditions | 6 |
| Paths | 8 |
| Total Lines | 25 |
| Lines | 14 |
| Ratio | 56 % |
| Tests | 15 |
| CRAP Score | 6.0585 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 4 | public function configure($what) |
|
| 29 | { |
||
| 30 | 4 | if (is_array($what)) { |
|
| 31 | 2 | $this->config = $what; |
|
| 32 | 2 | return $this; |
|
| 33 | } |
||
| 34 | |||
| 35 | 2 | View Code Duplication | if (defined("ANAX_APP_PATH")) { |
| 36 | 2 | $path = ANAX_APP_PATH . "/config/$what"; |
|
| 37 | 2 | if (is_readable($path)) { |
|
| 38 | 1 | $this->config = require $path; |
|
| 39 | 1 | return $this; |
|
| 40 | } |
||
| 41 | 1 | } |
|
| 42 | |||
| 43 | 1 | View Code Duplication | if (defined("ANAX_INSTALL_PATH")) { |
| 44 | 1 | $path = ANAX_INSTALL_PATH . "/config/$what"; |
|
| 45 | 1 | if (is_readable($path)) { |
|
| 46 | $this->config = require $path; |
||
| 47 | return $this; |
||
| 48 | } |
||
| 49 | 1 | } |
|
| 50 | |||
| 51 | 1 | 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.