PHP 인터페이스 PhpCsFixer\Fixer\FixerInterface

저자: Dariusz Rumiński ([email protected])
저자: Fabien Potencier ([email protected])
파일 보기 프로젝트 열기: friendsofphp/php-cs-fixer 0 사용 예제들

공개 메소드들

메소드 설명
fix ( SplFileInfo $file, Tokens $tokens ) Fixes a file.
getName ( ) : string Returns the name of the fixer.
getPriority ( ) : integer Returns the priority of the fixer.
isCandidate ( Tokens $tokens ) : boolean Check if the fixer is a candidate for given Tokens collection.
isRisky ( ) : boolean Check if fixer is risky or not.
supports ( SplFileInfo $file ) : boolean Returns true if the file is supported by this fixer.

메소드 상세

fix() 공개 메소드

Fixes a file.
public fix ( SplFileInfo $file, Tokens $tokens )
$file SplFileInfo A \SplFileInfo instance
$tokens PhpCsFixer\Tokenizer\Tokens Tokens collection

getName() 공개 메소드

The name must be all lowercase and without any spaces.
public getName ( ) : string
리턴 string The name of the fixer

getPriority() 공개 메소드

The default priority is 0 and higher priorities are executed first.
public getPriority ( ) : integer
리턴 integer

isCandidate() 공개 메소드

Fixer is a candidate when the collection contains tokens that may be fixed during fixer work. This could be considered as some kind of bloom filter. When this method returns true then to the Tokens collection may or may not need a fixing, but when this method returns false then the Tokens collection need no fixing for sure.
public isCandidate ( Tokens $tokens ) : boolean
$tokens PhpCsFixer\Tokenizer\Tokens
리턴 boolean

isRisky() 공개 메소드

Risky fixer could change code behavior!
public isRisky ( ) : boolean
리턴 boolean

supports() 공개 메소드

Returns true if the file is supported by this fixer.
public supports ( SplFileInfo $file ) : boolean
$file SplFileInfo
리턴 boolean true if the file is supported by this fixer, false otherwise