Test Failed
Pull Request — master (#87)
by
unknown
09:42
created
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.
src/Repository/TrickRepository.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -32,20 +32,20 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function findLatestEdited(int $currentPage = 1, int $categoryId = 0)
34 34
     {
35
-        if($currentPage <1){
35
+        if ($currentPage < 1) {
36 36
             throw new InvalidArgumentException("Current page can not be lower than one");
37 37
         }
38 38
 
39 39
         $query = $this->createQueryBuilder('t');
40 40
 
41
-        if($categoryId>0){
41
+        if ($categoryId > 0) {
42 42
             $query->where('t.category = :categoryId')
43 43
                 ->setParameter('categoryId', $categoryId);
44 44
         }
45 45
 
46 46
         $query->orderBy('t.editedAt', 'DESC')
47 47
             ->getQuery();
48
-        $paginator = $this->paginate($query,Trick::NUMBER_OF_DISPLAYED_TRICKS, $currentPage);
48
+        $paginator = $this->paginate($query, Trick::NUMBER_OF_DISPLAYED_TRICKS, $currentPage);
49 49
 
50 50
         return $paginator;
51 51
 
@@ -58,13 +58,13 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function findLatestEditedByTag(int $currentPage = 1, int $tagId = 0)
60 60
     {
61
-        if($currentPage <1){
61
+        if ($currentPage < 1) {
62 62
             throw new InvalidArgumentException("Current page can not be lower than one");
63 63
         }
64 64
 
65 65
         $query = $this->createQueryBuilder('t');
66 66
 
67
-        if($tagId>0){
67
+        if ($tagId > 0) {
68 68
             $query->leftJoin('t.tags', 'tag')
69 69
                 ->where('tag = :tagId')
70 70
                 ->setParameter('tagId', $tagId);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
         $query->orderBy('t.editedAt', 'DESC')
74 74
             ->getQuery();
75
-        $paginator = $this->paginate($query,Trick::NUMBER_OF_DISPLAYED_TRICKS, $currentPage);
75
+        $paginator = $this->paginate($query, Trick::NUMBER_OF_DISPLAYED_TRICKS, $currentPage);
76 76
 
77 77
         return $paginator;
78 78
 
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 
86 86
         foreach ($searchTerms as $key => $term) {
87 87
             $queryBuilder
88
-                ->orWhere('p.name LIKE :term_' . $key)
89
-                ->setParameter('term_' . $key, '%' . $term . '%');
88
+                ->orWhere('p.name LIKE :term_'.$key)
89
+                ->setParameter('term_'.$key, '%'.$term.'%');
90 90
 
91 91
         }
92 92
 
Please login to merge, or discard this patch.
src/EventSubscriber/Image/ImageDeletedSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         $this->em->flush();
22 22
 
23 23
 
24
-        $this->addFlashMessage(FlashMessageCategory::SUCCESS, 'image ' . $image->getTitle() . ' deleted');
24
+        $this->addFlashMessage(FlashMessageCategory::SUCCESS, 'image '.$image->getTitle().' deleted');
25 25
 
26 26
     }
27 27
 
Please login to merge, or discard this patch.
src/EventSubscriber/Video/VideoAddedSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         $this->em->persist($trick);
24 24
         $this->em->flush();
25 25
 
26
-        $this->addFlashMessage(FlashMessageCategory::SUCCESS, 'Video '. $video->getTitle() .' Added');
26
+        $this->addFlashMessage(FlashMessageCategory::SUCCESS, 'Video '.$video->getTitle().' Added');
27 27
     }
28 28
 
29 29
     /**
Please login to merge, or discard this patch.