Completed
Pull Request — master (#129)
by jelmer
05:04
created
src/SumoCoders/FrameworkCoreBundle/Entity/AbstractImage.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     {
101 101
         return $this->path === null
102 102
             ? null
103
-            : $this->getUploadRootDir() . '/' . $this->path;
103
+            : $this->getUploadRootDir().'/'.$this->path;
104 104
     }
105 105
 
106 106
     /**
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     {
111 111
         $file = $this->getAbsolutePath();
112 112
         if (is_file($file) && file_exists($file)) {
113
-            return '/' . $this->getUploadDir() . '/' . $this->path;
113
+            return '/'.$this->getUploadDir().'/'.$this->path;
114 114
         }
115 115
 
116 116
         return static::FALLBACK_IMAGE;
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     {
124 124
         // the absolute directory path where uploaded
125 125
         // documents should be saved
126
-        return __DIR__ . '/../../../../web/' . $this->getUploadDir();
126
+        return __DIR__.'/../../../../web/'.$this->getUploadDir();
127 127
     }
128 128
 
129 129
     /**
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         if ($this->getFile() !== null) {
173 173
             // do whatever you want to generate a unique name
174 174
             $filename = sha1(uniqid(mt_rand(), true));
175
-            $this->path = $filename . '.' . $this->getFile()->guessExtension();
175
+            $this->path = $filename.'.'.$this->getFile()->guessExtension();
176 176
         }
177 177
     }
178 178
 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         // check if we have an old image
195 195
         if (isset($this->oldPath)) {
196 196
             // delete the old image
197
-            $oldFile = $this->getUploadRootDir() . '/' . $this->oldPath;
197
+            $oldFile = $this->getUploadRootDir().'/'.$this->oldPath;
198 198
             if (is_file($oldFile) && file_exists($oldFile)) {
199 199
                 unlink($oldFile);
200 200
             }
Please login to merge, or discard this patch.