PHP Класс SmileElasticsuite_Sniffs_Classes_MultipleClassesOneFileSniff, elasticsuite

Forbid declaration of several classes into the same file.
Автор: Aurelien FOUCRET ([email protected])
Наследование: implements PHP_CodeSniffer_Sniff
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$supportedTokenizers array A list of tokenizers this sniff supports.

Защищенные свойства (Protected)

Свойство Тип Описание
$classCount integer The number of times the T_CLASS token is encountered in the file.
$currentFile string The current file this class is operating on.

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

Метод Описание
process ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : void Processes this test, when one of its tokens is encountered.
register ( ) : array Returns an array of tokens this test wants to listen for.

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

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

Processes this test, when one of its tokens is encountered.
public process ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : void
$phpcsFile PHP_CodeSniffer_File All the tokens found in the document.
$stackPtr integer The position of the current token in the stack passed in $tokens.
Результат void

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

Returns an array of tokens this test wants to listen for.
public register ( ) : array
Результат array

Описание свойств

$classCount защищенное свойство

The number of times the T_CLASS token is encountered in the file.
protected int $classCount
Результат integer

$currentFile защищенное свойство

The current file this class is operating on.
protected string $currentFile
Результат string

$supportedTokenizers публичное свойство

A list of tokenizers this sniff supports.
public array $supportedTokenizers
Результат array