do not stumble over missing descriptions (#12152)
parent
a67ce984e9
commit
787f503616
|
@ -2381,7 +2381,7 @@ parameters:
|
||||||
path: ../src/Composer/Repository/ComposerRepository.php
|
path: ../src/Composer/Repository/ComposerRepository.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Method Composer\\\\Repository\\\\ComposerRepository\\:\\:getProviders\\(\\) should return array\\<string, array\\{name\\: string, description\\: string, type\\: string\\}\\> but returns array\\<int\\|string, array\\{name\\: mixed, description\\: mixed, type\\: mixed\\}\\>\\.$#"
|
message: "#^Method Composer\\\\Repository\\\\ComposerRepository\\:\\:getProviders\\(\\) should return array\\<string, array\\{name\\: string, description\\: string|null, type\\: string\\}\\> but returns array\\<int\\|string, array\\{name\\: mixed, description\\: mixed, type\\: mixed\\}\\>\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
path: ../src/Composer/Repository/ComposerRepository.php
|
path: ../src/Composer/Repository/ComposerRepository.php
|
||||||
|
|
||||||
|
@ -2496,7 +2496,7 @@ parameters:
|
||||||
path: ../src/Composer/Repository/CompositeRepository.php
|
path: ../src/Composer/Repository/CompositeRepository.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Only booleans are allowed in a ternary operator condition, array\\<int, array\\<string, array\\<string, string\\>\\>\\> given\\.$#"
|
message: "#^Only booleans are allowed in a ternary operator condition, array\\<int, array\\<string, array\\<string, string|null\\>\\>\\> given\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
path: ../src/Composer/Repository/CompositeRepository.php
|
path: ../src/Composer/Repository/CompositeRepository.php
|
||||||
|
|
||||||
|
@ -2714,7 +2714,7 @@ parameters:
|
||||||
path: ../src/Composer/Repository/RepositorySet.php
|
path: ../src/Composer/Repository/RepositorySet.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Only booleans are allowed in an if condition, array\\<string, array\\<string, string\\>\\> given\\.$#"
|
message: "#^Only booleans are allowed in an if condition, array\\<string, array\\<string, string|null\\>\\> given\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
path: ../src/Composer/Repository/RepositorySet.php
|
path: ../src/Composer/Repository/RepositorySet.php
|
||||||
|
|
||||||
|
|
|
@ -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'] !== '' ? ' '.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));
|
||||||
|
|
|
@ -104,7 +104,7 @@ interface RepositoryInterface extends \Countable
|
||||||
* @param string $packageName package name which must be provided
|
* @param string $packageName package name which must be provided
|
||||||
*
|
*
|
||||||
* @return array[] an array with the provider name as key and value of array('name' => '...', 'description' => '...', 'type' => '...')
|
* @return array[] an array with the provider name as key and value of array('name' => '...', 'description' => '...', 'type' => '...')
|
||||||
* @phpstan-return array<string, array{name: string, description: string, type: string}>
|
* @phpstan-return array<string, array{name: string, description: string|null, type: string}>
|
||||||
*/
|
*/
|
||||||
public function getProviders(string $packageName);
|
public function getProviders(string $packageName);
|
||||||
|
|
||||||
|
|
|
@ -284,7 +284,7 @@ class RepositorySet
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array[] an array with the provider name as key and value of array('name' => '...', 'description' => '...', 'type' => '...')
|
* @return array[] an array with the provider name as key and value of array('name' => '...', 'description' => '...', 'type' => '...')
|
||||||
* @phpstan-return array<string, array{name: string, description: string, type: string}>
|
* @phpstan-return array<string, array{name: string, description: string|null, type: string}>
|
||||||
*/
|
*/
|
||||||
public function getProviders(string $packageName): array
|
public function getProviders(string $packageName): array
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue