{"action":"created","comment":{"url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/pulls/comments/37813745","id":37813745,"diff_hunk":"@@ -0,0 +1,86 @@\n+<?php\n+\n+namespace TaskBundle\\Controller;\n+\n+use Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\n+use Symfony\\Component\\HttpFoundation\\Request;\n+use TaskBundle\\Parser\\ParserContext;\n+use TaskBundle\\Parser\\CsvParser;\n+use TaskBundle\\Parser\\JsonParser;\n+/**\n+ * Excute the challenge requirements via MVC, OOP, DRY, KISS, SOLID Principles and clean code.\n+ */\n+class CountryController extends Controller\n+{   \n+    // To shown nice formatted on the screen \n+    // I prefer using Doctrine & Pagination better than export an array outpout like the next CSV or JSON functions\n+    public function showAsHtmlAction(Request $request)\n+    {   \n+        $page = $request->query->get('page');\n+        if (!$page || $page < 1) {\n+            $page = 1; // intial value\n+        }\n+        $offset = 5* ($page - 1);","path":"src/TaskBundle/Controller/CountryController.php","position":23,"original_position":23,"commit_id":"498213fb1350921ad171de91e20c84ce6ad9026f","original_commit_id":"498213fb1350921ad171de91e20c84ce6ad9026f","user":{"login":"islammohamed","id":1699068,"avatar_url":"https://avatars.githubusercontent.com/u/1699068?v=3","gravatar_id":"","url":"https://api.github.com/users/islammohamed","html_url":"https://github.com/islammohamed","followers_url":"https://api.github.com/users/islammohamed/followers","following_url":"https://api.github.com/users/islammohamed/following{/other_user}","gists_url":"https://api.github.com/users/islammohamed/gists{/gist_id}","starred_url":"https://api.github.com/users/islammohamed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/islammohamed/subscriptions","organizations_url":"https://api.github.com/users/islammohamed/orgs","repos_url":"https://api.github.com/users/islammohamed/repos","events_url":"https://api.github.com/users/islammohamed/events{/privacy}","received_events_url":"https://api.github.com/users/islammohamed/received_events","type":"User","site_admin":false},"body":"pagination logic must  in a separate place not in the action","created_at":"2015-08-24T22:39:08Z","updated_at":"2015-08-24T22:39:08Z","html_url":"https://github.com/HossamYoussef2009/FoodPandaTask/pull/3#discussion_r37813745","pull_request_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/pulls/comments/37813745"},"html":{"href":"https://github.com/HossamYoussef2009/FoodPandaTask/pull/3#discussion_r37813745"},"pull_request":{"href":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/pulls/3","id":43230071,"html_url":"https://github.com/HossamYoussef2009/FoodPandaTask/pull/3","diff_url":"https://github.com/HossamYoussef2009/FoodPandaTask/pull/3.diff","patch_url":"https://github.com/HossamYoussef2009/FoodPandaTask/pull/3.patch","issue_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/issues/3","number":3,"state":"open","locked":false,"title":"add src","user":{"login":"islammohamed","id":1699068,"avatar_url":"https://avatars.githubusercontent.com/u/1699068?v=3","gravatar_id":"","url":"https://api.github.com/users/islammohamed","html_url":"https://github.com/islammohamed","followers_url":"https://api.github.com/users/islammohamed/followers","following_url":"https://api.github.com/users/islammohamed/following{/other_user}","gists_url":"https://api.github.com/users/islammohamed/gists{/gist_id}","starred_url":"https://api.github.com/users/islammohamed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/islammohamed/subscriptions","organizations_url":"https://api.github.com/users/islammohamed/orgs","repos_url":"https://api.github.com/users/islammohamed/repos","events_url":"https://api.github.com/users/islammohamed/events{/privacy}","received_events_url":"https://api.github.com/users/islammohamed/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-24T22:32:26Z","updated_at":"2015-08-24T22:39:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eec2205a55eb747297b408201073ef1efd6060e5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/pulls/3/commits","review_comments_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/pulls/3/comments","review_comment_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/issues/3/comments","statuses_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/statuses/498213fb1350921ad171de91e20c84ce6ad9026f","head":{"label":"HossamYoussef2009:src_directory_branch","ref":"src_directory_branch","sha":"498213fb1350921ad171de91e20c84ce6ad9026f","user":{"login":"HossamYoussef2009","id":10350010,"avatar_url":"https://avatars.githubusercontent.com/u/10350010?v=3","gravatar_id":"","url":"https://api.github.com/users/HossamYoussef2009","html_url":"https://github.com/HossamYoussef2009","followers_url":"https://api.github.com/users/HossamYoussef2009/followers","following_url":"https://api.github.com/users/HossamYoussef2009/following{/other_user}","gists_url":"https://api.github.com/users/HossamYoussef2009/gists{/gist_id}","starred_url":"https://api.github.com/users/HossamYoussef2009/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HossamYoussef2009/subscriptions","organizations_url":"https://api.github.com/users/HossamYoussef2009/orgs","repos_url":"https://api.github.com/users/HossamYoussef2009/repos","events_url":"https://api.github.com/users/HossamYoussef2009/events{/privacy}","received_events_url":"https://api.github.com/users/HossamYoussef2009/received_events","type":"User","site_admin":false},"repo":{"id":41311123,"name":"FoodPandaTask","full_name":"HossamYoussef2009/FoodPandaTask","owner":{"login":"HossamYoussef2009","id":10350010,"avatar_url":"https://avatars.githubusercontent.com/u/10350010?v=3","gravatar_id":"","url":"https://api.github.com/users/HossamYoussef2009","html_url":"https://github.com/HossamYoussef2009","followers_url":"https://api.github.com/users/HossamYoussef2009/followers","following_url":"https://api.github.com/users/HossamYoussef2009/following{/other_user}","gists_url":"https://api.github.com/users/HossamYoussef2009/gists{/gist_id}","starred_url":"https://api.github.com/users/HossamYoussef2009/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HossamYoussef2009/subscriptions","organizations_url":"https://api.github.com/users/HossamYoussef2009/orgs","repos_url":"https://api.github.com/users/HossamYoussef2009/repos","events_url":"https://api.github.com/users/HossamYoussef2009/events{/privacy}","received_events_url":"https://api.github.com/users/HossamYoussef2009/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/HossamYoussef2009/FoodPandaTask","description":"","fork":false,"url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask","forks_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/forks","keys_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/teams","hooks_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/hooks","issue_events_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/issues/events{/number}","events_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/events","assignees_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/assignees{/user}","branches_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/branches{/branch}","tags_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/tags","blobs_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/git/refs{/sha}","trees_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/statuses/{sha}","languages_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/languages","stargazers_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/stargazers","contributors_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/contributors","subscribers_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/subscribers","subscription_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/subscription","commits_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/commits{/sha}","git_commits_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/git/commits{/sha}","comments_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/comments{/number}","issue_comment_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/issues/comments{/number}","contents_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/contents/{+path}","compare_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/merges","archive_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/downloads","issues_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/issues{/number}","pulls_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/pulls{/number}","milestones_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/milestones{/number}","notifications_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/labels{/name}","releases_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/releases{/id}","created_at":"2015-08-24T15:28:31Z","updated_at":"2015-08-24T22:27:58Z","pushed_at":"2015-08-24T22:32:26Z","git_url":"git://github.com/HossamYoussef2009/FoodPandaTask.git","ssh_url":"git@github.com:HossamYoussef2009/FoodPandaTask.git","clone_url":"https://github.com/HossamYoussef2009/FoodPandaTask.git","svn_url":"https://github.com/HossamYoussef2009/FoodPandaTask","homepage":null,"size":0,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"HossamYoussef2009:master","ref":"master","sha":"f088f798f9f7947845041a28757c5408d5164b4a","user":{"login":"HossamYoussef2009","id":10350010,"avatar_url":"https://avatars.githubusercontent.com/u/10350010?v=3","gravatar_id":"","url":"https://api.github.com/users/HossamYoussef2009","html_url":"https://github.com/HossamYoussef2009","followers_url":"https://api.github.com/users/HossamYoussef2009/followers","following_url":"https://api.github.com/users/HossamYoussef2009/following{/other_user}","gists_url":"https://api.github.com/users/HossamYoussef2009/gists{/gist_id}","starred_url":"https://api.github.com/users/HossamYoussef2009/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HossamYoussef2009/subscriptions","organizations_url":"https://api.github.com/users/HossamYoussef2009/orgs","repos_url":"https://api.github.com/users/HossamYoussef2009/repos","events_url":"https://api.github.com/users/HossamYoussef2009/events{/privacy}","received_events_url":"https://api.github.com/users/HossamYoussef2009/received_events","type":"User","site_admin":false},"repo":{"id":41311123,"name":"FoodPandaTask","full_name":"HossamYoussef2009/FoodPandaTask","owner":{"login":"HossamYoussef2009","id":10350010,"avatar_url":"https://avatars.githubusercontent.com/u/10350010?v=3","gravatar_id":"","url":"https://api.github.com/users/HossamYoussef2009","html_url":"https://github.com/HossamYoussef2009","followers_url":"https://api.github.com/users/HossamYoussef2009/followers","following_url":"https://api.github.com/users/HossamYoussef2009/following{/other_user}","gists_url":"https://api.github.com/users/HossamYoussef2009/gists{/gist_id}","starred_url":"https://api.github.com/users/HossamYoussef2009/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HossamYoussef2009/subscriptions","organizations_url":"https://api.github.com/users/HossamYoussef2009/orgs","repos_url":"https://api.github.com/users/HossamYoussef2009/repos","events_url":"https://api.github.com/users/HossamYoussef2009/events{/privacy}","received_events_url":"https://api.github.com/users/HossamYoussef2009/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/HossamYoussef2009/FoodPandaTask","description":"","fork":false,"url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask","forks_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/forks","keys_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/teams","hooks_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/hooks","issue_events_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/issues/events{/number}","events_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/events","assignees_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/assignees{/user}","branches_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/branches{/branch}","tags_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/tags","blobs_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/git/refs{/sha}","trees_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/statuses/{sha}","languages_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/languages","stargazers_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/stargazers","contributors_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/contributors","subscribers_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/subscribers","subscription_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/subscription","commits_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/commits{/sha}","git_commits_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/git/commits{/sha}","comments_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/comments{/number}","issue_comment_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/issues/comments{/number}","contents_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/contents/{+path}","compare_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/merges","archive_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/downloads","issues_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/issues{/number}","pulls_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/pulls{/number}","milestones_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/milestones{/number}","notifications_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/labels{/name}","releases_url":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/releases{/id}","created_at":"2015-08-24T15:28:31Z","updated_at":"2015-08-24T22:27:58Z","pushed_at":"2015-08-24T22:32:26Z","git_url":"git://github.com/HossamYoussef2009/FoodPandaTask.git","ssh_url":"git@github.com:HossamYoussef2009/FoodPandaTask.git","clone_url":"https://github.com/HossamYoussef2009/FoodPandaTask.git","svn_url":"https://github.com/HossamYoussef2009/FoodPandaTask","homepage":null,"size":0,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/pulls/3"},"html":{"href":"https://github.com/HossamYoussef2009/FoodPandaTask/pull/3"},"issue":{"href":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/issues/3"},"comments":{"href":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/HossamYoussef2009/FoodPandaTask/statuses/498213fb1350921ad171de91e20c84ce6ad9026f"}}}}