protected function hasMacro(string $name, array $context) : bool { if (method_exists($this, $name)) { return true; } if (!($parent = $this->getParent($context))) { return false; } return $parent->hasMacro($name, $context); }