Skip to content

Commit

Permalink
Revert the join to implode and using nullable types
Browse files Browse the repository at this point in the history
  • Loading branch information
tonysm committed Oct 4, 2024
1 parent b3e6cd7 commit 14b3a58
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/Services/BaseService.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ abstract class BaseService

protected static $category;
protected static $displayName;

protected $organization = 'library'; // Official repositories use `library` as the organization name.
protected $imageName;
protected $dockerTagsClass = DockerTags::class;
Expand Down Expand Up @@ -67,7 +68,7 @@ public static function name(): string
return static::$displayName ?? Str::afterLast(static::class, '\\');
}

public function enable(bool $useDefaults = false, array $passthroughOptions = [], ?string $runOptions = null): void
public function enable(bool $useDefaults = false, array $passthroughOptions = [], string $runOptions = null): void
{
$this->useDefaults = $useDefaults;

Expand All @@ -79,7 +80,7 @@ public function enable(bool $useDefaults = false, array $passthroughOptions = []

try {
$this->docker->bootContainer(
implode(' ', array_filter([
join(' ', array_filter([
$runOptions,
$this->sanitizeDockerRunTemplate($this->dockerRunTemplate),
$this->buildPassthroughOptionsString($passthroughOptions),
Expand Down Expand Up @@ -258,6 +259,6 @@ public function buildPassthroughOptionsString(array $passthroughOptions): string
return '';
}

return implode(' ', $passthroughOptions);
return join(' ', $passthroughOptions);
}
}

0 comments on commit 14b3a58

Please sign in to comment.