Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Fixer.php

function Fixer::addNewlineBefore

Adds a newline to the start of a token's content.

Parameters

int $stackPtr The position of the token in the token stack.:

Return value

bool If the change was accepted.

File

vendor/squizlabs/php_codesniffer/src/Fixer.php, line 744

Class

Fixer

Namespace

PHP_CodeSniffer

Code

public function addNewlineBefore($stackPtr) {
    $current = $this->getTokenContent($stackPtr);
    return $this->replaceToken($stackPtr, $this->currentFile->eolChar . $current);
}
RSS feed
Powered by Drupal