@@ -51,7 +51,7 @@ |
||
51 | 51 | protected function voteOnUser($attribute, $subject, User $user): bool |
52 | 52 | { |
53 | 53 | if ($subject instanceof Group) { |
54 | - return $this->resolver->inherit($user,'groups', $attribute) ?? false; |
|
54 | + return $this->resolver->inherit($user, 'groups', $attribute) ?? false; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | return false; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | { |
58 | 58 | $resolver->setDefaults([ |
59 | 59 | 'show_legend' => true, |
60 | - 'constraints' => function (Options $options) { |
|
60 | + 'constraints' => function(Options $options) { |
|
61 | 61 | if (!$options['disabled']) { |
62 | 62 | return [new NoLockout()]; |
63 | 63 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $groups = $this->perm_structure['groups']; |
79 | 79 | |
80 | 80 | foreach ($groups as $key => $group) { |
81 | - $builder->add($key,PermissionGroupType::class, [ |
|
81 | + $builder->add($key, PermissionGroupType::class, [ |
|
82 | 82 | 'group_name' => $key, |
83 | 83 | 'mapped' => false, |
84 | 84 | 'data' => $builder->getData(), |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | public function getTests() |
87 | 87 | { |
88 | 88 | return [ |
89 | - new TwigTest('instanceof', function ($var, $instance) { |
|
89 | + new TwigTest('instanceof', function($var, $instance) { |
|
90 | 90 | return $var instanceof $instance; |
91 | 91 | } ) |
92 | 92 | ]; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public function loginPath(string $path) : string |
114 | 114 | { |
115 | - $parts = explode("/" ,$path); |
|
115 | + $parts = explode("/", $path); |
|
116 | 116 | //Remove the part with |
117 | 117 | unset($parts[1]); |
118 | 118 | return implode("/", $parts); |
@@ -52,12 +52,12 @@ |
||
52 | 52 | //Check if a user has set a preferred language setting: |
53 | 53 | $user = $this->getUser(); |
54 | 54 | if ($user instanceof User) { |
55 | - if(!empty($user->getLanguage())) { |
|
55 | + if (!empty($user->getLanguage())) { |
|
56 | 56 | $locale = $user->getLanguage(); |
57 | 57 | } |
58 | 58 | } |
59 | 59 | |
60 | - $new_url = str_replace($request->getPathInfo(), '/' . $locale . $request->getPathInfo(), $request->getUri()); |
|
60 | + $new_url = str_replace($request->getPathInfo(), '/'.$locale.$request->getPathInfo(), $request->getUri()); |
|
61 | 61 | |
62 | 62 | return $this->redirect($new_url); |
63 | 63 | } |