{"action":"created","comment":{"url":"https://api.github.com/repos/phpmd/phpmd/pulls/comments/122064822","pull_request_review_id":44148504,"id":122064822,"diff_hunk":"@@ -0,0 +1,126 @@\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 PHPMD\\Regression;\n+\n+use PHPMD\\PHPMD;\n+use PHPMD\\Report;\n+use PHPMD\\RuleSetFactory;\n+\n+/**\n+ * Regression test for issue 409.\n+ *\n+ * @link https://github.com/phpmd/phpmd/issues/409\n+ */\n+class ExcessivePublicCountWorksCorrectlyWithStaticMethodsTest extends AbstractTest\n+{\n+    /**\n+     * @var string Beginning of the violation message\n+     */\n+    const VIOLATION_MESSAGE = 'The class ExcessivePublicCountWorksForPublicStaticMethods has 71 public methods';\n+\n+    /**\n+     * @var \\PHPUnit_Framework_MockObject_MockObject|\\PHPMD\\Renderer\\TextRenderer\n+     */\n+    private $renderer;\n+\n+    /**\n+     * Sets up the renderer mock\n+     */\n+    public function setUp()\n+    {\n+        $this->renderer = $this->getMockBuilder('PHPMD\\Renderer\\TextRenderer')\n+            ->disableOriginalConstructor()\n+            ->setMethods(['renderReport', 'start', 'end'])\n+            ->getMock();\n+    }\n+\n+    /**\n+     * testReportIsGeneratedIWithNoSuppression\n+     *\n+     * This scenario should trigger at least four violations (in this direction):\n+     * - ExcessivePublicCount\n+     * - TooManyMethods\n+     * - TooManyPublicMethods\n+     * - ExcessiveClassComplexity\n+     *\n+     * @return void\n+     */\n+    public function testReportIsGeneratedIWithNoSuppression()\n+    {\n+        self::changeWorkingDirectory();\n+        $phpmd = new PHPMD();\n+        $this->renderer->expects($this->once())\n+            ->method('renderReport')\n+            ->will($this->returnCallback(\n+                function(Report $report) {","path":"src/test/php/PHPMD/Regression/ExcessivePublicCountWorksCorrectlyWithStaticMethodsTest.php","position":70,"original_position":70,"commit_id":"54ddf72ae578038421e35a4bf4f646ec1c82c2f6","original_commit_id":"54ddf72ae578038421e35a4bf4f646ec1c82c2f6","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":"Expected 1 space after FUNCTION keyword; 0 found","created_at":"2017-06-14T21:07:21Z","updated_at":"2017-06-14T21:07:21Z","html_url":"https://github.com/phpmd/phpmd/pull/495#discussion_r122064822","pull_request_url":"https://api.github.com/repos/phpmd/phpmd/pulls/495","_links":{"self":{"href":"https://api.github.com/repos/phpmd/phpmd/pulls/comments/122064822"},"html":{"href":"https://github.com/phpmd/phpmd/pull/495#discussion_r122064822"},"pull_request":{"href":"https://api.github.com/repos/phpmd/phpmd/pulls/495"}}},"pull_request":{"url":"https://api.github.com/repos/phpmd/phpmd/pulls/495","id":125693243,"html_url":"https://github.com/phpmd/phpmd/pull/495","diff_url":"https://github.com/phpmd/phpmd/pull/495.diff","patch_url":"https://github.com/phpmd/phpmd/pull/495.patch","issue_url":"https://api.github.com/repos/phpmd/phpmd/issues/495","number":495,"state":"open","locked":false,"title":"SuppressWarnings for ExcessivePublicCount #409","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":"I've checked if phpmd/phpmd#409 is still valid and it looks it's not. I've covered it with tests to prove it. Issue may be closed.\r\nCloses phpmd/phpmd#409","created_at":"2017-06-14T21:07:02Z","updated_at":"2017-06-14T21:07:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"885e0a6eb954fe92f1a3481cdbce49a59bb41869","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/phpmd/phpmd/pulls/495/commits","review_comments_url":"https://api.github.com/repos/phpmd/phpmd/pulls/495/comments","review_comment_url":"https://api.github.com/repos/phpmd/phpmd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phpmd/phpmd/issues/495/comments","statuses_url":"https://api.github.com/repos/phpmd/phpmd/statuses/54ddf72ae578038421e35a4bf4f646ec1c82c2f6","head":{"label":"eeree:issue-409","ref":"issue-409","sha":"54ddf72ae578038421e35a4bf4f646ec1c82c2f6","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-14T21:02:59Z","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":3162,"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":"fbecb1b0193d07c1f452d0c3920825d68e2b9627","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-14T13:45:05Z","pushed_at":"2017-06-14T21:07:03Z","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":3137,"stargazers_count":874,"watchers_count":874,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":202,"mirror_url":null,"open_issues_count":110,"forks":202,"open_issues":110,"watchers":874,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/phpmd/phpmd/pulls/495"},"html":{"href":"https://github.com/phpmd/phpmd/pull/495"},"issue":{"href":"https://api.github.com/repos/phpmd/phpmd/issues/495"},"comments":{"href":"https://api.github.com/repos/phpmd/phpmd/issues/495/comments"},"review_comments":{"href":"https://api.github.com/repos/phpmd/phpmd/pulls/495/comments"},"review_comment":{"href":"https://api.github.com/repos/phpmd/phpmd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phpmd/phpmd/pulls/495/commits"},"statuses":{"href":"https://api.github.com/repos/phpmd/phpmd/statuses/54ddf72ae578038421e35a4bf4f646ec1c82c2f6"}}}}
{"actor":{"display_login":"stickler-ci"}}