Conditions | 4 |
Paths | 3 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
41 | public function handle() |
||
42 | { |
||
43 | $rc = new ReflectionClass($this->argument('class')); |
||
44 | foreach ($rc->getConstants() as $constantName => $code) { |
||
45 | if (is_int($code) && substr($constantName, 0, 5) === 'HTTP_') { |
||
46 | $funcName = substr($constantName, 5); |
||
47 | $funcName = Str::camel(Str::lower($funcName)); |
||
48 | $this->info("@method JsonResponse $funcName(array \$data = [], string \$message = null)"); |
||
49 | } |
||
50 | } |
||
51 | } |
||
52 | } |
||
53 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.