@@ -48,7 +48,7 @@ |
||
| 48 | 48 | } |
| 49 | 49 | $regId = $categoryAssignment->getCategoryRegistryId(); |
| 50 | 50 | $catId = $categoryAssignment->getCategory()->getId(); |
| 51 | - $hasAccess = $this->permissionApi->hasPermission('ZikulaCategoriesModule:PropertyId:CategoryId', "${regId}::${catId}", $permLevel); |
|
| 51 | + $hasAccess = $this->permissionApi->hasPermission('ZikulaCategoriesModule:PropertyId:CategoryId', "${regid}::${catid}", $permLevel); |
|
| 52 | 52 | if ($requireAccessForAll && !$hasAccess) { |
| 53 | 53 | return false; |
| 54 | 54 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | $resolver->setAllowedTypes('all', 'bool'); |
| 72 | 72 | |
| 73 | 73 | $options['translator'] = $this->translator; |
| 74 | - $resolver->setNormalizer('label', static function (Options $options, $label) { |
|
| 74 | + $resolver->setNormalizer('label', static function(Options $options, $label) { |
|
| 75 | 75 | if (null === $label || empty($label)) { |
| 76 | 76 | $isMultiple = $options['multiple']; |
| 77 | 77 | $translator = $options['translator']; |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | return $label; |
| 83 | 83 | }); |
| 84 | - $resolver->setNormalizer('placeholder', static function (Options $options, $placeholder) { |
|
| 84 | + $resolver->setNormalizer('placeholder', static function(Options $options, $placeholder) { |
|
| 85 | 85 | if (!$options['required']) { |
| 86 | 86 | if (null === $placeholder || empty($placeholder)) { |
| 87 | 87 | $isMultiple = $options['multiple']; |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | return $placeholder; |
| 95 | 95 | }); |
| 96 | - $resolver->setNormalizer('choices', function (Options $options, $choices) { |
|
| 96 | + $resolver->setNormalizer('choices', function(Options $options, $choices) { |
|
| 97 | 97 | if (empty($choices)) { |
| 98 | 98 | $choices = $this->getCategoryChoices($options); |
| 99 | 99 | } |
@@ -103,8 +103,8 @@ |
||
| 103 | 103 | { |
| 104 | 104 | $api = $this->getMockBuilder(PermissionApiInterface::class) |
| 105 | 105 | ->getMock(); |
| 106 | - $api->method('hasPermission')->willReturnCallback(static function ($component = null, $instance = null, $level = ACCESS_NONE, $user = null) { |
|
| 107 | - list(/* $regId */ , $catId) = explode('::', $instance); |
|
| 106 | + $api->method('hasPermission')->willReturnCallback(static function($component = null, $instance = null, $level = ACCESS_NONE, $user = null) { |
|
| 107 | + list(/* $regId */, $catId) = explode('::', $instance); |
|
| 108 | 108 | |
| 109 | 109 | return 0 === $catId % 2; |
| 110 | 110 | }); |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | #[\Attribute] |
| 19 | 19 | class UniqueNameForPosition extends Constraint |
| 20 | 20 | { |
| 21 | - public function getTargets(): string|array |
|
| 21 | + public function getTargets(): string | array |
|
| 22 | 22 | { |
| 23 | 23 | return self::CLASS_CONSTRAINT; |
| 24 | 24 | } |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | yield MenuItem::linktoRoute('Legal Docs', 'fas fa-gavel', 'zikulalegalbundle_user_index'); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - private function getMenuItem(string $title, string $defaultRoute, ?string $customUrl): RouteMenuItem|UrlMenuItem |
|
| 66 | + private function getMenuItem(string $title, string $defaultRoute, ?string $customUrl): RouteMenuItem | UrlMenuItem |
|
| 67 | 67 | { |
| 68 | 68 | if (null !== $customUrl && '' !== $customUrl) { |
| 69 | 69 | return MenuItem::linktoUrl($title, null, $customUrl); |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | 'icon' => 'fa-times', |
| 72 | 72 | ]) |
| 73 | 73 | ; |
| 74 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
| 74 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
| 75 | 75 | $supportedLocales = $this->localeApi->getSupportedLocales(); |
| 76 | 76 | $data = $event->getData(); |
| 77 | 77 | $labels = $data['labels']; |
@@ -110,7 +110,7 @@ |
||
| 110 | 110 | $imagine = new Imagine(); |
| 111 | 111 | $image = $imagine->open($avatarFilePath); |
| 112 | 112 | $image->resize(new Box($this->uploadConfig['max_width'], $this->uploadConfig['max_height'])) |
| 113 | - ->save($avatarFilePath); |
|
| 113 | + ->save($avatarFilePath); |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | chmod($avatarFilePath, 0644); |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | return $this->form->getData(); |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - public function formAdd(FormInterface|string|int $child, string $type = null, array $options = []): self |
|
| 44 | + public function formAdd(FormInterface | string | int $child, string $type = null, array $options = []): self |
|
| 45 | 45 | { |
| 46 | 46 | $this->form->add($child, $type, $options); |
| 47 | 47 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | 'placeholder' => 'Select', |
| 79 | 79 | ]); |
| 80 | 80 | |
| 81 | - $formModifier = function (FormInterface $form, $formType = null) use ($builder) { |
|
| 81 | + $formModifier = function(FormInterface $form, $formType = null) use ($builder) { |
|
| 82 | 82 | switch ($formType) { |
| 83 | 83 | case ChoiceType::class: |
| 84 | 84 | $optionsType = ChoiceFormOptionsArrayType::class; |
@@ -114,12 +114,12 @@ discard block |
||
| 114 | 114 | } |
| 115 | 115 | $form->add($formOptions->getForm()); |
| 116 | 116 | }; |
| 117 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, static function (FormEvent $event) use ($formModifier) { |
|
| 117 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, static function(FormEvent $event) use ($formModifier) { |
|
| 118 | 118 | $data = $event->getData(); |
| 119 | 119 | $formType = $data['formType']; |
| 120 | 120 | $formModifier($event->getForm(), $formType); |
| 121 | 121 | }); |
| 122 | - $builder->get('formType')->addEventListener(FormEvents::POST_SUBMIT, static function (FormEvent $event) use ($formModifier) { |
|
| 122 | + $builder->get('formType')->addEventListener(FormEvents::POST_SUBMIT, static function(FormEvent $event) use ($formModifier) { |
|
| 123 | 123 | $formType = $event->getForm()->getData(); |
| 124 | 124 | $formModifier($event->getForm()->getParent(), $formType); |
| 125 | 125 | }); |