@@ -17,10 +17,10 @@ discard block |
||
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 |
||
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 |
||
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; |