Fix type error in ArchiverInterface::supports(), fixes #10702
parent
e0cce2bfb0
commit
eb36025d37
|
@ -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…
Reference in New Issue