Completed
Push — master ( fcadec...5798cc )
by Mahmoud
03:32
created

AuthorizationPermissionsSeeder_1   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A run() 0 11 1
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
/**
9
 * Class AuthorizationPermissionsSeeder_1
10
 *
11
 * @author  Mahmoud Zalt  <[email protected]>
12
 */
13
class AuthorizationPermissionsSeeder_1 extends Seeder
14
{
15
16
    /**
17
     * @var  \App\Containers\Authorization\Actions\CreatePermissionAction
18
     */
19
    private $createPermissionAction;
20
21
    /**
22
     * PermissionsSeeder constructor.
23
     *
24
     * @param \App\Containers\Authorization\Actions\CreatePermissionAction $createPermissionAction
25
     */
26
    public function __construct(CreatePermissionAction $createPermissionAction)
27
    {
28
        $this->createPermissionAction = $createPermissionAction;
29
    }
30
31
    /**
32
     * Run the database seeds.
33
     *
34
     * @return void
35
     */
36
    public function run()
37
    {
38
        // Default Permissions ----------------------------------------------------------
39
40
        $this->createPermissionAction->run('admin-access', 'General Admin access Permission.');
41
42
        $this->createPermissionAction->run('manage-roles-permissions', 'Manage Roles and Permissions.');
43
44
        // ...
45
46
    }
47
}
48