Passed
Push — dev ( b45126...5faaf1 )
by 世昌
02:13
created
suda/src/framework/response/ContentWrapper.php 1 patch
Spacing   +6 added lines, -6 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
     /**
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     public static function isTypeOf($data, string $type) : bool
46 46
     {
47 47
         if (is_object($data)
48
-            && !in_array($type, ['boolean', 'bool', 'integer', 'int', 'float', 'double', 'string','array','NULL'])) {
48
+            && !in_array($type, ['boolean', 'bool', 'integer', 'int', 'float', 'double', 'string', 'array', 'NULL'])) {
49 49
             try {
50 50
                 $class = new ReflectionClass($data);
51 51
                 $typeRef = new ReflectionClass($type);
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      * @param $content
101 101
      * @return ContentWrapperInterface|null
102 102
      */
103
-    private function matchWrapper($content):?ContentWrapperInterface
103
+    private function matchWrapper($content): ?ContentWrapperInterface
104 104
     {
105 105
         foreach ($this->types as $typeConfig) {
106 106
             list($wrapper, $types) = $typeConfig;
Please login to merge, or discard this patch.