for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace DevBoardLib\GithubCore\Milestone\State;
use Exception;
/**
* Class GithubMilestoneStateFactory.
*/
class GithubMilestoneStateFactory
{
* @param $githubMilestoneStateTest
*
* @throws Exception
* @return GithubMilestoneClosedState|GithubMilestoneOpenState
public static function create($githubMilestoneStateTest)
if ($githubMilestoneStateTest === 'open') {
return new GithubMilestoneOpenState();
} elseif ($githubMilestoneStateTest === 'closed') {
return new GithubMilestoneClosedState();
}
throw new Exception($githubMilestoneStateTest.' is not recognized issue state');