mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-07 07:57:01 +00:00
Add return type on "__toString" methods
This commit is contained in:
+1
-1
@@ -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
@@ -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
@@ -32,7 +32,7 @@ final class TokenStream
|
||||
) {
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return implode("\n", $this->tokens);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user