Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Commit

Permalink
Merge pull request #37 from Kdyby/void-return-type-support
Browse files Browse the repository at this point in the history
Support void return type
  • Loading branch information
dakorpar authored Oct 26, 2018
2 parents 8430747 + fdcb969 commit 36953da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Kdyby/Aop/PhpGenerator/PointcutMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,10 @@ public function __toString()
if ($this->afterThrowing || $this->after) {
$this->addBody('if ($__exception) { throw $__exception; }');
}
$this->addBody('return $__result;');

if($this->getReturnType() !== 'void') {
$this->addBody('return $__result;');
}

return parent::__toString();
}
Expand Down

0 comments on commit 36953da

Please sign in to comment.