1313 */
1414class Logger implements ILogger
1515{
16- /** @var string name of the directory where errors should be logged */
16+ /** @var string|null name of the directory where errors should be logged */
1717 public $ directory ;
1818
19- /** @var string|array email or emails to which send error notifications */
19+ /** @var string|array|null email or emails to which send error notifications */
2020 public $ email ;
2121
2222 /** @var string|null sender of email notifications */
@@ -32,6 +32,10 @@ class Logger implements ILogger
3232 private $ blueScreen ;
3333
3434
35+ /**
36+ * @param string|null $directory
37+ * @param string|array|null $email
38+ */
3539 public function __construct ($ directory , $ email = null , BlueScreen $ blueScreen = null )
3640 {
3741 $ this ->directory = $ directory ;
@@ -43,8 +47,8 @@ public function __construct($directory, $email = null, BlueScreen $blueScreen =
4347
4448 /**
4549 * Logs message or exception to file and sends email notification.
46- * @param string|\Exception|\Throwable $message
47- * @param int $priority one of constant ILogger::INFO, WARNING, ERROR (sends email), EXCEPTION (sends email), CRITICAL (sends email)
50+ * @param mixed $message
51+ * @param string $priority one of constant ILogger::INFO, WARNING, ERROR (sends email), EXCEPTION (sends email), CRITICAL (sends email)
4852 * @return string|null logged error filename
4953 */
5054 public function log ($ message , $ priority = self ::INFO )
@@ -102,7 +106,7 @@ public static function formatMessage($message)
102106
103107
104108 /**
105- * @param string|\Exception|\Throwable $message
109+ * @param mixed $message
106110 * @return string
107111 */
108112 public static function formatLogLine ($ message , $ exceptionFile = null )
@@ -155,7 +159,7 @@ protected function logException($exception, $file = null)
155159
156160
157161 /**
158- * @param string|\Exception|\Throwable $message
162+ * @param mixed $message
159163 * @return void
160164 */
161165 protected function sendEmail ($ message )
@@ -177,7 +181,7 @@ protected function sendEmail($message)
177181
178182 /**
179183 * Default mailer.
180- * @param string|\Exception|\Throwable $message
184+ * @param mixed $message
181185 * @param string $email
182186 * @return void
183187 * @internal
0 commit comments