{"action":"created","comment":{"url":"https://api.github.com/repos/ovr/phpsa/pulls/comments/94129234","pull_request_review_id":14659729,"id":94129234,"diff_hunk":"@@ -0,0 +1,45 @@\n+<?php\n+\n+namespace PHPSA\\Analyzer\\Pass\\Statement;\n+\n+use PhpParser\\Node\\Stmt;\n+use PhpParser\\Node;\n+use PhpParser\\Node\\Stmt\\Return_;\n+use PHPSA\\Analyzer\\Helper\\DefaultMetadataPassTrait;\n+use PHPSA\\Analyzer\\Pass;\n+use PHPSA\\Context;\n+\n+class ReturnVoid implements Pass\\AnalyzerPassInterface\n+{\n+    use DefaultMetadataPassTrait;\n+\n+    const DESCRIPTION = 'Checks for return void statements.';\n+\n+    /**\n+     * @param $stmt\n+     * @param Context $context\n+     * @return bool\n+     */\n+    public function pass(Return_ $stmt, Context $context)\n+    {\n+        if ($stmt->expr === null) { // this is not the value null but \"no value\"\n+            $context->notice(\n+                'return.void',\n+                'You are trying to return void',\n+                $stmt\n+            );\n+            return true;\n+        }\n+        return false;","path":"src/Analyzer/Pass/Statement/ReturnVoid.php","position":33,"original_position":33,"commit_id":"5696139b4e4b18507a6cfca551b7e5e95a5906ad","original_commit_id":"5696139b4e4b18507a6cfca551b7e5e95a5906ad","user":{"login":"ovr","id":572096,"avatar_url":"https://avatars.githubusercontent.com/u/572096?v=3","gravatar_id":"","url":"https://api.github.com/users/ovr","html_url":"https://github.com/ovr","followers_url":"https://api.github.com/users/ovr/followers","following_url":"https://api.github.com/users/ovr/following{/other_user}","gists_url":"https://api.github.com/users/ovr/gists{/gist_id}","starred_url":"https://api.github.com/users/ovr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ovr/subscriptions","organizations_url":"https://api.github.com/users/ovr/orgs","repos_url":"https://api.github.com/users/ovr/repos","events_url":"https://api.github.com/users/ovr/events{/privacy}","received_events_url":"https://api.github.com/users/ovr/received_events","type":"User","site_admin":false},"body":"Please blank line before return\r\nThanks","created_at":"2016-12-29T12:03:02Z","updated_at":"2016-12-29T12:05:50Z","html_url":"https://github.com/ovr/phpsa/pull/290#discussion_r94129234","pull_request_url":"https://api.github.com/repos/ovr/phpsa/pulls/290","_links":{"self":{"href":"https://api.github.com/repos/ovr/phpsa/pulls/comments/94129234"},"html":{"href":"https://github.com/ovr/phpsa/pull/290#discussion_r94129234"},"pull_request":{"href":"https://api.github.com/repos/ovr/phpsa/pulls/290"}}},"pull_request":{"url":"https://api.github.com/repos/ovr/phpsa/pulls/290","id":99646115,"html_url":"https://github.com/ovr/phpsa/pull/290","diff_url":"https://github.com/ovr/phpsa/pull/290.diff","patch_url":"https://github.com/ovr/phpsa/pull/290.patch","issue_url":"https://api.github.com/repos/ovr/phpsa/issues/290","number":290,"state":"open","locked":false,"title":"Add ReturnVoid analyzer","user":{"login":"ddmler","id":510150,"avatar_url":"https://avatars.githubusercontent.com/u/510150?v=3","gravatar_id":"","url":"https://api.github.com/users/ddmler","html_url":"https://github.com/ddmler","followers_url":"https://api.github.com/users/ddmler/followers","following_url":"https://api.github.com/users/ddmler/following{/other_user}","gists_url":"https://api.github.com/users/ddmler/gists{/gist_id}","starred_url":"https://api.github.com/users/ddmler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddmler/subscriptions","organizations_url":"https://api.github.com/users/ddmler/orgs","repos_url":"https://api.github.com/users/ddmler/repos","events_url":"https://api.github.com/users/ddmler/events{/privacy}","received_events_url":"https://api.github.com/users/ddmler/received_events","type":"User","site_admin":false},"body":"Hey!\r\n\r\nType: new feature | code quality\r\n\r\nLink to issue: fixes #278 \r\n\r\nThis pull request affects the following components **(please check boxes):**\r\n\r\n* [ ] Core\r\n* [x] Analyzer\r\n* [x] Compiler\r\n* [ ] Control Flow Graph\r\n* [ ] Documentation\r\n\r\n**In raising this pull request, I confirm the following (please check boxes):**\r\n\r\n- [x] I have read and understood the [Contributing Guidelines](https://github.com/ovr/phpsa/blob/master/.github/CONTRIBUTING.md).\r\n- [x] I have checked that another pull request for this purpose does not exist.\r\n- [x] I wrote some tests for this PR.\r\n\r\nSmall description of change:\r\n\r\nMoved return void from compiler into own analyzer as described in issue.","created_at":"2016-12-29T11:37:16Z","updated_at":"2016-12-29T12:05:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"395b8047e4e282e746d51ce8fe6f6381ec5d3f56","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ovr/phpsa/pulls/290/commits","review_comments_url":"https://api.github.com/repos/ovr/phpsa/pulls/290/comments","review_comment_url":"https://api.github.com/repos/ovr/phpsa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ovr/phpsa/issues/290/comments","statuses_url":"https://api.github.com/repos/ovr/phpsa/statuses/5696139b4e4b18507a6cfca551b7e5e95a5906ad","head":{"label":"ddmler:return-void","ref":"return-void","sha":"5696139b4e4b18507a6cfca551b7e5e95a5906ad","user":{"login":"ddmler","id":510150,"avatar_url":"https://avatars.githubusercontent.com/u/510150?v=3","gravatar_id":"","url":"https://api.github.com/users/ddmler","html_url":"https://github.com/ddmler","followers_url":"https://api.github.com/users/ddmler/followers","following_url":"https://api.github.com/users/ddmler/following{/other_user}","gists_url":"https://api.github.com/users/ddmler/gists{/gist_id}","starred_url":"https://api.github.com/users/ddmler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddmler/subscriptions","organizations_url":"https://api.github.com/users/ddmler/orgs","repos_url":"https://api.github.com/users/ddmler/repos","events_url":"https://api.github.com/users/ddmler/events{/privacy}","received_events_url":"https://api.github.com/users/ddmler/received_events","type":"User","site_admin":false},"repo":{"id":59683603,"name":"phpsa","full_name":"ddmler/phpsa","owner":{"login":"ddmler","id":510150,"avatar_url":"https://avatars.githubusercontent.com/u/510150?v=3","gravatar_id":"","url":"https://api.github.com/users/ddmler","html_url":"https://github.com/ddmler","followers_url":"https://api.github.com/users/ddmler/followers","following_url":"https://api.github.com/users/ddmler/following{/other_user}","gists_url":"https://api.github.com/users/ddmler/gists{/gist_id}","starred_url":"https://api.github.com/users/ddmler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddmler/subscriptions","organizations_url":"https://api.github.com/users/ddmler/orgs","repos_url":"https://api.github.com/users/ddmler/repos","events_url":"https://api.github.com/users/ddmler/events{/privacy}","received_events_url":"https://api.github.com/users/ddmler/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ddmler/phpsa","description":"Smart Analysis for PHP :bowtie::neckbeard:","fork":true,"url":"https://api.github.com/repos/ddmler/phpsa","forks_url":"https://api.github.com/repos/ddmler/phpsa/forks","keys_url":"https://api.github.com/repos/ddmler/phpsa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ddmler/phpsa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ddmler/phpsa/teams","hooks_url":"https://api.github.com/repos/ddmler/phpsa/hooks","issue_events_url":"https://api.github.com/repos/ddmler/phpsa/issues/events{/number}","events_url":"https://api.github.com/repos/ddmler/phpsa/events","assignees_url":"https://api.github.com/repos/ddmler/phpsa/assignees{/user}","branches_url":"https://api.github.com/repos/ddmler/phpsa/branches{/branch}","tags_url":"https://api.github.com/repos/ddmler/phpsa/tags","blobs_url":"https://api.github.com/repos/ddmler/phpsa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ddmler/phpsa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ddmler/phpsa/git/refs{/sha}","trees_url":"https://api.github.com/repos/ddmler/phpsa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ddmler/phpsa/statuses/{sha}","languages_url":"https://api.github.com/repos/ddmler/phpsa/languages","stargazers_url":"https://api.github.com/repos/ddmler/phpsa/stargazers","contributors_url":"https://api.github.com/repos/ddmler/phpsa/contributors","subscribers_url":"https://api.github.com/repos/ddmler/phpsa/subscribers","subscription_url":"https://api.github.com/repos/ddmler/phpsa/subscription","commits_url":"https://api.github.com/repos/ddmler/phpsa/commits{/sha}","git_commits_url":"https://api.github.com/repos/ddmler/phpsa/git/commits{/sha}","comments_url":"https://api.github.com/repos/ddmler/phpsa/comments{/number}","issue_comment_url":"https://api.github.com/repos/ddmler/phpsa/issues/comments{/number}","contents_url":"https://api.github.com/repos/ddmler/phpsa/contents/{+path}","compare_url":"https://api.github.com/repos/ddmler/phpsa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ddmler/phpsa/merges","archive_url":"https://api.github.com/repos/ddmler/phpsa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ddmler/phpsa/downloads","issues_url":"https://api.github.com/repos/ddmler/phpsa/issues{/number}","pulls_url":"https://api.github.com/repos/ddmler/phpsa/pulls{/number}","milestones_url":"https://api.github.com/repos/ddmler/phpsa/milestones{/number}","notifications_url":"https://api.github.com/repos/ddmler/phpsa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ddmler/phpsa/labels{/name}","releases_url":"https://api.github.com/repos/ddmler/phpsa/releases{/id}","deployments_url":"https://api.github.com/repos/ddmler/phpsa/deployments","created_at":"2016-05-25T17:28:28Z","updated_at":"2016-05-25T17:28:29Z","pushed_at":"2016-12-29T11:42:34Z","git_url":"git://github.com/ddmler/phpsa.git","ssh_url":"git@github.com:ddmler/phpsa.git","clone_url":"https://github.com/ddmler/phpsa.git","svn_url":"https://github.com/ddmler/phpsa","homepage":"https://phpsa.dmtry.me/","size":1485,"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":"ovr:master","ref":"master","sha":"8f272b6f0e4888bd601254c319cb4f2b51f19035","user":{"login":"ovr","id":572096,"avatar_url":"https://avatars.githubusercontent.com/u/572096?v=3","gravatar_id":"","url":"https://api.github.com/users/ovr","html_url":"https://github.com/ovr","followers_url":"https://api.github.com/users/ovr/followers","following_url":"https://api.github.com/users/ovr/following{/other_user}","gists_url":"https://api.github.com/users/ovr/gists{/gist_id}","starred_url":"https://api.github.com/users/ovr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ovr/subscriptions","organizations_url":"https://api.github.com/users/ovr/orgs","repos_url":"https://api.github.com/users/ovr/repos","events_url":"https://api.github.com/users/ovr/events{/privacy}","received_events_url":"https://api.github.com/users/ovr/received_events","type":"User","site_admin":false},"repo":{"id":37760247,"name":"phpsa","full_name":"ovr/phpsa","owner":{"login":"ovr","id":572096,"avatar_url":"https://avatars.githubusercontent.com/u/572096?v=3","gravatar_id":"","url":"https://api.github.com/users/ovr","html_url":"https://github.com/ovr","followers_url":"https://api.github.com/users/ovr/followers","following_url":"https://api.github.com/users/ovr/following{/other_user}","gists_url":"https://api.github.com/users/ovr/gists{/gist_id}","starred_url":"https://api.github.com/users/ovr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ovr/subscriptions","organizations_url":"https://api.github.com/users/ovr/orgs","repos_url":"https://api.github.com/users/ovr/repos","events_url":"https://api.github.com/users/ovr/events{/privacy}","received_events_url":"https://api.github.com/users/ovr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ovr/phpsa","description":"Smart Analysis for PHP :bowtie::neckbeard:","fork":false,"url":"https://api.github.com/repos/ovr/phpsa","forks_url":"https://api.github.com/repos/ovr/phpsa/forks","keys_url":"https://api.github.com/repos/ovr/phpsa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ovr/phpsa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ovr/phpsa/teams","hooks_url":"https://api.github.com/repos/ovr/phpsa/hooks","issue_events_url":"https://api.github.com/repos/ovr/phpsa/issues/events{/number}","events_url":"https://api.github.com/repos/ovr/phpsa/events","assignees_url":"https://api.github.com/repos/ovr/phpsa/assignees{/user}","branches_url":"https://api.github.com/repos/ovr/phpsa/branches{/branch}","tags_url":"https://api.github.com/repos/ovr/phpsa/tags","blobs_url":"https://api.github.com/repos/ovr/phpsa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ovr/phpsa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ovr/phpsa/git/refs{/sha}","trees_url":"https://api.github.com/repos/ovr/phpsa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ovr/phpsa/statuses/{sha}","languages_url":"https://api.github.com/repos/ovr/phpsa/languages","stargazers_url":"https://api.github.com/repos/ovr/phpsa/stargazers","contributors_url":"https://api.github.com/repos/ovr/phpsa/contributors","subscribers_url":"https://api.github.com/repos/ovr/phpsa/subscribers","subscription_url":"https://api.github.com/repos/ovr/phpsa/subscription","commits_url":"https://api.github.com/repos/ovr/phpsa/commits{/sha}","git_commits_url":"https://api.github.com/repos/ovr/phpsa/git/commits{/sha}","comments_url":"https://api.github.com/repos/ovr/phpsa/comments{/number}","issue_comment_url":"https://api.github.com/repos/ovr/phpsa/issues/comments{/number}","contents_url":"https://api.github.com/repos/ovr/phpsa/contents/{+path}","compare_url":"https://api.github.com/repos/ovr/phpsa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ovr/phpsa/merges","archive_url":"https://api.github.com/repos/ovr/phpsa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ovr/phpsa/downloads","issues_url":"https://api.github.com/repos/ovr/phpsa/issues{/number}","pulls_url":"https://api.github.com/repos/ovr/phpsa/pulls{/number}","milestones_url":"https://api.github.com/repos/ovr/phpsa/milestones{/number}","notifications_url":"https://api.github.com/repos/ovr/phpsa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ovr/phpsa/labels{/name}","releases_url":"https://api.github.com/repos/ovr/phpsa/releases{/id}","deployments_url":"https://api.github.com/repos/ovr/phpsa/deployments","created_at":"2015-06-20T06:24:46Z","updated_at":"2016-12-26T20:41:02Z","pushed_at":"2016-12-29T11:45:30Z","git_url":"git://github.com/ovr/phpsa.git","ssh_url":"git@github.com:ovr/phpsa.git","clone_url":"https://github.com/ovr/phpsa.git","svn_url":"https://github.com/ovr/phpsa","homepage":"https://phpsa.dmtry.me/","size":1559,"stargazers_count":570,"watchers_count":570,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":63,"forks":37,"open_issues":63,"watchers":570,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ovr/phpsa/pulls/290"},"html":{"href":"https://github.com/ovr/phpsa/pull/290"},"issue":{"href":"https://api.github.com/repos/ovr/phpsa/issues/290"},"comments":{"href":"https://api.github.com/repos/ovr/phpsa/issues/290/comments"},"review_comments":{"href":"https://api.github.com/repos/ovr/phpsa/pulls/290/comments"},"review_comment":{"href":"https://api.github.com/repos/ovr/phpsa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ovr/phpsa/pulls/290/commits"},"statuses":{"href":"https://api.github.com/repos/ovr/phpsa/statuses/5696139b4e4b18507a6cfca551b7e5e95a5906ad"}}}}
{"actor":{"display_login":"ovr"}}