PhpGitHooks\Module\PhpCsFixer\Service\PhpCsFixerTool::execute PHP Метод

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

public execute ( array $files, boolean $psr0, boolean $psr1, boolean $psr2, boolean $symfony, string $options, string $errorMessage )
$files array
$psr0 boolean
$psr1 boolean
$psr2 boolean
$symfony boolean
$options string
$errorMessage string
    public function execute(array $files, $psr0, $psr1, $psr2, $symfony, $options, $errorMessage)
    {
        if (true === $psr0) {
            $this->executeTool($files, 'PSR0', $options, $errorMessage);
        }
        if (true === $psr1) {
            $this->executeTool($files, 'PSR1', $options, $errorMessage);
        }
        if (true === $psr2) {
            $this->executeTool($files, 'PSR2', $options, $errorMessage);
        }
        if (true === $symfony) {
            $this->executeTool($files, 'SYMFONY', $options, $errorMessage);
        }
    }

Usage Example

 /**
  * @param CommandInterface|PhpCsFixerToolCommand $command
  */
 public function handle(CommandInterface $command)
 {
     $this->phpCsFixerTool->execute($command->getFiles(), $command->isPsr0(), $command->isPsr1(), $command->isPsr2(), $command->isSymfony(), $command->getOptions(), $command->getErrorMessage());
 }