@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $role = $roleService->createRole($roleCreateStruct); |
| 41 | 41 | |
| 42 | 42 | if (array_key_exists('policies', $this->dsl)) { |
| 43 | - foreach($this->dsl['policies'] as $key => $ymlPolicy) { |
|
| 43 | + foreach ($this->dsl['policies'] as $key => $ymlPolicy) { |
|
| 44 | 44 | $this->addPolicy($role, $roleService, $ymlPolicy); |
| 45 | 45 | } |
| 46 | 46 | } |
@@ -90,11 +90,11 @@ discard block |
||
| 90 | 90 | // Removing all policies so we can add them back. |
| 91 | 91 | // TODO: Check and update policies instead of remove and add. |
| 92 | 92 | $policies = $role->getPolicies(); |
| 93 | - foreach($policies as $policy) { |
|
| 93 | + foreach ($policies as $policy) { |
|
| 94 | 94 | $roleService->deletePolicy($policy); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - foreach($ymlPolicies as $ymlPolicy) { |
|
| 97 | + foreach ($ymlPolicies as $ymlPolicy) { |
|
| 98 | 98 | $this->addPolicy($role, $roleService, $ymlPolicy); |
| 99 | 99 | } |
| 100 | 100 | } |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | |
| 226 | 226 | $limitationValue = is_array($limitation['values']) ? $limitation['values'] : array($limitation['values']); |
| 227 | 227 | |
| 228 | - foreach($limitationValue as $id => $value) { |
|
| 228 | + foreach ($limitationValue as $id => $value) { |
|
| 229 | 229 | if ($this->referenceResolver->isReference($value)) { |
| 230 | 230 | $value = $this->referenceResolver->getReferenceValue($value); |
| 231 | 231 | $limitationValue[$id] = $value; |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | switch ($assign['type']) { |
| 260 | 260 | case 'user': |
| 261 | 261 | foreach ($assign['ids'] as $userId) { |
| 262 | - if($this->referenceResolver->isReference($userId)) { |
|
| 262 | + if ($this->referenceResolver->isReference($userId)) { |
|
| 263 | 263 | $userId = $this->referenceResolver->getReferenceValue($userId); |
| 264 | 264 | } |
| 265 | 265 | $user = $userService->loadUser($userId); |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | break; |
| 277 | 277 | case 'group': |
| 278 | 278 | foreach ($assign['ids'] as $groupId) { |
| 279 | - if($this->referenceResolver->isReference($groupId)) { |
|
| 279 | + if ($this->referenceResolver->isReference($groupId)) { |
|
| 280 | 280 | $groupId = $this->referenceResolver->getReferenceValue($groupId); |
| 281 | 281 | } |
| 282 | 282 | $group = $userService->loadUserGroup($groupId); |