for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Sco\Admin\Providers;
use Illuminate\Support\ServiceProvider;
use Sco\Admin\Console\ComponentMakeCommand;
use Sco\Admin\Console\InstallCommand;
class ArtisanServiceProvider extends ServiceProvider
{
protected $defer = true;
protected $commands = [
'Install' => 'command.install',
'ComponentMake' => 'command.component.make',
];
public function register()
$this->registerCommands($this->commands);
}
/**
* Register the given commands.
*
* @param array $commands
* @return void
*/
protected function registerCommands(array $commands)
foreach (array_keys($commands) as $command) {
call_user_func_array([$this, "register{$command}Command"], []);
$this->commands(array_values($commands));
* Register the command.
protected function registerInstallCommand()
$this->app->singleton('command.install', function ($app) {
$app
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
return new InstallCommand;
});
protected function registerComponentMakeCommand()
$this->app->singleton('command.component.make', function ($app) {
return new ComponentMakeCommand($app['files']);
public function provides()
return array_values($this->commands);
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.