GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Branch master (eecfea)
by cao
03:46
created
src/Cache/CheckableCache.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
                     }
64 64
                     
65 65
                 }
66
-            }else if ($ttl != 0 && ($createdTime + $ttl < time())) {
66
+            } else if ($ttl != 0 && ($createdTime + $ttl < time())) {
67 67
                 $this->impl->delete($name);
68 68
                 return $default;
69 69
             }
Please login to merge, or discard this patch.
src/Cache/FileModifiedChecker.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@
 block discarded – undo
14 14
         $fileNames = array();
15 15
         if(is_string($fileName)){
16 16
             $fileNames[]=$fileName;
17
-        }else{
17
+        } else{
18 18
             is_array($fileName) or \PhpBoot\abort(new \InvalidArgumentException("string or array is required by param 0"));
19 19
             $fileNames = $fileName;
20 20
         }
21 21
         foreach ($fileNames as $fileName){
22 22
             if(is_file($fileName)){
23 23
                 $this->fileName[$fileName] = @filemtime($fileName);
24
-            }else {
24
+            } else {
25 25
                 $this->fileName[$fileName] = @filemtime($fileName);
26 26
                 if(!is_dir($fileName)){
27 27
                     continue;
Please login to merge, or discard this patch.
src/Application.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             $default += [
88 88
                 Cache::class => \DI\object(ApcCache::class)
89 89
             ];
90
-        }else{
90
+        } else{
91 91
             $default += [
92 92
                 Cache::class => \DI\object(FilesystemCache::class)
93 93
                     ->constructorParameter('directory', sys_get_temp_dir())
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
                     }
271 271
                     return $next($request);
272 272
 
273
-                }elseif ($res[0] == Dispatcher::NOT_FOUND) {
273
+                } elseif ($res[0] == Dispatcher::NOT_FOUND) {
274 274
                     \PhpBoot\abort(new NotFoundHttpException(), [$request->getMethod(), $uri]);
275 275
                 } elseif ($res[0] == Dispatcher::METHOD_NOT_ALLOWED) {
276 276
                     \PhpBoot\abort(new MethodNotAllowedHttpException($res[1]), [$request->getMethod(), $uri]);
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
             }
295 295
             return $response;
296 296
 
297
-        }catch (\Exception $e){
297
+        } catch (\Exception $e){
298 298
             $renderer->render($e);
299 299
         }
300 300
 
Please login to merge, or discard this patch.
src/functions.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         if($error instanceof \Exception){
22 22
             $e = $error;
23 23
             $message = "exception '".get_class($error)."' with message {$error->getMessage()}";
24
-        }else{
24
+        } else{
25 25
             $e = new \RuntimeException($error);
26 26
             $message = $error;
27 27
         }
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         if($e->getFile() == __FILE__){
31 31
             $file = $trace[0]['file'];
32 32
             $line = $trace[0]['line'];
33
-        }else{
33
+        } else{
34 34
             $file = $e->getFile();
35 35
             $line = $e->getLine();
36 36
         }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     {
54 54
         if(is_object($entity)){
55 55
             return $db->getApp()->make(ModelWithObject::class, ['db'=>$db, 'entity'=>$entity]);
56
-        }else{
56
+        } else{
57 57
             return $db->getApp()->make(ModelWithClass::class, ['db'=>$db, 'entityName'=>$entity]);
58 58
         }
59 59
     }
Please login to merge, or discard this patch.
src/DB/Context.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
     public function appendSql($sql, $addSpace=true){
18 18
         if($this->sql == ''){
19 19
             $this->sql = $sql;
20
-        }else{
20
+        } else{
21 21
             if($addSpace){
22 22
                 $this->sql = $this->sql.' '.$sql;
23
-            }else{
23
+            } else{
24 24
                 $this->sql = $this->sql.$sql;
25 25
             }
26 26
         }
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         if($resultHandler = $this->resultHandler){
39 39
             return $resultHandler($result);
40
-        }else{
40
+        } else{
41 41
             return $result;
42 42
         }
43 43
     }
Please login to merge, or discard this patch.
src/DB/NestedStringCut.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         if($pos !== false){
64 64
             $this->snippets[$ori] = substr($str, $ori, $pos-$ori);
65 65
             $pos ++;
66
-        }else{
66
+        } else{
67 67
             $this->snippets[$ori] = substr($str, $ori);
68 68
         }
69 69
         return $pos;
Please login to merge, or discard this patch.
src/DB/impls.php 1 patch
Braces   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         if($tables instanceof BasicRule){
52 52
             $context->appendSql("FROM (".$tables->context->sql.')');
53 53
             $context->params = array_merge($context->params,$tables->context->params);
54
-        }else {
54
+        } else {
55 55
             $context->appendSql("FROM `$tables`");
56 56
         }
57 57
         if($as){
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     static public function join($context, $type, $table) {
74 74
         if($type){
75 75
             $context->appendSql("$type JOIN $table");
76
-        }else{
76
+        } else{
77 77
             $context->appendSql("JOIN $table");
78 78
         }
79 79
     }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         foreach ($values as $v){
121 121
             if(is_a($v, Raw::class)){//直接拼接sql,不需要转义
122 122
                 $stubs[]=$v->get();
123
-            }else{
123
+            } else{
124 124
                 $stubs[]='?';
125 125
                 $params[] = $v;
126 126
             }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
             //VALUES(val0, val1, val2)
132 132
             $context->appendSql("VALUES($stubs)");
133 133
 
134
-        }else{
134
+        } else{
135 135
             //(col0, col1, col2) VALUES(val0, val1, val2)
136 136
             $columns = implode(',', array_keys($values));
137 137
             $context->appendSql("($columns) VALUES($stubs)",false);
@@ -155,12 +155,12 @@  discard block
 block discarded – undo
155 155
         if($this->first){
156 156
             $this->first = false;
157 157
             $prefix = 'SET ';
158
-        }else{
158
+        } else{
159 159
             $prefix = ',';
160 160
         }
161 161
         if(is_a($value, Raw::class)){
162 162
             $context->appendSql("$prefix$column=$value",$prefix == 'SET ');
163
-        }else{
163
+        } else{
164 164
             $context->appendSql("$prefix$column=?",$prefix == 'SET ');
165 165
             $context->appendParams([$value]);
166 166
         }
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         if($this->first){
172 172
             $this->first = false;
173 173
             $prefix = 'SET ';
174
-        }else{
174
+        } else{
175 175
             $prefix = ',';
176 176
         }
177 177
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         foreach ($values as $k=>$v){
186 186
             if(is_a($v, Raw::class)){//直接拼接sql,不需要转义
187 187
                 $set[]= "$k=".$v->get();
188
-            }else{
188
+            } else{
189 189
                 $set[]= "$k=?";
190 190
                 $params[]=$v;
191 191
             }
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
             $this->first = false;
195 195
             $context->appendSql('SET '.implode(',', $set));
196 196
             $context->appendParams($params);
197
-        }else{
197
+        } else{
198 198
             $context->appendSql(','.implode(',', $set),false);
199 199
             $context->appendParams($params);
200 200
         }
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
                     new \InvalidArgumentException("invalid params for orderBy(".json_encode($orders).")"));
215 215
 
216 216
                 $params[] = $v;
217
-            }else{
217
+            } else{
218 218
                 $v = strtoupper($v);
219 219
                 preg_match('/^[a-zA-Z0-9_.]+$/', $k) &&
220 220
                 ($v =='DESC' || $v =='ASC') or \PhpBoot\abort( new \InvalidArgumentException("invalid params for orderBy(".json_encode($orders).")"));
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
         if($this->first){
226 226
             $this->first = false;
227 227
             $context->appendSql('ORDER BY '.implode(',', $params));
228
-        }else{
228
+        } else{
229 229
             $context->appendSql(','.implode(',', $params),false);
230 230
         }
231 231
         return $this;
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         if($this->first){
235 235
             $this->first = false;
236 236
             $context->appendSql("ORDER BY $column");
237
-        }else{
237
+        } else{
238 238
             $context->appendSql(",$column", false);
239 239
         }
240 240
         if($order){
@@ -327,41 +327,41 @@  discard block
 block discarded – undo
327 327
                     foreach ($var as $i){
328 328
                         if(is_a($i, Raw::class)){
329 329
                             $stubs[]=strval($i);
330
-                        }else{
330
+                        } else{
331 331
                             $stubs[]='?';
332 332
                             $params[] = $i;
333 333
                         }
334 334
                     }
335 335
                     $stubs = implode(',', $stubs);
336 336
                     $exprs[] = "$k $op ($stubs)";
337
-                }else if($op == 'BETWEEN'){
337
+                } else if($op == 'BETWEEN'){
338 338
                     $cond = "$k BETWEEN";
339 339
                     if(is_a($var[0], Raw::class)){
340 340
                         $cond = "$cond ".strval($var[0]);
341
-                    }else{
341
+                    } else{
342 342
                         $cond = "$cond ?";
343 343
                         $params[] = $var[0];
344 344
                     }
345 345
                     if(is_a($var[1], Raw::class)){
346 346
                         $cond = "$cond AND ".strval($var[1]);
347
-                    }else{
347
+                    } else{
348 348
                         $cond = "$cond AND ?";
349 349
                         $params[] = $var[1];
350 350
                     }
351 351
                     $exprs[] = $cond;
352
-                }else{
352
+                } else{
353 353
                     if(is_a($var, Raw::class)){
354 354
                         $exprs[] = "$k $op ".strval($var);
355
-                    }else{
355
+                    } else{
356 356
                         $exprs[] = "$k $op ?";
357 357
                         $params[] = $var;
358 358
                     }
359 359
                 }
360
-            }else{
360
+            } else{
361 361
                 if(is_a($v, Raw::class)){
362 362
                     $exprs[] = "$k = ".strval($v);
363 363
 
364
-                }else{
364
+                } else{
365 365
                     $exprs[] = "$k = ?";
366 366
                     $params[] = $v;
367 367
                 }
@@ -398,18 +398,18 @@  discard block
 block discarded – undo
398 398
                             foreach ($arg as $i){
399 399
                                 if(is_a($i, Raw::class)){
400 400
                                     $stubs[] = strval($i);
401
-                                }else{
401
+                                } else{
402 402
                                     $stubs[] = '?';
403 403
                                     $newArgs[] = $i;
404 404
                                 }
405 405
                             }
406 406
                             $stubs = implode(',', $stubs);
407
-                        }else{
407
+                        } else{
408 408
                             $stubs = strval($arg);
409 409
                         }
410 410
                         $toReplace[] = [$pos, $stubs];
411 411
 
412
-                    }else{
412
+                    } else{
413 413
                         $newArgs[]=$arg;
414 414
                     }
415 415
                 }
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
                 return $context->handleResult($dict);
470 470
             }
471 471
             return $context->handleResult($res);
472
-        }else{
472
+        } else{
473 473
             return false;
474 474
         }
475 475
     }
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
         if(!preg_match('/\bfrom\b/i', $context->sql, $found, PREG_OFFSET_CAPTURE) ||
494 494
             count($found)==0){
495 495
             $columnEnd = strlen($context->sql);
496
-        }else{
496
+        } else{
497 497
             list($chars, $columnEnd) = $found[0];
498 498
         }
499 499
         $sql = substr($context->sql, 0, $columnBegin);
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
         if($st->execute($context->params)){
505 505
             $res = $st->fetchAll(\PDO::FETCH_ASSOC);
506 506
             return $res[0]['count'];
507
-        }else{
507
+        } else{
508 508
             return false;
509 509
         }
510 510
 
@@ -517,12 +517,12 @@  discard block
 block discarded – undo
517 517
         if($this->first){
518 518
             $this->first = false;
519 519
             $prefix = 'ON DUPLICATE KEY UPDATE ';
520
-        }else{
520
+        } else{
521 521
             $prefix = ',';
522 522
         }
523 523
         if(is_a($value, Raw::class)){
524 524
             $context->appendSql("$prefix$column=$value",$prefix == 'ON DUPLICATE KEY UPDATE ');
525
-        }else{
525
+        } else{
526 526
             $context->appendSql("$prefix$column=?",$prefix == 'ON DUPLICATE KEY UPDATE ');
527 527
             $context->appendParams([$value]);
528 528
         }
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
         if($this->first){
534 534
             $this->first = false;
535 535
             $prefix = 'ON DUPLICATE KEY UPDATE ';
536
-        }else{
536
+        } else{
537 537
             $prefix = ',';
538 538
         }
539 539
 
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
         foreach ($values as $k=>$v){
548 548
             if(is_a($v, Raw::class)){//直接拼接sql,不需要转义
549 549
                 $set[]= "$k=".$v->get();
550
-            }else{
550
+            } else{
551 551
                 $set[]= "$k=?";
552 552
                 $params[]=$v;
553 553
             }
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
             $this->first = false;
557 557
             $context->appendSql('ON DUPLICATE KEY UPDATE '.implode(',', $set));
558 558
             $context->appendParams($params);
559
-        }else{
559
+        } else{
560 560
             $context->appendSql(','.implode(',', $set),false);
561 561
             $context->appendParams($params);
562 562
         }
Please login to merge, or discard this patch.
src/DB/rules/select.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@
 block discarded – undo
214 214
     public function where($conditions, $_=null) {
215 215
         if(is_array($conditions)){
216 216
             WhereImpl::whereArgs($this->context, $conditions);
217
-        }else{
217
+        } else{
218 218
             WhereImpl::where($this->context, $conditions, array_slice(func_get_args(), 1));
219 219
         }
220 220
 
Please login to merge, or discard this patch.
src/DB/DB.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,9 +100,9 @@
 block discarded – undo
100 100
         $obj = new SelectRule(new Context($this->connection));
101 101
         if($column0 == null){
102 102
             $args = ['*'];
103
-        }elseif(is_array($column0)){
103
+        } elseif(is_array($column0)){
104 104
             $args = $column0;
105
-        }else{
105
+        } else{
106 106
             $args = func_get_args();
107 107
         }
108 108
         foreach ($args as &$arg){
Please login to merge, or discard this patch.