Completed
Push — master ( a06a95...a1d542 )
by dan
15s
created
Url/UrlBuilder.php 2 patches
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,6 @@  discard block
 block discarded – undo
86 86
 
87 87
     /**
88 88
      * @param        $relativeFilePath
89
-     * @param string $adapterUrlData
90 89
      *
91 90
      * @return string
92 91
      */
@@ -169,7 +168,6 @@  discard block
 block discarded – undo
169 168
     }
170 169
 
171 170
     /**
172
-     * @param array $data
173 171
      *
174 172
      * @return string
175 173
      */
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -149,8 +149,7 @@
 block discarded – undo
149 149
         if ($urlBits[0] == 'http' || $urlBits[0] == 'https') {
150 150
             $urlPrefix = $urlBits[0] . '://';
151 151
             $urlPath   = $urlBits[1];
152
-        }
153
-        else {
152
+        } else {
154 153
             $urlPrefix = '/';
155 154
             $urlPath   = $url;
156 155
         }
Please login to merge, or discard this patch.
Controller/ImageController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
                 $response->setExpires(date_create()->modify('+1 years'));
59 59
 
60 60
                 $response->setCallback(
61
-                    function () use ($stream) {
61
+                    function() use ($stream) {
62 62
                         if (ftell($stream['stream']) !== 0) {
63 63
                             rewind($stream['stream']);
64 64
                         }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,12 +68,10 @@
 block discarded – undo
68 68
                 );
69 69
 
70 70
                 return $response;
71
-            }
72
-            else {
71
+            } else {
73 72
                 throw $this->createNotFoundException('Derived image could not be created');
74 73
             }
75
-        }
76
-        else {
74
+        } else {
77 75
             throw $this->createNotFoundException('The file does not exist');
78 76
         }
79 77
     }
Please login to merge, or discard this patch.
Command/GenerateImageEntityCrudCommand.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -141,8 +141,7 @@
 block discarded – undo
141 141
         $output->write('Updating the routing: ');
142 142
         if ('annotation' != $format) {
143 143
             $runner($this->updateRouting($questionHelper, $input, $output, $bundle, $format, $entity, $prefix));
144
-        }
145
-        else {
144
+        } else {
146 145
             $runner($this->updateAnnotationRouting($bundle, $entity, $prefix));
147 146
         }
148 147
 
Please login to merge, or discard this patch.
Form/ResponsiveImageType.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
         $builder->addEventListener(
46 46
             FormEvents::PRE_SET_DATA,
47
-            function (FormEvent $event) {
47
+            function(FormEvent $event) {
48 48
                 $image = $event->getData();
49 49
                 $form  = $event->getForm();
50 50
                 // Conditionally add form elements.
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@
 block discarded – undo
56 56
                             'data' => $image,
57 57
                         ]
58 58
                     );
59
-                }
60
-                else {
59
+                } else {
61 60
                     $form->add('file', FileType::class, ['label' => 'Upload an image']);
62 61
                 }
63 62
             }
Please login to merge, or discard this patch.
DependencyInjection/ResponsiveImageExtension.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,7 @@
 block discarded – undo
39 39
         // Create the image_entity_class parameter.
40 40
         if (!empty($config['image_entity_class'])) {
41 41
             $container->setParameter('responsive_image.entity_class', $config['image_entity_class']);
42
-        }
43
-        else {
42
+        } else {
44 43
             $container->setParameter('responsive_image.entity_class', '');
45 44
         }
46 45
 
Please login to merge, or discard this patch.
ImageProcessing/ImageStyler.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $this->image->resize(
99 99
             $width,
100 100
             $height,
101
-            function ($constraint) {
101
+            function($constraint) {
102 102
                 $constraint->aspectRatio();
103 103
             }
104 104
         );
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
                     $this->image->fit(
178 178
                         $this->styleData['width'],
179 179
                         $this->styleData['height'],
180
-                        function ($constraint) {
180
+                        function($constraint) {
181 181
                             $constraint->upsize();
182 182
                         }
183 183
                     );
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -153,8 +153,7 @@
 block discarded – undo
153 153
                     // just cut out the crop rectangle.
154 154
                     if (empty($this->getCoordinates('focus'))) {
155 155
                         $this->doCropRectangle();
156
-                    }
157
-                    else {
156
+                    } else {
158 157
 
159 158
                         $focusOffsetFinder = new FocusCropDataCalculator(
160 159
                             $this->getCoordinates('crop'),
Please login to merge, or discard this patch.
ImageProcessing/FocusCropDataCalculator.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -161,10 +161,10 @@
 block discarded – undo
161 161
         $focusY2 = $this->focusCoordinates[3];
162 162
 
163 163
         if ($type == 'near') {
164
-            $point = ${'focus' . $axis . '1'} - ${'crop' . $axis . '1'};
164
+            $point = ${'focus' . $axis . '1'} -${'crop' . $axis . '1'};
165 165
         }
166 166
         else {
167
-            $point = ${'focus' . $axis . '2'} - ${'crop' . $axis . '1'};
167
+            $point = ${'focus' . $axis . '2'} -${'crop' . $axis . '1'};
168 168
         }
169 169
 
170 170
         return $point;
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -76,12 +76,10 @@  discard block
 block discarded – undo
76 76
 
77 77
         if ($imageAspectRatio > $styleAspectRatio) {
78 78
             $axis = 'x';
79
-        }
80
-        else {
79
+        } else {
81 80
             if ($imageAspectRatio < $styleAspectRatio) {
82 81
                 $axis = 'y';
83
-            }
84
-            else {
82
+            } else {
85 83
                 return [
86 84
                     'width'  => $newWidth,
87 85
                     'height' => $newHeight,
@@ -162,8 +160,7 @@  discard block
 block discarded – undo
162 160
 
163 161
         if ($type == 'near') {
164 162
             $point = ${'focus' . $axis . '1'} - ${'crop' . $axis . '1'};
165
-        }
166
-        else {
163
+        } else {
167 164
             $point = ${'focus' . $axis . '2'} - ${'crop' . $axis . '1'};
168 165
         }
169 166
 
Please login to merge, or discard this patch.
ImageProcessing/CoordinateGeometry.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
         $size->resize(
52 52
             $scaleX,
53 53
             $scaleY,
54
-            function ($constraint) {
54
+            function($constraint) {
55 55
                 $constraint->aspectRatio();
56 56
             }
57 57
         );
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,8 +80,7 @@
 block discarded – undo
80 80
         $axis = strtolower($axis);
81 81
         if ($axis == 'x') {
82 82
             return $this->x2 - $this->x1;
83
-        }
84
-        else {
83
+        } else {
85 84
             return $this->y2 - $this->y1;
86 85
         }
87 86
     }
Please login to merge, or discard this patch.
Tests/File/FileToObjectTest.php 3 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,21 +45,21 @@
 block discarded – undo
45 45
 
46 46
         // Mock the EntityManager to return the mock of the repository
47 47
         $entityManager = $this->getMockBuilder(EntityManager::class)
48
-                              ->disableOriginalConstructor()
49
-                              ->getMock();
48
+                                ->disableOriginalConstructor()
49
+                                ->getMock();
50 50
 
51 51
         $entityManager->expects($this->any())
52
-                      ->method('getRepository')
53
-                      ->will($this->returnValue($imageRepository));
52
+                        ->method('getRepository')
53
+                        ->will($this->returnValue($imageRepository));
54 54
 
55 55
         // The mock the ImageEntityName
56 56
         $nameResolver = $this->getMockBuilder(ImageEntityNameResolver::class)
57
-                             ->disableOriginalConstructor()
58
-                             ->getMock();
57
+                                ->disableOriginalConstructor()
58
+                                ->getMock();
59 59
 
60 60
         $nameResolver->expects($this->once())
61
-                     ->method('getClassName')
62
-                     ->will($this->returnValue('ResponsiveImage'));
61
+                        ->method('getClassName')
62
+                        ->will($this->returnValue('ResponsiveImage'));
63 63
 
64 64
         $fileToObject = new FileToObject($entityManager, $nameResolver);
65 65
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
                         ->method('findImageFromFilename')
32 32
                         ->will(
33 33
                             $this->returnCallback(
34
-                                function ($filename) {
34
+                                function($filename) {
35 35
                                     $image = new TestImage();
36 36
                                     if ($filename === $image->getPath()) {
37 37
                                         return $image;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,8 +35,7 @@
 block discarded – undo
35 35
                                     $image = new TestImage();
36 36
                                     if ($filename === $image->getPath()) {
37 37
                                         return $image;
38
-                                    }
39
-                                    else {
38
+                                    } else {
40 39
                                         return null;
41 40
                                     }
42 41
                                 }
Please login to merge, or discard this patch.