George Mponos 7 лет назад
Родитель
Сommit
790ff7fd1d

+ 2 - 1
src/Monolog/Formatter/HtmlFormatter.php

@@ -37,7 +37,7 @@ class HtmlFormatter extends NormalizerFormatter
     ];
 
     /**
-     * @param ?string $dateFormat The format of the timestamp: one supported by DateTime::format
+     * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format
      */
     public function __construct(?string $dateFormat = null)
     {
@@ -50,6 +50,7 @@ class HtmlFormatter extends NormalizerFormatter
      * @param string $th       Row header content
      * @param string $td       Row standard cell content
      * @param bool   $escapeTd false if td content must not be html escaped
+     * @return string
      */
     protected function addRow(string $th, string $td = ' ', bool $escapeTd = true): string
     {

+ 4 - 4
src/Monolog/Formatter/LineFormatter.php

@@ -31,10 +31,10 @@ class LineFormatter extends NormalizerFormatter
     protected $includeStacktraces;
 
     /**
-     * @param ?string $format                     The format of the message
-     * @param ?string $dateFormat                 The format of the timestamp: one supported by DateTime::format
-     * @param bool    $allowInlineLineBreaks      Whether to allow inline line breaks in log entries
-     * @param bool    $ignoreEmptyContextAndExtra
+     * @param string|null $format                     The format of the message
+     * @param string|null $dateFormat                 The format of the timestamp: one supported by DateTime::format
+     * @param bool        $allowInlineLineBreaks      Whether to allow inline line breaks in log entries
+     * @param bool        $ignoreEmptyContextAndExtra
      */
     public function __construct(?string $format = null, ?string $dateFormat = null, bool $allowInlineLineBreaks = false, bool $ignoreEmptyContextAndExtra = false)
     {

+ 4 - 4
src/Monolog/Formatter/LogstashFormatter.php

@@ -42,10 +42,10 @@ class LogstashFormatter extends NormalizerFormatter
     protected $contextKey;
 
     /**
-     * @param string  $applicationName the application that sends the data, used as the "type" field of logstash
-     * @param ?string $systemName      the system/machine name, used as the "source" field of logstash, defaults to the hostname of the machine
-     * @param string  $extraKey        the key for extra keys inside logstash "fields", defaults to extra
-     * @param string  $contextKey      the key for context keys inside logstash "fields", defaults to context
+     * @param string      $applicationName The application that sends the data, used as the "type" field of logstash
+     * @param string|null $systemName      The system/machine name, used as the "source" field of logstash, defaults to the hostname of the machine
+     * @param string      $extraKey        The key for extra keys inside logstash "fields", defaults to extra
+     * @param string      $contextKey      The key for context keys inside logstash "fields", defaults to context
      */
     public function __construct(string $applicationName, ?string $systemName = null, string $extraKey = 'extra', string $contextKey = 'context')
     {

+ 1 - 1
src/Monolog/Formatter/NormalizerFormatter.php

@@ -31,7 +31,7 @@ class NormalizerFormatter implements FormatterInterface
     private $jsonEncodeOptions = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION;
 
     /**
-     * @param ?string $dateFormat The format of the timestamp: one supported by DateTime::format
+     * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format
      */
     public function __construct(?string $dateFormat = null)
     {

+ 2 - 2
src/Monolog/Handler/Slack/SlackRecord.php

@@ -35,13 +35,13 @@ class SlackRecord
 
     /**
      * Slack channel (encoded ID or name)
-     * @var ?string
+     * @var string|null
      */
     private $channel;
 
     /**
      * Name of a bot
-     * @var ?string
+     * @var string|null
      */
     private $username;
 

+ 3 - 3
src/Monolog/Processor/PsrLogMessageProcessor.php

@@ -24,15 +24,15 @@ class PsrLogMessageProcessor implements ProcessorInterface
 {
     public const SIMPLE_DATE = "Y-m-d\TH:i:s.uP";
 
-    /** @var ?string */
+    /** @var string|null */
     private $dateFormat;
 
     /** @var bool */
     private $removeUsedContextFields;
 
     /**
-     * @param ?string $dateFormat              The format of the timestamp: one supported by DateTime::format
-     * @param bool    $removeUsedContextFields If set to true the fields interpolated into message gets unset
+     * @param string|null $dateFormat              The format of the timestamp: one supported by DateTime::format
+     * @param bool        $removeUsedContextFields If set to true the fields interpolated into message gets unset
      */
     public function __construct(?string $dateFormat = null, bool $removeUsedContextFields = false)
     {