@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $resolver->setDefaults([ |
54 | 54 | 'constraints' => new Valid(), |
55 | 55 | 'required' => false, |
56 | - 'validation_groups' => function (FormInterface $form) use ($validationGroups) { |
|
56 | + 'validation_groups' => function(FormInterface $form) use ($validationGroups) { |
|
57 | 57 | return $validationGroups; |
58 | 58 | }, |
59 | 59 | 'compound' => true, |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | 'allow_delete' => true, |
187 | 187 | 'prototype' => true, |
188 | 188 | 'constraints' => [new Callback([ |
189 | - 'callback' => function ($images, ExecutionContextInterface $context) { |
|
189 | + 'callback' => function($images, ExecutionContextInterface $context) { |
|
190 | 190 | $selectedAttributes = []; |
191 | 191 | foreach ($images as $valueSet) { |
192 | 192 | if (!empty($valueSet['value'])) { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $resolver->setRequired(self::OPTION_GROUP_CHOICES); |
69 | 69 | |
70 | 70 | $resolver->setDefaults([ |
71 | - 'validation_groups' => function (FormInterface $form) { |
|
71 | + 'validation_groups' => function(FormInterface $form) { |
|
72 | 72 | $defaultData = $form->getConfig()->getData(); |
73 | 73 | $submittedData = $form->getData(); |
74 | 74 | |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | protected function createUniqueEmailConstraint() |
224 | 224 | { |
225 | 225 | return new Callback([ |
226 | - 'callback' => function ($email, ExecutionContextInterface $contextInterface) { |
|
226 | + 'callback' => function($email, ExecutionContextInterface $contextInterface) { |
|
227 | 227 | if ($this->getFacade()->hasUserByUsername($email)) { |
228 | 228 | $contextInterface->addViolation('User with email "{{ username }}" already exists.', [ |
229 | 229 | '{{ username }}' => $email, |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $resolver->setDefaults([ |
57 | 57 | self::OPTION_IS_UPDATE => false, |
58 | 58 | 'required' => false, |
59 | - 'validation_groups' => function (FormInterface $form) { |
|
59 | + 'validation_groups' => function(FormInterface $form) { |
|
60 | 60 | $groups = [Constraint::DEFAULT_GROUP]; |
61 | 61 | $originalData = $form->getConfig()->getData(); |
62 | 62 | $submittedData = $form->getData(); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | 'digits, numbers, underscores ("_"), hyphens ("-") and colons (":").', |
125 | 125 | ]), |
126 | 126 | new Callback([ |
127 | - 'callback' => function ($key, ExecutionContextInterface $context) { |
|
127 | + 'callback' => function($key, ExecutionContextInterface $context) { |
|
128 | 128 | $keyCount = $this->getFactory()->getProductAttributeQueryContainer() |
129 | 129 | ->queryProductAttributeKeyByKeys([$key]) |
130 | 130 | ->count(); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | public function configureOptions(OptionsResolver $resolver) |
51 | 51 | { |
52 | 52 | $resolver->setDefaults([ |
53 | - 'validation_groups' => function (FormInterface $form) { |
|
53 | + 'validation_groups' => function(FormInterface $form) { |
|
54 | 54 | $defaultData = $form->getConfig()->getData(); |
55 | 55 | |
56 | 56 | if (!isset($defaultData[static::FIELD_FK_GLOSSARY_MAPPING])) { |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | ]; |
192 | 192 | |
193 | 193 | $placeholderConstraints[] = new Callback([ |
194 | - 'callback' => function ($placeholder, ExecutionContextInterface $context) { |
|
194 | + 'callback' => function($placeholder, ExecutionContextInterface $context) { |
|
195 | 195 | $formData = $context->getRoot()->getViewData(); |
196 | 196 | if ($this->getFactory()->getCmsFacade()->hasPagePlaceholderMapping($formData[static::FIELD_FK_PAGE], $placeholder)) { |
197 | 197 | $context->addViolation('Placeholder has already mapped.'); |
@@ -125,7 +125,7 @@ |
||
125 | 125 | } |
126 | 126 | |
127 | 127 | $constraints[] = new Callback([ |
128 | - 'callback' => function ($name, ExecutionContextInterface $context) use ($customerGroupQuery) { |
|
128 | + 'callback' => function($name, ExecutionContextInterface $context) use ($customerGroupQuery) { |
|
129 | 129 | if ($customerGroupQuery->findByName($name)->count() > 0) { |
130 | 130 | $context->addViolation('Name is already used'); |
131 | 131 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $resolver->setRequired(self::OPTION_LOCALES); |
125 | 125 | |
126 | 126 | $resolver->setDefaults([ |
127 | - 'validation_groups' => function (FormInterface $form) { |
|
127 | + 'validation_groups' => function(FormInterface $form) { |
|
128 | 128 | $defaultData = (array)$form->getConfig()->getData(); |
129 | 129 | $submittedData = $form->getData(); |
130 | 130 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $constraints = $this->getFieldDefaultConstraints(); |
160 | 160 | |
161 | 161 | $constraints[] = new Callback([ |
162 | - 'callback' => function ($glossaryKey, ExecutionContextInterface $contextInterface) { |
|
162 | + 'callback' => function($glossaryKey, ExecutionContextInterface $contextInterface) { |
|
163 | 163 | if ($this->getFacade()->hasKey($glossaryKey)) { |
164 | 164 | $contextInterface->addViolation('Translation key already exists.'); |
165 | 165 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $resolver->setRequired(self::OPTION_ROLE_CHOICES); |
44 | 44 | |
45 | 45 | $resolver->setDefaults([ |
46 | - 'validation_groups' => function (FormInterface $form) { |
|
46 | + 'validation_groups' => function(FormInterface $form) { |
|
47 | 47 | $defaultData = $form->getConfig()->getData(); |
48 | 48 | $submittedData = $form->getData(); |
49 | 49 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | 'constraints' => [ |
96 | 96 | new NotBlank(), |
97 | 97 | new Callback([ |
98 | - 'callback' => function ($name, ExecutionContextInterface $contextInterface) { |
|
98 | + 'callback' => function($name, ExecutionContextInterface $contextInterface) { |
|
99 | 99 | if ($this->getQueryContainer()->queryGroupByName($name)->count() > 0) { |
100 | 100 | $contextInterface->addViolation('Group name already in use'); |
101 | 101 | } |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | $customerQuery = $this->getQueryContainer()->queryCustomers(); |
302 | 302 | |
303 | 303 | $emailConstraints[] = new Callback([ |
304 | - 'callback' => function ($email, ExecutionContextInterface $context) use ($customerQuery) { |
|
304 | + 'callback' => function($email, ExecutionContextInterface $context) use ($customerQuery) { |
|
305 | 305 | if ($customerQuery->findByEmail($email)->count() > 0) { |
306 | 306 | $context->addViolation('Email is already used'); |
307 | 307 | } |
@@ -329,12 +329,12 @@ discard block |
||
329 | 329 | protected function createDateTimeModelTransformer() |
330 | 330 | { |
331 | 331 | return new CallbackTransformer( |
332 | - function ($dateAsString) { |
|
332 | + function($dateAsString) { |
|
333 | 333 | if ($dateAsString !== null) { |
334 | 334 | return new DateTime($dateAsString); |
335 | 335 | } |
336 | 336 | }, |
337 | - function ($dateAsObject) { |
|
337 | + function($dateAsObject) { |
|
338 | 338 | return $dateAsObject; |
339 | 339 | } |
340 | 340 | ); |
@@ -346,12 +346,12 @@ discard block |
||
346 | 346 | protected function createLocaleModelTransformer() |
347 | 347 | { |
348 | 348 | return new CallbackTransformer( |
349 | - function ($localeAsObject) { |
|
349 | + function($localeAsObject) { |
|
350 | 350 | if ($localeAsObject !== null) { |
351 | 351 | return $localeAsObject->getIdLocale(); |
352 | 352 | } |
353 | 353 | }, |
354 | - function ($localeAsInt) { |
|
354 | + function($localeAsInt) { |
|
355 | 355 | if ($localeAsInt !== null) { |
356 | 356 | return $this->getFactory()->getLocaleFacadePublic()->getLocaleById($localeAsInt); |
357 | 357 | } |
@@ -73,7 +73,7 @@ |
||
73 | 73 | protected function createBirthdayConstraint() |
74 | 74 | { |
75 | 75 | return new Callback([ |
76 | - 'callback' => function ($date, ExecutionContextInterface $context) { |
|
76 | + 'callback' => function($date, ExecutionContextInterface $context) { |
|
77 | 77 | if (strtotime($date) > strtotime(self::MIN_BIRTHDAY_DATE_STRING)) { |
78 | 78 | $context->addViolation('checkout.step.payment.must_be_older_than_18_years'); |
79 | 79 | } |