update sample code, update test case

This commit is contained in:
wing328
2016-03-19 16:03:36 +08:00
parent 56122b4a01
commit 95cd8b73a6
14 changed files with 264 additions and 231 deletions

View File

@@ -257,7 +257,7 @@ class ObjectSerializer
} else {
$deserialized = null;
}
} elseif (in_array($class, array('void', 'bool', 'string', 'double', 'byte', 'mixed', 'integer', 'float', 'int', 'DateTime', 'number', 'boolean', 'object'))) {
} elseif (in_array($class, array('integer', 'int', 'void', 'number', 'object', 'double', 'float', 'byte', 'DateTime', 'string', 'mixed', 'boolean', 'bool'))) {
settype($data, $class);
$deserialized = $data;
} elseif ($class === '\SplFileObject') {