protected function getExampleDependencies(Node\Example $example, $context) { $dependencies = array(); foreach ($example->getPreFunctions() as $preFunction) { $dependencies = $this->getDependencies($preFunction, $dependencies); } return $this->getDependencies($example->getFunction(), $dependencies); }