@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | $userToUserGroupService = $this->dic->get(UserToUserGroupService::class); |
| 269 | 269 | |
| 270 | 270 | // Groups in whinch the user is listed in |
| 271 | - $userGroups = array_map(function ($value) { |
|
| 271 | + $userGroups = array_map(function($value) { |
|
| 272 | 272 | return (int)$value->userGroupId; |
| 273 | 273 | }, $userToUserGroupService->getGroupsForUser($this->userData->getId())); |
| 274 | 274 | |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | */ |
| 302 | 302 | private function getUserInSecondaryUsers($userId) |
| 303 | 303 | { |
| 304 | - return array_values(array_filter($this->accountAclDto->getUsersId(), function ($value) use ($userId) { |
|
| 304 | + return array_values(array_filter($this->accountAclDto->getUsersId(), function($value) use ($userId) { |
|
| 305 | 305 | return (int)$value->id === $userId; |
| 306 | 306 | })); |
| 307 | 307 | } |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | |
| 335 | 335 | // Comprobar si el grupo del usuario está vinculado desde los grupos secundarios de la cuenta |
| 336 | 336 | return array_values(array_filter($this->accountAclDto->getUserGroupsId(), |
| 337 | - function ($value) use ($userGroupId, $isAccountFullGroupAccess, $userGroups) { |
|
| 337 | + function($value) use ($userGroupId, $isAccountFullGroupAccess, $userGroups) { |
|
| 338 | 338 | return (int)$value->id === $userGroupId |
| 339 | 339 | // o... permitir los grupos que no sean el principal del usuario? |
| 340 | 340 | || ($isAccountFullGroupAccess |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | */ |
| 411 | 411 | public function update(AccountRequest $accountRequest) |
| 412 | 412 | { |
| 413 | - $this->transactionAware(function () use ($accountRequest) { |
|
| 413 | + $this->transactionAware(function() use ($accountRequest) { |
|
| 414 | 414 | $userData = $this->context->getUserData(); |
| 415 | 415 | |
| 416 | 416 | $accountRequest->changePermissions = AccountAclService::getShowPermission( |
@@ -521,7 +521,7 @@ discard block |
||
| 521 | 521 | */ |
| 522 | 522 | public function updateBulk(AccountBulkRequest $request) |
| 523 | 523 | { |
| 524 | - $this->transactionAware(function () use ($request) { |
|
| 524 | + $this->transactionAware(function() use ($request) { |
|
| 525 | 525 | foreach ($request->getItemsId() as $itemId) { |
| 526 | 526 | $accountRequest = $request->getAccountRequestForId($itemId); |
| 527 | 527 | |
@@ -541,7 +541,7 @@ discard block |
||
| 541 | 541 | */ |
| 542 | 542 | public function editPassword(AccountRequest $accountRequest) |
| 543 | 543 | { |
| 544 | - $this->transactionAware(function () use ($accountRequest) { |
|
| 544 | + $this->transactionAware(function() use ($accountRequest) { |
|
| 545 | 545 | $this->addHistory($accountRequest->id); |
| 546 | 546 | |
| 547 | 547 | $pass = $this->getPasswordEncrypted($accountRequest->pass); |
@@ -575,7 +575,7 @@ discard block |
||
| 575 | 575 | */ |
| 576 | 576 | public function editRestore($historyId, $accountId) |
| 577 | 577 | { |
| 578 | - $this->transactionAware(function () use ($historyId, $accountId) { |
|
| 578 | + $this->transactionAware(function() use ($historyId, $accountId) { |
|
| 579 | 579 | $this->addHistory($accountId); |
| 580 | 580 | |
| 581 | 581 | if (!$this->accountRepository->editRestore($historyId, $this->context->getUserData()->getId())) { |
@@ -592,7 +592,7 @@ discard block |
||
| 592 | 592 | */ |
| 593 | 593 | public function delete($id) |
| 594 | 594 | { |
| 595 | - $this->transactionAware(function () use ($id) { |
|
| 595 | + $this->transactionAware(function() use ($id) { |
|
| 596 | 596 | $this->addHistory($id, 1); |
| 597 | 597 | |
| 598 | 598 | if ($this->accountRepository->delete($id) === 0) { |
@@ -130,7 +130,7 @@ |
||
| 130 | 130 | ); |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | - return array_filter(array_map(function ($value) { |
|
| 133 | + return array_filter(array_map(function($value) { |
|
| 134 | 134 | if (is_array($value)) { |
| 135 | 135 | return $value['dn']; |
| 136 | 136 | } |
@@ -226,7 +226,7 @@ |
||
| 226 | 226 | $this->checkLoggedInSession( |
| 227 | 227 | $this->session, |
| 228 | 228 | $this->request, |
| 229 | - function ($redirect) { |
|
| 229 | + function($redirect) { |
|
| 230 | 230 | $this->router->response() |
| 231 | 231 | ->redirect($redirect) |
| 232 | 232 | ->send(true); |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | |
| 61 | 61 | $this->checkForwarded(); |
| 62 | 62 | |
| 63 | - $redirector = function ($route) use ($from) { |
|
| 63 | + $redirector = function($route) use ($from) { |
|
| 64 | 64 | $uri = new Uri('index.php'); |
| 65 | 65 | $uri->addParam('r', $route); |
| 66 | 66 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | /** |
| 65 | 65 | * @return array |
| 66 | 66 | */ |
| 67 | - $passGen = function () use ($alphabet, $length) { |
|
| 67 | + $passGen = function() use ($alphabet, $length) { |
|
| 68 | 68 | $pass = []; |
| 69 | 69 | $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache |
| 70 | 70 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $appTmp = APP_PATH . DIRECTORY_SEPARATOR . 'temp'; |
| 133 | 133 | $file = 'syspass.test'; |
| 134 | 134 | |
| 135 | - $checkDir = function ($dir) use ($file) { |
|
| 135 | + $checkDir = function($dir) use ($file) { |
|
| 136 | 136 | if (file_exists($dir . DIRECTORY_SEPARATOR . $file)) { |
| 137 | 137 | return $dir; |
| 138 | 138 | } |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | if ($srcClass !== null) { |
| 243 | 243 | $serialized = preg_replace_callback( |
| 244 | 244 | '/:\d+:"\x00' . preg_quote($srcClass, '/') . '\x00(\w+)"/', |
| 245 | - function ($matches) { |
|
| 245 | + function($matches) { |
|
| 246 | 246 | return ':' . strlen($matches[1]) . ':"' . $matches[1] . '"'; |
| 247 | 247 | }, |
| 248 | 248 | $serialized); |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | */ |
| 345 | 345 | public static function itemsIdAdapter(string $itemsId, $delimiter = ','): array |
| 346 | 346 | { |
| 347 | - return array_map(function ($value) { |
|
| 347 | + return array_map(function($value) { |
|
| 348 | 348 | return intval($value); |
| 349 | 349 | }, explode($delimiter, $itemsId)); |
| 350 | 350 | } |
@@ -226,7 +226,7 @@ |
||
| 226 | 226 | $this->checkLoggedInSession( |
| 227 | 227 | $this->session, |
| 228 | 228 | $this->request, |
| 229 | - function ($redirect) { |
|
| 229 | + function($redirect) { |
|
| 230 | 230 | $this->router->response() |
| 231 | 231 | ->redirect($redirect) |
| 232 | 232 | ->send(true); |
@@ -115,7 +115,7 @@ |
||
| 115 | 115 | public function notificationsAction() |
| 116 | 116 | { |
| 117 | 117 | $notifications = array_map( |
| 118 | - function ($notification) { |
|
| 118 | + function($notification) { |
|
| 119 | 119 | /** @@var $notification NotificationData */ |
| 120 | 120 | return sprintf('(%s) - %s', $notification->getComponent(), Html::truncate($notification->getDescription(), 30)); |
| 121 | 121 | }, $this->dic |