1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 17:12:51 +00:00

Add return types to closures (#9)

This commit is contained in:
Alexander Schranz 2022-02-21 13:37:49 +01:00 committed by GitHub
parent 7b1fc4b2c8
commit 1321bfca36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 171 additions and 150 deletions

View file

@ -281,7 +281,7 @@ abstract class Rule
return 'No package found to satisfy root composer.json require '.$packageName.($constraint ? ' '.$constraint->getPrettyString() : '');
}
$packagesNonAlias = array_values(array_filter($packages, function ($p) {
$packagesNonAlias = array_values(array_filter($packages, function ($p): bool {
return !($p instanceof AliasPackage);
}));
if (count($packagesNonAlias) === 1) {