Skip to content

Commit 5614b69

Browse files
committed
Simplify some templating
1 parent 42d110b commit 5614b69

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/SchemaProcessor/PostProcessor/Templates/SetAdditionalProperty.phptpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
public function setAdditionalProperty(
1313
string $property,
14-
{% if validationProperty.getType() %}{{ viewHelper.getType(validationProperty) }} {% endif %}$value
14+
{{ viewHelper.getType(validationProperty) }} $value
1515
): self {
1616
if (in_array($property, {{ objectProperties }})) {
1717
throw new RegularPropertyAsAdditionalPropertyException($value, $property, self::class);

src/Templates/Model.phptpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class {{ class }} {% if schema.getInterfaces() %}implements {{ viewHelper.joinCl
128128
* @return self
129129
*/
130130
public function set{{ viewHelper.ucfirst(property.getAttribute()) }}(
131-
{% if property.getType() %}{{ viewHelper.getType(property) }} {% endif %}${{ property.getAttribute() }}
131+
{{ viewHelper.getType(property) }} ${{ property.getAttribute() }}
132132
): self {
133133
if ($this->{{ property.getAttribute() }} === ${{ property.getAttribute() }}) {
134134
return $this;

0 commit comments

Comments
 (0)