Passed
Pull Request — master (#2)
by Rob
02:27
created
src/Filter/ImageResizer.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     public function __construct(ImageResizerService $imageResizerService, array $options = [])
38 38
     {
39 39
         $this->setOptions(array_merge($this->options, $options))
40
-             ->setImageResizerService($imageResizerService);
40
+                ->setImageResizerService($imageResizerService);
41 41
     }
42 42
 
43 43
     /**
Please login to merge, or discard this patch.
src/Model/Image.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -119,13 +119,13 @@
 block discarded – undo
119 119
 
120 120
         // Prep this model
121 121
         $this->setPath($path)
122
-             ->setSplFileInfo(new SplFileInfo($path))
123
-             ->setOriginalWidth($width)
124
-             ->setOriginalHeight($height)
125
-             ->setTargetWidth($targetWidth)
126
-             ->setTargetHeight($targetHeight)
127
-             ->calculateCropPositions($cropMode, $x, $y)
128
-             ->setTargetPath($this->generateFileName());
122
+                ->setSplFileInfo(new SplFileInfo($path))
123
+                ->setOriginalWidth($width)
124
+                ->setOriginalHeight($height)
125
+                ->setTargetWidth($targetWidth)
126
+                ->setTargetHeight($targetHeight)
127
+                ->calculateCropPositions($cropMode, $x, $y)
128
+                ->setTargetPath($this->generateFileName());
129 129
     }
130 130
 
131 131
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
         // Get the filepath
141 141
         $explodedFilepath = explode(DIRECTORY_SEPARATOR, $this->getPath());
142 142
         // Reconstruct the base file path
143
-        $baseFilepath = implode(DIRECTORY_SEPARATOR, array_slice($explodedFilepath, 0, count($explodedFilepath)-1));
143
+        $baseFilepath = implode(DIRECTORY_SEPARATOR, array_slice($explodedFilepath, 0, count($explodedFilepath) - 1));
144 144
         // Explode the filename
145 145
         $explodedFilename = explode('.', $filename);
146 146
         // Generate new name
Please login to merge, or discard this patch.
src/Service/ImageResizerService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -194,11 +194,11 @@  discard block
 block discarded – undo
194 194
      */
195 195
     public function scaleThumbnail(string $filepath, int $targetWidth = 0, int $targetHeight = 0)
196 196
     {
197
-        if (!file_exists($filepath) && is_file($filepath)) {
197
+        if ( ! file_exists($filepath) && is_file($filepath)) {
198 198
             throw new InvalidArgumentException('File does not exist!');
199 199
         }
200 200
 
201
-        if ($targetHeight >! 0 || $targetWidth >! 0) {
201
+        if ($targetHeight > ! 0 || $targetWidth > ! 0) {
202 202
             throw new InvalidArgumentException('targetWidth or targetHeight needs to be defined.');
203 203
         }
204 204
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         // Get the filepath
213 213
         $explodedFilepath = explode(DIRECTORY_SEPARATOR, $filepath);
214 214
         // Reconstruct the base file path
215
-        $baseFilepath = implode(DIRECTORY_SEPARATOR, array_slice($explodedFilepath, 0, count($explodedFilepath)-1));
215
+        $baseFilepath = implode(DIRECTORY_SEPARATOR, array_slice($explodedFilepath, 0, count($explodedFilepath) - 1));
216 216
         // Explode the filename
217 217
         $explodedFilename = explode('.', $filename);
218 218
         // Generate new name
Please login to merge, or discard this patch.
src/Traits/ResizableTrait.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
         $objects = [];
22 22
 
23 23
         foreach ($this::RESIZEABLES as $resizable) {
24
-            if (!property_exists($this, $resizable)) {
24
+            if ( ! property_exists($this, $resizable)) {
25 25
                 continue;
26 26
             }
27 27
 
Please login to merge, or discard this patch.