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
|
@ -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']),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue