Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
27 | 9 | public function getMap(string $name, string $type = 'dto'): array |
|
28 | { |
||
29 | 9 | $map = $this->tryCache($name, $type); |
|
30 | 9 | if (is_array($map)) { |
|
31 | 2 | return $map; |
|
32 | } |
||
33 | |||
34 | 9 | $dir = $this->mapsDirs[$name]; |
|
35 | 9 | $map = $this->getByPath($dir . '/' . $type . '.yml'); |
|
36 | |||
37 | 9 | $this->setCache($name, $type, $map); |
|
38 | 9 | return $map; |
|
39 | } |
||
40 | |||
60 |