Fix type error in ArchiverInterface::supports(), fixes #10702

main
Jordi Boggiano 2 years ago
parent e0cce2bfb0
commit eb36025d37
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -36,9 +36,9 @@ interface ArchiverInterface
* Format supported by the archiver. * Format supported by the archiver.
* *
* @param string $format The archive format * @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 * @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;
} }

@ -97,7 +97,7 @@ class PharArchiver implements ArchiverInterface
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function supports(string $format, string $sourceType): bool public function supports(string $format, ?string $sourceType): bool
{ {
return isset(static::$formats[$format]); return isset(static::$formats[$format]);
} }

@ -78,7 +78,7 @@ class ZipArchiver implements ArchiverInterface
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function supports(string $format, string $sourceType): bool public function supports(string $format, ?string $sourceType): bool
{ {
return isset(static::$formats[$format]) && $this->compressionAvailable(); return isset(static::$formats[$format]) && $this->compressionAvailable();
} }

Loading…
Cancel
Save