src/DocBlock/Tag.php
public function setName($name)
    {
        $current = $this->getName();

        if ('other' === $current) {
            throw new \RuntimeException('Cannot set name on unknown tag.');
        }

        $this->line->setContent(Preg::replace("/@{$current}/", "@{$name}", $this->line->getContent(), 1));

        $this->name = $name;
    }
public function setName($name)
    {
        $current = $this->getName();

        if ('other' === $current) {
            throw new \RuntimeException('Cannot set name on unknown tag.');
        }

        $this->line->setContent(Preg::replace("/@{$current}/", "@{$name}", $this->line->getContent(), 1));

        $this->name = $name;
    }
public function setName ( $ name ) { $ current = $ this -> getName ( ) ; if ( 'other' === $ current ) { throw new \ RuntimeException ( 'Cannot set name on unknown tag.' ) ; } $ this -> line -> setContent ( Preg :: replace ( "/@{$current}/" , "@{$name}" , $ this -> line -> getContent ( ) , 1 ) ) ; $ this -> name = $ name ; }
Set the tag name.

This will also be persisted to the upsteam line and annotation.

@param string $name
Set the tag name .