Passed
Push — develop ( 605aab...b17d99 )
by Stone
06:54 queued 11s
created
src/Controller/Trick/TricksByCategoryController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         $page = $request->get('page') ?? 1;
62 62
 
63 63
         /** @var Paginator $tricks */
64
-        $tricks = $this->trickRepository->findLatestEdited($page, (int)$categoryId);
64
+        $tricks = $this->trickRepository->findLatestEdited($page, (int) $categoryId);
65 65
 
66 66
         $nextPage = $this->pagePagination->nextPage($tricks, $page, Trick::NUMBER_OF_DISPLAYED_TRICKS);
67 67
 
Please login to merge, or discard this patch.
src/Controller/Comment/EditCommentController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             'save_button_label' => 'Update',
41 41
         ]);
42 42
 
43
-        if($request->isXmlHttpRequest()){
43
+        if ($request->isXmlHttpRequest()) {
44 44
             $render = $this->renderView('comment/_comment-form.html.twig', [
45 45
                 'comment' => $comment,
46 46
                 'commentForm' => $commentForm->createView(),
@@ -97,10 +97,10 @@  discard block
 block discarded – undo
97 97
      * Checks if the user is admin or author of the comment.
98 98
      * Thows a redirect to the trick show page
99 99
      */
100
-    private function checkSecurity(Comment $comment){
101
-        if(!($this->isGranted('ROLE_ADMIN') || $this->getUser()->getId() === $comment->getUser()->getId()))
100
+    private function checkSecurity(Comment $comment) {
101
+        if (!($this->isGranted('ROLE_ADMIN') || $this->getUser()->getId() === $comment->getUser()->getId()))
102 102
         {
103
-            Throw new RedirectException($this->generateUrl('trick.show', ['id'=> $comment->getTrick()->getId(), 'slug'=> $comment->getTrick()->getSlug()]),"You are not allowed to edit this comment");
103
+            Throw new RedirectException($this->generateUrl('trick.show', ['id'=> $comment->getTrick()->getId(), 'slug'=> $comment->getTrick()->getSlug()]), "You are not allowed to edit this comment");
104 104
         }
105 105
     }
106 106
 
Please login to merge, or discard this patch.
src/EventSubscriber/Image/ImageSetPrimarySubscriber.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
             /** @var Image $trickImage */
23 23
             foreach ($trickImages as $trickImage) {
24
-                if ($trickImage->getPrimaryImage() && $trickImage !== $image ) {
24
+                if ($trickImage->getPrimaryImage() && $trickImage !== $image) {
25 25
                     $trickImage->setPrimaryImage(false);
26 26
                 }
27 27
 
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
         /** @var Image $trickImage */
42 42
         foreach ($trickImages as $trickImage) {
43 43
             if ($trickImage === $image) {
44
-                if($trickImage->getPrimaryImage()){
44
+                if ($trickImage->getPrimaryImage()) {
45 45
                     $trickImage->setPrimaryImage(false);
46
-                }else{
46
+                } else {
47 47
                     $trickImage->setPrimaryImage(true);
48 48
                 }
49 49
 
Please login to merge, or discard this patch.
src/Repository/CommentRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
             ->orderBy('c.createdAt', 'DESC')
36 36
             ->getQuery();
37 37
 
38
-        $paginator = $this->paginate($query,Comment::NUMBER_OF_DISPLAYED_COMMENTS, $currentPage);
38
+        $paginator = $this->paginate($query, Comment::NUMBER_OF_DISPLAYED_COMMENTS, $currentPage);
39 39
 
40 40
         return $paginator;
41 41
     }
Please login to merge, or discard this patch.
src/Pagination/PaginateRepositoryTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 
6 6
 use Doctrine\ORM\Tools\Pagination\Paginator;
7 7
 
8
-trait PaginateRepositoryTrait{
8
+trait PaginateRepositoryTrait {
9 9
 
10 10
     public function paginate($dql, int $limit, int $page = 1)
11 11
     {
Please login to merge, or discard this patch.
src/Entity/AbstractAppEntity.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,6 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Entity;
4 4
 
5
-abstract class AbstractAppEntity{
5
+abstract class AbstractAppEntity {
6 6
 
7 7
 }
8 8
\ No newline at end of file
Please login to merge, or discard this patch.
src/Form/CommentFormType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 use Symfony\Component\Form\FormBuilderInterface;
10 10
 use Symfony\Component\OptionsResolver\OptionsResolver;
11 11
 
12
-class CommentFormType extends AbstractType{
12
+class CommentFormType extends AbstractType {
13 13
 
14 14
     public function buildForm(FormBuilderInterface $builder, array $options)
15 15
     {
Please login to merge, or discard this patch.
src/Form/ImageFormType.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     public function buildForm(FormBuilderInterface $builder, array $options)
20 20
     {
21 21
         $builder
22
-            ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
22
+            ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) {
23 23
                 $image = $event->getData();
24 24
 
25 25
                 $form = $event->getForm();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,7 @@
 block discarded – undo
31 31
                         'download_uri' => false,
32 32
                         'image_uri' => false,
33 33
                     ]);
34
-                }
35
-                else {
34
+                } else {
36 35
                     $form->add('image', ShowImageType::class, [
37 36
                         'image_property' => 'webImage',
38 37
                         'mapped' => false,
Please login to merge, or discard this patch.
src/Form/VideoFormType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
     public function buildForm(FormBuilderInterface $builder, array $options)
19 19
     {
20 20
         $builder
21
-            ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event){
21
+            ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) {
22 22
                 $video = $event->getData();
23 23
 
24 24
                 $form = $event->getForm();
25
-                if ($video && $video->getId() !== null){
25
+                if ($video && $video->getId() !== null) {
26 26
                     $form->add('vidImage', ShowImageType::class, [
27 27
                         'image_property' => 'videoIntegrationImage',
28 28
                         'mapped' => false,
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
                 'required' => true,
41 41
                 'help' => 'the video identifier, usually a unique code following "v="'
42 42
             ])
43
-            ->add( 'videoType', EntityType::class, [
43
+            ->add('videoType', EntityType::class, [
44 44
                 'class' => VideoType::class,
45 45
                 'choice_label' => 'site',
46 46
                 ])
Please login to merge, or discard this patch.