Add missing param types, fixes #10638

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

@ -71,7 +71,7 @@ class LibraryInstaller implements InstallerInterface, BinaryPresenceInterface
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function supports($packageType) public function supports(string $packageType)
{ {
return $packageType === $this->type || null === $this->type; return $packageType === $this->type || null === $this->type;
} }

@ -37,7 +37,7 @@ class MetapackageInstaller implements InstallerInterface
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function supports($packageType) public function supports(string $packageType)
{ {
return $packageType === 'metapackage'; return $packageType === 'metapackage';
} }

@ -27,7 +27,7 @@ class NoopInstaller implements InstallerInterface
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function supports($packageType) public function supports(string $packageType)
{ {
return true; return true;
} }

@ -38,7 +38,7 @@ class PluginInstaller extends LibraryInstaller
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function supports($packageType) public function supports(string $packageType)
{ {
return $packageType === 'composer-plugin' || $packageType === 'composer-installer'; return $packageType === 'composer-plugin' || $packageType === 'composer-installer';
} }

@ -36,7 +36,7 @@ class PharArchiver implements ArchiverInterface
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function archive($sources, $target, $format, array $excludes = array(), $ignoreFilters = false): string public function archive(string $sources, string $target, string $format, array $excludes = array(), bool $ignoreFilters = false): string
{ {
$sources = realpath($sources); $sources = realpath($sources);
@ -97,7 +97,7 @@ class PharArchiver implements ArchiverInterface
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function supports($format, $sourceType): bool public function supports(string $format, string $sourceType): bool
{ {
return isset(static::$formats[$format]); return isset(static::$formats[$format]);
} }

@ -28,7 +28,7 @@ class ZipArchiver implements ArchiverInterface
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function archive($sources, $target, $format, array $excludes = array(), $ignoreFilters = false): string public function archive(string $sources, string $target, string $format, array $excludes = array(), bool $ignoreFilters = false): string
{ {
$fs = new Filesystem(); $fs = new Filesystem();
$sources = $fs->normalizePath($sources); $sources = $fs->normalizePath($sources);
@ -78,7 +78,7 @@ class ZipArchiver implements ArchiverInterface
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function supports($format, $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