@@ -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 | } |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | public function setRuntimeFilter($class, $method) |
155 | 155 | { |
156 | 156 | if (method_exists($class, $method)) { |
157 | - $this->runtimeFilter = function ($filter) use ($method) { |
|
157 | + $this->runtimeFilter = function($filter) use ($method) { |
|
158 | 158 | // new \ReflectionMethod($class, $method); |
159 | 159 | return $filter->{$method}(); |
160 | 160 | }; |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | { |
261 | 261 | if ($this->onClickArgs !== null) { |
262 | 262 | |
263 | - $args = array_map(function ($value) { |
|
263 | + $args = array_map(function($value) { |
|
264 | 264 | return (!is_numeric($value) && $value !== 'this') ? '\'' . $value . '\'' : $value; |
265 | 265 | }, $this->onClickArgs); |
266 | 266 |
@@ -185,6 +185,6 @@ |
||
185 | 185 | protected function initialize() |
186 | 186 | { |
187 | 187 | $this->acl = $this->dic->get(Acl::class); |
188 | - $this->accountHistoryService = $this->dic->get(AccountHistoryService::class);; |
|
188 | + $this->accountHistoryService = $this->dic->get(AccountHistoryService::class); ; |
|
189 | 189 | } |
190 | 190 | } |
191 | 191 | \ No newline at end of file |
@@ -57,9 +57,9 @@ |
||
57 | 57 | * @param bool $render |
58 | 58 | */ |
59 | 59 | public static function showExceptionInView(Template $view, |
60 | - \Exception $e, |
|
61 | - $replace = null, |
|
62 | - $render = true) |
|
60 | + \Exception $e, |
|
61 | + $replace = null, |
|
62 | + $render = true) |
|
63 | 63 | { |
64 | 64 | switch (get_class($e)) { |
65 | 65 | case UpdatedMasterPassException::class: |
@@ -72,7 +72,7 @@ |
||
72 | 72 | /** |
73 | 73 | * @return array |
74 | 74 | */ |
75 | - $passGen = function () use ($alphabet, $length) { |
|
75 | + $passGen = function() use ($alphabet, $length) { |
|
76 | 76 | $pass = []; |
77 | 77 | $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache |
78 | 78 |
@@ -166,7 +166,7 @@ |
||
166 | 166 | { |
167 | 167 | $path = $this->exportPath . DIRECTORY_SEPARATOR . AppInfoInterface::APP_NAME; |
168 | 168 | |
169 | - array_map(function ($file) { |
|
169 | + array_map(function($file) { |
|
170 | 170 | return @unlink($file); |
171 | 171 | }, array_merge(glob($path . '_export-*'), glob($path . '*.xml'))); |
172 | 172 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $gridData->addDataRowSource('clientName'); |
125 | 125 | $gridData->addDataRowSource('name'); |
126 | 126 | $gridData->addDataRowSource('type'); |
127 | - $gridData->addDataRowSource('size', false, function ($value) { |
|
127 | + $gridData->addDataRowSource('size', false, function($value) { |
|
128 | 128 | return sprintf('%.2f KB', $value / 1000); |
129 | 129 | }); |
130 | 130 | $gridData->setData($this->queryResult); |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $gridAction->setIcon($this->icons->getIconDownload()); |
181 | 181 | $gridAction->setOnClickFunction('file/download'); |
182 | 182 | $gridAction->addData('action-route', Acl::getActionRoute(ActionsInterface::ACCOUNT_FILE_DOWNLOAD)); |
183 | - $gridAction->setRuntimeData(function ($dataItem) use ($gridAction) { |
|
183 | + $gridAction->setRuntimeData(function($dataItem) use ($gridAction) { |
|
184 | 184 | return ['item-type' => $dataItem->type]; |
185 | 185 | }); |
186 | 186 |
@@ -123,11 +123,11 @@ |
||
123 | 123 | $gridData->addDataRowSource('action', null, null, false); |
124 | 124 | $gridData->addDataRowSource('login'); |
125 | 125 | $gridData->addDataRowSource('ipAddress', false, |
126 | - function ($value) use ($isDemoMode) { |
|
126 | + function($value) use ($isDemoMode) { |
|
127 | 127 | return $isDemoMode ? '*.*.*.*' : $value; |
128 | 128 | }); |
129 | 129 | $gridData->addDataRowSource('description', false, |
130 | - function ($value) use ($isDemoMode) { |
|
130 | + function($value) use ($isDemoMode) { |
|
131 | 131 | if ($isDemoMode) { |
132 | 132 | $value = preg_replace('/\d+\.\d+\.\d+\.\d+/', '*.*.*.*', $value); |
133 | 133 | } |