| Conditions | 4 |
| Paths | 3 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function handle() |
||
| 40 | { |
||
| 41 | $rc = new ReflectionClass($this->argument('class')); |
||
| 42 | foreach ($rc->getConstants() as $constantName => $code) { |
||
| 43 | if (is_int($code) && substr($constantName, 0, 5) === 'HTTP_') { |
||
| 44 | $funcName = substr($constantName, 5); |
||
| 45 | $funcName = Str::camel(Str::lower($funcName)); |
||
| 46 | $this->info("@method JsonResponse $funcName(array \$data = [], string \$message = null)"); |
||
| 47 | } |
||
| 48 | } |
||
| 49 | } |
||
| 50 | } |
||
| 51 |