@@ -23,8 +23,8 @@ final class SatelliteBuilder implements Configurator\SatelliteBuilderInterface
2323 private iterable $ command = [];
2424 /** @var iterable<string> */
2525 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 ;
2828 /** @var iterable<array<string, string>> */
2929 private iterable $ paths = [];
3030 /** @var \AppendIterator<string,PackagingContract\FileInterface, \Iterator<string,PackagingContract\FileInterface>> */
@@ -67,7 +67,7 @@ public function withComposerRequire(string ...$package): self
6767
6868 public function withComposerFile (
6969 PackagingContract \AssetInterface |PackagingContract \FileInterface $ composerJsonFile ,
70- PackagingContract \AssetInterface |PackagingContract \FileInterface $ composerLockFile = null
70+ PackagingContract \AssetInterface |PackagingContract \FileInterface | null $ composerLockFile = null
7171 ): self {
7272 $ this ->composerJsonFile = $ composerJsonFile ;
7373 $ this ->composerLockFile = $ composerLockFile ;
@@ -77,7 +77,7 @@ public function withComposerFile(
7777
7878 public function withFile (
7979 PackagingContract \AssetInterface |PackagingContract \FileInterface $ source ,
80- string $ destinationPath = null
80+ ? string $ destinationPath = null
8181 ): self {
8282 if (!$ source instanceof PackagingContract \FileInterface) {
8383 $ source = new Packaging \VirtualFile ($ source );
@@ -92,7 +92,7 @@ public function withFile(
9292 return $ this ;
9393 }
9494
95- public function withDirectory (PackagingContract \DirectoryInterface $ source , string $ destinationPath = null ): self
95+ public function withDirectory (PackagingContract \DirectoryInterface $ source , ? string $ destinationPath = null ): self
9696 {
9797 $ this ->paths [] = [$ source ->getPath (), $ destinationPath ?? $ source ->getPath ()];
9898
@@ -132,42 +132,42 @@ public function withComposerAuthenticationToken(string $url, string $auth): self
132132 return $ this ;
133133 }
134134
135- public function withGithubOauthAuthentication (string $ token , string $ url = 'github.com ' ): self
135+ public function withGithubOauthAuthentication (string $ token , string $ domain = 'github.com ' ): self
136136 {
137- $ this ->authenticationTokens [$ url ] = [
137+ $ this ->authenticationTokens [$ domain ] = [
138138 'type ' => 'github-token ' ,
139- 'url ' => $ url ,
140- 'token ' => $ token
139+ 'url ' => $ domain ,
140+ 'token ' => $ token,
141141 ];
142142
143143 return $ this ;
144144 }
145145
146- public function withGitlabOauthAuthentication (string $ token , string $ url = 'gitlab.com ' ): self
146+ public function withGitlabOauthAuthentication (string $ token , string $ domain = 'gitlab.com ' ): self
147147 {
148- $ this ->authenticationTokens [$ url ] = [
148+ $ this ->authenticationTokens [$ domain ] = [
149149 'type ' => 'gitlab-oauth ' ,
150- 'url ' => $ url ,
151- 'token ' => $ token
150+ 'url ' => $ domain ,
151+ 'token ' => $ token,
152152 ];
153153
154154 return $ this ;
155155 }
156156
157- public function withGitlabTokenAuthentication (string $ token , string $ url = 'gitlab.com ' ): self
157+ public function withGitlabTokenAuthentication (string $ token , string $ domain = 'gitlab.com ' ): self
158158 {
159- $ this ->authenticationTokens [$ url ] = [
159+ $ this ->authenticationTokens [$ domain ] = [
160160 'type ' => 'gitlab-token ' ,
161- 'url ' => $ url ,
162- 'token ' => $ token
161+ 'url ' => $ domain ,
162+ 'token ' => $ token,
163163 ];
164164
165165 return $ this ;
166166 }
167167
168- public function withHttpBasicAuthentication (string $ url , string $ username , string $ password ): self
168+ public function withHttpBasicAuthentication (string $ domain , string $ username , string $ password ): self
169169 {
170- $ this ->authenticationTokens [$ url ] = [
170+ $ this ->authenticationTokens [$ domain ] = [
171171 'type ' => 'http-basic ' ,
172172 'username ' => $ username ,
173173 'password ' => $ password ,
@@ -176,11 +176,11 @@ public function withHttpBasicAuthentication(string $url, string $username, strin
176176 return $ this ;
177177 }
178178
179- public function withHttpBearerAuthentication (string $ url , string $ token ): self
179+ public function withHttpBearerAuthentication (string $ domain , string $ token ): self
180180 {
181- $ this ->authenticationTokens [$ url ] = [
181+ $ this ->authenticationTokens [$ domain ] = [
182182 'type ' => 'http-bearer ' ,
183- 'token ' => $ token
183+ 'token ' => $ token,
184184 ];
185185
186186 return $ this ;
0 commit comments