Completed
Pull Request — master (#129)
by jelmer
133:59 queued 130:38
created
src/SumoCoders/FrameworkCoreBundle/ValueObject/AbstractFile.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function getAbsolutePath()
55 55
     {
56
-        return $this->fileName === null ? null : $this->getUploadRootDir() . '/' . $this->fileName;
56
+        return $this->fileName === null ? null : $this->getUploadRootDir().'/'.$this->fileName;
57 57
     }
58 58
 
59 59
     /**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     {
64 64
         $file = $this->getAbsolutePath();
65 65
         if (is_file($file) && file_exists($file)) {
66
-            return '/' . $this->getUploadDir() . '/' . $this->path;
66
+            return '/'.$this->getUploadDir().'/'.$this->path;
67 67
         }
68 68
 
69 69
         return '';
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     protected function getUploadRootDir()
76 76
     {
77 77
         // the absolute directory path where uploaded documents should be saved
78
-        return __DIR__ . '/../../../../web/' . $this->getTrimmedUploadDir();
78
+        return __DIR__.'/../../../../web/'.$this->getTrimmedUploadDir();
79 79
     }
80 80
 
81 81
     /**
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 
151 151
         // do whatever you want to generate a unique name
152 152
         $filename = sha1(uniqid(mt_rand(), true));
153
-        $this->fileName = $filename . '.' . $this->getFile()->guessExtension();
153
+        $this->fileName = $filename.'.'.$this->getFile()->guessExtension();
154 154
     }
155 155
 
156 156
     /**
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         // check if we have an old image
168 168
         if ($this->oldFileName !== null) {
169 169
             // delete the old image
170
-            $oldFile = $this->getUploadRootDir() . '/' . $this->oldFileName;
170
+            $oldFile = $this->getUploadRootDir().'/'.$this->oldFileName;
171 171
             if (is_file($oldFile) && file_exists($oldFile)) {
172 172
                 unlink($oldFile);
173 173
             }
Please login to merge, or discard this patch.