Skip to content

Commit

Permalink
All FHIR class property setters are now fluent (suggested by @kchapple)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarbone committed Feb 26, 2016
1 parent 2460e11 commit 4fab471
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ composer.lock
/class.Diff.php
*.iml
.idea/
/.svn
4 changes: 2 additions & 2 deletions src/ClassGenerator/Template/SetterMethodTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function compileTemplate()
);
}

$output = sprintf("%s */\n %s function %s(", $output, (string)$this->getScope(), $this->getName());
$output = sprintf("%s * @return \$this\n */\n %s function %s(", $output, (string)$this->getScope(), $this->getName());

$params = array();
foreach($this->getParameters() as $param)
Expand All @@ -91,6 +91,6 @@ public function compileTemplate()
$output = sprintf("%s %s\n", $output, $line);
}

return sprintf("%s }\n\n", $output);
return sprintf("%s return \$this;\n }\n\n", $output);
}
}

0 comments on commit 4fab471

Please sign in to comment.