File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
resources/fileTemplates/internal
testData/actions/generation/generator/DataModelGenerator/generateDataModelWithoutInterface Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -55,9 +55,12 @@ class ${NAME} #if (${EXTENDS})extends ${EXTENDS} #end #if (${IMPLEMENTS} && $has
5555 #end
5656 public function get$propertyUpperCamel(): ?$propertyType
5757 {
58- #set($propertyCast = "#if($propertyType != 'string')($propertyType)#{else}#end")
58+ #if($propertyType == 'string')
59+ return $this->getData(self::$propertyUpperSnake);
60+ #{else}
5961 return $this->getData(self::$propertyUpperSnake) === null ? null
60- : $propertyCast $this->getData(self::$propertyUpperSnake);
62+ : ($propertyType) $this->getData(self::$propertyUpperSnake);
63+ #end
6164 }
6265
6366 #if ($hasInterface)
Original file line number Diff line number Diff line change @@ -43,8 +43,7 @@ public function setIdProperty(?int $idProperty): void
4343 */
4444 public function getSampleProperty (): ?string
4545 {
46- return $ this ->getData (self ::SAMPLE_PROPERTY ) === null ? null
47- : $ this ->getData (self ::SAMPLE_PROPERTY );
46+ return $ this ->getData (self ::SAMPLE_PROPERTY );
4847 }
4948
5049 /**
You can’t perform that action at this time.
0 commit comments