| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | protected function getFromYaml(Generator $generator, $yaml_path, $default = null) |
||
| 14 | { |
||
| 15 | $search_in = Yaml::parse(file_get_contents($generator->getGeneratorYml())); |
||
| 16 | |||
| 17 | $yaml_path = explode('.',$yaml_path); |
||
| 18 | foreach ($yaml_path as $key) { |
||
| 19 | if (!isset($search_in[$key])) { |
||
| 20 | return $default; |
||
| 21 | } |
||
| 22 | $search_in = $search_in[$key]; |
||
| 23 | } |
||
| 24 | |||
| 25 | return $search_in; |
||
| 26 | } |
||
| 27 | } |
||
| 28 |