Skip to content

Commit

Permalink
Fix type error in ArchiverInterface::supports(), fixes composer#10702
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek authored and emahorvat52 committed Jan 18, 2023
1 parent 296d7b4 commit 706d48a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Composer/Package/Archiver/ArchiverInterface.php
Expand Up @@ -36,9 +36,9 @@ public function archive(string $sources, string $target, string $format, array $
* Format supported by the archiver.
*
* @param string $format The archive format
* @param string $sourceType The source type (git, svn, hg, etc.)
* @param ?string $sourceType The source type (git, svn, hg, etc.)
*
* @return bool true if the format is supported by the archiver
*/
public function supports(string $format, string $sourceType): bool;
public function supports(string $format, ?string $sourceType): bool;
}
2 changes: 1 addition & 1 deletion src/Composer/Package/Archiver/PharArchiver.php
Expand Up @@ -97,7 +97,7 @@ public function archive(string $sources, string $target, string $format, array $
/**
* @inheritDoc
*/
public function supports(string $format, string $sourceType): bool
public function supports(string $format, ?string $sourceType): bool
{
return isset(static::$formats[$format]);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Composer/Package/Archiver/ZipArchiver.php
Expand Up @@ -78,7 +78,7 @@ public function archive(string $sources, string $target, string $format, array $
/**
* @inheritDoc
*/
public function supports(string $format, string $sourceType): bool
public function supports(string $format, ?string $sourceType): bool
{
return isset(static::$formats[$format]) && $this->compressionAvailable();
}
Expand Down

0 comments on commit 706d48a

Please sign in to comment.