mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 09:06:10 +02:00
Move phpdoc to native types
This commit is contained in:
@@ -40,7 +40,7 @@ class GitProcessor implements ProcessorInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function __invoke(LogRecord $record): LogRecord
|
||||
{
|
||||
|
@@ -18,8 +18,7 @@ use Monolog\LogRecord;
|
||||
*/
|
||||
class HostnameProcessor implements ProcessorInterface
|
||||
{
|
||||
/** @var string */
|
||||
private static $host;
|
||||
private static string $host;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -27,7 +26,7 @@ class HostnameProcessor implements ProcessorInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function __invoke(LogRecord $record): LogRecord
|
||||
{
|
||||
|
@@ -56,7 +56,7 @@ class IntrospectionProcessor implements ProcessorInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function __invoke(LogRecord $record): LogRecord
|
||||
{
|
||||
|
@@ -22,7 +22,7 @@ use Monolog\LogRecord;
|
||||
class MemoryPeakUsageProcessor extends MemoryProcessor
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function __invoke(LogRecord $record): LogRecord
|
||||
{
|
||||
|
@@ -21,12 +21,12 @@ abstract class MemoryProcessor implements ProcessorInterface
|
||||
/**
|
||||
* @var bool If true, get the real size of memory allocated from system. Else, only the memory used by emalloc() is reported.
|
||||
*/
|
||||
protected $realUsage;
|
||||
protected bool $realUsage;
|
||||
|
||||
/**
|
||||
* @var bool If true, then format memory size to human readable string (MB, KB, B depending on size)
|
||||
*/
|
||||
protected $useFormatting;
|
||||
protected bool $useFormatting;
|
||||
|
||||
/**
|
||||
* @param bool $realUsage Set this to true to get the real size of memory allocated from system.
|
||||
|
@@ -22,7 +22,7 @@ use Monolog\LogRecord;
|
||||
class MemoryUsageProcessor extends MemoryProcessor
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function __invoke(LogRecord $record): LogRecord
|
||||
{
|
||||
|
@@ -39,7 +39,7 @@ class MercurialProcessor implements ProcessorInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function __invoke(LogRecord $record): LogRecord
|
||||
{
|
||||
|
@@ -21,7 +21,7 @@ use Monolog\LogRecord;
|
||||
class ProcessIdProcessor implements ProcessorInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function __invoke(LogRecord $record): LogRecord
|
||||
{
|
||||
|
@@ -23,5 +23,5 @@ interface ProcessorInterface
|
||||
/**
|
||||
* @return LogRecord The processed record
|
||||
*/
|
||||
public function __invoke(LogRecord $record);
|
||||
public function __invoke(LogRecord $record): LogRecord;
|
||||
}
|
||||
|
@@ -25,11 +25,9 @@ class PsrLogMessageProcessor implements ProcessorInterface
|
||||
{
|
||||
public const SIMPLE_DATE = "Y-m-d\TH:i:s.uP";
|
||||
|
||||
/** @var string|null */
|
||||
private $dateFormat;
|
||||
private ?string $dateFormat;
|
||||
|
||||
/** @var bool */
|
||||
private $removeUsedContextFields;
|
||||
private bool $removeUsedContextFields;
|
||||
|
||||
/**
|
||||
* @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format
|
||||
@@ -42,7 +40,7 @@ class PsrLogMessageProcessor implements ProcessorInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function __invoke(LogRecord $record): LogRecord
|
||||
{
|
||||
|
@@ -21,7 +21,7 @@ use Monolog\LogRecord;
|
||||
class TagProcessor implements ProcessorInterface
|
||||
{
|
||||
/** @var string[] */
|
||||
private $tags;
|
||||
private array $tags;
|
||||
|
||||
/**
|
||||
* @param string[] $tags
|
||||
@@ -52,7 +52,7 @@ class TagProcessor implements ProcessorInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function __invoke(LogRecord $record): LogRecord
|
||||
{
|
||||
|
@@ -37,7 +37,7 @@ class UidProcessor implements ProcessorInterface, ResettableInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function __invoke(LogRecord $record): LogRecord
|
||||
{
|
||||
@@ -51,7 +51,7 @@ class UidProcessor implements ProcessorInterface, ResettableInterface
|
||||
return $this->uid;
|
||||
}
|
||||
|
||||
public function reset()
|
||||
public function reset(): void
|
||||
{
|
||||
$this->uid = $this->generateUid(strlen($this->uid));
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ class WebProcessor implements ProcessorInterface
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $extraFields = [
|
||||
protected array $extraFields = [
|
||||
'url' => 'REQUEST_URI',
|
||||
'ip' => 'REMOTE_ADDR',
|
||||
'http_method' => 'REQUEST_METHOD',
|
||||
@@ -76,7 +76,7 @@ class WebProcessor implements ProcessorInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function __invoke(LogRecord $record): LogRecord
|
||||
{
|
||||
|
Reference in New Issue
Block a user