/** * Return custom value. * * @return mixed */ public function getValue() { $value = array_shift($this->stack); if ($value instanceof ReturnInterface) { return MethodManifest::extractValue($value, $this->arguments, $this->scope); } else { return $value; } }
/** * Return custom value. * * @return mixed */ public function getValue() { foreach ($this->map as $map) { if (!is_array($map) or $this->argumentsCount !== count($map) - 1) { continue; } $value = array_pop($map); if ($this->arguments === $map) { if ($value instanceof ReturnInterface) { return MethodManifest::extractValue($value, $this->arguments, $this->scope); } else { return $value; } } } return null; }