mirror of
https://github.com/composer/composer
synced 2025-05-09 08:32:56 +00:00
Add return types to closures (#9)
This commit is contained in:
parent
7b1fc4b2c8
commit
1321bfca36
66 changed files with 171 additions and 150 deletions
|
@ -129,7 +129,7 @@ EOT
|
|||
|
||||
// extract --with shorthands from the allowlist
|
||||
if (count($packages) > 0) {
|
||||
$allowlistPackagesWithRequirements = array_filter($packages, function ($pkg) {
|
||||
$allowlistPackagesWithRequirements = array_filter($packages, function ($pkg): bool {
|
||||
return Preg::isMatch('{\S+[ =:]\S+}', $pkg);
|
||||
});
|
||||
foreach ($this->formatRequirements($allowlistPackagesWithRequirements) as $package => $constraint) {
|
||||
|
@ -180,7 +180,7 @@ EOT
|
|||
|
||||
// the arguments lock/nothing/mirrors are not package names but trigger a mirror update instead
|
||||
// they are further mutually exclusive with listing actual package names
|
||||
$filteredPackages = array_filter($packages, function ($package) {
|
||||
$filteredPackages = array_filter($packages, function ($package): bool {
|
||||
return !in_array($package, array('lock', 'nothing', 'mirrors'), true);
|
||||
});
|
||||
$updateMirrors = $input->getOption('lock') || count($filteredPackages) != count($packages);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue