| Conditions | 5 |
| Paths | 8 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | public function getResponsesArray() |
||
| 39 | { |
||
| 40 | $config = Yaml::parse(file_get_contents($this->responsesYamlPath)); |
||
| 41 | $config = is_array($config) ? $config : []; |
||
| 42 | |||
| 43 | $includes = (array_key_exists('includes', $config)) ? $config['includes'] : []; |
||
| 44 | if (count($includes)) { |
||
| 45 | unset($config['includes']); |
||
| 46 | |||
| 47 | foreach ($includes as $fileName) { |
||
| 48 | $includeFilePath = $this->responsesYamlDir . '/' . $fileName; |
||
| 49 | $loader = new YamlLoader($includeFilePath); |
||
| 50 | $config = array_merge($config, $loader->getResponsesArray()); |
||
| 51 | } |
||
| 52 | } |
||
| 53 | |||
| 54 | return $config; |
||
| 55 | } |
||
| 56 | } |
||
| 57 |