{"action":"opened","number":2247,"pull_request":{"url":"https://api.github.com/repos/Codeception/Codeception/pulls/2247","id":41775940,"html_url":"https://github.com/Codeception/Codeception/pull/2247","diff_url":"https://github.com/Codeception/Codeception/pull/2247.diff","patch_url":"https://github.com/Codeception/Codeception/pull/2247.patch","issue_url":"https://api.github.com/repos/Codeception/Codeception/issues/2247","number":2247,"state":"open","locked":false,"title":"Improves performance of getClassesFromFile method of the parser","user":{"login":"Green-Cat","id":3328823,"avatar_url":"https://avatars.githubusercontent.com/u/3328823?v=3","gravatar_id":"","url":"https://api.github.com/users/Green-Cat","html_url":"https://github.com/Green-Cat","followers_url":"https://api.github.com/users/Green-Cat/followers","following_url":"https://api.github.com/users/Green-Cat/following{/other_user}","gists_url":"https://api.github.com/users/Green-Cat/gists{/gist_id}","starred_url":"https://api.github.com/users/Green-Cat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Green-Cat/subscriptions","organizations_url":"https://api.github.com/users/Green-Cat/orgs","repos_url":"https://api.github.com/users/Green-Cat/repos","events_url":"https://api.github.com/users/Green-Cat/events{/privacy}","received_events_url":"https://api.github.com/users/Green-Cat/received_events","type":"User","site_admin":false},"body":"Due to the way for loops are implemented in php, the count function will run every iteration of the loop. Therefore, moving the count to a variable, calculated before the start of the loop, improves performance (less function calls).","created_at":"2015-08-06T11:05:13Z","updated_at":"2015-08-06T11:05:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Codeception/Codeception/pulls/2247/commits","review_comments_url":"https://api.github.com/repos/Codeception/Codeception/pulls/2247/comments","review_comment_url":"https://api.github.com/repos/Codeception/Codeception/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Codeception/Codeception/issues/2247/comments","statuses_url":"https://api.github.com/repos/Codeception/Codeception/statuses/45d1ef968c7f1b79fe2e7227c22163ae9ddc5409","head":{"label":"Green-Cat:patch-1","ref":"patch-1","sha":"45d1ef968c7f1b79fe2e7227c22163ae9ddc5409","user":{"login":"Green-Cat","id":3328823,"avatar_url":"https://avatars.githubusercontent.com/u/3328823?v=3","gravatar_id":"","url":"https://api.github.com/users/Green-Cat","html_url":"https://github.com/Green-Cat","followers_url":"https://api.github.com/users/Green-Cat/followers","following_url":"https://api.github.com/users/Green-Cat/following{/other_user}","gists_url":"https://api.github.com/users/Green-Cat/gists{/gist_id}","starred_url":"https://api.github.com/users/Green-Cat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Green-Cat/subscriptions","organizations_url":"https://api.github.com/users/Green-Cat/orgs","repos_url":"https://api.github.com/users/Green-Cat/repos","events_url":"https://api.github.com/users/Green-Cat/events{/privacy}","received_events_url":"https://api.github.com/users/Green-Cat/received_events","type":"User","site_admin":false},"repo":{"id":40300329,"name":"Codeception","full_name":"Green-Cat/Codeception","owner":{"login":"Green-Cat","id":3328823,"avatar_url":"https://avatars.githubusercontent.com/u/3328823?v=3","gravatar_id":"","url":"https://api.github.com/users/Green-Cat","html_url":"https://github.com/Green-Cat","followers_url":"https://api.github.com/users/Green-Cat/followers","following_url":"https://api.github.com/users/Green-Cat/following{/other_user}","gists_url":"https://api.github.com/users/Green-Cat/gists{/gist_id}","starred_url":"https://api.github.com/users/Green-Cat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Green-Cat/subscriptions","organizations_url":"https://api.github.com/users/Green-Cat/orgs","repos_url":"https://api.github.com/users/Green-Cat/repos","events_url":"https://api.github.com/users/Green-Cat/events{/privacy}","received_events_url":"https://api.github.com/users/Green-Cat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Green-Cat/Codeception","description":"Full-stack testing PHP framework","fork":true,"url":"https://api.github.com/repos/Green-Cat/Codeception","forks_url":"https://api.github.com/repos/Green-Cat/Codeception/forks","keys_url":"https://api.github.com/repos/Green-Cat/Codeception/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Green-Cat/Codeception/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Green-Cat/Codeception/teams","hooks_url":"https://api.github.com/repos/Green-Cat/Codeception/hooks","issue_events_url":"https://api.github.com/repos/Green-Cat/Codeception/issues/events{/number}","events_url":"https://api.github.com/repos/Green-Cat/Codeception/events","assignees_url":"https://api.github.com/repos/Green-Cat/Codeception/assignees{/user}","branches_url":"https://api.github.com/repos/Green-Cat/Codeception/branches{/branch}","tags_url":"https://api.github.com/repos/Green-Cat/Codeception/tags","blobs_url":"https://api.github.com/repos/Green-Cat/Codeception/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Green-Cat/Codeception/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Green-Cat/Codeception/git/refs{/sha}","trees_url":"https://api.github.com/repos/Green-Cat/Codeception/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Green-Cat/Codeception/statuses/{sha}","languages_url":"https://api.github.com/repos/Green-Cat/Codeception/languages","stargazers_url":"https://api.github.com/repos/Green-Cat/Codeception/stargazers","contributors_url":"https://api.github.com/repos/Green-Cat/Codeception/contributors","subscribers_url":"https://api.github.com/repos/Green-Cat/Codeception/subscribers","subscription_url":"https://api.github.com/repos/Green-Cat/Codeception/subscription","commits_url":"https://api.github.com/repos/Green-Cat/Codeception/commits{/sha}","git_commits_url":"https://api.github.com/repos/Green-Cat/Codeception/git/commits{/sha}","comments_url":"https://api.github.com/repos/Green-Cat/Codeception/comments{/number}","issue_comment_url":"https://api.github.com/repos/Green-Cat/Codeception/issues/comments{/number}","contents_url":"https://api.github.com/repos/Green-Cat/Codeception/contents/{+path}","compare_url":"https://api.github.com/repos/Green-Cat/Codeception/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Green-Cat/Codeception/merges","archive_url":"https://api.github.com/repos/Green-Cat/Codeception/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Green-Cat/Codeception/downloads","issues_url":"https://api.github.com/repos/Green-Cat/Codeception/issues{/number}","pulls_url":"https://api.github.com/repos/Green-Cat/Codeception/pulls{/number}","milestones_url":"https://api.github.com/repos/Green-Cat/Codeception/milestones{/number}","notifications_url":"https://api.github.com/repos/Green-Cat/Codeception/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Green-Cat/Codeception/labels{/name}","releases_url":"https://api.github.com/repos/Green-Cat/Codeception/releases{/id}","created_at":"2015-08-06T11:01:16Z","updated_at":"2015-08-06T11:01:18Z","pushed_at":"2015-08-06T11:02:24Z","git_url":"git://github.com/Green-Cat/Codeception.git","ssh_url":"git@github.com:Green-Cat/Codeception.git","clone_url":"https://github.com/Green-Cat/Codeception.git","svn_url":"https://github.com/Green-Cat/Codeception","homepage":"http://codeception.com","size":65456,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"2.1"}},"base":{"label":"Codeception:2.1","ref":"2.1","sha":"4b0741ebd287434a00e37da2bb60f243de21ccdd","user":{"login":"Codeception","id":1288753,"avatar_url":"https://avatars.githubusercontent.com/u/1288753?v=3","gravatar_id":"","url":"https://api.github.com/users/Codeception","html_url":"https://github.com/Codeception","followers_url":"https://api.github.com/users/Codeception/followers","following_url":"https://api.github.com/users/Codeception/following{/other_user}","gists_url":"https://api.github.com/users/Codeception/gists{/gist_id}","starred_url":"https://api.github.com/users/Codeception/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Codeception/subscriptions","organizations_url":"https://api.github.com/users/Codeception/orgs","repos_url":"https://api.github.com/users/Codeception/repos","events_url":"https://api.github.com/users/Codeception/events{/privacy}","received_events_url":"https://api.github.com/users/Codeception/received_events","type":"Organization","site_admin":false},"repo":{"id":2880469,"name":"Codeception","full_name":"Codeception/Codeception","owner":{"login":"Codeception","id":1288753,"avatar_url":"https://avatars.githubusercontent.com/u/1288753?v=3","gravatar_id":"","url":"https://api.github.com/users/Codeception","html_url":"https://github.com/Codeception","followers_url":"https://api.github.com/users/Codeception/followers","following_url":"https://api.github.com/users/Codeception/following{/other_user}","gists_url":"https://api.github.com/users/Codeception/gists{/gist_id}","starred_url":"https://api.github.com/users/Codeception/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Codeception/subscriptions","organizations_url":"https://api.github.com/users/Codeception/orgs","repos_url":"https://api.github.com/users/Codeception/repos","events_url":"https://api.github.com/users/Codeception/events{/privacy}","received_events_url":"https://api.github.com/users/Codeception/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Codeception/Codeception","description":"Full-stack testing PHP framework","fork":false,"url":"https://api.github.com/repos/Codeception/Codeception","forks_url":"https://api.github.com/repos/Codeception/Codeception/forks","keys_url":"https://api.github.com/repos/Codeception/Codeception/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Codeception/Codeception/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Codeception/Codeception/teams","hooks_url":"https://api.github.com/repos/Codeception/Codeception/hooks","issue_events_url":"https://api.github.com/repos/Codeception/Codeception/issues/events{/number}","events_url":"https://api.github.com/repos/Codeception/Codeception/events","assignees_url":"https://api.github.com/repos/Codeception/Codeception/assignees{/user}","branches_url":"https://api.github.com/repos/Codeception/Codeception/branches{/branch}","tags_url":"https://api.github.com/repos/Codeception/Codeception/tags","blobs_url":"https://api.github.com/repos/Codeception/Codeception/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Codeception/Codeception/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Codeception/Codeception/git/refs{/sha}","trees_url":"https://api.github.com/repos/Codeception/Codeception/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Codeception/Codeception/statuses/{sha}","languages_url":"https://api.github.com/repos/Codeception/Codeception/languages","stargazers_url":"https://api.github.com/repos/Codeception/Codeception/stargazers","contributors_url":"https://api.github.com/repos/Codeception/Codeception/contributors","subscribers_url":"https://api.github.com/repos/Codeception/Codeception/subscribers","subscription_url":"https://api.github.com/repos/Codeception/Codeception/subscription","commits_url":"https://api.github.com/repos/Codeception/Codeception/commits{/sha}","git_commits_url":"https://api.github.com/repos/Codeception/Codeception/git/commits{/sha}","comments_url":"https://api.github.com/repos/Codeception/Codeception/comments{/number}","issue_comment_url":"https://api.github.com/repos/Codeception/Codeception/issues/comments{/number}","contents_url":"https://api.github.com/repos/Codeception/Codeception/contents/{+path}","compare_url":"https://api.github.com/repos/Codeception/Codeception/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Codeception/Codeception/merges","archive_url":"https://api.github.com/repos/Codeception/Codeception/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Codeception/Codeception/downloads","issues_url":"https://api.github.com/repos/Codeception/Codeception/issues{/number}","pulls_url":"https://api.github.com/repos/Codeception/Codeception/pulls{/number}","milestones_url":"https://api.github.com/repos/Codeception/Codeception/milestones{/number}","notifications_url":"https://api.github.com/repos/Codeception/Codeception/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Codeception/Codeception/labels{/name}","releases_url":"https://api.github.com/repos/Codeception/Codeception/releases{/id}","created_at":"2011-11-30T04:06:44Z","updated_at":"2015-08-05T14:47:25Z","pushed_at":"2015-08-06T09:45:27Z","git_url":"git://github.com/Codeception/Codeception.git","ssh_url":"git@github.com:Codeception/Codeception.git","clone_url":"https://github.com/Codeception/Codeception.git","svn_url":"https://github.com/Codeception/Codeception","homepage":"http://codeception.com","size":65456,"stargazers_count":1660,"watchers_count":1660,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":650,"mirror_url":null,"open_issues_count":236,"forks":650,"open_issues":236,"watchers":1660,"default_branch":"2.1"}},"_links":{"self":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/2247"},"html":{"href":"https://github.com/Codeception/Codeception/pull/2247"},"issue":{"href":"https://api.github.com/repos/Codeception/Codeception/issues/2247"},"comments":{"href":"https://api.github.com/repos/Codeception/Codeception/issues/2247/comments"},"review_comments":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/2247/comments"},"review_comment":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/2247/commits"},"statuses":{"href":"https://api.github.com/repos/Codeception/Codeception/statuses/45d1ef968c7f1b79fe2e7227c22163ae9ddc5409"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":3,"deletions":2,"changed_files":1}}