DetachPermissionsFromRoleAction   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 6 1
1
<?php
2
3
namespace App\Containers\Authorization\Actions;
4
5
use App\Containers\Authorization\Tasks\DetachPermissionsFromRoleTask;
6
use App\Containers\Authorization\Tasks\GetRoleTask;
7
use App\Ship\Parents\Actions\Action;
8
9
/**
10
 * Class DetachPermissionsFromRoleAction.
11
 *
12
 * @author Mahmoud Zalt <[email protected]>
13
 */
14
class DetachPermissionsFromRoleAction extends Action
15
{
16
    /**
17
     * @param $roleId
18
     * @param $permissionsIds
19
     *
20
     * @return  mixed
21
     */
22
    public function run($roleId, $permissionsIds)
23
    {
24
        $role = $this->call(GetRoleTask::class, [$roleId]);
25
26
        return $this->call(DetachPermissionsFromRoleTask::class, [$role, $permissionsIds]);
27
    }
28
}
29