Test Setup Failed
Branch master (0143d5)
by Zlatin
02:06
created
src/Form/DataTransformer/MediaTransformer.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,11 +71,9 @@
 block discarded – undo
71 71
     {
72 72
         if (null === $value) {
73 73
             return null;
74
-        }
75
-        else if ($value->getBinary()) {
74
+        } else if ($value->getBinary()) {
76 75
             return $this->provider->save($value->getBinary(), $value);
77
-        }
78
-        else if ($value->getId()) {
76
+        } else if ($value->getId()) {
79 77
             return $value;
80 78
         }
81 79
         
Please login to merge, or discard this patch.
src/Entity/Media.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
      */
72 72
     public function __toString()
73 73
     {
74
-        return $this->getName() ? : "";
74
+        return $this->getName() ?: "";
75 75
     }
76 76
     
77 77
     /**
Please login to merge, or discard this patch.
src/Twig/MediaExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     
30 30
     public function media(\Media\Entity\Media $media)
31 31
     {
32
-        $url = "uploads/" . intval($media->getId()/1000) . "/" . $media->getName();
32
+        $url = "uploads/" . intval($media->getId() / 1000) . "/" . $media->getName();
33 33
         $base = $this->app['request']->getBasePath();
34 34
         return sprintf("%s/%s", $base, $url);
35 35
     }
Please login to merge, or discard this patch.
src/MediaServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 //        }
23 23
         
24 24
         if ($app->offsetExists('form.factory')) {
25
-            $app['form.types'] = $app->share($app->extend('form.types', function ($types) use ($app) {
25
+            $app['form.types'] = $app->share($app->extend('form.types', function($types) use ($app) {
26 26
                         $types[] = new Form\Type\MediaType($app);
27 27
                         return $types;
28 28
                     }));
Please login to merge, or discard this patch.
src/Provider/ImageProvider.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,8 +70,7 @@
 block discarded – undo
70 70
 
71 71
         if (!$media instanceof Media) {
72 72
             $media = new Media();
73
-        }
74
-        else {
73
+        } else {
75 74
             $media->setBinary(null);
76 75
         }
77 76
 
Please login to merge, or discard this patch.