Skip to content

Commit

Permalink
minor #1623 minor: cs fix (kbond)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.x-dev branch.

Discussion
----------

minor: cs fix

Commits
-------

3cb552e minor: cs fix
  • Loading branch information
kbond committed Dec 10, 2024
2 parents d2b260c + 3cb552e commit 4a93f98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Util/ClassSourceManipulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function addEntityField(ClassProperty $mapping): void
}

$propertyType = $typeHint;
if ($propertyType && !$defaultValue && $propertyType !== 'mixed') {
if ($propertyType && !$defaultValue && 'mixed' !== $propertyType) {
// all property types
$propertyType = '?'.$propertyType;
}
Expand All @@ -162,13 +162,13 @@ public function addEntityField(ClassProperty $mapping): void
// getter methods always have nullable return values
// because even though these are required in the db, they may not be set yet
// unless there is a default value
null === $defaultValue && $propertyType !== 'mixed',
null === $defaultValue && 'mixed' !== $propertyType,
$commentLines
);

// don't generate setters for id fields
if (!($mapping->id ?? false)) {
$this->addSetter($mapping->propertyName, $typeHint, $nullable && $propertyType !== 'mixed');
$this->addSetter($mapping->propertyName, $typeHint, $nullable && 'mixed' !== $propertyType);
}
}

Expand Down

0 comments on commit 4a93f98

Please sign in to comment.