@@ -86,7 +86,7 @@ |
||
| 86 | 86 | { |
| 87 | 87 | if (is_array($data) || is_object($data)) { |
| 88 | 88 | array_walk_recursive($data, |
| 89 | - function (&$value) { |
|
| 89 | + function(&$value) { |
|
| 90 | 90 | if (is_object($value)) { |
| 91 | 91 | foreach ($value as $property => $v) { |
| 92 | 92 | if (is_string($v) && $v !== '') { |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | /** |
| 69 | 69 | * @return array |
| 70 | 70 | */ |
| 71 | - $passGen = function () use ($alphabet, $length) { |
|
| 71 | + $passGen = function() use ($alphabet, $length) { |
|
| 72 | 72 | $pass = []; |
| 73 | 73 | $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache |
| 74 | 74 | |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | $appTmp = APP_PATH . DIRECTORY_SEPARATOR . 'temp'; |
| 233 | 233 | $file = 'syspass.test'; |
| 234 | 234 | |
| 235 | - $checkDir = function ($dir) use ($file) { |
|
| 235 | + $checkDir = function($dir) use ($file) { |
|
| 236 | 236 | if (file_exists($dir . DIRECTORY_SEPARATOR . $file)) { |
| 237 | 237 | return $dir; |
| 238 | 238 | } |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | if ($srcClass !== null) { |
| 362 | 362 | $serializedOut = preg_replace_callback( |
| 363 | 363 | '/:\d+:"\x00' . preg_quote($srcClass, '/') . '\x00(\w+)"/', |
| 364 | - function ($matches) { |
|
| 364 | + function($matches) { |
|
| 365 | 365 | return ':' . strlen($matches[1]) . ':"' . $matches[1] . '"'; |
| 366 | 366 | }, |
| 367 | 367 | $serialized); |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | */ |
| 310 | 310 | public function update(AccountRequest $accountRequest) |
| 311 | 311 | { |
| 312 | - $this->transactionAware(function () use ($accountRequest) { |
|
| 312 | + $this->transactionAware(function() use ($accountRequest) { |
|
| 313 | 313 | $accountRequest->changePermissions = AccountAclService::getShowPermission($this->context->getUserData(), $this->context->getUserProfile()); |
| 314 | 314 | |
| 315 | 315 | // Cambiar el grupo principal si el usuario es Admin |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | */ |
| 405 | 405 | public function editPassword(AccountRequest $accountRequest) |
| 406 | 406 | { |
| 407 | - $this->transactionAware(function () use ($accountRequest) { |
|
| 407 | + $this->transactionAware(function() use ($accountRequest) { |
|
| 408 | 408 | $this->addHistory($accountRequest->id); |
| 409 | 409 | |
| 410 | 410 | $pass = $this->getPasswordEncrypted($accountRequest->pass); |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | */ |
| 439 | 439 | public function editRestore($historyId, $accountId) |
| 440 | 440 | { |
| 441 | - $this->transactionAware(function () use ($historyId, $accountId) { |
|
| 441 | + $this->transactionAware(function() use ($historyId, $accountId) { |
|
| 442 | 442 | $this->addHistory($accountId); |
| 443 | 443 | |
| 444 | 444 | if (!$this->accountRepository->editRestore($historyId, $this->context->getUserData()->getId())) { |
@@ -455,7 +455,7 @@ discard block |
||
| 455 | 455 | */ |
| 456 | 456 | public function delete($id) |
| 457 | 457 | { |
| 458 | - $this->transactionAware(function () use ($id) { |
|
| 458 | + $this->transactionAware(function() use ($id) { |
|
| 459 | 459 | $this->addHistory($id, 1); |
| 460 | 460 | |
| 461 | 461 | if ($this->accountRepository->delete($id) === 0) { |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | $gridData = new DataGridData(); |
| 118 | 118 | $gridData->setDataRowSourceId('id'); |
| 119 | 119 | $gridData->addDataRowSource('name'); |
| 120 | - $gridData->addDataRowSource('moduleId', false, function ($value) { |
|
| 120 | + $gridData->addDataRowSource('moduleId', false, function($value) { |
|
| 121 | 121 | return CustomFieldDefService::getFieldModuleById($value); |
| 122 | 122 | }); |
| 123 | 123 | $gridData->addDataRowSource('typeName'); |
@@ -133,7 +133,7 @@ |
||
| 133 | 133 | $gridData = new DataGridData(); |
| 134 | 134 | $gridData->setDataRowSourceId('id'); |
| 135 | 135 | $gridData->addDataRowSource('date', false, |
| 136 | - function ($value) { |
|
| 136 | + function($value) { |
|
| 137 | 137 | return DateUtil::getDateFromUnix($value); |
| 138 | 138 | }); |
| 139 | 139 | $gridData->addDataRowSource('type'); |
@@ -120,7 +120,7 @@ |
||
| 120 | 120 | $gridData->addDataRowSource('clientName'); |
| 121 | 121 | $gridData->addDataRowSource('name'); |
| 122 | 122 | $gridData->addDataRowSource('type'); |
| 123 | - $gridData->addDataRowSource('size', false, function ($value) { |
|
| 123 | + $gridData->addDataRowSource('size', false, function($value) { |
|
| 124 | 124 | return sprintf('%.2f KB', $value / 1000); |
| 125 | 125 | }); |
| 126 | 126 | $gridData->setData($this->queryResult); |
@@ -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); |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | $gridData->setDataRowSourceId('id'); |
| 117 | 117 | $gridData->addDataRowSource('name'); |
| 118 | 118 | $gridData->addDataRowSource('description'); |
| 119 | - $gridData->addDataRowSource('isGlobal', false, function ($value) { |
|
| 119 | + $gridData->addDataRowSource('isGlobal', false, function($value) { |
|
| 120 | 120 | return $value ? __('SI') : __('NO'); |
| 121 | 121 | }); |
| 122 | 122 | $gridData->setData($this->queryResult); |
@@ -125,11 +125,11 @@ |
||
| 125 | 125 | $gridData->addDataRowSource('action'); |
| 126 | 126 | $gridData->addDataRowSource('login'); |
| 127 | 127 | $gridData->addDataRowSource('ipAddress', false, |
| 128 | - function ($value) use ($isDemoMode) { |
|
| 128 | + function($value) use ($isDemoMode) { |
|
| 129 | 129 | return $isDemoMode ? preg_replace('#\d+#', '*', $value) : $value; |
| 130 | 130 | }); |
| 131 | 131 | $gridData->addDataRowSource('description', false, |
| 132 | - function ($value) use ($isDemoMode) { |
|
| 132 | + function($value) use ($isDemoMode) { |
|
| 133 | 133 | if ($isDemoMode) { |
| 134 | 134 | $value = preg_replace('/\\d+\\.\\d+\\.\\d+\\.\\d+/', "*.*.*.*", $value); |
| 135 | 135 | } |