@@ -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); |
@@ -105,7 +105,7 @@ |
||
105 | 105 | return; |
106 | 106 | } |
107 | 107 | |
108 | - $attributeIsEmpty = function ($name) use ($user) { |
|
108 | + $attributeIsEmpty = function($name) use ($user) { |
|
109 | 109 | if ($user->hasAttribute($name)) { |
110 | 110 | $v = $user->getAttributeValue($name); |
111 | 111 |
@@ -96,7 +96,8 @@ |
||
96 | 96 | $passwordEncoder = $this->encoderFactory->getEncoder($mapping); |
97 | 97 | |
98 | 98 | if ($passwordEncoder->isPasswordValid($mapping->getPass(), $data['pass'], null)) { |
99 | - if ($passwordEncoder->needsRehash($mapping->getPass())) { // check to update hash to newer algo |
|
99 | + if ($passwordEncoder->needsRehash($mapping->getPass())) { |
|
100 | +// check to update hash to newer algo |
|
100 | 101 | $this->updatePassword($mapping, $data['pass']); |
101 | 102 | } |
102 | 103 |
@@ -68,7 +68,7 @@ |
||
68 | 68 | ->end() |
69 | 69 | ->arrayNode('antispam_question') |
70 | 70 | ->validate() |
71 | - ->ifTrue(static function ($v) { |
|
71 | + ->ifTrue(static function($v) { |
|
72 | 72 | return isset($v['question']) !== isset($v['answer']); |
73 | 73 | }) |
74 | 74 | ->thenInvalid('Antispam needs both question and answer.') |
@@ -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.') |