| Total Complexity | 3 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class Kernel extends ConsoleKernel |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * The Artisan commands provided by your application. |
||
| 14 | * |
||
| 15 | * @var array |
||
| 16 | */ |
||
| 17 | protected $commands = [ |
||
| 18 | InstallCommand::class, |
||
| 19 | DemoCommand::class, |
||
| 20 | ]; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Define the application's command schedule. |
||
| 24 | * |
||
| 25 | * @param \Illuminate\Console\Scheduling\Schedule $schedule |
||
| 26 | * |
||
| 27 | * @return void |
||
| 28 | */ |
||
| 29 | protected function schedule(Schedule $schedule) |
||
| 30 | { |
||
| 31 | if (config('queue.type') == 'schedule') { |
||
|
|
|||
| 32 | $schedule->command('queue:work') |
||
| 33 | ->everyMinute(); |
||
| 34 | } |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Register the Closure based commands for the application. |
||
| 39 | * |
||
| 40 | * @return void |
||
| 41 | */ |
||
| 42 | protected function commands() |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
This check compares calls to functions or methods with their respective definitions. If the call has less arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.