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

Breadcrumb

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

function ForbiddenPublicPropertySniff::getPropertyScopeModifier

* @phpcsSuppress SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint.DisallowedMixedTypeHint *

Return value

array{code: int|string}

1 call to ForbiddenPublicPropertySniff::getPropertyScopeModifier()
ForbiddenPublicPropertySniff::process in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Classes/ForbiddenPublicPropertySniff.php
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *

File

vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Classes/ForbiddenPublicPropertySniff.php, line 70

Class

ForbiddenPublicPropertySniff

Namespace

SlevomatCodingStandard\Sniffs\Classes

Code

private function getPropertyScopeModifier(File $file, int $position) : array {
    $scopeModifierPosition = TokenHelper::findPrevious($file, array_merge([
        T_VAR,
    ], Tokens::$scopeModifiers), $position - 1);
    return $file->getTokens()[$scopeModifierPosition];
}

API Navigation

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