Conditions | 6 |
Paths | 10 |
Total Lines | 17 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
14 | 9 | public static function create(array $step) |
|
15 | { |
||
16 | 9 | $type = isset($step['type']) ? $step['type'] : null; |
|
17 | |||
18 | switch ($type) { |
||
19 | 9 | case Step::TYPE_ACTION: |
|
20 | 2 | return self::createActionStep($step); |
|
21 | 9 | case Step::TYPE_MESSAGE: |
|
22 | 2 | return self::createMessageStep($step); |
|
23 | 9 | case Step::TYPE_MERGE: |
|
24 | 4 | return self::createMergeStep($step); |
|
25 | 8 | case Step::TYPE_STOP: |
|
26 | 7 | return self::createStopStep($step); |
|
27 | 1 | default: |
|
28 | 1 | throw new InvalidStepException('Invalid Step', $step); |
|
29 | 1 | } |
|
30 | } |
||
31 | |||
82 |