Skip to content

Commit c994150

Browse files
committed
use php cs fixer
1 parent 92cb153 commit c994150

File tree

182 files changed

+460
-255
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+460
-255
lines changed

src/Action/Action.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515

1616
final readonly class Action
1717
{
18-
public function __construct(private ?string $plugin, private ExpressionLanguage $interpreter = new Satellite\ExpressionLanguage()) {}
18+
public function __construct(private ?string $plugin, private ExpressionLanguage $interpreter = new Satellite\ExpressionLanguage())
19+
{
20+
}
1921

2022
public function __invoke(array $config, ActionBuilder $action, RepositoryInterface $repository): void
2123
{

src/Action/ConfigurationApplier.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ public function __construct(
1717
private readonly string $plugin,
1818
private readonly FactoryInterface $service,
1919
private readonly ExpressionLanguage $interpreter,
20-
) {}
20+
) {
21+
}
2122

2223
public function withAction(): self
2324
{

src/Action/Custom/Builder/Action.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ final class Action implements ActionBuilderInterface
1212
private ?Node\Expr $logger = null;
1313
private ?Node\Expr $state = null;
1414

15-
public function __construct(private readonly Node\Expr $service, private readonly string $containerNamespace) {}
15+
public function __construct(private readonly Node\Expr $service, private readonly string $containerNamespace)
16+
{
17+
}
1618

1719
public function withLogger(Node\Expr $logger): self
1820
{

src/Action/Custom/Factory/Action.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function normalize(array $config): array
4444
{
4545
try {
4646
return $this->processor->processConfiguration($this->configuration, $config);
47-
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) {
47+
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) {
4848
throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception);
4949
}
5050
}
@@ -55,7 +55,7 @@ public function validate(array $config): bool
5555
$this->processor->processConfiguration($this->configuration, $config);
5656

5757
return true;
58-
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) {
58+
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) {
5959
return false;
6060
}
6161
}

src/Action/Custom/Factory/Repository/RepositoryTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ trait RepositoryTrait
1414
/** @var string[] */
1515
private array $packages;
1616

17-
public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface
17+
public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface
1818
{
1919
array_push($this->files, ...$files);
2020

src/Action/Custom/Service.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function normalize(array $config): array
4343
{
4444
try {
4545
return $this->processor->processConfiguration($this->configuration, $config);
46-
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) {
46+
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) {
4747
throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception);
4848
}
4949
}
@@ -54,7 +54,7 @@ public function validate(array $config): bool
5454
$this->processor->processConfiguration($this->configuration, $config);
5555

5656
return true;
57-
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) {
57+
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) {
5858
return false;
5959
}
6060
}

src/Action/SFTP/Builder/Action.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ public function __construct(
1818
private readonly Node\Expr $password,
1919
private readonly Node\Expr $localFilePath,
2020
private readonly Node\Expr $serverFilePath,
21-
) {}
21+
) {
22+
}
2223

2324
public function withLogger(Node\Expr $logger): self
2425
{

src/Action/SFTP/Factory/Action.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function normalize(array $config): array
3939
{
4040
try {
4141
return $this->processor->processConfiguration($this->configuration, $config);
42-
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) {
42+
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) {
4343
throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception);
4444
}
4545
}
@@ -50,7 +50,7 @@ public function validate(array $config): bool
5050
$this->normalize($config);
5151

5252
return true;
53-
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) {
53+
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) {
5454
return false;
5555
}
5656
}
@@ -68,7 +68,7 @@ public function compile(array $config): Repository
6868

6969
try {
7070
return new Repository($builder);
71-
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) {
71+
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) {
7272
throw new Configurator\InvalidConfigurationException(message: $exception->getMessage(), previous: $exception);
7373
}
7474
}

src/Action/SFTP/Factory/Repository/Repository.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010

1111
final readonly class Repository implements Configurator\RepositoryInterface
1212
{
13-
public function __construct(private Builder\Action $builder) {}
13+
public function __construct(private Builder\Action $builder)
14+
{
15+
}
1416

15-
public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self
17+
public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self
1618
{
1719
return $this;
1820
}

src/Action/SFTP/Service.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function normalize(array $config): array
4545
{
4646
try {
4747
return $this->processor->processConfiguration($this->configuration, $config);
48-
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) {
48+
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) {
4949
throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception);
5050
}
5151
}
@@ -56,7 +56,7 @@ public function validate(array $config): bool
5656
$this->processor->processConfiguration($this->configuration, $config);
5757

5858
return true;
59-
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) {
59+
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) {
6060
return false;
6161
}
6262
}

src/Adapter/AdapterChoice.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
{
1111
public function __construct(
1212
private array $adapters,
13-
) {}
13+
) {
14+
}
1415

1516
public function __invoke(array $configuration): Configurator\SatelliteBuilderInterface
1617
{

src/Adapter/AdapterNotFoundException.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44

55
namespace Kiboko\Component\Satellite\Adapter;
66

7-
final class AdapterNotFoundException extends \RuntimeException {}
7+
final class AdapterNotFoundException extends \RuntimeException
8+
{
9+
}

src/Adapter/Docker/FileOrDirectoryNotFoundException.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44

55
namespace Kiboko\Component\Satellite\Adapter\Docker;
66

7-
class FileOrDirectoryNotFoundException extends \RuntimeException {}
7+
class FileOrDirectoryNotFoundException extends \RuntimeException
8+
{
9+
}

src/Adapter/Docker/NetworkInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44

55
namespace Kiboko\Component\Satellite\Adapter\Docker;
66

7-
interface NetworkInterface {}
7+
interface NetworkInterface
8+
{
9+
}

src/Adapter/Docker/Satellite.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ final class Satellite implements Configurator\SatelliteInterface
2222
public function __construct(
2323
private readonly Dockerfile\Dockerfile $dockerfile,
2424
private readonly string $workdir,
25-
Packaging\FileInterface|Packaging\DirectoryInterface ...$files
25+
Packaging\DirectoryInterface|Packaging\FileInterface ...$files
2626
) {
2727
$this->files = $files;
2828
}
@@ -34,7 +34,7 @@ public function addTags(string ...$imageTags): self
3434
return $this;
3535
}
3636

37-
public function withFile(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self
37+
public function withFile(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self
3838
{
3939
array_push($this->files, ...$files);
4040

src/Adapter/Docker/SatelliteBuilder.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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\FileInterface|PackagingContract\AssetInterface $composerJsonFile = null;
27-
private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null;
26+
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile = null;
27+
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null;
2828
/** @var iterable<array<string, string>> */
2929
private iterable $paths = [];
3030
/** @var \AppendIterator<string,PackagingContract\FileInterface, \Iterator<string,PackagingContract\FileInterface>> */
@@ -66,8 +66,8 @@ public function withComposerRequire(string ...$package): self
6666
}
6767

6868
public function withComposerFile(
69-
PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile,
70-
PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null
69+
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile,
70+
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null
7171
): self {
7272
$this->composerJsonFile = $composerJsonFile;
7373
$this->composerLockFile = $composerLockFile;
@@ -76,7 +76,7 @@ public function withComposerFile(
7676
}
7777

7878
public function withFile(
79-
PackagingContract\FileInterface|PackagingContract\AssetInterface $source,
79+
PackagingContract\AssetInterface|PackagingContract\FileInterface $source,
8080
string $destinationPath = null
8181
): self {
8282
if (!$source instanceof PackagingContract\FileInterface) {

src/Adapter/Filesystem/Satellite.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ final class Satellite implements Configurator\SatelliteInterface
1818
public function __construct(
1919
private readonly string $workdir,
2020
private readonly Composer $composer,
21-
Packaging\FileInterface|Packaging\DirectoryInterface ...$files
21+
Packaging\DirectoryInterface|Packaging\FileInterface ...$files
2222
) {
2323
$this->files = $files;
2424
}
2525

26-
public function withFile(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self
26+
public function withFile(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self
2727
{
2828
array_push($this->files, ...$files);
2929

src/Adapter/Filesystem/SatelliteBuilder.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ final class SatelliteBuilder implements Configurator\SatelliteBuilderInterface
2020
];
2121
private array $authenticationTokens = [];
2222
private array $repositories = [];
23-
private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile = null;
24-
private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null;
23+
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile = null;
24+
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null;
2525
/** @var iterable<array<string, string>> */
2626
private iterable $paths = [];
2727
/** @var \AppendIterator<string,PackagingContract\FileInterface, \Iterator<string,PackagingContract\FileInterface>> */
@@ -54,8 +54,8 @@ public function withComposerRequire(string ...$package): self
5454
}
5555

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

6666
public function withFile(
67-
PackagingContract\FileInterface|PackagingContract\AssetInterface $source,
67+
PackagingContract\AssetInterface|PackagingContract\FileInterface $source,
6868
string $destinationPath = null
6969
): self {
7070
if (!$source instanceof PackagingContract\FileInterface) {

src/Adapter/Tar/Satellite.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ final class Satellite implements Configurator\SatelliteInterface
1919

2020
public function __construct(
2121
private readonly string $outputPath,
22-
Packaging\FileInterface|Packaging\DirectoryInterface ...$files
22+
Packaging\DirectoryInterface|Packaging\FileInterface ...$files
2323
) {
2424
$this->files = $files;
2525
}
@@ -31,7 +31,7 @@ public function addTags(string ...$imageTags): self
3131
return $this;
3232
}
3333

34-
public function withFile(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self
34+
public function withFile(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self
3535
{
3636
array_push($this->files, ...$files);
3737

src/Adapter/Tar/SatelliteBuilder.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ final class SatelliteBuilder implements Configurator\SatelliteBuilderInterface
1313
{
1414
/** @var iterable<string> */
1515
private iterable $composerRequire = [];
16-
private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile = null;
17-
private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null;
16+
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile = null;
17+
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null;
1818
/** @var \AppendIterator<string,PackagingContract\FileInterface, \Iterator<string,PackagingContract\FileInterface>> */
1919
private readonly iterable $files;
2020
/** @var array<string, array<string, string>> */
@@ -47,8 +47,8 @@ public function withComposerRequire(string ...$package): self
4747
}
4848

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

5959
public function withFile(
60-
PackagingContract\FileInterface|PackagingContract\AssetInterface $source,
60+
PackagingContract\AssetInterface|PackagingContract\FileInterface $source,
6161
string $destinationPath = null
6262
): self {
6363
if (!$source instanceof PackagingContract\FileInterface) {

src/Builder/API/PipelineBuilder.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
final readonly class PipelineBuilder
1111
{
12-
public function __construct(private Builder $builder) {}
12+
public function __construct(private Builder $builder)
13+
{
14+
}
1315

1416
public function getNode(): Node\Expr
1517
{

src/Builder/Action.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ final class Action implements Builder
1313

1414
public function __construct(
1515
private readonly Node\Expr $runtime,
16-
) {}
16+
) {
17+
}
1718

1819
public function addAction(
19-
Node\Expr|Builder $loader,
20-
Node\Expr|Builder $state,
20+
Builder|Node\Expr $loader,
21+
Builder|Node\Expr $state,
2122
): self {
2223
$this->action = new Node\Expr\MethodCall(
2324
var: $this->runtime,

src/Builder/Hook/PipelineBuilder.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
final readonly class PipelineBuilder
1111
{
12-
public function __construct(private Builder $builder) {}
12+
public function __construct(private Builder $builder)
13+
{
14+
}
1315

1416
public function getNode(): Node\Expr
1517
{

0 commit comments

Comments
 (0)