DeleteStepCommandHandler   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 7 1
1
<?php
2
3
namespace Hechoenlaravel\JarvisFoundation\Flows\Handler;
4
5
use Hechoenlaravel\JarvisFoundation\Flows\Events\StepWasDeleted;
6
7
/**
8
 * Class DeleteStepCommandHandler
9
 * @package Hechoenlaravel\JarvisFoundation\Flows\Handler
10
 */
11
class DeleteStepCommandHandler
12
{
13
    /**
14
     * @param $command
15
     * @return mixed
16
     */
17
    public function handle($command)
18
    {
19
        $step = $command->step->toArray();
20
        $command->step->delete();
21
        event(new StepWasDeleted($step));
22
        return $step;
23
    }
24
}
25