| Conditions | 3 |
| Paths | 4 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | public function cleanify() |
||
| 8 | { |
||
| 9 | $cleaning_commands = config('cleanify.cleaning_commands'); |
||
| 10 | echo 'Command Started'; |
||
| 11 | if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { |
||
| 12 | $phpPath = exec("where php"); |
||
| 13 | } else { |
||
| 14 | $phpPath = exec("which php"); |
||
| 15 | } |
||
| 16 | |||
| 17 | foreach ($cleaning_commands as $cleaning_commandss) { |
||
| 18 | $command = $phpPath . ' ' . base_path() . DIRECTORY_SEPARATOR . "artisan " . $cleaning_commandss; |
||
| 19 | echo shell_exec($command) . '\n'; |
||
| 20 | } |
||
| 21 | } |
||
| 22 | } |
||
| 23 |