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/Controller/Hooks/Cors.php 1 patch
Braces   +4 added lines, -7 removed lines patch added patch discarded remove patch
@@ -64,8 +64,7 @@  discard block
 block discarded – undo
64 64
             if (is_array($allowHeaders)) {
65 65
                 $allowHeaders = implode(", ", $allowHeaders);
66 66
             }
67
-        }
68
-        else {  // Otherwise, use request headers
67
+        } else {  // Otherwise, use request headers
69 68
             $allowHeaders = $req->headers->get("Access-Control-Request-Headers", null ,false);
70 69
         }
71 70
         if (isset($allowHeaders)) {
@@ -81,8 +80,7 @@  discard block
 block discarded – undo
81 80
             $this->setAllowCredentials($req, $rsp);
82 81
             $this->setAllowMethods($req, $rsp);
83 82
             $this->setAllowHeaders($req, $rsp);
84
-        }
85
-        else {
83
+        } else {
86 84
             $this->setOrigin($req, $rsp);
87 85
             $this->setExposeHeaders($req, $rsp);
88 86
             $this->setAllowCredentials($req, $rsp);
@@ -97,11 +95,10 @@  discard block
 block discarded – undo
97 95
     public function handle(Request $request, \Closure $next) {
98 96
         if ($request->getMethod() == 'OPTIONS') {
99 97
             $response = new Response("", 200);
100
-        }
101
-        else {
98
+        } else {
102 99
             try{
103 100
                 $response = $next($request);
104
-            }catch(\Exception $e){
101
+            } catch(\Exception $e){
105 102
                 $response = $this->exceptionRenderer->render($e);
106 103
             }
107 104
         }
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/Controller/ControllerContainerBuilder.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     {
46 46
         if($annotations){
47 47
             parent::__construct($annotations, $cache);
48
-        }else{
48
+        } else{
49 49
             parent::__construct(self::$DEFAULT_ANNOTATIONS, $cache);
50 50
         }
51 51
 
Please login to merge, or discard this patch.
src/Controller/ExceptionRenderer.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
             return new Response($e->getMessage(), $e->getStatusCode());
19 19
         } if($e instanceof \InvalidArgumentException){
20 20
             return new Response($e->getMessage(), Response::HTTP_BAD_REQUEST);
21
-        }else{
21
+        } else{
22 22
             return new Response($e->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR);
23 23
         }
24 24
     }
Please login to merge, or discard this patch.
src/Controller/ExceptionHandler.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
     public function handler(Application $app, callable $call){
54 54
         try{
55 55
             return $call();
56
-        }catch (\Exception $e){
56
+        } catch (\Exception $e){
57 57
             $renderer = $app->get(ExceptionRenderer::class); //TODO 放在这里是否合适
58 58
             return $renderer->render($e);
59 59
         }
Please login to merge, or discard this patch.
src/Controller/RequestHandler.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
                 }
46 46
                 if($meta->container){
47 47
                     $inputs[$meta->name] = $meta->container->make($source);
48
-                }else{
48
+                } else{
49 49
                     $inputs[$meta->name] = $source;
50 50
                 }
51 51
                 if($meta->validation){
52 52
                     $vld->rule($meta->validation, $meta->name);
53 53
                 }
54
-            }else{
54
+            } else{
55 55
                 $meta->isOptional or \PhpBoot\abort(new BadRequestHttpException("param $source is required"));
56 56
                 $inputs[$meta->name] = $meta->default;
57 57
             }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         foreach ($this->paramMetas as $meta){
70 70
             if($meta->isPassedByReference){
71 71
                 $params[$pos] = &$reference[$meta->name];
72
-            }else{
72
+            } else{
73 73
                 $params[$pos] = $inputs[$meta->name];
74 74
             }
75 75
             $pos++;
Please login to merge, or discard this patch.
src/Controller/Annotations/ParamAnnotationHandler.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,13 +25,13 @@
 block discarded – undo
25 25
             $params = new AnnotationParams($text, 2);
26 26
             $paramName = substr($params->getParam(0), 1);
27 27
             $paramDoc = $params->getRawParam(1, '');
28
-        }else{
28
+        } else{
29 29
             $params = new AnnotationParams($text, 3);
30 30
             if ($params->count() >=2 && substr($params->getParam(1), 0, 1) == '$'){
31 31
                 $paramType = $params->getParam(0); //TODO 检测类型是否合法
32 32
                 $paramName = substr($params->getParam(1), 1);
33 33
                 $paramDoc = $params->getRawParam(2, '');
34
-            }else{
34
+            } else{
35 35
                 \PhpBoot\abort(new AnnotationSyntaxException("@param $text syntax error"));
36 36
             }
37 37
         }
Please login to merge, or discard this patch.
src/Controller/Annotations/RouteAnnotationHandler.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
             $source = "request.$paramName";
85 85
             if($route->hasPathParam($paramName)){ //参数来自路由
86 86
                 $source = "request.$paramName";
87
-            }elseif($httpMethod == 'GET'){
87
+            } elseif($httpMethod == 'GET'){
88 88
                 $source = "request.$paramName"; //GET请求显示指定来自query string
89 89
             }
90 90
             $paramClass = $param->getClass();
Please login to merge, or discard this patch.
src/Controller/Annotations/BindAnnotationHandler.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                 $handler->setMapping($params[0], $return);
45 45
             }
46 46
 
47
-        }elseif($ann->parent->name == 'param'){
47
+        } elseif($ann->parent->name == 'param'){
48 48
             list($paramType, $paramName, $paramDoc) = ParamAnnotationHandler::getParamInfo($ann->parent->description);
49 49
 
50 50
             $paramMeta = $route->getRequestHandler()->getParamMeta($paramName);
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
                         ContainerFactory::create($entityBuilder, $paramMeta->type)
60 60
                     )
61 61
                 );
62
-            }else{
62
+            } else{
63 63
                 $paramMeta->source = $params[0];
64 64
             }
65 65
         }
Please login to merge, or discard this patch.