Passed
Push — sudav3 ( 9ddd82...36433a )
by 世昌
02:30
created
suda/src/framework/response/ContentWrapper.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
 class ContentWrapper
18 18
 {
19 19
     protected $types = [
20
-       [ JsonContentWrapper::class , ['array', JsonSerializable::class],],
21
-       [ HtmlContentWrapper::class , ['boolean', 'integer','double', 'string'],],
22
-       [ NullContentWrapper::class , ['NULL'],],
23
-       [ FileContentWrapper::class , [SplFileObject::class],],
20
+       [JsonContentWrapper::class, ['array', JsonSerializable::class], ],
21
+       [HtmlContentWrapper::class, ['boolean', 'integer', 'double', 'string'], ],
22
+       [NullContentWrapper::class, ['NULL'], ],
23
+       [FileContentWrapper::class, [SplFileObject::class], ],
24 24
     ];
25 25
 
26 26
     /**
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public static function isTypeOf($data, string $type) : bool
46 46
     {
47
-        if (is_object($data) && !\in_array($type, ['boolean', 'bool', 'integer', 'int', 'float', 'double', 'string','array','NULL'])) {
47
+        if (is_object($data) && !\in_array($type, ['boolean', 'bool', 'integer', 'int', 'float', 'double', 'string', 'array', 'NULL'])) {
48 48
             $class = new ReflectionClass($data);
49 49
             $typeRef = new ReflectionClass($type);
50 50
             if ($typeRef->isInterface()) {
Please login to merge, or discard this patch.