PHP Class PhpCsFixer\Test\IntegrationCaseFactory

Author: Dariusz Rumiński ([email protected])
Exibir arquivo Open project: friendsofphp/php-cs-fixer Class Usage Examples

Public Methods

Method Description
create ( Symfony\Component\Finder\SplFileInfo $file ) : IntegrationCase

Protected Methods

Method Description
determineConfig ( string $config ) : array Parses the '--CONFIG--' block of a '.test' file.
determineExpectedCode ( string | null $code, Symfony\Component\Finder\SplFileInfo $file ) : string
determineInputCode ( string | null $code, Symfony\Component\Finder\SplFileInfo $file ) : string | null
determineRequirements ( string $config ) : array Parses the '--REQUIREMENTS--' block of a '.test' file and determines requirements.
determineRuleset ( string $config ) : RuleSet Parses the '--RULESET--' block of a '.test' file and determines what fixers should be used.
determineSettings ( string $config ) : array Parses the '--SETTINGS--' block of a '.test' file and determines settings.

Private Methods

Method Description
determineCode ( string | null $code, Symfony\Component\Finder\SplFileInfo $file, string $suffix ) : string | null
parseJson ( string | null $encoded, array $template = null ) : array

Method Details

create() public method

public create ( Symfony\Component\Finder\SplFileInfo $file ) : IntegrationCase
$file Symfony\Component\Finder\SplFileInfo
return IntegrationCase

determineConfig() protected method

Parses the '--CONFIG--' block of a '.test' file.
protected determineConfig ( string $config ) : array
$config string
return array

determineExpectedCode() protected method

protected determineExpectedCode ( string | null $code, Symfony\Component\Finder\SplFileInfo $file ) : string
$code string | null
$file Symfony\Component\Finder\SplFileInfo
return string

determineInputCode() protected method

protected determineInputCode ( string | null $code, Symfony\Component\Finder\SplFileInfo $file ) : string | null
$code string | null
$file Symfony\Component\Finder\SplFileInfo
return string | null

determineRequirements() protected method

Parses the '--REQUIREMENTS--' block of a '.test' file and determines requirements.
protected determineRequirements ( string $config ) : array
$config string
return array

determineRuleset() protected method

Parses the '--RULESET--' block of a '.test' file and determines what fixers should be used.
protected determineRuleset ( string $config ) : RuleSet
$config string
return PhpCsFixer\RuleSet

determineSettings() protected method

Parses the '--SETTINGS--' block of a '.test' file and determines settings.
protected determineSettings ( string $config ) : array
$config string
return array