{"action":"created","comment":{"url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/pulls/comments/169115612","pull_request_review_id":97590307,"id":169115612,"diff_hunk":"@@ -0,0 +1,61 @@\n+<?php \r\n+include(\"isJson.php\");\r\n+include(\"greatCircleDistance.php\");\r\n+\r\n+$intercomLatitude = \"53.339428\"; \r\n+$intercomLongitude = \"-6.257664\";\r\n+$errorMessage = \"\";\r\n+$listToInvite = array();\r\n+\r\n+$contents = @file_get_contents(\"customers.json\");\r\n+\r\n+if($contents === FALSE){\r\n+\t$errorMessage = \"Sorry, no such file exists\";\r\n+}else{\r\n+\tif(isJson($contents)){\r\n+\t\t$recordsArray  = json_decode(trim($contents), true);\r\n+\t\tforeach($recordsArray as $record){\r\n+\t\t\tif(greatCircleDistance($intercomLatitude, $intercomLongitude, $record[\"latitude\"], $record[\"longitude\"]) < 100000){//100 kms in metres\r\n+\t\t\t\t\t$listToInvite[$record[\"user_id\"]] = $record[\"name\"];\r\n+\t\t\t}\t\t\t\r\n+\t\t}\r\n+\r\n+\t\tif(count($listToInvite) > 0){\r\n+\t\t\tksort($listToInvite);// sort by key \t\t\r\n+\t\t\tinclude(\"viewListCustomers.phtml\");\t\r\n+\t\t}\r\n+\t\telse\r\n+\t\t{\r\n+\t\t\t$errorMessage = \"No customers found\";\r\n+\t\t}\r\n+\r\n+\t}\r\n+\telse\r\n+\t{\r\n+\t\tswitch (json_last_error()) {\r\n+\t        case JSON_ERROR_DEPTH:\r","path":"listCustomers.php","position":36,"original_position":36,"commit_id":"4f59bea05d12d8f1b2caaae03f429530379c723a","original_commit_id":"4f59bea05d12d8f1b2caaae03f429530379c723a","user":{"login":"pfarrel","id":470152,"avatar_url":"https://avatars3.githubusercontent.com/u/470152?v=4","gravatar_id":"","url":"https://api.github.com/users/pfarrel","html_url":"https://github.com/pfarrel","followers_url":"https://api.github.com/users/pfarrel/followers","following_url":"https://api.github.com/users/pfarrel/following{/other_user}","gists_url":"https://api.github.com/users/pfarrel/gists{/gist_id}","starred_url":"https://api.github.com/users/pfarrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfarrel/subscriptions","organizations_url":"https://api.github.com/users/pfarrel/orgs","repos_url":"https://api.github.com/users/pfarrel/repos","events_url":"https://api.github.com/users/pfarrel/events{/privacy}","received_events_url":"https://api.github.com/users/pfarrel/received_events","type":"User","site_admin":false},"body":"indentation is messed up here, the case statements should be in one step","created_at":"2018-02-19T15:59:43Z","updated_at":"2018-02-19T15:59:43Z","html_url":"https://github.com/pfarrel/code-review-for-aoife/pull/1#discussion_r169115612","pull_request_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/pulls/1","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/pfarrel/code-review-for-aoife/pulls/comments/169115612"},"html":{"href":"https://github.com/pfarrel/code-review-for-aoife/pull/1#discussion_r169115612"},"pull_request":{"href":"https://api.github.com/repos/pfarrel/code-review-for-aoife/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/pulls/1","id":169996814,"html_url":"https://github.com/pfarrel/code-review-for-aoife/pull/1","diff_url":"https://github.com/pfarrel/code-review-for-aoife/pull/1.diff","patch_url":"https://github.com/pfarrel/code-review-for-aoife/pull/1.patch","issue_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/issues/1","number":1,"state":"open","locked":false,"title":"Assignment","user":{"login":"pfarrel","id":470152,"avatar_url":"https://avatars3.githubusercontent.com/u/470152?v=4","gravatar_id":"","url":"https://api.github.com/users/pfarrel","html_url":"https://github.com/pfarrel","followers_url":"https://api.github.com/users/pfarrel/followers","following_url":"https://api.github.com/users/pfarrel/following{/other_user}","gists_url":"https://api.github.com/users/pfarrel/gists{/gist_id}","starred_url":"https://api.github.com/users/pfarrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfarrel/subscriptions","organizations_url":"https://api.github.com/users/pfarrel/orgs","repos_url":"https://api.github.com/users/pfarrel/repos","events_url":"https://api.github.com/users/pfarrel/events{/privacy}","received_events_url":"https://api.github.com/users/pfarrel/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-19T15:56:09Z","updated_at":"2018-02-19T15:59:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29d52f0a2244d50497c685412436a7622973e7d5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/pulls/1/commits","review_comments_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/pulls/1/comments","review_comment_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/issues/1/comments","statuses_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/statuses/4f59bea05d12d8f1b2caaae03f429530379c723a","head":{"label":"pfarrel:assignment","ref":"assignment","sha":"4f59bea05d12d8f1b2caaae03f429530379c723a","user":{"login":"pfarrel","id":470152,"avatar_url":"https://avatars3.githubusercontent.com/u/470152?v=4","gravatar_id":"","url":"https://api.github.com/users/pfarrel","html_url":"https://github.com/pfarrel","followers_url":"https://api.github.com/users/pfarrel/followers","following_url":"https://api.github.com/users/pfarrel/following{/other_user}","gists_url":"https://api.github.com/users/pfarrel/gists{/gist_id}","starred_url":"https://api.github.com/users/pfarrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfarrel/subscriptions","organizations_url":"https://api.github.com/users/pfarrel/orgs","repos_url":"https://api.github.com/users/pfarrel/repos","events_url":"https://api.github.com/users/pfarrel/events{/privacy}","received_events_url":"https://api.github.com/users/pfarrel/received_events","type":"User","site_admin":false},"repo":{"id":122084870,"name":"code-review-for-aoife","full_name":"pfarrel/code-review-for-aoife","owner":{"login":"pfarrel","id":470152,"avatar_url":"https://avatars3.githubusercontent.com/u/470152?v=4","gravatar_id":"","url":"https://api.github.com/users/pfarrel","html_url":"https://github.com/pfarrel","followers_url":"https://api.github.com/users/pfarrel/followers","following_url":"https://api.github.com/users/pfarrel/following{/other_user}","gists_url":"https://api.github.com/users/pfarrel/gists{/gist_id}","starred_url":"https://api.github.com/users/pfarrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfarrel/subscriptions","organizations_url":"https://api.github.com/users/pfarrel/orgs","repos_url":"https://api.github.com/users/pfarrel/repos","events_url":"https://api.github.com/users/pfarrel/events{/privacy}","received_events_url":"https://api.github.com/users/pfarrel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pfarrel/code-review-for-aoife","description":null,"fork":false,"url":"https://api.github.com/repos/pfarrel/code-review-for-aoife","forks_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/forks","keys_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/teams","hooks_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/hooks","issue_events_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/issues/events{/number}","events_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/events","assignees_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/assignees{/user}","branches_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/branches{/branch}","tags_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/tags","blobs_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/git/refs{/sha}","trees_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/statuses/{sha}","languages_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/languages","stargazers_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/stargazers","contributors_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/contributors","subscribers_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/subscribers","subscription_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/subscription","commits_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/commits{/sha}","git_commits_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/git/commits{/sha}","comments_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/comments{/number}","issue_comment_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/issues/comments{/number}","contents_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/contents/{+path}","compare_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/merges","archive_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/downloads","issues_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/issues{/number}","pulls_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/pulls{/number}","milestones_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/milestones{/number}","notifications_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/labels{/name}","releases_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/releases{/id}","deployments_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/deployments","created_at":"2018-02-19T15:52:28Z","updated_at":"2018-02-19T15:54:29Z","pushed_at":"2018-02-19T15:56:09Z","git_url":"git://github.com/pfarrel/code-review-for-aoife.git","ssh_url":"git@github.com:pfarrel/code-review-for-aoife.git","clone_url":"https://github.com/pfarrel/code-review-for-aoife.git","svn_url":"https://github.com/pfarrel/code-review-for-aoife","homepage":null,"size":0,"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":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"pfarrel:master","ref":"master","sha":"c0454df4e9c15f8145ad5883a3baf37d688bc0ea","user":{"login":"pfarrel","id":470152,"avatar_url":"https://avatars3.githubusercontent.com/u/470152?v=4","gravatar_id":"","url":"https://api.github.com/users/pfarrel","html_url":"https://github.com/pfarrel","followers_url":"https://api.github.com/users/pfarrel/followers","following_url":"https://api.github.com/users/pfarrel/following{/other_user}","gists_url":"https://api.github.com/users/pfarrel/gists{/gist_id}","starred_url":"https://api.github.com/users/pfarrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfarrel/subscriptions","organizations_url":"https://api.github.com/users/pfarrel/orgs","repos_url":"https://api.github.com/users/pfarrel/repos","events_url":"https://api.github.com/users/pfarrel/events{/privacy}","received_events_url":"https://api.github.com/users/pfarrel/received_events","type":"User","site_admin":false},"repo":{"id":122084870,"name":"code-review-for-aoife","full_name":"pfarrel/code-review-for-aoife","owner":{"login":"pfarrel","id":470152,"avatar_url":"https://avatars3.githubusercontent.com/u/470152?v=4","gravatar_id":"","url":"https://api.github.com/users/pfarrel","html_url":"https://github.com/pfarrel","followers_url":"https://api.github.com/users/pfarrel/followers","following_url":"https://api.github.com/users/pfarrel/following{/other_user}","gists_url":"https://api.github.com/users/pfarrel/gists{/gist_id}","starred_url":"https://api.github.com/users/pfarrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfarrel/subscriptions","organizations_url":"https://api.github.com/users/pfarrel/orgs","repos_url":"https://api.github.com/users/pfarrel/repos","events_url":"https://api.github.com/users/pfarrel/events{/privacy}","received_events_url":"https://api.github.com/users/pfarrel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pfarrel/code-review-for-aoife","description":null,"fork":false,"url":"https://api.github.com/repos/pfarrel/code-review-for-aoife","forks_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/forks","keys_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/teams","hooks_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/hooks","issue_events_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/issues/events{/number}","events_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/events","assignees_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/assignees{/user}","branches_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/branches{/branch}","tags_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/tags","blobs_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/git/refs{/sha}","trees_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/statuses/{sha}","languages_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/languages","stargazers_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/stargazers","contributors_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/contributors","subscribers_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/subscribers","subscription_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/subscription","commits_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/commits{/sha}","git_commits_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/git/commits{/sha}","comments_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/comments{/number}","issue_comment_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/issues/comments{/number}","contents_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/contents/{+path}","compare_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/merges","archive_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/downloads","issues_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/issues{/number}","pulls_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/pulls{/number}","milestones_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/milestones{/number}","notifications_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/labels{/name}","releases_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/releases{/id}","deployments_url":"https://api.github.com/repos/pfarrel/code-review-for-aoife/deployments","created_at":"2018-02-19T15:52:28Z","updated_at":"2018-02-19T15:54:29Z","pushed_at":"2018-02-19T15:56:09Z","git_url":"git://github.com/pfarrel/code-review-for-aoife.git","ssh_url":"git@github.com:pfarrel/code-review-for-aoife.git","clone_url":"https://github.com/pfarrel/code-review-for-aoife.git","svn_url":"https://github.com/pfarrel/code-review-for-aoife","homepage":null,"size":0,"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":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pfarrel/code-review-for-aoife/pulls/1"},"html":{"href":"https://github.com/pfarrel/code-review-for-aoife/pull/1"},"issue":{"href":"https://api.github.com/repos/pfarrel/code-review-for-aoife/issues/1"},"comments":{"href":"https://api.github.com/repos/pfarrel/code-review-for-aoife/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/pfarrel/code-review-for-aoife/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/pfarrel/code-review-for-aoife/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pfarrel/code-review-for-aoife/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/pfarrel/code-review-for-aoife/statuses/4f59bea05d12d8f1b2caaae03f429530379c723a"}},"author_association":"OWNER"}}
{"actor":{"display_login":"pfarrel"}}