@@ -117,7 +117,7 @@ |
||
117 | 117 | $gridData = new DataGridData(); |
118 | 118 | $gridData->setDataRowSourceId('id'); |
119 | 119 | $gridData->addDataRowSource('userLogin'); |
120 | - $gridData->addDataRowSource('actionId', false, function ($value) { |
|
120 | + $gridData->addDataRowSource('actionId', false, function($value) { |
|
121 | 121 | return Acl::getActionInfo($value); |
122 | 122 | }); |
123 | 123 | $gridData->setData($this->queryResult); |
@@ -64,7 +64,7 @@ |
||
64 | 64 | */ |
65 | 65 | public function setFields(array $fields, array $values) |
66 | 66 | { |
67 | - $this->fields = array_map(function ($value) { |
|
67 | + $this->fields = array_map(function($value) { |
|
68 | 68 | return strpos($value, '=') === false ? "$value = ?" : $value; |
69 | 69 | }, $fields); |
70 | 70 |
@@ -127,22 +127,22 @@ |
||
127 | 127 | $selectTags = SelectItemAdapter::factory(TagService::getItemsBasic()); |
128 | 128 | |
129 | 129 | $usersView = SelectItemAdapter::getIdFromArrayOfObjects( |
130 | - array_filter($accountDetailsResponse->getUsers(), function ($value) { |
|
130 | + array_filter($accountDetailsResponse->getUsers(), function($value) { |
|
131 | 131 | return (int)$value->isEdit === 0; |
132 | 132 | })); |
133 | 133 | |
134 | 134 | $usersEdit = SelectItemAdapter::getIdFromArrayOfObjects( |
135 | - array_filter($accountDetailsResponse->getUsers(), function ($value) { |
|
135 | + array_filter($accountDetailsResponse->getUsers(), function($value) { |
|
136 | 136 | return (int)$value->isEdit === 1; |
137 | 137 | })); |
138 | 138 | |
139 | 139 | $userGroupsView = SelectItemAdapter::getIdFromArrayOfObjects( |
140 | - array_filter($accountDetailsResponse->getUserGroups(), function ($value) { |
|
140 | + array_filter($accountDetailsResponse->getUserGroups(), function($value) { |
|
141 | 141 | return (int)$value->isEdit === 0; |
142 | 142 | })); |
143 | 143 | |
144 | 144 | $userGroupsEdit = SelectItemAdapter::getIdFromArrayOfObjects( |
145 | - array_filter($accountDetailsResponse->getUserGroups(), function ($value) { |
|
145 | + array_filter($accountDetailsResponse->getUserGroups(), function($value) { |
|
146 | 146 | return (int)$value->isEdit === 1; |
147 | 147 | })); |
148 | 148 |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | { |
135 | 135 | $oops = "Oops, it looks like this content does not exist..."; |
136 | 136 | |
137 | - $this->router->onError(function ($router, $err_msg, $type, $err) { |
|
137 | + $this->router->onError(function($router, $err_msg, $type, $err) { |
|
138 | 138 | logger('Routing error: ' . $err_msg); |
139 | 139 | |
140 | 140 | /** @var Exception|\Throwable $err */ |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | // Manage requests for api module |
148 | 148 | $this->router->respond(['POST'], |
149 | 149 | '@/api\.php', |
150 | - function ($request, $response, $service) use ($oops) { |
|
150 | + function($request, $response, $service) use ($oops) { |
|
151 | 151 | try { |
152 | 152 | $apiRequest = self::$container->get(ApiRequest::class); |
153 | 153 | |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | // Manage requests for web module |
187 | 187 | $this->router->respond(['GET', 'POST'], |
188 | 188 | '@/index\.php', |
189 | - function ($request, $response, $service) use ($oops) { |
|
189 | + function($request, $response, $service) use ($oops) { |
|
190 | 190 | try { |
191 | 191 | /** @var \Klein\Request $request */ |
192 | 192 | $route = Filter::getString($request->param('r', 'index/index')); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $gridData->addDataRowSource('dateTime'); |
122 | 122 | $gridData->addDataRowSource('dateTimeUnlock'); |
123 | 123 | $gridData->addDataRowSource('source', null, null, false); |
124 | - $gridData->addDataRowSource('ipv4', null, function ($value) use ($demo) { |
|
124 | + $gridData->addDataRowSource('ipv4', null, function($value) use ($demo) { |
|
125 | 125 | if ($value !== null) { |
126 | 126 | if ($demo) { |
127 | 127 | return '*.*.*.*'; |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | return ' '; |
134 | 134 | }); |
135 | - $gridData->addDataRowSource('ipv6', null, function ($value) use ($demo) { |
|
135 | + $gridData->addDataRowSource('ipv6', null, function($value) use ($demo) { |
|
136 | 136 | if ($value !== null) { |
137 | 137 | if ($demo) { |
138 | 138 | return '*.*.*.*'; |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | */ |
127 | 127 | public function create($itemData) |
128 | 128 | { |
129 | - return $this->transactionAware(function () use ($itemData) { |
|
129 | + return $this->transactionAware(function() use ($itemData) { |
|
130 | 130 | $id = $this->userGroupRepository->create($itemData); |
131 | 131 | |
132 | 132 | $users = $itemData->getUsers(); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | */ |
147 | 147 | public function update($itemData) |
148 | 148 | { |
149 | - $this->transactionAware(function () use ($itemData) { |
|
149 | + $this->transactionAware(function() use ($itemData) { |
|
150 | 150 | $this->userGroupRepository->update($itemData); |
151 | 151 | |
152 | 152 | $users = $itemData->getUsers(); |
@@ -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 | } |