コード例 #1
0
ファイル: Wizard.php プロジェクト: ezrra/PHP
 /**
  * @param \ReflectionFunctionAbstract $functionOrMethod
  */
 private function processFunctionOrMethod(\ReflectionFunctionAbstract $functionOrMethod)
 {
     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;
     }
 }