Completed
Push — master ( 0d6573...bd21d3 )
by Fumio
07:02
created

registerAppContainerCommand()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 6
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
1
<?php
2
3
namespace LaravelPlus\Extension\Providers;
4
5
use Illuminate\Foundation\Providers\ArtisanServiceProvider as ServiceProvider;
6
use Illuminate\Console\Scheduling\Schedule;
7
use Illuminate\Console\Scheduling\ScheduleRunCommand;
8
use Illuminate\Console\Scheduling\ScheduleFinishCommand;
9
use LaravelPlus\Extension\Commands;
10
use LaravelPlus\Extension\Addons;
11
use LaravelPlus\Extension\Database;
12
use LaravelPlus\Extension\Generators;
13
14
class ArtisanServiceProvider extends ServiceProvider
15
{
16
    /**
17
     * Indicates if loading of the provider is deferred.
18
     *
19
     * @var bool
20
     */
21
    protected $defer = true;
22
23
    /**
24
     * The commands to be registered.
25
     *
26
     * @var array
27
     */
28
    protected $commands = [
29
        'CacheClear' => 'command.cache.clear',
30
        'CacheForget' => 'command.cache.forget',
31
        'ClearCompiled' => 'command.clear-compiled',
32
        'ClearResets' => 'command.auth.resets.clear',
33
        'ConfigCache' => 'command.config.cache',
34
        'ConfigClear' => 'command.config.clear',
35
        'Down' => 'command.down',
36
        'Environment' => 'command.environment',
37
        'KeyGenerate' => 'command.key.generate',
38
        // 'Migrate' => 'command.migrate',
39
        // 'MigrateInstall' => 'command.migrate.install',
40
        // 'MigrateRefresh' => 'command.migrate.refresh',
41
        // 'MigrateReset' => 'command.migrate.reset',
42
        // 'MigrateRollback' => 'command.migrate.rollback',
43
        // 'MigrateStatus' => 'command.migrate.status',
44
        'Optimize' => 'command.optimize',
45
        'QueueFailed' => 'command.queue.failed',
46
        'QueueFlush' => 'command.queue.flush',
47
        'QueueForget' => 'command.queue.forget',
48
        'QueueListen' => 'command.queue.listen',
49
        'QueueRestart' => 'command.queue.restart',
50
        'QueueRetry' => 'command.queue.retry',
51
        'QueueWork' => 'command.queue.work',
52
        'RouteCache' => 'command.route.cache',
53
        'RouteClear' => 'command.route.clear',
54
        'RouteList' => 'command.route.list',
55
        // 'Seed' => 'command.seed',
56
        'ScheduleFinish' => ScheduleFinishCommand::class,
57
        'ScheduleRun' => ScheduleRunCommand::class,
58
        'StorageLink' => 'command.storage.link',
59
        'Up' => 'command.up',
60
        'ViewClear' => 'command.view.clear',
61
62
        'Route' => 'command+.route',
63
        'Tail' => 'command+.tail',
64
        'AddonList' => 'command+.addon.list',
65
        'AddonStatus' => 'command+.addon.status',
66
        'DatabaseStatus' => 'command+.database.status',
67
        'DatabaseUpgrade' => 'command+.database.upgrade',
68
        'DatabaseClean' => 'command+.database.clean',
69
        'DatabaseRefresh' => 'command+.database.refresh',
70
        'DatabaseRollback' => 'command+.database.rollback',
71
        'DatabaseAgain' => 'command+.database.again',
72
        'DatabaseSeed' => 'command+.database.seed',
73
        'HashMake' => 'command+.hash.make',
74
        'HashCheck' => 'command+.hash.check',
75
    ];
76
77
    /**
78
     * The commands to be registered.
79
     *
80
     * @var array
81
     */
82
    protected $devCommands = [
83
        'AppName' => 'command.app.name',
84
        // 'AuthMake' => 'command.auth.make',
85
        // 'CacheTable' => 'command.cache.table',
86
        // 'ConsoleMake' => 'command.console.make',
87
        // 'ControllerMake' => 'command.controller.make',
88
        'EventGenerate' => 'command.event.generate',
89
        // 'EventMake' => 'command.event.make',
90
        // 'JobMake' => 'command.job.make',
91
        // 'ListenerMake' => 'command.listener.make',
92
        // 'MailMake' => 'command.mail.make',
93
        // 'MiddlewareMake' => 'command.middleware.make',
94
        // 'MigrateMake' => 'command.migrate.make',
95
        // 'ModelMake' => 'command.model.make',
96
        // 'NotificationMake' => 'command.notification.make',
97
        // 'NotificationTable' => 'command.notification.table',
98
        // 'PolicyMake' => 'command.policy.make',
99
        // 'ProviderMake' => 'command.provider.make',
100
        // 'QueueFailedTable' => 'command.queue.failed-table',
101
        // 'QueueTable' => 'command.queue.table',
102
        // 'RequestMake' => 'command.request.make',
103
        // 'SeederMake' => 'command.seeder.make',
104
        // 'SessionTable' => 'command.session.table',
105
        'Serve' => 'command.serve',
106
        // 'TestMake' => 'command.test.make',
107
        'VendorPublish' => 'command.vendor.publish',
108
109
        'AppContainer' => 'command+.app.container',
110
        'AddonName' => 'command+.addon.name',
111
        'AddonRemove' => 'command+.addon.remove',
112
113
        'MakeAddon' => 'command+.addon.make',
114
        'MakeCommand' => 'command+.command.make',
115
        'MakeController' => 'command+.controller.make',
116
        'MakeEvent' => 'command+.event.make',
117
        'MakeJob' => 'command+.job.make',
118
        'MakeListener' => 'command+.listener.make',
119
        'MakeMail' => 'command+.mail.make',
120
        'MakeMiddleware' => 'command+.middleware.make',
121
        'MakeMigration' => 'command+.migration.make',
122
        'MakeModel' => 'command+.model.make',
123
        'MakeNotification' => 'command+.notification.make',
124
        'MakePolicy' => 'command+.policy.make',
125
        'MakeProvider' => 'command+.provider.make',
126
        'MakeRequest' => 'command+.request.make',
127
        'MakeSeeder' => 'command+.seeder.make',
128
        'MakeTest' => 'command+.test.make',
129
    ];
130
131
    /**
132
     * Register the service provider.
133
     *
134
     * @return void
135
     */
136 12
    public function register()
137
    {
138 12
        $this->registerCommands($this->availableCommands());
139 12
    }
140
141
    /**
142
     * Get the services provided by the provider.
143
     *
144
     * @return array
145
     */
146
    public function provides()
147
    {
148
        return array_values($this->availableCommands());
149
    }
150
151
    /**
152
     * @return array
153
     */
154 12
    protected function availableCommands()
155
    {
156 12
        $commands = $this->commands;
157
158 12
        if ($this->app->environment() != 'production') {
159 12
            $commands = array_merge($commands, $this->devCommands);
160
        }
161
162 12
        return $commands;
163
    }
164
165
    /**
166
     * Register the given commands.
167
     *
168
     * @param  array  $commands
169
     * @return void
170
     */
171 12
    protected function registerCommands(array $commands)
172
    {
173 12
        foreach ($commands as $name => $command) {
174 12
            $this->{"register{$name}Command"}($command);
175
        }
176
177 12
        $this->commands(array_values($commands));
178 12
    }
179
180
    /**
181
     * Register the command.
182
     *
183
     * @param string $command
184
     * @return void
185
     */
186 12
    protected function registerRouteCommand($command)
187
    {
188
        $this->app->singleton($command, function ($app) {
189 1
            return new Commands\RouteListCommand($app);
190 12
        });
191 12
    }
192
193
    /**
194
     * Register the command.
195
     *
196
     * @param string $command
197
     * @return void
198
     */
199 12
    protected function registerTailCommand($command)
200
    {
201
        $this->app->singleton($command, function ($app) {
202 1
            return new Commands\TailCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to TailCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
203 12
        });
204 12
    }
205
206
    /**
207
     * Register the command.
208
     *
209
     * @param string $command
210
     * @return void
211
     */
212 12
    protected function registerAppContainerCommand($command)
213
    {
214
        $this->app->singleton($command, function ($app) {
215 1
            return new Commands\AppContainerCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to AppContainerCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
216 12
        });
217 12
    }
218
219
    /**
220
     * Register the command.
221
     *
222
     * @param string $command
223
     * @return void
224
     */
225 12
    protected function registerAddonListCommand($command)
226
    {
227
        $this->app->singleton($command, function ($app) {
228 1
            return new Addons\Commands\AddonListCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to AddonListCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
229 12
        });
230 12
    }
231
232
    /**
233
     * Register the command.
234
     *
235
     * @param string $command
236
     * @return void
237
     */
238 12
    protected function registerAddonStatusCommand($command)
239
    {
240
        $this->app->singleton($command, function ($app) {
241 1
            return new Addons\Commands\AddonStatusCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to AddonStatusCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
242 12
        });
243 12
    }
244
245
    /**
246
     * Register the command.
247
     *
248
     * @param string $command
249
     * @return void
250
     */
251 12
    protected function registerAddonNameCommand($command)
252
    {
253
        $this->app->singleton($command, function ($app) {
254 1
            return new Addons\Commands\AddonNameCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to AddonNameCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
255 12
        });
256 12
    }
257
258
    /**
259
     * Register the command.
260
     *
261
     * @param string $command
262
     * @return void
263
     */
264 12
    protected function registerAddonRemoveCommand($command)
265
    {
266
        $this->app->singleton($command, function ($app) {
267 1
            return new Addons\Commands\AddonRemoveCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to AddonRemoveCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
268 12
        });
269 12
    }
270
271
    /**
272
     * Register the command.
273
     *
274
     * @param string $command
275
     * @return void
276
     */
277 12
    protected function registerDatabaseStatusCommand($command)
278
    {
279
        $this->app->singleton($command, function ($app) {
280 1
            return new Database\Commands\DatabaseStatusCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to DatabaseStatusCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
281 12
        });
282 12
    }
283
284
    /**
285
     * Register the command.
286
     *
287
     * @param string $command
288
     * @return void
289
     */
290 12
    protected function registerDatabaseUpgradeCommand($command)
291
    {
292
        $this->app->singleton($command, function ($app) {
293 1
            return new Database\Commands\DatabaseUpgradeCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to DatabaseUpgradeCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
294 12
        });
295 12
    }
296
297
    /**
298
     * Register the command.
299
     *
300
     * @param string $command
301
     * @return void
302
     */
303 12
    protected function registerDatabaseCleanCommand($command)
304
    {
305
        $this->app->singleton($command, function ($app) {
306 1
            return new Database\Commands\DatabaseCleanCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to DatabaseCleanCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
307 12
        });
308 12
    }
309
310
    /**
311
     * Register the command.
312
     *
313
     * @param string $command
314
     * @return void
315
     */
316 12
    protected function registerDatabaseRefreshCommand($command)
317
    {
318
        $this->app->singleton($command, function ($app) {
319 1
            return new Database\Commands\DatabaseRefreshCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to DatabaseRefreshCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
320 12
        });
321 12
    }
322
323
    /**
324
     * Register the command.
325
     *
326
     * @param string $command
327
     * @return void
328
     */
329 12
    protected function registerDatabaseRollbackCommand($command)
330
    {
331
        $this->app->singleton($command, function ($app) {
332 1
            return new Database\Commands\DatabaseRollbackCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to DatabaseRollbackCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
333 12
        });
334 12
    }
335
336
    /**
337
     * Register the command.
338
     *
339
     * @param string $command
340
     * @return void
341
     */
342 12
    protected function registerDatabaseAgainCommand($command)
343
    {
344
        $this->app->singleton($command, function ($app) {
345 1
            return new Database\Commands\DatabaseAgainCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to DatabaseAgainCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
346 12
        });
347 12
    }
348
349
    /**
350
     * Register the command.
351
     *
352
     * @param string $command
353
     * @return void
354
     */
355 12
    protected function registerDatabaseSeedCommand($command)
356
    {
357
        $this->app->singleton($command, function ($app) {
358 1
            return new Database\Commands\DatabaseSeedCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to DatabaseSeedCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
359 12
        });
360 12
    }
361
362
    /**
363
     * Register the command.
364
     *
365
     * @param string $command
366
     * @return void
367
     */
368 12
    protected function registerHashMakeCommand($command)
369
    {
370
        $this->app->singleton($command, function ($app) {
371 1
            return new Commands\HashMakeCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to HashMakeCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
372 12
        });
373 12
    }
374
375
    /**
376
     * Register the command.
377
     *
378
     * @param string $command
379
     * @return void
380
     */
381 12
    protected function registerHashCheckCommand($command)
382
    {
383
        $this->app->singleton($command, function ($app) {
384 1
            return new Commands\HashCheckCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to HashCheckCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
385 12
        });
386 12
    }
387
388
    /**
389
     * Register the command.
390
     *
391
     * @param string $command
392
     * @return void
393
     */
394 12
    protected function registerMakeAddonCommand($command)
395
    {
396
        $this->app->singleton($command, function ($app) {
397 1
            return new Addons\Commands\AddonMakeCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to AddonMakeCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
398 12
        });
399 12
    }
400
401
    /**
402
     * Register the command.
403
     *
404
     * @param string $command
405
     * @return void
406
     */
407 12
    protected function registerMakeCommandCommand($command)
408
    {
409
        $this->app->singleton($command, function ($app) {
410 1
            return new Generators\Commands\CommandMakeCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to CommandMakeCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
411 12
        });
412 12
    }
413
414
    /**
415
     * Register the command.
416
     *
417
     * @param string $command
418
     * @return void
419
     */
420 12
    protected function registerMakeControllerCommand($command)
421
    {
422
        $this->app->singleton($command, function ($app) {
423 1
            return new Generators\Commands\ControllerMakeCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to ControllerMakeCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
424 12
        });
425 12
    }
426
427
    /**
428
     * Register the command.
429
     *
430
     * @param string $command
431
     * @return void
432
     */
433 12
    protected function registerMakeEventCommand($command)
434
    {
435
        $this->app->singleton($command, function ($app) {
436 1
            return new Generators\Commands\EventMakeCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to EventMakeCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
437 12
        });
438 12
    }
439
440
    /**
441
     * Register the command.
442
     *
443
     * @param string $command
444
     * @return void
445
     */
446 12
    protected function registerMakeJobCommand($command)
447
    {
448
        $this->app->singleton($command, function ($app) {
449 1
            return new Generators\Commands\JobMakeCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to JobMakeCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
450 12
        });
451 12
    }
452
453
    /**
454
     * Register the command.
455
     *
456
     * @param string $command
457
     * @return void
458
     */
459 12
    protected function registerMakeListenerCommand($command)
460
    {
461
        $this->app->singleton($command, function ($app) {
462 1
            return new Generators\Commands\ListenerMakeCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to ListenerMakeCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
463 12
        });
464 12
    }
465
466
    /**
467
     * Register the command.
468
     *
469
     * @param string $command
470
     * @return void
471
     */
472 12
    protected function registerMakeMailCommand($command)
473
    {
474
        $this->app->singleton($command, function ($app) {
475 1
            return new Generators\Commands\MailMakeCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to MailMakeCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
476 12
        });
477 12
    }
478
479
480
    /**
481
     * Register the command.
482
     *
483
     * @param string $command
484
     * @return void
485
     */
486 12
    protected function registerMakeMiddlewareCommand($command)
487
    {
488
        $this->app->singleton($command, function ($app) {
489 1
            return new Generators\Commands\MiddlewareMakeCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to MiddlewareMakeCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
490 12
        });
491 12
    }
492
493
    /**
494
     * Register the command.
495
     *
496
     * @param string $command
497
     * @return void
498
     */
499 12
    protected function registerMakeMigrationCommand($command)
500
    {
501
        $this->app->singleton($command, function ($app) {
502 1
            return new Database\Commands\MigrationMakeCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to MigrationMakeCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
503 12
        });
504 12
    }
505
506
    /**
507
     * Register the command.
508
     *
509
     * @param string $command
510
     * @return void
511
     */
512 12
    protected function registerMakeModelCommand($command)
513
    {
514
        $this->app->singleton($command, function ($app) {
515 1
            return new Generators\Commands\ModelMakeCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to ModelMakeCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
516 12
        });
517 12
    }
518
519
    /**
520
     * Register the command.
521
     *
522
     * @param string $command
523
     * @return void
524
     */
525 12
    protected function registerMakeNotificationCommand($command)
526
    {
527
        $this->app->singleton($command, function ($app) {
528 1
            return new Generators\Commands\NotificationMakeCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to NotificationMakeCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
529 12
        });
530 12
    }
531
532
    /**
533
     * Register the command.
534
     *
535
     * @param string $command
536
     * @return void
537
     */
538 12
    protected function registerMakePolicyCommand($command)
539
    {
540
        $this->app->singleton($command, function ($app) {
541 1
            return new Generators\Commands\PolicyMakeCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to PolicyMakeCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
542 12
        });
543 12
    }
544
545
    /**
546
     * Register the command.
547
     *
548
     * @param string $command
549
     * @return void
550
     */
551 12
    protected function registerMakeProviderCommand($command)
552
    {
553
        $this->app->singleton($command, function ($app) {
554 1
            return new Generators\Commands\ProviderMakeCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to ProviderMakeCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
555 12
        });
556 12
    }
557
558
    /**
559
     * Register the command.
560
     *
561
     * @param string $command
562
     * @return void
563
     */
564 12
    protected function registerMakeRequestCommand($command)
565
    {
566
        $this->app->singleton($command, function ($app) {
567 1
            return new Generators\Commands\RequestMakeCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to RequestMakeCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
568 12
        });
569 12
    }
570
571
    /**
572
     * Register the command.
573
     *
574
     * @param string $command
575
     * @return void
576
     */
577 12
    protected function registerMakeSeederCommand($command)
578
    {
579
        $this->app->singleton($command, function ($app) {
580 1
            return new Database\Commands\SeederMakeCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to SeederMakeCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
581 12
        });
582 12
    }
583
584
    /**
585
     * Register the command.
586
     *
587
     * @param string $command
588
     * @return void
589
     */
590
    protected function registerMakeTestCommand($command)
591
    {
592 12
        $this->app->singleton($command, function ($app) {
593 1
            return new Generators\Commands\TestMakeCommand($app);
0 ignored issues
show
Unused Code introduced by
The call to TestMakeCommand::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more 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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
594 12
        });
595 12
    }
596
}
597