Skip to content

Commit c753c53

Browse files
committed
delete previous "ProjectServiceContainer..."s when building,
run cs-fixer
1 parent fe53fd3 commit c753c53

File tree

7 files changed

+16
-15
lines changed

7 files changed

+16
-15
lines changed

src/Adapter/ComposerFailureException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
final class ComposerFailureException extends \RuntimeException
88
{
9-
public function __construct(private readonly string $command = '', string $message = '', int $code = 0, null|\Throwable $previous = null)
9+
public function __construct(private readonly string $command = '', string $message = '', int $code = 0, \Throwable $previous = null)
1010
{
1111
parent::__construct($message, $code, $previous);
1212
}

src/Adapter/Docker/SatelliteBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function withComposerRequire(string ...$package): self
6767

6868
public function withComposerFile(
6969
PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile,
70-
null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null
70+
PackagingContract\FileInterface|PackagingContract\AssetInterface $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\FileInterface|PackagingContract\AssetInterface $source,
80-
null|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, null|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

src/Adapter/Filesystem/SatelliteBuilder.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function withComposerRequire(string ...$package): self
5555

5656
public function withComposerFile(
5757
PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile,
58-
null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null
58+
PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null
5959
): self {
6060
$this->composerJsonFile = $composerJsonFile;
6161
$this->composerLockFile = $composerLockFile;
@@ -65,7 +65,7 @@ public function withComposerFile(
6565

6666
public function withFile(
6767
PackagingContract\FileInterface|PackagingContract\AssetInterface $source,
68-
null|string $destinationPath = null
68+
string $destinationPath = null
6969
): self {
7070
if (!$source instanceof PackagingContract\FileInterface) {
7171
$source = new Packaging\VirtualFile($source);
@@ -80,7 +80,7 @@ public function withFile(
8080
return $this;
8181
}
8282

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

@@ -162,16 +162,17 @@ public function build(): Configurator\SatelliteInterface
162162

163163
$satellite->dependsOn(...$this->composerRequire);
164164

165-
$this->clearPipelines();
165+
$this->clearPreviousFiles();
166166

167167
return $satellite;
168168
}
169169

170-
private function clearPipelines(): void
170+
private function clearPreviousFiles(): void
171171
{
172172
$iterator = new \AppendIterator();
173173

174174
$iterator->append(new \GlobIterator($this->workdir.'/pipeline*.php', \FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::SKIP_DOTS));
175+
$iterator->append(new \GlobIterator($this->workdir.'/ProjectServiceContainer*.php', \FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::SKIP_DOTS));
175176

176177
foreach ($iterator as $file) {
177178
if (is_file($file->getPathname())) {

src/Adapter/Tar/SatelliteBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function withComposerRequire(string ...$package): self
4848

4949
public function withComposerFile(
5050
PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile,
51-
null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null
51+
PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null
5252
): self {
5353
$this->composerJsonFile = $composerJsonFile;
5454
$this->composerLockFile = $composerLockFile;
@@ -58,7 +58,7 @@ public function withComposerFile(
5858

5959
public function withFile(
6060
PackagingContract\FileInterface|PackagingContract\AssetInterface $source,
61-
null|string $destinationPath = null
61+
string $destinationPath = null
6262
): self {
6363
if (!$source instanceof PackagingContract\FileInterface) {
6464
$source = new Packaging\VirtualFile($source);
@@ -71,7 +71,7 @@ public function withFile(
7171
return $this;
7272
}
7373

74-
public function withDirectory(PackagingContract\DirectoryInterface $source, null|string $destinationPath = null): self
74+
public function withDirectory(PackagingContract\DirectoryInterface $source, string $destinationPath = null): self
7575
{
7676
$this->files->append(new \RecursiveIteratorIterator($source, \RecursiveIteratorIterator::SELF_FIRST));
7777

src/Cloud/Auth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final class Auth
1313
private string $pathName;
1414
private array $configuration;
1515

16-
public function __construct(null|string $pathName = null)
16+
public function __construct(string $pathName = null)
1717
{
1818
if (null === $pathName) {
1919
$this->pathName = getenv('HOME').'/.gyroscops/';

src/Plugin/SFTP/Builder/Server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function withPasswordAuthentication(Node\Expr $username, Node\Expr $passw
7777
return $this;
7878
}
7979

80-
public function withPrivateKeyAuthentication(Node\Expr $username, Node\Expr $publicKey, Node\Expr $privateKey, null|Node\Expr $privateKeyPassphrase = null): self
80+
public function withPrivateKeyAuthentication(Node\Expr $username, Node\Expr $publicKey, Node\Expr $privateKey, Node\Expr $privateKeyPassphrase = null): self
8181
{
8282
$this->username = $username;
8383
$this->publicKey = $publicKey;

src/Service.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ final class Service implements Configurator\FactoryInterface
3333
/** @var array<string, Satellite\Action\ConfigurationApplier> */
3434
private array $actionPlugins = [];
3535

36-
public function __construct(null|ExpressionLanguage $expressionLanguage = null)
36+
public function __construct(ExpressionLanguage $expressionLanguage = null)
3737
{
3838
$this->processor = new Processor();
3939
$this->configuration = new Satellite\Configuration();

0 commit comments

Comments
 (0)