Completed
Push — master ( 63d559...0e0340 )
by Mahmoud
03:20
created

DeleteRoleAction::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace App\Containers\Authorization\Actions;
4
5
use App\Containers\Authorization\Tasks\DeleteRoleTask;
6
use App\Containers\Authorization\Tasks\GetRoleTask;
7
use App\Ship\Parents\Actions\Action;
8
9
/**
10
 * Class DeleteRoleAction.
11
 *
12
 * @author Mahmoud Zalt <[email protected]>
13
 */
14
class DeleteRoleAction extends Action
15
{
16
    /**
17
     * @param $roleNameOrId
18
     *
19
     * @return  bool
20
     */
21
    public function run($roleNameOrId)
22
    {
23
        $role = $this->call(GetRoleTask::class, [$roleNameOrId]);
24
        $isDeleted = $this->call(DeleteRoleTask::class, [$role]);
25
26
        return $isDeleted;
27
    }
28
}
29