Code Duplication    Length = 26-26 lines in 2 locations

src/Commands/PublishConfig.php 1 location

@@ 9-34 (lines=26) @@
6
use Illuminate\Support\Facades\Artisan;
7
use Spatie\Permission\PermissionServiceProvider;
8
9
class PublishConfig extends Command
10
{
11
    /**
12
     * The console command name.
13
     *
14
     * @var string
15
     */
16
    protected $name = 'permission:config';
17
18
    /**
19
     * The console command description.
20
     *
21
     * @var string
22
     */
23
    protected $description = 'Publish the laravel-permission config file';
24
25
    public function handle()
26
    {
27
        Artisan::call('vendor:publish', [
28
            '--provider' => PermissionServiceProvider::class,
29
            '--tag' => 'config',
30
        ]);
31
32
        $this->info(Artisan::output());
33
    }
34
}
35

src/Commands/PublishMigration.php 1 location

@@ 9-34 (lines=26) @@
6
use Illuminate\Support\Facades\Artisan;
7
use Spatie\Permission\PermissionServiceProvider;
8
9
class PublishMigration extends Command
10
{
11
    /**
12
     * The console command name.
13
     *
14
     * @var string
15
     */
16
    protected $name = 'permission:migration';
17
18
    /**
19
     * The console command description.
20
     *
21
     * @var string
22
     */
23
    protected $description = 'Publish the laravel-permission migration';
24
25
    public function handle()
26
    {
27
        Artisan::call('vendor:publish', [
28
            '--provider' => PermissionServiceProvider::class,
29
            '--tag' => 'migrations',
30
        ]);
31
32
        $this->info(Artisan::output());
33
    }
34
}
35