Completed
Pull Request — master (#3)
by ARCANEDEV
16:54
created

RolesSeeder   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 27
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 16 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Arcanesoft\Backups\Database\Seeders;
6
7
use Arcanesoft\Foundation\Core\Database\RolesSeeder as Seeder;
8
9
/**
10
 * Class     RolesSeeder
11
 *
12
 * @author   ARCANEDEV <[email protected]>
13
 */
14
class RolesSeeder extends Seeder
15
{
16
    /* -----------------------------------------------------------------
17
     |  Main Methods
18
     | -----------------------------------------------------------------
19
     */
20
21
    /**
22
     * Run the database seeds.
23
     */
24
    public function run(): void
25
    {
26
        $this->seedMany([
27
            [
28
                'name'        => 'Backups Manager',
29
                'description' => 'The Backups manager role.',
30
                'is_locked'   => true,
31
            ],
32
        ]);
33
34
        $this->syncRolesWithPermissions([
35
            'backups-manager' => [
36
                'admin::backups.*',
37
            ],
38
        ]);
39
    }
40
}
41