PHP Класс Squiz_Sniffs_Functions_FunctionDeclarationArgumentSpacingSniff, PHP_CodeSniffer

Checks that arguments in function declarations are spaced correctly.
Автор: Greg Sherwood ([email protected])
Автор: Marc McIntyre ([email protected])
Наследование: implements PHP_CodeSniffer_Sniff
Показать файл Открыть проект

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

Свойство Тип Описание
$equalsSpacing integer How many spaces should surround the equals signs.
$requiredSpacesAfterOpen integer How many spaces should follow the opening bracket.
$requiredSpacesBeforeClose integer How many spaces should precede the closing bracket.

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

Метод Описание
process ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : void Processes this test, when one of its tokens is encountered.
processBracket ( PHP_CodeSniffer_File $phpcsFile, integer $openBracket ) : void Processes the contents of a single set of brackets.
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 The file being scanned.
$stackPtr integer The position of the current token in the stack passed in $tokens.
Результат void

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

Processes the contents of a single set of brackets.
public processBracket ( PHP_CodeSniffer_File $phpcsFile, integer $openBracket ) : void
$phpcsFile PHP_CodeSniffer_File The file being scanned.
$openBracket integer The position of the open bracket in the stack passed in $tokens.
Результат void

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

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

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

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

How many spaces should surround the equals signs.
public int $equalsSpacing
Результат integer

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

How many spaces should follow the opening bracket.
public int $requiredSpacesAfterOpen
Результат integer

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

How many spaces should precede the closing bracket.
public int $requiredSpacesBeforeClose
Результат integer