Add return type on "__toString" methods

This commit is contained in:
Simon André
2025-01-02 07:07:17 +01:00
parent 63b86e3057
commit 7eae42183a
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ class Markup implements \Countable, \JsonSerializable, \Stringable
$this->charset = $charset;
}
public function __toString()
public function __toString(): string
{
return $this->content;
}
+1 -1
View File
@@ -40,7 +40,7 @@ final class Token
) {
}
public function __toString()
public function __toString(): string
{
return \sprintf('%s(%s)', self::typeToString($this->type, true), $this->value);
}
+1 -1
View File
@@ -32,7 +32,7 @@ final class TokenStream
) {
}
public function __toString()
public function __toString(): string
{
return implode("\n", $this->tokens);
}