mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-13 04:59:24 +03:00
fixed cs
This commit is contained in:
parent
185d0e588b
commit
9b94ae4b2c
@ -91,9 +91,10 @@ class JmsMetadataParser implements ParserInterface
|
|||||||
return $type;
|
return $type;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(false !== strpos($type, "array") || false !== strpos($type, "ArrayCollection")) {
|
if (false !== strpos($type, "array") || false !== strpos($type, "ArrayCollection")) {
|
||||||
if ($nested = $this->getNestedClassInArray($type)) {
|
if ($nested = $this->getNestedClassInArray($type)) {
|
||||||
$exp = explode("\\", $nested);
|
$exp = explode("\\", $nested);
|
||||||
|
|
||||||
return sprintf("array of objects (%s)", end($exp));
|
return sprintf("array of objects (%s)", end($exp));
|
||||||
} else {
|
} else {
|
||||||
return "array";
|
return "array";
|
||||||
@ -101,6 +102,7 @@ class JmsMetadataParser implements ParserInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$exp = explode("\\", $type);
|
$exp = explode("\\", $type);
|
||||||
|
|
||||||
return sprintf("object (%s)", end($exp));
|
return sprintf("object (%s)", end($exp));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,6 +120,7 @@ class JmsMetadataParser implements ParserInterface
|
|||||||
$regEx = "/\<([A-Za-z0-9\\\]*)(\,?\s?(.*))?\>/";
|
$regEx = "/\<([A-Za-z0-9\\\]*)(\,?\s?(.*))?\>/";
|
||||||
if (preg_match($regEx, $type, $matches)) {
|
if (preg_match($regEx, $type, $matches)) {
|
||||||
$matched = (!empty($matches[3])) ? $matches[3] : $matches[1];
|
$matched = (!empty($matches[3])) ? $matches[3] : $matches[1];
|
||||||
|
|
||||||
return in_array($matched, array('boolean', 'integer', 'string', 'double', 'array', 'DateTime')) ? false : $matched;
|
return in_array($matched, array('boolean', 'integer', 'string', 'double', 'array', 'DateTime')) ? false : $matched;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,7 +155,6 @@ class JmsMetadataParser implements ParserInterface
|
|||||||
$description = "No description.";
|
$description = "No description.";
|
||||||
|
|
||||||
//TODO: abstract docblock parsing utility and implement here
|
//TODO: abstract docblock parsing utility and implement here
|
||||||
|
|
||||||
return $description;
|
return $description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user