{"action":"created","comment":{"url":"https://api.github.com/repos/vmonjaret/movie-api/pulls/comments/200033639","pull_request_review_id":134267332,"id":200033639,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDAzMzYzOQ==","diff_hunk":"@@ -0,0 +1,55 @@\n+<?php\n+\n+namespace App\\Controller\\Movie;\n+\n+use App\\Entity\\Movie;\n+use App\\Repository\\MovieRepository;\n+use Symfony\\Component\\HttpFoundation\\JsonResponse;\n+use Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorageInterface;\n+use Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\IsGranted;\n+use Doctrine\\ORM\\EntityManagerInterface;\n+\n+class Like\n+{\n+    private $movieRepository;\n+    private $tokenStorage;\n+    private $entityManager;\n+\n+    /**\n+     * Like constructor.\n+     * @param MovieRepository $movieRepository\n+     * @param TokenStorageInterface $tokenStorage\n+     * @param EntityManagerInterface $entityManager\n+     */\n+    public function __construct(MovieRepository $movieRepository, TokenStorageInterface $tokenStorage, EntityManagerInterface $entityManager)\n+    {\n+        $this->movieRepository = $movieRepository;\n+        $this->tokenStorage = $tokenStorage;\n+        $this->entityManager = $entityManager;\n+    }\n+\n+    /**\n+     * @IsGranted(\"ROLE_USER\")\n+     * @param Movie $movie\n+     * @return JsonResponse\n+     */\n+    public function __invoke(Movie $movie)\n+    {\n+        $user = $this->tokenStorage->getToken()->getUser();\n+\n+        $movie = $this->movieRepository->find($movie->getId());","path":"src/Controller/Movie/Like.php","position":40,"original_position":40,"commit_id":"2d4e4e5e434cc896dcfa46ef6d44978652cd5eb8","original_commit_id":"2d4e4e5e434cc896dcfa46ef6d44978652cd5eb8","user":{"login":"vmonjaret","id":9928313,"node_id":"MDQ6VXNlcjk5MjgzMTM=","avatar_url":"https://avatars3.githubusercontent.com/u/9928313?v=4","gravatar_id":"","url":"https://api.github.com/users/vmonjaret","html_url":"https://github.com/vmonjaret","followers_url":"https://api.github.com/users/vmonjaret/followers","following_url":"https://api.github.com/users/vmonjaret/following{/other_user}","gists_url":"https://api.github.com/users/vmonjaret/gists{/gist_id}","starred_url":"https://api.github.com/users/vmonjaret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmonjaret/subscriptions","organizations_url":"https://api.github.com/users/vmonjaret/orgs","repos_url":"https://api.github.com/users/vmonjaret/repos","events_url":"https://api.github.com/users/vmonjaret/events{/privacy}","received_events_url":"https://api.github.com/users/vmonjaret/received_events","type":"User","site_admin":false},"body":"Not necessary (paramconverter should do that)","created_at":"2018-07-04T07:40:18Z","updated_at":"2018-07-04T07:40:18Z","html_url":"https://github.com/vmonjaret/movie-api/pull/12#discussion_r200033639","pull_request_url":"https://api.github.com/repos/vmonjaret/movie-api/pulls/12","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/vmonjaret/movie-api/pulls/comments/200033639"},"html":{"href":"https://github.com/vmonjaret/movie-api/pull/12#discussion_r200033639"},"pull_request":{"href":"https://api.github.com/repos/vmonjaret/movie-api/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/vmonjaret/movie-api/pulls/12","id":199063009,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5MDYzMDA5","html_url":"https://github.com/vmonjaret/movie-api/pull/12","diff_url":"https://github.com/vmonjaret/movie-api/pull/12.diff","patch_url":"https://github.com/vmonjaret/movie-api/pull/12.patch","issue_url":"https://api.github.com/repos/vmonjaret/movie-api/issues/12","number":12,"state":"open","locked":false,"title":"Feature/movies user actions","user":{"login":"haas36u","id":20424616,"node_id":"MDQ6VXNlcjIwNDI0NjE2","avatar_url":"https://avatars2.githubusercontent.com/u/20424616?v=4","gravatar_id":"","url":"https://api.github.com/users/haas36u","html_url":"https://github.com/haas36u","followers_url":"https://api.github.com/users/haas36u/followers","following_url":"https://api.github.com/users/haas36u/following{/other_user}","gists_url":"https://api.github.com/users/haas36u/gists{/gist_id}","starred_url":"https://api.github.com/users/haas36u/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haas36u/subscriptions","organizations_url":"https://api.github.com/users/haas36u/orgs","repos_url":"https://api.github.com/users/haas36u/repos","events_url":"https://api.github.com/users/haas36u/events{/privacy}","received_events_url":"https://api.github.com/users/haas36u/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-03T19:32:13Z","updated_at":"2018-07-04T07:40:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1daef39f783fa98f5a4876bc00edbd1453f4c40e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/vmonjaret/movie-api/pulls/12/commits","review_comments_url":"https://api.github.com/repos/vmonjaret/movie-api/pulls/12/comments","review_comment_url":"https://api.github.com/repos/vmonjaret/movie-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vmonjaret/movie-api/issues/12/comments","statuses_url":"https://api.github.com/repos/vmonjaret/movie-api/statuses/2d4e4e5e434cc896dcfa46ef6d44978652cd5eb8","head":{"label":"vmonjaret:feature/movies-user-actions","ref":"feature/movies-user-actions","sha":"2d4e4e5e434cc896dcfa46ef6d44978652cd5eb8","user":{"login":"vmonjaret","id":9928313,"node_id":"MDQ6VXNlcjk5MjgzMTM=","avatar_url":"https://avatars3.githubusercontent.com/u/9928313?v=4","gravatar_id":"","url":"https://api.github.com/users/vmonjaret","html_url":"https://github.com/vmonjaret","followers_url":"https://api.github.com/users/vmonjaret/followers","following_url":"https://api.github.com/users/vmonjaret/following{/other_user}","gists_url":"https://api.github.com/users/vmonjaret/gists{/gist_id}","starred_url":"https://api.github.com/users/vmonjaret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmonjaret/subscriptions","organizations_url":"https://api.github.com/users/vmonjaret/orgs","repos_url":"https://api.github.com/users/vmonjaret/repos","events_url":"https://api.github.com/users/vmonjaret/events{/privacy}","received_events_url":"https://api.github.com/users/vmonjaret/received_events","type":"User","site_admin":false},"repo":{"id":126621012,"node_id":"MDEwOlJlcG9zaXRvcnkxMjY2MjEwMTI=","name":"movie-api","full_name":"vmonjaret/movie-api","owner":{"login":"vmonjaret","id":9928313,"node_id":"MDQ6VXNlcjk5MjgzMTM=","avatar_url":"https://avatars3.githubusercontent.com/u/9928313?v=4","gravatar_id":"","url":"https://api.github.com/users/vmonjaret","html_url":"https://github.com/vmonjaret","followers_url":"https://api.github.com/users/vmonjaret/followers","following_url":"https://api.github.com/users/vmonjaret/following{/other_user}","gists_url":"https://api.github.com/users/vmonjaret/gists{/gist_id}","starred_url":"https://api.github.com/users/vmonjaret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmonjaret/subscriptions","organizations_url":"https://api.github.com/users/vmonjaret/orgs","repos_url":"https://api.github.com/users/vmonjaret/repos","events_url":"https://api.github.com/users/vmonjaret/events{/privacy}","received_events_url":"https://api.github.com/users/vmonjaret/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vmonjaret/movie-api","description":null,"fork":false,"url":"https://api.github.com/repos/vmonjaret/movie-api","forks_url":"https://api.github.com/repos/vmonjaret/movie-api/forks","keys_url":"https://api.github.com/repos/vmonjaret/movie-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmonjaret/movie-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmonjaret/movie-api/teams","hooks_url":"https://api.github.com/repos/vmonjaret/movie-api/hooks","issue_events_url":"https://api.github.com/repos/vmonjaret/movie-api/issues/events{/number}","events_url":"https://api.github.com/repos/vmonjaret/movie-api/events","assignees_url":"https://api.github.com/repos/vmonjaret/movie-api/assignees{/user}","branches_url":"https://api.github.com/repos/vmonjaret/movie-api/branches{/branch}","tags_url":"https://api.github.com/repos/vmonjaret/movie-api/tags","blobs_url":"https://api.github.com/repos/vmonjaret/movie-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmonjaret/movie-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmonjaret/movie-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmonjaret/movie-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmonjaret/movie-api/statuses/{sha}","languages_url":"https://api.github.com/repos/vmonjaret/movie-api/languages","stargazers_url":"https://api.github.com/repos/vmonjaret/movie-api/stargazers","contributors_url":"https://api.github.com/repos/vmonjaret/movie-api/contributors","subscribers_url":"https://api.github.com/repos/vmonjaret/movie-api/subscribers","subscription_url":"https://api.github.com/repos/vmonjaret/movie-api/subscription","commits_url":"https://api.github.com/repos/vmonjaret/movie-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmonjaret/movie-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmonjaret/movie-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmonjaret/movie-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmonjaret/movie-api/contents/{+path}","compare_url":"https://api.github.com/repos/vmonjaret/movie-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmonjaret/movie-api/merges","archive_url":"https://api.github.com/repos/vmonjaret/movie-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmonjaret/movie-api/downloads","issues_url":"https://api.github.com/repos/vmonjaret/movie-api/issues{/number}","pulls_url":"https://api.github.com/repos/vmonjaret/movie-api/pulls{/number}","milestones_url":"https://api.github.com/repos/vmonjaret/movie-api/milestones{/number}","notifications_url":"https://api.github.com/repos/vmonjaret/movie-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmonjaret/movie-api/labels{/name}","releases_url":"https://api.github.com/repos/vmonjaret/movie-api/releases{/id}","deployments_url":"https://api.github.com/repos/vmonjaret/movie-api/deployments","created_at":"2018-03-24T17:00:12Z","updated_at":"2018-07-03T13:53:45Z","pushed_at":"2018-07-03T19:32:14Z","git_url":"git://github.com/vmonjaret/movie-api.git","ssh_url":"git@github.com:vmonjaret/movie-api.git","clone_url":"https://github.com/vmonjaret/movie-api.git","svn_url":"https://github.com/vmonjaret/movie-api","homepage":null,"size":116,"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,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"vmonjaret:master","ref":"master","sha":"6aaa0075344ded246caf0f2ca3308f5f9a1e3430","user":{"login":"vmonjaret","id":9928313,"node_id":"MDQ6VXNlcjk5MjgzMTM=","avatar_url":"https://avatars3.githubusercontent.com/u/9928313?v=4","gravatar_id":"","url":"https://api.github.com/users/vmonjaret","html_url":"https://github.com/vmonjaret","followers_url":"https://api.github.com/users/vmonjaret/followers","following_url":"https://api.github.com/users/vmonjaret/following{/other_user}","gists_url":"https://api.github.com/users/vmonjaret/gists{/gist_id}","starred_url":"https://api.github.com/users/vmonjaret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmonjaret/subscriptions","organizations_url":"https://api.github.com/users/vmonjaret/orgs","repos_url":"https://api.github.com/users/vmonjaret/repos","events_url":"https://api.github.com/users/vmonjaret/events{/privacy}","received_events_url":"https://api.github.com/users/vmonjaret/received_events","type":"User","site_admin":false},"repo":{"id":126621012,"node_id":"MDEwOlJlcG9zaXRvcnkxMjY2MjEwMTI=","name":"movie-api","full_name":"vmonjaret/movie-api","owner":{"login":"vmonjaret","id":9928313,"node_id":"MDQ6VXNlcjk5MjgzMTM=","avatar_url":"https://avatars3.githubusercontent.com/u/9928313?v=4","gravatar_id":"","url":"https://api.github.com/users/vmonjaret","html_url":"https://github.com/vmonjaret","followers_url":"https://api.github.com/users/vmonjaret/followers","following_url":"https://api.github.com/users/vmonjaret/following{/other_user}","gists_url":"https://api.github.com/users/vmonjaret/gists{/gist_id}","starred_url":"https://api.github.com/users/vmonjaret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmonjaret/subscriptions","organizations_url":"https://api.github.com/users/vmonjaret/orgs","repos_url":"https://api.github.com/users/vmonjaret/repos","events_url":"https://api.github.com/users/vmonjaret/events{/privacy}","received_events_url":"https://api.github.com/users/vmonjaret/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vmonjaret/movie-api","description":null,"fork":false,"url":"https://api.github.com/repos/vmonjaret/movie-api","forks_url":"https://api.github.com/repos/vmonjaret/movie-api/forks","keys_url":"https://api.github.com/repos/vmonjaret/movie-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmonjaret/movie-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmonjaret/movie-api/teams","hooks_url":"https://api.github.com/repos/vmonjaret/movie-api/hooks","issue_events_url":"https://api.github.com/repos/vmonjaret/movie-api/issues/events{/number}","events_url":"https://api.github.com/repos/vmonjaret/movie-api/events","assignees_url":"https://api.github.com/repos/vmonjaret/movie-api/assignees{/user}","branches_url":"https://api.github.com/repos/vmonjaret/movie-api/branches{/branch}","tags_url":"https://api.github.com/repos/vmonjaret/movie-api/tags","blobs_url":"https://api.github.com/repos/vmonjaret/movie-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmonjaret/movie-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmonjaret/movie-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmonjaret/movie-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmonjaret/movie-api/statuses/{sha}","languages_url":"https://api.github.com/repos/vmonjaret/movie-api/languages","stargazers_url":"https://api.github.com/repos/vmonjaret/movie-api/stargazers","contributors_url":"https://api.github.com/repos/vmonjaret/movie-api/contributors","subscribers_url":"https://api.github.com/repos/vmonjaret/movie-api/subscribers","subscription_url":"https://api.github.com/repos/vmonjaret/movie-api/subscription","commits_url":"https://api.github.com/repos/vmonjaret/movie-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmonjaret/movie-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmonjaret/movie-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmonjaret/movie-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmonjaret/movie-api/contents/{+path}","compare_url":"https://api.github.com/repos/vmonjaret/movie-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmonjaret/movie-api/merges","archive_url":"https://api.github.com/repos/vmonjaret/movie-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmonjaret/movie-api/downloads","issues_url":"https://api.github.com/repos/vmonjaret/movie-api/issues{/number}","pulls_url":"https://api.github.com/repos/vmonjaret/movie-api/pulls{/number}","milestones_url":"https://api.github.com/repos/vmonjaret/movie-api/milestones{/number}","notifications_url":"https://api.github.com/repos/vmonjaret/movie-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmonjaret/movie-api/labels{/name}","releases_url":"https://api.github.com/repos/vmonjaret/movie-api/releases{/id}","deployments_url":"https://api.github.com/repos/vmonjaret/movie-api/deployments","created_at":"2018-03-24T17:00:12Z","updated_at":"2018-07-03T13:53:45Z","pushed_at":"2018-07-03T19:32:14Z","git_url":"git://github.com/vmonjaret/movie-api.git","ssh_url":"git@github.com:vmonjaret/movie-api.git","clone_url":"https://github.com/vmonjaret/movie-api.git","svn_url":"https://github.com/vmonjaret/movie-api","homepage":null,"size":116,"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,"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/vmonjaret/movie-api/pulls/12"},"html":{"href":"https://github.com/vmonjaret/movie-api/pull/12"},"issue":{"href":"https://api.github.com/repos/vmonjaret/movie-api/issues/12"},"comments":{"href":"https://api.github.com/repos/vmonjaret/movie-api/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/vmonjaret/movie-api/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/vmonjaret/movie-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vmonjaret/movie-api/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/vmonjaret/movie-api/statuses/2d4e4e5e434cc896dcfa46ef6d44978652cd5eb8"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"vmonjaret"}}