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