CreatePermissionAction   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 8 1
1
<?php
2
3
namespace App\Containers\Authorization\Actions;
4
5
use Apiato\Core\Foundation\Facades\Apiato;
6
use App\Containers\Authorization\Models\Permission;
7
use App\Ship\Parents\Actions\Action;
8
use App\Ship\Transporters\DataTransporter;
9
10
/**
11
 * Class CreatePermissionAction
12
 *
13
 * @author  Mahmoud Zalt  <[email protected]>
14
 */
15
class CreatePermissionAction extends Action
16
{
17
18
    /**
19
     * @param \App\Ship\Transporters\DataTransporter $data
20
     *
21
     * @return  \App\Containers\Authorization\Models\Permission
22
     */
23
    public function run(DataTransporter $data): Permission
24
    {
25
        $permission = Apiato::call('[email protected]',
26
            [$data->name, $data->description, $data->display_name]
27
        );
28
29
        return $permission;
30
    }
31
}
32