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

@ -22,11 +22,11 @@ class JsonValidationExceptionTest extends TestCase
* @param string|null $message
* @param string[]|null $errors
*/
public function testGetErrors($message, $errors): void
public function testGetErrors($message, $errors, $expectedMessage, $expectedErrors): void
{
$object = new JsonValidationException($message, $errors);
$this->assertEquals($message, $object->getMessage());
$this->assertEquals($errors, $object->getErrors());
$this->assertSame($expectedMessage, $object->getMessage());
$this->assertSame($expectedErrors, $object->getErrors());
}
public function testGetErrorsWhenNoErrorsProvided(): void
@ -38,8 +38,8 @@ class JsonValidationExceptionTest extends TestCase
public function errorProvider()
{
return array(
array('test message', array()),
array(null, null),
array('test message', array(), 'test message', []),
array(null, ['foo'], '', ['foo']),
);
}
}