Skip to content

Commit

Permalink
replace "?type" with "null|type" to pass new cs-fixer rule
Browse files Browse the repository at this point in the history
  • Loading branch information
clemzarch committed Jun 1, 2023
1 parent fdfd549 commit d693a8b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/Adapter/Docker/SatelliteBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function withComposerFile(

public function withFile(
PackagingContract\FileInterface|PackagingContract\AssetInterface $source,
?string $destinationPath = null
null|string $destinationPath = null
): self {
if (!$source instanceof PackagingContract\FileInterface) {
$source = new Packaging\VirtualFile($source);
Expand All @@ -92,7 +92,7 @@ public function withFile(
return $this;
}

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

Expand Down
4 changes: 2 additions & 2 deletions src/Adapter/Filesystem/SatelliteBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function withComposerFile(

public function withFile(
PackagingContract\FileInterface|PackagingContract\AssetInterface $source,
?string $destinationPath = null
null|string $destinationPath = null
): self {
if (!$source instanceof PackagingContract\FileInterface) {
$source = new Packaging\VirtualFile($source);
Expand All @@ -80,7 +80,7 @@ public function withFile(
return $this;
}

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

Expand Down
4 changes: 2 additions & 2 deletions src/Adapter/Tar/SatelliteBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function withComposerFile(

public function withFile(
PackagingContract\FileInterface|PackagingContract\AssetInterface $source,
?string $destinationPath = null
null|string $destinationPath = null
): self {
if (!$source instanceof PackagingContract\FileInterface) {
$source = new Packaging\VirtualFile($source);
Expand All @@ -71,7 +71,7 @@ public function withFile(
return $this;
}

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

Expand Down
2 changes: 1 addition & 1 deletion src/Cloud/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class Auth
private string $pathName;
private array $configuration;

public function __construct(?string $pathName = null)
public function __construct(null|string $pathName = null)
{
if (null === $pathName) {
$this->pathName = getenv('HOME').'/.gyroscops/';
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/SFTP/Builder/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function withPasswordAuthentication(Node\Expr $username, Node\Expr $passw
return $this;
}

public function withPrivateKeyAuthentication(Node\Expr $username, Node\Expr $publicKey, Node\Expr $privateKey, ?Node\Expr $privateKeyPassphrase = null): self
public function withPrivateKeyAuthentication(Node\Expr $username, Node\Expr $publicKey, Node\Expr $privateKey, null|Node\Expr $privateKeyPassphrase = null): self
{
$this->username = $username;
$this->publicKey = $publicKey;
Expand Down
2 changes: 1 addition & 1 deletion src/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final class Service implements Configurator\FactoryInterface
/** @var array<string, Satellite\Action\ConfigurationApplier> */
private array $actionPlugins = [];

public function __construct(?ExpressionLanguage $expressionLanguage = null)
public function __construct(null|ExpressionLanguage $expressionLanguage = null)
{
$this->processor = new Processor();
$this->configuration = new Satellite\Configuration();
Expand Down

0 comments on commit d693a8b

Please sign in to comment.