Skip to content

Commit

Permalink
Renamed variables
Browse files Browse the repository at this point in the history
  • Loading branch information
sebprt committed Jun 26, 2024
1 parent d0f3a06 commit de74445
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions src/Adapter/Docker/SatelliteBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ final class SatelliteBuilder implements Configurator\SatelliteBuilderInterface
private iterable $command = [];
/** @var iterable<string> */
private iterable $tags = [];
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile = null;
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null;
private PackagingContract\AssetInterface|PackagingContract\FileInterface|null $composerJsonFile = null;
private PackagingContract\AssetInterface|PackagingContract\FileInterface|null $composerLockFile = null;
/** @var iterable<array<string, string>> */
private iterable $paths = [];
/** @var \AppendIterator<string,PackagingContract\FileInterface, \Iterator<string,PackagingContract\FileInterface>> */
Expand Down Expand Up @@ -67,7 +67,7 @@ public function withComposerRequire(string ...$package): self

public function withComposerFile(
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile,
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null
PackagingContract\AssetInterface|PackagingContract\FileInterface|null $composerLockFile = null
): self {
$this->composerJsonFile = $composerJsonFile;
$this->composerLockFile = $composerLockFile;
Expand All @@ -77,7 +77,7 @@ public function withComposerFile(

public function withFile(
PackagingContract\AssetInterface|PackagingContract\FileInterface $source,
string $destinationPath = null
?string $destinationPath = null
): self {
if (!$source instanceof PackagingContract\FileInterface) {
$source = new Packaging\VirtualFile($source);
Expand All @@ -92,7 +92,7 @@ public function withFile(
return $this;
}

public function withDirectory(PackagingContract\DirectoryInterface $source, string $destinationPath = null): self
public function withDirectory(PackagingContract\DirectoryInterface $source, ?string $destinationPath = null): self
{
$this->paths[] = [$source->getPath(), $destinationPath ?? $source->getPath()];

Expand Down Expand Up @@ -132,42 +132,42 @@ public function withComposerAuthenticationToken(string $url, string $auth): self
return $this;
}

public function withGithubOauthAuthentication(string $token, string $url = 'github.com'): self
public function withGithubOauthAuthentication(string $token, string $domain = 'github.com'): self
{
$this->authenticationTokens[$url] = [
$this->authenticationTokens[$domain] = [
'type' => 'github-token',
'url' => $url,
'token' => $token
'url' => $domain,
'token' => $token,
];

return $this;
}

public function withGitlabOauthAuthentication(string $token, string $url = 'gitlab.com'): self
public function withGitlabOauthAuthentication(string $token, string $domain = 'gitlab.com'): self
{
$this->authenticationTokens[$url] = [
$this->authenticationTokens[$domain] = [
'type' => 'gitlab-oauth',
'url' => $url,
'token' => $token
'url' => $domain,
'token' => $token,
];

return $this;
}

public function withGitlabTokenAuthentication(string $token, string $url = 'gitlab.com'): self
public function withGitlabTokenAuthentication(string $token, string $domain = 'gitlab.com'): self
{
$this->authenticationTokens[$url] = [
$this->authenticationTokens[$domain] = [
'type' => 'gitlab-token',
'url' => $url,
'token' => $token
'url' => $domain,
'token' => $token,
];

return $this;
}

public function withHttpBasicAuthentication(string $url, string $username, string $password): self
public function withHttpBasicAuthentication(string $domain, string $username, string $password): self
{
$this->authenticationTokens[$url] = [
$this->authenticationTokens[$domain] = [
'type' => 'http-basic',
'username' => $username,
'password' => $password,
Expand All @@ -176,11 +176,11 @@ public function withHttpBasicAuthentication(string $url, string $username, strin
return $this;
}

public function withHttpBearerAuthentication(string $url, string $token): self
public function withHttpBearerAuthentication(string $domain, string $token): self
{
$this->authenticationTokens[$url] = [
$this->authenticationTokens[$domain] = [
'type' => 'http-bearer',
'token' => $token
'token' => $token,
];

return $this;
Expand Down

0 comments on commit de74445

Please sign in to comment.