Conditions | 5 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 5 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | 3 | public function fire() |
|
24 | { |
||
25 | 3 | $path = storage_path('app/sonar_valiables'); |
|
26 | 3 | $files = $this->filesystem->allFiles($path); |
|
27 | |||
28 | 3 | if ( is_array($files) && count($files) > 0 ) { |
|
29 | 2 | foreach ( $this->filesystem->allFiles($path) as $rec ) { |
|
30 | 2 | if ( preg_match("/\.yml$/",$rec->getPathname()) ) { |
|
31 | 1 | $this->valiable->importYaml($this->filesystem->get($rec->getPathname())); |
|
32 | 1 | } |
|
33 | 2 | } |
|
34 | 2 | } else { |
|
35 | 1 | throw new \Exception('ファイルが見つかりません。[' . $path . ']'); |
|
36 | } |
||
37 | 2 | } |
|
38 | |||
41 |