@@ -21,7 +21,7 @@ |
||
21 | 21 | private FormFactoryInterface $formFactory, |
22 | 22 | private TokenStorageInterface $tokenStorage, |
23 | 23 | private AuthorizationCheckerInterface $checker, |
24 | - $configurationGroups = []) |
|
24 | + $configurationGroups = []) |
|
25 | 25 | { |
26 | 26 | foreach ($configurationGroups as $group) { |
27 | 27 | $this->groups[$group->getNameSpace()] = $group; |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $groups = []; |
43 | 43 | |
44 | 44 | foreach ($this->groups as $key => $group) { |
45 | - $groups[str_replace($username . '.', '', $key)] = $group; |
|
45 | + $groups[str_replace($username.'.', '', $key)] = $group; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | return $groups; |
@@ -77,8 +77,8 @@ discard block |
||
77 | 77 | * @var BaseConfig $configuration |
78 | 78 | */ |
79 | 79 | foreach ($configurations as $configuration) { |
80 | - $key = str_replace($username . '.', '', $configuration->getId()); |
|
81 | - $key = str_replace($groupKey . '.', '', $key); |
|
80 | + $key = str_replace($username.'.', '', $configuration->getId()); |
|
81 | + $key = str_replace($groupKey.'.', '', $key); |
|
82 | 82 | |
83 | 83 | if (str_contains($configuration->getId(), $username)) { |
84 | 84 | $results[$key] = $configuration->getValue(); |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | foreach ($configurations as $configuration) { |
109 | 109 | $value = $configuration->getValue(); |
110 | 110 | |
111 | - if (str_contains($configuration->getId(), $username . $key)) { |
|
111 | + if (str_contains($configuration->getId(), $username.$key)) { |
|
112 | 112 | break; |
113 | 113 | } |
114 | 114 | } |
@@ -182,12 +182,12 @@ discard block |
||
182 | 182 | $formData = $form->getData(); |
183 | 183 | |
184 | 184 | foreach ($formData as $k => $val) { |
185 | - $checkBoxKey = $k . 'Preference'; |
|
185 | + $checkBoxKey = $k.'Preference'; |
|
186 | 186 | |
187 | 187 | if (array_key_exists($checkBoxKey, $formData)) { |
188 | 188 | if ($formData[$checkBoxKey]) { |
189 | 189 | unset($formData[$k]); |
190 | - $this->repository->removeByKey($key . '.' . $k); |
|
190 | + $this->repository->removeByKey($key.'.'.$k); |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | unset($types[$checkBoxKey]); |
@@ -227,10 +227,10 @@ discard block |
||
227 | 227 | |
228 | 228 | if (str_contains($configuration->getId(), $username)) { |
229 | 229 | $values[$key] = $configuration->getValue(); |
230 | - $values[$key . 'Preference'] = false; |
|
230 | + $values[$key.'Preference'] = false; |
|
231 | 231 | } elseif (!array_key_exists($key, $values)) { |
232 | 232 | $values[$key] = $configuration->getValue(); |
233 | - $values[$key . 'Preference'] = true; |
|
233 | + $values[$key.'Preference'] = true; |
|
234 | 234 | } |
235 | 235 | } |
236 | 236 | |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | $key = str_replace("{$username}.", '', $key); |
255 | 255 | |
256 | 256 | if (!$isGlobal) { |
257 | - $key = $username . '.' . $key; |
|
257 | + $key = $username.'.'.$key; |
|
258 | 258 | } |
259 | 259 | |
260 | 260 | $result = $this->repository->getConfigurationValue($key); |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | |
354 | 354 | private function filterValueByRole(array $configValues): array |
355 | 355 | { |
356 | - return array_values(array_filter($configValues, function ($config) { |
|
356 | + return array_values(array_filter($configValues, function($config) { |
|
357 | 357 | return !isset($config['role']) || $this->checker->isGranted($config['role']); |
358 | 358 | })); |
359 | 359 | } |