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:
parent
137ebddc25
commit
eda9014bef
121 changed files with 606 additions and 603 deletions
|
@ -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'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue