| Conditions | 5 |
| Paths | 5 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 19 | public static function create($githubCommitStateTest) |
||
| 20 | { |
||
| 21 | if ($githubCommitStateTest === 'pending') { |
||
| 22 | return new GithubCommitPendingState(); |
||
| 23 | } elseif ($githubCommitStateTest === 'success') { |
||
| 24 | return new GithubCommitSuccessState(); |
||
| 25 | } elseif ($githubCommitStateTest === 'failure') { |
||
| 26 | return new GithubCommitFailureState(); |
||
| 27 | } elseif ($githubCommitStateTest === 'error') { |
||
| 28 | return new GithubCommitErrorState(); |
||
| 29 | } |
||
| 30 | |||
| 31 | throw new Exception($githubCommitStateTest.' is not recognized commit state'); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |