Get line indentation.

@return string
422597
protected function getIndentation()
    {
        if ($this->document) {
            if ($this->document->getConfig()->get(FormatterInterface::CFG_USE_TABS)) {
                $indentation = "\t";
            } else {
                $indentation = str_repeat(' ', $this->document->getConfig()->get(FormatterInterface::CFG_INDENTATION));
            }

            return str_repeat($indentation, $this->indentation);
        }
    }
324575
protected function getTrimmedLine()
    {
        return null !== $this->trimmedLine ? $this->trimmedLine : $this->trimmedLine = trim($this->line);
    }
46882
public function getParameters()
    {
        $lastIndent = null;
        $parameters = array();

        if ($parameterComment = $this->getParametersComment()) {
            $parameterLines = explode("\n", $parameterComment);
            foreach ($parameterLines as $line) {
                if (empty($line)) {
                    continue;
                }

                $lineParts = explode(' - ', $line);

                $name = trim(array_shift($lineParts));

                $description = '';
                if (!empty($lineParts)) {
                    $description = trim(implode(' - ', $lineParts));
                }
                $parameter = new Parameter($name, $description);

                $parameters[] = $parameter;
            }
        }

        return $parameters;
    }
740384
public function getContent()
    {
        $content = '';

        switch ($this->_alignment) {
            case self::TEXT_ALIGN_RIGHT:
                $content .= '\qr ';
                break;

            case self::TEXT_ALIGN_CENTER:
                $content .= '\qc ';
                break;

            case self::TEXT_ALIGN_JUSTIFY:
                $content .= '\qj ';
                break;

            default:
                $content .= '\ql ';
                break;
        }

        if ($this->_indentFirstLine != 0) {
            $content .= '\fi' . PHPRtfLite_Unit::getUnitInTwips($this->_indentFirstLine) . ' ';
        }

        if ($this->_indentLeft > 0) {
            $content .= '\li' . PHPRtfLite_Unit::getUnitInTwips($this->_indentLeft) . ' ';
        }

        if ($this->_indentRight > 0) {
            $content .= '\ri' . PHPRtfLite_Unit::getUnitInTwips($this->_indentRight) .' ';
        }

        if ($this->_spaceBefore > 0) {
            $content .= '\sb' . $this->_spaceBefore.' ';
        }

        if ($this->_spaceAfter > 0) {
            $content .= '\sa' . $this->_spaceAfter.' ';
        }

        if ($this->_spaceBetweenLines > 0) {
            $content .= '\sl' . $this->_spaceBetweenLines.' ';
        }

        if ($this->_border) {
            $content .= $this->_border->getContent('\\');
        }

        if ($this->_shading > 0) {
            $content .= '\shading' . $this->_shading . ' ';
        }

        if ($this->_backgroundColor && $this->_colorTable) {
            $colorIndex = $this->_colorTable->getColorIndex($this->_backgroundColor);
            if ($colorIndex !== false) {
                $content .= '\cbpat' . $colorIndex . ' ';
            }
        }

        return $content;
    }
490587
protected function getIndentString($indent = 0) {
		$indentStr = '';
		if (is_numeric($indent)) {
			$indInt = intval($indent);
			if ($indInt > 0) {
				$i = 0;
				while ($i < $indInt) {
					$indentStr .= "\t";
					$i += 1;
				}
			}
		} else if (is_string($indent)) {
			$indentStr = $indent;
		}
		return $indentStr;
	}
483809
public function renderIndentation($code = null)
    {
        if ($this->debug && !empty($code)) {
            $indentation = str_repeat(' ', $this->indentationStep);
            $code = $indentation.str_replace("\n", "\n".$indentation, $code);
        }

        return (string) $code;
    }
475133
public function getCode(): string
  {
    $lines       = [];
    $indentLevel = 0;

    foreach ($this->lines as $line)
    {
      $mode = $this->indentationMode($line);

      // Increment or decrement indentation level.
      if ($mode & self::C_INDENT_INCREMENT_BEFORE)
      {
        $indentLevel++;
      }
      if ($mode & self::C_INDENT_DECREMENT_BEFORE)
      {
        $indentLevel = max(0, $indentLevel - 1);
      }
      if ($mode & self::C_INDENT_DECREMENT_BEFORE_DOUBLE)
      {
        $indentLevel = max(0, $indentLevel - 2);
      }

      // If the line is a separator shorten the separator.
      if ($this->separator!==null && $line==$this->separator)
      {
        $line = $this->shortenSeparator($this->width - $this->indentation * $indentLevel);
      }

      // Append the line with indentation.
      $lines[] = $this->addIndentation($line, $indentLevel);

      // Increment or decrement indentation level.
      if ($mode & self::C_INDENT_INCREMENT_AFTER)
      {
        $indentLevel++;
      }
      if ($mode & self::C_INDENT_DECREMENT_AFTER)
      {
        $indentLevel = max(0, $indentLevel - 1);
      }
    }

    if (empty($lines))
    {
      return '';
    }

    return implode(PHP_EOL, $lines).PHP_EOL;
  }
658218
public function indent( $indent = 4 )
    {
        $indent = $this->generateIndent( $indent );
        foreach( $this->lines as &$line ) {
            $line = $indent . $line;
        }
        return $this;
    }
1189523
public function getHeaderLine()
    {
        if (null === $this->headerLine) {
            $line = '@@';
            $line .= ' -' . $this->getOriginStartLine() . ',' . $this->getOriginEndLine();
            $line .= ' +' . $this->getDestStartLine() . ',' . $this->getDestEndLine();
            $line .= ' @@';

            $this->headerLine = $line;
        }

        return $this->headerLine;
    }
109255
public function getLines()
    {
        $lines = explode(PHP_EOL, $this->comment);

        $wrapper = function($line)
        {
            return new Line($line);
        };

        return array_map($wrapper, $lines);
    }
988253
private function getLineWidth()
    {
        $line_width = isset($_ENV['COLUMNS']) && $_ENV['COLUMNS']
                    ? $_ENV['COLUMNS']
                    : 0;

        if ($line_width === 0) {
            $line_width = exec('tput cols');
        }

        return $line_width;
    }
239375
public function getLines() : int
    {
        return $this->classes
            ->map(function ($class) {
                return $class->getFileName();
            })
            ->pipe(function ($classes) {
                return app(Analyser::class)->countFiles($classes->all(), false)['loc'];
            });
    }
74018
protected static function indent()
    {
        $char = (static::$mode == "html") ? "&nbsp;" : " ";

        for ($i = 0; $i < static::$indent; $i++) {
            for ($y = 0; $y < 4; $y++) {
                echo $char;
            }
        }
    }
414108
private function indentationModeBlock(string $line): int
  {
    $mode = 0;

    if (substr($line, -1, 1)=='{')
    {
      $mode |= self::C_INDENT_INCREMENT_AFTER;

      $this->defaultLevelIncrement();
    }

    if (substr($line, 0, 1)=='}')
    {
      $this->defaultLevelDecrement();

      if ($this->defaultLevelIsZero())
      {
        $mode |= self::C_INDENT_DECREMENT_BEFORE_DOUBLE;

        array_pop($this->defaultLevel);
      }
      else
      {
        $mode |= self::C_INDENT_DECREMENT_BEFORE;
      }
    }

    return $mode;
  }
351930
private Indent getIndent() {
		skipEmptyLines();
		if (index < tokens.size()) {
			Token token = tokens.get(index);
			if (token.kind == Indent) {
				return new Indent(token.text, token.start);
			}
			return null;
		}
		return null;
	}
1275392
public function getMarkedInput()
    {
        // create line matrix
        $matrix = preg_split ('/$\R?^/m', $this->input);

        $part = '';

        if(isset($matrix[$this->soqlLineNo]))
        {
            $part = $matrix[$this->soqlLineNo];

            $part .= "\n" . str_repeat('-', $this->getSoqlLinePos()) . "^";
        }
        return $part;
    }
944660
public function getLineFormatter()
    {
        $formatter = function($line) {
            $line['online'] = $this->isOnline($line['lastActivity']);
            $line['intervalLastLogin'] = $this->getIntervalLastLogin($line['lastLogin']);
            $line['lastActivity'] = '';
            return $line;
        };
        
        return $formatter;
    }