Passed
Push — master ( 73bfc2...a878a7 )
by Adrien
13:45 queued 10:48
created
tests/Acl/MultipleRolesTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         self::assertSame(['writer'], $roles->getRoles(), 'must be added');
20 20
         self::assertTrue($roles->has('writer'), 'must be existing');
21 21
         self::assertFalse($roles->has('foo'), 'must not be existing');
22
-        self::assertTrue($roles->has('foo', 'writer', ), 'at least one of them');
22
+        self::assertTrue($roles->has('foo', 'writer',), 'at least one of them');
23 23
         self::assertFalse($roles->has('foo', 'bar'), 'none of of them');
24 24
         self::assertFalse($roles->has());
25 25
         self::assertSame('[writer]', (string) $roles);
Please login to merge, or discard this patch.
src/Testing/Api/AbstractServer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
     /**
109 109
      * @param ExecutionResult|ExecutionResult[] $result
110 110
      */
111
-    private function resultToArray(array|ExecutionResult $result): array
111
+    private function resultToArray(array | ExecutionResult $result): array
112 112
     {
113 113
         if (is_array($result)) {
114 114
             foreach ($result as &$one) {
Please login to merge, or discard this patch.
src/Acl/DebugAcl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         return parent::deny($roles, $resources, $privileges, $assert);
76 76
     }
77 77
 
78
-    private function storePrivileges(null|string|array|ResourceInterface $resource, null|string|array $privileges): void
78
+    private function storePrivileges(null | string | array | ResourceInterface $resource, null | string | array $privileges): void
79 79
     {
80 80
         if (!is_array($resource)) {
81 81
             $resource = [$resource];
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      *
185 185
      * @return array{privilege: null|string, allowed: bool, allowIf: string[], denyIf: string[]}
186 186
      */
187
-    public function show(null|RoleInterface|string $role, null|ResourceInterface|string $resource, null|string $privilege): array
187
+    public function show(null | RoleInterface | string $role, null | ResourceInterface | string $resource, null | string $privilege): array
188 188
     {
189 189
         $allowed = $this->isAllowed($role, $resource, $privilege);
190 190
         sort($this->usedAllowAssertions);
Please login to merge, or discard this patch.
src/Acl/Acl.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      *
109 109
      * This should be the main method to do all ACL checks.
110 110
      */
111
-    public function isCurrentUserAllowed(Model|string $modelOrResource, string $privilege): bool
111
+    public function isCurrentUserAllowed(Model | string $modelOrResource, string $privilege): bool
112 112
     {
113 113
         $resource = is_string($modelOrResource) ? $modelOrResource : new ModelResource($this->getClass($modelOrResource), $modelOrResource);
114 114
         $role = $this->getCurrentRole();
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         return ClassUtils::getRealClass($resource::class);
142 142
     }
143 143
 
144
-    private function getCurrentRole(): MultipleRoles|string
144
+    private function getCurrentRole(): MultipleRoles | string
145 145
     {
146 146
         $user = CurrentUser::get();
147 147
         if (!$user) {
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         return $user->getRole();
152 152
     }
153 153
 
154
-    private function buildMessage(ModelResource|string $resource, ?string $privilege, MultipleRoles|string $role, bool $isAllowed): ?string
154
+    private function buildMessage(ModelResource | string $resource, ?string $privilege, MultipleRoles | string $role, bool $isAllowed): ?string
155 155
     {
156 156
         if ($isAllowed) {
157 157
             return null;
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      *
192 192
      * @return array<array{resource:string, privileges: array<int, array{privilege:null|string, allowed: bool, allowIf: string[], denyIf: string[]}>}>
193 193
      */
194
-    public function show(MultipleRoles|string $role, bool $useTranslations = true): array
194
+    public function show(MultipleRoles | string $role, bool $useTranslations = true): array
195 195
     {
196 196
         $result = [];
197 197
         /** @var string[] $resources */
Please login to merge, or discard this patch.