Skip to content

Commit 1b4e262

Browse files
committed
[SoapBundle] Simplified conditional statement
1 parent 60e3714 commit 1b4e262

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/BeSimple/SoapBundle/ServiceBinding/RpcLiteralRequestMessageBinder.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,8 @@ protected function checkComplexType($phpType, $message)
112112
$value = $this->processType($type->getType(), $value);
113113

114114
$messageBinder->writeProperty($property, $value);
115-
}
116-
117-
if (!$type->isNillable() && null === $value) {
115+
} elseif (!$type->isNillable()) {
116+
// @TODO use xmlType instead of phpType
118117
throw new \SoapFault('SOAP_ERROR_COMPLEX_TYPE', sprintf('"%s:%s" cannot be null.', ucfirst($phpType), $type->getName()));
119118
}
120119
}

0 commit comments

Comments
 (0)