{"action":"created","comment":{"url":"https://api.github.com/repos/phpmd/phpmd/pulls/comments/120221758","pull_request_review_id":42166684,"id":120221758,"diff_hunk":"@@ -0,0 +1,70 @@\n+<?php\n+/**\n+ * This file is part of PHP Mess Detector.\n+ *\n+ * Copyright (c) Manuel Pichler <mapi@phpmd.org>.\n+ * All rights reserved.\n+ *\n+ * Licensed under BSD License\n+ * For full copyright and license information, please see the LICENSE file.\n+ * Redistributions of files must retain the above copyright notice.\n+ *\n+ * @author Manuel Pichler <mapi@phpmd.org>\n+ * @copyright Manuel Pichler. All rights reserved.\n+ * @license https://opensource.org/licenses/bsd-license.php BSD License\n+ * @link http://phpmd.org/\n+ */\n+\n+namespace PHPMDTest;\n+\n+class testRuleNotAppliesToClasses\n+{\n+    const FOO = 'foo';\n+\n+    private $bar = 'bar';\n+\n+    private $baz = 'baz';\n+\n+    public function testRuleNotAppliesToClasses()\n+    {\n+        if (self::FOO == rand()) {\n+            // ...\n+        }\n+        if ('' === time() || static::FOO >> 1) {\n+            // ...\n+        }\n+        if ('100' ^ $this->bar == $this->bar . 'baz') {\n+            // ...\n+        }\n+        if (__LINE__ . 'foo' === $this->bar) {\n+            // ...\n+        }\n+        if (!static::FOO) {\n+            // ...\n+        }\n+        if ($this->bar) {\n+            // ...\n+        }\n+        if (self::FOO) {\n+            // ...\n+        }\n+        if (!self::FOO) {\n+            // ...\n+        }\n+        if (testRuleNotAppliesToClasses::FOO) {\n+            // ...\n+        }\n+        if ($this->getBaz()) {\n+            // ...\n+        }\n+        if (array()) {\n+            // ...\n+        }\n+\n+    }","path":"src/test/resources/files/Rule/CleanCode/IfStatementWithoutLogic/testRuleNotAppliesToClasses.php","position":64,"original_position":64,"commit_id":"0a86eb91c84c4417bb13292391b11af9bcf8332a","original_commit_id":"0a86eb91c84c4417bb13292391b11af9bcf8332a","user":{"login":"stickler-ci","id":16011037,"avatar_url":"https://avatars0.githubusercontent.com/u/16011037?v=3","gravatar_id":"","url":"https://api.github.com/users/stickler-ci","html_url":"https://github.com/stickler-ci","followers_url":"https://api.github.com/users/stickler-ci/followers","following_url":"https://api.github.com/users/stickler-ci/following{/other_user}","gists_url":"https://api.github.com/users/stickler-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/stickler-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stickler-ci/subscriptions","organizations_url":"https://api.github.com/users/stickler-ci/orgs","repos_url":"https://api.github.com/users/stickler-ci/repos","events_url":"https://api.github.com/users/stickler-ci/events{/privacy}","received_events_url":"https://api.github.com/users/stickler-ci/received_events","type":"User","site_admin":false},"body":"Function closing brace must go on the next line following the body; found 1 blank lines before brace","created_at":"2017-06-05T22:05:04Z","updated_at":"2017-06-05T22:05:04Z","html_url":"https://github.com/phpmd/phpmd/pull/485#discussion_r120221758","pull_request_url":"https://api.github.com/repos/phpmd/phpmd/pulls/485","_links":{"self":{"href":"https://api.github.com/repos/phpmd/phpmd/pulls/comments/120221758"},"html":{"href":"https://github.com/phpmd/phpmd/pull/485#discussion_r120221758"},"pull_request":{"href":"https://api.github.com/repos/phpmd/phpmd/pulls/485"}}},"pull_request":{"url":"https://api.github.com/repos/phpmd/phpmd/pulls/485","id":124070799,"html_url":"https://github.com/phpmd/phpmd/pull/485","diff_url":"https://github.com/phpmd/phpmd/pull/485.diff","patch_url":"https://github.com/phpmd/phpmd/pull/485.patch","issue_url":"https://api.github.com/repos/phpmd/phpmd/issues/485","number":485,"state":"open","locked":false,"title":"Conditional statements without logic should be avoided","user":{"login":"eeree","id":1375008,"avatar_url":"https://avatars3.githubusercontent.com/u/1375008?v=3","gravatar_id":"","url":"https://api.github.com/users/eeree","html_url":"https://github.com/eeree","followers_url":"https://api.github.com/users/eeree/followers","following_url":"https://api.github.com/users/eeree/following{/other_user}","gists_url":"https://api.github.com/users/eeree/gists{/gist_id}","starred_url":"https://api.github.com/users/eeree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeree/subscriptions","organizations_url":"https://api.github.com/users/eeree/orgs","repos_url":"https://api.github.com/users/eeree/repos","events_url":"https://api.github.com/users/eeree/events{/privacy}","received_events_url":"https://api.github.com/users/eeree/received_events","type":"User","site_admin":false},"body":"This provides a functionality to signal `if/elseif` statements that have no logic. Example:\r\n\r\n```\r\nif (true) {\r\n  // ...\r\n} elseif ('foo' == null) {\r\n  // ...\r\n}\r\n```","created_at":"2017-06-05T22:04:46Z","updated_at":"2017-06-05T22:05:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"45a385f149e32d3e080845e89828f845ffc3c333","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/phpmd/phpmd/pulls/485/commits","review_comments_url":"https://api.github.com/repos/phpmd/phpmd/pulls/485/comments","review_comment_url":"https://api.github.com/repos/phpmd/phpmd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phpmd/phpmd/issues/485/comments","statuses_url":"https://api.github.com/repos/phpmd/phpmd/statuses/0a86eb91c84c4417bb13292391b11af9bcf8332a","head":{"label":"eeree:conditionals-without-logic","ref":"conditionals-without-logic","sha":"0a86eb91c84c4417bb13292391b11af9bcf8332a","user":{"login":"eeree","id":1375008,"avatar_url":"https://avatars3.githubusercontent.com/u/1375008?v=3","gravatar_id":"","url":"https://api.github.com/users/eeree","html_url":"https://github.com/eeree","followers_url":"https://api.github.com/users/eeree/followers","following_url":"https://api.github.com/users/eeree/following{/other_user}","gists_url":"https://api.github.com/users/eeree/gists{/gist_id}","starred_url":"https://api.github.com/users/eeree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeree/subscriptions","organizations_url":"https://api.github.com/users/eeree/orgs","repos_url":"https://api.github.com/users/eeree/repos","events_url":"https://api.github.com/users/eeree/events{/privacy}","received_events_url":"https://api.github.com/users/eeree/received_events","type":"User","site_admin":false},"repo":{"id":92267192,"name":"phpmd","full_name":"eeree/phpmd","owner":{"login":"eeree","id":1375008,"avatar_url":"https://avatars3.githubusercontent.com/u/1375008?v=3","gravatar_id":"","url":"https://api.github.com/users/eeree","html_url":"https://github.com/eeree","followers_url":"https://api.github.com/users/eeree/followers","following_url":"https://api.github.com/users/eeree/following{/other_user}","gists_url":"https://api.github.com/users/eeree/gists{/gist_id}","starred_url":"https://api.github.com/users/eeree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeree/subscriptions","organizations_url":"https://api.github.com/users/eeree/orgs","repos_url":"https://api.github.com/users/eeree/repos","events_url":"https://api.github.com/users/eeree/events{/privacy}","received_events_url":"https://api.github.com/users/eeree/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eeree/phpmd","description":"PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly frontend application for the raw metrics stream measured by PHP Depend.","fork":true,"url":"https://api.github.com/repos/eeree/phpmd","forks_url":"https://api.github.com/repos/eeree/phpmd/forks","keys_url":"https://api.github.com/repos/eeree/phpmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eeree/phpmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eeree/phpmd/teams","hooks_url":"https://api.github.com/repos/eeree/phpmd/hooks","issue_events_url":"https://api.github.com/repos/eeree/phpmd/issues/events{/number}","events_url":"https://api.github.com/repos/eeree/phpmd/events","assignees_url":"https://api.github.com/repos/eeree/phpmd/assignees{/user}","branches_url":"https://api.github.com/repos/eeree/phpmd/branches{/branch}","tags_url":"https://api.github.com/repos/eeree/phpmd/tags","blobs_url":"https://api.github.com/repos/eeree/phpmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eeree/phpmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eeree/phpmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/eeree/phpmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eeree/phpmd/statuses/{sha}","languages_url":"https://api.github.com/repos/eeree/phpmd/languages","stargazers_url":"https://api.github.com/repos/eeree/phpmd/stargazers","contributors_url":"https://api.github.com/repos/eeree/phpmd/contributors","subscribers_url":"https://api.github.com/repos/eeree/phpmd/subscribers","subscription_url":"https://api.github.com/repos/eeree/phpmd/subscription","commits_url":"https://api.github.com/repos/eeree/phpmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/eeree/phpmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/eeree/phpmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/eeree/phpmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/eeree/phpmd/contents/{+path}","compare_url":"https://api.github.com/repos/eeree/phpmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eeree/phpmd/merges","archive_url":"https://api.github.com/repos/eeree/phpmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eeree/phpmd/downloads","issues_url":"https://api.github.com/repos/eeree/phpmd/issues{/number}","pulls_url":"https://api.github.com/repos/eeree/phpmd/pulls{/number}","milestones_url":"https://api.github.com/repos/eeree/phpmd/milestones{/number}","notifications_url":"https://api.github.com/repos/eeree/phpmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eeree/phpmd/labels{/name}","releases_url":"https://api.github.com/repos/eeree/phpmd/releases{/id}","deployments_url":"https://api.github.com/repos/eeree/phpmd/deployments","created_at":"2017-05-24T08:11:11Z","updated_at":"2017-05-24T08:11:14Z","pushed_at":"2017-06-05T22:02:31Z","git_url":"git://github.com/eeree/phpmd.git","ssh_url":"git@github.com:eeree/phpmd.git","clone_url":"https://github.com/eeree/phpmd.git","svn_url":"https://github.com/eeree/phpmd","homepage":"http://phpmd.org","size":3158,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"phpmd:master","ref":"master","sha":"eeea9ee2a59cdba3f99ed6ff3934b67c9906a2e0","user":{"login":"phpmd","id":590448,"avatar_url":"https://avatars3.githubusercontent.com/u/590448?v=3","gravatar_id":"","url":"https://api.github.com/users/phpmd","html_url":"https://github.com/phpmd","followers_url":"https://api.github.com/users/phpmd/followers","following_url":"https://api.github.com/users/phpmd/following{/other_user}","gists_url":"https://api.github.com/users/phpmd/gists{/gist_id}","starred_url":"https://api.github.com/users/phpmd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpmd/subscriptions","organizations_url":"https://api.github.com/users/phpmd/orgs","repos_url":"https://api.github.com/users/phpmd/repos","events_url":"https://api.github.com/users/phpmd/events{/privacy}","received_events_url":"https://api.github.com/users/phpmd/received_events","type":"Organization","site_admin":false},"repo":{"id":1307238,"name":"phpmd","full_name":"phpmd/phpmd","owner":{"login":"phpmd","id":590448,"avatar_url":"https://avatars3.githubusercontent.com/u/590448?v=3","gravatar_id":"","url":"https://api.github.com/users/phpmd","html_url":"https://github.com/phpmd","followers_url":"https://api.github.com/users/phpmd/followers","following_url":"https://api.github.com/users/phpmd/following{/other_user}","gists_url":"https://api.github.com/users/phpmd/gists{/gist_id}","starred_url":"https://api.github.com/users/phpmd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpmd/subscriptions","organizations_url":"https://api.github.com/users/phpmd/orgs","repos_url":"https://api.github.com/users/phpmd/repos","events_url":"https://api.github.com/users/phpmd/events{/privacy}","received_events_url":"https://api.github.com/users/phpmd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phpmd/phpmd","description":"PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly frontend application for the raw metrics stream measured by PHP Depend.","fork":true,"url":"https://api.github.com/repos/phpmd/phpmd","forks_url":"https://api.github.com/repos/phpmd/phpmd/forks","keys_url":"https://api.github.com/repos/phpmd/phpmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phpmd/phpmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phpmd/phpmd/teams","hooks_url":"https://api.github.com/repos/phpmd/phpmd/hooks","issue_events_url":"https://api.github.com/repos/phpmd/phpmd/issues/events{/number}","events_url":"https://api.github.com/repos/phpmd/phpmd/events","assignees_url":"https://api.github.com/repos/phpmd/phpmd/assignees{/user}","branches_url":"https://api.github.com/repos/phpmd/phpmd/branches{/branch}","tags_url":"https://api.github.com/repos/phpmd/phpmd/tags","blobs_url":"https://api.github.com/repos/phpmd/phpmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phpmd/phpmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phpmd/phpmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/phpmd/phpmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phpmd/phpmd/statuses/{sha}","languages_url":"https://api.github.com/repos/phpmd/phpmd/languages","stargazers_url":"https://api.github.com/repos/phpmd/phpmd/stargazers","contributors_url":"https://api.github.com/repos/phpmd/phpmd/contributors","subscribers_url":"https://api.github.com/repos/phpmd/phpmd/subscribers","subscription_url":"https://api.github.com/repos/phpmd/phpmd/subscription","commits_url":"https://api.github.com/repos/phpmd/phpmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/phpmd/phpmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/phpmd/phpmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/phpmd/phpmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/phpmd/phpmd/contents/{+path}","compare_url":"https://api.github.com/repos/phpmd/phpmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phpmd/phpmd/merges","archive_url":"https://api.github.com/repos/phpmd/phpmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phpmd/phpmd/downloads","issues_url":"https://api.github.com/repos/phpmd/phpmd/issues{/number}","pulls_url":"https://api.github.com/repos/phpmd/phpmd/pulls{/number}","milestones_url":"https://api.github.com/repos/phpmd/phpmd/milestones{/number}","notifications_url":"https://api.github.com/repos/phpmd/phpmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phpmd/phpmd/labels{/name}","releases_url":"https://api.github.com/repos/phpmd/phpmd/releases{/id}","deployments_url":"https://api.github.com/repos/phpmd/phpmd/deployments","created_at":"2011-01-29T21:51:55Z","updated_at":"2017-06-03T12:11:48Z","pushed_at":"2017-06-05T22:04:46Z","git_url":"git://github.com/phpmd/phpmd.git","ssh_url":"git@github.com:phpmd/phpmd.git","clone_url":"https://github.com/phpmd/phpmd.git","svn_url":"https://github.com/phpmd/phpmd","homepage":"http://phpmd.org","size":3118,"stargazers_count":865,"watchers_count":865,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":197,"mirror_url":null,"open_issues_count":109,"forks":197,"open_issues":109,"watchers":865,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/phpmd/phpmd/pulls/485"},"html":{"href":"https://github.com/phpmd/phpmd/pull/485"},"issue":{"href":"https://api.github.com/repos/phpmd/phpmd/issues/485"},"comments":{"href":"https://api.github.com/repos/phpmd/phpmd/issues/485/comments"},"review_comments":{"href":"https://api.github.com/repos/phpmd/phpmd/pulls/485/comments"},"review_comment":{"href":"https://api.github.com/repos/phpmd/phpmd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phpmd/phpmd/pulls/485/commits"},"statuses":{"href":"https://api.github.com/repos/phpmd/phpmd/statuses/0a86eb91c84c4417bb13292391b11af9bcf8332a"}}}}
{"actor":{"display_login":"stickler-ci"}}