{"action":"created","comment":{"url":"https://api.github.com/repos/hamcrest/hamcrest-php/pulls/comments/50003251","id":50003251,"diff_hunk":"@@ -19,10 +19,42 @@ public function __construct()\n \n     public function matches($item)\n     {\n+        if ($this->is_hexadecimal($item)) {\n+\n+            return true;\n+        }\n+\n         return is_numeric($item);\n     }\n \n     /**\n+     * This check is necessary because PHP 7 doesn't recognize hexadecimal string as numeric anymore.\n+     *\n+     * If $item is a string and that the string is long enough to be hexadecimal\n+     * Check if it's hexadecimal ($item[1] === 'x')\n+     * And if it is, decode it before to return it to is_numeric.\n+     *\n+     * @param mixed $item\n+     * @return boolean\n+     */\n+    private function is_hexadecimal($item)","path":"hamcrest/Hamcrest/Type/IsNumeric.php","position":22,"original_position":22,"commit_id":"98909c580e9be36d292649fe87172fcf0dad9c82","original_commit_id":"98909c580e9be36d292649fe87172fcf0dad9c82","user":{"login":"aik099","id":1277526,"avatar_url":"https://avatars.githubusercontent.com/u/1277526?v=3","gravatar_id":"","url":"https://api.github.com/users/aik099","html_url":"https://github.com/aik099","followers_url":"https://api.github.com/users/aik099/followers","following_url":"https://api.github.com/users/aik099/following{/other_user}","gists_url":"https://api.github.com/users/aik099/gists{/gist_id}","starred_url":"https://api.github.com/users/aik099/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aik099/subscriptions","organizations_url":"https://api.github.com/users/aik099/orgs","repos_url":"https://api.github.com/users/aik099/repos","events_url":"https://api.github.com/users/aik099/events{/privacy}","received_events_url":"https://api.github.com/users/aik099/received_events","type":"User","site_admin":false},"body":"I think, that through usage of `ctype_xdigit` whole method can be reduced to 1 line, that checks:\r\n\r\n1. if string starts with `0x`\r\n2. rest of the string satisfy the `ctype_xdigit` function","created_at":"2016-01-18T14:23:50Z","updated_at":"2016-01-18T14:23:50Z","html_url":"https://github.com/hamcrest/hamcrest-php/pull/32#discussion_r50003251","pull_request_url":"https://api.github.com/repos/hamcrest/hamcrest-php/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/hamcrest/hamcrest-php/pulls/comments/50003251"},"html":{"href":"https://github.com/hamcrest/hamcrest-php/pull/32#discussion_r50003251"},"pull_request":{"href":"https://api.github.com/repos/hamcrest/hamcrest-php/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/hamcrest/hamcrest-php/pulls/32","id":55266903,"html_url":"https://github.com/hamcrest/hamcrest-php/pull/32","diff_url":"https://github.com/hamcrest/hamcrest-php/pull/32.diff","patch_url":"https://github.com/hamcrest/hamcrest-php/pull/32.patch","issue_url":"https://api.github.com/repos/hamcrest/hamcrest-php/issues/32","number":32,"state":"open","locked":false,"title":"Removing php 7 from the allowed failure","user":{"login":"mikeSimonson","id":907613,"avatar_url":"https://avatars.githubusercontent.com/u/907613?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeSimonson","html_url":"https://github.com/mikeSimonson","followers_url":"https://api.github.com/users/mikeSimonson/followers","following_url":"https://api.github.com/users/mikeSimonson/following{/other_user}","gists_url":"https://api.github.com/users/mikeSimonson/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeSimonson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeSimonson/subscriptions","organizations_url":"https://api.github.com/users/mikeSimonson/orgs","repos_url":"https://api.github.com/users/mikeSimonson/repos","events_url":"https://api.github.com/users/mikeSimonson/events{/privacy}","received_events_url":"https://api.github.com/users/mikeSimonson/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-06T21:26:07Z","updated_at":"2016-01-18T14:23:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cfd93af19c01f702c6d132dd9aeac93e2b586d39","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hamcrest/hamcrest-php/pulls/32/commits","review_comments_url":"https://api.github.com/repos/hamcrest/hamcrest-php/pulls/32/comments","review_comment_url":"https://api.github.com/repos/hamcrest/hamcrest-php/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hamcrest/hamcrest-php/issues/32/comments","statuses_url":"https://api.github.com/repos/hamcrest/hamcrest-php/statuses/98909c580e9be36d292649fe87172fcf0dad9c82","head":{"label":"mikeSimonson:patch-2","ref":"patch-2","sha":"98909c580e9be36d292649fe87172fcf0dad9c82","user":{"login":"mikeSimonson","id":907613,"avatar_url":"https://avatars.githubusercontent.com/u/907613?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeSimonson","html_url":"https://github.com/mikeSimonson","followers_url":"https://api.github.com/users/mikeSimonson/followers","following_url":"https://api.github.com/users/mikeSimonson/following{/other_user}","gists_url":"https://api.github.com/users/mikeSimonson/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeSimonson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeSimonson/subscriptions","organizations_url":"https://api.github.com/users/mikeSimonson/orgs","repos_url":"https://api.github.com/users/mikeSimonson/repos","events_url":"https://api.github.com/users/mikeSimonson/events{/privacy}","received_events_url":"https://api.github.com/users/mikeSimonson/received_events","type":"User","site_admin":false},"repo":{"id":49162566,"name":"hamcrest-php","full_name":"mikeSimonson/hamcrest-php","owner":{"login":"mikeSimonson","id":907613,"avatar_url":"https://avatars.githubusercontent.com/u/907613?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeSimonson","html_url":"https://github.com/mikeSimonson","followers_url":"https://api.github.com/users/mikeSimonson/followers","following_url":"https://api.github.com/users/mikeSimonson/following{/other_user}","gists_url":"https://api.github.com/users/mikeSimonson/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeSimonson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeSimonson/subscriptions","organizations_url":"https://api.github.com/users/mikeSimonson/orgs","repos_url":"https://api.github.com/users/mikeSimonson/repos","events_url":"https://api.github.com/users/mikeSimonson/events{/privacy}","received_events_url":"https://api.github.com/users/mikeSimonson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikeSimonson/hamcrest-php","description":"PHP Hamcrest implementation [Official]","fork":true,"url":"https://api.github.com/repos/mikeSimonson/hamcrest-php","forks_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/forks","keys_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/teams","hooks_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/hooks","issue_events_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/issues/events{/number}","events_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/events","assignees_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/assignees{/user}","branches_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/branches{/branch}","tags_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/tags","blobs_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/statuses/{sha}","languages_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/languages","stargazers_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/stargazers","contributors_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/contributors","subscribers_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/subscribers","subscription_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/subscription","commits_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/contents/{+path}","compare_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/merges","archive_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/downloads","issues_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/issues{/number}","pulls_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/pulls{/number}","milestones_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/milestones{/number}","notifications_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/labels{/name}","releases_url":"https://api.github.com/repos/mikeSimonson/hamcrest-php/releases{/id}","created_at":"2016-01-06T21:24:02Z","updated_at":"2016-01-15T15:35:25Z","pushed_at":"2016-01-15T20:57:39Z","git_url":"git://github.com/mikeSimonson/hamcrest-php.git","ssh_url":"git@github.com:mikeSimonson/hamcrest-php.git","clone_url":"https://github.com/mikeSimonson/hamcrest-php.git","svn_url":"https://github.com/mikeSimonson/hamcrest-php","homepage":"","size":318,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hamcrest:master","ref":"master","sha":"195d9e2ea041e6f70fee6b2b508dc91f9ab48cbd","user":{"login":"hamcrest","id":1595737,"avatar_url":"https://avatars.githubusercontent.com/u/1595737?v=3","gravatar_id":"","url":"https://api.github.com/users/hamcrest","html_url":"https://github.com/hamcrest","followers_url":"https://api.github.com/users/hamcrest/followers","following_url":"https://api.github.com/users/hamcrest/following{/other_user}","gists_url":"https://api.github.com/users/hamcrest/gists{/gist_id}","starred_url":"https://api.github.com/users/hamcrest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hamcrest/subscriptions","organizations_url":"https://api.github.com/users/hamcrest/orgs","repos_url":"https://api.github.com/users/hamcrest/repos","events_url":"https://api.github.com/users/hamcrest/events{/privacy}","received_events_url":"https://api.github.com/users/hamcrest/received_events","type":"Organization","site_admin":false},"repo":{"id":15543026,"name":"hamcrest-php","full_name":"hamcrest/hamcrest-php","owner":{"login":"hamcrest","id":1595737,"avatar_url":"https://avatars.githubusercontent.com/u/1595737?v=3","gravatar_id":"","url":"https://api.github.com/users/hamcrest","html_url":"https://github.com/hamcrest","followers_url":"https://api.github.com/users/hamcrest/followers","following_url":"https://api.github.com/users/hamcrest/following{/other_user}","gists_url":"https://api.github.com/users/hamcrest/gists{/gist_id}","starred_url":"https://api.github.com/users/hamcrest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hamcrest/subscriptions","organizations_url":"https://api.github.com/users/hamcrest/orgs","repos_url":"https://api.github.com/users/hamcrest/repos","events_url":"https://api.github.com/users/hamcrest/events{/privacy}","received_events_url":"https://api.github.com/users/hamcrest/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hamcrest/hamcrest-php","description":"PHP Hamcrest implementation [Official]","fork":false,"url":"https://api.github.com/repos/hamcrest/hamcrest-php","forks_url":"https://api.github.com/repos/hamcrest/hamcrest-php/forks","keys_url":"https://api.github.com/repos/hamcrest/hamcrest-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hamcrest/hamcrest-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hamcrest/hamcrest-php/teams","hooks_url":"https://api.github.com/repos/hamcrest/hamcrest-php/hooks","issue_events_url":"https://api.github.com/repos/hamcrest/hamcrest-php/issues/events{/number}","events_url":"https://api.github.com/repos/hamcrest/hamcrest-php/events","assignees_url":"https://api.github.com/repos/hamcrest/hamcrest-php/assignees{/user}","branches_url":"https://api.github.com/repos/hamcrest/hamcrest-php/branches{/branch}","tags_url":"https://api.github.com/repos/hamcrest/hamcrest-php/tags","blobs_url":"https://api.github.com/repos/hamcrest/hamcrest-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hamcrest/hamcrest-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hamcrest/hamcrest-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/hamcrest/hamcrest-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hamcrest/hamcrest-php/statuses/{sha}","languages_url":"https://api.github.com/repos/hamcrest/hamcrest-php/languages","stargazers_url":"https://api.github.com/repos/hamcrest/hamcrest-php/stargazers","contributors_url":"https://api.github.com/repos/hamcrest/hamcrest-php/contributors","subscribers_url":"https://api.github.com/repos/hamcrest/hamcrest-php/subscribers","subscription_url":"https://api.github.com/repos/hamcrest/hamcrest-php/subscription","commits_url":"https://api.github.com/repos/hamcrest/hamcrest-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/hamcrest/hamcrest-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/hamcrest/hamcrest-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/hamcrest/hamcrest-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/hamcrest/hamcrest-php/contents/{+path}","compare_url":"https://api.github.com/repos/hamcrest/hamcrest-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hamcrest/hamcrest-php/merges","archive_url":"https://api.github.com/repos/hamcrest/hamcrest-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hamcrest/hamcrest-php/downloads","issues_url":"https://api.github.com/repos/hamcrest/hamcrest-php/issues{/number}","pulls_url":"https://api.github.com/repos/hamcrest/hamcrest-php/pulls{/number}","milestones_url":"https://api.github.com/repos/hamcrest/hamcrest-php/milestones{/number}","notifications_url":"https://api.github.com/repos/hamcrest/hamcrest-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hamcrest/hamcrest-php/labels{/name}","releases_url":"https://api.github.com/repos/hamcrest/hamcrest-php/releases{/id}","created_at":"2013-12-31T04:35:35Z","updated_at":"2016-01-16T18:08:17Z","pushed_at":"2016-01-15T20:57:39Z","git_url":"git://github.com/hamcrest/hamcrest-php.git","ssh_url":"git@github.com:hamcrest/hamcrest-php.git","clone_url":"https://github.com/hamcrest/hamcrest-php.git","svn_url":"https://github.com/hamcrest/hamcrest-php","homepage":"","size":320,"stargazers_count":70,"watchers_count":70,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":5,"forks":13,"open_issues":5,"watchers":70,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hamcrest/hamcrest-php/pulls/32"},"html":{"href":"https://github.com/hamcrest/hamcrest-php/pull/32"},"issue":{"href":"https://api.github.com/repos/hamcrest/hamcrest-php/issues/32"},"comments":{"href":"https://api.github.com/repos/hamcrest/hamcrest-php/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/hamcrest/hamcrest-php/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/hamcrest/hamcrest-php/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hamcrest/hamcrest-php/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/hamcrest/hamcrest-php/statuses/98909c580e9be36d292649fe87172fcf0dad9c82"}}}}