public function resolve($target)
{
if ($target) {
if (!is_subclass_of($target, get_parent_class(__CLASS__))) {
throw new \Exception(sprintf('Constructor mocking not supported on non-Quip object of class %s', get_class($target)));
}
$this->class = self::qualify(get_class($target));
$this->quip = $target;
$this->quip->mime = $this;
}
return $this->quip;
}