function Wizard::processFunctionOrMethod
2 calls to Wizard::processFunctionOrMethod()
- Wizard::processClassesAndTraits in vendor/
sebastian/ code-unit-reverse-lookup/ src/ Wizard.php - Wizard::processFunctions in vendor/
sebastian/ code-unit-reverse-lookup/ src/ Wizard.php
File
-
vendor/
sebastian/ code-unit-reverse-lookup/ src/ Wizard.php, line 94
Class
Namespace
SebastianBergmann\CodeUnitReverseLookupCode
private function processFunctionOrMethod(ReflectionFunctionAbstract $functionOrMethod) : void {
if ($functionOrMethod->isInternal()) {
return;
}
$name = $functionOrMethod->getName();
if ($functionOrMethod instanceof ReflectionMethod) {
$name = $functionOrMethod->getDeclaringClass()
->getName() . '::' . $name;
}
if (!isset($this->lookupTable[$functionOrMethod->getFileName()])) {
$this->lookupTable[$functionOrMethod->getFileName()] = [];
}
foreach (range($functionOrMethod->getStartLine(), $functionOrMethod->getEndLine()) as $line) {
$this->lookupTable[$functionOrMethod->getFileName()][$line] = $name;
}
}