{"action":"created","comment":{"url":"https://api.github.com/repos/PHPEducation/Fbook/pulls/comments/228050534","pull_request_review_id":168227796,"id":228050534,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODA1MDUzNA==","diff_hunk":"@@ -84,11 +89,27 @@ public function find($id)\n     public function update($data = [])\n     {\n         try {\n-            $record = $this->model()->findOrFail($data['id']);\n-        \n-            return $record->update($data);\n+            if (array_has($data, 'id')) {\n+                $record = $this->model()->findOrFail($data['id']);\n+\n+                return $record->update($data);\n+            } else {\n+                return null;\n+            }\n+            \n         } catch (Exception $e) {\n             return null;\n         }\n     }\n+","path":"app/Repositories/Eloquents/NotificationEloquentRepository.php","position":40,"original_position":40,"commit_id":"960c7b729c4e9b26c2198048f3a36581978949e7","original_commit_id":"960c7b729c4e9b26c2198048f3a36581978949e7","user":{"login":"framgiaciv3","id":40970418,"node_id":"MDQ6VXNlcjQwOTcwNDE4","avatar_url":"https://avatars3.githubusercontent.com/u/40970418?v=4","gravatar_id":"","url":"https://api.github.com/users/framgiaciv3","html_url":"https://github.com/framgiaciv3","followers_url":"https://api.github.com/users/framgiaciv3/followers","following_url":"https://api.github.com/users/framgiaciv3/following{/other_user}","gists_url":"https://api.github.com/users/framgiaciv3/gists{/gist_id}","starred_url":"https://api.github.com/users/framgiaciv3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgiaciv3/subscriptions","organizations_url":"https://api.github.com/users/framgiaciv3/orgs","repos_url":"https://api.github.com/users/framgiaciv3/repos","events_url":"https://api.github.com/users/framgiaciv3/events{/privacy}","received_events_url":"https://api.github.com/users/framgiaciv3/received_events","type":"User","site_admin":false},"body":"**Reporter**: CHECKSTYLE</br>**Rule**: Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose</br>**Severity**: error</br>**File**: app/Repositories/Eloquents/NotificationEloquentRepository.php</br>Blank line found at end of control structure","created_at":"2018-10-25T06:45:09Z","updated_at":"2018-10-25T06:45:09Z","html_url":"https://github.com/PHPEducation/Fbook/pull/52#discussion_r228050534","pull_request_url":"https://api.github.com/repos/PHPEducation/Fbook/pulls/52","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/PHPEducation/Fbook/pulls/comments/228050534"},"html":{"href":"https://github.com/PHPEducation/Fbook/pull/52#discussion_r228050534"},"pull_request":{"href":"https://api.github.com/repos/PHPEducation/Fbook/pulls/52"}}},"pull_request":{"url":"https://api.github.com/repos/PHPEducation/Fbook/pulls/52","id":225640754,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1NjQwNzU0","html_url":"https://github.com/PHPEducation/Fbook/pull/52","diff_url":"https://github.com/PHPEducation/Fbook/pull/52.diff","patch_url":"https://github.com/PHPEducation/Fbook/pull/52.patch","issue_url":"https://api.github.com/repos/PHPEducation/Fbook/issues/52","number":52,"state":"open","locked":false,"title":"Task: Notification (continue)","user":{"login":"HaiHaChan","id":29307833,"node_id":"MDQ6VXNlcjI5MzA3ODMz","avatar_url":"https://avatars1.githubusercontent.com/u/29307833?v=4","gravatar_id":"","url":"https://api.github.com/users/HaiHaChan","html_url":"https://github.com/HaiHaChan","followers_url":"https://api.github.com/users/HaiHaChan/followers","following_url":"https://api.github.com/users/HaiHaChan/following{/other_user}","gists_url":"https://api.github.com/users/HaiHaChan/gists{/gist_id}","starred_url":"https://api.github.com/users/HaiHaChan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaiHaChan/subscriptions","organizations_url":"https://api.github.com/users/HaiHaChan/orgs","repos_url":"https://api.github.com/users/HaiHaChan/repos","events_url":"https://api.github.com/users/HaiHaChan/events{/privacy}","received_events_url":"https://api.github.com/users/HaiHaChan/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-25T06:44:22Z","updated_at":"2018-10-25T06:45:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb278cd9f92fce2847dcc9aa15330a2bedd7bfa7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/PHPEducation/Fbook/pulls/52/commits","review_comments_url":"https://api.github.com/repos/PHPEducation/Fbook/pulls/52/comments","review_comment_url":"https://api.github.com/repos/PHPEducation/Fbook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PHPEducation/Fbook/issues/52/comments","statuses_url":"https://api.github.com/repos/PHPEducation/Fbook/statuses/960c7b729c4e9b26c2198048f3a36581978949e7","head":{"label":"HaiHaChan:add_notification","ref":"add_notification","sha":"960c7b729c4e9b26c2198048f3a36581978949e7","user":{"login":"HaiHaChan","id":29307833,"node_id":"MDQ6VXNlcjI5MzA3ODMz","avatar_url":"https://avatars1.githubusercontent.com/u/29307833?v=4","gravatar_id":"","url":"https://api.github.com/users/HaiHaChan","html_url":"https://github.com/HaiHaChan","followers_url":"https://api.github.com/users/HaiHaChan/followers","following_url":"https://api.github.com/users/HaiHaChan/following{/other_user}","gists_url":"https://api.github.com/users/HaiHaChan/gists{/gist_id}","starred_url":"https://api.github.com/users/HaiHaChan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaiHaChan/subscriptions","organizations_url":"https://api.github.com/users/HaiHaChan/orgs","repos_url":"https://api.github.com/users/HaiHaChan/repos","events_url":"https://api.github.com/users/HaiHaChan/events{/privacy}","received_events_url":"https://api.github.com/users/HaiHaChan/received_events","type":"User","site_admin":false},"repo":{"id":146677434,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY2Nzc0MzQ=","name":"Fbook","full_name":"HaiHaChan/Fbook","private":false,"owner":{"login":"HaiHaChan","id":29307833,"node_id":"MDQ6VXNlcjI5MzA3ODMz","avatar_url":"https://avatars1.githubusercontent.com/u/29307833?v=4","gravatar_id":"","url":"https://api.github.com/users/HaiHaChan","html_url":"https://github.com/HaiHaChan","followers_url":"https://api.github.com/users/HaiHaChan/followers","following_url":"https://api.github.com/users/HaiHaChan/following{/other_user}","gists_url":"https://api.github.com/users/HaiHaChan/gists{/gist_id}","starred_url":"https://api.github.com/users/HaiHaChan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaiHaChan/subscriptions","organizations_url":"https://api.github.com/users/HaiHaChan/orgs","repos_url":"https://api.github.com/users/HaiHaChan/repos","events_url":"https://api.github.com/users/HaiHaChan/events{/privacy}","received_events_url":"https://api.github.com/users/HaiHaChan/received_events","type":"User","site_admin":false},"html_url":"https://github.com/HaiHaChan/Fbook","description":"Internal project","fork":true,"url":"https://api.github.com/repos/HaiHaChan/Fbook","forks_url":"https://api.github.com/repos/HaiHaChan/Fbook/forks","keys_url":"https://api.github.com/repos/HaiHaChan/Fbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HaiHaChan/Fbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HaiHaChan/Fbook/teams","hooks_url":"https://api.github.com/repos/HaiHaChan/Fbook/hooks","issue_events_url":"https://api.github.com/repos/HaiHaChan/Fbook/issues/events{/number}","events_url":"https://api.github.com/repos/HaiHaChan/Fbook/events","assignees_url":"https://api.github.com/repos/HaiHaChan/Fbook/assignees{/user}","branches_url":"https://api.github.com/repos/HaiHaChan/Fbook/branches{/branch}","tags_url":"https://api.github.com/repos/HaiHaChan/Fbook/tags","blobs_url":"https://api.github.com/repos/HaiHaChan/Fbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HaiHaChan/Fbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HaiHaChan/Fbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/HaiHaChan/Fbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HaiHaChan/Fbook/statuses/{sha}","languages_url":"https://api.github.com/repos/HaiHaChan/Fbook/languages","stargazers_url":"https://api.github.com/repos/HaiHaChan/Fbook/stargazers","contributors_url":"https://api.github.com/repos/HaiHaChan/Fbook/contributors","subscribers_url":"https://api.github.com/repos/HaiHaChan/Fbook/subscribers","subscription_url":"https://api.github.com/repos/HaiHaChan/Fbook/subscription","commits_url":"https://api.github.com/repos/HaiHaChan/Fbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/HaiHaChan/Fbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/HaiHaChan/Fbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/HaiHaChan/Fbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/HaiHaChan/Fbook/contents/{+path}","compare_url":"https://api.github.com/repos/HaiHaChan/Fbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HaiHaChan/Fbook/merges","archive_url":"https://api.github.com/repos/HaiHaChan/Fbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HaiHaChan/Fbook/downloads","issues_url":"https://api.github.com/repos/HaiHaChan/Fbook/issues{/number}","pulls_url":"https://api.github.com/repos/HaiHaChan/Fbook/pulls{/number}","milestones_url":"https://api.github.com/repos/HaiHaChan/Fbook/milestones{/number}","notifications_url":"https://api.github.com/repos/HaiHaChan/Fbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HaiHaChan/Fbook/labels{/name}","releases_url":"https://api.github.com/repos/HaiHaChan/Fbook/releases{/id}","deployments_url":"https://api.github.com/repos/HaiHaChan/Fbook/deployments","created_at":"2018-08-30T01:09:16Z","updated_at":"2018-08-30T01:09:18Z","pushed_at":"2018-10-25T06:43:38Z","git_url":"git://github.com/HaiHaChan/Fbook.git","ssh_url":"git@github.com:HaiHaChan/Fbook.git","clone_url":"https://github.com/HaiHaChan/Fbook.git","svn_url":"https://github.com/HaiHaChan/Fbook","homepage":null,"size":1620,"stargazers_count":0,"watchers_count":0,"language":null,"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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"PHPEducation:develop","ref":"develop","sha":"b7373271d8513c9dc32a0323a49b1809b3a2aeb9","user":{"login":"PHPEducation","id":41612083,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxNjEyMDgz","avatar_url":"https://avatars3.githubusercontent.com/u/41612083?v=4","gravatar_id":"","url":"https://api.github.com/users/PHPEducation","html_url":"https://github.com/PHPEducation","followers_url":"https://api.github.com/users/PHPEducation/followers","following_url":"https://api.github.com/users/PHPEducation/following{/other_user}","gists_url":"https://api.github.com/users/PHPEducation/gists{/gist_id}","starred_url":"https://api.github.com/users/PHPEducation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PHPEducation/subscriptions","organizations_url":"https://api.github.com/users/PHPEducation/orgs","repos_url":"https://api.github.com/users/PHPEducation/repos","events_url":"https://api.github.com/users/PHPEducation/events{/privacy}","received_events_url":"https://api.github.com/users/PHPEducation/received_events","type":"Organization","site_admin":false},"repo":{"id":146677077,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY2NzcwNzc=","name":"Fbook","full_name":"PHPEducation/Fbook","private":false,"owner":{"login":"PHPEducation","id":41612083,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxNjEyMDgz","avatar_url":"https://avatars3.githubusercontent.com/u/41612083?v=4","gravatar_id":"","url":"https://api.github.com/users/PHPEducation","html_url":"https://github.com/PHPEducation","followers_url":"https://api.github.com/users/PHPEducation/followers","following_url":"https://api.github.com/users/PHPEducation/following{/other_user}","gists_url":"https://api.github.com/users/PHPEducation/gists{/gist_id}","starred_url":"https://api.github.com/users/PHPEducation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PHPEducation/subscriptions","organizations_url":"https://api.github.com/users/PHPEducation/orgs","repos_url":"https://api.github.com/users/PHPEducation/repos","events_url":"https://api.github.com/users/PHPEducation/events{/privacy}","received_events_url":"https://api.github.com/users/PHPEducation/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/PHPEducation/Fbook","description":"Internal project","fork":false,"url":"https://api.github.com/repos/PHPEducation/Fbook","forks_url":"https://api.github.com/repos/PHPEducation/Fbook/forks","keys_url":"https://api.github.com/repos/PHPEducation/Fbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PHPEducation/Fbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PHPEducation/Fbook/teams","hooks_url":"https://api.github.com/repos/PHPEducation/Fbook/hooks","issue_events_url":"https://api.github.com/repos/PHPEducation/Fbook/issues/events{/number}","events_url":"https://api.github.com/repos/PHPEducation/Fbook/events","assignees_url":"https://api.github.com/repos/PHPEducation/Fbook/assignees{/user}","branches_url":"https://api.github.com/repos/PHPEducation/Fbook/branches{/branch}","tags_url":"https://api.github.com/repos/PHPEducation/Fbook/tags","blobs_url":"https://api.github.com/repos/PHPEducation/Fbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PHPEducation/Fbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PHPEducation/Fbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/PHPEducation/Fbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PHPEducation/Fbook/statuses/{sha}","languages_url":"https://api.github.com/repos/PHPEducation/Fbook/languages","stargazers_url":"https://api.github.com/repos/PHPEducation/Fbook/stargazers","contributors_url":"https://api.github.com/repos/PHPEducation/Fbook/contributors","subscribers_url":"https://api.github.com/repos/PHPEducation/Fbook/subscribers","subscription_url":"https://api.github.com/repos/PHPEducation/Fbook/subscription","commits_url":"https://api.github.com/repos/PHPEducation/Fbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/PHPEducation/Fbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/PHPEducation/Fbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/PHPEducation/Fbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/PHPEducation/Fbook/contents/{+path}","compare_url":"https://api.github.com/repos/PHPEducation/Fbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PHPEducation/Fbook/merges","archive_url":"https://api.github.com/repos/PHPEducation/Fbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PHPEducation/Fbook/downloads","issues_url":"https://api.github.com/repos/PHPEducation/Fbook/issues{/number}","pulls_url":"https://api.github.com/repos/PHPEducation/Fbook/pulls{/number}","milestones_url":"https://api.github.com/repos/PHPEducation/Fbook/milestones{/number}","notifications_url":"https://api.github.com/repos/PHPEducation/Fbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PHPEducation/Fbook/labels{/name}","releases_url":"https://api.github.com/repos/PHPEducation/Fbook/releases{/id}","deployments_url":"https://api.github.com/repos/PHPEducation/Fbook/deployments","created_at":"2018-08-30T01:05:27Z","updated_at":"2018-09-06T10:02:26Z","pushed_at":"2018-10-25T06:44:23Z","git_url":"git://github.com/PHPEducation/Fbook.git","ssh_url":"git@github.com:PHPEducation/Fbook.git","clone_url":"https://github.com/PHPEducation/Fbook.git","svn_url":"https://github.com/PHPEducation/Fbook","homepage":null,"size":1638,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":6,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PHPEducation/Fbook/pulls/52"},"html":{"href":"https://github.com/PHPEducation/Fbook/pull/52"},"issue":{"href":"https://api.github.com/repos/PHPEducation/Fbook/issues/52"},"comments":{"href":"https://api.github.com/repos/PHPEducation/Fbook/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/PHPEducation/Fbook/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/PHPEducation/Fbook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PHPEducation/Fbook/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/PHPEducation/Fbook/statuses/960c7b729c4e9b26c2198048f3a36581978949e7"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"framgiaciv3"}}