Code Duplication    Length = 10-10 lines in 2 locations

src/Models/Permission.php 1 location

@@ 22-31 (lines=10) @@
19
     */
20
    public $guarded = ['id'];
21
22
    public function __construct(array $attributes = [])
23
    {
24
        if (empty($attributes['guard_name'])) {
25
            $attributes['guard_name'] = config('auth.defaults.guard');
26
        }
27
28
        parent::__construct($attributes);
29
30
        $this->setTable(config('laravel-permission.table_names.permissions'));
31
    }
32
33
    /**
34
     * A permission can be applied to roles.

src/Models/Role.php 1 location

@@ 20-29 (lines=10) @@
17
18
    public $guarded = ['id'];
19
20
    public function __construct(array $attributes = [])
21
    {
22
        if (empty($attributes['guard_name'])) {
23
            $attributes['guard_name'] = config('auth.defaults.guard');
24
        }
25
26
        parent::__construct($attributes);
27
28
        $this->setTable(config('laravel-permission.table_names.roles'));
29
    }
30
31
    /**
32
     * A role may be given various permissions.