@@ -52,7 +52,7 @@ |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | [$this->width, $this->height] = getimagesize($filePath); |
| 55 | - $this->imagineKey= $imagineKey; |
|
| 55 | + $this->imagineKey = $imagineKey; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | { |
| 44 | 44 | $metadata->addPropertyConstraints( |
| 45 | 45 | 'filePath', |
| 46 | - [ new Assert\Image() ] // new Assert\NotBlank(), |
|
| 46 | + [new Assert\Image()] // new Assert\NotBlank(), |
|
| 47 | 47 | ); |
| 48 | 48 | $metadata->addPropertyConstraint( |
| 49 | 49 | 'title', |
@@ -41,11 +41,11 @@ |
||
| 41 | 41 | |
| 42 | 42 | $ext = $file->guessExtension(); |
| 43 | 43 | $basename = pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME); |
| 44 | - $filename = $basename.'.'.$ext; |
|
| 45 | - $i=0; |
|
| 44 | + $filename = $basename . '.' . $ext; |
|
| 45 | + $i = 0; |
|
| 46 | 46 | while ($fs->exists($this->getRealPath($moveToDir, $filename))) { |
| 47 | 47 | $i++; |
| 48 | - $filename = $basename.".$i.$ext"; |
|
| 48 | + $filename = $basename . ".$i.$ext"; |
|
| 49 | 49 | } |
| 50 | 50 | return $filename; |
| 51 | 51 | } |
@@ -141,7 +141,7 @@ |
||
| 141 | 141 | $objectId = $this->iriConverter->getIriFromItem($object); |
| 142 | 142 | $data['file:publicPath'] = $this->router->generate( |
| 143 | 143 | 'files_upload', |
| 144 | - [ 'field' => 'filePath', 'id' => $objectId ] |
|
| 144 | + ['field' => 'filePath', 'id' => $objectId] |
|
| 145 | 145 | ); |
| 146 | 146 | // $this->getPublicPath($filePath); |
| 147 | 147 | if (\exif_imagetype($filePath)) { |