@@ -21,7 +21,7 @@ |
||
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 { |
@@ -14,7 +14,7 @@ discard block |
||
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 |
||
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 { |