CreateFlowCommandHandler   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 6 1
1
<?php
2
3
namespace Hechoenlaravel\JarvisFoundation\Flows\Handler;
4
5
use Hechoenlaravel\JarvisFoundation\Flows\Flow;
6
use Hechoenlaravel\JarvisFoundation\Flows\Events\FlowWasCreated;
7
8
/**
9
 * Class CreateFlowCommandHandler
10
 * @package Hechoenlaravel\JarvisFoundation\Flows\Handler
11
 */
12
class CreateFlowCommandHandler
13
{
14
    /**
15
     * Create the flow in the database
16
     * @param $command
17
     * @return static
18
     */
19
    public function handle($command)
20
    {
21
        $flow = Flow::create((array)$command);
22
        event(new FlowWasCreated($flow));
23
        return $flow;
24
    }
25
}
26