@@ -70,8 +70,8 @@ |
||
70 | 70 | switch ($oldVersion) { |
71 | 71 | case '2.3.2': |
72 | 72 | case '2.4.0': |
73 | - $this->setVar('mailwarning', (bool) $this->getVar('mailwarning')); |
|
74 | - $this->setVar('hideclosed', (bool) $this->getVar('hideclosed')); |
|
73 | + $this->setVar('mailwarning', (bool)$this->getVar('mailwarning')); |
|
74 | + $this->setVar('hideclosed', (bool)$this->getVar('hideclosed')); |
|
75 | 75 | $this->setVar('hidePrivate', false); |
76 | 76 | case '2.4.1': |
77 | 77 | /** @var UserEntity $anonymousUser */ |
@@ -383,7 +383,7 @@ |
||
383 | 383 | |
384 | 384 | /** |
385 | 385 | * get the category display name |
386 | - * @param $lang |
|
386 | + * @param string $lang |
|
387 | 387 | * |
388 | 388 | * @return array|string the category display name(s) |
389 | 389 | */ |
@@ -69,6 +69,6 @@ |
||
69 | 69 | ->andWhere(Criteria::expr()->gt('lastused', $since)); |
70 | 70 | $online = $this->sessionRepository->matching($c)->count(); |
71 | 71 | |
72 | - return (bool) $online; |
|
72 | + return (bool)$online; |
|
73 | 73 | } |
74 | 74 | } |
@@ -292,7 +292,7 @@ |
||
292 | 292 | $routeParams = $this->request->get('_route_params', []); |
293 | 293 | if (empty($this->idValue)) { |
294 | 294 | if (array_key_exists($this->idField, $routeParams)) { |
295 | - $this->idValue = (int) !empty($routeParams[$this->idField]) ? $routeParams[$this->idField] : 0; |
|
295 | + $this->idValue = (int)!empty($routeParams[$this->idField]) ? $routeParams[$this->idField] : 0; |
|
296 | 296 | } |
297 | 297 | if (0 === $this->idValue) { |
298 | 298 | $this->idValue = $this->request->query->getInt($this->idField, 0); |
@@ -34,7 +34,7 @@ |
||
34 | 34 | parent::__construct($kernel); |
35 | 35 | |
36 | 36 | $this->setName('Zikula'); |
37 | - $this->setVersion(ZikulaKernel::VERSION.' - '.$kernel->getName().'/'.$kernel->getEnvironment().($kernel->isDebug() ? '/debug' : '')); |
|
37 | + $this->setVersion(ZikulaKernel::VERSION . ' - ' . $kernel->getName() . '/' . $kernel->getEnvironment() . ($kernel->isDebug() ? '/debug' : '')); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | protected function registerCommands() |
@@ -84,7 +84,7 @@ |
||
84 | 84 | $resolver->setDefaults([ |
85 | 85 | 'translator' => null, |
86 | 86 | 'includeReset' => false, |
87 | - 'constraints' => new Callback(['callback' => function ($data, ExecutionContextInterface $context) use ($resolver) { |
|
87 | + 'constraints' => new Callback(['callback' => function($data, ExecutionContextInterface $context) use ($resolver) { |
|
88 | 88 | if (!isset($data['pass']) && empty($data['uname']) && empty($data['email'])) { |
89 | 89 | $context->buildViolation('Error! You must enter either your username or email address.') |
90 | 90 | ->addViolation(); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | /** |
133 | 133 | * Form Listeners |
134 | 134 | */ |
135 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
135 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
136 | 136 | $data = $event->getData(); |
137 | 137 | // clear anti-spam answer if there is no question |
138 | 138 | if (empty($data[ZAuthConstant::MODVAR_REGISTRATION_ANTISPAM_QUESTION])) { |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | 'translator' => null, |
161 | 161 | 'constraints' => [ |
162 | 162 | new Callback([ |
163 | - 'callback' => function ($data, ExecutionContextInterface $context) { |
|
163 | + 'callback' => function($data, ExecutionContextInterface $context) { |
|
164 | 164 | if (!empty($data[ZAuthConstant::MODVAR_REGISTRATION_ANTISPAM_QUESTION]) && empty($data[ZAuthConstant::MODVAR_REGISTRATION_ANTISPAM_ANSWER])) { |
165 | 165 | $context->buildViolation('If a spam protection question is provided, then a spam protection answer must also be provided.') |
166 | 166 | ->atPath(ZAuthConstant::MODVAR_REGISTRATION_ANTISPAM_ANSWER) |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | ]) |
75 | 75 | ; |
76 | 76 | |
77 | - $formModifier = function (FormInterface $form, $modName = null) use ($options) { |
|
77 | + $formModifier = function(FormInterface $form, $modName = null) use ($options) { |
|
78 | 78 | $entities = null === $modName ? [] : $this->entitySelectionBuilder->buildFor($modName); |
79 | 79 | $form->add('entityname', ChoiceType::class, [ |
80 | 80 | 'label' => $options['translator']->__('Entity'), |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | $builder->addEventListener( |
87 | 87 | FormEvents::PRE_SET_DATA, |
88 | - function (FormEvent $event) use ($formModifier) { |
|
88 | + function(FormEvent $event) use ($formModifier) { |
|
89 | 89 | /** @var CategoryRegistryEntity $data */ |
90 | 90 | $data = $event->getData(); |
91 | 91 | $formModifier($event->getForm(), $data->getModname()); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | |
95 | 95 | $builder->get('modname')->addEventListener( |
96 | 96 | FormEvents::POST_SUBMIT, |
97 | - function (FormEvent $event) use ($formModifier) { |
|
97 | + function(FormEvent $event) use ($formModifier) { |
|
98 | 98 | $modName = $event->getForm()->getData(); |
99 | 99 | $formModifier($event->getForm()->getParent(), $modName); |
100 | 100 | } |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | } |
209 | 209 | |
210 | 210 | // does the user have admin permissions on the provider module? |
211 | - if (!$this->get('zikula_permissions_module.api.permission')->hasPermission($hookproviders[$i]['name']."::", '::', ACCESS_ADMIN)) { |
|
211 | + if (!$this->get('zikula_permissions_module.api.permission')->hasPermission($hookproviders[$i]['name'] . "::", '::', ACCESS_ADMIN)) { |
|
212 | 212 | unset($hookproviders[$i]); |
213 | 213 | continue; |
214 | 214 | } |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | if (!$this->get('kernel')->isBundle($subscriber)) { |
286 | 286 | throw new \RuntimeException($this->get('translator.default')->__f('Subscriber module "%s" is not available.', $subscriber)); |
287 | 287 | } |
288 | - if (!$this->get('zikula_permissions_module.api.permission')->hasPermission($subscriber.'::', '::', ACCESS_ADMIN)) { |
|
288 | + if (!$this->get('zikula_permissions_module.api.permission')->hasPermission($subscriber . '::', '::', ACCESS_ADMIN)) { |
|
289 | 289 | throw new AccessDeniedException(); |
290 | 290 | } |
291 | 291 | |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | if (!$this->get('kernel')->isBundle($provider)) { |
304 | 304 | throw new \RuntimeException($this->get('translator.default')->__f('Provider module "%s" is not available.', $provider)); |
305 | 305 | } |
306 | - if (!$this->get('zikula_permissions_module.api.permission')->hasPermission($provider.'::', '::', ACCESS_ADMIN)) { |
|
306 | + if (!$this->get('zikula_permissions_module.api.permission')->hasPermission($provider . '::', '::', ACCESS_ADMIN)) { |
|
307 | 307 | throw new AccessDeniedException(); |
308 | 308 | } |
309 | 309 | |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | if (!$this->get('kernel')->isBundle($subscriber)) { |
367 | 367 | throw new \RuntimeException($this->get('translator.default')->__f('Subscriber module "%s" is not available.', $subscriber)); |
368 | 368 | } |
369 | - if (!$this->get('zikula_permissions_module.api.permission')->hasPermission($subscriber.'::', '::', ACCESS_ADMIN)) { |
|
369 | + if (!$this->get('zikula_permissions_module.api.permission')->hasPermission($subscriber . '::', '::', ACCESS_ADMIN)) { |
|
370 | 370 | throw new AccessDeniedException(); |
371 | 371 | } |
372 | 372 | |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | private function isCapable($moduleName, $type) |
411 | 411 | { |
412 | 412 | $nonPersisted = $this->get('zikula_hook_bundle.collector.hook_collector')->isCapable($moduleName, $type); |
413 | - $persisted = $this->get('zikula_extensions_module.api.capability')->isCapable($moduleName, $type) ? true : false; |
|
413 | + $persisted = $this->get('zikula_extensions_module.api.capability')->isCapable($moduleName, $type) ? true : false; |
|
414 | 414 | |
415 | 415 | return $nonPersisted || $persisted; |
416 | 416 | } |