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.
Completed
Push — master ( 725689...432516 )
by cao
03:37
created
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/RPC/MultiRequestCore.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
             $this->threads[] = function ()use($thread, $pos){
20 20
                 try{
21 21
                     $this->threadResults[$pos][0] = $thread();
22
-                }catch (\Exception $e){
22
+                } catch (\Exception $e){
23 23
                     $this->threadResults[$pos][1] = $e;
24 24
                 }
25 25
             };
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         $res =  array_pop($this->waitResults);
56 56
         if(isset($res[1])){
57 57
              \PhpBoot\abort(new RpcException($res['reason']));
58
-        }else{
58
+        } else{
59 59
             return $res[0];
60 60
         }
61 61
     }
Please login to merge, or discard this patch.
src/RPC/RpcProxy.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             $op = $this->http->sendAsync($request);
53 53
             $res = MultiRpc::wait($op);
54 54
             return $this->mapResponse($method, $route, $res, $args);
55
-        }else{
55
+        } else{
56 56
             $res = $this->http->send($request);
57 57
             return $this->mapResponse($method, $route, $res, $args);
58 58
         }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                     $query[$k] = $v;
134 134
                 }
135 135
             }
136
-        }else{
136
+        } else{
137 137
             foreach ($request as $k => $v){
138 138
                 if(!in_array($k, ['query', 'request', 'files', 'cookies', 'headers'])){
139 139
                     if($body === null){
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
                 ArrayHelper::set($mapping, $return->source, $data);
206 206
             }
207 207
 
208
-        }else{
208
+        } else{
209 209
 
210 210
             //TODO 如果多个 异常对应同一个 statusCode 怎么处理
211 211
             $exceptions = $route->getExceptionHandler()->getExceptions();
Please login to merge, or discard this patch.
src/RPC/MultiRpc.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
             foreach (Promise\settle($promises)->wait() as $i){
27 27
                 if(isset($i['reason'])){
28 28
                     $res[] = [null, new RpcException($i['reason'])];
29
-                }else{
29
+                } else{
30 30
                     $res[] = [$i['value'], null];
31 31
                 }
32 32
             }
Please login to merge, or discard this patch.
src/Docgen/Swagger/Swagger.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -213,9 +213,9 @@  discard block
 block discarded – undo
213 213
     {
214 214
         if ($content instanceof ReturnMeta || $content instanceof ParamMeta) {
215 215
             return $this->makeExample($content->container);
216
-        }elseif ($content instanceof TypeContainerInterface){
216
+        } elseif ($content instanceof TypeContainerInterface){
217 217
             return $content->makeExample();
218
-        }elseif(is_array($content)) {
218
+        } elseif(is_array($content)) {
219 219
             $res = [];
220 220
             foreach ($content as $k => $v) {
221 221
                 $res[$k] = $this->makeExample($v);
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
                     $paramSchema = new PrimitiveSchemaObject();
371 371
                     if($isFile){
372 372
                         $paramSchema->type = 'file';
373
-                    }else{
373
+                    } else{
374 374
                         $paramSchema->type = self::mapType($param->type);
375 375
                         self::mapValidation($param->validation, $paramSchema);
376 376
                     }
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
         } elseif($container == null){
429 429
             $schema = null ;//new PrimitiveSchemaObject();
430 430
             //$schema->type = null;
431
-        }else {
431
+        } else {
432 432
             $schema = new PrimitiveSchemaObject();
433 433
             //$schema->type = 'mixed';
434 434
         }
Please login to merge, or discard this patch.
src/Controller/ResponseRenderer.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@
 block discarded – undo
23 23
                     $value = json_encode($value, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
24 24
                 //}
25 25
                 $response->setContent($value);
26
-            }elseif($key == 'headers'){
26
+            } elseif($key == 'headers'){
27 27
                 foreach ($value as $k=>$v){
28 28
                     $response->headers->set($k, $v);
29 29
                 }
30
-            }else{
30
+            } else{
31 31
                 \PhpBoot\abort(new \UnexpectedValueException("Unexpected output target $key"));
32 32
             }
33 33
 
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
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         if($tables instanceof BasicRule){
53 53
             $context->appendSql("FROM (".$tables->context->sql.')');
54 54
             $context->params = array_merge($context->params,$tables->context->params);
55
-        }else {
55
+        } else {
56 56
             $context->appendSql("FROM ".DB::wrap($tables));
57 57
         }
58 58
         if($as){
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         $table = DB::wrap($table);
76 76
         if($type){
77 77
             $context->appendSql("$type JOIN $table");
78
-        }else{
78
+        } else{
79 79
             $context->appendSql("JOIN $table");
80 80
         }
81 81
     }
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         foreach ($values as $v){
126 126
             if(is_a($v, Raw::class)){//直接拼接sql,不需要转义
127 127
                 $stubs[]=$v->get();
128
-            }else{
128
+            } else{
129 129
                 $stubs[]='?';
130 130
                 $params[] = $v;
131 131
             }
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
             //VALUES(val0, val1, val2)
137 137
             $context->appendSql("VALUES($stubs)");
138 138
 
139
-        }else{
139
+        } else{
140 140
             //(col0, col1, col2) VALUES(val0, val1, val2)
141 141
             $columns = implode(',', array_map(function($k){return DB::wrap($k);}, array_keys($values)));
142 142
             $context->appendSql("($columns) VALUES($stubs)",false);
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     public function set(Context $context, $expr, $args){
160 160
         if(is_string($expr)){
161 161
             return $this->setExpr($context, $expr, $args);
162
-        }else{
162
+        } else{
163 163
             return $this->setArgs($context, $expr);
164 164
         }
165 165
     }
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         if($this->first){
169 169
             $this->first = false;
170 170
             $prefix = 'SET ';
171
-        }else{
171
+        } else{
172 172
             $prefix = ',';
173 173
         }
174 174
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
             $k = DB::wrap($k);
184 184
             if(is_a($v, Raw::class)){//直接拼接sql,不需要转义
185 185
                 $set[]= "$k=".$v->get();
186
-            }else{
186
+            } else{
187 187
                 $set[]= "$k=?";
188 188
                 $params[]=$v;
189 189
             }
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
             $this->first = false;
193 193
             $context->appendSql('SET '.implode(',', $set));
194 194
             $context->appendParams($params);
195
-        }else{
195
+        } else{
196 196
             $context->appendSql(','.implode(',', $set),false);
197 197
             $context->appendParams($params);
198 198
         }
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
         foreach ($orders as $k=>$v){
210 210
             if(is_integer($k)){
211 211
                 $params[] = DB::wrap($v);
212
-            }else{
212
+            } else{
213 213
                 $k = DB::wrap($k);
214 214
 
215 215
                 $v = strtoupper($v);
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         if($this->first){
222 222
             $this->first = false;
223 223
             $context->appendSql('ORDER BY '.implode(',', $params));
224
-        }else{
224
+        } else{
225 225
             $context->appendSql(','.implode(',', $params),false);
226 226
         }
227 227
         return $this;
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
         if(is_string($column)){
231 231
             if($order === null){
232 232
                 $column = [$column];
233
-            }else{
233
+            } else{
234 234
                 $column = [$column=>$order];
235 235
             }
236 236
         }
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     static public function having(Context $context, $expr, $args){
271 271
         if(is_string($expr)){
272 272
             self::condition($context, 'HAVING', $expr, $args);
273
-        }else{
273
+        } else{
274 274
             self::conditionArgs($context, 'HAVING', $expr);
275 275
         }
276 276
         //TODO 支持 OR 、 闭包
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
         }
283 283
         if (is_string($expr)){
284 284
             self::condition($context, 'WHERE', $expr, $args);
285
-        }else{
285
+        } else{
286 286
             self::conditionArgs($context, 'WHERE', $expr);
287 287
         }
288 288
         //TODO 支持 OR 、 闭包
@@ -331,41 +331,41 @@  discard block
 block discarded – undo
331 331
                     foreach ($var as $i){
332 332
                         if(is_a($i, Raw::class)){
333 333
                             $stubs[]=strval($i);
334
-                        }else{
334
+                        } else{
335 335
                             $stubs[]='?';
336 336
                             $params[] = $i;
337 337
                         }
338 338
                     }
339 339
                     $stubs = implode(',', $stubs);
340 340
                     $exprs[] = "$k $op ($stubs)";
341
-                }else if($op == 'BETWEEN'){
341
+                } else if($op == 'BETWEEN'){
342 342
                     $cond = "$k BETWEEN";
343 343
                     if(is_a($var[0], Raw::class)){
344 344
                         $cond = "$cond ".strval($var[0]);
345
-                    }else{
345
+                    } else{
346 346
                         $cond = "$cond ?";
347 347
                         $params[] = $var[0];
348 348
                     }
349 349
                     if(is_a($var[1], Raw::class)){
350 350
                         $cond = "$cond AND ".strval($var[1]);
351
-                    }else{
351
+                    } else{
352 352
                         $cond = "$cond AND ?";
353 353
                         $params[] = $var[1];
354 354
                     }
355 355
                     $exprs[] = $cond;
356
-                }else{
356
+                } else{
357 357
                     if(is_a($var, Raw::class)){
358 358
                         $exprs[] = "$k $op ".strval($var);
359
-                    }else{
359
+                    } else{
360 360
                         $exprs[] = "$k $op ?";
361 361
                         $params[] = $var;
362 362
                     }
363 363
                 }
364
-            }else{
364
+            } else{
365 365
                 if(is_a($v, Raw::class)){
366 366
                     $exprs[] = "$k = ".strval($v);
367 367
 
368
-                }else{
368
+                } else{
369 369
                     $exprs[] = "$k = ?";
370 370
                     $params[] = $v;
371 371
                 }
@@ -402,18 +402,18 @@  discard block
 block discarded – undo
402 402
                             foreach ($arg as $i){
403 403
                                 if(is_a($i, Raw::class)){
404 404
                                     $stubs[] = strval($i);
405
-                                }else{
405
+                                } else{
406 406
                                     $stubs[] = '?';
407 407
                                     $newArgs[] = $i;
408 408
                                 }
409 409
                             }
410 410
                             $stubs = implode(',', $stubs);
411
-                        }else{
411
+                        } else{
412 412
                             $stubs = strval($arg);
413 413
                         }
414 414
                         $toReplace[] = [$pos, $stubs];
415 415
 
416
-                    }else{
416
+                    } else{
417 417
                         $newArgs[]=$arg;
418 418
                     }
419 419
                 }
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
                 return $context->handleResult($dict);
475 475
             }
476 476
             return $context->handleResult($res);
477
-        }else{
477
+        } else{
478 478
             return false;
479 479
         }
480 480
     }
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
         if(!preg_match('/\bfrom\b/i', $context->sql, $found, PREG_OFFSET_CAPTURE) ||
499 499
             count($found)==0){
500 500
             $columnEnd = strlen($context->sql);
501
-        }else{
501
+        } else{
502 502
             list($chars, $columnEnd) = $found[0];
503 503
         }
504 504
         $sql = substr($context->sql, 0, $columnBegin);
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
         if($st->execute($context->params)){
510 510
             $res = $st->fetchAll(\PDO::FETCH_ASSOC);
511 511
             return $res[0]['count'];
512
-        }else{
512
+        } else{
513 513
             return false;
514 514
         }
515 515
 
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
     public function set($context, $column, $value){
521 521
         if(is_string($column)){
522 522
             $this->setExpr($context, $column, $value);
523
-        }else{
523
+        } else{
524 524
             $this->setArgs($context, $column);
525 525
         }
526 526
     }
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
         if($this->first){
531 531
             $this->first = false;
532 532
             $prefix = 'ON DUPLICATE KEY UPDATE ';
533
-        }else{
533
+        } else{
534 534
             $prefix = ',';
535 535
         }
536 536
 
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
             $k = DB::wrap($k);
546 546
             if(is_a($v, Raw::class)){//直接拼接sql,不需要转义
547 547
                 $set[]= "$k=".$v->get();
548
-            }else{
548
+            } else{
549 549
                 $set[]= "$k=?";
550 550
                 $params[]=$v;
551 551
             }
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
             $this->first = false;
555 555
             $context->appendSql('ON DUPLICATE KEY UPDATE '.implode(',', $set));
556 556
             $context->appendParams($params);
557
-        }else{
557
+        } else{
558 558
             $context->appendSql(','.implode(',', $set),false);
559 559
             $context->appendParams($params);
560 560
         }
Please login to merge, or discard this patch.