{"action":"created","comment":{"url":"https://api.github.com/repos/Roave/tickets/pulls/comments/25722774","id":25722774,"diff_hunk":"@@ -0,0 +1,45 @@\n+<?php\n+/*\n+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ *\n+ * This software consists of voluntary contributions made by many individuals\n+ * and is licensed under the MIT license.\n+ */\n+\n+namespace Application\\Command\\Ticket\\Handler;\n+\n+use Application\\Command\\AbstractCommandHandler;\n+use Application\\Command\\Command;\n+use Application\\Command\\Ticket\\RemoveTicket as RemoveTicketCommand;\n+use Application\\Entity\\Ticket;\n+use Application\\Event\\Ticket\\TicketWasRemoved;\n+\n+class RemoveTicket extends AbstractCommandHandler\n+{\n+    public function handler(Command $command)\n+    {\n+        $entity = $this->entityManager\n+            ->getRepository(Ticket::class)\n+            ->findOneBy(['id' => $command->getTicketIdentifier()]);\n+\n+        $this->entityManager->remove($entity);","path":"module/Application/src/Application/Command/Ticket/Handler/RemoveTicket.php","position":35,"original_position":35,"commit_id":"dcd239da3ba72004c678accd8f3f23e5d6c52bdd","original_commit_id":"dcd239da3ba72004c678accd8f3f23e5d6c52bdd","user":{"login":"danizord","id":1850941,"avatar_url":"https://avatars.githubusercontent.com/u/1850941?v=3","gravatar_id":"","url":"https://api.github.com/users/danizord","html_url":"https://github.com/danizord","followers_url":"https://api.github.com/users/danizord/followers","following_url":"https://api.github.com/users/danizord/following{/other_user}","gists_url":"https://api.github.com/users/danizord/gists{/gist_id}","starred_url":"https://api.github.com/users/danizord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danizord/subscriptions","organizations_url":"https://api.github.com/users/danizord/orgs","repos_url":"https://api.github.com/users/danizord/repos","events_url":"https://api.github.com/users/danizord/events{/privacy}","received_events_url":"https://api.github.com/users/danizord/received_events","type":"User","site_admin":false},"body":"What if the ticket was not found?","created_at":"2015-03-03T20:20:49Z","updated_at":"2015-03-03T20:20:49Z","html_url":"https://github.com/Roave/tickets/pull/6#discussion_r25722774","pull_request_url":"https://api.github.com/repos/Roave/tickets/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/Roave/tickets/pulls/comments/25722774"},"html":{"href":"https://github.com/Roave/tickets/pull/6#discussion_r25722774"},"pull_request":{"href":"https://api.github.com/repos/Roave/tickets/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/Roave/tickets/pulls/6","id":28915884,"html_url":"https://github.com/Roave/tickets/pull/6","diff_url":"https://github.com/Roave/tickets/pull/6.diff","patch_url":"https://github.com/Roave/tickets/pull/6.patch","issue_url":"https://api.github.com/repos/Roave/tickets/issues/6","number":6,"state":"open","locked":false,"title":"[WIP] Draft application.","user":{"login":"malukenho","id":3275172,"avatar_url":"https://avatars.githubusercontent.com/u/3275172?v=3","gravatar_id":"","url":"https://api.github.com/users/malukenho","html_url":"https://github.com/malukenho","followers_url":"https://api.github.com/users/malukenho/followers","following_url":"https://api.github.com/users/malukenho/following{/other_user}","gists_url":"https://api.github.com/users/malukenho/gists{/gist_id}","starred_url":"https://api.github.com/users/malukenho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malukenho/subscriptions","organizations_url":"https://api.github.com/users/malukenho/orgs","repos_url":"https://api.github.com/users/malukenho/repos","events_url":"https://api.github.com/users/malukenho/events{/privacy}","received_events_url":"https://api.github.com/users/malukenho/received_events","type":"User","site_admin":false},"body":"Starting to draw the basic features of the application.","created_at":"2015-02-09T12:18:19Z","updated_at":"2015-03-03T20:20:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44736b5b1fa986ba304c0002ebccfe35d8a2800f","assignee":{"login":"Ocramius","id":154256,"avatar_url":"https://avatars.githubusercontent.com/u/154256?v=3","gravatar_id":"","url":"https://api.github.com/users/Ocramius","html_url":"https://github.com/Ocramius","followers_url":"https://api.github.com/users/Ocramius/followers","following_url":"https://api.github.com/users/Ocramius/following{/other_user}","gists_url":"https://api.github.com/users/Ocramius/gists{/gist_id}","starred_url":"https://api.github.com/users/Ocramius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ocramius/subscriptions","organizations_url":"https://api.github.com/users/Ocramius/orgs","repos_url":"https://api.github.com/users/Ocramius/repos","events_url":"https://api.github.com/users/Ocramius/events{/privacy}","received_events_url":"https://api.github.com/users/Ocramius/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Roave/tickets/milestones/1","html_url":"https://github.com/Roave/tickets/milestones/1.0.0","labels_url":"https://api.github.com/repos/Roave/tickets/milestones/1/labels","id":966324,"number":1,"title":"1.0.0","description":"MVP","creator":{"login":"Ocramius","id":154256,"avatar_url":"https://avatars.githubusercontent.com/u/154256?v=3","gravatar_id":"","url":"https://api.github.com/users/Ocramius","html_url":"https://github.com/Ocramius","followers_url":"https://api.github.com/users/Ocramius/followers","following_url":"https://api.github.com/users/Ocramius/following{/other_user}","gists_url":"https://api.github.com/users/Ocramius/gists{/gist_id}","starred_url":"https://api.github.com/users/Ocramius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ocramius/subscriptions","organizations_url":"https://api.github.com/users/Ocramius/orgs","repos_url":"https://api.github.com/users/Ocramius/repos","events_url":"https://api.github.com/users/Ocramius/events{/privacy}","received_events_url":"https://api.github.com/users/Ocramius/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":2,"state":"open","created_at":"2015-02-04T23:10:15Z","updated_at":"2015-02-11T22:15:24Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Roave/tickets/pulls/6/commits","review_comments_url":"https://api.github.com/repos/Roave/tickets/pulls/6/comments","review_comment_url":"https://api.github.com/repos/Roave/tickets/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Roave/tickets/issues/6/comments","statuses_url":"https://api.github.com/repos/Roave/tickets/statuses/dcd239da3ba72004c678accd8f3f23e5d6c52bdd","head":{"label":"malukenho:feature/manager-user","ref":"feature/manager-user","sha":"dcd239da3ba72004c678accd8f3f23e5d6c52bdd","user":{"login":"malukenho","id":3275172,"avatar_url":"https://avatars.githubusercontent.com/u/3275172?v=3","gravatar_id":"","url":"https://api.github.com/users/malukenho","html_url":"https://github.com/malukenho","followers_url":"https://api.github.com/users/malukenho/followers","following_url":"https://api.github.com/users/malukenho/following{/other_user}","gists_url":"https://api.github.com/users/malukenho/gists{/gist_id}","starred_url":"https://api.github.com/users/malukenho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malukenho/subscriptions","organizations_url":"https://api.github.com/users/malukenho/orgs","repos_url":"https://api.github.com/users/malukenho/repos","events_url":"https://api.github.com/users/malukenho/events{/privacy}","received_events_url":"https://api.github.com/users/malukenho/received_events","type":"User","site_admin":false},"repo":{"id":29989492,"name":"tickets","full_name":"malukenho/tickets","owner":{"login":"malukenho","id":3275172,"avatar_url":"https://avatars.githubusercontent.com/u/3275172?v=3","gravatar_id":"","url":"https://api.github.com/users/malukenho","html_url":"https://github.com/malukenho","followers_url":"https://api.github.com/users/malukenho/followers","following_url":"https://api.github.com/users/malukenho/following{/other_user}","gists_url":"https://api.github.com/users/malukenho/gists{/gist_id}","starred_url":"https://api.github.com/users/malukenho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malukenho/subscriptions","organizations_url":"https://api.github.com/users/malukenho/orgs","repos_url":"https://api.github.com/users/malukenho/repos","events_url":"https://api.github.com/users/malukenho/events{/privacy}","received_events_url":"https://api.github.com/users/malukenho/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/malukenho/tickets","description":"Ticket thingy","fork":true,"url":"https://api.github.com/repos/malukenho/tickets","forks_url":"https://api.github.com/repos/malukenho/tickets/forks","keys_url":"https://api.github.com/repos/malukenho/tickets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/malukenho/tickets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/malukenho/tickets/teams","hooks_url":"https://api.github.com/repos/malukenho/tickets/hooks","issue_events_url":"https://api.github.com/repos/malukenho/tickets/issues/events{/number}","events_url":"https://api.github.com/repos/malukenho/tickets/events","assignees_url":"https://api.github.com/repos/malukenho/tickets/assignees{/user}","branches_url":"https://api.github.com/repos/malukenho/tickets/branches{/branch}","tags_url":"https://api.github.com/repos/malukenho/tickets/tags","blobs_url":"https://api.github.com/repos/malukenho/tickets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/malukenho/tickets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/malukenho/tickets/git/refs{/sha}","trees_url":"https://api.github.com/repos/malukenho/tickets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/malukenho/tickets/statuses/{sha}","languages_url":"https://api.github.com/repos/malukenho/tickets/languages","stargazers_url":"https://api.github.com/repos/malukenho/tickets/stargazers","contributors_url":"https://api.github.com/repos/malukenho/tickets/contributors","subscribers_url":"https://api.github.com/repos/malukenho/tickets/subscribers","subscription_url":"https://api.github.com/repos/malukenho/tickets/subscription","commits_url":"https://api.github.com/repos/malukenho/tickets/commits{/sha}","git_commits_url":"https://api.github.com/repos/malukenho/tickets/git/commits{/sha}","comments_url":"https://api.github.com/repos/malukenho/tickets/comments{/number}","issue_comment_url":"https://api.github.com/repos/malukenho/tickets/issues/comments{/number}","contents_url":"https://api.github.com/repos/malukenho/tickets/contents/{+path}","compare_url":"https://api.github.com/repos/malukenho/tickets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/malukenho/tickets/merges","archive_url":"https://api.github.com/repos/malukenho/tickets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/malukenho/tickets/downloads","issues_url":"https://api.github.com/repos/malukenho/tickets/issues{/number}","pulls_url":"https://api.github.com/repos/malukenho/tickets/pulls{/number}","milestones_url":"https://api.github.com/repos/malukenho/tickets/milestones{/number}","notifications_url":"https://api.github.com/repos/malukenho/tickets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/malukenho/tickets/labels{/name}","releases_url":"https://api.github.com/repos/malukenho/tickets/releases{/id}","created_at":"2015-01-28T21:37:30Z","updated_at":"2015-01-28T21:37:26Z","pushed_at":"2015-03-03T04:56:45Z","git_url":"git://github.com/malukenho/tickets.git","ssh_url":"git@github.com:malukenho/tickets.git","clone_url":"https://github.com/malukenho/tickets.git","svn_url":"https://github.com/malukenho/tickets","homepage":null,"size":718,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"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":"Roave:master","ref":"master","sha":"650f896806bf1de7c62c786885c55a3703bffcfb","user":{"login":"Roave","id":3029050,"avatar_url":"https://avatars.githubusercontent.com/u/3029050?v=3","gravatar_id":"","url":"https://api.github.com/users/Roave","html_url":"https://github.com/Roave","followers_url":"https://api.github.com/users/Roave/followers","following_url":"https://api.github.com/users/Roave/following{/other_user}","gists_url":"https://api.github.com/users/Roave/gists{/gist_id}","starred_url":"https://api.github.com/users/Roave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Roave/subscriptions","organizations_url":"https://api.github.com/users/Roave/orgs","repos_url":"https://api.github.com/users/Roave/repos","events_url":"https://api.github.com/users/Roave/events{/privacy}","received_events_url":"https://api.github.com/users/Roave/received_events","type":"Organization","site_admin":false},"repo":{"id":29989340,"name":"tickets","full_name":"Roave/tickets","owner":{"login":"Roave","id":3029050,"avatar_url":"https://avatars.githubusercontent.com/u/3029050?v=3","gravatar_id":"","url":"https://api.github.com/users/Roave","html_url":"https://github.com/Roave","followers_url":"https://api.github.com/users/Roave/followers","following_url":"https://api.github.com/users/Roave/following{/other_user}","gists_url":"https://api.github.com/users/Roave/gists{/gist_id}","starred_url":"https://api.github.com/users/Roave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Roave/subscriptions","organizations_url":"https://api.github.com/users/Roave/orgs","repos_url":"https://api.github.com/users/Roave/repos","events_url":"https://api.github.com/users/Roave/events{/privacy}","received_events_url":"https://api.github.com/users/Roave/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Roave/tickets","description":"Ticket thingy","fork":false,"url":"https://api.github.com/repos/Roave/tickets","forks_url":"https://api.github.com/repos/Roave/tickets/forks","keys_url":"https://api.github.com/repos/Roave/tickets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Roave/tickets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Roave/tickets/teams","hooks_url":"https://api.github.com/repos/Roave/tickets/hooks","issue_events_url":"https://api.github.com/repos/Roave/tickets/issues/events{/number}","events_url":"https://api.github.com/repos/Roave/tickets/events","assignees_url":"https://api.github.com/repos/Roave/tickets/assignees{/user}","branches_url":"https://api.github.com/repos/Roave/tickets/branches{/branch}","tags_url":"https://api.github.com/repos/Roave/tickets/tags","blobs_url":"https://api.github.com/repos/Roave/tickets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Roave/tickets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Roave/tickets/git/refs{/sha}","trees_url":"https://api.github.com/repos/Roave/tickets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Roave/tickets/statuses/{sha}","languages_url":"https://api.github.com/repos/Roave/tickets/languages","stargazers_url":"https://api.github.com/repos/Roave/tickets/stargazers","contributors_url":"https://api.github.com/repos/Roave/tickets/contributors","subscribers_url":"https://api.github.com/repos/Roave/tickets/subscribers","subscription_url":"https://api.github.com/repos/Roave/tickets/subscription","commits_url":"https://api.github.com/repos/Roave/tickets/commits{/sha}","git_commits_url":"https://api.github.com/repos/Roave/tickets/git/commits{/sha}","comments_url":"https://api.github.com/repos/Roave/tickets/comments{/number}","issue_comment_url":"https://api.github.com/repos/Roave/tickets/issues/comments{/number}","contents_url":"https://api.github.com/repos/Roave/tickets/contents/{+path}","compare_url":"https://api.github.com/repos/Roave/tickets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Roave/tickets/merges","archive_url":"https://api.github.com/repos/Roave/tickets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Roave/tickets/downloads","issues_url":"https://api.github.com/repos/Roave/tickets/issues{/number}","pulls_url":"https://api.github.com/repos/Roave/tickets/pulls{/number}","milestones_url":"https://api.github.com/repos/Roave/tickets/milestones{/number}","notifications_url":"https://api.github.com/repos/Roave/tickets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Roave/tickets/labels{/name}","releases_url":"https://api.github.com/repos/Roave/tickets/releases{/id}","created_at":"2015-01-28T21:33:20Z","updated_at":"2015-02-04T23:10:33Z","pushed_at":"2015-03-03T11:10:56Z","git_url":"git://github.com/Roave/tickets.git","ssh_url":"git@github.com:Roave/tickets.git","clone_url":"https://github.com/Roave/tickets.git","svn_url":"https://github.com/Roave/tickets","homepage":null,"size":760,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Roave/tickets/pulls/6"},"html":{"href":"https://github.com/Roave/tickets/pull/6"},"issue":{"href":"https://api.github.com/repos/Roave/tickets/issues/6"},"comments":{"href":"https://api.github.com/repos/Roave/tickets/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/Roave/tickets/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/Roave/tickets/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Roave/tickets/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/Roave/tickets/statuses/dcd239da3ba72004c678accd8f3f23e5d6c52bdd"}}}}