Skip to content

Commit

Permalink
Fixed pint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cradu committed Apr 10, 2024
1 parent 472ed8a commit 4a6c2e9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config/git-hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
|
*/
'artisan_path' => base_path('artisan'),

/*
|--------------------------------------------------------------------------
| Output errors
Expand Down
14 changes: 7 additions & 7 deletions src/Console/Commands/Hooks/BaseCodeAnalyzerPreCommitHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -128,7 +128,7 @@ protected function analizeCommittedFiles($commitFiles)
$process = $this->runCommands($command);

if (config('git-hooks.debug_commands')) {
$this->command->getOutput()->write(PHP_EOL . ' <bg=yellow;fg=white> DEBUG </> Executed command: ' . $process->getCommandLine() . PHP_EOL);
$this->command->getOutput()->write(PHP_EOL.' <bg=yellow;fg=white> DEBUG </> Executed command: '.$process->getCommandLine().PHP_EOL);
}

$isProperlyFormatted = $process->isSuccessful();
Expand Down Expand Up @@ -362,7 +362,7 @@ public function getFixerExecutable(): string
*/
public function setRunInDocker($runInDocker)
{
$this->runInDocker = (bool)$runInDocker;
$this->runInDocker = (bool) $runInDocker;

return $this;
}
Expand All @@ -373,7 +373,7 @@ public function getRunInDocker(): bool
}

/**
* @param string $dockerContainer
* @param string $dockerContainer
* @return BaseCodeAnalyzerPreCommitHook
*/
public function setDockerContainer($dockerContainer)
Expand All @@ -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);
}
}

0 comments on commit 4a6c2e9

Please # to comment.