{"action":"created","comment":{"url":"https://api.github.com/repos/TechWilk/rota/pulls/comments/144697926","pull_request_review_id":69396185,"id":144697926,"diff_hunk":"@@ -37,50 +38,51 @@ function getFacebookUserAccessToken($fb)\n         echo var_dump($accessToken);\n     } catch (Facebook\\Exceptions\\FacebookResponseException $e) {\n         // When Graph returns an error\n-    echo 'Graph returned an error: ' . $e->getMessage();\n+        echo 'Graph returned an error: '.$e->getMessage();\n         exit;\n     } catch (Facebook\\Exceptions\\FacebookSDKException $e) {\n         // When validation fails or other local issues\n-    echo 'Facebook SDK returned an error: ' . $e->getMessage();\n+        echo 'Facebook SDK returned an error: '.$e->getMessage();\n         exit;\n     }\n \n-    if (! isset($accessToken)) {\n+    if (!isset($accessToken)) {\n         if ($helper->getError()) {\n             header('HTTP/1.0 401 Unauthorized');\n-            echo \"Error: \" . $helper->getError() . \"\\n\";\n-            echo \"Error Code: \" . $helper->getErrorCode() . \"\\n\";\n-            echo \"Error Reason: \" . $helper->getErrorReason() . \"\\n\";\n-            echo \"Error Description: \" . $helper->getErrorDescription() . \"\\n\";\n+            echo 'Error: '.$helper->getError().\"\\n\";\n+            echo 'Error Code: '.$helper->getErrorCode().\"\\n\";\n+            echo 'Error Reason: '.$helper->getErrorReason().\"\\n\";\n+            echo 'Error Description: '.$helper->getErrorDescription().\"\\n\";\n         } else {\n             header('HTTP/1.0 400 Bad Request');\n             echo 'Bad request';\n         }\n         exit;\n     }\n-  // The OAuth 2.0 client handler helps us manage access tokens\n-  $oAuth2Client = $fb->getOAuth2Client();\n+    // The OAuth 2.0 client handler helps us manage access tokens\n+    $oAuth2Client = $fb->getOAuth2Client();\n \n-  // Get the access token metadata from /debug_token\n-  $tokenMetadata = $oAuth2Client->debugToken($accessToken);\n+    // Get the access token metadata from /debug_token\n+    $tokenMetadata = $oAuth2Client->debugToken($accessToken);\n \n-  // Validation (these will throw FacebookSDKException's when they fail)\n+    // Validation (these will throw FacebookSDKException's when they fail)\n   $tokenMetadata->validateAppId($config['auth']['facebook']['appId']); // Replace {app-id} with your app id\n   // If you know the user ID this access token belongs to, you can validate it here\n   //$tokenMetadata->validateUserId('123');\n   $tokenMetadata->validateExpiration();\n \n-    if (! $accessToken->isLongLived()) {\n+    if (!$accessToken->isLongLived()) {\n         // Exchanges a short-lived access token for a long-lived one\n-    try {\n-        $accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken);\n-    } catch (Facebook\\Exceptions\\FacebookSDKException $e) {\n-        echo \"<p>Error getting long-lived access token: \" . $helper->getMessage() . \"</p>\\n\\n\";\n-        exit;\n-    }\n+        try {\n+            $accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken);\n+        } catch (Facebook\\Exceptions\\FacebookSDKException $e) {\n+            echo '<p>Error getting long-lived access token: '.$helper->getMessage().\"</p>\\n\\n\";","path":"public/old/includes/functions.facebook.php","position":86,"original_position":86,"commit_id":"348e66fe0a9e9471b671d87d7c70ff002638fe41","original_commit_id":"348e66fe0a9e9471b671d87d7c70ff002638fe41","user":{"login":"codacy-bot","id":19940114,"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://www.codacy.com/assets/images/favicon.png) Issue found: [Expected next thing to be an escaping function (see Codex for 'Data Validation'), not '$helper'](https://www.codacy.com/app/TechWilk/rota/pullRequest?prid=991370)","created_at":"2017-10-14T16:40:34Z","updated_at":"2017-10-14T16:40:34Z","html_url":"https://github.com/TechWilk/rota/pull/52#discussion_r144697926","pull_request_url":"https://api.github.com/repos/TechWilk/rota/pulls/52","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/TechWilk/rota/pulls/comments/144697926"},"html":{"href":"https://github.com/TechWilk/rota/pull/52#discussion_r144697926"},"pull_request":{"href":"https://api.github.com/repos/TechWilk/rota/pulls/52"}}},"pull_request":{"url":"https://api.github.com/repos/TechWilk/rota/pulls/52","id":146610317,"html_url":"https://github.com/TechWilk/rota/pull/52","diff_url":"https://github.com/TechWilk/rota/pull/52.diff","patch_url":"https://github.com/TechWilk/rota/pull/52.patch","issue_url":"https://api.github.com/repos/TechWilk/rota/issues/52","number":52,"state":"closed","locked":false,"title":"Apply fixes from StyleCI","user":{"login":"TechWilk","id":9367803,"avatar_url":"https://avatars1.githubusercontent.com/u/9367803?v=4","gravatar_id":"","url":"https://api.github.com/users/TechWilk","html_url":"https://github.com/TechWilk","followers_url":"https://api.github.com/users/TechWilk/followers","following_url":"https://api.github.com/users/TechWilk/following{/other_user}","gists_url":"https://api.github.com/users/TechWilk/gists{/gist_id}","starred_url":"https://api.github.com/users/TechWilk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TechWilk/subscriptions","organizations_url":"https://api.github.com/users/TechWilk/orgs","repos_url":"https://api.github.com/users/TechWilk/repos","events_url":"https://api.github.com/users/TechWilk/events{/privacy}","received_events_url":"https://api.github.com/users/TechWilk/received_events","type":"User","site_admin":false},"body":"This pull request applies code style fixes from an analysis carried out by [StyleCI](https://styleci.io).\n\n---\n\nFor more information, click [here](https://styleci.io/analyses/XNgLZp).","created_at":"2017-10-14T16:35:59Z","updated_at":"2017-10-14T16:40:34Z","closed_at":"2017-10-14T16:36:03Z","merged_at":"2017-10-14T16:36:03Z","merge_commit_sha":"4a7bf70fe39bf27bab6b26cc6aa90006b6192e64","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/TechWilk/rota/pulls/52/commits","review_comments_url":"https://api.github.com/repos/TechWilk/rota/pulls/52/comments","review_comment_url":"https://api.github.com/repos/TechWilk/rota/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TechWilk/rota/issues/52/comments","statuses_url":"https://api.github.com/repos/TechWilk/rota/statuses/348e66fe0a9e9471b671d87d7c70ff002638fe41","head":{"label":"TechWilk:analysis-XNgLZp","ref":"analysis-XNgLZp","sha":"348e66fe0a9e9471b671d87d7c70ff002638fe41","user":{"login":"TechWilk","id":9367803,"avatar_url":"https://avatars1.githubusercontent.com/u/9367803?v=4","gravatar_id":"","url":"https://api.github.com/users/TechWilk","html_url":"https://github.com/TechWilk","followers_url":"https://api.github.com/users/TechWilk/followers","following_url":"https://api.github.com/users/TechWilk/following{/other_user}","gists_url":"https://api.github.com/users/TechWilk/gists{/gist_id}","starred_url":"https://api.github.com/users/TechWilk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TechWilk/subscriptions","organizations_url":"https://api.github.com/users/TechWilk/orgs","repos_url":"https://api.github.com/users/TechWilk/repos","events_url":"https://api.github.com/users/TechWilk/events{/privacy}","received_events_url":"https://api.github.com/users/TechWilk/received_events","type":"User","site_admin":false},"repo":{"id":95683398,"name":"rota","full_name":"TechWilk/rota","owner":{"login":"TechWilk","id":9367803,"avatar_url":"https://avatars1.githubusercontent.com/u/9367803?v=4","gravatar_id":"","url":"https://api.github.com/users/TechWilk","html_url":"https://github.com/TechWilk","followers_url":"https://api.github.com/users/TechWilk/followers","following_url":"https://api.github.com/users/TechWilk/following{/other_user}","gists_url":"https://api.github.com/users/TechWilk/gists{/gist_id}","starred_url":"https://api.github.com/users/TechWilk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TechWilk/subscriptions","organizations_url":"https://api.github.com/users/TechWilk/orgs","repos_url":"https://api.github.com/users/TechWilk/repos","events_url":"https://api.github.com/users/TechWilk/events{/privacy}","received_events_url":"https://api.github.com/users/TechWilk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TechWilk/rota","description":"Web-based rota management with email reminders.","fork":false,"url":"https://api.github.com/repos/TechWilk/rota","forks_url":"https://api.github.com/repos/TechWilk/rota/forks","keys_url":"https://api.github.com/repos/TechWilk/rota/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TechWilk/rota/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TechWilk/rota/teams","hooks_url":"https://api.github.com/repos/TechWilk/rota/hooks","issue_events_url":"https://api.github.com/repos/TechWilk/rota/issues/events{/number}","events_url":"https://api.github.com/repos/TechWilk/rota/events","assignees_url":"https://api.github.com/repos/TechWilk/rota/assignees{/user}","branches_url":"https://api.github.com/repos/TechWilk/rota/branches{/branch}","tags_url":"https://api.github.com/repos/TechWilk/rota/tags","blobs_url":"https://api.github.com/repos/TechWilk/rota/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TechWilk/rota/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TechWilk/rota/git/refs{/sha}","trees_url":"https://api.github.com/repos/TechWilk/rota/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TechWilk/rota/statuses/{sha}","languages_url":"https://api.github.com/repos/TechWilk/rota/languages","stargazers_url":"https://api.github.com/repos/TechWilk/rota/stargazers","contributors_url":"https://api.github.com/repos/TechWilk/rota/contributors","subscribers_url":"https://api.github.com/repos/TechWilk/rota/subscribers","subscription_url":"https://api.github.com/repos/TechWilk/rota/subscription","commits_url":"https://api.github.com/repos/TechWilk/rota/commits{/sha}","git_commits_url":"https://api.github.com/repos/TechWilk/rota/git/commits{/sha}","comments_url":"https://api.github.com/repos/TechWilk/rota/comments{/number}","issue_comment_url":"https://api.github.com/repos/TechWilk/rota/issues/comments{/number}","contents_url":"https://api.github.com/repos/TechWilk/rota/contents/{+path}","compare_url":"https://api.github.com/repos/TechWilk/rota/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TechWilk/rota/merges","archive_url":"https://api.github.com/repos/TechWilk/rota/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TechWilk/rota/downloads","issues_url":"https://api.github.com/repos/TechWilk/rota/issues{/number}","pulls_url":"https://api.github.com/repos/TechWilk/rota/pulls{/number}","milestones_url":"https://api.github.com/repos/TechWilk/rota/milestones{/number}","notifications_url":"https://api.github.com/repos/TechWilk/rota/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TechWilk/rota/labels{/name}","releases_url":"https://api.github.com/repos/TechWilk/rota/releases{/id}","deployments_url":"https://api.github.com/repos/TechWilk/rota/deployments","created_at":"2017-06-28T15:19:01Z","updated_at":"2017-09-25T22:20:43Z","pushed_at":"2017-10-14T16:37:48Z","git_url":"git://github.com/TechWilk/rota.git","ssh_url":"git@github.com:TechWilk/rota.git","clone_url":"https://github.com/TechWilk/rota.git","svn_url":"https://github.com/TechWilk/rota","homepage":null,"size":8245,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":3,"default_branch":"master"}},"base":{"label":"TechWilk:auth","ref":"auth","sha":"3d8824f254648cb81befb511d15c6e82cfcac47c","user":{"login":"TechWilk","id":9367803,"avatar_url":"https://avatars1.githubusercontent.com/u/9367803?v=4","gravatar_id":"","url":"https://api.github.com/users/TechWilk","html_url":"https://github.com/TechWilk","followers_url":"https://api.github.com/users/TechWilk/followers","following_url":"https://api.github.com/users/TechWilk/following{/other_user}","gists_url":"https://api.github.com/users/TechWilk/gists{/gist_id}","starred_url":"https://api.github.com/users/TechWilk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TechWilk/subscriptions","organizations_url":"https://api.github.com/users/TechWilk/orgs","repos_url":"https://api.github.com/users/TechWilk/repos","events_url":"https://api.github.com/users/TechWilk/events{/privacy}","received_events_url":"https://api.github.com/users/TechWilk/received_events","type":"User","site_admin":false},"repo":{"id":95683398,"name":"rota","full_name":"TechWilk/rota","owner":{"login":"TechWilk","id":9367803,"avatar_url":"https://avatars1.githubusercontent.com/u/9367803?v=4","gravatar_id":"","url":"https://api.github.com/users/TechWilk","html_url":"https://github.com/TechWilk","followers_url":"https://api.github.com/users/TechWilk/followers","following_url":"https://api.github.com/users/TechWilk/following{/other_user}","gists_url":"https://api.github.com/users/TechWilk/gists{/gist_id}","starred_url":"https://api.github.com/users/TechWilk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TechWilk/subscriptions","organizations_url":"https://api.github.com/users/TechWilk/orgs","repos_url":"https://api.github.com/users/TechWilk/repos","events_url":"https://api.github.com/users/TechWilk/events{/privacy}","received_events_url":"https://api.github.com/users/TechWilk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TechWilk/rota","description":"Web-based rota management with email reminders.","fork":false,"url":"https://api.github.com/repos/TechWilk/rota","forks_url":"https://api.github.com/repos/TechWilk/rota/forks","keys_url":"https://api.github.com/repos/TechWilk/rota/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TechWilk/rota/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TechWilk/rota/teams","hooks_url":"https://api.github.com/repos/TechWilk/rota/hooks","issue_events_url":"https://api.github.com/repos/TechWilk/rota/issues/events{/number}","events_url":"https://api.github.com/repos/TechWilk/rota/events","assignees_url":"https://api.github.com/repos/TechWilk/rota/assignees{/user}","branches_url":"https://api.github.com/repos/TechWilk/rota/branches{/branch}","tags_url":"https://api.github.com/repos/TechWilk/rota/tags","blobs_url":"https://api.github.com/repos/TechWilk/rota/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TechWilk/rota/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TechWilk/rota/git/refs{/sha}","trees_url":"https://api.github.com/repos/TechWilk/rota/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TechWilk/rota/statuses/{sha}","languages_url":"https://api.github.com/repos/TechWilk/rota/languages","stargazers_url":"https://api.github.com/repos/TechWilk/rota/stargazers","contributors_url":"https://api.github.com/repos/TechWilk/rota/contributors","subscribers_url":"https://api.github.com/repos/TechWilk/rota/subscribers","subscription_url":"https://api.github.com/repos/TechWilk/rota/subscription","commits_url":"https://api.github.com/repos/TechWilk/rota/commits{/sha}","git_commits_url":"https://api.github.com/repos/TechWilk/rota/git/commits{/sha}","comments_url":"https://api.github.com/repos/TechWilk/rota/comments{/number}","issue_comment_url":"https://api.github.com/repos/TechWilk/rota/issues/comments{/number}","contents_url":"https://api.github.com/repos/TechWilk/rota/contents/{+path}","compare_url":"https://api.github.com/repos/TechWilk/rota/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TechWilk/rota/merges","archive_url":"https://api.github.com/repos/TechWilk/rota/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TechWilk/rota/downloads","issues_url":"https://api.github.com/repos/TechWilk/rota/issues{/number}","pulls_url":"https://api.github.com/repos/TechWilk/rota/pulls{/number}","milestones_url":"https://api.github.com/repos/TechWilk/rota/milestones{/number}","notifications_url":"https://api.github.com/repos/TechWilk/rota/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TechWilk/rota/labels{/name}","releases_url":"https://api.github.com/repos/TechWilk/rota/releases{/id}","deployments_url":"https://api.github.com/repos/TechWilk/rota/deployments","created_at":"2017-06-28T15:19:01Z","updated_at":"2017-09-25T22:20:43Z","pushed_at":"2017-10-14T16:37:48Z","git_url":"git://github.com/TechWilk/rota.git","ssh_url":"git@github.com:TechWilk/rota.git","clone_url":"https://github.com/TechWilk/rota.git","svn_url":"https://github.com/TechWilk/rota","homepage":null,"size":8245,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TechWilk/rota/pulls/52"},"html":{"href":"https://github.com/TechWilk/rota/pull/52"},"issue":{"href":"https://api.github.com/repos/TechWilk/rota/issues/52"},"comments":{"href":"https://api.github.com/repos/TechWilk/rota/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/TechWilk/rota/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/TechWilk/rota/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TechWilk/rota/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/TechWilk/rota/statuses/348e66fe0a9e9471b671d87d7c70ff002638fe41"}},"author_association":"OWNER"}}
{"actor":{"display_login":"codacy-bot"}}