1
0
Fork 0

Add types to `Package/Dumper` (#10198)

pull/10206/head
Martin Herndl 2021-10-20 22:19:53 +02:00 committed by GitHub
parent dbd0ccaad8
commit db9e9a544e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -23,6 +23,9 @@ use Composer\Package\RootPackageInterface;
*/ */
class ArrayDumper class ArrayDumper
{ {
/**
* @return array<string, mixed>
*/
public function dump(PackageInterface $package) public function dump(PackageInterface $package)
{ {
$keys = array( $keys = array(
@ -139,6 +142,12 @@ class ArrayDumper
return $data; return $data;
} }
/**
* @param array<int|string, string> $keys
* @param array<string, mixed> $data
*
* @return array<string, mixed>
*/
private function dumpValues(PackageInterface $package, array $keys, array $data) private function dumpValues(PackageInterface $package, array $keys, array $data)
{ {
foreach ($keys as $method => $key) { foreach ($keys as $method => $key) {