Test Failed
Push — master ( aa2fc1...854ec1 )
by 世昌
01:44
created
nebula/request/Request.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * HTTP请求解析器
12 12
  *
13 13
  */
14
-class Request   {
14
+class Request {
15 15
 
16 16
     use URIAttribute;
17 17
     use FormDataAttribute;
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      * @param mixed $default
61 61
      * @return mixed
62 62
      */
63
-    public function getHeader(string $name, $default =null) {
63
+    public function getHeader(string $name, $default = null) {
64 64
         if (array_key_exists(strtolower($name), $this->headers)) {
65 65
             return $this->headers[$name];
66 66
         }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function ip()
86 86
     {
87
-        static $ipFrom = ['HTTP_CLIENT_IP','HTTP_X_FORWARDED_FOR','HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP','HTTP_FORWARDED_FOR','HTTP_FORWARDED','REMOTE_ADDR'];
87
+        static $ipFrom = ['HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR'];
88 88
         foreach ($ipFrom as $key) {
89 89
             if (array_key_exists($key, $_SERVER)) {
90 90
                 foreach (explode(',', $_SERVER[$key]) as $ip) {
Please login to merge, or discard this patch.
nebula/request/header/HeaderItem.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      *
28 28
      * @var array
29 29
      */
30
-    protected static $headers =[
30
+    protected static $headers = [
31 31
         'content-type' => ContentTypeItem::class,
32 32
     ];
33 33
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             if ($value instanceof HeaderItem) {
70 70
                 $header = $value;
71 71
             } elseif (array_key_exists($name, static::$headers)) {
72
-                $class =static::$headers[$name];
72
+                $class = static::$headers[$name];
73 73
                 $header = new $class($name, $value);
74 74
             } else {
75 75
                 $header = new HeaderItem($name, $value);
Please login to merge, or discard this patch.