Completed
Push — master ( 17a334...ed601b )
by Mahmoud
02:57
created

PermissionsSeeder::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace App\Containers\Authorization\Data\Seeders;
4
5
use App\Containers\Authorization\Actions\CreatePermissionAction;
6
use App\Port\Seeder\Abstracts\Seeder;
7
8
class PermissionsSeeder extends Seeder
9
{
10
11
    /**
12
     * @var  \App\Containers\Authorization\Actions\CreatePermissionAction
13
     */
14
    private $createPermissionAction;
15
16
    /**
17
     * PermissionsSeeder constructor.
18
     *
19
     * @param \App\Containers\Authorization\Actions\CreatePermissionAction $createPermissionAction
20
     */
21
    public function __construct(CreatePermissionAction $createPermissionAction)
22
    {
23
        $this->createPermissionAction = $createPermissionAction;
24
    }
25
26
    /**
27
     * Run the database seeds.
28
     *
29
     * @return void
30
     */
31
    public function run()
32
    {
33
        // Default Permissions ----------------------------------------------------------
34
35
        $this->createPermissionAction->run('admin-access', 'General Admin access Permission.');
36
37
        $this->createPermissionAction->run('manage-roles-permissions', 'Manage Roles and Permissions.');
38
39
        // ...
40
41
    }
42
}
43