public function setName($name) {
    /** @var TokenNode $function_name */
    $function_name = $this->getName()->firstChild();
    $function_name->setText($name);
    return $this;
  }
public function setName($name) {
    /** @var TokenNode $function_name */
    $function_name = $this->getName()->firstChild();
    $function_name->setText($name);
    return $this;
  }
public function setName ( $ name ) { /** @var TokenNode $function_name */ $ function_name = $ this -> getName ( ) -> firstChild ( ) ; $ function_name -> setText ( $ name ) ; return $ this ; }
Set the name of the declared function.

@param string $name
New function name.
@return $this
Set the name of the declared function .