Skip to content

Commit f1dbf98

Browse files
committed
Renamed arguments + ran php-cs-fixer
1 parent 8b7feef commit f1dbf98

6 files changed

+12
-11
lines changed

src/Dockerfile.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ final class Dockerfile implements \IteratorAggregate, \Countable, FileInterface,
1212
/** @var iterable|Dockerfile\LayerInterface[] */
1313
private iterable $layers;
1414

15-
public function __construct(null|LayerInterface ...$layers)
15+
public function __construct(?LayerInterface ...$layers)
1616
{
1717
$this->layers = $layers;
1818
}

src/PHP/ComposerGithubOauthAuthentication.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@
1010
{
1111
public function __construct(
1212
private string $token,
13+
private string $domain = 'github.com',
1314
) {
1415
}
1516

1617
public function __toString(): string
1718
{
1819
return (string) new Dockerfile\Run(sprintf(<<<'RUN'
1920
set -ex \
20-
&& composer config --auth github-oauth.github.com %s
21-
RUN, $this->token));
21+
&& composer config --auth github-oauth.%s %s
22+
RUN, $this->domain, $this->token));
2223
}
2324
}

src/PHP/ComposerGitlabOauthAuthentication.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
public function __construct(
1212
private string $token,
13-
private string $instance = 'gitlab.com',
13+
private string $domain = 'gitlab.com',
1414
) {
1515
}
1616

@@ -19,6 +19,6 @@ public function __toString(): string
1919
return (string) new Dockerfile\Run(sprintf(<<<'RUN'
2020
set -ex \
2121
&& composer config --auth gitlab-oauth.%s %s
22-
RUN, $this->instance, $this->token));
22+
RUN, $this->domain, $this->token));
2323
}
2424
}

src/PHP/ComposerGitlabTokenAuthentication.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
public function __construct(
1212
private string $token,
13-
private string $instance = 'gitlab.com',
13+
private string $domain = 'gitlab.com',
1414
) {
1515
}
1616

@@ -19,6 +19,6 @@ public function __toString(): string
1919
return (string) new Dockerfile\Run(sprintf(<<<'RUN'
2020
set -ex \
2121
&& composer config --auth gitlab-token.%s %s
22-
RUN, $this->instance, $this->token));
22+
RUN, $this->domain, $this->token));
2323
}
2424
}

src/PHP/ComposerHttpBasicAuthentication.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
final readonly class ComposerHttpBasicAuthentication implements Dockerfile\LayerInterface, \Stringable
1010
{
1111
public function __construct(
12-
private string $url,
12+
private string $domain,
1313
private string $username,
1414
private string $password,
1515
) {
@@ -20,6 +20,6 @@ public function __toString(): string
2020
return (string) new Dockerfile\Run(sprintf(<<<'RUN'
2121
set -ex \
2222
&& composer config --auth http-basic.%s %s %s
23-
RUN, $this->url, $this->username, $this->password));
23+
RUN, $this->domain, $this->username, $this->password));
2424
}
2525
}

src/PHP/ComposerHttpBearerAuthentication.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
final readonly class ComposerHttpBearerAuthentication implements Dockerfile\LayerInterface, \Stringable
1010
{
1111
public function __construct(
12-
private string $url,
12+
private string $domain,
1313
private string $token,
1414
) {
1515
}
@@ -19,6 +19,6 @@ public function __toString(): string
1919
return (string) new Dockerfile\Run(sprintf(<<<'RUN'
2020
set -ex \
2121
&& composer config --auth bearer.%s %s
22-
RUN, $this->url, $this->token));
22+
RUN, $this->domain, $this->token));
2323
}
2424
}

0 commit comments

Comments
 (0)