mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-21 06:05:00 +00:00
docgen normalization for relation
This commit is contained in:
@@ -98,8 +98,9 @@ class DocGenObjectNormalizer implements NormalizerAwareInterface, NormalizerInte
|
||||
if ($reflection->hasProperty($attribute->getName())) {
|
||||
if (!$reflection->getProperty($attribute->getName())->hasType()) {
|
||||
throw new \LogicException(sprintf(
|
||||
'Could not determine how the content is determined for the attribute %s. Add a type on this property',
|
||||
$attribute->getName()
|
||||
'Could not determine how the content is determined for the attribute %s on class %s. Add a type on this property',
|
||||
$attribute->getName(),
|
||||
$reflection->getName()
|
||||
));
|
||||
}
|
||||
|
||||
@@ -107,8 +108,9 @@ class DocGenObjectNormalizer implements NormalizerAwareInterface, NormalizerInte
|
||||
} elseif ($reflection->hasMethod($method = 'get' . ucfirst($attribute->getName()))) {
|
||||
if (!$reflection->getMethod($method)->hasReturnType()) {
|
||||
throw new \LogicException(sprintf(
|
||||
'Could not determine how the content is determined for the attribute %s. Add a return type on the method',
|
||||
$attribute->getName()
|
||||
'Could not determine how the content is determined for the attribute %s on class %s. Add a return type on the method',
|
||||
$attribute->getName(),
|
||||
$reflection->getName()
|
||||
));
|
||||
}
|
||||
|
||||
@@ -116,8 +118,9 @@ class DocGenObjectNormalizer implements NormalizerAwareInterface, NormalizerInte
|
||||
} elseif ($reflection->hasMethod($method = 'is' . ucfirst($attribute->getName()))) {
|
||||
if (!$reflection->getMethod($method)->hasReturnType()) {
|
||||
throw new \LogicException(sprintf(
|
||||
'Could not determine how the content is determined for the attribute %s. Add a return type on the method',
|
||||
$attribute->getName()
|
||||
'Could not determine how the content is determined for the attribute %s on class %s. Add a return type on the method',
|
||||
$attribute->getName(),
|
||||
$reflection->getName()
|
||||
));
|
||||
}
|
||||
|
||||
@@ -125,8 +128,9 @@ class DocGenObjectNormalizer implements NormalizerAwareInterface, NormalizerInte
|
||||
} elseif ($reflection->hasMethod($attribute->getName())) {
|
||||
if (!$reflection->getMethod($attribute->getName())->hasReturnType()) {
|
||||
throw new \LogicException(sprintf(
|
||||
'Could not determine how the content is determined for the attribute %s. Add a return type on the method',
|
||||
$attribute->getName()
|
||||
'Could not determine how the content is determined for the attribute %s on class %s. Add a return type on the method',
|
||||
$attribute->getName(),
|
||||
$reflection->getName()
|
||||
));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user