Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
18 | public static function create($githubPullRequestStateTest) |
||
19 | { |
||
20 | if ($githubPullRequestStateTest === 'open') { |
||
21 | return new GithubPullRequestOpenState(); |
||
22 | } elseif ($githubPullRequestStateTest === 'closed') { |
||
23 | return new GithubPullRequestClosedState(); |
||
24 | } |
||
25 | |||
26 | throw new Exception($githubPullRequestStateTest.' is not recognized pull request state'); |
||
27 | } |
||
28 | } |
||
29 |