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

Breadcrumb

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

function Fixer::addContentBefore

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

Parameters

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

string $content The content to add.:

Return value

bool If the change was accepted.

File

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

Class

Fixer

Namespace

PHP_CodeSniffer

Code

public function addContentBefore($stackPtr, $content) {
    $current = $this->getTokenContent($stackPtr);
    return $this->replaceToken($stackPtr, $content . $current);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal