@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | if ($fs->isAbsolutePath($tmp_base_path)) { |
75 | 75 | $this->base_path = $tmp_base_path; |
76 | 76 | } else { |
77 | - $this->base_path = realpath($kernel->getProjectDir() . DIRECTORY_SEPARATOR . $tmp_base_path); |
|
77 | + $this->base_path = realpath($kernel->getProjectDir().DIRECTORY_SEPARATOR.$tmp_base_path); |
|
78 | 78 | } |
79 | 79 | |
80 | - $this->footprints_path = realpath($kernel->getProjectDir() . "/public/img/footprints"); |
|
80 | + $this->footprints_path = realpath($kernel->getProjectDir()."/public/img/footprints"); |
|
81 | 81 | //TODO |
82 | 82 | $this->footprints_3d_path = "TODO"; |
83 | 83 | } |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | |
224 | 224 | $sz = 'BKMGTP'; |
225 | 225 | $factor = (int) floor((strlen($bytes) - 1) / 3); |
226 | - return sprintf("%.{$decimals}f", $bytes / 1024 ** $factor) . @$sz[$factor]; |
|
226 | + return sprintf("%.{$decimals}f", $bytes / 1024 ** $factor).@$sz[$factor]; |
|
227 | 227 | } |
228 | 228 | |
229 | 229 | /** |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | MeasurementUnitAttachment::class => 'measurement_unit', StorelocationAttachment::class => 'storelocation', |
241 | 241 | SupplierAttachment::class => 'supplier', UserAttachment::class => 'user']; |
242 | 242 | |
243 | - $path = $this->base_path . DIRECTORY_SEPARATOR . $mapping[get_class($attachment)] . DIRECTORY_SEPARATOR . $attachment->getElement()->getID(); |
|
243 | + $path = $this->base_path.DIRECTORY_SEPARATOR.$mapping[get_class($attachment)].DIRECTORY_SEPARATOR.$attachment->getElement()->getID(); |
|
244 | 244 | return $path; |
245 | 245 | } |
246 | 246 | |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | |
262 | 262 | //Sanatize filename |
263 | 263 | $originalFilename = pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME); |
264 | - $newFilename = $attachment->getName() . '-' . uniqid('', false) . '.' . $file->guessExtension(); |
|
264 | + $newFilename = $attachment->getName().'-'.uniqid('', false).'.'.$file->guessExtension(); |
|
265 | 265 | |
266 | 266 | //Move our temporay attachment to its final location |
267 | 267 | $file_path = $file->move($folder, $newFilename)->getRealPath(); |