PHP Class PHP_CodeSniffer_Tokenizers_Comment, PHP_CodeSniffer

Afficher le fichier Open project: squizlabs/php_codesniffer Class Usage Examples

Méthodes publiques

Méthode Description
tokenizeString ( string $string, string $eolChar, integer $stackPtr ) : array Creates an array of tokens when given some PHP code.

Private Methods

Méthode Description
_collectWhitespace ( string $string, integer $start, integer $end ) : array | null Collect consecutive whitespace into a single token.
_processLine ( string $string, string $eolChar, integer $start, integer $end ) : array Process a single line of a comment.

Method Details

tokenizeString() public méthode

Starts by using token_get_all() but does a lot of extra processing to insert information about the context of the token.
public tokenizeString ( string $string, string $eolChar, integer $stackPtr ) : array
$string string The string to tokenize.
$eolChar string The EOL character to use for splitting strings.
$stackPtr integer The position of the first token in the file.
Résultat array