{"action":"opened","number":1240,"pull_request":{"url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/pulls/1240","id":97865087,"html_url":"https://github.com/squizlabs/PHP_CodeSniffer/pull/1240","diff_url":"https://github.com/squizlabs/PHP_CodeSniffer/pull/1240.diff","patch_url":"https://github.com/squizlabs/PHP_CodeSniffer/pull/1240.patch","issue_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/1240","number":1240,"state":"open","locked":false,"title":"Fix false positive for function names starting with triple underscore.","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":"Function and method names starting with a double underscore are reserved by PHP itself for magic functions/methods.\r\n\r\nA triple underscore function name prefix, however, should not trigger this error. (I'm not saying it's a good idea, but it's out there in userland code)\r\n\r\nFixed in the two non-proprietary standards which have checks for double underscored function/method names.\r\nIncludes additional unit tests for all four sniffs.\r\n\r\nThis PR does not cover similar checks in the proprietary PEAR and Squiz standards.\r\n\r\nFixes https://github.com/wimg/PHPCompatibility/issues/297","created_at":"2016-12-14T00:29:51Z","updated_at":"2016-12-14T00:29:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/pulls/1240/commits","review_comments_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/pulls/1240/comments","review_comment_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/1240/comments","statuses_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/statuses/f578621b79306a385604f50bf24a721a8f0cb3cb","head":{"label":"jrfnl:fix/namingconventions-false-positive","ref":"fix/namingconventions-false-positive","sha":"f578621b79306a385604f50bf24a721a8f0cb3cb","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":32518231,"name":"PHP_CodeSniffer","full_name":"jrfnl/PHP_CodeSniffer","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/PHP_CodeSniffer","description":"PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.","fork":true,"url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer","forks_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/forks","keys_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/teams","hooks_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/hooks","issue_events_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/issues/events{/number}","events_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/events","assignees_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/assignees{/user}","branches_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/branches{/branch}","tags_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/tags","blobs_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/git/refs{/sha}","trees_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/statuses/{sha}","languages_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/languages","stargazers_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/stargazers","contributors_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/contributors","subscribers_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/subscribers","subscription_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/subscription","commits_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/commits{/sha}","git_commits_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/git/commits{/sha}","comments_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/comments{/number}","issue_comment_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/issues/comments{/number}","contents_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/contents/{+path}","compare_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/merges","archive_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/downloads","issues_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/issues{/number}","pulls_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/pulls{/number}","milestones_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/milestones{/number}","notifications_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/labels{/name}","releases_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/releases{/id}","deployments_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/deployments","created_at":"2015-03-19T11:47:45Z","updated_at":"2016-07-25T14:28:59Z","pushed_at":"2016-12-14T00:24:49Z","git_url":"git://github.com/jrfnl/PHP_CodeSniffer.git","ssh_url":"git@github.com:jrfnl/PHP_CodeSniffer.git","clone_url":"https://github.com/jrfnl/PHP_CodeSniffer.git","svn_url":"https://github.com/jrfnl/PHP_CodeSniffer","homepage":"http://pear.php.net/package/PHP_CodeSniffer","size":91355,"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":"squizlabs:master","ref":"master","sha":"b1ebcc82316b44f99bc99d5586ff077b421bd86c","user":{"login":"squizlabs","id":997547,"avatar_url":"https://avatars.githubusercontent.com/u/997547?v=3","gravatar_id":"","url":"https://api.github.com/users/squizlabs","html_url":"https://github.com/squizlabs","followers_url":"https://api.github.com/users/squizlabs/followers","following_url":"https://api.github.com/users/squizlabs/following{/other_user}","gists_url":"https://api.github.com/users/squizlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/squizlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squizlabs/subscriptions","organizations_url":"https://api.github.com/users/squizlabs/orgs","repos_url":"https://api.github.com/users/squizlabs/repos","events_url":"https://api.github.com/users/squizlabs/events{/privacy}","received_events_url":"https://api.github.com/users/squizlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":2699935,"name":"PHP_CodeSniffer","full_name":"squizlabs/PHP_CodeSniffer","owner":{"login":"squizlabs","id":997547,"avatar_url":"https://avatars.githubusercontent.com/u/997547?v=3","gravatar_id":"","url":"https://api.github.com/users/squizlabs","html_url":"https://github.com/squizlabs","followers_url":"https://api.github.com/users/squizlabs/followers","following_url":"https://api.github.com/users/squizlabs/following{/other_user}","gists_url":"https://api.github.com/users/squizlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/squizlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squizlabs/subscriptions","organizations_url":"https://api.github.com/users/squizlabs/orgs","repos_url":"https://api.github.com/users/squizlabs/repos","events_url":"https://api.github.com/users/squizlabs/events{/privacy}","received_events_url":"https://api.github.com/users/squizlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/squizlabs/PHP_CodeSniffer","description":"PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.","fork":false,"url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer","forks_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/forks","keys_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/teams","hooks_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/hooks","issue_events_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/events{/number}","events_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/events","assignees_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/assignees{/user}","branches_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/branches{/branch}","tags_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/tags","blobs_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/git/refs{/sha}","trees_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/statuses/{sha}","languages_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/languages","stargazers_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/stargazers","contributors_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/contributors","subscribers_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/subscribers","subscription_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/subscription","commits_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/commits{/sha}","git_commits_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/git/commits{/sha}","comments_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/comments{/number}","issue_comment_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/comments{/number}","contents_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/contents/{+path}","compare_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/merges","archive_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/downloads","issues_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues{/number}","pulls_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/pulls{/number}","milestones_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/milestones{/number}","notifications_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/labels{/name}","releases_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/releases{/id}","deployments_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/deployments","created_at":"2011-11-03T04:06:24Z","updated_at":"2016-12-13T10:39:46Z","pushed_at":"2016-12-13T23:38:13Z","git_url":"git://github.com/squizlabs/PHP_CodeSniffer.git","ssh_url":"git@github.com:squizlabs/PHP_CodeSniffer.git","clone_url":"https://github.com/squizlabs/PHP_CodeSniffer.git","svn_url":"https://github.com/squizlabs/PHP_CodeSniffer","homepage":"http://pear.php.net/package/PHP_CodeSniffer","size":128662,"stargazers_count":2965,"watchers_count":2965,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":677,"mirror_url":null,"open_issues_count":103,"forks":677,"open_issues":103,"watchers":2965,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/pulls/1240"},"html":{"href":"https://github.com/squizlabs/PHP_CodeSniffer/pull/1240"},"issue":{"href":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/1240"},"comments":{"href":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/1240/comments"},"review_comments":{"href":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/pulls/1240/comments"},"review_comment":{"href":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/pulls/1240/commits"},"statuses":{"href":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/statuses/f578621b79306a385604f50bf24a721a8f0cb3cb"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":15,"deletions":3,"changed_files":4}}
{"actor":{"display_login":"jrfnl"}}