Skip to content

Commit 13967ca

Browse files
committed
Don't render null as default value as properties are null by default
1 parent c147568 commit 13967ca

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Model/Property/Property.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ public function setDefaultValue($defaultValue): PropertyInterface
242242
/**
243243
* @inheritdoc
244244
*/
245-
public function getDefaultValue()
245+
public function getDefaultValue(): ?string
246246
{
247-
return var_export($this->defaultValue, true);
247+
return $this->defaultValue !== null ? var_export($this->defaultValue, true) : null;
248248
}
249249

250250
/**

src/Model/Property/PropertyInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ public function setInternal(bool $isPropertyInternal): PropertyInterface;
159159
public function setDefaultValue($defaultValue): PropertyInterface;
160160

161161
/**
162-
* @return mixed
162+
* @return string|null
163163
*/
164-
public function getDefaultValue();
164+
public function getDefaultValue(): ?string;
165165

166166
/**
167167
* @return bool

src/Model/Property/PropertyProxy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public function setDefaultValue($defaultValue): PropertyInterface
205205
/**
206206
* @inheritdoc
207207
*/
208-
public function getDefaultValue()
208+
public function getDefaultValue(): ?string
209209
{
210210
return $this->getProperty()->getDefaultValue();
211211
}

0 commit comments

Comments
 (0)