Completed
Push — master ( e97208...a84460 )
by
unknown
05:59 queued 10s
created
src/SumoCoders/FrameworkCoreBundle/ValueObject/AbstractFile.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,14 +54,14 @@  discard block
 block discarded – undo
54 54
 
55 55
     public function getAbsolutePath(): ?string
56 56
     {
57
-        return $this->fileName === null ? null : $this->getUploadRootDir() . '/' . $this->fileName;
57
+        return $this->fileName === null ? null : $this->getUploadRootDir().'/'.$this->fileName;
58 58
     }
59 59
 
60 60
     public function getWebPath(): string
61 61
     {
62 62
         $file = $this->getAbsolutePath();
63 63
         if (is_file($file) && file_exists($file)) {
64
-            return '/files/' . $this->getUploadDir() . '/' . $this->fileName;
64
+            return '/files/'.$this->getUploadDir().'/'.$this->fileName;
65 65
         }
66 66
 
67 67
         return '';
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     protected function getUploadRootDir(): string
71 71
     {
72 72
         // the absolute directory path where uploaded documents should be saved
73
-        return __DIR__ . '/../../../../web/files/' . $this->getTrimmedUploadDir();
73
+        return __DIR__.'/../../../../web/files/'.$this->getTrimmedUploadDir();
74 74
     }
75 75
 
76 76
     protected function getTrimmedUploadDir(): string
@@ -144,9 +144,9 @@  discard block
 block discarded – undo
144 144
         // do whatever you want to generate a unique name
145 145
         $filename = sha1(uniqid(mt_rand(), true));
146 146
         if ($this->namePrefix !== null) {
147
-            $filename = Urlizer::urlize($this->namePrefix) . '_' . $filename;
147
+            $filename = Urlizer::urlize($this->namePrefix).'_'.$filename;
148 148
         }
149
-        $this->fileName = $filename . '.' . $this->getFile()->guessExtension();
149
+        $this->fileName = $filename.'.'.$this->getFile()->guessExtension();
150 150
     }
151 151
 
152 152
     /**
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     protected function removeOldFile(): void
177 177
     {
178 178
         // delete the old file
179
-        $oldFile = $this->getUploadRootDir() . '/' . $this->oldFileName;
179
+        $oldFile = $this->getUploadRootDir().'/'.$this->oldFileName;
180 180
         if (is_file($oldFile) && file_exists($oldFile)) {
181 181
             unlink($oldFile);
182 182
         }
Please login to merge, or discard this patch.