CreateStepCommandHandler   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 8 1
1
<?php
2
3
4
namespace Hechoenlaravel\JarvisFoundation\Flows\Handler;
5
6
use Hechoenlaravel\JarvisFoundation\Flows\Events\StepWasCreated;
7
8
class CreateStepCommandHandler
9
{
10
    public function handle($command)
11
    {
12
        $flow = $command->flow;
13
        unset($command->flow);
14
        $step = $flow->steps()->create((array) $command);
15
        event(new StepWasCreated($step));
16
        return $step;
17
    }
18
}
19