@@ -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 | /** |
@@ -44,7 +44,7 @@ discard block |
||
| 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()) { |