@@ -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', |
@@ -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)) { |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $ext = $file->guessExtension(); |
44 | 44 | $basename = pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME); |
45 | 45 | $filename = "$basename.$ext"; |
46 | - $i=0; |
|
46 | + $i = 0; |
|
47 | 47 | while ($fs->exists($this->getRealPath($moveToDir, $filename))) { |
48 | 48 | $i++; |
49 | 49 | $filename = "$basename.$i.$ext"; |
@@ -79,9 +79,9 @@ discard block |
||
79 | 79 | |
80 | 80 | // Validation passed, remove old file first (in case we don't have permission to do it) |
81 | 81 | if ($currentFile) { |
82 | - try{ |
|
82 | + try { |
|
83 | 83 | $this->unlinkFile(new File($currentFile)); |
84 | - }catch(FileNotFoundException $e){} |
|
84 | + } catch (FileNotFoundException $e) {} |
|
85 | 85 | } |
86 | 86 | // Old file removed, let's update! |
87 | 87 | $moveToDir = sprintf('%s/%s', $this->rootPath, $entity->getDir()); |
@@ -81,7 +81,7 @@ |
||
81 | 81 | if ($currentFile) { |
82 | 82 | try{ |
83 | 83 | $this->unlinkFile(new File($currentFile)); |
84 | - }catch(FileNotFoundException $e){} |
|
84 | + } catch(FileNotFoundException $e){} |
|
85 | 85 | } |
86 | 86 | // Old file removed, let's update! |
87 | 87 | $moveToDir = sprintf('%s/%s', $this->rootPath, $entity->getDir()); |
@@ -29,7 +29,7 @@ |
||
29 | 29 | try { |
30 | 30 | $repo = $this->em->getRepository(Form::class); |
31 | 31 | $forms = $repo->findAll(); |
32 | - } catch(\Exception $exception) { |
|
32 | + } catch (\Exception $exception) { |
|
33 | 33 | $this->dispatcher->dispatch( |
34 | 34 | self::FORM_CACHE_EVENT_NAME, |
35 | 35 | new CommandNotifyEvent(sprintf('<error>Could not clear form cache: %s</error>', $exception->getMessage())) |