Conditions | 4 |
Paths | 8 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
14 | 2 | public static function fromArray(array $data) |
|
15 | { |
||
16 | 2 | $preCommit = false === array_key_exists('pre-commit', $data) ? |
|
17 | 2 | PreCommitFactory::setUndefined() : PreCommitFactory::fromArray($data['pre-commit']); |
|
18 | 2 | $commitMsg = false === array_key_exists('commit-msg', $data) ? |
|
19 | 2 | CommitMsgFactory::setUndefined() : CommitMsgFactory::fromArray($data['commit-msg']); |
|
20 | 2 | $prePush = false === array_key_exists('pre-push', $data) ? |
|
21 | 2 | PrePushFactory::setUndefined() : PrePushFactory::fromArray($data['pre-push']); |
|
22 | |||
23 | 2 | return new Config($preCommit, $commitMsg, $prePush); |
|
24 | } |
||
25 | } |
||
26 |