{"action":"created","comment":{"url":"https://api.github.com/repos/pschmidt88/racoony/pulls/comments/117604795","pull_request_review_id":39330728,"id":117604795,"diff_hunk":"@@ -0,0 +1,88 @@\n+<?php\n+\n+namespace Racoony\\Http\\Controllers\\Departments;\n+\n+use Illuminate\\Http\\Request;\n+use League\\Fractal\\Pagination\\IlluminatePaginatorAdapter;\n+use Racoony\\Contracts\\Departments\\DepartmentRepositoryContract;\n+use Racoony\\Contracts\\Members\\MemberRepositoryContract;\n+use Racoony\\Http\\Controllers\\Controller;\n+use Racoony\\Http\\Requests\\Departments\\AssignMemberToDepartment;\n+use Racoony\\Http\\Requests\\Departments\\StoreDepartment;\n+use Racoony\\Http\\Transformers\\Departments\\DepartmentTransformer;\n+use Racoony\\Http\\Transformers\\Members\\MemberTransformer;\n+\n+class DepartmentsController extends Controller\n+{\n+    /**\n+     * @param \\Illuminate\\Http\\Request     $request\n+     * @param DepartmentRepositoryContract $departments\n+     *\n+     * @return \\Illuminate\\Http\\JsonResponse\n+     */\n+    public function all(Request $request, DepartmentRepositoryContract $departments)\n+    {\n+        $perPage = $request->get('per_page', 25);\n+\n+        /** @var \\Illuminate\\Pagination\\LengthAwarePaginator $departmentsPaginator */\n+        $departmentsPaginator = $departments->paginate($perPage);\n+\n+        return fractal()\n+            ->collection($departmentsPaginator->getCollection(), new DepartmentTransformer())\n+            ->paginateWith(new IlluminatePaginatorAdapter($departmentsPaginator))\n+            ->respond(200);\n+    }\n+\n+    /**\n+     * @param int                          $id\n+     * @param DepartmentRepositoryContract $departments\n+     *\n+     * @return \\Illuminate\\Http\\JsonResponse\n+     */\n+    public function show($id, DepartmentRepositoryContract $departments)\n+    {\n+        $department = $departments->get($id);\n+\n+        return fractal()\n+            ->item($department, new DepartmentTransformer())\n+            ->respond(200);\n+    }\n+\n+    /**\n+     * @param \\Racoony\\Http\\Requests\\Departments\\StoreDepartment          $request\n+     * @param \\Racoony\\Contracts\\Departments\\DepartmentRepositoryContract $departments\n+     *\n+     * @return \\Illuminate\\Http\\JsonResponse\n+     */\n+    public function store(StoreDepartment $request, DepartmentRepositoryContract $departments)\n+    {\n+        $department = $departments->store($request->all());\n+\n+        return fractal()\n+            ->item($department, new DepartmentTransformer())\n+            ->respond(201);\n+    }\n+\n+    /**\n+     * @param int                                                         $departmentId\n+     * @param \\Racoony\\Http\\Requests\\Departments\\AssignMemberToDepartment $request\n+     * @param \\Racoony\\Contracts\\Departments\\DepartmentRepositoryContract $departments\n+     * @param \\Racoony\\Contracts\\Members\\MemberRepositoryContract         $members\n+     *\n+     * @return \\Illuminate\\Http\\JsonResponse\n+     */\n+    public function assignMember($departmentId, AssignMemberToDepartment $request,","path":"app/Http/Controllers/Departments/DepartmentsController.php","position":74,"original_position":74,"commit_id":"722da485a2563b00464b6b7b717579fc71cd9e2d","original_commit_id":"722da485a2563b00464b6b7b717579fc71cd9e2d","user":{"login":"Nitpick-CI","id":12626182,"avatar_url":"https://avatars2.githubusercontent.com/u/12626182?v=3","gravatar_id":"","url":"https://api.github.com/users/Nitpick-CI","html_url":"https://github.com/Nitpick-CI","followers_url":"https://api.github.com/users/Nitpick-CI/followers","following_url":"https://api.github.com/users/Nitpick-CI/following{/other_user}","gists_url":"https://api.github.com/users/Nitpick-CI/gists{/gist_id}","starred_url":"https://api.github.com/users/Nitpick-CI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nitpick-CI/subscriptions","organizations_url":"https://api.github.com/users/Nitpick-CI/orgs","repos_url":"https://api.github.com/users/Nitpick-CI/repos","events_url":"https://api.github.com/users/Nitpick-CI/events{/privacy}","received_events_url":"https://api.github.com/users/Nitpick-CI/received_events","type":"User","site_admin":false},"body":"- The first parameter of a multi-line function declaration must be on the line after the opening bracket\n- Multi-line function declarations must define one parameter per line\n","created_at":"2017-05-20T08:07:53Z","updated_at":"2017-05-20T08:07:53Z","html_url":"https://github.com/pschmidt88/racoony/pull/10#discussion_r117604795","pull_request_url":"https://api.github.com/repos/pschmidt88/racoony/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/pschmidt88/racoony/pulls/comments/117604795"},"html":{"href":"https://github.com/pschmidt88/racoony/pull/10#discussion_r117604795"},"pull_request":{"href":"https://api.github.com/repos/pschmidt88/racoony/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/pschmidt88/racoony/pulls/10","id":121615307,"html_url":"https://github.com/pschmidt88/racoony/pull/10","diff_url":"https://github.com/pschmidt88/racoony/pull/10.diff","patch_url":"https://github.com/pschmidt88/racoony/pull/10.patch","issue_url":"https://api.github.com/repos/pschmidt88/racoony/issues/10","number":10,"state":"open","locked":false,"title":"Feature/departments","user":{"login":"pschmidt88","id":465359,"avatar_url":"https://avatars3.githubusercontent.com/u/465359?v=3","gravatar_id":"","url":"https://api.github.com/users/pschmidt88","html_url":"https://github.com/pschmidt88","followers_url":"https://api.github.com/users/pschmidt88/followers","following_url":"https://api.github.com/users/pschmidt88/following{/other_user}","gists_url":"https://api.github.com/users/pschmidt88/gists{/gist_id}","starred_url":"https://api.github.com/users/pschmidt88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pschmidt88/subscriptions","organizations_url":"https://api.github.com/users/pschmidt88/orgs","repos_url":"https://api.github.com/users/pschmidt88/repos","events_url":"https://api.github.com/users/pschmidt88/events{/privacy}","received_events_url":"https://api.github.com/users/pschmidt88/received_events","type":"User","site_admin":false},"body":"Feature Departments\r\n\r\n- [x] Create departments\r\n- [x] List departments\r\n- [x] Assign members to departments","created_at":"2017-05-20T08:07:40Z","updated_at":"2017-05-20T08:07:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"17781a6c258a568fbc985d36ba7525b74f535316","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/pschmidt88/racoony/pulls/10/commits","review_comments_url":"https://api.github.com/repos/pschmidt88/racoony/pulls/10/comments","review_comment_url":"https://api.github.com/repos/pschmidt88/racoony/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pschmidt88/racoony/issues/10/comments","statuses_url":"https://api.github.com/repos/pschmidt88/racoony/statuses/722da485a2563b00464b6b7b717579fc71cd9e2d","head":{"label":"pschmidt88:feature/departments","ref":"feature/departments","sha":"722da485a2563b00464b6b7b717579fc71cd9e2d","user":{"login":"pschmidt88","id":465359,"avatar_url":"https://avatars3.githubusercontent.com/u/465359?v=3","gravatar_id":"","url":"https://api.github.com/users/pschmidt88","html_url":"https://github.com/pschmidt88","followers_url":"https://api.github.com/users/pschmidt88/followers","following_url":"https://api.github.com/users/pschmidt88/following{/other_user}","gists_url":"https://api.github.com/users/pschmidt88/gists{/gist_id}","starred_url":"https://api.github.com/users/pschmidt88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pschmidt88/subscriptions","organizations_url":"https://api.github.com/users/pschmidt88/orgs","repos_url":"https://api.github.com/users/pschmidt88/repos","events_url":"https://api.github.com/users/pschmidt88/events{/privacy}","received_events_url":"https://api.github.com/users/pschmidt88/received_events","type":"User","site_admin":false},"repo":{"id":81501438,"name":"racoony","full_name":"pschmidt88/racoony","owner":{"login":"pschmidt88","id":465359,"avatar_url":"https://avatars3.githubusercontent.com/u/465359?v=3","gravatar_id":"","url":"https://api.github.com/users/pschmidt88","html_url":"https://github.com/pschmidt88","followers_url":"https://api.github.com/users/pschmidt88/followers","following_url":"https://api.github.com/users/pschmidt88/following{/other_user}","gists_url":"https://api.github.com/users/pschmidt88/gists{/gist_id}","starred_url":"https://api.github.com/users/pschmidt88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pschmidt88/subscriptions","organizations_url":"https://api.github.com/users/pschmidt88/orgs","repos_url":"https://api.github.com/users/pschmidt88/repos","events_url":"https://api.github.com/users/pschmidt88/events{/privacy}","received_events_url":"https://api.github.com/users/pschmidt88/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pschmidt88/racoony","description":null,"fork":false,"url":"https://api.github.com/repos/pschmidt88/racoony","forks_url":"https://api.github.com/repos/pschmidt88/racoony/forks","keys_url":"https://api.github.com/repos/pschmidt88/racoony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pschmidt88/racoony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pschmidt88/racoony/teams","hooks_url":"https://api.github.com/repos/pschmidt88/racoony/hooks","issue_events_url":"https://api.github.com/repos/pschmidt88/racoony/issues/events{/number}","events_url":"https://api.github.com/repos/pschmidt88/racoony/events","assignees_url":"https://api.github.com/repos/pschmidt88/racoony/assignees{/user}","branches_url":"https://api.github.com/repos/pschmidt88/racoony/branches{/branch}","tags_url":"https://api.github.com/repos/pschmidt88/racoony/tags","blobs_url":"https://api.github.com/repos/pschmidt88/racoony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pschmidt88/racoony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pschmidt88/racoony/git/refs{/sha}","trees_url":"https://api.github.com/repos/pschmidt88/racoony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pschmidt88/racoony/statuses/{sha}","languages_url":"https://api.github.com/repos/pschmidt88/racoony/languages","stargazers_url":"https://api.github.com/repos/pschmidt88/racoony/stargazers","contributors_url":"https://api.github.com/repos/pschmidt88/racoony/contributors","subscribers_url":"https://api.github.com/repos/pschmidt88/racoony/subscribers","subscription_url":"https://api.github.com/repos/pschmidt88/racoony/subscription","commits_url":"https://api.github.com/repos/pschmidt88/racoony/commits{/sha}","git_commits_url":"https://api.github.com/repos/pschmidt88/racoony/git/commits{/sha}","comments_url":"https://api.github.com/repos/pschmidt88/racoony/comments{/number}","issue_comment_url":"https://api.github.com/repos/pschmidt88/racoony/issues/comments{/number}","contents_url":"https://api.github.com/repos/pschmidt88/racoony/contents/{+path}","compare_url":"https://api.github.com/repos/pschmidt88/racoony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pschmidt88/racoony/merges","archive_url":"https://api.github.com/repos/pschmidt88/racoony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pschmidt88/racoony/downloads","issues_url":"https://api.github.com/repos/pschmidt88/racoony/issues{/number}","pulls_url":"https://api.github.com/repos/pschmidt88/racoony/pulls{/number}","milestones_url":"https://api.github.com/repos/pschmidt88/racoony/milestones{/number}","notifications_url":"https://api.github.com/repos/pschmidt88/racoony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pschmidt88/racoony/labels{/name}","releases_url":"https://api.github.com/repos/pschmidt88/racoony/releases{/id}","deployments_url":"https://api.github.com/repos/pschmidt88/racoony/deployments","created_at":"2017-02-09T22:30:01Z","updated_at":"2017-02-20T09:27:57Z","pushed_at":"2017-05-20T08:07:40Z","git_url":"git://github.com/pschmidt88/racoony.git","ssh_url":"git@github.com:pschmidt88/racoony.git","clone_url":"https://github.com/pschmidt88/racoony.git","svn_url":"https://github.com/pschmidt88/racoony","homepage":null,"size":1046,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"base":{"label":"pschmidt88:develop","ref":"develop","sha":"527ec8f38a6c6f09274496be8c70bbf701f28d52","user":{"login":"pschmidt88","id":465359,"avatar_url":"https://avatars3.githubusercontent.com/u/465359?v=3","gravatar_id":"","url":"https://api.github.com/users/pschmidt88","html_url":"https://github.com/pschmidt88","followers_url":"https://api.github.com/users/pschmidt88/followers","following_url":"https://api.github.com/users/pschmidt88/following{/other_user}","gists_url":"https://api.github.com/users/pschmidt88/gists{/gist_id}","starred_url":"https://api.github.com/users/pschmidt88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pschmidt88/subscriptions","organizations_url":"https://api.github.com/users/pschmidt88/orgs","repos_url":"https://api.github.com/users/pschmidt88/repos","events_url":"https://api.github.com/users/pschmidt88/events{/privacy}","received_events_url":"https://api.github.com/users/pschmidt88/received_events","type":"User","site_admin":false},"repo":{"id":81501438,"name":"racoony","full_name":"pschmidt88/racoony","owner":{"login":"pschmidt88","id":465359,"avatar_url":"https://avatars3.githubusercontent.com/u/465359?v=3","gravatar_id":"","url":"https://api.github.com/users/pschmidt88","html_url":"https://github.com/pschmidt88","followers_url":"https://api.github.com/users/pschmidt88/followers","following_url":"https://api.github.com/users/pschmidt88/following{/other_user}","gists_url":"https://api.github.com/users/pschmidt88/gists{/gist_id}","starred_url":"https://api.github.com/users/pschmidt88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pschmidt88/subscriptions","organizations_url":"https://api.github.com/users/pschmidt88/orgs","repos_url":"https://api.github.com/users/pschmidt88/repos","events_url":"https://api.github.com/users/pschmidt88/events{/privacy}","received_events_url":"https://api.github.com/users/pschmidt88/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pschmidt88/racoony","description":null,"fork":false,"url":"https://api.github.com/repos/pschmidt88/racoony","forks_url":"https://api.github.com/repos/pschmidt88/racoony/forks","keys_url":"https://api.github.com/repos/pschmidt88/racoony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pschmidt88/racoony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pschmidt88/racoony/teams","hooks_url":"https://api.github.com/repos/pschmidt88/racoony/hooks","issue_events_url":"https://api.github.com/repos/pschmidt88/racoony/issues/events{/number}","events_url":"https://api.github.com/repos/pschmidt88/racoony/events","assignees_url":"https://api.github.com/repos/pschmidt88/racoony/assignees{/user}","branches_url":"https://api.github.com/repos/pschmidt88/racoony/branches{/branch}","tags_url":"https://api.github.com/repos/pschmidt88/racoony/tags","blobs_url":"https://api.github.com/repos/pschmidt88/racoony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pschmidt88/racoony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pschmidt88/racoony/git/refs{/sha}","trees_url":"https://api.github.com/repos/pschmidt88/racoony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pschmidt88/racoony/statuses/{sha}","languages_url":"https://api.github.com/repos/pschmidt88/racoony/languages","stargazers_url":"https://api.github.com/repos/pschmidt88/racoony/stargazers","contributors_url":"https://api.github.com/repos/pschmidt88/racoony/contributors","subscribers_url":"https://api.github.com/repos/pschmidt88/racoony/subscribers","subscription_url":"https://api.github.com/repos/pschmidt88/racoony/subscription","commits_url":"https://api.github.com/repos/pschmidt88/racoony/commits{/sha}","git_commits_url":"https://api.github.com/repos/pschmidt88/racoony/git/commits{/sha}","comments_url":"https://api.github.com/repos/pschmidt88/racoony/comments{/number}","issue_comment_url":"https://api.github.com/repos/pschmidt88/racoony/issues/comments{/number}","contents_url":"https://api.github.com/repos/pschmidt88/racoony/contents/{+path}","compare_url":"https://api.github.com/repos/pschmidt88/racoony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pschmidt88/racoony/merges","archive_url":"https://api.github.com/repos/pschmidt88/racoony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pschmidt88/racoony/downloads","issues_url":"https://api.github.com/repos/pschmidt88/racoony/issues{/number}","pulls_url":"https://api.github.com/repos/pschmidt88/racoony/pulls{/number}","milestones_url":"https://api.github.com/repos/pschmidt88/racoony/milestones{/number}","notifications_url":"https://api.github.com/repos/pschmidt88/racoony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pschmidt88/racoony/labels{/name}","releases_url":"https://api.github.com/repos/pschmidt88/racoony/releases{/id}","deployments_url":"https://api.github.com/repos/pschmidt88/racoony/deployments","created_at":"2017-02-09T22:30:01Z","updated_at":"2017-02-20T09:27:57Z","pushed_at":"2017-05-20T08:07:40Z","git_url":"git://github.com/pschmidt88/racoony.git","ssh_url":"git@github.com:pschmidt88/racoony.git","clone_url":"https://github.com/pschmidt88/racoony.git","svn_url":"https://github.com/pschmidt88/racoony","homepage":null,"size":1046,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/pschmidt88/racoony/pulls/10"},"html":{"href":"https://github.com/pschmidt88/racoony/pull/10"},"issue":{"href":"https://api.github.com/repos/pschmidt88/racoony/issues/10"},"comments":{"href":"https://api.github.com/repos/pschmidt88/racoony/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/pschmidt88/racoony/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/pschmidt88/racoony/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pschmidt88/racoony/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/pschmidt88/racoony/statuses/722da485a2563b00464b6b7b717579fc71cd9e2d"}}}}
{"actor":{"display_login":"Nitpick-CI"}}