Skip to content

Commit ae60a8d

Browse files
committed
Remove unnecessary condition
1 parent 3a8d898 commit ae60a8d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Generator/SchemaGenerator.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,7 @@ private function collectSerializationFields(Field $root, Variable $arrayVariable
201201
throw new UnexpectedValueException('Optional nullable fields are not supported!');
202202
}
203203

204-
if (
205-
$propertyField->isOptional()
206-
&& !$propertyField->isNullable()
207-
) {
204+
if ($propertyField->isOptional()) {
208205
$ifCondition = $this->builder->notEquals(
209206
$this->builder->localPropertyFetch($propertyField->getPhpVariableName()),
210207
$this->builder->val(null)

0 commit comments

Comments
 (0)