Passed
Branch feature/frontend (f16ed3)
by Stone
07:11
created
src/Entity/Trick.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -278,7 +278,7 @@
 block discarded – undo
278 278
      */
279 279
     public function getPrimaryImages(): ?Collection
280 280
     {
281
-        return $this->getImages()->filter(function (Image $image){
281
+        return $this->getImages()->filter(function(Image $image) {
282 282
             return $image->getPrimaryImage() === true;
283 283
         });
284 284
     }
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->addFlash(FlashMessageCategory::SUCCESS, 'image ' . $image->getTitle() . ' deleted');
24
+        $this->addFlash(FlashMessageCategory::SUCCESS, 'image '.$image->getTitle().' deleted');
25 25
 
26 26
     }
27 27
 
Please login to merge, or discard this patch.
src/EventSubscriber/Image/ImageSetPrimarySubscriber.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
             if ($trickImage === $image) {
43 43
                 if($trickImage->getPrimaryImage()){
44 44
                     $trickImage->setPrimaryImage(false);
45
-                }else{
45
+                } else{
46 46
                     $trickImage->setPrimaryImage(true);
47 47
                 }
48 48
 
Please login to merge, or discard this 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/Entity/Video.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,11 +90,11 @@
 block discarded – undo
90 90
         return $this;
91 91
     }
92 92
 
93
-    public function getVideoIntegrationCode(){
93
+    public function getVideoIntegrationCode() {
94 94
         return str_replace("{{code}}", $this->getCode(), $this->getVideoType()->getCode());
95 95
     }
96 96
 
97
-    public function getVideoIntegrationImage(){
97
+    public function getVideoIntegrationImage() {
98 98
         return str_replace("{{code}}", $this->getCode(), $this->getVideoType()->getImageCode());
99 99
     }
100 100
 
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
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         $this->em->persist($trick);
26 26
         $this->em->flush();
27 27
 
28
-        $this->addFlash(FlashMessageCategory::SUCCESS, 'Video '. $video->getTitle() .' Added');
28
+        $this->addFlash(FlashMessageCategory::SUCCESS, 'Video '.$video->getTitle().' Added');
29 29
     }
30 30
 
31 31
     /**
Please login to merge, or discard this patch.
src/EventSubscriber/Video/VideoDeletedSubscriber.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->addFlash(FlashMessageCategory::SUCCESS, 'Video '. $video->getTitle() .' deleted');
26
+        $this->addFlash(FlashMessageCategory::SUCCESS, 'Video '.$video->getTitle().' deleted');
27 27
     }
28 28
 
29 29
     /**
Please login to merge, or discard this patch.
src/Repository/ImageRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@
 block discarded – undo
19 19
         parent::__construct($registry, Image::class);
20 20
     }
21 21
 
22
-    public function findBySearchQuery(array $searchTerms){
22
+    public function findBySearchQuery(array $searchTerms) {
23 23
 
24 24
         $queryBuilder = $this->createQueryBuilder('p');
25 25
 
26 26
         foreach ($searchTerms as $key => $term) {
27 27
             $queryBuilder
28
-                ->orWhere('p.title LIKE :term_' . $key)
29
-                ->setParameter('term_' . $key, '%' . $term . '%');
28
+                ->orWhere('p.title LIKE :term_'.$key)
29
+                ->setParameter('term_'.$key, '%'.$term.'%');
30 30
 
31 31
         }
32 32
 
Please login to merge, or discard this patch.
src/Repository/VideoRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@
 block discarded – undo
19 19
         parent::__construct($registry, Video::class);
20 20
     }
21 21
 
22
-    public function findBySearchQuery(array $searchTerms){
22
+    public function findBySearchQuery(array $searchTerms) {
23 23
 
24 24
         $queryBuilder = $this->createQueryBuilder('p');
25 25
 
26 26
         foreach ($searchTerms as $key => $term) {
27 27
             $queryBuilder
28
-                ->orWhere('p.title LIKE :term_' . $key)
29
-                ->setParameter('term_' . $key, '%' . $term . '%');
28
+                ->orWhere('p.title LIKE :term_'.$key)
29
+                ->setParameter('term_'.$key, '%'.$term.'%');
30 30
 
31 31
         }
32 32
 
Please login to merge, or discard this patch.
src/Form/VideoTypeForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
                 'required' => true,
26 26
                 'help' => 'the video identifier, usually a unique code following "v="'
27 27
             ])
28
-            ->add( 'videoType', EntityType::class, [
28
+            ->add('videoType', EntityType::class, [
29 29
                 'class' => VideoType::class,
30 30
                 'choice_label' => 'site',
31 31
                 ])
Please login to merge, or discard this patch.