DeleteUserAction   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

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