1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-23 09:36:11 +02:00

Add a bunch of return types and fix type inconsistencies reports from phan

This commit is contained in:
Jordi Boggiano
2018-07-04 14:10:04 +02:00
parent e5900c3814
commit 06143b03e5
73 changed files with 227 additions and 280 deletions

View File

@@ -25,10 +25,10 @@ class TestCase extends \PHPUnit\Framework\TestCase
/**
* @return array Record
*/
protected function getRecord($level = Logger::WARNING, $message = 'test', $context = [])
protected function getRecord($level = Logger::WARNING, $message = 'test', array $context = []): array
{
return [
'message' => $message,
'message' => (string) $message,
'context' => $context,
'level' => $level,
'level_name' => Logger::getLevelName($level),
@@ -38,10 +38,7 @@ class TestCase extends \PHPUnit\Framework\TestCase
];
}
/**
* @return array
*/
protected function getMultipleRecords()
protected function getMultipleRecords(): array
{
return [
$this->getRecord(Logger::DEBUG, 'debug message 1'),
@@ -52,6 +49,9 @@ class TestCase extends \PHPUnit\Framework\TestCase
];
}
/**
* @suppress PhanTypeMismatchReturn
*/
protected function getIdentityFormatter(): FormatterInterface
{
$formatter = $this->createMock(FormatterInterface::class);