@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | return $fields; |
| 305 | 305 | } |
| 306 | 306 | |
| 307 | - return array_filter($fields, function ($value, $key) use ($element) { |
|
| 307 | + return array_filter($fields, function($value, $key) use ($element) { |
|
| 308 | 308 | //Associative array (save changed data) case |
| 309 | 309 | if (is_string($key)) { |
| 310 | 310 | return $this->shouldFieldBeSaved($element, $key); |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | |
| 333 | 333 | //Restrict length of string fields, to save memory... |
| 334 | 334 | $old_data = array_map( |
| 335 | - static function ($value) { |
|
| 335 | + static function($value) { |
|
| 336 | 336 | if (is_string($value)) { |
| 337 | 337 | return mb_strimwidth($value, 0, self::MAX_STRING_LENGTH, '...'); |
| 338 | 338 | } |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | { |
| 70 | 70 | $resolver->setDefaults([ |
| 71 | 71 | 'measurement_unit' => null, |
| 72 | - 'show_prefix' => static function (Options $options) { |
|
| 72 | + 'show_prefix' => static function(Options $options) { |
|
| 73 | 73 | if (null !== $options['measurement_unit']) { |
| 74 | 74 | /** @var MeasurementUnit $unit */ |
| 75 | 75 | $unit = $options['measurement_unit']; |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | return false; |
| 81 | 81 | }, |
| 82 | - 'is_integer' => static function (Options $options) { |
|
| 82 | + 'is_integer' => static function(Options $options) { |
|
| 83 | 83 | if (null !== $options['measurement_unit']) { |
| 84 | 84 | /** @var MeasurementUnit $unit */ |
| 85 | 85 | $unit = $options['measurement_unit']; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | return false; |
| 91 | 91 | }, |
| 92 | - 'unit' => static function (Options $options) { |
|
| 92 | + 'unit' => static function(Options $options) { |
|
| 93 | 93 | if (null !== $options['measurement_unit']) { |
| 94 | 94 | /** @var MeasurementUnit $unit */ |
| 95 | 95 | $unit = $options['measurement_unit']; |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $resolver->setDefaults([ |
| 112 | 112 | 'min' => 0, |
| 113 | 113 | 'max' => '', |
| 114 | - 'step' => static function (Options $options) { |
|
| 114 | + 'step' => static function(Options $options) { |
|
| 115 | 115 | if (true === $options['is_integer']) { |
| 116 | 116 | return 1; |
| 117 | 117 | } |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | |
| 64 | 64 | public function buildForm(FormBuilderInterface $builder, array $options): void |
| 65 | 65 | { |
| 66 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, static function (FormEvent $event): void { |
|
| 66 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, static function(FormEvent $event): void { |
|
| 67 | 67 | $form = $event->getForm(); |
| 68 | 68 | /** @var User $user */ |
| 69 | 69 | $user = $event->getData(); |
@@ -76,10 +76,10 @@ |
||
| 76 | 76 | |
| 77 | 77 | //Normalize data before writing it to database |
| 78 | 78 | $builder->get('filetype_filter')->addViewTransformer(new CallbackTransformer( |
| 79 | - static function ($value) { |
|
| 79 | + static function($value) { |
|
| 80 | 80 | return $value; |
| 81 | 81 | }, |
| 82 | - function ($value) { |
|
| 82 | + function($value) { |
|
| 83 | 83 | return $this->filterTools->normalizeFilterString($value); |
| 84 | 84 | } |
| 85 | 85 | )); |
@@ -88,13 +88,13 @@ |
||
| 88 | 88 | { |
| 89 | 89 | parent::configureOptions($resolver); |
| 90 | 90 | |
| 91 | - $resolver->setDefault('group_name', static function (Options $options) { |
|
| 91 | + $resolver->setDefault('group_name', static function(Options $options) { |
|
| 92 | 92 | return trim($options['name']); |
| 93 | 93 | }); |
| 94 | 94 | |
| 95 | 95 | $resolver->setDefault('inherit', false); |
| 96 | 96 | |
| 97 | - $resolver->setDefault('label', function (Options $options) { |
|
| 97 | + $resolver->setDefault('label', function(Options $options) { |
|
| 98 | 98 | if (!empty($this->perm_structure['groups'][$options['group_name']]['label'])) { |
| 99 | 99 | return $this->perm_structure['groups'][$options['group_name']]['label']; |
| 100 | 100 | } |
@@ -66,11 +66,11 @@ discard block |
||
| 66 | 66 | { |
| 67 | 67 | parent::configureOptions($resolver); |
| 68 | 68 | |
| 69 | - $resolver->setDefault('perm_name', static function (Options $options) { |
|
| 69 | + $resolver->setDefault('perm_name', static function(Options $options) { |
|
| 70 | 70 | return $options['name']; |
| 71 | 71 | }); |
| 72 | 72 | |
| 73 | - $resolver->setDefault('label', function (Options $options) { |
|
| 73 | + $resolver->setDefault('label', function(Options $options) { |
|
| 74 | 74 | if (!empty($this->perm_structure['perms'][$options['perm_name']]['label'])) { |
| 75 | 75 | return $this->perm_structure['perms'][$options['perm_name']]['label']; |
| 76 | 76 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | return $options['name']; |
| 79 | 79 | }); |
| 80 | 80 | |
| 81 | - $resolver->setDefault('multi_checkbox', static function (Options $options) { |
|
| 81 | + $resolver->setDefault('multi_checkbox', static function(Options $options) { |
|
| 82 | 82 | return !$options['disabled']; |
| 83 | 83 | }); |
| 84 | 84 | |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | 'label_options.barcode_type.code93' => 'code93', |
| 84 | 84 | 'label_options.barcode_type.datamatrix' => 'datamatrix', |
| 85 | 85 | ], |
| 86 | - 'group_by' => static function ($choice, $key, $value) { |
|
| 86 | + 'group_by' => static function($choice, $key, $value) { |
|
| 87 | 87 | if (in_array($choice, ['qr', 'datamatrix'], true)) { |
| 88 | 88 | return 'label_options.barcode_type.2D'; |
| 89 | 89 | } |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | ], |
| 170 | 170 | ]); |
| 171 | 171 | |
| 172 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event): void { |
|
| 172 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event): void { |
|
| 173 | 173 | $form = $event->getForm(); |
| 174 | 174 | $attachment = $form->getData(); |
| 175 | 175 | |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | //Check the secure file checkbox, if file is in securefile location |
| 188 | 188 | $builder->get('secureFile')->addEventListener( |
| 189 | 189 | FormEvents::PRE_SET_DATA, |
| 190 | - static function (FormEvent $event): void { |
|
| 190 | + static function(FormEvent $event): void { |
|
| 191 | 191 | $attachment = $event->getForm()->getParent()->getData(); |
| 192 | 192 | if ($attachment instanceof Attachment) { |
| 193 | 193 | $event->setData($attachment->isSecure()); |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | |
| 52 | 52 | $client->request('GET', $url); |
| 53 | 53 | |
| 54 | - $this->assertTrue($client->getResponse()->isSuccessful(), 'Request not successful. Status code is '.$client->getResponse()->getStatusCode() . ' for URL '.$url); |
|
| 54 | + $this->assertTrue($client->getResponse()->isSuccessful(), 'Request not successful. Status code is '.$client->getResponse()->getStatusCode().' for URL '.$url); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | public function urlProvider(): ?Generator |