Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
41 | protected static function mergeWithDefaultOptions(array $options): array |
||
42 | { |
||
43 | $options = array_merge([ |
||
44 | 'watch' => [ |
||
45 | 'directories' => [ |
||
46 | 'app', |
||
47 | 'src', |
||
48 | 'tests', |
||
49 | ], |
||
50 | 'fileMask' => '*.php', |
||
51 | ], |
||
52 | 'cache' => '.phpunit-watcher-cache.php', |
||
53 | ], $options); |
||
54 | |||
55 | $options['watch']['directories'] = array_map(function ($directory) { |
||
56 | return getcwd()." /{$directory}"; |
||
57 | }, $options['watch']['directories']); |
||
58 | |||
59 | $options['watch']['directories'] = array_filter($options['watch']['directories'], function ($directory) { |
||
60 | return file_exists($directory); |
||
61 | }); |
||
62 | |||
63 | return $options; |
||
64 | } |
||
65 | } |
||
66 |