PHP Класс PHP_CodeSniffer_Tokenizers_Comment, PHP_CodeSniffer

Автор: Greg Sherwood ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
tokenizeString ( string $string, string $eolChar, integer $stackPtr ) : array Creates an array of tokens when given some PHP code.

Приватные методы

Метод Описание
_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.

Описание методов

tokenizeString() публичный Метод

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.
Результат array