Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
gplanchat authored Feb 1, 2024
1 parent f15caa9 commit 312d50e
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/PHP/ComposerConfigGlobal.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,15 @@
{
public function __construct(
private string $host,
private string $token,
private string $tokenArgument,
) {
}

public function __toString(): string
{
return (string) new Dockerfile\Run(sprintf(
<<<'RUN'
composer config --global %s %s
RUN,
$this->host,
$this->token,
));
return (string) new Dockerfile\Run(<<<"RUN"
composer config --global {$this->host} \${{$this->tokenArgument}}
RUN,
);
}
}

0 comments on commit 312d50e

Please sign in to comment.