don't return a single space for packages without descriptions (#12162)
parent
787f503616
commit
0191d0c7c5
|
@ -649,7 +649,7 @@ class Problem
|
||||||
$providers = $repositorySet->getProviders($packageName);
|
$providers = $repositorySet->getProviders($packageName);
|
||||||
if (\count($providers) > 0) {
|
if (\count($providers) > 0) {
|
||||||
$providersStr = implode(array_map(static function ($p): string {
|
$providersStr = implode(array_map(static function ($p): string {
|
||||||
$description = $p['description'] !== '' ? ' '.substr($p['description'] ?? '', 0, 100) : '';
|
$description = $p['description'] !== '' && $p['description'] !== null ? ' '.substr($p['description'], 0, 100) : '';
|
||||||
|
|
||||||
return ' - '.$p['name'].$description."\n";
|
return ' - '.$p['name'].$description."\n";
|
||||||
}, count($providers) > $maxProviders + 1 ? array_slice($providers, 0, $maxProviders) : $providers));
|
}, count($providers) > $maxProviders + 1 ? array_slice($providers, 0, $maxProviders) : $providers));
|
||||||
|
|
Loading…
Reference in New Issue