diff --git a/config/git-hooks.php b/config/git-hooks.php index 97c9ef0..47d4cb1 100644 --- a/config/git-hooks.php +++ b/config/git-hooks.php @@ -234,7 +234,7 @@ | */ 'artisan_path' => base_path('artisan'), - + /* |-------------------------------------------------------------------------- | Output errors diff --git a/src/Console/Commands/Hooks/BaseCodeAnalyzerPreCommitHook.php b/src/Console/Commands/Hooks/BaseCodeAnalyzerPreCommitHook.php index 5bd9072..28e21fb 100644 --- a/src/Console/Commands/Hooks/BaseCodeAnalyzerPreCommitHook.php +++ b/src/Console/Commands/Hooks/BaseCodeAnalyzerPreCommitHook.php @@ -57,14 +57,14 @@ abstract class BaseCodeAnalyzerPreCommitHook * @var array */ protected $filesBadlyFormattedPaths = []; - + /** * Run tool in docker * * @var bool */ protected $runInDocker = false; - + /** * Docker container on which to run * @@ -128,7 +128,7 @@ protected function analizeCommittedFiles($commitFiles) $process = $this->runCommands($command); if (config('git-hooks.debug_commands')) { - $this->command->getOutput()->write(PHP_EOL . ' DEBUG Executed command: ' . $process->getCommandLine() . PHP_EOL); + $this->command->getOutput()->write(PHP_EOL.' DEBUG Executed command: '.$process->getCommandLine().PHP_EOL); } $isProperlyFormatted = $process->isSuccessful(); @@ -362,7 +362,7 @@ public function getFixerExecutable(): string */ public function setRunInDocker($runInDocker) { - $this->runInDocker = (bool)$runInDocker; + $this->runInDocker = (bool) $runInDocker; return $this; } @@ -373,7 +373,7 @@ public function getRunInDocker(): bool } /** - * @param string $dockerContainer + * @param string $dockerContainer * @return BaseCodeAnalyzerPreCommitHook */ public function setDockerContainer($dockerContainer) @@ -390,10 +390,10 @@ public function getDockerContainer(): string private function dockerCommand(string $command): string { - if (!$this->runInDocker || empty($this->dockerContainer)) { + if (! $this->runInDocker || empty($this->dockerContainer)) { return $command; } - return 'docker exec ' . escapeshellarg($this->dockerContainer) . ' sh -c ' . escapeshellarg($command); + return 'docker exec '.escapeshellarg($this->dockerContainer).' sh -c '.escapeshellarg($command); } }