@@ -28,10 +28,10 @@ discard block |
||
28 | 28 | |
29 | 29 | foreach ($config['file_types'] as $fileType => $fileTypeConfig) { |
30 | 30 | $container->setDefinition( |
31 | - 'cms_kernel_bengor_file.http_action.' . $fileType . '_upload', |
|
31 | + 'cms_kernel_bengor_file.http_action.'.$fileType.'_upload', |
|
32 | 32 | (new Definition( |
33 | 33 | AjaxFileUploadAction::class, [ |
34 | - $container->getDefinition('bengor_file.' . $fileType . '.command_bus'), |
|
34 | + $container->getDefinition('bengor_file.'.$fileType.'.command_bus'), |
|
35 | 35 | ] |
36 | 36 | )) |
37 | 37 | ); |
@@ -39,10 +39,10 @@ discard block |
||
39 | 39 | |
40 | 40 | foreach ($config['file_types'] as $fileType => $fileTypeConfig) { |
41 | 41 | $container->setDefinition( |
42 | - 'cms_kernel_bengor_file.http_action.' . $fileType . '_gallery', |
|
42 | + 'cms_kernel_bengor_file.http_action.'.$fileType.'_gallery', |
|
43 | 43 | (new Definition( |
44 | 44 | AjaxFileGalleryAction::class, [ |
45 | - $container->getDefinition('bengor.file.application.query.all_' . $fileType . 's'), |
|
45 | + $container->getDefinition('bengor.file.application.query.all_'.$fileType.'s'), |
|
46 | 46 | ] |
47 | 47 | )) |
48 | 48 | ); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | new Route( |
32 | 32 | $config['path'], |
33 | 33 | [ |
34 | - '_controller' => 'cms_kernel_bengor_file.http_action.' . $file . '_gallery:__invoke', |
|
34 | + '_controller' => 'cms_kernel_bengor_file.http_action.'.$file.'_gallery:__invoke', |
|
35 | 35 | ], |
36 | 36 | [], |
37 | 37 | [], |
@@ -31,7 +31,7 @@ |
||
31 | 31 | new Route( |
32 | 32 | $config['path'], |
33 | 33 | [ |
34 | - '_controller' => 'cms_kernel_bengor_file.http_action.' . $file . '_upload:__invoke', |
|
34 | + '_controller' => 'cms_kernel_bengor_file.http_action.'.$file.'_upload:__invoke', |
|
35 | 35 | ], |
36 | 36 | [], |
37 | 37 | [], |
@@ -23,7 +23,7 @@ |
||
23 | 23 | if (null === $order || '' === $order) { |
24 | 24 | throw new EmptyMenuNameException(); |
25 | 25 | } |
26 | - $this->order = (int)$order; |
|
26 | + $this->order = (int) $order; |
|
27 | 27 | |
28 | 28 | if ($this->order < 1) { |
29 | 29 | throw new InvalidMenuItemOrderException(); |
@@ -27,10 +27,10 @@ |
||
27 | 27 | $builder |
28 | 28 | ->add('date_picker', HiddenType::class) |
29 | 29 | ->addModelTransformer(new CallbackTransformer( |
30 | - function ($value) { |
|
30 | + function($value) { |
|
31 | 31 | return ['date_picker' => $value]; |
32 | 32 | }, |
33 | - function ($value) { |
|
33 | + function($value) { |
|
34 | 34 | return $value['date_picker']; |
35 | 35 | } |
36 | 36 | )); |
@@ -47,10 +47,10 @@ discard block |
||
47 | 47 | $builder |
48 | 48 | ->add('file', HiddenType::class) |
49 | 49 | ->addModelTransformer(new CallbackTransformer( |
50 | - function ($value) { |
|
50 | + function($value) { |
|
51 | 51 | return ['file' => $value]; |
52 | 52 | }, |
53 | - function ($value) { |
|
53 | + function($value) { |
|
54 | 54 | return $value['file']; |
55 | 55 | } |
56 | 56 | )); |
@@ -118,8 +118,8 @@ discard block |
||
118 | 118 | |
119 | 119 | if (!isset($this->configuration[$this->fileType($options)]['class'])) { |
120 | 120 | throw new LogicException( |
121 | - 'All the fallback are invalid. You can pass "entry_file" as option form, ' . |
|
122 | - 'or you use implicit name of the form property, or also, you can pass ' . |
|
121 | + 'All the fallback are invalid. You can pass "entry_file" as option form, '. |
|
122 | + 'or you use implicit name of the form property, or also, you can pass '. |
|
123 | 123 | 'explicitly the "mime_types" form options' |
124 | 124 | ); |
125 | 125 | } |
@@ -145,8 +145,8 @@ discard block |
||
145 | 145 | |
146 | 146 | if (!isset($this->configuration[$this->implicitFileType])) { |
147 | 147 | throw new LogicException( |
148 | - 'All the fallback are invalid. You can pass "entry_file" as option form, ' . |
|
149 | - 'or you use implicit name of the form property, or also, you can pass ' . |
|
148 | + 'All the fallback are invalid. You can pass "entry_file" as option form, '. |
|
149 | + 'or you use implicit name of the form property, or also, you can pass '. |
|
150 | 150 | 'explicitly the "upload_endpoint" and "gallery_endpoint" form options' |
151 | 151 | ); |
152 | 152 | } |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | |
171 | 171 | private function setQueryHandlers(array $queryHandlers) |
172 | 172 | { |
173 | - $this->queryHandlers = array_map(function (FileOfIdHandler $fileOfIdHandler) { |
|
173 | + $this->queryHandlers = array_map(function(FileOfIdHandler $fileOfIdHandler) { |
|
174 | 174 | return $fileOfIdHandler; |
175 | 175 | }, $queryHandlers); |
176 | 176 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | private function getFilePreviewPath($filename, array $options) |
179 | 179 | { |
180 | 180 | return $this->urlGenerator->generate( |
181 | - 'bengor_file_' . $this->fileType($options) . '_download', |
|
181 | + 'bengor_file_'.$this->fileType($options).'_download', |
|
182 | 182 | [ |
183 | 183 | 'filename' => $filename, |
184 | 184 | ] |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $builder |
41 | 41 | ->add('tree', HiddenType::class) |
42 | 42 | ->addModelTransformer(new CallbackTransformer( |
43 | - function ($value) use ($locale, $menuId) { |
|
43 | + function($value) use ($locale, $menuId) { |
|
44 | 44 | if (null === $menuId) { |
45 | 45 | return ['tree' => []]; |
46 | 46 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | return ['tree' => json_encode($menu['tree'])]; |
61 | 61 | }, |
62 | - function ($value) { |
|
62 | + function($value) { |
|
63 | 63 | return $value['tree'] ? json_decode($value['tree'], true) : []; |
64 | 64 | } |
65 | 65 | )); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | |
28 | 28 | public function onKernelRequest(GetResponseEvent $event) |
29 | 29 | { |
30 | - if(!$event->isMasterRequest()) { |
|
30 | + if (!$event->isMasterRequest()) { |
|
31 | 31 | return; |
32 | 32 | } |
33 | 33 |