1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-24 10:06:08 +02:00

Add more type hints

This commit is contained in:
Avtandil Kikabidze
2018-09-12 18:20:33 +04:00
parent 8656fb1352
commit be5c439167
4 changed files with 10 additions and 8 deletions

View File

@@ -34,7 +34,7 @@ class ElasticsearchFormatter extends NormalizerFormatter
* @param string $index Elasticsearch index name
* @param string $type Elasticsearch record type
*/
public function __construct($index, $type)
public function __construct(string $index, string $type)
{
// Elasticsearch requires an ISO 8601 format date with optional millisecond precision.
parent::__construct(DateTime::ISO8601);
@@ -79,7 +79,7 @@ class ElasticsearchFormatter extends NormalizerFormatter
* @param array $record Log message
* @return array
*/
protected function getDocument($record): array
protected function getDocument(array $record): array
{
$record['_index'] = $this->index;
$record['_type'] = $this->type;