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

Breadcrumb

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

function Fixer::getTokenContent

Get the current fixed content of a token.

This function takes changesets into account so should be used instead of directly accessing the token array.

Parameters

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

Return value

string

5 calls to Fixer::getTokenContent()
Fixer::addContent in vendor/squizlabs/php_codesniffer/src/Fixer.php
Adds content to the end of a token's current content.
Fixer::addContentBefore in vendor/squizlabs/php_codesniffer/src/Fixer.php
Adds content to the start of a token's current content.
Fixer::addNewline in vendor/squizlabs/php_codesniffer/src/Fixer.php
Adds a newline to end of a token's content.
Fixer::addNewlineBefore in vendor/squizlabs/php_codesniffer/src/Fixer.php
Adds a newline to the start of a token's content.
Fixer::substrToken in vendor/squizlabs/php_codesniffer/src/Fixer.php
Replace the content of a token with a part of its current content.

File

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

Class

Fixer

Namespace

PHP_CodeSniffer

Code

public function getTokenContent($stackPtr) {
    if ($this->inChangeset === true && isset($this->changeset[$stackPtr]) === true) {
        return $this->changeset[$stackPtr];
    }
    else {
        return $this->tokens[$stackPtr];
    }
}
RSS feed
Powered by Drupal