{"action":"created","comment":{"url":"https://api.github.com/repos/hoaproject/File/pulls/comments/82552821","pull_request_review_id":3452306,"id":82552821,"diff_hunk":"@@ -134,7 +134,19 @@ public function in($path)\n         }\n \n         foreach ($path as $p) {\n-            $this->_paths[] = $p;\n+            if (1 === preg_match('/[\\*\\?\\[\\]]/', $p)) {","path":"Finder.php","position":5,"original_position":5,"commit_id":"70352ea858770b0b46f2c9664356ec3fbb94a543","original_commit_id":"ba05e9e51ee3328b188aada1dd2cf621d43eb232","user":{"login":"Hywan","id":946104,"avatar_url":"https://avatars.githubusercontent.com/u/946104?v=3","gravatar_id":"","url":"https://api.github.com/users/Hywan","html_url":"https://github.com/Hywan","followers_url":"https://api.github.com/users/Hywan/followers","following_url":"https://api.github.com/users/Hywan/following{/other_user}","gists_url":"https://api.github.com/users/Hywan/gists{/gist_id}","starred_url":"https://api.github.com/users/Hywan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hywan/subscriptions","organizations_url":"https://api.github.com/users/Hywan/orgs","repos_url":"https://api.github.com/users/Hywan/repos","events_url":"https://api.github.com/users/Hywan/events{/privacy}","received_events_url":"https://api.github.com/users/Hywan/received_events","type":"User","site_admin":false},"body":"`preg_match` returns `false` if an error occured, which cannot happen in the `master` because tests will cover this regular expression and they will ensure it is correct ;-).\r\nSo it can return `0` or more if it finds more occurences. If it finds 2 occurences, this `if` condition will return `false`, so it's better to avoid the error case: `0 !== preg_match` is then better.\r\n\r\nMy thought :-).","created_at":"2016-10-10T07:18:53Z","updated_at":"2016-10-10T07:18:53Z","html_url":"https://github.com/hoaproject/File/pull/22#discussion_r82552821","pull_request_url":"https://api.github.com/repos/hoaproject/File/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/hoaproject/File/pulls/comments/82552821"},"html":{"href":"https://github.com/hoaproject/File/pull/22#discussion_r82552821"},"pull_request":{"href":"https://api.github.com/repos/hoaproject/File/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/hoaproject/File/pulls/22","id":50617282,"html_url":"https://github.com/hoaproject/File/pull/22","diff_url":"https://github.com/hoaproject/File/pull/22.diff","patch_url":"https://github.com/hoaproject/File/pull/22.patch","issue_url":"https://api.github.com/repos/hoaproject/File/issues/22","number":22,"state":"open","locked":false,"title":"Add glob support in the finder","user":{"login":"shulard","id":482993,"avatar_url":"https://avatars.githubusercontent.com/u/482993?v=3","gravatar_id":"","url":"https://api.github.com/users/shulard","html_url":"https://github.com/shulard","followers_url":"https://api.github.com/users/shulard/followers","following_url":"https://api.github.com/users/shulard/following{/other_user}","gists_url":"https://api.github.com/users/shulard/gists{/gist_id}","starred_url":"https://api.github.com/users/shulard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shulard/subscriptions","organizations_url":"https://api.github.com/users/shulard/orgs","repos_url":"https://api.github.com/users/shulard/repos","events_url":"https://api.github.com/users/shulard/events{/privacy}","received_events_url":"https://api.github.com/users/shulard/received_events","type":"User","site_admin":false},"body":"Fix #18.\r\n\r\nWith that update if you specify a path like \"/*emp\" or \"/{a,b,c}*.php\", it will be processed nicely.\r\n\r\nExample:\r\n```php\r\n<?php\r\n$finder = (new Finder())->in([\"/*emp\", \"/{a,b,c}*.php\"]);\r\n```\r\n\r\nDoes not use the `Iterator\\Glob` implementation here because it does not have the GLOB_ONLYDIR filter. It can be replaced with a combination of `Iterator\\CallbackFilter` and `Iterator\\Glob` but it seems more complex which is not suitable here...","created_at":"2015-11-13T08:55:18Z","updated_at":"2016-10-10T07:18:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"16b0b20d1e5f6a582528a1a8b588339b8cdfae19","assignee":{"login":"Jir4","id":717155,"avatar_url":"https://avatars.githubusercontent.com/u/717155?v=3","gravatar_id":"","url":"https://api.github.com/users/Jir4","html_url":"https://github.com/Jir4","followers_url":"https://api.github.com/users/Jir4/followers","following_url":"https://api.github.com/users/Jir4/following{/other_user}","gists_url":"https://api.github.com/users/Jir4/gists{/gist_id}","starred_url":"https://api.github.com/users/Jir4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jir4/subscriptions","organizations_url":"https://api.github.com/users/Jir4/orgs","repos_url":"https://api.github.com/users/Jir4/repos","events_url":"https://api.github.com/users/Jir4/events{/privacy}","received_events_url":"https://api.github.com/users/Jir4/received_events","type":"User","site_admin":false},"assignees":[{"login":"Jir4","id":717155,"avatar_url":"https://avatars.githubusercontent.com/u/717155?v=3","gravatar_id":"","url":"https://api.github.com/users/Jir4","html_url":"https://github.com/Jir4","followers_url":"https://api.github.com/users/Jir4/followers","following_url":"https://api.github.com/users/Jir4/following{/other_user}","gists_url":"https://api.github.com/users/Jir4/gists{/gist_id}","starred_url":"https://api.github.com/users/Jir4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jir4/subscriptions","organizations_url":"https://api.github.com/users/Jir4/orgs","repos_url":"https://api.github.com/users/Jir4/repos","events_url":"https://api.github.com/users/Jir4/events{/privacy}","received_events_url":"https://api.github.com/users/Jir4/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/hoaproject/File/pulls/22/commits","review_comments_url":"https://api.github.com/repos/hoaproject/File/pulls/22/comments","review_comment_url":"https://api.github.com/repos/hoaproject/File/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hoaproject/File/issues/22/comments","statuses_url":"https://api.github.com/repos/hoaproject/File/statuses/70352ea858770b0b46f2c9664356ec3fbb94a543","head":{"label":"shulard:features/issue-18","ref":"features/issue-18","sha":"70352ea858770b0b46f2c9664356ec3fbb94a543","user":{"login":"shulard","id":482993,"avatar_url":"https://avatars.githubusercontent.com/u/482993?v=3","gravatar_id":"","url":"https://api.github.com/users/shulard","html_url":"https://github.com/shulard","followers_url":"https://api.github.com/users/shulard/followers","following_url":"https://api.github.com/users/shulard/following{/other_user}","gists_url":"https://api.github.com/users/shulard/gists{/gist_id}","starred_url":"https://api.github.com/users/shulard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shulard/subscriptions","organizations_url":"https://api.github.com/users/shulard/orgs","repos_url":"https://api.github.com/users/shulard/repos","events_url":"https://api.github.com/users/shulard/events{/privacy}","received_events_url":"https://api.github.com/users/shulard/received_events","type":"User","site_admin":false},"repo":{"id":40115894,"name":"File","full_name":"shulard/File","owner":{"login":"shulard","id":482993,"avatar_url":"https://avatars.githubusercontent.com/u/482993?v=3","gravatar_id":"","url":"https://api.github.com/users/shulard","html_url":"https://github.com/shulard","followers_url":"https://api.github.com/users/shulard/followers","following_url":"https://api.github.com/users/shulard/following{/other_user}","gists_url":"https://api.github.com/users/shulard/gists{/gist_id}","starred_url":"https://api.github.com/users/shulard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shulard/subscriptions","organizations_url":"https://api.github.com/users/shulard/orgs","repos_url":"https://api.github.com/users/shulard/repos","events_url":"https://api.github.com/users/shulard/events{/privacy}","received_events_url":"https://api.github.com/users/shulard/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shulard/File","description":"The Hoa\\File library.","fork":true,"url":"https://api.github.com/repos/shulard/File","forks_url":"https://api.github.com/repos/shulard/File/forks","keys_url":"https://api.github.com/repos/shulard/File/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shulard/File/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shulard/File/teams","hooks_url":"https://api.github.com/repos/shulard/File/hooks","issue_events_url":"https://api.github.com/repos/shulard/File/issues/events{/number}","events_url":"https://api.github.com/repos/shulard/File/events","assignees_url":"https://api.github.com/repos/shulard/File/assignees{/user}","branches_url":"https://api.github.com/repos/shulard/File/branches{/branch}","tags_url":"https://api.github.com/repos/shulard/File/tags","blobs_url":"https://api.github.com/repos/shulard/File/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shulard/File/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shulard/File/git/refs{/sha}","trees_url":"https://api.github.com/repos/shulard/File/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shulard/File/statuses/{sha}","languages_url":"https://api.github.com/repos/shulard/File/languages","stargazers_url":"https://api.github.com/repos/shulard/File/stargazers","contributors_url":"https://api.github.com/repos/shulard/File/contributors","subscribers_url":"https://api.github.com/repos/shulard/File/subscribers","subscription_url":"https://api.github.com/repos/shulard/File/subscription","commits_url":"https://api.github.com/repos/shulard/File/commits{/sha}","git_commits_url":"https://api.github.com/repos/shulard/File/git/commits{/sha}","comments_url":"https://api.github.com/repos/shulard/File/comments{/number}","issue_comment_url":"https://api.github.com/repos/shulard/File/issues/comments{/number}","contents_url":"https://api.github.com/repos/shulard/File/contents/{+path}","compare_url":"https://api.github.com/repos/shulard/File/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shulard/File/merges","archive_url":"https://api.github.com/repos/shulard/File/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shulard/File/downloads","issues_url":"https://api.github.com/repos/shulard/File/issues{/number}","pulls_url":"https://api.github.com/repos/shulard/File/pulls{/number}","milestones_url":"https://api.github.com/repos/shulard/File/milestones{/number}","notifications_url":"https://api.github.com/repos/shulard/File/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shulard/File/labels{/name}","releases_url":"https://api.github.com/repos/shulard/File/releases{/id}","deployments_url":"https://api.github.com/repos/shulard/File/deployments","created_at":"2015-08-03T09:16:07Z","updated_at":"2016-01-12T12:26:57Z","pushed_at":"2016-10-07T15:30:22Z","git_url":"git://github.com/shulard/File.git","ssh_url":"git@github.com:shulard/File.git","clone_url":"https://github.com/shulard/File.git","svn_url":"https://github.com/shulard/File","homepage":"http://hoa-project.net/","size":221,"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":"hoaproject:master","ref":"master","sha":"08b4951cad8b2ed45550ac298f57a69b62b2fec6","user":{"login":"hoaproject","id":1519718,"avatar_url":"https://avatars.githubusercontent.com/u/1519718?v=3","gravatar_id":"","url":"https://api.github.com/users/hoaproject","html_url":"https://github.com/hoaproject","followers_url":"https://api.github.com/users/hoaproject/followers","following_url":"https://api.github.com/users/hoaproject/following{/other_user}","gists_url":"https://api.github.com/users/hoaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/hoaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoaproject/subscriptions","organizations_url":"https://api.github.com/users/hoaproject/orgs","repos_url":"https://api.github.com/users/hoaproject/repos","events_url":"https://api.github.com/users/hoaproject/events{/privacy}","received_events_url":"https://api.github.com/users/hoaproject/received_events","type":"Organization","site_admin":false},"repo":{"id":5538824,"name":"File","full_name":"hoaproject/File","owner":{"login":"hoaproject","id":1519718,"avatar_url":"https://avatars.githubusercontent.com/u/1519718?v=3","gravatar_id":"","url":"https://api.github.com/users/hoaproject","html_url":"https://github.com/hoaproject","followers_url":"https://api.github.com/users/hoaproject/followers","following_url":"https://api.github.com/users/hoaproject/following{/other_user}","gists_url":"https://api.github.com/users/hoaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/hoaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoaproject/subscriptions","organizations_url":"https://api.github.com/users/hoaproject/orgs","repos_url":"https://api.github.com/users/hoaproject/repos","events_url":"https://api.github.com/users/hoaproject/events{/privacy}","received_events_url":"https://api.github.com/users/hoaproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hoaproject/File","description":"The Hoa\\File library.","fork":false,"url":"https://api.github.com/repos/hoaproject/File","forks_url":"https://api.github.com/repos/hoaproject/File/forks","keys_url":"https://api.github.com/repos/hoaproject/File/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hoaproject/File/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hoaproject/File/teams","hooks_url":"https://api.github.com/repos/hoaproject/File/hooks","issue_events_url":"https://api.github.com/repos/hoaproject/File/issues/events{/number}","events_url":"https://api.github.com/repos/hoaproject/File/events","assignees_url":"https://api.github.com/repos/hoaproject/File/assignees{/user}","branches_url":"https://api.github.com/repos/hoaproject/File/branches{/branch}","tags_url":"https://api.github.com/repos/hoaproject/File/tags","blobs_url":"https://api.github.com/repos/hoaproject/File/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hoaproject/File/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hoaproject/File/git/refs{/sha}","trees_url":"https://api.github.com/repos/hoaproject/File/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hoaproject/File/statuses/{sha}","languages_url":"https://api.github.com/repos/hoaproject/File/languages","stargazers_url":"https://api.github.com/repos/hoaproject/File/stargazers","contributors_url":"https://api.github.com/repos/hoaproject/File/contributors","subscribers_url":"https://api.github.com/repos/hoaproject/File/subscribers","subscription_url":"https://api.github.com/repos/hoaproject/File/subscription","commits_url":"https://api.github.com/repos/hoaproject/File/commits{/sha}","git_commits_url":"https://api.github.com/repos/hoaproject/File/git/commits{/sha}","comments_url":"https://api.github.com/repos/hoaproject/File/comments{/number}","issue_comment_url":"https://api.github.com/repos/hoaproject/File/issues/comments{/number}","contents_url":"https://api.github.com/repos/hoaproject/File/contents/{+path}","compare_url":"https://api.github.com/repos/hoaproject/File/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hoaproject/File/merges","archive_url":"https://api.github.com/repos/hoaproject/File/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hoaproject/File/downloads","issues_url":"https://api.github.com/repos/hoaproject/File/issues{/number}","pulls_url":"https://api.github.com/repos/hoaproject/File/pulls{/number}","milestones_url":"https://api.github.com/repos/hoaproject/File/milestones{/number}","notifications_url":"https://api.github.com/repos/hoaproject/File/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hoaproject/File/labels{/name}","releases_url":"https://api.github.com/repos/hoaproject/File/releases{/id}","deployments_url":"https://api.github.com/repos/hoaproject/File/deployments","created_at":"2012-08-24T10:31:04Z","updated_at":"2016-08-12T04:41:59Z","pushed_at":"2016-10-07T15:30:22Z","git_url":"git://github.com/hoaproject/File.git","ssh_url":"git@github.com:hoaproject/File.git","clone_url":"https://github.com/hoaproject/File.git","svn_url":"https://github.com/hoaproject/File","homepage":"http://hoa-project.net/","size":251,"stargazers_count":15,"watchers_count":15,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":2,"forks":10,"open_issues":2,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hoaproject/File/pulls/22"},"html":{"href":"https://github.com/hoaproject/File/pull/22"},"issue":{"href":"https://api.github.com/repos/hoaproject/File/issues/22"},"comments":{"href":"https://api.github.com/repos/hoaproject/File/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/hoaproject/File/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/hoaproject/File/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hoaproject/File/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/hoaproject/File/statuses/70352ea858770b0b46f2c9664356ec3fbb94a543"}}}}
{"actor":{"display_login":"Hywan"}}