@@ -23,8 +23,8 @@ final class SatelliteBuilder implements Configurator\SatelliteBuilderInterface
23
23
private iterable $ command = [];
24
24
/** @var iterable<string> */
25
25
private iterable $ tags = [];
26
- private null | PackagingContract \AssetInterface |PackagingContract \FileInterface $ composerJsonFile = null ;
27
- private null | PackagingContract \AssetInterface |PackagingContract \FileInterface $ composerLockFile = null ;
26
+ private PackagingContract \AssetInterface |PackagingContract \FileInterface | null $ composerJsonFile = null ;
27
+ private PackagingContract \AssetInterface |PackagingContract \FileInterface | null $ composerLockFile = null ;
28
28
/** @var iterable<array<string, string>> */
29
29
private iterable $ paths = [];
30
30
/** @var \AppendIterator<string,PackagingContract\FileInterface, \Iterator<string,PackagingContract\FileInterface>> */
@@ -67,7 +67,7 @@ public function withComposerRequire(string ...$package): self
67
67
68
68
public function withComposerFile (
69
69
PackagingContract \AssetInterface |PackagingContract \FileInterface $ composerJsonFile ,
70
- PackagingContract \AssetInterface |PackagingContract \FileInterface $ composerLockFile = null
70
+ PackagingContract \AssetInterface |PackagingContract \FileInterface | null $ composerLockFile = null
71
71
): self {
72
72
$ this ->composerJsonFile = $ composerJsonFile ;
73
73
$ this ->composerLockFile = $ composerLockFile ;
@@ -77,7 +77,7 @@ public function withComposerFile(
77
77
78
78
public function withFile (
79
79
PackagingContract \AssetInterface |PackagingContract \FileInterface $ source ,
80
- string $ destinationPath = null
80
+ ? string $ destinationPath = null
81
81
): self {
82
82
if (!$ source instanceof PackagingContract \FileInterface) {
83
83
$ source = new Packaging \VirtualFile ($ source );
@@ -92,7 +92,7 @@ public function withFile(
92
92
return $ this ;
93
93
}
94
94
95
- public function withDirectory (PackagingContract \DirectoryInterface $ source , string $ destinationPath = null ): self
95
+ public function withDirectory (PackagingContract \DirectoryInterface $ source , ? string $ destinationPath = null ): self
96
96
{
97
97
$ this ->paths [] = [$ source ->getPath (), $ destinationPath ?? $ source ->getPath ()];
98
98
@@ -132,42 +132,42 @@ public function withComposerAuthenticationToken(string $url, string $auth): self
132
132
return $ this ;
133
133
}
134
134
135
- public function withGithubOauthAuthentication (string $ token , string $ url = 'github.com ' ): self
135
+ public function withGithubOauthAuthentication (string $ token , string $ domain = 'github.com ' ): self
136
136
{
137
- $ this ->authenticationTokens [$ url ] = [
137
+ $ this ->authenticationTokens [$ domain ] = [
138
138
'type ' => 'github-token ' ,
139
- 'url ' => $ url ,
140
- 'token ' => $ token
139
+ 'url ' => $ domain ,
140
+ 'token ' => $ token,
141
141
];
142
142
143
143
return $ this ;
144
144
}
145
145
146
- public function withGitlabOauthAuthentication (string $ token , string $ url = 'gitlab.com ' ): self
146
+ public function withGitlabOauthAuthentication (string $ token , string $ domain = 'gitlab.com ' ): self
147
147
{
148
- $ this ->authenticationTokens [$ url ] = [
148
+ $ this ->authenticationTokens [$ domain ] = [
149
149
'type ' => 'gitlab-oauth ' ,
150
- 'url ' => $ url ,
151
- 'token ' => $ token
150
+ 'url ' => $ domain ,
151
+ 'token ' => $ token,
152
152
];
153
153
154
154
return $ this ;
155
155
}
156
156
157
- public function withGitlabTokenAuthentication (string $ token , string $ url = 'gitlab.com ' ): self
157
+ public function withGitlabTokenAuthentication (string $ token , string $ domain = 'gitlab.com ' ): self
158
158
{
159
- $ this ->authenticationTokens [$ url ] = [
159
+ $ this ->authenticationTokens [$ domain ] = [
160
160
'type ' => 'gitlab-token ' ,
161
- 'url ' => $ url ,
162
- 'token ' => $ token
161
+ 'url ' => $ domain ,
162
+ 'token ' => $ token,
163
163
];
164
164
165
165
return $ this ;
166
166
}
167
167
168
- public function withHttpBasicAuthentication (string $ url , string $ username , string $ password ): self
168
+ public function withHttpBasicAuthentication (string $ domain , string $ username , string $ password ): self
169
169
{
170
- $ this ->authenticationTokens [$ url ] = [
170
+ $ this ->authenticationTokens [$ domain ] = [
171
171
'type ' => 'http-basic ' ,
172
172
'username ' => $ username ,
173
173
'password ' => $ password ,
@@ -176,11 +176,11 @@ public function withHttpBasicAuthentication(string $url, string $username, strin
176
176
return $ this ;
177
177
}
178
178
179
- public function withHttpBearerAuthentication (string $ url , string $ token ): self
179
+ public function withHttpBearerAuthentication (string $ domain , string $ token ): self
180
180
{
181
- $ this ->authenticationTokens [$ url ] = [
181
+ $ this ->authenticationTokens [$ domain ] = [
182
182
'type ' => 'http-bearer ' ,
183
- 'token ' => $ token
183
+ 'token ' => $ token,
184
184
];
185
185
186
186
return $ this ;
0 commit comments