Ejemplo n.º 1
0
 /**
  * Visits a method node.
  *
  * @param \PDepend\Source\AST\ASTMethod $node
  * @return void
  */
 public function visitMethod(ASTMethod $node)
 {
     if ($node->getCompilationUnit()->getFileName() === null) {
         return;
     }
     $this->apply(new MethodNode($node));
 }
 /**
  * Tests that build interface updates the source file information for null
  * values.
  *
  * @return void
  */
 public function testSetSourceFileInformationForNullValue()
 {
     $file = new ASTCompilationUnit(__FILE__);
     $class = new ASTClass(__CLASS__);
     $class->setCompilationUnit($file);
     $method = new ASTMethod(__FUNCTION__);
     $method->setParent($class);
     $this->assertSame($file, $method->getCompilationUnit());
 }