{"action":"created","comment":{"url":"https://api.github.com/repos/marc-mabe/php-enum/pulls/comments/40596982","id":40596982,"diff_hunk":"@@ -268,6 +268,22 @@ public function __toString()\n     }\n \n     /**\n+     * @param static|null|bool|int|float|string $value\n+     * @return bool\n+     */\n+    final public static function has($value)\n+    {\n+        if ($value instanceof static && get_class($value) === get_called_class()) {\n+            return true;\n+        }\n+\n+        $class     = get_called_class();\n+        $constants = self::detectConstants($class);\n+        $name      = array_search($value, $constants, true);\n+        return $name !== false;","path":"src/Enum.php","position":16,"original_position":16,"commit_id":"563b67b07338c7ec2b043df4f124868198d5bd07","original_commit_id":"563b67b07338c7ec2b043df4f124868198d5bd07","user":{"login":"marc-mabe","id":302689,"avatar_url":"https://avatars.githubusercontent.com/u/302689?v=3","gravatar_id":"","url":"https://api.github.com/users/marc-mabe","html_url":"https://github.com/marc-mabe","followers_url":"https://api.github.com/users/marc-mabe/followers","following_url":"https://api.github.com/users/marc-mabe/following{/other_user}","gists_url":"https://api.github.com/users/marc-mabe/gists{/gist_id}","starred_url":"https://api.github.com/users/marc-mabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marc-mabe/subscriptions","organizations_url":"https://api.github.com/users/marc-mabe/orgs","repos_url":"https://api.github.com/users/marc-mabe/repos","events_url":"https://api.github.com/users/marc-mabe/events{/privacy}","received_events_url":"https://api.github.com/users/marc-mabe/received_events","type":"User","site_admin":false},"body":"`return in_array($value, $constants, true);`","created_at":"2015-09-28T19:52:51Z","updated_at":"2015-09-28T19:52:51Z","html_url":"https://github.com/marc-mabe/php-enum/pull/53#discussion_r40596982","pull_request_url":"https://api.github.com/repos/marc-mabe/php-enum/pulls/53","_links":{"self":{"href":"https://api.github.com/repos/marc-mabe/php-enum/pulls/comments/40596982"},"html":{"href":"https://github.com/marc-mabe/php-enum/pull/53#discussion_r40596982"},"pull_request":{"href":"https://api.github.com/repos/marc-mabe/php-enum/pulls/53"}}},"pull_request":{"url":"https://api.github.com/repos/marc-mabe/php-enum/pulls/53","id":46140049,"html_url":"https://github.com/marc-mabe/php-enum/pull/53","diff_url":"https://github.com/marc-mabe/php-enum/pull/53.diff","patch_url":"https://github.com/marc-mabe/php-enum/pull/53.patch","issue_url":"https://api.github.com/repos/marc-mabe/php-enum/issues/53","number":53,"state":"open","locked":false,"title":"add isValid* methods","user":{"login":"prolic","id":394428,"avatar_url":"https://avatars.githubusercontent.com/u/394428?v=3","gravatar_id":"","url":"https://api.github.com/users/prolic","html_url":"https://github.com/prolic","followers_url":"https://api.github.com/users/prolic/followers","following_url":"https://api.github.com/users/prolic/following{/other_user}","gists_url":"https://api.github.com/users/prolic/gists{/gist_id}","starred_url":"https://api.github.com/users/prolic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prolic/subscriptions","organizations_url":"https://api.github.com/users/prolic/orgs","repos_url":"https://api.github.com/users/prolic/repos","events_url":"https://api.github.com/users/prolic/events{/privacy}","received_events_url":"https://api.github.com/users/prolic/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-28T10:14:53Z","updated_at":"2015-09-28T19:52:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"779c324a7cada97c43a725573931031cfc3a3567","assignee":{"login":"marc-mabe","id":302689,"avatar_url":"https://avatars.githubusercontent.com/u/302689?v=3","gravatar_id":"","url":"https://api.github.com/users/marc-mabe","html_url":"https://github.com/marc-mabe","followers_url":"https://api.github.com/users/marc-mabe/followers","following_url":"https://api.github.com/users/marc-mabe/following{/other_user}","gists_url":"https://api.github.com/users/marc-mabe/gists{/gist_id}","starred_url":"https://api.github.com/users/marc-mabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marc-mabe/subscriptions","organizations_url":"https://api.github.com/users/marc-mabe/orgs","repos_url":"https://api.github.com/users/marc-mabe/repos","events_url":"https://api.github.com/users/marc-mabe/events{/privacy}","received_events_url":"https://api.github.com/users/marc-mabe/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/marc-mabe/php-enum/pulls/53/commits","review_comments_url":"https://api.github.com/repos/marc-mabe/php-enum/pulls/53/comments","review_comment_url":"https://api.github.com/repos/marc-mabe/php-enum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/marc-mabe/php-enum/issues/53/comments","statuses_url":"https://api.github.com/repos/marc-mabe/php-enum/statuses/563b67b07338c7ec2b043df4f124868198d5bd07","head":{"label":"prolic:isValid_2","ref":"isValid_2","sha":"563b67b07338c7ec2b043df4f124868198d5bd07","user":{"login":"prolic","id":394428,"avatar_url":"https://avatars.githubusercontent.com/u/394428?v=3","gravatar_id":"","url":"https://api.github.com/users/prolic","html_url":"https://github.com/prolic","followers_url":"https://api.github.com/users/prolic/followers","following_url":"https://api.github.com/users/prolic/following{/other_user}","gists_url":"https://api.github.com/users/prolic/gists{/gist_id}","starred_url":"https://api.github.com/users/prolic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prolic/subscriptions","organizations_url":"https://api.github.com/users/prolic/orgs","repos_url":"https://api.github.com/users/prolic/repos","events_url":"https://api.github.com/users/prolic/events{/privacy}","received_events_url":"https://api.github.com/users/prolic/received_events","type":"User","site_admin":false},"repo":{"id":12247745,"name":"php-enum","full_name":"prolic/php-enum","owner":{"login":"prolic","id":394428,"avatar_url":"https://avatars.githubusercontent.com/u/394428?v=3","gravatar_id":"","url":"https://api.github.com/users/prolic","html_url":"https://github.com/prolic","followers_url":"https://api.github.com/users/prolic/followers","following_url":"https://api.github.com/users/prolic/following{/other_user}","gists_url":"https://api.github.com/users/prolic/gists{/gist_id}","starred_url":"https://api.github.com/users/prolic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prolic/subscriptions","organizations_url":"https://api.github.com/users/prolic/orgs","repos_url":"https://api.github.com/users/prolic/repos","events_url":"https://api.github.com/users/prolic/events{/privacy}","received_events_url":"https://api.github.com/users/prolic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/prolic/php-enum","description":"Enumerations for PHP 5 (without SplEnum)","fork":true,"url":"https://api.github.com/repos/prolic/php-enum","forks_url":"https://api.github.com/repos/prolic/php-enum/forks","keys_url":"https://api.github.com/repos/prolic/php-enum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prolic/php-enum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prolic/php-enum/teams","hooks_url":"https://api.github.com/repos/prolic/php-enum/hooks","issue_events_url":"https://api.github.com/repos/prolic/php-enum/issues/events{/number}","events_url":"https://api.github.com/repos/prolic/php-enum/events","assignees_url":"https://api.github.com/repos/prolic/php-enum/assignees{/user}","branches_url":"https://api.github.com/repos/prolic/php-enum/branches{/branch}","tags_url":"https://api.github.com/repos/prolic/php-enum/tags","blobs_url":"https://api.github.com/repos/prolic/php-enum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prolic/php-enum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prolic/php-enum/git/refs{/sha}","trees_url":"https://api.github.com/repos/prolic/php-enum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prolic/php-enum/statuses/{sha}","languages_url":"https://api.github.com/repos/prolic/php-enum/languages","stargazers_url":"https://api.github.com/repos/prolic/php-enum/stargazers","contributors_url":"https://api.github.com/repos/prolic/php-enum/contributors","subscribers_url":"https://api.github.com/repos/prolic/php-enum/subscribers","subscription_url":"https://api.github.com/repos/prolic/php-enum/subscription","commits_url":"https://api.github.com/repos/prolic/php-enum/commits{/sha}","git_commits_url":"https://api.github.com/repos/prolic/php-enum/git/commits{/sha}","comments_url":"https://api.github.com/repos/prolic/php-enum/comments{/number}","issue_comment_url":"https://api.github.com/repos/prolic/php-enum/issues/comments{/number}","contents_url":"https://api.github.com/repos/prolic/php-enum/contents/{+path}","compare_url":"https://api.github.com/repos/prolic/php-enum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prolic/php-enum/merges","archive_url":"https://api.github.com/repos/prolic/php-enum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prolic/php-enum/downloads","issues_url":"https://api.github.com/repos/prolic/php-enum/issues{/number}","pulls_url":"https://api.github.com/repos/prolic/php-enum/pulls{/number}","milestones_url":"https://api.github.com/repos/prolic/php-enum/milestones{/number}","notifications_url":"https://api.github.com/repos/prolic/php-enum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prolic/php-enum/labels{/name}","releases_url":"https://api.github.com/repos/prolic/php-enum/releases{/id}","created_at":"2013-08-20T16:14:45Z","updated_at":"2015-02-09T12:53:33Z","pushed_at":"2015-09-28T19:48:00Z","git_url":"git://github.com/prolic/php-enum.git","ssh_url":"git@github.com:prolic/php-enum.git","clone_url":"https://github.com/prolic/php-enum.git","svn_url":"https://github.com/prolic/php-enum","homepage":"","size":303,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"marc-mabe:master","ref":"master","sha":"beebad172596591dac032927cf1473c6095a772b","user":{"login":"marc-mabe","id":302689,"avatar_url":"https://avatars.githubusercontent.com/u/302689?v=3","gravatar_id":"","url":"https://api.github.com/users/marc-mabe","html_url":"https://github.com/marc-mabe","followers_url":"https://api.github.com/users/marc-mabe/followers","following_url":"https://api.github.com/users/marc-mabe/following{/other_user}","gists_url":"https://api.github.com/users/marc-mabe/gists{/gist_id}","starred_url":"https://api.github.com/users/marc-mabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marc-mabe/subscriptions","organizations_url":"https://api.github.com/users/marc-mabe/orgs","repos_url":"https://api.github.com/users/marc-mabe/repos","events_url":"https://api.github.com/users/marc-mabe/events{/privacy}","received_events_url":"https://api.github.com/users/marc-mabe/received_events","type":"User","site_admin":false},"repo":{"id":5460593,"name":"php-enum","full_name":"marc-mabe/php-enum","owner":{"login":"marc-mabe","id":302689,"avatar_url":"https://avatars.githubusercontent.com/u/302689?v=3","gravatar_id":"","url":"https://api.github.com/users/marc-mabe","html_url":"https://github.com/marc-mabe","followers_url":"https://api.github.com/users/marc-mabe/followers","following_url":"https://api.github.com/users/marc-mabe/following{/other_user}","gists_url":"https://api.github.com/users/marc-mabe/gists{/gist_id}","starred_url":"https://api.github.com/users/marc-mabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marc-mabe/subscriptions","organizations_url":"https://api.github.com/users/marc-mabe/orgs","repos_url":"https://api.github.com/users/marc-mabe/repos","events_url":"https://api.github.com/users/marc-mabe/events{/privacy}","received_events_url":"https://api.github.com/users/marc-mabe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/marc-mabe/php-enum","description":"Simple and fast implementation of enumerations with native PHP 5.3 and upper","fork":false,"url":"https://api.github.com/repos/marc-mabe/php-enum","forks_url":"https://api.github.com/repos/marc-mabe/php-enum/forks","keys_url":"https://api.github.com/repos/marc-mabe/php-enum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marc-mabe/php-enum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marc-mabe/php-enum/teams","hooks_url":"https://api.github.com/repos/marc-mabe/php-enum/hooks","issue_events_url":"https://api.github.com/repos/marc-mabe/php-enum/issues/events{/number}","events_url":"https://api.github.com/repos/marc-mabe/php-enum/events","assignees_url":"https://api.github.com/repos/marc-mabe/php-enum/assignees{/user}","branches_url":"https://api.github.com/repos/marc-mabe/php-enum/branches{/branch}","tags_url":"https://api.github.com/repos/marc-mabe/php-enum/tags","blobs_url":"https://api.github.com/repos/marc-mabe/php-enum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marc-mabe/php-enum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marc-mabe/php-enum/git/refs{/sha}","trees_url":"https://api.github.com/repos/marc-mabe/php-enum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marc-mabe/php-enum/statuses/{sha}","languages_url":"https://api.github.com/repos/marc-mabe/php-enum/languages","stargazers_url":"https://api.github.com/repos/marc-mabe/php-enum/stargazers","contributors_url":"https://api.github.com/repos/marc-mabe/php-enum/contributors","subscribers_url":"https://api.github.com/repos/marc-mabe/php-enum/subscribers","subscription_url":"https://api.github.com/repos/marc-mabe/php-enum/subscription","commits_url":"https://api.github.com/repos/marc-mabe/php-enum/commits{/sha}","git_commits_url":"https://api.github.com/repos/marc-mabe/php-enum/git/commits{/sha}","comments_url":"https://api.github.com/repos/marc-mabe/php-enum/comments{/number}","issue_comment_url":"https://api.github.com/repos/marc-mabe/php-enum/issues/comments{/number}","contents_url":"https://api.github.com/repos/marc-mabe/php-enum/contents/{+path}","compare_url":"https://api.github.com/repos/marc-mabe/php-enum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marc-mabe/php-enum/merges","archive_url":"https://api.github.com/repos/marc-mabe/php-enum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marc-mabe/php-enum/downloads","issues_url":"https://api.github.com/repos/marc-mabe/php-enum/issues{/number}","pulls_url":"https://api.github.com/repos/marc-mabe/php-enum/pulls{/number}","milestones_url":"https://api.github.com/repos/marc-mabe/php-enum/milestones{/number}","notifications_url":"https://api.github.com/repos/marc-mabe/php-enum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marc-mabe/php-enum/labels{/name}","releases_url":"https://api.github.com/repos/marc-mabe/php-enum/releases{/id}","created_at":"2012-08-18T05:52:49Z","updated_at":"2015-09-03T10:46:16Z","pushed_at":"2015-09-28T19:48:01Z","git_url":"git://github.com/marc-mabe/php-enum.git","ssh_url":"git@github.com:marc-mabe/php-enum.git","clone_url":"https://github.com/marc-mabe/php-enum.git","svn_url":"https://github.com/marc-mabe/php-enum","homepage":"","size":871,"stargazers_count":89,"watchers_count":89,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":2,"forks":14,"open_issues":2,"watchers":89,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/marc-mabe/php-enum/pulls/53"},"html":{"href":"https://github.com/marc-mabe/php-enum/pull/53"},"issue":{"href":"https://api.github.com/repos/marc-mabe/php-enum/issues/53"},"comments":{"href":"https://api.github.com/repos/marc-mabe/php-enum/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/marc-mabe/php-enum/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/marc-mabe/php-enum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/marc-mabe/php-enum/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/marc-mabe/php-enum/statuses/563b67b07338c7ec2b043df4f124868198d5bd07"}}}}