{"action":"created","comment":{"url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/pulls/comments/220500888","pull_request_review_id":158919933,"id":220500888,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMDUwMDg4OA==","diff_hunk":"@@ -66,16 +67,27 @@ public function actionDesignList($viewYours = false)\n             $params['viewYours'] = true;\n         }\n \n+        if ($viewFollowing) {\n+            $params['viewFollowing'] = true;\n+        }\n+\n         $dataProvider = $searchModel->search($params);\n \n         $countYours = Moqup::find()->where(['user_id' => Yii::$app->user->identity->id])->count();\n-        $countAll = Moqup::find()->where(['!=', 'user_id', Yii::$app->user->identity->id])->count();\n+        $countFollowing = Moqup::find()\n+            ->alias('m')\n+            ->leftJoin(UserMoqupFollow::tableName() . ' umf', 'umf.moqup_id = m.id')\n+            ->where(['umf.user_id' => Yii::$app->user->identity->id])\n+            ->count();\n+        $countAll = Moqup::find()->count();","path":"controllers/MoqupController.php","position":34,"original_position":34,"commit_id":"68df9a99027c8dd275410ceb09f82d003aa501c9","original_commit_id":"68df9a99027c8dd275410ceb09f82d003aa501c9","user":{"login":"codeclimate[bot]","id":36754821,"node_id":"MDM6Qm90MzY3NTQ4MjE=","avatar_url":"https://avatars0.githubusercontent.com/in/9403?v=4","gravatar_id":"","url":"https://api.github.com/users/codeclimate%5Bbot%5D","html_url":"https://github.com/apps/codeclimate","followers_url":"https://api.github.com/users/codeclimate%5Bbot%5D/followers","following_url":"https://api.github.com/users/codeclimate%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/codeclimate%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/codeclimate%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeclimate%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/codeclimate%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/codeclimate%5Bbot%5D/repos","events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"Static call to undeclared method `\\app\\models\\Moqup::find`","created_at":"2018-09-26T10:02:32Z","updated_at":"2018-09-26T10:02:33Z","html_url":"https://github.com/opensourcewebsite-org/opensourcewebsite-org/pull/47#discussion_r220500888","pull_request_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/pulls/47","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/pulls/comments/220500888"},"html":{"href":"https://github.com/opensourcewebsite-org/opensourcewebsite-org/pull/47#discussion_r220500888"},"pull_request":{"href":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/pulls/47","id":217928235,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3OTI4MjM1","html_url":"https://github.com/opensourcewebsite-org/opensourcewebsite-org/pull/47","diff_url":"https://github.com/opensourcewebsite-org/opensourcewebsite-org/pull/47.diff","patch_url":"https://github.com/opensourcewebsite-org/opensourcewebsite-org/pull/47.patch","issue_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/issues/47","number":47,"state":"open","locked":false,"title":"Updated moqup layout and added follow moqup/user functionality #46","user":{"login":"kronos1390","id":42483081,"node_id":"MDQ6VXNlcjQyNDgzMDgx","avatar_url":"https://avatars2.githubusercontent.com/u/42483081?v=4","gravatar_id":"","url":"https://api.github.com/users/kronos1390","html_url":"https://github.com/kronos1390","followers_url":"https://api.github.com/users/kronos1390/followers","following_url":"https://api.github.com/users/kronos1390/following{/other_user}","gists_url":"https://api.github.com/users/kronos1390/gists{/gist_id}","starred_url":"https://api.github.com/users/kronos1390/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kronos1390/subscriptions","organizations_url":"https://api.github.com/users/kronos1390/orgs","repos_url":"https://api.github.com/users/kronos1390/repos","events_url":"https://api.github.com/users/kronos1390/events{/privacy}","received_events_url":"https://api.github.com/users/kronos1390/received_events","type":"User","site_admin":false},"body":"In controllers/MoqupController.php\r\nUpdated the design-list action\r\n\r\nIn controllers/UserController.php\r\nAdded actions to follow/unfollow a moqup/user\r\n\r\nCreated migrations/m180925_000332_create_junction_moqup_and_user_tables\r\nAdd table to save the moqup-user relation\r\n\r\nCreated migrations/m180925_002119_create_junction_user_and_user_tables\r\nAdd table to save the user-user relation\r\n\r\nCreated models/UserMoqupFollow, models/UserUserFollow\r\nTo manage the relation tables\r\n\r\nmodels/Moqup.php\r\nAdded methods to get the followers and count them\r\n\r\nmodels/MoqupSearch.php\r\nAdded filter for the \"following\" list\r\n\r\nmodels/User.php\r\nAdded methods to get the moqups/users followed, followers, number of followers\r\nand get a list of the followed moqup/user ids\r\n\r\nviews/moqup/design-list.php\r\nChanged the layout of the grid\r\n\r\nviews/moqup/design-view.php\r\nAdded View, Html and CSS tabs\r\n\r\nviews/moqup/design-preview.php\r\nAdded css to avoid a white bar appearing sometimes at the end of the view tab\r\n","created_at":"2018-09-25T10:23:31Z","updated_at":"2018-09-26T10:02:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2319aa6ae28e145003196cfe8d7ba2e6a11f429c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/pulls/47/commits","review_comments_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/pulls/47/comments","review_comment_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/issues/47/comments","statuses_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/statuses/68df9a99027c8dd275410ceb09f82d003aa501c9","head":{"label":"kronos1390:moqup-layout","ref":"moqup-layout","sha":"68df9a99027c8dd275410ceb09f82d003aa501c9","user":{"login":"kronos1390","id":42483081,"node_id":"MDQ6VXNlcjQyNDgzMDgx","avatar_url":"https://avatars2.githubusercontent.com/u/42483081?v=4","gravatar_id":"","url":"https://api.github.com/users/kronos1390","html_url":"https://github.com/kronos1390","followers_url":"https://api.github.com/users/kronos1390/followers","following_url":"https://api.github.com/users/kronos1390/following{/other_user}","gists_url":"https://api.github.com/users/kronos1390/gists{/gist_id}","starred_url":"https://api.github.com/users/kronos1390/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kronos1390/subscriptions","organizations_url":"https://api.github.com/users/kronos1390/orgs","repos_url":"https://api.github.com/users/kronos1390/repos","events_url":"https://api.github.com/users/kronos1390/events{/privacy}","received_events_url":"https://api.github.com/users/kronos1390/received_events","type":"User","site_admin":false},"repo":{"id":145178219,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUxNzgyMTk=","name":"opensourcewebsite-org","full_name":"kronos1390/opensourcewebsite-org","private":false,"owner":{"login":"kronos1390","id":42483081,"node_id":"MDQ6VXNlcjQyNDgzMDgx","avatar_url":"https://avatars2.githubusercontent.com/u/42483081?v=4","gravatar_id":"","url":"https://api.github.com/users/kronos1390","html_url":"https://github.com/kronos1390","followers_url":"https://api.github.com/users/kronos1390/followers","following_url":"https://api.github.com/users/kronos1390/following{/other_user}","gists_url":"https://api.github.com/users/kronos1390/gists{/gist_id}","starred_url":"https://api.github.com/users/kronos1390/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kronos1390/subscriptions","organizations_url":"https://api.github.com/users/kronos1390/orgs","repos_url":"https://api.github.com/users/kronos1390/repos","events_url":"https://api.github.com/users/kronos1390/events{/privacy}","received_events_url":"https://api.github.com/users/kronos1390/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kronos1390/opensourcewebsite-org","description":"OpenSourceWebsite (OSW) is an open source website for the world's largest online social community, and is available for free on Live Website (https://opensourcewebsite.org).","fork":true,"url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org","forks_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/forks","keys_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/teams","hooks_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/hooks","issue_events_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/issues/events{/number}","events_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/events","assignees_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/assignees{/user}","branches_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/branches{/branch}","tags_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/tags","blobs_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/git/refs{/sha}","trees_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/statuses/{sha}","languages_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/languages","stargazers_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/stargazers","contributors_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/contributors","subscribers_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/subscribers","subscription_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/subscription","commits_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/commits{/sha}","git_commits_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/git/commits{/sha}","comments_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/comments{/number}","issue_comment_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/issues/comments{/number}","contents_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/contents/{+path}","compare_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/merges","archive_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/downloads","issues_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/issues{/number}","pulls_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/pulls{/number}","milestones_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/milestones{/number}","notifications_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/labels{/name}","releases_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/releases{/id}","deployments_url":"https://api.github.com/repos/kronos1390/opensourcewebsite-org/deployments","created_at":"2018-08-18T00:44:16Z","updated_at":"2018-09-23T14:35:52Z","pushed_at":"2018-09-26T10:01:17Z","git_url":"git://github.com/kronos1390/opensourcewebsite-org.git","ssh_url":"git@github.com:kronos1390/opensourcewebsite-org.git","clone_url":"https://github.com/kronos1390/opensourcewebsite-org.git","svn_url":"https://github.com/kronos1390/opensourcewebsite-org","homepage":null,"size":354,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"opensourcewebsite-org:master","ref":"master","sha":"3788603914cdbd1756f2c923f3c5282c8c057c01","user":{"login":"opensourcewebsite-org","id":42433667,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNDMzNjY3","avatar_url":"https://avatars1.githubusercontent.com/u/42433667?v=4","gravatar_id":"","url":"https://api.github.com/users/opensourcewebsite-org","html_url":"https://github.com/opensourcewebsite-org","followers_url":"https://api.github.com/users/opensourcewebsite-org/followers","following_url":"https://api.github.com/users/opensourcewebsite-org/following{/other_user}","gists_url":"https://api.github.com/users/opensourcewebsite-org/gists{/gist_id}","starred_url":"https://api.github.com/users/opensourcewebsite-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opensourcewebsite-org/subscriptions","organizations_url":"https://api.github.com/users/opensourcewebsite-org/orgs","repos_url":"https://api.github.com/users/opensourcewebsite-org/repos","events_url":"https://api.github.com/users/opensourcewebsite-org/events{/privacy}","received_events_url":"https://api.github.com/users/opensourcewebsite-org/received_events","type":"Organization","site_admin":false},"repo":{"id":144956786,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ5NTY3ODY=","name":"opensourcewebsite-org","full_name":"opensourcewebsite-org/opensourcewebsite-org","private":false,"owner":{"login":"opensourcewebsite-org","id":42433667,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNDMzNjY3","avatar_url":"https://avatars1.githubusercontent.com/u/42433667?v=4","gravatar_id":"","url":"https://api.github.com/users/opensourcewebsite-org","html_url":"https://github.com/opensourcewebsite-org","followers_url":"https://api.github.com/users/opensourcewebsite-org/followers","following_url":"https://api.github.com/users/opensourcewebsite-org/following{/other_user}","gists_url":"https://api.github.com/users/opensourcewebsite-org/gists{/gist_id}","starred_url":"https://api.github.com/users/opensourcewebsite-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opensourcewebsite-org/subscriptions","organizations_url":"https://api.github.com/users/opensourcewebsite-org/orgs","repos_url":"https://api.github.com/users/opensourcewebsite-org/repos","events_url":"https://api.github.com/users/opensourcewebsite-org/events{/privacy}","received_events_url":"https://api.github.com/users/opensourcewebsite-org/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/opensourcewebsite-org/opensourcewebsite-org","description":"OpenSourceWebsite (OSW) is an open source website for the world's largest online social community, and is available for free on Live Website (https://opensourcewebsite.org).","fork":false,"url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org","forks_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/forks","keys_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/teams","hooks_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/hooks","issue_events_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/issues/events{/number}","events_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/events","assignees_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/assignees{/user}","branches_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/branches{/branch}","tags_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/tags","blobs_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/git/refs{/sha}","trees_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/statuses/{sha}","languages_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/languages","stargazers_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/stargazers","contributors_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/contributors","subscribers_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/subscribers","subscription_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/subscription","commits_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/commits{/sha}","git_commits_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/git/commits{/sha}","comments_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/comments{/number}","issue_comment_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/issues/comments{/number}","contents_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/contents/{+path}","compare_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/merges","archive_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/downloads","issues_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/issues{/number}","pulls_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/pulls{/number}","milestones_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/milestones{/number}","notifications_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/labels{/name}","releases_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/releases{/id}","deployments_url":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/deployments","created_at":"2018-08-16T08:04:10Z","updated_at":"2018-09-25T13:06:08Z","pushed_at":"2018-09-26T10:01:18Z","git_url":"git://github.com/opensourcewebsite-org/opensourcewebsite-org.git","ssh_url":"git@github.com:opensourcewebsite-org/opensourcewebsite-org.git","clone_url":"https://github.com/opensourcewebsite-org/opensourcewebsite-org.git","svn_url":"https://github.com/opensourcewebsite-org/opensourcewebsite-org","homepage":null,"size":345,"stargazers_count":5,"watchers_count":5,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":9,"open_issues":3,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/pulls/47"},"html":{"href":"https://github.com/opensourcewebsite-org/opensourcewebsite-org/pull/47"},"issue":{"href":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/issues/47"},"comments":{"href":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/opensourcewebsite-org/opensourcewebsite-org/statuses/68df9a99027c8dd275410ceb09f82d003aa501c9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"codeclimate"}}