add enum class support, merged test cases for php

This commit is contained in:
wing328
2016-06-26 17:41:29 +08:00
parent 5095fe1018
commit 74239c422b
60 changed files with 3511 additions and 618 deletions

View File

@@ -264,7 +264,7 @@ class ObjectSerializer
} else {
return 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);
return $data;
} elseif ($class === '\SplFileObject') {