1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Add return types to all code which is not being extended by open source packages

This commit is contained in:
Jordi Boggiano 2022-02-18 14:32:38 +01:00
parent 137ebddc25
commit eda9014bef
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
121 changed files with 606 additions and 603 deletions

View file

@ -55,11 +55,10 @@ class RepositoryFactoryTest extends TestCase
* @param int|string $index
* @param array<string, string> $config
* @param array<string, mixed> $existingRepos
* @param int|string $expected
*
* @phpstan-param array{url?: string} $config
*/
public function testGenerateRepositoryName($index, array $config, array $existingRepos, $expected): void
public function testGenerateRepositoryName($index, array $config, array $existingRepos, string $expected): void
{
$this->assertSame($expected, RepositoryFactory::generateRepositoryName($index, $config, $existingRepos));
}
@ -67,7 +66,7 @@ class RepositoryFactoryTest extends TestCase
public function generateRepositoryNameProvider()
{
return array(
array(0, array(), array(), 0),
array(0, array(), array(), '0'),
array(0, array(), array(array()), '02'),
array(0, array('url' => 'https://example.org'), array(), 'example.org'),
array(0, array('url' => 'https://example.org'), array('example.org' => array()), 'example.org2'),