{"action":"opened","number":180,"pull_request":{"url":"https://api.github.com/repos/wimg/PHPCompatibility/pulls/180","id":81629448,"html_url":"https://github.com/wimg/PHPCompatibility/pull/180","diff_url":"https://github.com/wimg/PHPCompatibility/pull/180.diff","patch_url":"https://github.com/wimg/PHPCompatibility/pull/180.patch","issue_url":"https://api.github.com/repos/wimg/PHPCompatibility/issues/180","number":180,"state":"open","locked":false,"title":"Improve `ParameterShadowSuperGlobals` sniff (code review).","user":{"login":"jrfnl","id":663378,"avatar_url":"https://avatars.githubusercontent.com/u/663378?v=3","gravatar_id":"","url":"https://api.github.com/users/jrfnl","html_url":"https://github.com/jrfnl","followers_url":"https://api.github.com/users/jrfnl/followers","following_url":"https://api.github.com/users/jrfnl/following{/other_user}","gists_url":"https://api.github.com/users/jrfnl/gists{/gist_id}","starred_url":"https://api.github.com/users/jrfnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrfnl/subscriptions","organizations_url":"https://api.github.com/users/jrfnl/orgs","repos_url":"https://api.github.com/users/jrfnl/repos","events_url":"https://api.github.com/users/jrfnl/events{/privacy}","received_events_url":"https://api.github.com/users/jrfnl/received_events","type":"User","site_admin":false},"body":"It seems this sniff was missed both when implementing the `PHPCompatibility_Sniff` base class as well as when the unit tests were added.\r\nThis PR fixes that.\r\n\r\nChanges:\r\n* Let class extend `PHPCompatibility_Sniff`.\r\n* Use the `supportsAbove()` function for the compatibility check.\r\n* Defer to the PHPCS native `getMethodParameters()` method for getting the parameter names.\r\n* Do a case-insensitive parameter name compare. While variable names are case-insensitive in PHP, it would still be a really bad idea to bypass the \"parameter shadowing super globals\" issue by using a lowercase version of the variable name.\r\n* Add unit tests.","created_at":"2016-08-17T11:55:02Z","updated_at":"2016-08-17T11:55:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/wimg/PHPCompatibility/pulls/180/commits","review_comments_url":"https://api.github.com/repos/wimg/PHPCompatibility/pulls/180/comments","review_comment_url":"https://api.github.com/repos/wimg/PHPCompatibility/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wimg/PHPCompatibility/issues/180/comments","statuses_url":"https://api.github.com/repos/wimg/PHPCompatibility/statuses/fb8ff9450e83477464359545d550d8de8276c9b2","head":{"label":"jrfnl:feature/improve-shadow-superglobals","ref":"feature/improve-shadow-superglobals","sha":"fb8ff9450e83477464359545d550d8de8276c9b2","user":{"login":"jrfnl","id":663378,"avatar_url":"https://avatars.githubusercontent.com/u/663378?v=3","gravatar_id":"","url":"https://api.github.com/users/jrfnl","html_url":"https://github.com/jrfnl","followers_url":"https://api.github.com/users/jrfnl/followers","following_url":"https://api.github.com/users/jrfnl/following{/other_user}","gists_url":"https://api.github.com/users/jrfnl/gists{/gist_id}","starred_url":"https://api.github.com/users/jrfnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrfnl/subscriptions","organizations_url":"https://api.github.com/users/jrfnl/orgs","repos_url":"https://api.github.com/users/jrfnl/repos","events_url":"https://api.github.com/users/jrfnl/events{/privacy}","received_events_url":"https://api.github.com/users/jrfnl/received_events","type":"User","site_admin":false},"repo":{"id":14834119,"name":"PHPCompatibility","full_name":"jrfnl/PHPCompatibility","owner":{"login":"jrfnl","id":663378,"avatar_url":"https://avatars.githubusercontent.com/u/663378?v=3","gravatar_id":"","url":"https://api.github.com/users/jrfnl","html_url":"https://github.com/jrfnl","followers_url":"https://api.github.com/users/jrfnl/followers","following_url":"https://api.github.com/users/jrfnl/following{/other_user}","gists_url":"https://api.github.com/users/jrfnl/gists{/gist_id}","starred_url":"https://api.github.com/users/jrfnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrfnl/subscriptions","organizations_url":"https://api.github.com/users/jrfnl/orgs","repos_url":"https://api.github.com/users/jrfnl/repos","events_url":"https://api.github.com/users/jrfnl/events{/privacy}","received_events_url":"https://api.github.com/users/jrfnl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jrfnl/PHPCompatibility","description":"PHP Compatibility check for PHP_CodeSniffer","fork":true,"url":"https://api.github.com/repos/jrfnl/PHPCompatibility","forks_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/forks","keys_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/teams","hooks_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/hooks","issue_events_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/issues/events{/number}","events_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/events","assignees_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/assignees{/user}","branches_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/branches{/branch}","tags_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/tags","blobs_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/git/refs{/sha}","trees_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/statuses/{sha}","languages_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/languages","stargazers_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/stargazers","contributors_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/contributors","subscribers_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/subscribers","subscription_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/subscription","commits_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/commits{/sha}","git_commits_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/git/commits{/sha}","comments_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/comments{/number}","issue_comment_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/issues/comments{/number}","contents_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/contents/{+path}","compare_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/merges","archive_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/downloads","issues_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/issues{/number}","pulls_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/pulls{/number}","milestones_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/milestones{/number}","notifications_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/labels{/name}","releases_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/releases{/id}","deployments_url":"https://api.github.com/repos/jrfnl/PHPCompatibility/deployments","created_at":"2013-12-01T05:31:57Z","updated_at":"2016-07-17T22:44:33Z","pushed_at":"2016-08-17T11:22:03Z","git_url":"git://github.com/jrfnl/PHPCompatibility.git","ssh_url":"git@github.com:jrfnl/PHPCompatibility.git","clone_url":"https://github.com/jrfnl/PHPCompatibility.git","svn_url":"https://github.com/jrfnl/PHPCompatibility","homepage":"http://techblog.wimgodden.be/tag/codesniffer/","size":575,"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":"master"}},"base":{"label":"wimg:master","ref":"master","sha":"7612603ffa366ea4aea604d4022a983add498b92","user":{"login":"wimg","id":313511,"avatar_url":"https://avatars.githubusercontent.com/u/313511?v=3","gravatar_id":"","url":"https://api.github.com/users/wimg","html_url":"https://github.com/wimg","followers_url":"https://api.github.com/users/wimg/followers","following_url":"https://api.github.com/users/wimg/following{/other_user}","gists_url":"https://api.github.com/users/wimg/gists{/gist_id}","starred_url":"https://api.github.com/users/wimg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wimg/subscriptions","organizations_url":"https://api.github.com/users/wimg/orgs","repos_url":"https://api.github.com/users/wimg/repos","events_url":"https://api.github.com/users/wimg/events{/privacy}","received_events_url":"https://api.github.com/users/wimg/received_events","type":"User","site_admin":false},"repo":{"id":3614664,"name":"PHPCompatibility","full_name":"wimg/PHPCompatibility","owner":{"login":"wimg","id":313511,"avatar_url":"https://avatars.githubusercontent.com/u/313511?v=3","gravatar_id":"","url":"https://api.github.com/users/wimg","html_url":"https://github.com/wimg","followers_url":"https://api.github.com/users/wimg/followers","following_url":"https://api.github.com/users/wimg/following{/other_user}","gists_url":"https://api.github.com/users/wimg/gists{/gist_id}","starred_url":"https://api.github.com/users/wimg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wimg/subscriptions","organizations_url":"https://api.github.com/users/wimg/orgs","repos_url":"https://api.github.com/users/wimg/repos","events_url":"https://api.github.com/users/wimg/events{/privacy}","received_events_url":"https://api.github.com/users/wimg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wimg/PHPCompatibility","description":"PHP Compatibility check for PHP_CodeSniffer","fork":false,"url":"https://api.github.com/repos/wimg/PHPCompatibility","forks_url":"https://api.github.com/repos/wimg/PHPCompatibility/forks","keys_url":"https://api.github.com/repos/wimg/PHPCompatibility/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wimg/PHPCompatibility/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wimg/PHPCompatibility/teams","hooks_url":"https://api.github.com/repos/wimg/PHPCompatibility/hooks","issue_events_url":"https://api.github.com/repos/wimg/PHPCompatibility/issues/events{/number}","events_url":"https://api.github.com/repos/wimg/PHPCompatibility/events","assignees_url":"https://api.github.com/repos/wimg/PHPCompatibility/assignees{/user}","branches_url":"https://api.github.com/repos/wimg/PHPCompatibility/branches{/branch}","tags_url":"https://api.github.com/repos/wimg/PHPCompatibility/tags","blobs_url":"https://api.github.com/repos/wimg/PHPCompatibility/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wimg/PHPCompatibility/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wimg/PHPCompatibility/git/refs{/sha}","trees_url":"https://api.github.com/repos/wimg/PHPCompatibility/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wimg/PHPCompatibility/statuses/{sha}","languages_url":"https://api.github.com/repos/wimg/PHPCompatibility/languages","stargazers_url":"https://api.github.com/repos/wimg/PHPCompatibility/stargazers","contributors_url":"https://api.github.com/repos/wimg/PHPCompatibility/contributors","subscribers_url":"https://api.github.com/repos/wimg/PHPCompatibility/subscribers","subscription_url":"https://api.github.com/repos/wimg/PHPCompatibility/subscription","commits_url":"https://api.github.com/repos/wimg/PHPCompatibility/commits{/sha}","git_commits_url":"https://api.github.com/repos/wimg/PHPCompatibility/git/commits{/sha}","comments_url":"https://api.github.com/repos/wimg/PHPCompatibility/comments{/number}","issue_comment_url":"https://api.github.com/repos/wimg/PHPCompatibility/issues/comments{/number}","contents_url":"https://api.github.com/repos/wimg/PHPCompatibility/contents/{+path}","compare_url":"https://api.github.com/repos/wimg/PHPCompatibility/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wimg/PHPCompatibility/merges","archive_url":"https://api.github.com/repos/wimg/PHPCompatibility/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wimg/PHPCompatibility/downloads","issues_url":"https://api.github.com/repos/wimg/PHPCompatibility/issues{/number}","pulls_url":"https://api.github.com/repos/wimg/PHPCompatibility/pulls{/number}","milestones_url":"https://api.github.com/repos/wimg/PHPCompatibility/milestones{/number}","notifications_url":"https://api.github.com/repos/wimg/PHPCompatibility/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wimg/PHPCompatibility/labels{/name}","releases_url":"https://api.github.com/repos/wimg/PHPCompatibility/releases{/id}","deployments_url":"https://api.github.com/repos/wimg/PHPCompatibility/deployments","created_at":"2012-03-03T23:36:15Z","updated_at":"2016-08-16T10:41:04Z","pushed_at":"2016-08-17T11:55:02Z","git_url":"git://github.com/wimg/PHPCompatibility.git","ssh_url":"git@github.com:wimg/PHPCompatibility.git","clone_url":"https://github.com/wimg/PHPCompatibility.git","svn_url":"https://github.com/wimg/PHPCompatibility","homepage":"http://techblog.wimgodden.be/tag/codesniffer/","size":674,"stargazers_count":451,"watchers_count":451,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":92,"mirror_url":null,"open_issues_count":29,"forks":92,"open_issues":29,"watchers":451,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wimg/PHPCompatibility/pulls/180"},"html":{"href":"https://github.com/wimg/PHPCompatibility/pull/180"},"issue":{"href":"https://api.github.com/repos/wimg/PHPCompatibility/issues/180"},"comments":{"href":"https://api.github.com/repos/wimg/PHPCompatibility/issues/180/comments"},"review_comments":{"href":"https://api.github.com/repos/wimg/PHPCompatibility/pulls/180/comments"},"review_comment":{"href":"https://api.github.com/repos/wimg/PHPCompatibility/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wimg/PHPCompatibility/pulls/180/commits"},"statuses":{"href":"https://api.github.com/repos/wimg/PHPCompatibility/statuses/fb8ff9450e83477464359545d550d8de8276c9b2"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":126,"deletions":21,"changed_files":3}}
{"actor":{"display_login":"jrfnl"}}