| Conditions | 1 |
| Paths | 1 |
| Total Lines | 29 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | protected static function mergeWithDefaultOptions(array $options): array |
||
| 34 | { |
||
| 35 | $options = array_merge([ |
||
| 36 | |||
| 37 | 'watch' => [ |
||
| 38 | 'directories' => [ |
||
| 39 | 'app', |
||
| 40 | 'src', |
||
| 41 | 'tests', |
||
| 42 | ], |
||
| 43 | 'fileMask' => '*.php', |
||
| 44 | ], |
||
| 45 | 'notifications' => [ |
||
| 46 | 'passingTests' => true, |
||
| 47 | 'failingTests' => true, |
||
| 48 | ], |
||
| 49 | 'hideManual' => false, |
||
| 50 | ], $options); |
||
| 51 | |||
| 52 | $options['watch']['directories'] = array_map(function ($directory) { |
||
| 53 | return getcwd()."/{$directory}"; |
||
| 54 | }, $options['watch']['directories']); |
||
| 55 | |||
| 56 | $options['watch']['directories'] = array_filter($options['watch']['directories'], function ($directory) { |
||
| 57 | return file_exists($directory); |
||
| 58 | }); |
||
| 59 | |||
| 60 | return $options; |
||
| 61 | } |
||
| 62 | } |
||
| 63 |