@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | private $tagRepository; |
| 43 | 43 | |
| 44 | - public function __construct(EventDispatcherInterface $dispatcher, TrickHistory $trickHistory, TagRepository $tagRepository ) |
|
| 44 | + public function __construct(EventDispatcherInterface $dispatcher, TrickHistory $trickHistory, TagRepository $tagRepository) |
|
| 45 | 45 | { |
| 46 | 46 | $this->dispatcher = $dispatcher; |
| 47 | 47 | $this->trickHistory = $trickHistory; |
@@ -85,10 +85,10 @@ |
||
| 85 | 85 | * Checks if the user is admin or author of the comment. |
| 86 | 86 | * Thows a redirect to the trick show page |
| 87 | 87 | */ |
| 88 | - private function checkSecurity(Comment $comment){ |
|
| 89 | - if(!($this->isGranted('ROLE_ADMIN') || $this->getUser()->getId() === $comment->getUser()->getId())) |
|
| 88 | + private function checkSecurity(Comment $comment) { |
|
| 89 | + if (!($this->isGranted('ROLE_ADMIN') || $this->getUser()->getId() === $comment->getUser()->getId())) |
|
| 90 | 90 | { |
| 91 | - Throw new RedirectException($this->generateUrl('trick.show', ['id'=> $comment->getTrick()->getId(), 'slug'=> $comment->getTrick()->getSlug()]),"You are not allowed to edit this comment"); |
|
| 91 | + Throw new RedirectException($this->generateUrl('trick.show', ['id'=> $comment->getTrick()->getId(), 'slug'=> $comment->getTrick()->getSlug()]), "You are not allowed to edit this comment"); |
|
| 92 | 92 | } |
| 93 | 93 | } |
| 94 | 94 | |