This commit is contained in:
Evan Villemez 2012-08-24 11:12:36 -04:00
parent 185d0e588b
commit 9b94ae4b2c
3 changed files with 19 additions and 17 deletions

View File

@ -94,6 +94,7 @@ class JmsMetadataParser implements ParserInterface
if (false !== strpos($type, "array") || false !== strpos($type, "ArrayCollection")) {
if ($nested = $this->getNestedClassInArray($type)) {
$exp = explode("\\", $nested);
return sprintf("array of objects (%s)", end($exp));
} else {
return "array";
@ -101,6 +102,7 @@ class JmsMetadataParser implements ParserInterface
}
$exp = explode("\\", $type);
return sprintf("object (%s)", end($exp));
}
@ -118,6 +120,7 @@ class JmsMetadataParser implements ParserInterface
$regEx = "/\<([A-Za-z0-9\\\]*)(\,?\s?(.*))?\>/";
if (preg_match($regEx, $type, $matches)) {
$matched = (!empty($matches[3])) ? $matches[3] : $matches[1];
return in_array($matched, array('boolean', 'integer', 'string', 'double', 'array', 'DateTime')) ? false : $matched;
}
@ -152,7 +155,6 @@ class JmsMetadataParser implements ParserInterface
$description = "No description.";
//TODO: abstract docblock parsing utility and implement here
return $description;
}