Skip to content

Commit 51eb10a

Browse files
committed
code format commit
1 parent 9679a27 commit 51eb10a

33 files changed

+110
-114
lines changed

src/Action/ConfigurationApplier.php

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

1111
final class ConfigurationApplier
1212
{
13-
private ?Satellite\Action\Action $action = null;
13+
private ?Action $action = null;
1414
private array $packages = [];
1515

1616
public function __construct(
@@ -22,7 +22,7 @@ public function __construct(
2222

2323
public function withAction(): self
2424
{
25-
$this->action = new Satellite\Action\Action($this->plugin, clone $this->interpreter);
25+
$this->action = new Action($this->plugin, clone $this->interpreter);
2626

2727
return $this;
2828
}

src/Action/Custom/Factory/Action.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function validate(array $config): bool
6363
/**
6464
* @throws Configurator\ConfigurationExceptionInterface
6565
*/
66-
public function compile(array $config): Custom\Factory\Repository\Action
66+
public function compile(array $config): Repository\Action
6767
{
6868
$containerName = sprintf('ProjectServiceContainer%s', ByteString::fromRandom(8)->toString());
6969

@@ -74,7 +74,7 @@ public function compile(array $config): Custom\Factory\Repository\Action
7474

7575
$container = (new SatelliteDependencyInjection(...$this->providers))($config);
7676

77-
$repository = new Custom\Factory\Repository\Action($builder);
77+
$repository = new Repository\Action($builder);
7878

7979
$dumper = new PhpDumper($container);
8080
$repository->addFiles(

src/Action/Custom/Service.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace Kiboko\Component\Satellite\Action\Custom;
66

7-
use Kiboko\Component\Satellite\Action\Custom;
87
use Kiboko\Component\Satellite\ExpressionLanguage as Satellite;
98
use Kiboko\Contract\Configurator;
109
use Symfony\Component\Config\Definition\Exception as Symfony;
@@ -26,7 +25,7 @@ public function __construct(
2625
private ExpressionLanguage $interpreter = new Satellite\ExpressionLanguage()
2726
) {
2827
$this->processor = new Processor();
29-
$this->configuration = new Custom\Configuration();
28+
$this->configuration = new Configuration();
3029
}
3130

3231
public function interpreter(): ExpressionLanguage
@@ -78,7 +77,7 @@ public function compile(array $config): Configurator\RepositoryInterface
7877
}
7978
}
8079

81-
$actionFactory = new Custom\Factory\Action($this->interpreter);
80+
$actionFactory = new Factory\Action($this->interpreter);
8281

8382
return $actionFactory->compile($config);
8483
}

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, \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: 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\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

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\AssetInterface|PackagingContract\FileInterface $composerJsonFile = null;
24-
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null;
23+
private PackagingContract\AssetInterface|PackagingContract\FileInterface|null $composerJsonFile = null;
24+
private PackagingContract\AssetInterface|PackagingContract\FileInterface|null $composerLockFile = null;
2525
/** @var iterable<array<string, string>> */
2626
private iterable $paths = [];
2727
/** @var \AppendIterator<string,PackagingContract\FileInterface, \Iterator<string,PackagingContract\FileInterface>> */
@@ -55,7 +55,7 @@ public function withComposerRequire(string ...$package): self
5555

5656
public function withComposerFile(
5757
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile,
58-
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null
58+
PackagingContract\AssetInterface|PackagingContract\FileInterface|null $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\AssetInterface|PackagingContract\FileInterface $source,
68-
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, 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

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\AssetInterface|PackagingContract\FileInterface $composerJsonFile = null;
17-
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null;
16+
private PackagingContract\AssetInterface|PackagingContract\FileInterface|null $composerJsonFile = null;
17+
private PackagingContract\AssetInterface|PackagingContract\FileInterface|null $composerLockFile = null;
1818
/** @var \AppendIterator<string,PackagingContract\FileInterface, \Iterator<string,PackagingContract\FileInterface>> */
1919
private readonly iterable $files;
2020
/** @var array<string, array<string, string>> */
@@ -48,7 +48,7 @@ public function withComposerRequire(string ...$package): self
4848

4949
public function withComposerFile(
5050
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile,
51-
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null
51+
PackagingContract\AssetInterface|PackagingContract\FileInterface|null $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\AssetInterface|PackagingContract\FileInterface $source,
61-
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, 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(string $pathName = null)
16+
public function __construct(?string $pathName = null)
1717
{
1818
if (null === $pathName) {
1919
$this->pathName = getenv('HOME').'/.gyroscops/';

src/Cloud/Normalizer/ExpressionNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010
class ExpressionNormalizer implements NormalizerInterface
1111
{
12-
public function normalize(mixed $object, string $format = null, array $context = []): string
12+
public function normalize(mixed $object, ?string $format = null, array $context = []): string
1313
{
1414
return (string) $object;
1515
}
1616

17-
public function supportsNormalization(mixed $data, string $format = null): bool
17+
public function supportsNormalization(mixed $data, ?string $format = null): bool
1818
{
1919
return $data instanceof Expression;
2020
}

src/ConfigLoader.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44

55
namespace Kiboko\Component\Satellite;
66

7-
use Kiboko\Component\Satellite;
87
use Kiboko\Contract\Configurator\InvalidConfigurationException;
98
use Symfony\Component\Config;
109

11-
class ConfigLoader implements Satellite\ConfigLoaderInterface
10+
class ConfigLoader implements ConfigLoaderInterface
1211
{
1312
public function __construct(private readonly string $basePath)
1413
{
@@ -120,8 +119,8 @@ public function loadFile(string $file): array
120119
$locator = new Config\FileLocator([$this->basePath]);
121120

122121
$loaderResolver = new Config\Loader\LoaderResolver([
123-
new Satellite\Console\Config\YamlFileLoader($locator),
124-
new Satellite\Console\Config\JsonFileLoader($locator),
122+
new Console\Config\YamlFileLoader($locator),
123+
new Console\Config\JsonFileLoader($locator),
125124
]);
126125

127126
$delegatingLoader = new Config\Loader\DelegatingLoader($loaderResolver);

0 commit comments

Comments
 (0)