Example #1
0
 /**
  * @inheritdoc
  */
 public function run($root)
 {
     $this->extendIndicies = [];
     $finder = new ExtendFinderVisitor();
     $finder->run($root);
     if (!$finder->foundExtends) {
         return $root;
     }
     $root->allExtends = $this->doExtendChaining($root->allExtends, $root->allExtends);
     $this->allExtendsStack = [&$root->allExtends];
     $newRoot = $this->visit($root);
     $this->checkExtendsForNonMatched($root->allExtends);
     return $newRoot;
 }
Example #2
0
 /**
  * @covers __constructor
  */
 public function testVisit()
 {
     $v = new ExtendFinderVisitor();
     $this->assertFalse($v->isReplacing());
 }