@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | 'mapped' => false, |
| 111 | 111 | 'required' => false |
| 112 | 112 | ]) |
| 113 | - ->addEventListener(FormEvents::PRE_SET_DATA, static function (FormEvent $event) use ($translator, $options) { |
|
| 113 | + ->addEventListener(FormEvents::PRE_SET_DATA, static function(FormEvent $event) use ($translator, $options) { |
|
| 114 | 114 | // ensure all display name and description exist for all locales |
| 115 | 115 | /** @var CategoryEntity $category */ |
| 116 | 116 | $category = $event->getData(); |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | $event->setData($category); |
| 136 | 136 | }) |
| 137 | - ->addEventListener(FormEvents::SUBMIT, static function (FormEvent $event) use ($translator, $options) { |
|
| 137 | + ->addEventListener(FormEvents::SUBMIT, static function(FormEvent $event) use ($translator, $options) { |
|
| 138 | 138 | // ensure all locales have a display name |
| 139 | 139 | /** @var CategoryEntity $category */ |
| 140 | 140 | $category = $event->getData(); |
@@ -155,10 +155,10 @@ discard block |
||
| 155 | 155 | $builder->get('name') |
| 156 | 156 | ->addModelTransformer(new CallbackTransformer( |
| 157 | 157 | // remove slash from name before persistence to prevent issues with path |
| 158 | - static function ($string) { |
|
| 158 | + static function($string) { |
|
| 159 | 159 | return $string; |
| 160 | 160 | }, |
| 161 | - static function ($string) { |
|
| 161 | + static function($string) { |
|
| 162 | 162 | return str_replace('/', '/', $string); |
| 163 | 163 | } |
| 164 | 164 | )) |
@@ -71,10 +71,10 @@ discard block |
||
| 71 | 71 | /** @var CategoryRegistryEntity[] $registries */ |
| 72 | 72 | foreach ($registries as $registry) { |
| 73 | 73 | $baseCategory = $registry->getCategory(); |
| 74 | - $queryBuilderClosure = static function (CategoryRepository $repo) use ($baseCategory, $options) { |
|
| 74 | + $queryBuilderClosure = static function(CategoryRepository $repo) use ($baseCategory, $options) { |
|
| 75 | 75 | return $repo->getChildrenQueryBuilder($baseCategory, $options['direct']); |
| 76 | 76 | }; |
| 77 | - $choiceLabelClosure = static function (CategoryEntity $category) use ($baseCategory, $locale) { |
|
| 77 | + $choiceLabelClosure = static function(CategoryEntity $category) use ($baseCategory, $locale) { |
|
| 78 | 78 | $indent = str_repeat('--', $category->getLvl() - $baseCategory->getLvl() - 1); |
| 79 | 79 | |
| 80 | 80 | $categoryName = $category['displayName'][$locale] ?? $category['displayName']['en']; |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | $resolver->setAllowedTypes('em', [ObjectManager::class, 'null']); |
| 143 | 143 | $resolver->setAllowedTypes('showRegistryLabels', 'bool'); |
| 144 | 144 | |
| 145 | - $resolver->addAllowedValues('entityCategoryClass', static function ($value) { |
|
| 145 | + $resolver->addAllowedValues('entityCategoryClass', static function($value) { |
|
| 146 | 146 | return is_subclass_of($value, AbstractCategoryAssignment::class); |
| 147 | 147 | }); |
| 148 | 148 | } |
@@ -57,15 +57,15 @@ discard block |
||
| 57 | 57 | public function buildForm(FormBuilderInterface $builder, array $options) |
| 58 | 58 | { |
| 59 | 59 | $spaceReplaceCallbackTransformer = new CallbackTransformer( |
| 60 | - static function ($originalDescription) { |
|
| 60 | + static function($originalDescription) { |
|
| 61 | 61 | return $originalDescription; |
| 62 | 62 | }, |
| 63 | - static function ($submittedDescription) { |
|
| 63 | + static function($submittedDescription) { |
|
| 64 | 64 | return mb_ereg_replace(' ', '', $submittedDescription); |
| 65 | 65 | } |
| 66 | 66 | ); |
| 67 | 67 | $pageTitleLocalizationTransformer = new CallbackTransformer( |
| 68 | - function ($originalPageTitle) { |
|
| 68 | + function($originalPageTitle) { |
|
| 69 | 69 | $originalPageTitle = empty($originalPageTitle) ? '%pagetitle%' : $originalPageTitle; |
| 70 | 70 | $originalPageTitle = str_replace( |
| 71 | 71 | ['%pagetitle%', '%sitename%', '%modulename%'], |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | return $originalPageTitle; |
| 77 | 77 | }, |
| 78 | - function ($submittedPageTitle) { |
|
| 78 | + function($submittedPageTitle) { |
|
| 79 | 79 | $submittedPageTitle = str_replace( |
| 80 | 80 | [$this->trans('%pagetitle%'), $this->trans('%sitename%'), $this->trans('%modulename%')], |
| 81 | 81 | ['%pagetitle%', '%sitename%', '%modulename%'], |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | $builder->create('permasearch', TextType::class, [ |
| 138 | 138 | 'label' => 'List to search for', |
| 139 | 139 | 'constraints' => new Callback([ |
| 140 | - 'callback' => function ($data, ExecutionContextInterface $context) { |
|
| 140 | + 'callback' => function($data, ExecutionContextInterface $context) { |
|
| 141 | 141 | if (mb_ereg(',$', $data)) { |
| 142 | 142 | $context->addViolation($this->trans('Error! In your permalink settings, strings cannot be terminated with a comma.')); |
| 143 | 143 | } |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | { |
| 84 | 84 | $resolver->setDefaults([ |
| 85 | 85 | 'includeReset' => false, |
| 86 | - 'constraints' => new Callback(['callback' => static function ($data, ExecutionContextInterface $context) { |
|
| 86 | + 'constraints' => new Callback(['callback' => static function($data, ExecutionContextInterface $context) { |
|
| 87 | 87 | if (!isset($data['pass']) && empty($data['uname']) && empty($data['email'])) { |
| 88 | 88 | $context |
| 89 | 89 | ->buildViolation('Error! You must enter either your username or email address.') |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | /** |
| 143 | 143 | * Form Listeners |
| 144 | 144 | */ |
| 145 | - ->addEventListener(FormEvents::POST_SUBMIT, static function (FormEvent $event) { |
|
| 145 | + ->addEventListener(FormEvents::POST_SUBMIT, static function(FormEvent $event) { |
|
| 146 | 146 | $data = $event->getData(); |
| 147 | 147 | // clear anti-spam answer if there is no question |
| 148 | 148 | if (empty($data[ZAuthConstant::MODVAR_REGISTRATION_ANTISPAM_QUESTION])) { |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | $resolver->setDefaults([ |
| 164 | 164 | 'constraints' => [ |
| 165 | 165 | new Callback([ |
| 166 | - 'callback' => static function ($data, ExecutionContextInterface $context) { |
|
| 166 | + 'callback' => static function($data, ExecutionContextInterface $context) { |
|
| 167 | 167 | if (!empty($data[ZAuthConstant::MODVAR_REGISTRATION_ANTISPAM_QUESTION]) && empty($data[ZAuthConstant::MODVAR_REGISTRATION_ANTISPAM_ANSWER])) { |
| 168 | 168 | $context |
| 169 | 169 | ->buildViolation('If a spam protection question is provided, then a spam protection answer must also be provided.') |
@@ -76,10 +76,10 @@ |
||
| 76 | 76 | [ |
| 77 | 77 | 'decorate' => true, |
| 78 | 78 | 'html' => true, |
| 79 | - 'childOpen' => function ($node) { |
|
| 79 | + 'childOpen' => function($node) { |
|
| 80 | 80 | return '<li class="jstree-open" id="' . $this->domTreeNodePrefix . $node['id'] . '">'; |
| 81 | 81 | }, |
| 82 | - 'nodeDecorator' => static function ($node) { |
|
| 82 | + 'nodeDecorator' => static function($node) { |
|
| 83 | 83 | return '<a href="#">' . $node['title'] . ' (' . $node['id'] . ')</a>'; |
| 84 | 84 | } |
| 85 | 85 | ] |
@@ -49,10 +49,10 @@ |
||
| 49 | 49 | ; |
| 50 | 50 | $builder->get('options') |
| 51 | 51 | ->addModelTransformer(new CallbackTransformer( |
| 52 | - static function ($text) { |
|
| 52 | + static function($text) { |
|
| 53 | 53 | return $text; |
| 54 | 54 | }, |
| 55 | - static function ($text) { |
|
| 55 | + static function($text) { |
|
| 56 | 56 | if (empty($text)) { |
| 57 | 57 | return '{}'; |
| 58 | 58 | } |
@@ -35,10 +35,10 @@ |
||
| 35 | 35 | ; |
| 36 | 36 | $builder->get('content') |
| 37 | 37 | ->addModelTransformer(new CallbackTransformer( |
| 38 | - static function ($originalDescription) { |
|
| 38 | + static function($originalDescription) { |
|
| 39 | 39 | return $originalDescription; |
| 40 | 40 | }, |
| 41 | - static function ($submittedDescription) { |
|
| 41 | + static function($submittedDescription) { |
|
| 42 | 42 | // remove all HTML tags |
| 43 | 43 | return strip_tags($submittedDescription); |
| 44 | 44 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $lifetimeInSeconds, |
| 38 | 38 | $kernel->getCacheDir() . '/assets/' . $type |
| 39 | 39 | ); |
| 40 | - $cachedFile = $cacheService->get($key, function () { |
|
| 40 | + $cachedFile = $cacheService->get($key, function() { |
|
| 41 | 41 | throw new \Exception('Combined Assets not found'); |
| 42 | 42 | }); |
| 43 | 43 | |