@@ -78,7 +78,7 @@ |
||
78 | 78 | } |
79 | 79 | |
80 | 80 | $mapping = new AuthenticationMappingEntity(); |
81 | - $mapping->setUid((int) $user['uid']); |
|
81 | + $mapping->setUid((int)$user['uid']); |
|
82 | 82 | $mapping->setUname($user['uname']); |
83 | 83 | $mapping->setEmail($user['email']); |
84 | 84 | $mapping->setVerifiedEmail(true); |
@@ -152,7 +152,7 @@ |
||
152 | 152 | $templateParameters['all'] = 'csv' === $request->getRequestFormat() ? 1 : $request->query->getInt('all'); |
153 | 153 | $showOnlyOwnEntriesSetting = (bool)$request->query->getInt( |
154 | 154 | 'own', |
155 | - (int) $this->variableApi->get('ZikulaRoutesModule', 'showOnlyOwnEntries') |
|
155 | + (int)$this->variableApi->get('ZikulaRoutesModule', 'showOnlyOwnEntries') |
|
156 | 156 | ); |
157 | 157 | $showOnlyOwnEntriesSetting = $showOnlyOwnEntriesSetting ? 1 : 0; |
158 | 158 | $templateParameters['own'] = $showOnlyOwnEntriesSetting; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | echo "case 0"; |
72 | 72 | default: |
73 | 73 | } |
74 | -EOF |
|
74 | +eof |
|
75 | 75 | ]; |
76 | 76 | |
77 | 77 | // #2 switch with two cases, second with break |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | break; |
99 | 99 | default: |
100 | 100 | } |
101 | -EOF |
|
101 | +eof |
|
102 | 102 | ]; |
103 | 103 | |
104 | 104 | // #3 switch with two cases (second with break) and default |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | default: |
127 | 127 | echo "default case"; |
128 | 128 | } |
129 | -EOF |
|
129 | +eof |
|
130 | 130 | ]; |
131 | 131 | |
132 | 132 | // #4 switch with two cases (first without body, second with break) and default |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | default: |
154 | 154 | echo "default case"; |
155 | 155 | } |
156 | -EOF |
|
156 | +eof |
|
157 | 157 | ]; |
158 | 158 | |
159 | 159 | return $tests; |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $this->userRepo |
77 | 77 | ->method('findByUids') |
78 | 78 | ->with($this->anything()) |
79 | - ->willReturnCallback(function (array $uids) { |
|
79 | + ->willReturnCallback(function(array $uids) { |
|
80 | 80 | $groups = new ArrayCollection(); |
81 | 81 | // getGroups returns [gid => $group, gid => $group, ...] |
82 | 82 | if (in_array(self::RANDOM_USER_ID, $uids, true)) { |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $this->currentUserApi |
145 | 145 | ->method('get') |
146 | 146 | ->with($this->equalTo('uid')) |
147 | - ->willReturnCallback(static function () use ($userId) { |
|
147 | + ->willReturnCallback(static function() use ($userId) { |
|
148 | 148 | return $userId ?? Constant::USER_ID_ANONYMOUS; |
149 | 149 | }); |
150 | 150 | $api = new PermissionApi($this->permRepo, $this->userRepo, $this->currentUserApi, $this->translator); |
@@ -73,7 +73,7 @@ |
||
73 | 73 | ->addViolation() |
74 | 74 | ; |
75 | 75 | } else { |
76 | - $granted = $this->permissionApi->hasPermission('.*', '.*', ACCESS_ADMIN, (int) $user['uid']); |
|
76 | + $granted = $this->permissionApi->hasPermission('.*', '.*', ACCESS_ADMIN, (int)$user['uid']); |
|
77 | 77 | if (!$granted) { |
78 | 78 | $this->context |
79 | 79 | ->buildViolation($this->trans('Error! You logged in to an account without Admin permissions')) |
@@ -49,7 +49,7 @@ |
||
49 | 49 | $this->setSystemVar('updateversion', ZikulaKernel::VERSION); |
50 | 50 | $this->setSystemVar('secure_domain'); |
51 | 51 | $this->setSystemVar('signcookies', 1); |
52 | - $this->setSystemVar('signingkey', sha1((string) (random_int(0, time())))); |
|
52 | + $this->setSystemVar('signingkey', sha1((string)(random_int(0, time())))); |
|
53 | 53 | $this->setSystemVar('seclevel', 'Medium'); |
54 | 54 | $this->setSystemVar('secmeddays', 7); |
55 | 55 | $this->setSystemVar('secinactivemins', 20); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | if ($route->getTranslatable()) { |
73 | 73 | $languages = $container->get(LocaleApi::class)->getSupportedLocales(); |
74 | 74 | // TODO migrate this legacy call |
75 | - $isRequiredLangParam = true;//ZLanguage::isRequiredLangParam(); |
|
75 | + $isRequiredLangParam = true; //ZLanguage::isRequiredLangParam(); |
|
76 | 76 | if (!$isRequiredLangParam) { |
77 | 77 | $defaultLanguage = $this->variableApi->getSystemVar('language_i18n'); |
78 | 78 | unset($languages[array_search($defaultLanguage, $languages, true)]); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | ->getPathWithBundlePrefix($route) |
89 | 89 | ); |
90 | 90 | |
91 | - $path = preg_replace_callback('#%(.*?)%#', static function ($matches) use ($container) { |
|
91 | + $path = preg_replace_callback('#%(.*?)%#', static function($matches) use ($container) { |
|
92 | 92 | return '<abbr title="' . htmlspecialchars($matches[0]) . '">' |
93 | 93 | . htmlspecialchars($container->getParameter($matches[1])) |
94 | 94 | . '</abbr>' |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | |
98 | 98 | $defaults = $route->getDefaults(); |
99 | 99 | $requirements = $route->getRequirements(); |
100 | - $path = preg_replace_callback('#{(.*?)}#', function ($matches) use ($defaults, $requirements) { |
|
100 | + $path = preg_replace_callback('#{(.*?)}#', function($matches) use ($defaults, $requirements) { |
|
101 | 101 | $title = ''; |
102 | 102 | if (isset($defaults[$matches[1]])) { |
103 | 103 | $title .= $this->trans('Default: %value%', ['%value%' => htmlspecialchars($defaults[$matches[1]])]); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | 'placeholder' => 'Select' |
92 | 92 | ]); |
93 | 93 | |
94 | - $formModifier = function (FormInterface $form, $formType = null) use ($builder) { |
|
94 | + $formModifier = function(FormInterface $form, $formType = null) use ($builder) { |
|
95 | 95 | switch ($formType) { |
96 | 96 | case ChoiceType::class: |
97 | 97 | $optionsType = ChoiceFormOptionsArrayType::class; |
@@ -127,12 +127,12 @@ discard block |
||
127 | 127 | } |
128 | 128 | $form->add($formOptions->getForm()); |
129 | 129 | }; |
130 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, static function (FormEvent $event) use ($formModifier) { |
|
130 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, static function(FormEvent $event) use ($formModifier) { |
|
131 | 131 | $data = $event->getData(); |
132 | 132 | $formType = $data['formType']; |
133 | 133 | $formModifier($event->getForm(), $formType); |
134 | 134 | }); |
135 | - $builder->get('formType')->addEventListener(FormEvents::POST_SUBMIT, static function (FormEvent $event) use ($formModifier) { |
|
135 | + $builder->get('formType')->addEventListener(FormEvents::POST_SUBMIT, static function(FormEvent $event) use ($formModifier) { |
|
136 | 136 | $formType = $event->getForm()->getData(); |
137 | 137 | $formModifier($event->getForm()->getParent(), $formType); |
138 | 138 | }); |