{"action":"created","comment":{"url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/pulls/comments/24045020","id":24045020,"diff_hunk":"@@ -53,16 +53,22 @@ function get($id) {\n    * @param int $id The station ID to calculate related onramp ID for\n    * @return stdClass $retVal An object containing the ID searched for, the calculated result, and an array of relation onramps.\n    * @throws \\Luracast\\Restler\\RestException\n-   * @url GET {id}/relatedonramps\n+   * @url GET {id}/relatedonramp\n    */\n-  public function getRelatedOnramps($id) {\n-    $retVal = new stdClass;\n+  public function getRelatedOnramp($id) {\n+\t\n+\ttry {\n+\t\t$tempStation = Stations::get($id);\n+\t} catch (Exception $e) {\n+\t\tthrow $e;\n+\t}\n+\t$retVal = new stdClass;\n     $retVal->stationid = $id;\n     $retVal->relatedOnrampId = Routelandia\\Entities\\Station::calculateRelatedOnrampID($id);\n-    $retVal->relatedOnramps = array ();\n-    $onRamp = OrderedStation::fetchRelatedOnramps($retVal->relatedOnrampId);\n-    if ($onRamp){\n-      $retVal->relatedOnramps[] = $onRamp;\n+    try {\n+    \t$retVal->relatedOnrampInfo = OrderedStation::fetchRelatedOnramps($retVal->relatedOnrampId);","path":"public/Stations.php","position":24,"original_position":24,"commit_id":"728d9bc76c6eb9a7abd986a59327ed3b84ad6918","original_commit_id":"728d9bc76c6eb9a7abd986a59327ed3b84ad6918","user":{"login":"joshproehl","id":66339,"avatar_url":"https://avatars.githubusercontent.com/u/66339?v=3","gravatar_id":"","url":"https://api.github.com/users/joshproehl","html_url":"https://github.com/joshproehl","followers_url":"https://api.github.com/users/joshproehl/followers","following_url":"https://api.github.com/users/joshproehl/following{/other_user}","gists_url":"https://api.github.com/users/joshproehl/gists{/gist_id}","starred_url":"https://api.github.com/users/joshproehl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshproehl/subscriptions","organizations_url":"https://api.github.com/users/joshproehl/orgs","repos_url":"https://api.github.com/users/joshproehl/repos","events_url":"https://api.github.com/users/joshproehl/events{/privacy}","received_events_url":"https://api.github.com/users/joshproehl/received_events","type":"User","site_admin":false},"body":"Since we've decided that there can only be one related onramp, ever, then the OrderedStation::fetchRelatedOnramps method should probably *also* be changed so that when you read it's name in code you know that it's going to return a single object and not an array. :-)","created_at":"2015-02-03T22:13:28Z","updated_at":"2015-02-03T22:13:28Z","html_url":"https://github.com/PSU-Capstone-2014-B/routelandia-server/pull/48#discussion_r24045020","pull_request_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/pulls/48","_links":{"self":{"href":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/pulls/comments/24045020"},"html":{"href":"https://github.com/PSU-Capstone-2014-B/routelandia-server/pull/48#discussion_r24045020"},"pull_request":{"href":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/pulls/48","id":28530287,"html_url":"https://github.com/PSU-Capstone-2014-B/routelandia-server/pull/48","diff_url":"https://github.com/PSU-Capstone-2014-B/routelandia-server/pull/48.diff","patch_url":"https://github.com/PSU-Capstone-2014-B/routelandia-server/pull/48.patch","issue_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/issues/48","number":48,"state":"open","locked":false,"title":"Task unpluralize related on ramp","user":{"login":"severity","id":905243,"avatar_url":"https://avatars.githubusercontent.com/u/905243?v=3","gravatar_id":"","url":"https://api.github.com/users/severity","html_url":"https://github.com/severity","followers_url":"https://api.github.com/users/severity/followers","following_url":"https://api.github.com/users/severity/following{/other_user}","gists_url":"https://api.github.com/users/severity/gists{/gist_id}","starred_url":"https://api.github.com/users/severity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/severity/subscriptions","organizations_url":"https://api.github.com/users/severity/orgs","repos_url":"https://api.github.com/users/severity/repos","events_url":"https://api.github.com/users/severity/events{/privacy}","received_events_url":"https://api.github.com/users/severity/received_events","type":"User","site_admin":false},"body":"Should be good to go, lets see how it is :)","created_at":"2015-02-03T06:43:32Z","updated_at":"2015-02-03T22:13:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f6804609deb1728eaadbafa810e054084065bf5a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/pulls/48/commits","review_comments_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/pulls/48/comments","review_comment_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/pulls/comments/{number}","comments_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/issues/48/comments","statuses_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/statuses/728d9bc76c6eb9a7abd986a59327ed3b84ad6918","head":{"label":"PSU-Capstone-2014-B:task-unpluralize_relatedOnRamp","ref":"task-unpluralize_relatedOnRamp","sha":"728d9bc76c6eb9a7abd986a59327ed3b84ad6918","user":{"login":"PSU-Capstone-2014-B","id":9858234,"avatar_url":"https://avatars.githubusercontent.com/u/9858234?v=3","gravatar_id":"","url":"https://api.github.com/users/PSU-Capstone-2014-B","html_url":"https://github.com/PSU-Capstone-2014-B","followers_url":"https://api.github.com/users/PSU-Capstone-2014-B/followers","following_url":"https://api.github.com/users/PSU-Capstone-2014-B/following{/other_user}","gists_url":"https://api.github.com/users/PSU-Capstone-2014-B/gists{/gist_id}","starred_url":"https://api.github.com/users/PSU-Capstone-2014-B/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PSU-Capstone-2014-B/subscriptions","organizations_url":"https://api.github.com/users/PSU-Capstone-2014-B/orgs","repos_url":"https://api.github.com/users/PSU-Capstone-2014-B/repos","events_url":"https://api.github.com/users/PSU-Capstone-2014-B/events{/privacy}","received_events_url":"https://api.github.com/users/PSU-Capstone-2014-B/received_events","type":"Organization","site_admin":false},"repo":{"id":26938656,"name":"routelandia-server","full_name":"PSU-Capstone-2014-B/routelandia-server","owner":{"login":"PSU-Capstone-2014-B","id":9858234,"avatar_url":"https://avatars.githubusercontent.com/u/9858234?v=3","gravatar_id":"","url":"https://api.github.com/users/PSU-Capstone-2014-B","html_url":"https://github.com/PSU-Capstone-2014-B","followers_url":"https://api.github.com/users/PSU-Capstone-2014-B/followers","following_url":"https://api.github.com/users/PSU-Capstone-2014-B/following{/other_user}","gists_url":"https://api.github.com/users/PSU-Capstone-2014-B/gists{/gist_id}","starred_url":"https://api.github.com/users/PSU-Capstone-2014-B/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PSU-Capstone-2014-B/subscriptions","organizations_url":"https://api.github.com/users/PSU-Capstone-2014-B/orgs","repos_url":"https://api.github.com/users/PSU-Capstone-2014-B/repos","events_url":"https://api.github.com/users/PSU-Capstone-2014-B/events{/privacy}","received_events_url":"https://api.github.com/users/PSU-Capstone-2014-B/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PSU-Capstone-2014-B/routelandia-server","description":"The server backend to power the Routelandia project.","fork":false,"url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server","forks_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/forks","keys_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/teams","hooks_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/hooks","issue_events_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/issues/events{/number}","events_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/events","assignees_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/assignees{/user}","branches_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/branches{/branch}","tags_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/tags","blobs_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/statuses/{sha}","languages_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/languages","stargazers_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/stargazers","contributors_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/contributors","subscribers_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/subscribers","subscription_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/subscription","commits_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/issues/comments/{number}","contents_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/contents/{+path}","compare_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/merges","archive_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/downloads","issues_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/issues{/number}","pulls_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/pulls{/number}","milestones_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/milestones{/number}","notifications_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/labels{/name}","releases_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/releases{/id}","created_at":"2014-11-21T00:36:41Z","updated_at":"2015-01-30T04:46:36Z","pushed_at":"2015-02-03T06:41:20Z","git_url":"git://github.com/PSU-Capstone-2014-B/routelandia-server.git","ssh_url":"git@github.com:PSU-Capstone-2014-B/routelandia-server.git","clone_url":"https://github.com/PSU-Capstone-2014-B/routelandia-server.git","svn_url":"https://github.com/PSU-Capstone-2014-B/routelandia-server","homepage":null,"size":2112,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":16,"forks":0,"open_issues":16,"watchers":0,"default_branch":"master"}},"base":{"label":"PSU-Capstone-2014-B:master","ref":"master","sha":"826888f1560dd81efa70391e80a6a84faf0fc854","user":{"login":"PSU-Capstone-2014-B","id":9858234,"avatar_url":"https://avatars.githubusercontent.com/u/9858234?v=3","gravatar_id":"","url":"https://api.github.com/users/PSU-Capstone-2014-B","html_url":"https://github.com/PSU-Capstone-2014-B","followers_url":"https://api.github.com/users/PSU-Capstone-2014-B/followers","following_url":"https://api.github.com/users/PSU-Capstone-2014-B/following{/other_user}","gists_url":"https://api.github.com/users/PSU-Capstone-2014-B/gists{/gist_id}","starred_url":"https://api.github.com/users/PSU-Capstone-2014-B/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PSU-Capstone-2014-B/subscriptions","organizations_url":"https://api.github.com/users/PSU-Capstone-2014-B/orgs","repos_url":"https://api.github.com/users/PSU-Capstone-2014-B/repos","events_url":"https://api.github.com/users/PSU-Capstone-2014-B/events{/privacy}","received_events_url":"https://api.github.com/users/PSU-Capstone-2014-B/received_events","type":"Organization","site_admin":false},"repo":{"id":26938656,"name":"routelandia-server","full_name":"PSU-Capstone-2014-B/routelandia-server","owner":{"login":"PSU-Capstone-2014-B","id":9858234,"avatar_url":"https://avatars.githubusercontent.com/u/9858234?v=3","gravatar_id":"","url":"https://api.github.com/users/PSU-Capstone-2014-B","html_url":"https://github.com/PSU-Capstone-2014-B","followers_url":"https://api.github.com/users/PSU-Capstone-2014-B/followers","following_url":"https://api.github.com/users/PSU-Capstone-2014-B/following{/other_user}","gists_url":"https://api.github.com/users/PSU-Capstone-2014-B/gists{/gist_id}","starred_url":"https://api.github.com/users/PSU-Capstone-2014-B/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PSU-Capstone-2014-B/subscriptions","organizations_url":"https://api.github.com/users/PSU-Capstone-2014-B/orgs","repos_url":"https://api.github.com/users/PSU-Capstone-2014-B/repos","events_url":"https://api.github.com/users/PSU-Capstone-2014-B/events{/privacy}","received_events_url":"https://api.github.com/users/PSU-Capstone-2014-B/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PSU-Capstone-2014-B/routelandia-server","description":"The server backend to power the Routelandia project.","fork":false,"url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server","forks_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/forks","keys_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/teams","hooks_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/hooks","issue_events_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/issues/events{/number}","events_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/events","assignees_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/assignees{/user}","branches_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/branches{/branch}","tags_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/tags","blobs_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/statuses/{sha}","languages_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/languages","stargazers_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/stargazers","contributors_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/contributors","subscribers_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/subscribers","subscription_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/subscription","commits_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/issues/comments/{number}","contents_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/contents/{+path}","compare_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/merges","archive_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/downloads","issues_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/issues{/number}","pulls_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/pulls{/number}","milestones_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/milestones{/number}","notifications_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/labels{/name}","releases_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/releases{/id}","created_at":"2014-11-21T00:36:41Z","updated_at":"2015-01-30T04:46:36Z","pushed_at":"2015-02-03T06:41:20Z","git_url":"git://github.com/PSU-Capstone-2014-B/routelandia-server.git","ssh_url":"git@github.com:PSU-Capstone-2014-B/routelandia-server.git","clone_url":"https://github.com/PSU-Capstone-2014-B/routelandia-server.git","svn_url":"https://github.com/PSU-Capstone-2014-B/routelandia-server","homepage":null,"size":2112,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":16,"forks":0,"open_issues":16,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/pulls/48"},"html":{"href":"https://github.com/PSU-Capstone-2014-B/routelandia-server/pull/48"},"issue":{"href":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/issues/48"},"comments":{"href":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/statuses/728d9bc76c6eb9a7abd986a59327ed3b84ad6918"}}}}