SensioLabs\DeprecationDetector\FileInfo\PhpFileInfo::addSuperTypeUsage PHP Метод

addSuperTypeUsage() публичный Метод

public addSuperTypeUsage ( SensioLabs\DeprecationDetector\FileInfo\Usage\SuperTypeUsage $superTypeUsage )
$superTypeUsage SensioLabs\DeprecationDetector\FileInfo\Usage\SuperTypeUsage
    public function addSuperTypeUsage(SuperTypeUsage $superTypeUsage)
    {
        $this->superTypeUsages[$superTypeUsage->className()] = $superTypeUsage;
    }

Usage Example

 /**
  * {@inheritdoc}
  */
 public function enterNode(Node $node)
 {
     if ($node instanceof Node\Stmt\Class_ && $node->extends instanceof Node\Name) {
         $superTypeUsage = new SuperTypeUsage($node->extends->toString(), $node->namespacedName->toString(), $node->getLine());
         $this->phpFileInfo->addSuperTypeUsage($superTypeUsage);
     }
 }