PHP Class SlevomatCodingStandard\Helpers\TokenHelper

Show file Open project: slevomat/coding-standard Class Usage Examples

Public Properties

Property Type Description
$ineffectiveTokenCodes
$nameTokenCodes
$typeKeywordTokenCodes

Public Methods

Method Description
findFirstTokenOnNextLine ( PHP_CodeSniffer_File $phpcsFile, integer $pointer ) : integer | null
findNextAnyToken ( PHP_CodeSniffer_File $phpcsFile, integer $startPointer, integer | null $endPointer = null ) : integer | null
findNextEffective ( PHP_CodeSniffer_File $phpcsFile, integer $startPointer, integer | null $endPointer = null ) : integer | null
findNextExcluding ( PHP_CodeSniffer_File $phpcsFile, integer | integer[] $types, integer $startPointer, integer | null $endPointer = null ) : integer | null
findPreviousEffective ( PHP_CodeSniffer_File $phpcsFile, integer $startPointer, integer | null $endPointer = null ) : integer | null
findPreviousExcluding ( PHP_CodeSniffer_File $phpcsFile, integer[] | integer $types, integer $startPointer, integer | null $endPointer = null ) : integer | null
getContent ( PHP_CodeSniffer_File $phpcsFile, integer $startPointer, integer | null $endPointer = null ) : string
getLastTokenPointer ( PHP_CodeSniffer_File $phpcsFile ) : integer

Method Details

findFirstTokenOnNextLine() public static method

public static findFirstTokenOnNextLine ( PHP_CodeSniffer_File $phpcsFile, integer $pointer ) : integer | null
$phpcsFile PHP_CodeSniffer_File
$pointer integer search starts at this token, inclusive
return integer | null

findNextAnyToken() public static method

public static findNextAnyToken ( PHP_CodeSniffer_File $phpcsFile, integer $startPointer, integer | null $endPointer = null ) : integer | null
$phpcsFile PHP_CodeSniffer_File
$startPointer integer search starts at this token, inclusive
$endPointer integer | null search ends at this token, exclusive
return integer | null

findNextEffective() public static method

public static findNextEffective ( PHP_CodeSniffer_File $phpcsFile, integer $startPointer, integer | null $endPointer = null ) : integer | null
$phpcsFile PHP_CodeSniffer_File
$startPointer integer search starts at this token, inclusive
$endPointer integer | null search ends at this token, exclusive
return integer | null

findNextExcluding() public static method

public static findNextExcluding ( PHP_CodeSniffer_File $phpcsFile, integer | integer[] $types, integer $startPointer, integer | null $endPointer = null ) : integer | null
$phpcsFile PHP_CodeSniffer_File
$types integer | integer[]
$startPointer integer search starts at this token, inclusive
$endPointer integer | null search ends at this token, exclusive
return integer | null

findPreviousEffective() public static method

public static findPreviousEffective ( PHP_CodeSniffer_File $phpcsFile, integer $startPointer, integer | null $endPointer = null ) : integer | null
$phpcsFile PHP_CodeSniffer_File
$startPointer integer search starts at this token, inclusive
$endPointer integer | null search ends at this token, exclusive
return integer | null

findPreviousExcluding() public static method

public static findPreviousExcluding ( PHP_CodeSniffer_File $phpcsFile, integer[] | integer $types, integer $startPointer, integer | null $endPointer = null ) : integer | null
$phpcsFile PHP_CodeSniffer_File
$types integer[] | integer
$startPointer integer search starts at this token, inclusive
$endPointer integer | null search ends at this token, exclusive
return integer | null

getContent() public static method

public static getContent ( PHP_CodeSniffer_File $phpcsFile, integer $startPointer, integer | null $endPointer = null ) : string
$phpcsFile PHP_CodeSniffer_File
$startPointer integer search starts at this token, inclusive
$endPointer integer | null search ends at this token, exclusive
return string

getLastTokenPointer() public static method

public static getLastTokenPointer ( PHP_CodeSniffer_File $phpcsFile ) : integer
$phpcsFile PHP_CodeSniffer_File
return integer

Property Details

$ineffectiveTokenCodes public static property

public static $ineffectiveTokenCodes

$nameTokenCodes public static property

public static $nameTokenCodes

$typeKeywordTokenCodes public static property

public static $typeKeywordTokenCodes