Passed
Push — master ( e824e6...9b9d31 )
by Nils
05:57
created
scripts/traits/MigrateUserHandlerTrait.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,13 +45,17 @@  discard block
 block discarded – undo
45 45
         );
46 46
     
47 47
         if (empty($subtasks)) {
48
-            if (LOG_TASKS=== true) $this->logger->log("No subtask was found for task {$this->taskId}");
48
+            if (LOG_TASKS=== true) {
49
+                $this->logger->log("No subtask was found for task {$this->taskId}");
50
+            }
49 51
             return;
50 52
         }
51 53
     
52 54
         // Process each subtask
53 55
         foreach ($subtasks as $subtask) {
54
-            if (LOG_TASKS=== true) $this->logger->log("Processing subtask {$subtask['increment_id']} for task {$this->taskId}");
56
+            if (LOG_TASKS=== true) {
57
+                $this->logger->log("Processing subtask {$subtask['increment_id']} for task {$this->taskId}");
58
+            }
55 59
             $this->processMigratePersonalItemsSubtask($subtask, $arguments);
56 60
         }
57 61
     
@@ -88,7 +92,9 @@  discard block
 block discarded – undo
88 92
                 $subtask['increment_id']
89 93
             );
90 94
             
91
-            if (LOG_TASKS=== true) $this->logger->log("Subtask is in progress: ".$taskData['step'], 'INFO');
95
+            if (LOG_TASKS=== true) {
96
+                $this->logger->log("Subtask is in progress: ".$taskData['step'], 'INFO');
97
+            }
92 98
             switch ($taskData['step'] ?? '') {
93 99
                 case 'user-personal-items-migration-step10':
94 100
                     $this->migratePersonalItemsStep10($taskData, $arguments);
Please login to merge, or discard this patch.
scripts/traits/UserHandlerTrait.php 1 patch
Braces   +13 added lines, -5 removed lines patch added patch discarded remove patch
@@ -55,13 +55,17 @@  discard block
 block discarded – undo
55 55
         );
56 56
     
57 57
         if (empty($subtasks)) {
58
-            if (LOG_TASKS=== true) $this->logger->log("No subtask was found for task {$this->taskId}");
58
+            if (LOG_TASKS=== true) {
59
+                $this->logger->log("No subtask was found for task {$this->taskId}");
60
+            }
59 61
             return;
60 62
         }
61 63
     
62 64
         // Process each subtask
63 65
         foreach ($subtasks as $subtask) {
64
-            if (LOG_TASKS=== true) $this->logger->log("Processing subtask {$subtask['increment_id']} for task {$this->taskId}");
66
+            if (LOG_TASKS=== true) {
67
+                $this->logger->log("Processing subtask {$subtask['increment_id']} for task {$this->taskId}");
68
+            }
65 69
             $this->processGenerateUserKeysSubtask($subtask, $arguments);
66 70
         }
67 71
     
@@ -98,7 +102,9 @@  discard block
 block discarded – undo
98 102
                 $subtask['increment_id']
99 103
             );
100 104
             
101
-            if (LOG_TASKS=== true) $this->logger->log("Subtask is in progress: ".$taskData['step'], 'INFO');
105
+            if (LOG_TASKS=== true) {
106
+                $this->logger->log("Subtask is in progress: ".$taskData['step'], 'INFO');
107
+            }
102 108
             switch ($taskData['step'] ?? '') {
103 109
                 case 'step0':
104 110
                     $this->generateNewUserStep0($arguments);
@@ -165,7 +171,9 @@  discard block
 block discarded – undo
165 171
     private function generateNewUserStep0($arguments) {
166 172
         // CLear old sharekeys
167 173
         if ($arguments['user_self_change'] === 0) {
168
-            if (LOG_TASKS=== true) $this->logger->log("Deleting old sharekeys for user {$arguments['new_user_id']}", 'INFO');
174
+            if (LOG_TASKS=== true) {
175
+                $this->logger->log("Deleting old sharekeys for user {$arguments['new_user_id']}", 'INFO');
176
+            }
169 177
             deleteUserObjetsKeys($arguments['new_user_id'], $this->settings);
170 178
         }
171 179
     }
@@ -780,7 +788,7 @@  discard block
 block discarded – undo
780 788
                 'login' => $userInfo['login'],
781 789
                 'name' => $userInfo['name'],
782 790
             ];
783
-        }else {
791
+        } else {
784 792
             // Normal case
785 793
             return [
786 794
                 'private_key' => decryptPrivateKey($pwd, $userInfo['private_key']),
Please login to merge, or discard this patch.