Completed
Pull Request — development (#738)
by Kai
04:36
created
htdocs/admins.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      ORDER BY username'
32 32
 );
33 33
 
34
-foreach($admins as &$admin) {
34
+foreach ($admins as &$admin) {
35 35
     $rights = [];
36 36
 
37 37
     if ($admin['admin'] & ADMIN_TRANSLATE) {
Please login to merge, or discard this patch.
htdocs/src/Oc/Validator/Exception/ValidationException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     {
26 26
         $this->setViolations($violations);
27 27
 
28
-        parent::__construct((string) $this);
28
+        parent::__construct((string)$this);
29 29
     }
30 30
 
31 31
     /**
Please login to merge, or discard this patch.
htdocs/log.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
     $fieldNoteService = AppKernel::Container()->get(FieldNoteService::class);
50 50
 
51 51
     $fieldNote = $fieldNoteService->fetchOneBy([
52
-        'id' => (int) $_GET['fieldnoteid'],
53
-        'user_id' => (int) $user->getUserId()
52
+        'id' => (int)$_GET['fieldnoteid'],
53
+        'user_id' => (int)$user->getUserId()
54 54
     ]);
55 55
 
56 56
     if ($fieldNote !== null) {
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     // get log text editor mode (from form or from userprofile)
172 172
     // 1 = text; 2 = HTML; 3 = tinyMCE
173 173
     if (isset($_POST['descMode'])) {
174
-        $descMode = $_POST['descMode'] + 0;  // Ocprop: 2
174
+        $descMode = $_POST['descMode'] + 0; // Ocprop: 2
175 175
         if (($descMode < 1) || ($descMode > 3)) {
176 176
             $descMode = 3;
177 177
         }
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
             if (isset($_REQUEST['fieldnoteid']) && $_REQUEST['fieldnoteid']) {
314 314
                 sql(
315 315
                     'DELETE FROM field_note WHERE `id` = &1 AND `user_id` = &2',
316
-                    (int) $_REQUEST['fieldnoteid'],
316
+                    (int)$_REQUEST['fieldnoteid'],
317 317
                     $user->getUserId()
318 318
                 );
319 319
 
Please login to merge, or discard this patch.
htdocs/thumbs.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 );
38 38
 if ($r) {
39 39
     if ($r['object_type'] == 1) {
40
-        $check = (int) $connection
40
+        $check = (int)$connection
41 41
             ->fetchColumn(
42 42
                 'SELECT COUNT(*)
43 43
                  FROM `cache_logs`
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
         }
64 64
     } elseif ($r['object_type'] == 2) {
65
-        $check = (int) $connection
65
+        $check = (int)$connection
66 66
             ->fetchColumn(
67 67
                 'SELECT COUNT(*)
68 68
                            FROM `caches`
Please login to merge, or discard this patch.
htdocs/adminuser.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -142,22 +142,22 @@
 block discarded – undo
142 142
 
143 143
     $tpl->assign('showdetails', true);
144 144
 
145
-    $r['hidden'] = (int) $connection->fetchColumn(
145
+    $r['hidden'] = (int)$connection->fetchColumn(
146 146
         'SELECT COUNT(*) FROM `caches` WHERE `user_id`=:userId', [':userId' => $r['user_id']]
147 147
     );
148
-    $r['hidden_active'] = (int) $connection->fetchColumn(
148
+    $r['hidden_active'] = (int)$connection->fetchColumn(
149 149
         'SELECT COUNT(*) FROM `caches` WHERE `user_id`= :userId AND `status`=1',
150 150
         [':userId' => $r['user_id']]
151 151
     );
152
-    $r['logentries'] = (int) $connection->fetchColumn(
152
+    $r['logentries'] = (int)$connection->fetchColumn(
153 153
         'SELECT COUNT(*) FROM `cache_logs` WHERE `user_id`= :userId',
154 154
         [':userId' => $r['user_id']]
155 155
     );
156
-    $r['deleted_logentries'] = (int) $connection->fetchColumn(
156
+    $r['deleted_logentries'] = (int)$connection->fetchColumn(
157 157
         'SELECT COUNT(*) FROM `cache_logs_archived` WHERE `user_id`= :userId',
158 158
         [':userId' => $r['user_id']]
159 159
     );
160
-    $r['reports'] = (int) $connection->fetchColumn(
160
+    $r['reports'] = (int)$connection->fetchColumn(
161 161
         'SELECT COUNT(*) FROM `cache_reports` WHERE `userid`= :userId',
162 162
         [':userId' => $r['user_id']]
163 163
     );
Please login to merge, or discard this patch.
htdocs/lib/login.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
         // user.last_login gives the overall last login date, including OKAPI logins.
122 122
 
123 123
         if ($rUser = sql_fetch_assoc($rs)) {
124
-            if ((($this->permanent == true) && (strtotime($rUser['last_login']) + LOGIN_TIME_PERMANENT  / 2 < time())) ||
124
+            if ((($this->permanent == true) && (strtotime($rUser['last_login']) + LOGIN_TIME_PERMANENT / 2 < time())) ||
125 125
                 (($this->permanent == false) && (strtotime($rUser['last_login']) + LOGIN_TIME / 2 < time()))
126 126
             ) {
127 127
                 sql(
Please login to merge, or discard this patch.
htdocs/src/Oc/Language/LanguageRepository.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -218,10 +218,10 @@
 block discarded – undo
218 218
         $entity->nativeName = $data['native_name'];
219 219
         $entity->de = $data['de'];
220 220
         $entity->en = $data['en'];
221
-        $entity->translationId = (int) $data['trans_id'];
222
-        $entity->listDefaultDe = (bool) $data['list_default_de'];
223
-        $entity->listDefaultEn = (bool) $data['list_default_en'];
224
-        $entity->isTranslated = (bool) $data['is_translated'];
221
+        $entity->translationId = (int)$data['trans_id'];
222
+        $entity->listDefaultDe = (bool)$data['list_default_de'];
223
+        $entity->listDefaultEn = (bool)$data['list_default_en'];
224
+        $entity->isTranslated = (bool)$data['is_translated'];
225 225
 
226 226
         return $entity;
227 227
     }
Please login to merge, or discard this patch.
htdocs/src/Oc/Country/CountryRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -181,9 +181,9 @@
 block discarded – undo
181 181
         $entity->name = $data['name'];
182 182
         $entity->de = $data['de'];
183 183
         $entity->en = $data['en'];
184
-        $entity->translationId = (int) $data['trans_id'];
185
-        $entity->listDefaultDe = (bool) $data['list_default_de'];
186
-        $entity->listDefaultEn = (bool) $data['list_default_en'];
184
+        $entity->translationId = (int)$data['trans_id'];
185
+        $entity->listDefaultDe = (bool)$data['list_default_de'];
186
+        $entity->listDefaultEn = (bool)$data['list_default_en'];
187 187
         $entity->sortDe = $data['sort_de'];
188 188
         $entity->sortEn = $data['sort_en'];
189 189
 
Please login to merge, or discard this patch.
htdocs/src/Oc/User/UserRepository.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             $databaseArray
113 113
         );
114 114
 
115
-        $entity->id = (int) $this->connection->lastInsertId();
115
+        $entity->id = (int)$this->connection->lastInsertId();
116 116
 
117 117
         return $entity;
118 118
     }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
             ['id' => $entity->id]
141 141
         );
142 142
 
143
-        $entity->id = (int) $this->connection->lastInsertId();
143
+        $entity->id = (int)$this->connection->lastInsertId();
144 144
 
145 145
         return $entity;
146 146
     }
@@ -222,13 +222,13 @@  discard block
 block discarded – undo
222 222
     public function getEntityFromDatabaseArray(array $data)
223 223
     {
224 224
         $entity = new UserEntity();
225
-        $entity->id = (int) $data['user_id'];
225
+        $entity->id = (int)$data['user_id'];
226 226
         $entity->username = $data['username'];
227 227
         $entity->password = $data['password'];
228 228
         $entity->email = $data['email'];
229
-        $entity->latitude = (double) $data['latitude'];
230
-        $entity->longitude = (double) $data['longitude'];
231
-        $entity->isActive = (bool) $data['is_active_flag'];
229
+        $entity->latitude = (double)$data['latitude'];
230
+        $entity->longitude = (double)$data['longitude'];
231
+        $entity->isActive = (bool)$data['is_active_flag'];
232 232
         $entity->firstname = $data['first_name'];
233 233
         $entity->lastname = $data['last_name'];
234 234
         $entity->country = $data['country'];
Please login to merge, or discard this patch.