{"action":"created","comment":{"url":"https://api.github.com/repos/igorkamyshev/caracal-cms/pulls/comments/206866595","pull_request_review_id":142360936,"id":206866595,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjg2NjU5NQ==","diff_hunk":"@@ -0,0 +1,89 @@\n+<?php\n+\n+namespace App\\Tests\\Gallery;\n+\n+\n+use App\\Gallery\\Gallery;\n+use App\\Gallery\\Photo;\n+use PHPUnit\\Framework\\TestCase;\n+\n+class GalleryTest extends TestCase\n+{\n+    public function testCreateEmpty()\n+    {\n+        $gallery = Gallery::createEmpty();\n+\n+        $this->assertGreaterThan(1, mb_strlen($gallery->getId()));\n+        $this->assertNull($gallery->getName());\n+        $this->assertNull($gallery->getDescription());\n+        $this->assertCount(0, $gallery->getPhotos());\n+    }\n+\n+    public function testCreate()\n+    {\n+        $gallery = Gallery::create('name', 'description');\n+\n+        $this->assertGreaterThan(1, mb_strlen($gallery->getId()));\n+        $this->assertEquals('name', $gallery->getName());\n+        $this->assertEquals('description', $gallery->getDescription());\n+        $this->assertCount(0, $gallery->getPhotos());\n+    }\n+\n+    public function testRename()\n+    {\n+        $gallery = Gallery::createEmpty();\n+\n+        $gallery->rename('new name');\n+\n+        $this->assertEquals('new name', $gallery->getName());\n+    }\n+\n+    public function testChangeDescription()\n+    {\n+        $gallery = Gallery::createEmpty();\n+\n+        $gallery->changeDescription('new description');\n+\n+        $this->assertEquals('new description', $gallery->getDescription());\n+    }\n+\n+    public function testAddOrphanPhoto()\n+    {\n+        $gallery = Gallery::createEmpty();\n+\n+        $photo = Photo::createEmpty('link link');\n+\n+        $gallery->addPhoto($photo);\n+\n+        $this->assertEquals($gallery, $photo->getGallery());\n+        $this->assertCount(1, $gallery->getPhotos());\n+    }\n+\n+    public function testAddPhotoFromOtherGallery()\n+    {\n+        $newGallery = Gallery::createEmpty();\n+\n+        $photo = Photo::createEmpty('link link');\n+        $oldGallery = Gallery::createEmpty();","path":"tests/Gallery/GalleryTest.php","position":67,"original_position":67,"commit_id":"3071017ede18b05ffca858023d4256045557f55a","original_commit_id":"3071017ede18b05ffca858023d4256045557f55a","user":{"login":"codacy-bot","id":19940114,"node_id":"MDQ6VXNlcjE5OTQwMTE0","avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [Avoid using static access to class '\\App\\Gallery\\Gallery' in method 'testAddPhotoFromOtherGallery'.](https://app.codacy.com/app/igorkamyshev/caracal-cms/pullRequest?prid=1975562)","created_at":"2018-08-01T12:54:24Z","updated_at":"2018-08-01T12:54:24Z","html_url":"https://github.com/igorkamyshev/caracal-cms/pull/4#discussion_r206866595","pull_request_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/pulls/4","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/igorkamyshev/caracal-cms/pulls/comments/206866595"},"html":{"href":"https://github.com/igorkamyshev/caracal-cms/pull/4#discussion_r206866595"},"pull_request":{"href":"https://api.github.com/repos/igorkamyshev/caracal-cms/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/igorkamyshev/caracal-cms/pulls/4","id":205086692,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1MDg2Njky","html_url":"https://github.com/igorkamyshev/caracal-cms/pull/4","diff_url":"https://github.com/igorkamyshev/caracal-cms/pull/4.diff","patch_url":"https://github.com/igorkamyshev/caracal-cms/pull/4.patch","issue_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/issues/4","number":4,"state":"open","locked":false,"title":"Added entity for app","user":{"login":"igorkamyshev","id":26767722,"node_id":"MDQ6VXNlcjI2NzY3NzIy","avatar_url":"https://avatars3.githubusercontent.com/u/26767722?v=4","gravatar_id":"","url":"https://api.github.com/users/igorkamyshev","html_url":"https://github.com/igorkamyshev","followers_url":"https://api.github.com/users/igorkamyshev/followers","following_url":"https://api.github.com/users/igorkamyshev/following{/other_user}","gists_url":"https://api.github.com/users/igorkamyshev/gists{/gist_id}","starred_url":"https://api.github.com/users/igorkamyshev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorkamyshev/subscriptions","organizations_url":"https://api.github.com/users/igorkamyshev/orgs","repos_url":"https://api.github.com/users/igorkamyshev/repos","events_url":"https://api.github.com/users/igorkamyshev/events{/privacy}","received_events_url":"https://api.github.com/users/igorkamyshev/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-31T11:52:59Z","updated_at":"2018-08-01T12:54:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d129d7c89e03712870c14a2dd58310c61be751b7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/pulls/4/commits","review_comments_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/pulls/4/comments","review_comment_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/issues/4/comments","statuses_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/statuses/3071017ede18b05ffca858023d4256045557f55a","head":{"label":"igorkamyshev:models","ref":"models","sha":"3071017ede18b05ffca858023d4256045557f55a","user":{"login":"igorkamyshev","id":26767722,"node_id":"MDQ6VXNlcjI2NzY3NzIy","avatar_url":"https://avatars3.githubusercontent.com/u/26767722?v=4","gravatar_id":"","url":"https://api.github.com/users/igorkamyshev","html_url":"https://github.com/igorkamyshev","followers_url":"https://api.github.com/users/igorkamyshev/followers","following_url":"https://api.github.com/users/igorkamyshev/following{/other_user}","gists_url":"https://api.github.com/users/igorkamyshev/gists{/gist_id}","starred_url":"https://api.github.com/users/igorkamyshev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorkamyshev/subscriptions","organizations_url":"https://api.github.com/users/igorkamyshev/orgs","repos_url":"https://api.github.com/users/igorkamyshev/repos","events_url":"https://api.github.com/users/igorkamyshev/events{/privacy}","received_events_url":"https://api.github.com/users/igorkamyshev/received_events","type":"User","site_admin":false},"repo":{"id":135136426,"node_id":"MDEwOlJlcG9zaXRvcnkxMzUxMzY0MjY=","name":"caracal-cms","full_name":"igorkamyshev/caracal-cms","owner":{"login":"igorkamyshev","id":26767722,"node_id":"MDQ6VXNlcjI2NzY3NzIy","avatar_url":"https://avatars3.githubusercontent.com/u/26767722?v=4","gravatar_id":"","url":"https://api.github.com/users/igorkamyshev","html_url":"https://github.com/igorkamyshev","followers_url":"https://api.github.com/users/igorkamyshev/followers","following_url":"https://api.github.com/users/igorkamyshev/following{/other_user}","gists_url":"https://api.github.com/users/igorkamyshev/gists{/gist_id}","starred_url":"https://api.github.com/users/igorkamyshev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorkamyshev/subscriptions","organizations_url":"https://api.github.com/users/igorkamyshev/orgs","repos_url":"https://api.github.com/users/igorkamyshev/repos","events_url":"https://api.github.com/users/igorkamyshev/events{/privacy}","received_events_url":"https://api.github.com/users/igorkamyshev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/igorkamyshev/caracal-cms","description":null,"fork":false,"url":"https://api.github.com/repos/igorkamyshev/caracal-cms","forks_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/forks","keys_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/teams","hooks_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/hooks","issue_events_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/issues/events{/number}","events_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/events","assignees_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/assignees{/user}","branches_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/branches{/branch}","tags_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/tags","blobs_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/languages","stargazers_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/stargazers","contributors_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/contributors","subscribers_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/subscribers","subscription_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/subscription","commits_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/contents/{+path}","compare_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/merges","archive_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/downloads","issues_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/issues{/number}","pulls_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/labels{/name}","releases_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/releases{/id}","deployments_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/deployments","created_at":"2018-05-28T09:02:27Z","updated_at":"2018-08-01T12:53:16Z","pushed_at":"2018-08-01T12:53:14Z","git_url":"git://github.com/igorkamyshev/caracal-cms.git","ssh_url":"git@github.com:igorkamyshev/caracal-cms.git","clone_url":"https://github.com/igorkamyshev/caracal-cms.git","svn_url":"https://github.com/igorkamyshev/caracal-cms","homepage":null,"size":11140,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"igorkamyshev:master","ref":"master","sha":"28437a6d15d7618df0c62698e8fd98c0823c7a06","user":{"login":"igorkamyshev","id":26767722,"node_id":"MDQ6VXNlcjI2NzY3NzIy","avatar_url":"https://avatars3.githubusercontent.com/u/26767722?v=4","gravatar_id":"","url":"https://api.github.com/users/igorkamyshev","html_url":"https://github.com/igorkamyshev","followers_url":"https://api.github.com/users/igorkamyshev/followers","following_url":"https://api.github.com/users/igorkamyshev/following{/other_user}","gists_url":"https://api.github.com/users/igorkamyshev/gists{/gist_id}","starred_url":"https://api.github.com/users/igorkamyshev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorkamyshev/subscriptions","organizations_url":"https://api.github.com/users/igorkamyshev/orgs","repos_url":"https://api.github.com/users/igorkamyshev/repos","events_url":"https://api.github.com/users/igorkamyshev/events{/privacy}","received_events_url":"https://api.github.com/users/igorkamyshev/received_events","type":"User","site_admin":false},"repo":{"id":135136426,"node_id":"MDEwOlJlcG9zaXRvcnkxMzUxMzY0MjY=","name":"caracal-cms","full_name":"igorkamyshev/caracal-cms","owner":{"login":"igorkamyshev","id":26767722,"node_id":"MDQ6VXNlcjI2NzY3NzIy","avatar_url":"https://avatars3.githubusercontent.com/u/26767722?v=4","gravatar_id":"","url":"https://api.github.com/users/igorkamyshev","html_url":"https://github.com/igorkamyshev","followers_url":"https://api.github.com/users/igorkamyshev/followers","following_url":"https://api.github.com/users/igorkamyshev/following{/other_user}","gists_url":"https://api.github.com/users/igorkamyshev/gists{/gist_id}","starred_url":"https://api.github.com/users/igorkamyshev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorkamyshev/subscriptions","organizations_url":"https://api.github.com/users/igorkamyshev/orgs","repos_url":"https://api.github.com/users/igorkamyshev/repos","events_url":"https://api.github.com/users/igorkamyshev/events{/privacy}","received_events_url":"https://api.github.com/users/igorkamyshev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/igorkamyshev/caracal-cms","description":null,"fork":false,"url":"https://api.github.com/repos/igorkamyshev/caracal-cms","forks_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/forks","keys_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/teams","hooks_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/hooks","issue_events_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/issues/events{/number}","events_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/events","assignees_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/assignees{/user}","branches_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/branches{/branch}","tags_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/tags","blobs_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/languages","stargazers_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/stargazers","contributors_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/contributors","subscribers_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/subscribers","subscription_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/subscription","commits_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/contents/{+path}","compare_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/merges","archive_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/downloads","issues_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/issues{/number}","pulls_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/labels{/name}","releases_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/releases{/id}","deployments_url":"https://api.github.com/repos/igorkamyshev/caracal-cms/deployments","created_at":"2018-05-28T09:02:27Z","updated_at":"2018-08-01T12:53:16Z","pushed_at":"2018-08-01T12:53:14Z","git_url":"git://github.com/igorkamyshev/caracal-cms.git","ssh_url":"git@github.com:igorkamyshev/caracal-cms.git","clone_url":"https://github.com/igorkamyshev/caracal-cms.git","svn_url":"https://github.com/igorkamyshev/caracal-cms","homepage":null,"size":11140,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/igorkamyshev/caracal-cms/pulls/4"},"html":{"href":"https://github.com/igorkamyshev/caracal-cms/pull/4"},"issue":{"href":"https://api.github.com/repos/igorkamyshev/caracal-cms/issues/4"},"comments":{"href":"https://api.github.com/repos/igorkamyshev/caracal-cms/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/igorkamyshev/caracal-cms/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/igorkamyshev/caracal-cms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/igorkamyshev/caracal-cms/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/igorkamyshev/caracal-cms/statuses/3071017ede18b05ffca858023d4256045557f55a"}},"author_association":"OWNER"}}
{"actor":{"display_login":"codacy-bot"}}