Skip to content

Commit 3776e9a

Browse files
committed
Better naming
1 parent e67e18e commit 3776e9a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Process/Entities/Process.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818
final class Process implements ProcessContract
1919
{
20-
private $exitCode;
21-
2220
private $output;
2321

22+
private $exitCode;
23+
2424
public function __construct(?string $output = null, ?int $exitCode = null)
2525
{
2626
$this->output = $output;

src/Support/Composer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function uninstall(RequirementContract $requirement, JobContract $job): v
150150
private function executeCommand(JobContract $job, string $command): void
151151
{
152152
$jobLogFile = sprintf('%s/%s.log', $this->loggingPath, $job->getId());
153-
$this->addLineToLogFile($jobLogFile, "$ {$command}\n");
153+
$this->writeLineToLogFile($jobLogFile, "$ {$command}\n");
154154

155155
$commands = [
156156
sprintf('export COMPOSER_HOME=%s', '~/.composer'),
@@ -168,10 +168,10 @@ private function executeCommand(JobContract $job, string $command): void
168168
$process->start();
169169

170170
foreach ($process as $type => $data) {
171-
$this->addLineToLogFile($jobLogFile, trim($data));
171+
$this->writeLineToLogFile($jobLogFile, trim($data));
172172
}
173173

174-
$this->addLineToLogFile($jobLogFile, "\n\nDone. Job exited with {$process->getExitCode()}.");
174+
$this->writeLineToLogFile($jobLogFile, "\n\nDone. Job exited with {$process->getExitCode()}.");
175175

176176
if ($process->getExitCode() !== 0) {
177177
throw JobFailed::withExitCode($job, $process->getExitCode());
@@ -197,7 +197,7 @@ private function getProcess(array $command): Process
197197
return (new Process($command, $this->workingPath))->setTimeout(null);
198198
}
199199

200-
private function addLineToLogFile(string $jobLogFile, string $line): void
200+
private function writeLineToLogFile(string $jobLogFile, string $line): void
201201
{
202202
$this->files->append($jobLogFile, $line . "\n");
203203
}

0 commit comments

Comments
 (0)