Completed
Push — master ( 0b2677...ff7e0f )
by Mahmoud
03:45
created

DetachPermissionsFromRoleAction   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A run() 0 4 1
1
<?php
2
3
namespace App\Containers\Authorization\Actions;
4
5
use App\Containers\Authorization\Tasks\DetachPermissionsFromRoleTask;
6
use App\Port\Action\Abstracts\Action;
7
8
/**
9
 * Class DetachPermissionsFromRoleAction.
10
 *
11
 * @author Mahmoud Zalt <[email protected]>
12
 */
13
class DetachPermissionsFromRoleAction extends Action
14
{
15
16
    /**
17
     * @var  \App\Containers\Authorization\Tasks\DetachPermissionsFromRoleTask
18
     */
19
    private $detachPermissionsFromRoleTask;
20
21
    /**
22
     * DetachPermissionsFromRoleAction constructor.
23
     *
24
     * @param \App\Containers\Authorization\Tasks\DetachPermissionsFromRoleTask $detachPermissionsFromRoleTask
25
     */
26
    public function __construct(DetachPermissionsFromRoleTask $detachPermissionsFromRoleTask)
27
    {
28
        $this->detachPermissionsFromRoleTask = $detachPermissionsFromRoleTask;
29
    }
30
31
    /**
32
     * @param string       $role
33
     * @param array|string $permissions
34
     *
35
     * @return  mixed
36
     */
37
    public function run($role, $permissions)
38
    {
39
        return $this->detachPermissionsFromRoleTask->run($role, $permissions);
40
    }
41
}
42