Completed
Push — master ( 05b722...3814de )
by dan
01:59
created
Controller/ImageController.php 1 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.
StyleManager.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -98,8 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
         if (empty($coordinates)) {
100 100
             $geometry = new CoordinateGeometry(0, 0, $image->getWidth(), $image->getHeight());
101
-        }
102
-        else {
101
+        } else {
103 102
             $cropCoordinates = explode(':', $coordinates)[0];
104 103
             $points          = explode(',', $cropCoordinates);
105 104
             $geometry        = new CoordinateGeometry(
@@ -145,8 +144,7 @@  discard block
 block discarded – undo
145 144
             if (strpos($styleName, 'custom_') === 0) {
146 145
                 return $this->styleDataFromCustomStyleString($styleName);
147 146
             }
148
-        }
149
-        else {
147
+        } else {
150 148
             return $this->styles[$styleName];
151 149
         }
152 150
 
@@ -240,8 +238,7 @@  discard block
 block discarded – undo
240 238
                         // We need to derive the width.
241 239
                         $scaledDimensions = $this->getScaledDimensions($image, $styleData);
242 240
                         $width            = $scaledDimensions['width'];
243
-                    }
244
-                    else {
241
+                    } else {
245 242
                         $width = $styleData['width'];
246 243
                     }
247 244
 
@@ -268,8 +265,7 @@  discard block
 block discarded – undo
268 265
 
269 266
         if (!empty($styleName)) {
270 267
             $stylePath = $this->buildStylePath($styleName, $filename);
271
-        }
272
-        else {
268
+        } else {
273 269
             $stylePath = $filename;
274 270
         }
275 271
 
Please login to merge, or discard this patch.
Command/GenerateImageEntityCommand.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,8 +138,7 @@
 block discarded – undo
138 138
                 throw new \RuntimeException(
139 139
                     'Aborting, overwrite permission is needed.'
140 140
                 );
141
-            }
142
-            else {
141
+            } else {
143 142
                 $this->overwrite = true;
144 143
             }
145 144
         }
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 1 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 1 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/CoordinateGeometry.php 1 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.
Twig/ResponsiveImageExtension.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -157,8 +157,7 @@  discard block
 block discarded – undo
157 157
                     $subData[$item] = $this->createPublicFileUrl($path);
158 158
                 }
159 159
                 $data[$key] = $subData;
160
-            }
161
-            else {
160
+            } else {
162 161
                 $data[$key] = $this->createPublicFileUrl($data[$key]);
163 162
             }
164 163
         }
@@ -274,8 +273,7 @@  discard block
 block discarded – undo
274 273
     {
275 274
         if (!empty($styleName)) {
276 275
             $path = $this->styleManager->getStylePath($image, $styleName);
277
-        }
278
-        else {
276
+        } else {
279 277
             $path = $image->getPath();
280 278
         }
281 279
 
Please login to merge, or discard this patch.