PHP Class Overtrue\PHPLint\Command\LintCommand

Inheritance: extends Symfony\Component\Console\Command\Command
Afficher le fichier Open project: overtrue/phplint

Protected Properties

Свойство Type Description
$defaults array
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface

Méthodes publiques

Méthode Description
initialize ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) Initializes the command just after the input has been validated.

Méthodes protégées

Méthode Description
configure ( ) Configures the current command.
execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : null | integer Executes the current command.
executeLint ( Linter $linter, Symfony\Component\Console\Output\OutputInterface $output, integer $fileCount, boolean $cache = true ) Execute lint and return errors.
getConfigFile ( ) : string | null Get configuration file.
getScreenColumns ( ) : integer Get screen columns.
loadConfiguration ( string $path ) : array Load configuration from yaml.
mergeOptions ( ) : array Merge options.
showErrors ( array $errors ) Show errors detail.

Method Details

configure() protected méthode

Configures the current command.
protected configure ( )

execute() protected méthode

This method is not abstract because you can use this class as a concrete class. In this case, instead of defining the execute() method, you set the code to execute by passing a Closure to the setCode() method.
See also: setCode()
protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : null | integer
$input Symfony\Component\Console\Input\InputInterface An InputInterface instance
$output Symfony\Component\Console\Output\OutputInterface An OutputInterface instance
Résultat null | integer null or 0 if everything went fine, or an error code

executeLint() protected méthode

Execute lint and return errors.
protected executeLint ( Linter $linter, Symfony\Component\Console\Output\OutputInterface $output, integer $fileCount, boolean $cache = true )
$linter Overtrue\PHPLint\Linter
$output Symfony\Component\Console\Output\OutputInterface
$fileCount integer
$cache boolean

getConfigFile() protected méthode

Get configuration file.
protected getConfigFile ( ) : string | null
Résultat string | null

getScreenColumns() protected méthode

Get screen columns.
protected getScreenColumns ( ) : integer
Résultat integer

initialize() public méthode

This is mainly useful when a lot of commands extends one main command where some things need to be initialized based on the input arguments and options.
public initialize ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface An InputInterface instance
$output Symfony\Component\Console\Output\OutputInterface An OutputInterface instance

loadConfiguration() protected méthode

Load configuration from yaml.
protected loadConfiguration ( string $path ) : array
$path string
Résultat array

mergeOptions() protected méthode

Merge options.
protected mergeOptions ( ) : array
Résultat array

showErrors() protected méthode

Show errors detail.
protected showErrors ( array $errors )
$errors array

Property Details

$defaults protected_oe property

protected array $defaults
Résultat array

$input protected_oe property

protected InputInterface,Symfony\Component\Console\Input $input
Résultat Symfony\Component\Console\Input\InputInterface

$output protected_oe property

protected OutputInterface,Symfony\Component\Console\Output $output
Résultat Symfony\Component\Console\Output\OutputInterface