Skip to content

Commit 13c55cb

Browse files
committed
Extract values instead of filter files
1 parent ddb8ae7 commit 13c55cb

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

src/Adapter/Docker/Satellite.php

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ public function dependsOn(string ...$dependencies): self
5656
public function build(
5757
LoggerInterface $logger,
5858
): void {
59-
$this->sortFiles();
60-
$archive = new TarArchive($this->dockerfile, ...$this->files);
59+
$archive = new TarArchive($this->dockerfile, ...array_values($this->files));
6160

6261
$iterator = function (iterable $tags) {
6362
foreach ($tags as $tag) {
@@ -86,21 +85,4 @@ public function build(
8685
throw new \RuntimeException('Process exited unexpectedly.');
8786
}
8887
}
89-
90-
private function sortFiles(): void
91-
{
92-
uksort($this->files, function ($a, $b) {
93-
if (is_numeric($a) && is_numeric($b)) {
94-
return $a - $b;
95-
}
96-
if (is_numeric($a)) {
97-
return -1;
98-
}
99-
if (is_numeric($b)) {
100-
return 1;
101-
}
102-
103-
return strcmp($a, $b);
104-
});
105-
}
10688
}

0 commit comments

Comments
 (0)