| Conditions | 4 |
| Paths | 6 |
| Total Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public static function getConfig($task, array $defaults = array()) |
||
| 36 | { |
||
| 37 | if (self::$config === null) { |
||
| 38 | self::$config = file_exists(self::CONFIG_FILE) ? Yaml::parse(file_get_contents(self::CONFIG_FILE)) : []; |
||
| 39 | } |
||
| 40 | |||
| 41 | return isset(self::$config[$task]) ? self::$config[$task] : $defaults; |
||
| 42 | } |
||
| 43 | } |
||
| 44 |