Passed
Push — master ( c1447f...6911a9 )
by 世昌
01:47
created
nebula/src/application/route/MatchResult.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@
 block discarded – undo
184 184
             $object = $class->getMethod('instance')->invoke(null);
185 185
             $context->setResponse($object);
186 186
             return $class->getMethod('proccess')->invokeArgs($object, [
187
-                new Runnable([$object,'onRequest']),
187
+                new Runnable([$object, 'onRequest']),
188 188
                 $context->getRequest(),
189 189
                 $this->matcher->getAttribute('buffer', true),
190 190
                 $context->isDebug(),
Please login to merge, or discard this patch.
nebula/src/application/response/Response.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function setStatus(int $code)
86 86
     {
87
-        $this->header->sendHeaderRaw('HTTP/1.1 '.$code.' '. Status::toText($code));
88
-        $this->header->sendHeader('Status', $code.' '. Status::toText($code));
87
+        $this->header->sendHeaderRaw('HTTP/1.1 '.$code.' '.Status::toText($code));
88
+        $this->header->sendHeader('Status', $code.' '.Status::toText($code));
89 89
     }
90 90
 
91 91
     /**
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     public function render($value, string $echo = '', bool $allowEcho = true)
141 141
     {
142 142
         $this->header->send();
143
-        $wantEcho = strlen($echo) > 0 ;
143
+        $wantEcho = strlen($echo) > 0;
144 144
         $noReturn = $wantEcho && is_null($value);
145 145
         if ($noReturn && $wantEcho) {
146 146
             $this->send($echo);
Please login to merge, or discard this patch.
nebula/src/application/response/provider/Content.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 class Content
15 15
 {
16 16
     protected static $types = [
17
-        JsonContent::class => ['boolean', 'integer','double', 'string','array','NULL', JsonSerializable::class],
17
+        JsonContent::class => ['boolean', 'integer', 'double', 'string', 'array', 'NULL', JsonSerializable::class],
18 18
         FileContent::class => [SplFileInfo::class],
19 19
     ];
20 20
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
     public static function isTypeOf($data, $type) : bool
42 42
     {
43
-        if (is_object($data) && !\in_array($type, ['boolean', 'integer','double', 'string','array','NULL'])) {
43
+        if (is_object($data) && !\in_array($type, ['boolean', 'integer', 'double', 'string', 'array', 'NULL'])) {
44 44
             $class = new ReflectionClass($data);
45 45
             $typeRef = new ReflectionClass($type);
46 46
             if ($typeRef->isInterface()) {
Please login to merge, or discard this patch.
nebula/src/component/loader/Path.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,12 +14,12 @@  discard block
 block discarded – undo
14 14
      * @param string $path 目标路径 
15 15
      * @return string|null 返回格式化结果,如果路径不存在则返回NULL
16 16
      */
17
-    public static function format(string $path):?string
17
+    public static function format(string $path): ?string
18 18
     {
19
-        return static::existCharset($path, ['GBK','GB2312','BIG5']);
19
+        return static::existCharset($path, ['GBK', 'GB2312', 'BIG5']);
20 20
     }
21 21
  
22
-    public static function existCharset(string $path, array $charset):?string
22
+    public static function existCharset(string $path, array $charset): ?string
23 23
     {
24 24
         $abspath = static::toAbsolutePath($path);
25 25
         if (static::existCase($abspath)) {
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      * @return boolean
71 71
      */
72 72
     public static function isRelativePath(string $path):bool {
73
-        $path = \str_replace('\\','/', $path);
73
+        $path = \str_replace('\\', '/', $path);
74 74
         return !(strpos($path, ':/') > 0 || strpos($path, '/') === 0);
75 75
     }
76 76
 }
Please login to merge, or discard this patch.