mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Add parameter types to all the things
This commit is contained in:
parent
c9baeda95b
commit
6da38f83a0
279 changed files with 1377 additions and 1504 deletions
|
@ -29,7 +29,7 @@ class JsonConfigSourceTest extends TestCase
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function fixturePath($name): string
|
||||
protected function fixturePath(string $name): string
|
||||
{
|
||||
return __DIR__.'/Fixtures/'.$name;
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ class JsonConfigSourceTest extends TestCase
|
|||
*
|
||||
* @dataProvider provideAddLinkData
|
||||
*/
|
||||
public function testAddLink($sourceFile, $type, $name, $value, $compareAgainst): void
|
||||
public function testAddLink(string $sourceFile, string $type, string $name, string $value, string $compareAgainst): void
|
||||
{
|
||||
$composerJson = $this->workingDir.'/composer.json';
|
||||
copy($sourceFile, $composerJson);
|
||||
|
@ -138,7 +138,7 @@ class JsonConfigSourceTest extends TestCase
|
|||
*
|
||||
* @dataProvider provideRemoveLinkData
|
||||
*/
|
||||
public function testRemoveLink($sourceFile, $type, $name, $compareAgainst): void
|
||||
public function testRemoveLink(string $sourceFile, string $type, string $name, string $compareAgainst): void
|
||||
{
|
||||
$composerJson = $this->workingDir.'/composer.json';
|
||||
copy($sourceFile, $composerJson);
|
||||
|
@ -160,7 +160,7 @@ class JsonConfigSourceTest extends TestCase
|
|||
*
|
||||
* @phpstan-return array{string, string, string, string, string}
|
||||
*/
|
||||
protected function addLinkDataArguments($type, $name, $value, $fixtureBasename, $before): array
|
||||
protected function addLinkDataArguments(string $type, string $name, string $value, string $fixtureBasename, string $before): array
|
||||
{
|
||||
return array(
|
||||
$before,
|
||||
|
@ -217,7 +217,7 @@ class JsonConfigSourceTest extends TestCase
|
|||
*
|
||||
* @phpstan-return array{string, string, string, string}
|
||||
*/
|
||||
protected function removeLinkDataArguments($type, $name, $fixtureBasename, $after = null): array
|
||||
protected function removeLinkDataArguments(string $type, string $name, string $fixtureBasename, ?string $after = null): array
|
||||
{
|
||||
return array(
|
||||
$this->fixturePath('removeLink/'.$fixtureBasename.'.json'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue