Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 10 | public static function load($hookContent) |
|
20 | { |
||
21 | 10 | $hookContent = self::objectValidation($hookContent); |
|
22 | |||
23 | 6 | if ($hookContent->object_kind === 'push') { |
|
24 | 2 | return new Push($hookContent); |
|
25 | } |
||
26 | |||
27 | 4 | if ($hookContent->tag) { |
|
28 | 2 | return new Tag($hookContent); |
|
29 | } |
||
30 | |||
31 | 2 | return new Build($hookContent); |
|
32 | } |
||
33 | |||
56 |