mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 00:56:08 +02:00
Add scalar types to processor/formatters and top level classes
This commit is contained in:
@@ -65,11 +65,7 @@ class WebProcessor
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $record
|
||||
* @return array
|
||||
*/
|
||||
public function __invoke(array $record)
|
||||
public function __invoke(array $record): array
|
||||
{
|
||||
// skip processing if for some reason request data
|
||||
// is not present (CLI or wonky SAPIs)
|
||||
@@ -82,23 +78,14 @@ class WebProcessor
|
||||
return $record;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $extraName
|
||||
* @param string $serverName
|
||||
* @return $this
|
||||
*/
|
||||
public function addExtraField($extraName, $serverName)
|
||||
public function addExtraField(string $extraName, string $serverName): self
|
||||
{
|
||||
$this->extraFields[$extraName] = $serverName;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $extra
|
||||
* @return array
|
||||
*/
|
||||
private function appendExtraFields(array $extra)
|
||||
private function appendExtraFields(array $extra): array
|
||||
{
|
||||
foreach ($this->extraFields as $extraName => $serverName) {
|
||||
$extra[$extraName] = isset($this->serverData[$serverName]) ? $this->serverData[$serverName] : null;
|
||||
|
Reference in New Issue
Block a user