1: <?php namespace Laravel\CLI\Tasks;
2:
3: use Laravel\Str;
4: use Laravel\File;
5:
6: class Help extends Task {
7:
8: 9: 10: 11: 12:
13: public function commands()
14: {
15:
16:
17: $command_data = json_decode(File::get(__DIR__.'/help.json'));
18:
19:
20:
21: $i=0;
22: foreach($command_data as $category => $commands)
23: {
24: if($i++ != 0) echo PHP_EOL;
25:
26: echo PHP_EOL . "# $category" . PHP_EOL;
27:
28: foreach($commands as $command => $details)
29: {
30: echo PHP_EOL . str_pad($command, 20) . str_pad($details->description, 30);
31: }
32: }
33: }
34: }