Skip to content

Commit

Permalink
Scream::__call(): handle calling undefined parent method
Browse files Browse the repository at this point in the history
  • Loading branch information
fprochazka committed Apr 4, 2016
1 parent d4485b0 commit ec68cb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Scream.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ trait Scream
*/
public function __call($name, $args)
{
$class = get_class($this);
$hint = Suggester::suggestMethod($class, $name);
$class = method_exists($this, $name) ? 'parent' : get_class($this);
$hint = Suggester::suggestMethod(get_class($this), $name);
throw new MemberAccessException("Call to undefined method $class::$name()" . ($hint ? ", did you mean $hint()?" : '.'));
}

Expand Down

0 comments on commit ec68cb4

Please sign in to comment.