PHP Class SlevomatCodingStandard\Helpers\UseStatementHelper

Afficher le fichier Open project: slevomat/coding-standard Class Usage Examples

Méthodes publiques

Méthode Description
getFullyQualifiedTypeNameFromUse ( PHP_CodeSniffer_File $phpcsFile, integer $usePointer ) : string
getNameAsReferencedInClassFromUse ( PHP_CodeSniffer_File $phpcsFile, integer $usePointer ) : string
getUseStatements ( PHP_CodeSniffer_File $phpcsFile, integer $openTagPointer ) : UseStatement[]
isAnonymousFunctionUse ( PHP_CodeSniffer_File $phpcsFile, integer $usePointer ) : boolean
isTraitUse ( PHP_CodeSniffer_File $phpcsFile, integer $usePointer ) : boolean

Private Methods

Méthode Description
getUseStatementPointers ( PHP_CodeSniffer_File $phpcsFile, integer $openTagPointer ) : integer[] Searches for all use statements in a file, skips bodies of classes and traits.

Method Details

getFullyQualifiedTypeNameFromUse() public static méthode

public static getFullyQualifiedTypeNameFromUse ( PHP_CodeSniffer_File $phpcsFile, integer $usePointer ) : string
$phpcsFile PHP_CodeSniffer_File
$usePointer integer
Résultat string

getNameAsReferencedInClassFromUse() public static méthode

public static getNameAsReferencedInClassFromUse ( PHP_CodeSniffer_File $phpcsFile, integer $usePointer ) : string
$phpcsFile PHP_CodeSniffer_File
$usePointer integer
Résultat string

getUseStatements() public static méthode

public static getUseStatements ( PHP_CodeSniffer_File $phpcsFile, integer $openTagPointer ) : UseStatement[]
$phpcsFile PHP_CodeSniffer_File
$openTagPointer integer
Résultat UseStatement[] canonicalName(string) => useStatement(\SlevomatCodingStandard\Helpers\UseStatement)

isAnonymousFunctionUse() public static méthode

public static isAnonymousFunctionUse ( PHP_CodeSniffer_File $phpcsFile, integer $usePointer ) : boolean
$phpcsFile PHP_CodeSniffer_File
$usePointer integer
Résultat boolean

isTraitUse() public static méthode

public static isTraitUse ( PHP_CodeSniffer_File $phpcsFile, integer $usePointer ) : boolean
$phpcsFile PHP_CodeSniffer_File
$usePointer integer
Résultat boolean