diff --git a/.gitignore b/.gitignore index b4e297ba..fc979c26 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ composer.lock /class.Diff.php *.iml .idea/ +/.svn diff --git a/src/ClassGenerator/Template/SetterMethodTemplate.php b/src/ClassGenerator/Template/SetterMethodTemplate.php index 55e617d7..7555819b 100644 --- a/src/ClassGenerator/Template/SetterMethodTemplate.php +++ b/src/ClassGenerator/Template/SetterMethodTemplate.php @@ -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) @@ -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); } } \ No newline at end of file