From 14b3a58c295ebd8d7de95a1377c5f0e17c483469 Mon Sep 17 00:00:00 2001 From: Tony Messias Date: Fri, 4 Oct 2024 13:05:47 -0300 Subject: [PATCH] Revert the join to implode and using nullable types --- app/Services/BaseService.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Services/BaseService.php b/app/Services/BaseService.php index aa2ef81..62a68a6 100644 --- a/app/Services/BaseService.php +++ b/app/Services/BaseService.php @@ -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; @@ -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; @@ -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), @@ -258,6 +259,6 @@ public function buildPassthroughOptionsString(array $passthroughOptions): string return ''; } - return implode(' ', $passthroughOptions); + return join(' ', $passthroughOptions); } }