Passed
Push — master ( cd746f...f9653a )
by 世昌
02:32
created
nebula/request/attribute/SchemeAttribute.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,9 +53,9 @@
 block discarded – undo
53 53
     }
54 54
 
55 55
     /**
56
-      * Get 服务器属性
57
-      *
58
-      * @return  array
59
-      */
56
+     * Get 服务器属性
57
+     *
58
+     * @return  array
59
+     */
60 60
     abstract public function getServer();
61 61
 }
Please login to merge, or discard this patch.
nebula/request/Request.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      * @param mixed $default
67 67
      * @return mixed
68 68
      */
69
-    public function getHeader(string $name, $default =null) {
69
+    public function getHeader(string $name, $default = null) {
70 70
         if (array_key_exists(strtolower($name), $this->headers)) {
71 71
             return $this->headers[$name];
72 72
         }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     public function ip()
92 92
     {
93
-        static $ipFrom = ['HTTP_CLIENT_IP','HTTP_X_FORWARDED_FOR','HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP','HTTP_FORWARDED_FOR','HTTP_FORWARDED','REMOTE_ADDR'];
93
+        static $ipFrom = ['HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR'];
94 94
         foreach ($ipFrom as $key) {
95 95
             if (array_key_exists($key, $_SERVER)) {
96 96
                 foreach (explode(',', $_SERVER[$key]) as $ip) {
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
         }
119 119
         $method = strtoupper($server['REQUEST_METHOD'] ?? 'GET');
120 120
         $uri = $server['REQUEST_URI']??'/';
121
-        $headers  = HeaderItem::buildFromServer($server ?? []);
122
-        $request =  new Request($method, $uri, $headers);
121
+        $headers = HeaderItem::buildFromServer($server ?? []);
122
+        $request = new Request($method, $uri, $headers);
123 123
         $request->setDocumentRoot($server['DOCUMENT_ROOT']);
124 124
         if ($simulate) {
125 125
             $request->setServer($server);
Please login to merge, or discard this patch.