{"action":"closed","number":1090,"pull_request":{"url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/pulls/1090","id":78888686,"html_url":"https://github.com/squizlabs/PHP_CodeSniffer/pull/1090","diff_url":"https://github.com/squizlabs/PHP_CodeSniffer/pull/1090.diff","patch_url":"https://github.com/squizlabs/PHP_CodeSniffer/pull/1090.patch","issue_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/1090","number":1090,"state":"closed","locked":false,"title":"Allow return type hints without space before colon in OpeningFunctionBraceKernighanRitchie sniff","user":{"login":"VasekPurchart","id":406821,"avatar_url":"https://avatars.githubusercontent.com/u/406821?v=3","gravatar_id":"","url":"https://api.github.com/users/VasekPurchart","html_url":"https://github.com/VasekPurchart","followers_url":"https://api.github.com/users/VasekPurchart/followers","following_url":"https://api.github.com/users/VasekPurchart/following{/other_user}","gists_url":"https://api.github.com/users/VasekPurchart/gists{/gist_id}","starred_url":"https://api.github.com/users/VasekPurchart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VasekPurchart/subscriptions","organizations_url":"https://api.github.com/users/VasekPurchart/orgs","repos_url":"https://api.github.com/users/VasekPurchart/repos","events_url":"https://api.github.com/users/VasekPurchart/events{/privacy}","received_events_url":"https://api.github.com/users/VasekPurchart/received_events","type":"User","site_admin":false},"body":"Currently if you you use return type hints with a space before colon ` : `, f.e.:\r\n\r\n```php\r\n<?php\r\n\r\nfunction myFunction() : Something {\r\n    return null;\r\n}\r\n```\r\n\r\neverything works fine, but if you prefer not including the space before colon `: `, like this:\r\n\r\n```php\r\n<?php\r\n\r\nfunction myFunction(): Something {\r\n    return null;\r\n}\r\n```\r\nthen a `SpaceAfterBracket` error is reported.\r\n\r\nIt is also a problem when defining closures.\r\n\r\nThis also influences other sniffs, such as `PEAR.Functions.FunctionDeclaration` or inherently `Squiz.Functions.MultiLineFunctionDeclaration` (where I stumbled upon this).\r\n\r\nThis pull request should allow both syntaxes, see tests, I hope I didn't forget about something.","created_at":"2016-07-26T17:04:38Z","updated_at":"2016-08-02T06:17:15Z","closed_at":"2016-08-02T06:17:15Z","merged_at":null,"merge_commit_sha":"9c85fa3e7a3ad567b4fe9f1be3a7285c063f9322","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/pulls/1090/commits","review_comments_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/pulls/1090/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/1090/comments","statuses_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/statuses/21e4368a32155143f3d94dda1e82f407eb98638d","head":{"label":"VasekPurchart:kernigan-ritchie-return-type-hint","ref":"kernigan-ritchie-return-type-hint","sha":"21e4368a32155143f3d94dda1e82f407eb98638d","user":{"login":"VasekPurchart","id":406821,"avatar_url":"https://avatars.githubusercontent.com/u/406821?v=3","gravatar_id":"","url":"https://api.github.com/users/VasekPurchart","html_url":"https://github.com/VasekPurchart","followers_url":"https://api.github.com/users/VasekPurchart/followers","following_url":"https://api.github.com/users/VasekPurchart/following{/other_user}","gists_url":"https://api.github.com/users/VasekPurchart/gists{/gist_id}","starred_url":"https://api.github.com/users/VasekPurchart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VasekPurchart/subscriptions","organizations_url":"https://api.github.com/users/VasekPurchart/orgs","repos_url":"https://api.github.com/users/VasekPurchart/repos","events_url":"https://api.github.com/users/VasekPurchart/events{/privacy}","received_events_url":"https://api.github.com/users/VasekPurchart/received_events","type":"User","site_admin":false},"repo":{"id":34453773,"name":"PHP_CodeSniffer","full_name":"VasekPurchart/PHP_CodeSniffer","owner":{"login":"VasekPurchart","id":406821,"avatar_url":"https://avatars.githubusercontent.com/u/406821?v=3","gravatar_id":"","url":"https://api.github.com/users/VasekPurchart","html_url":"https://github.com/VasekPurchart","followers_url":"https://api.github.com/users/VasekPurchart/followers","following_url":"https://api.github.com/users/VasekPurchart/following{/other_user}","gists_url":"https://api.github.com/users/VasekPurchart/gists{/gist_id}","starred_url":"https://api.github.com/users/VasekPurchart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VasekPurchart/subscriptions","organizations_url":"https://api.github.com/users/VasekPurchart/orgs","repos_url":"https://api.github.com/users/VasekPurchart/repos","events_url":"https://api.github.com/users/VasekPurchart/events{/privacy}","received_events_url":"https://api.github.com/users/VasekPurchart/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/VasekPurchart/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/VasekPurchart/PHP_CodeSniffer","forks_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/forks","keys_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/teams","hooks_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/hooks","issue_events_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/issues/events{/number}","events_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/events","assignees_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/assignees{/user}","branches_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/branches{/branch}","tags_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/tags","blobs_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/git/refs{/sha}","trees_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/statuses/{sha}","languages_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/languages","stargazers_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/stargazers","contributors_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/contributors","subscribers_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/subscribers","subscription_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/subscription","commits_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/commits{/sha}","git_commits_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/git/commits{/sha}","comments_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/comments{/number}","issue_comment_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/issues/comments{/number}","contents_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/contents/{+path}","compare_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/merges","archive_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/downloads","issues_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/issues{/number}","pulls_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/pulls{/number}","milestones_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/milestones{/number}","notifications_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/labels{/name}","releases_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/releases{/id}","deployments_url":"https://api.github.com/repos/VasekPurchart/PHP_CodeSniffer/deployments","created_at":"2015-04-23T12:04:12Z","updated_at":"2015-04-23T12:04:15Z","pushed_at":"2016-07-26T16:57:32Z","git_url":"git://github.com/VasekPurchart/PHP_CodeSniffer.git","ssh_url":"git@github.com:VasekPurchart/PHP_CodeSniffer.git","clone_url":"https://github.com/VasekPurchart/PHP_CodeSniffer.git","svn_url":"https://github.com/VasekPurchart/PHP_CodeSniffer","homepage":"http://pear.php.net/package/PHP_CodeSniffer","size":91754,"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":"1a8f2ee2c4e746baa372304ff7b4c0292ae695ff","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-08-01T23:43:13Z","pushed_at":"2016-08-02T06:12:22Z","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":128812,"stargazers_count":2568,"watchers_count":2568,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":607,"mirror_url":null,"open_issues_count":66,"forks":607,"open_issues":66,"watchers":2568,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/pulls/1090"},"html":{"href":"https://github.com/squizlabs/PHP_CodeSniffer/pull/1090"},"issue":{"href":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/1090"},"comments":{"href":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/1090/comments"},"review_comments":{"href":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/pulls/1090/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/1090/commits"},"statuses":{"href":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/statuses/21e4368a32155143f3d94dda1e82f407eb98638d"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":2,"review_comments":0,"commits":1,"additions":39,"deletions":3,"changed_files":4}}
{"actor":{"display_login":"gsherwood"}}