Passed
Push — next ( c17964...71579b )
by Thomas
01:56
created
htdocs/src/AppBundle/Form/UploadFieldNotesType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
                 ]
55 55
             );
56 56
 
57
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
57
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) {
58 58
             $data = $event->getData();
59 59
             $form = $event->getForm();
60 60
 
Please login to merge, or discard this patch.
htdocs/lib2/db.inc.php 2 patches
Doc Comments   +58 added lines, -1 removed lines patch added patch discarded remove patch
@@ -336,6 +336,9 @@  discard block
 block discarded – undo
336 336
     return $result;
337 337
 }
338 338
 
339
+/**
340
+ * @param string $sql
341
+ */
339 342
 function sqlf($sql)
340 343
 {
341 344
     global $db;
@@ -349,6 +352,9 @@  discard block
 block discarded – undo
349 352
     return $result;
350 353
 }
351 354
 
355
+/**
356
+ * @param string $sql
357
+ */
352 358
 function sqlf_slave($sql)
353 359
 {
354 360
     global $db;
@@ -362,6 +368,9 @@  discard block
 block discarded – undo
362 368
     return $result;
363 369
 }
364 370
 
371
+/**
372
+ * @param string $sql
373
+ */
365 374
 function sqll($sql)
366 375
 {
367 376
     global $db;
@@ -375,6 +384,10 @@  discard block
 block discarded – undo
375 384
     return $result;
376 385
 }
377 386
 
387
+/**
388
+ * @param string $sql
389
+ * @param integer $default
390
+ */
378 391
 function sqlf_value($sql, $default)
379 392
 {
380 393
     global $db;
@@ -388,6 +401,10 @@  discard block
 block discarded – undo
388 401
     return $result;
389 402
 }
390 403
 
404
+/**
405
+ * @param string $sql
406
+ * @param integer $default
407
+ */
391 408
 function sqll_value($sql, $default)
392 409
 {
393 410
     global $db;
@@ -463,6 +480,9 @@  discard block
 block discarded – undo
463 480
     return sql_value_internal(true, $sql, $default, $args);
464 481
 }
465 482
 
483
+/**
484
+ * @param boolean $bQuerySlave
485
+ */
466 486
 function sql_value_internal($bQuerySlave, $sql, $default)
467 487
 {
468 488
     $args = func_get_args();
@@ -563,7 +583,7 @@  discard block
 block discarded – undo
563 583
 }
564 584
 
565 585
 /**
566
- * @param $rs
586
+ * @param resource $rs
567 587
  *
568 588
  * @return array
569 589
  */
@@ -616,11 +636,17 @@  discard block
 block discarded – undo
616 636
     return mysql_insert_id($db['dblink_slave']);
617 637
 }
618 638
 
639
+/**
640
+ * @param resource $rs
641
+ */
619 642
 function sql_num_rows($rs)
620 643
 {
621 644
     return mysql_num_rows($rs);
622 645
 }
623 646
 
647
+/**
648
+ * @param string $table
649
+ */
624 650
 function sql_temp_table($table)
625 651
 {
626 652
     global $db, $opt;
@@ -650,6 +676,9 @@  discard block
 block discarded – undo
650 676
     $db['temptables'][$table] = $table;
651 677
 }
652 678
 
679
+/**
680
+ * @param string $table
681
+ */
653 682
 function sql_temp_table_slave($table)
654 683
 {
655 684
     global $db, $opt;
@@ -670,6 +699,9 @@  discard block
 block discarded – undo
670 699
     $db['temptables_slave'][$table] = $table;
671 700
 }
672 701
 
702
+/**
703
+ * @param string $table
704
+ */
673 705
 function sql_drop_temp_table($table)
674 706
 {
675 707
     global $db, $opt;
@@ -706,6 +738,9 @@  discard block
 block discarded – undo
706 738
     $db['temptables'][$newname] = $newname;
707 739
 }
708 740
 
741
+/**
742
+ * @param string $table
743
+ */
709 744
 function sql_drop_temp_table_slave($table)
710 745
 {
711 746
     global $db, $opt;
@@ -1070,6 +1105,9 @@  discard block
 block discarded – undo
1070 1105
     }
1071 1106
 }
1072 1107
 
1108
+/**
1109
+ * @param string $warnmessage
1110
+ */
1073 1111
 function sql_warn($warnmessage)
1074 1112
 {
1075 1113
     global $opt;
@@ -1097,6 +1135,9 @@  discard block
 block discarded – undo
1097 1135
     }
1098 1136
 }
1099 1137
 
1138
+/**
1139
+ * @param resource $rs
1140
+ */
1100 1141
 function sql_export_recordset($f, $rs, $table, $truncate = true)
1101 1142
 {
1102 1143
     fwrite($f, "SET NAMES 'utf8';\n");
@@ -1127,6 +1168,9 @@  discard block
 block discarded – undo
1127 1168
     }
1128 1169
 }
1129 1170
 
1171
+/**
1172
+ * @param resource $f
1173
+ */
1130 1174
 function sql_export_table($f, $table)
1131 1175
 {
1132 1176
     $primary = [];
@@ -1148,6 +1192,10 @@  discard block
 block discarded – undo
1148 1192
     sql_free_result($rs);
1149 1193
 }
1150 1194
 
1195
+/**
1196
+ * @param string $filename
1197
+ * @param string[] $tables
1198
+ */
1151 1199
 function sql_export_tables_to_file($filename, $tables)
1152 1200
 {
1153 1201
     $f = fopen($filename, 'w');
@@ -1175,6 +1223,9 @@  discard block
 block discarded – undo
1175 1223
     fclose($f);
1176 1224
 }
1177 1225
 
1226
+/**
1227
+ * @param resource $f
1228
+ */
1178 1229
 function sql_export_structure($f, $table)
1179 1230
 {
1180 1231
     $rs = sql("SHOW CREATE TABLE `&1`", $table);
@@ -1190,6 +1241,9 @@  discard block
 block discarded – undo
1190 1241
     fwrite($f, $sTableSql . " ;\n");
1191 1242
 }
1192 1243
 
1244
+/**
1245
+ * @param string $filename
1246
+ */
1193 1247
 function sql_export_structure_to_file($filename, $table)
1194 1248
 {
1195 1249
     $f = fopen($filename, 'w');
@@ -1263,6 +1317,9 @@  discard block
 block discarded – undo
1263 1317
 }
1264 1318
 
1265 1319
 // test if a function or procedure exists
1320
+/**
1321
+ * @param string $type
1322
+ */
1266 1323
 function sql_fp_exists($type, $name)
1267 1324
 {
1268 1325
     global $opt;
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         // & escaped?
182 182
         $escapesCount = 0;
183 183
         while ((($nextarg - $escapesCount - 1) > 0) && (substr($sql, $nextarg - $escapesCount - 1, 1) == '\\')) {
184
-            $escapesCount ++;
184
+            $escapesCount++;
185 185
         }
186 186
         if (($escapesCount % 2) === 1) {
187 187
             $nextarg++;
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
                 while (preg_match('/^[0-9]{1}/', $nextchar) === 1) {
196 196
                     $arg .= $nextchar;
197 197
 
198
-                    $arglength ++;
198
+                    $arglength++;
199 199
                     $nextchar = substr($sql, $nextarg + $arglength + 1, 1);
200 200
                 }
201 201
 
@@ -221,13 +221,13 @@  discard block
 block discarded – undo
221 221
                         // strip apostroph and insert NULL
222 222
                         $filtered_sql = substr($filtered_sql, 0, strlen($filtered_sql) - 1);
223 223
                         $filtered_sql .= 'NULL';
224
-                        $sqlpos ++;
224
+                        $sqlpos++;
225 225
                     } else {
226 226
                         $filtered_sql .= 'NULL';
227 227
                     }
228 228
                 }
229 229
 
230
-                $sqlpos ++;
230
+                $sqlpos++;
231 231
             } else {
232 232
                 $arglength = 0;
233 233
                 $arg = '';
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
                 while (preg_match('/^[a-zA-Z0-9_]{1}/', $nextchar) == 1) {
238 238
                     $arg .= $nextchar;
239 239
 
240
-                    $arglength ++;
240
+                    $arglength++;
241 241
                     $nextchar = substr($sql, $nextarg + $arglength + 1, 1);
242 242
                 }
243 243
 
@@ -284,12 +284,12 @@  discard block
 block discarded – undo
284 284
         $escapesCount = 0;
285 285
         while ((($nextarg - $escapesCount - 1) > 0)
286 286
             && (substr($filtered_sql, $nextarg - $escapesCount - 1, 1) == '\\')) {
287
-            $escapesCount ++;
287
+            $escapesCount++;
288 288
         }
289 289
         if (($escapesCount % 2) == 0) {
290 290
             // strip escapes of &
291 291
             $filtered_sql = substr($filtered_sql, 0, $nextarg) . '&' . substr($filtered_sql, $nextarg + 2);
292
-            $nextarg --;
292
+            $nextarg--;
293 293
         }
294 294
 
295 295
         $nextarg = strpos($filtered_sql, '\&', $nextarg + 2);
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
         AND `online`= 1
827 827
         AND (TIMESTAMP(NOW())-TIMESTAMP(`last_check`)+`time_diff`<'&1')
828 828
         ORDER BY `w` DESC LIMIT 1",
829
-        - 1,
829
+        -1,
830 830
         $nMaxTimeDiff
831 831
     );
832 832
 
Please login to merge, or discard this patch.
htdocs/src/Oc/SmartyPlugins/prefilter.t.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -282,6 +282,9 @@
 block discarded – undo
282 282
     return $start;
283 283
 }
284 284
 
285
+/**
286
+ * @param integer $line
287
+ */
285 288
 function smarty_prefilter_t_gettext($message, $attrs, &$smarty, $line)
286 289
 {
287 290
     global $opt, $translate;
Please login to merge, or discard this patch.
htdocs/okapi_settings.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         'DATA_LICENSE_URL' => $opt['page']['absolute_url'] . $opt['logic']['license']['terms'],
34 34
         'DEBUG'            => ($opt['debug'] & DEBUG_DEVELOPER != 0),
35 35
         'DEBUG_PREVENT_SEMAPHORES'
36
-                           => !$opt['php']['semaphores'], # not available on old developer system
36
+                            => !$opt['php']['semaphores'], # not available on old developer system
37 37
         'DB_SERVER'        => $opt['db']['servername'],
38 38
         'DB_NAME'          => $opt['db']['placeholder']['db'],
39 39
         'DB_USERNAME'      => $opt['db']['username'],
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         'OC_NODE_ID'       => $opt['logic']['node']['id'],
55 55
         'OC_COOKIE_NAME'   => $opt['session']['cookiename'] . 'data',
56 56
         'OCDE_HTML_PURIFIER_SETTINGS'
57
-                           => $opt['html_purifier'],
57
+                            => $opt['html_purifier'],
58 58
         'GITHUB_ACCESS_TOKEN' => $opt['okapi']['github_access_token'],
59 59
     );
60 60
 }
Please login to merge, or discard this patch.
htdocs/config2/settings-dist.inc.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@  discard block
 block discarded – undo
8 8
  *  Do not modify this file - use settings.inc.php!
9 9
  ***************************************************************************/
10 10
 
11
-require_once __DIR__. '/locale.inc.php';
12
-require_once __DIR__. '/settings-dist-common.inc.php';
11
+require_once __DIR__ . '/locale.inc.php';
12
+require_once __DIR__ . '/settings-dist-common.inc.php';
13 13
 
14 14
 /* PHP settings
15 15
  *
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 // database placeholder
109 109
 
110 110
 // productive database with opencaching-tables
111
-$opt['db']['placeholder']['db'] = '';    // selected by default
111
+$opt['db']['placeholder']['db'] = ''; // selected by default
112 112
 
113 113
 // empty database for temporary table creation
114 114
 $opt['db']['placeholder']['tmpdb'] = '';
@@ -122,14 +122,14 @@  discard block
 block discarded – undo
122 122
 $opt['system']['maillog']['syslog_db_user'] = '';
123 123
 $opt['system']['maillog']['syslog_db_password'] = '';
124 124
 $opt['system']['maillog']['syslog_db_table'] = '';
125
-$opt['system']['maillog']['syslog_oc_host'] = '';  // 'host_name' column in syslog DB
126
-$opt['system']['maillog']['syslog_mta'] = 'postfix/smtp%';  // 'program' column in syslog DB
127
-$opt['system']['maillog']['column']['id'] = 'id';               // 'ID'
128
-$opt['system']['maillog']['column']['created'] = 'created';     // 'ReceivedAt'
125
+$opt['system']['maillog']['syslog_oc_host'] = ''; // 'host_name' column in syslog DB
126
+$opt['system']['maillog']['syslog_mta'] = 'postfix/smtp%'; // 'program' column in syslog DB
127
+$opt['system']['maillog']['column']['id'] = 'id'; // 'ID'
128
+$opt['system']['maillog']['column']['created'] = 'created'; // 'ReceivedAt'
129 129
 $opt['system']['maillog']['column']['host_name'] = 'host_name'; // 'FromHost'
130
-$opt['system']['maillog']['column']['message'] = 'message';     // 'Message'
131
-$opt['system']['maillog']['column']['program'] = 'program';     // 'SysLogTag'
132
-$opt['system']['maillog']['inactivity_warning'] = 30;   // warn after N days without new entries
130
+$opt['system']['maillog']['column']['message'] = 'message'; // 'Message'
131
+$opt['system']['maillog']['column']['program'] = 'program'; // 'SysLogTag'
132
+$opt['system']['maillog']['inactivity_warning'] = 30; // warn after N days without new entries
133 133
 
134 134
 /* cookie or session
135 135
  *
@@ -151,15 +151,15 @@  discard block
 block discarded – undo
151 151
  * 
152 152
  * other parameters may be customized
153 153
  */
154
-$opt['session']['mode'] = SAVE_COOKIE;     // don't change - other option "SAVE_SESSION" is not implemented properly
154
+$opt['session']['mode'] = SAVE_COOKIE; // don't change - other option "SAVE_SESSION" is not implemented properly
155 155
 $opt['session']['cookiename'] = 'oc_devel'; // only with SAVE_COOKIE
156 156
 $opt['session']['path'] = '/';
157
-$opt['session']['domain'] = '';    // may be overwritten by $opt['domain'][...]['cookiedomain']
157
+$opt['session']['domain'] = ''; // may be overwritten by $opt['domain'][...]['cookiedomain']
158 158
 
159 159
 /* maximum session lifetime
160 160
  */
161 161
 $opt['session']['expire']['cookie'] = 31536000; // when cookies used (default 1 year)
162
-$opt['session']['expire']['url'] = 1800;        // when no cookies used (default 30 min since last call), attention to session.js
162
+$opt['session']['expire']['url'] = 1800; // when no cookies used (default 30 min since last call), attention to session.js
163 163
 
164 164
 /* If the Referer was sent by the client and the substring was not found,
165 165
  * the embedded session id will be marked as invalid.
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 /* other template options
186 186
  *
187 187
  */
188
-$opt['page']['origin_url'] = 'http://www.opencaching.de/';  // production installation for this OC site
188
+$opt['page']['origin_url'] = 'http://www.opencaching.de/'; // production installation for this OC site
189 189
 $opt['page']['develsystem'] = false;
190 190
 $opt['page']['teampic_url'] = 'http://www.opencaching.de/images/team/';
191 191
 $opt['page']['teammember_url'] = 'http://www.opencaching.de/';
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     'newcaches' => [
220 220
         'show' => true,
221 221
         'url' => 'http://www.opencaching.de',
222
-        'urlname' => '',  // optional: show other name than the url-domain
222
+        'urlname' => '', // optional: show other name than the url-domain
223 223
     ],
224 224
 ];
225 225
 
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 
379 379
 /* license-related functions
380 380
  */
381
-$opt['logic']['license']['newusers'] = 2;  // see license constants in lib2/logic/const.inc.php
381
+$opt['logic']['license']['newusers'] = 2; // see license constants in lib2/logic/const.inc.php
382 382
 $opt['logic']['license']['admin'] = true;
383 383
 $opt['logic']['license']['disclaimer'] = false;
384 384
 $opt['logic']['license']['terms'] = 'articles.php?page=impressum#datalicense';
@@ -386,18 +386,18 @@  discard block
 block discarded – undo
386 386
 
387 387
 /* optional APIs
388 388
  */
389
-$opt['logic']['api']['email_problems']['key'] = '';   // must be set to enable
390
-$opt['logic']['api']['user_inactivity']['key'] = '';  // must be set to enable
389
+$opt['logic']['api']['email_problems']['key'] = ''; // must be set to enable
390
+$opt['logic']['api']['user_inactivity']['key'] = ''; // must be set to enable
391 391
 
392 392
 /* cache report info settings
393 393
  */
394 394
 $opt['logic']['cache_reports']['delaydays'] = 2;
395
-$opt['logic']['cache_reports']['min_processperday'] = 5;   // set to 0 to disable
396
-$opt['logic']['cache_reports']['max_processperday'] = 20;  // set to 0 to disable
395
+$opt['logic']['cache_reports']['min_processperday'] = 5; // set to 0 to disable
396
+$opt['logic']['cache_reports']['max_processperday'] = 20; // set to 0 to disable
397 397
 
398 398
 /* cronjob
399 399
  */
400
-$opt['cron']['username'] = 'apache';   // system username for cronjobs
400
+$opt['cron']['username'] = 'apache'; // system username for cronjobs
401 401
 
402 402
 /* phpbb news integration (index.php, outdated)
403 403
  *
Please login to merge, or discard this patch.