summaryrefslogtreecommitdiffstats
path: root/lib/private/Console
diff options
context:
space:
mode:
authorFerdinand Thiessen <rpm@fthiessen.de>2023-02-08 17:47:49 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2023-04-17 18:35:10 +0200
commitdc9d8c42bbcd6e65e4d744c6ad0c3b6710bbf5df (patch)
tree8f79f8ef42895296b893d0303120b0427ca1e2e7 /lib/private/Console
parent698332e81db301cecb99441f6ff5505e15e32f5f (diff)
downloadnextcloud-server-dc9d8c42bbcd6e65e4d744c6ad0c3b6710bbf5df.tar.gz
nextcloud-server-dc9d8c42bbcd6e65e4d744c6ad0c3b6710bbf5df.zip
fix: Adjust console formatter code to match with Symfony type hints
Symfony has added type hints on the `OutputFormatterInterface`, so we must adjust our type hints to match with Symfony. Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
Diffstat (limited to 'lib/private/Console')
-rw-r--r--lib/private/Console/TimestampFormatter.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Console/TimestampFormatter.php b/lib/private/Console/TimestampFormatter.php
index c25ed578805..8d74c28e94f 100644
--- a/lib/private/Console/TimestampFormatter.php
+++ b/lib/private/Console/TimestampFormatter.php
@@ -94,11 +94,11 @@ class TimestampFormatter implements OutputFormatterInterface {
/**
* Formats a message according to the given styles.
*
- * @param string $message The message to style
- * @return string The styled message, prepended with a timestamp using the
+ * @param string|null $message The message to style
+ * @return string|null The styled message, prepended with a timestamp using the
* log timezone and dateformat, e.g. "2015-06-23T17:24:37+02:00"
*/
- public function format($message) {
+ public function format(?string $message): ?string {
if (!$this->formatter->isDecorated()) {
// Don't add anything to the output when we shouldn't
return $this->formatter->format($message);