Passed
Push — master ( 8b0ed1...c061fa )
by 世昌
02:48
created
nebula/src/application/response/Response.php 1 patch
Spacing   +4 added lines, -4 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
     /**
@@ -137,12 +137,12 @@  discard block
 block discarded – undo
137 137
             $value = $runnable->run($request, $this);
138 138
         }
139 139
         $this->header->send();
140
-        $wantEcho = strlen($echo) > 0 ;
140
+        $wantEcho = strlen($echo) > 0;
141 141
         $noReturn = $wantEcho && is_null($value);
142 142
         if ($noReturn && $wantEcho) {
143 143
             $this->send($echo);
144 144
         } else {
145
-            if ($allowEcho &&  $wantEcho) {
145
+            if ($allowEcho && $wantEcho) {
146 146
                 echo $echo;
147 147
             }
148 148
             Content::send($this, $value);
Please login to merge, or discard this patch.
nebula/src/application/response/provider/type/FileContent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      
22 22
         if ($content->isFile()) {
23 23
             $response->setType($content->getExtension());
24
-            $response->setHeader('Content-Disposition', 'attachment;filename="' . $content->getBasename().'"');
24
+            $response->setHeader('Content-Disposition', 'attachment;filename="'.$content->getBasename().'"');
25 25
             $response->setHeader('Cache-Control', 'max-age=0');
26 26
             $response->send(file_get_contents($content->getRealPath()));
27 27
         } else {
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
             return $class->isSubclassOf($type) || $class->implementsInterface($type);
46 46
         } else {
Please login to merge, or discard this patch.