Passed
Push — master ( 74fb21...56dbc9 )
by Jan
04:18
created
src/Form/Type/TriStateCheckboxType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             return "indeterminate";
128 128
         }
129 129
 
130
-        throw new \InvalidArgumentException('Invalid value encountered!: ' . $value);
130
+        throw new \InvalidArgumentException('Invalid value encountered!: '.$value);
131 131
     }
132 132
 
133 133
     /**
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
             case "indeterminate":
169 169
                 return null;
170 170
             default:
171
-                throw new \InvalidArgumentException('Invalid value encountered!: ' . $value);
171
+                throw new \InvalidArgumentException('Invalid value encountered!: '.$value);
172 172
         }
173 173
     }
174 174
 }
175 175
\ No newline at end of file
Please login to merge, or discard this patch.
src/Services/TranslationExtractor/PermissionExtractor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             foreach ($this->permission_structure['groups'] as $group) {
65 65
                 if (isset($group['label'])) {
66 66
                     $catalogue->add([
67
-                        $group['label'] => '__' . $group['label']
67
+                        $group['label'] => '__'.$group['label']
68 68
                     ]);
69 69
                 }
70 70
             }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             foreach ($this->permission_structure['perms'] as $perm) {
74 74
                 if (isset($perm['label'])) {
75 75
                     $catalogue->add([
76
-                        $perm['label'] => '__' . $perm['label']
76
+                        $perm['label'] => '__'.$perm['label']
77 77
                     ]);
78 78
                 }
79 79
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
                 foreach ($perm['operations'] as $op) {
82 82
                     if (isset($op['label'])) {
83 83
                         $catalogue->add([
84
-                            $op['label'] => '__' . $op['label']
84
+                            $op['label'] => '__'.$op['label']
85 85
                         ]);
86 86
                     }
87 87
                 }
Please login to merge, or discard this patch.
src/Form/Permissions/PermissionType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
     {
60 60
         parent::configureOptions($resolver);
61 61
 
62
-        $resolver->setDefault('perm_name', function (Options $options) {
62
+        $resolver->setDefault('perm_name', function(Options $options) {
63 63
             return $options['name'];
64 64
         });
65 65
 
66
-        $resolver->setDefault('label', function (Options $options) {
66
+        $resolver->setDefault('label', function(Options $options) {
67 67
             if (!empty($this->perm_structure['perms'][$options['perm_name']]['label'])) {
68 68
                 return $this->perm_structure['perms'][$options['perm_name']]['label'];
69 69
             }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             return $options['name'];
72 72
         });
73 73
 
74
-        $resolver->setDefault('multi_checkbox', function (Options $options) {
74
+        $resolver->setDefault('multi_checkbox', function(Options $options) {
75 75
             return !$options['disabled'];
76 76
         });
77 77
 
Please login to merge, or discard this patch.
src/Security/Voter/GroupVoter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Form/Permissions/PermissionsType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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(),
Please login to merge, or discard this patch.
src/Twig/AppExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Security/Voter/PartVoter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
             if (false !== strpos($attribute, '.')) {
27 27
                 [$perm, $op] = explode('.', $attribute);
28 28
 
29
-                return $this->resolver->isValidOperation('parts_' . $perm, $op);
29
+                return $this->resolver->isValidOperation('parts_'.$perm, $op);
30 30
             }
31 31
 
32 32
             return $this->resolver->isValidOperation('parts', $attribute);
Please login to merge, or discard this patch.
src/Security/Voter/StructureVoter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      */
57 57
     protected function supports($attribute, $subject)
58 58
     {
59
-        if(is_object($subject)) {
59
+        if (is_object($subject)) {
60 60
             $permission_name = $this->instanceToPermissionName($subject);
61 61
             //If permission name is null, then the subject is not supported
62 62
             return ($permission_name !== null) && $this->resolver->isValidOperation($permission_name, $attribute);
Please login to merge, or discard this patch.
src/Form/Permissions/PermissionGroupType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,13 +81,13 @@
 block discarded – undo
81 81
     {
82 82
         parent::configureOptions($resolver);
83 83
 
84
-        $resolver->setDefault('group_name', function (Options $options) {
84
+        $resolver->setDefault('group_name', function(Options $options) {
85 85
             return trim($options['name']);
86 86
         });
87 87
 
88 88
         $resolver->setDefault('inherit', false);
89 89
 
90
-        $resolver->setDefault('label', function (Options $options) {
90
+        $resolver->setDefault('label', function(Options $options) {
91 91
             if (!empty($this->perm_structure['groups'][$options['group_name']]['label'])) {
92 92
                 return $this->perm_structure['groups'][$options['group_name']]['label'];
93 93
             }
Please login to merge, or discard this patch.