Passed
Push — devel-3.0 ( 543c48...5b8639 )
by Rubén
03:28
created
lib/SP/Util/Util.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
             }
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
             if ($srcClass !== null) {
233 233
                 $serializedOut = preg_replace_callback(
234 234
                     '/:\d+:"\x00' . preg_quote($srcClass, '/') . '\x00(\w+)"/',
235
-                    function ($matches) {
235
+                    function($matches) {
236 236
                         return ':' . strlen($matches[1]) . ':"' . $matches[1] . '"';
237 237
                     },
238 238
                     $serialized);
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
      */
340 340
     public static function itemsIdAdapter(string $itemsId, $delimiter = ','): array
341 341
     {
342
-        return array_map(function ($value) {
342
+        return array_map(function($value) {
343 343
             return intval($value);
344 344
         }, explode($delimiter, $itemsId));
345 345
     }
Please login to merge, or discard this patch.
lib/SP/Services/Account/AccountAclService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
lib/SP/Services/Account/AccountService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.