@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * @param CacheManager $imagineCacheManager |
28 | 28 | * @param FormViewFactory $formViewFactory |
29 | 29 | */ |
30 | - public function __construct( |
|
30 | + public function __construct ( |
|
31 | 31 | NormalizerInterface $decorated, |
32 | 32 | string $projectDir, |
33 | 33 | CacheManager $imagineCacheManager, |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * @param string|null $format |
49 | 49 | * @return bool |
50 | 50 | */ |
51 | - public function supportsNormalization($data, $format = null): bool |
|
51 | + public function supportsNormalization ($data, $format = null): bool |
|
52 | 52 | { |
53 | 53 | return $this->decorated->supportsNormalization($data, $format); |
54 | 54 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * @throws \Symfony\Component\Serializer\Exception\InvalidArgumentException |
63 | 63 | * @throws \Symfony\Component\Serializer\Exception\CircularReferenceException |
64 | 64 | */ |
65 | - public function normalize($object, $format = null, array $context = []) |
|
65 | + public function normalize ($object, $format = null, array $context = []) |
|
66 | 66 | { |
67 | 67 | $data = $this->decorated->normalize($object, $format, $context); |
68 | 68 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * @param FileInterface $object |
81 | 81 | * @return array |
82 | 82 | */ |
83 | - private function getFileData(FileInterface $object) |
|
83 | + private function getFileData (FileInterface $object) |
|
84 | 84 | { |
85 | 85 | $data = []; |
86 | 86 | $originalFilePath = $object->getFilePath(); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | * @param string|null $format |
113 | 113 | * @return bool |
114 | 114 | */ |
115 | - public function supportsDenormalization($data, $type, $format = null): bool |
|
115 | + public function supportsDenormalization ($data, $type, $format = null): bool |
|
116 | 116 | { |
117 | 117 | return $this->decorated->supportsDenormalization($data, $type, $format); |
118 | 118 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | * @throws \Symfony\Component\Serializer\Exception\BadMethodCallException |
132 | 132 | * @throws \InvalidArgumentException |
133 | 133 | */ |
134 | - public function denormalize($data, $class, $format = null, array $context = []) |
|
134 | + public function denormalize ($data, $class, $format = null, array $context = []) |
|
135 | 135 | { |
136 | 136 | $context['allow_extra_attributes'] = $class === Form::class; |
137 | 137 | $entity = $this->decorated->denormalize($data, $class, $format, $context); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | /** |
148 | 148 | * @param SerializerInterface $serializer |
149 | 149 | */ |
150 | - public function setSerializer(SerializerInterface $serializer) |
|
150 | + public function setSerializer (SerializerInterface $serializer) |
|
151 | 151 | { |
152 | 152 | if ($this->decorated instanceof SerializerAwareInterface) { |
153 | 153 | $this->decorated->setSerializer($serializer); |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | * @param null|string $filePath |
159 | 159 | * @return null|string |
160 | 160 | */ |
161 | - private function getRealFilePath(?string $filePath): ?string |
|
161 | + private function getRealFilePath (?string $filePath): ?string |
|
162 | 162 | { |
163 | 163 | if (!$filePath || trim($filePath) === '') { |
164 | 164 | return null; |
@@ -172,15 +172,15 @@ discard block |
||
172 | 172 | * @param string $filePath |
173 | 173 | * @return bool |
174 | 174 | */ |
175 | - public function isImagineSupportedFile(?string $filePath): bool |
|
175 | + public function isImagineSupportedFile (?string $filePath): bool |
|
176 | 176 | { |
177 | 177 | $filePath = $this->getRealFilePath($filePath); |
178 | 178 | if (!$filePath) { |
179 | 179 | return false; |
180 | 180 | } |
181 | - try{ |
|
181 | + try { |
|
182 | 182 | $imageType = \exif_imagetype($filePath); |
183 | - }catch(\Exception $e) { |
|
183 | + } catch (\Exception $e) { |
|
184 | 184 | return false; |
185 | 185 | } |
186 | 186 | return \in_array($imageType, [IMAGETYPE_JPEG, IMAGETYPE_JPEG2000, IMAGETYPE_PNG, IMAGETYPE_GIF], true); |
@@ -180,7 +180,7 @@ |
||
180 | 180 | } |
181 | 181 | try{ |
182 | 182 | $imageType = \exif_imagetype($filePath); |
183 | - }catch(\Exception $e) { |
|
183 | + } catch(\Exception $e) { |
|
184 | 184 | return false; |
185 | 185 | } |
186 | 186 | return \in_array($imageType, [IMAGETYPE_JPEG, IMAGETYPE_JPEG2000, IMAGETYPE_PNG, IMAGETYPE_GIF], true); |