Skip to content

Commit 312d50e

Browse files
authored
Apply suggestions from code review
1 parent f15caa9 commit 312d50e

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/PHP/ComposerConfigGlobal.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,15 @@
1010
{
1111
public function __construct(
1212
private string $host,
13-
private string $token,
13+
private string $tokenArgument,
1414
) {
1515
}
1616

1717
public function __toString(): string
1818
{
19-
return (string) new Dockerfile\Run(sprintf(
20-
<<<'RUN'
21-
composer config --global %s %s
22-
RUN,
23-
$this->host,
24-
$this->token,
25-
));
19+
return (string) new Dockerfile\Run(<<<"RUN"
20+
composer config --global {$this->host} \${{$this->tokenArgument}}
21+
RUN,
22+
);
2623
}
2724
}

0 commit comments

Comments
 (0)