@@ -15,6 +15,6 @@ |
||
| 15 | 15 | |
| 16 | 16 | require_once dirname(__DIR__) . '/vendor/autoload_runtime.php'; |
| 17 | 17 | |
| 18 | -return function (array $context) { |
|
| 18 | +return function(array $context) { |
|
| 19 | 19 | return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); |
| 20 | 20 | }; |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | { |
| 28 | 28 | $builder |
| 29 | 29 | ->add('users', EntityType::class, [ |
| 30 | - 'choice_attr' => static function () { |
|
| 30 | + 'choice_attr' => static function() { |
|
| 31 | 31 | return ['class' => 'user-checkboxes']; |
| 32 | 32 | }, |
| 33 | 33 | 'class' => User::class, |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | } |
| 67 | 67 | if (isset($date)) { |
| 68 | 68 | $date = \DateTime::createFromFormat('YmdHis', $date, new \DateTimeZone('UTC')); |
| 69 | - $users = $users->filter(function (User $user) use ($date) { |
|
| 69 | + $users = $users->filter(function(User $user) use ($date) { |
|
| 70 | 70 | return $user->getRegistrationDate() < $date; |
| 71 | 71 | }); |
| 72 | 72 | } |
@@ -200,7 +200,7 @@ |
||
| 200 | 200 | if ($this->mailLoggingEnabled) { |
| 201 | 201 | $this->mailLogger->info(sprintf('Email sent to %s', 'multiple users'), [ |
| 202 | 202 | 'in' => __METHOD__, |
| 203 | - 'users' => array_reduce($users, function ($result, User $user) { return $result . $user->getEmail() . ','; }, 'emails: ') |
|
| 203 | + 'users' => array_reduce($users, function($result, User $user) { return $result . $user->getEmail() . ','; }, 'emails: ') |
|
| 204 | 204 | ]); |
| 205 | 205 | } |
| 206 | 206 | |
@@ -55,8 +55,8 @@ |
||
| 55 | 55 | // the following process should be unnecessary because cascade = all but MySQL 5.7 not working with that (#3726) |
| 56 | 56 | $qb = $this->_em->createQueryBuilder(); |
| 57 | 57 | $qb->delete(UserAttribute::class, 'a') |
| 58 | - ->where('a.user = :userId') |
|
| 59 | - ->setParameter('userId', $user->getUid()); |
|
| 58 | + ->where('a.user = :userId') |
|
| 59 | + ->setParameter('userId', $user->getUid()); |
|
| 60 | 60 | $query = $qb->getQuery(); |
| 61 | 61 | $query->execute(); |
| 62 | 62 | // end of theoretically unrequired process |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | return $this->approvedDate; |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | - public function setApprovedDate(string|DateTimeInterface $approvedDate): self |
|
| 230 | + public function setApprovedDate(string | DateTimeInterface $approvedDate): self |
|
| 231 | 231 | { |
| 232 | 232 | if ($approvedDate instanceof DateTimeInterface) { |
| 233 | 233 | $this->approvedDate = $approvedDate; |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | return $this->registrationDate; |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | - public function setRegistrationDate(string|DateTimeInterface $registrationDate): self |
|
| 263 | + public function setRegistrationDate(string | DateTimeInterface $registrationDate): self |
|
| 264 | 264 | { |
| 265 | 265 | if ($registrationDate instanceof DateTimeInterface) { |
| 266 | 266 | $this->registrationDate = $registrationDate; |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | return $this->lastLogin; |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | - public function setLastLogin(string|DateTimeInterface $lastLogin): self |
|
| 279 | + public function setLastLogin(string | DateTimeInterface $lastLogin): self |
|
| 280 | 280 | { |
| 281 | 281 | if ($lastLogin instanceof DateTimeInterface) { |
| 282 | 282 | $this->lastLogin = $lastLogin; |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | ; |
| 73 | 73 | |
| 74 | 74 | $translator = $this->translator; |
| 75 | - $formModifier = function (FormInterface $form, string $bundleName = null) use ($translator) { |
|
| 75 | + $formModifier = function(FormInterface $form, string $bundleName = null) use ($translator) { |
|
| 76 | 76 | $entities = null === $bundleName ? [] : $this->categorizableBundleHelper->buildEntityChoiceListFor($bundleName); |
| 77 | 77 | $form->add('entityname', ChoiceType::class, [ |
| 78 | 78 | /** @Ignore */ |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | $builder->addEventListener( |
| 85 | 85 | FormEvents::PRE_SET_DATA, |
| 86 | - static function (FormEvent $event) use ($formModifier) { |
|
| 86 | + static function(FormEvent $event) use ($formModifier) { |
|
| 87 | 87 | /** @var CategoryRegistry $data */ |
| 88 | 88 | $data = $event->getData(); |
| 89 | 89 | $formModifier($event->getForm(), $data->getBundleName()); |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | $builder->get('bundleName')->addEventListener( |
| 94 | 94 | FormEvents::POST_SUBMIT, |
| 95 | - static function (FormEvent $event) use ($formModifier) { |
|
| 95 | + static function(FormEvent $event) use ($formModifier) { |
|
| 96 | 96 | $bundleName = $event->getForm()->getData(); |
| 97 | 97 | $formModifier($event->getForm()->getParent(), $bundleName); |
| 98 | 98 | } |
@@ -50,10 +50,10 @@ discard block |
||
| 50 | 50 | /** @var CategoryRegistry[] $registries */ |
| 51 | 51 | foreach ($registries as $registry) { |
| 52 | 52 | $baseCategory = $registry->getCategory(); |
| 53 | - $queryBuilderClosure = static function (CategoryRepositoryInterface $repo) use ($baseCategory, $options) { |
|
| 53 | + $queryBuilderClosure = static function(CategoryRepositoryInterface $repo) use ($baseCategory, $options) { |
|
| 54 | 54 | return $repo->getChildrenQueryBuilder($baseCategory, $options['direct']); |
| 55 | 55 | }; |
| 56 | - $choiceLabelClosure = static function (Category $category) use ($baseCategory, $locale) { |
|
| 56 | + $choiceLabelClosure = static function(Category $category) use ($baseCategory, $locale) { |
|
| 57 | 57 | $indent = str_repeat('--', $category->getLvl() - $baseCategory->getLvl() - 1); |
| 58 | 58 | |
| 59 | 59 | $categoryName = $category['displayName'][$locale] ?? $category['displayName']['en']; |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $resolver->setAllowedTypes('em', [ObjectManager::class, 'null']); |
| 122 | 122 | $resolver->setAllowedTypes('showRegistryLabels', 'bool'); |
| 123 | 123 | |
| 124 | - $resolver->addAllowedValues('entityCategoryClass', static function ($value) { |
|
| 124 | + $resolver->addAllowedValues('entityCategoryClass', static function($value) { |
|
| 125 | 125 | return is_subclass_of($value, AbstractCategoryAssignment::class); |
| 126 | 126 | }); |
| 127 | 127 | } |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | 'mapped' => false, |
| 108 | 108 | 'required' => false, |
| 109 | 109 | ]) |
| 110 | - ->addEventListener(FormEvents::PRE_SET_DATA, static function (FormEvent $event) use ($translator, $options) { |
|
| 110 | + ->addEventListener(FormEvents::PRE_SET_DATA, static function(FormEvent $event) use ($translator, $options) { |
|
| 111 | 111 | // ensure all display name and description exist for all locales |
| 112 | 112 | /** @var Category $category */ |
| 113 | 113 | $category = $event->getData(); |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | |
| 132 | 132 | $event->setData($category); |
| 133 | 133 | }) |
| 134 | - ->addEventListener(FormEvents::SUBMIT, static function (FormEvent $event) use ($translator, $options) { |
|
| 134 | + ->addEventListener(FormEvents::SUBMIT, static function(FormEvent $event) use ($translator, $options) { |
|
| 135 | 135 | // ensure all locales have a display name |
| 136 | 136 | /** @var Category $category */ |
| 137 | 137 | $category = $event->getData(); |
@@ -152,10 +152,10 @@ discard block |
||
| 152 | 152 | $builder->get('name') |
| 153 | 153 | ->addModelTransformer(new CallbackTransformer( |
| 154 | 154 | // remove slash from name before persistence to prevent issues with path |
| 155 | - static function ($string) { |
|
| 155 | + static function($string) { |
|
| 156 | 156 | return $string; |
| 157 | 157 | }, |
| 158 | - static function ($string) { |
|
| 158 | + static function($string) { |
|
| 159 | 159 | return str_replace('/', '/', $string); |
| 160 | 160 | } |
| 161 | 161 | )) |