1 | <?php |
||
2 | |||
3 | namespace Luke\Migration\Config; |
||
4 | |||
5 | use database\migrations; |
||
0 ignored issues
–
show
|
|||
6 | |||
7 | class MigrationFile |
||
8 | { |
||
9 | public function actionMigration() |
||
10 | { |
||
11 | $this->file_exists(); |
||
12 | $this->browser_dir(); |
||
13 | } |
||
14 | |||
15 | private function file_exists() |
||
16 | { |
||
17 | if (!file_exists(CONFIG_PATH)) { |
||
18 | throw new \Exception('Arquivo não existe'); |
||
19 | } |
||
20 | } |
||
21 | |||
22 | private function browser_dir() |
||
23 | { |
||
24 | $dirs = glob(CONFIG_PATH . "/*"); |
||
25 | |||
26 | array_map(function ($dir) { |
||
27 | echo "\e[32m" . $this->getNameFile($dir); |
||
28 | $value = include_once($dir); |
||
29 | $value->up(); |
||
30 | }, $dirs); |
||
31 | } |
||
32 | |||
33 | private function getNameFile($file): string |
||
34 | { |
||
35 | $names = explode('/', $file); |
||
36 | |||
37 | return str_replace(".php", "", $names[array_key_last($names)]); |
||
38 | } |
||
39 | } |
||
40 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths