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