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
55
55
#end
56
56
public function get$propertyUpperCamel(): ?$propertyType
57
57
{
58
- #set($propertyCast = "#if($propertyType != 'string')($propertyType)#{else}#end")
58
+ #if($propertyType == 'string')
59
+ return $this->getData(self::$propertyUpperSnake);
60
+ #{else}
59
61
return $this->getData(self::$propertyUpperSnake) === null ? null
60
- : $propertyCast $this->getData(self::$propertyUpperSnake);
62
+ : ($propertyType) $this->getData(self::$propertyUpperSnake);
63
+ #end
61
64
}
62
65
63
66
#if ($hasInterface)
Original file line number Diff line number Diff line change @@ -43,8 +43,7 @@ public function setIdProperty(?int $idProperty): void
43
43
*/
44
44
public function getSampleProperty (): ?string
45
45
{
46
- return $ this ->getData (self ::SAMPLE_PROPERTY ) === null ? null
47
- : $ this ->getData (self ::SAMPLE_PROPERTY );
46
+ return $ this ->getData (self ::SAMPLE_PROPERTY );
48
47
}
49
48
50
49
/**
You can’t perform that action at this time.
0 commit comments