1 | <?php |
||
15 | class CheckDD extends Command |
||
16 | { |
||
17 | public static $checkedCallsNum = 0; |
||
18 | |||
19 | protected $signature = 'check:dd {--d|detailed : Show files being checked}'; |
||
20 | |||
21 | protected $description = 'Checks the debug functions'; |
||
22 | |||
23 | public function handle() |
||
24 | { |
||
25 | event('microscope.start.command'); |
||
26 | $this->info('Checking dd...'); |
||
27 | |||
28 | $this->checkPaths(RoutePaths::get()); |
||
29 | $this->checkPaths(Paths::getAbsFilePaths(LaravelPaths::migrationDirs())); |
||
30 | $this->checkPaths(Paths::getAbsFilePaths(LaravelPaths::seeders())); |
||
31 | $this->checkPaths(Paths::getAbsFilePaths(LaravelPaths::factoryDirs())); |
||
32 | $this->checkPsr4Classes(); |
||
33 | |||
34 | $this->getOutput()->writeln(' - Finished looking for debug functions. ('.self::$checkedCallsNum.' files checked)'); |
||
35 | |||
36 | event('microscope.finished.checks', [$this]); |
||
37 | |||
38 | return app(ErrorPrinter::class)->hasErrors() ? 1 : 0; |
||
39 | } |
||
40 | |||
41 | private function checkForDD($absPath) |
||
58 | |||
59 | private function checkPaths($paths) |
||
66 | |||
67 | private function checkPsr4Classes() |
||
78 | } |
||
79 |