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

DetachPermissionsFromRoleAction::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 2
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