Commit 5eb35958 authored by Guillaume Perréal's avatar Guillaume Perréal

Gère correctement les valeurs spéciales des paramètres input et output des opérations.

parent 71e82bd9
......@@ -235,10 +235,9 @@ final class MetadataFactory implements MetadataFactoryInterface
$output = $getAttribute('output', null);
$normalization = null;
if ($output !== false) {
if (is_array($output) && isset($output['class'])) {
if (is_array($output) && array_key_exists('class', $output)) {
$output = $output['class'];
}
if ($output === null && $opDef->hasNormalization()) {
} elseif ($output === null && $opDef->hasNormalization()) {
$output = $class->getFullName();
}
if ($output) {
......@@ -254,10 +253,9 @@ final class MetadataFactory implements MetadataFactoryInterface
$input = $getAttribute('input', null);
$denormalization = null;
if ($input !== false) {
if (is_array($input) && isset($input['class'])) {
if (is_array($input) && array_key_exists('class', $input)) {
$input = $input['class'];
}
if ($input === null && $opDef->hasDenormalization()) {
} elseif ($input === null && $opDef->hasDenormalization()) {
$input = $class->getFullName();
}
if ($input) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment