Commit 320da456 authored by Petr Besir Horáček's avatar Petr Besir Horáček
Browse files

Added return type to setters

No related merge requests found
Showing with 2 additions and 1 deletion
+2 -1
......@@ -280,7 +280,8 @@ class DataGenerator
{
$setter = $this->class->addMethod('set' . ucfirst($this->toCamelCase($name)))
->addBody("\$this->? = $?;\n", [$this->toCamelCase($name), $this->toCamelCase($name)])
->addBody('return $this;');
->addBody('return $this;')
->setReturnType('self');
$setter->addParameter($this->toCamelCase($name))
->setNullable($this->isPropertyNullable($propertyDefinition))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment