public function setIndent($indent) {
    $lines = explode("\n", $this->text);
    if (count($lines) === 1) {
      return $this;
    }
    $comment = '';
    $last_index = count($lines) - 1;
    foreach ($lines as $i => $line) {
      if ($i === 0) {
        $comment .= trim($line) . "\n";
      }
      elseif ($i === $last_index) {
        $comment .= $indent . ' ' . trim($line);
      }
      else {
        $comment .= $indent . ' ' . trim($line) . "\n";
      }
    }
    $this->setText($comment);
    return $this;
  }
public function setIndent($indent) {
    $lines = explode("\n", $this->text);
    if (count($lines) === 1) {
      return $this;
    }
    $comment = '';
    $last_index = count($lines) - 1;
    foreach ($lines as $i => $line) {
      if ($i === 0) {
        $comment .= trim($line) . "\n";
      }
      elseif ($i === $last_index) {
        $comment .= $indent . ' ' . trim($line);
      }
      else {
        $comment .= $indent . ' ' . trim($line) . "\n";
      }
    }
    $this->setText($comment);
    return $this;
  }
public function setIndent ( $ indent ) { $ lines = explode ( "\n" , $ this -> text ) ; if ( count ( $ lines ) === 1 ) { return $ this ; } $ comment = '' ; $ last_index = count ( $ lines ) - 1 ; foreach ( $ lines as $ i => $ line ) { if ( $ i === 0 ) { $ comment .= trim ( $ line ) . "\n" ; } elseif ( $ i === $ last_index ) { $ comment .= $ indent . ' ' . trim ( $ line ) ; } else { $ comment .= $ indent . ' ' . trim ( $ line ) . "\n" ; } } $ this -> setText ( $ comment ) ; return $ this ; }
Set indent for document comment.

@param string $indent
Whitespace to use as indent.
@return $this
Set indent for document comment .