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

Breadcrumb

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

function UnusedVariableSniff::findOwnerOfNestedParentheses

2 calls to UnusedVariableSniff::findOwnerOfNestedParentheses()
UnusedVariableSniff::isAssignment in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Variables/UnusedVariableSniff.php
UnusedVariableSniff::isUsedInForLoopCondition in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Variables/UnusedVariableSniff.php

File

vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Variables/UnusedVariableSniff.php, line 694

Class

UnusedVariableSniff

Namespace

SlevomatCodingStandard\Sniffs\Variables

Code

private function findOwnerOfNestedParentheses(File $phpcsFile, int $pointer) : ?int {
    $tokens = $phpcsFile->getTokens();
    $parenthesisOpenerPointer = $this->findOpenerOfNestedParentheses($phpcsFile, $pointer);
    if ($parenthesisOpenerPointer === null) {
        return null;
    }
    return array_key_exists('parenthesis_owner', $tokens[$parenthesisOpenerPointer]) ? $tokens[$parenthesisOpenerPointer]['parenthesis_owner'] : null;
}

API Navigation

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