Skip to content

Commit

Permalink
#14 preserve metainformation for overriden methods and classes. Need …
Browse files Browse the repository at this point in the history
…to use formatting for better look
  • Loading branch information
lisachenko committed Dec 13, 2012
1 parent 799b72d commit 49c8efe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Go/Aop/Support/AbstractChildCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ public function __toString()
ksort($this->methodsCode);
ksort($this->propertiesCode);
$prefix = join(' ', Reflection::getModifierNames($this->class->getModifiers()));
$code = sprintf("%sclass %s extends %s%s\n{\n%s\n%s\n}",
$code = sprintf("%s\n%sclass %s extends %s%s\n{\n%s\n%s\n}",
$this->class->getDocComment(),
$prefix ? "$prefix " : '',
$this->name,
$this->parentClassName,
Expand All @@ -207,7 +208,7 @@ public function __toString()
protected function getOverriddenMethod($method, $body)
{
$code = sprintf("%s%s function %s%s(%s)\n{\n%s\n}\n",
"/**\n * {@inheritdoc}\n */\n",
$method->getDocComment() ."\n",
join(' ', Reflection::getModifierNames($method->getModifiers())),
$method->returnsReference() ? '&' : '',
$method->name,
Expand Down

0 comments on commit 49c8efe

Please sign in to comment.