mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-17 11:13:27 +02:00
Update Twig to v2.15.4
This commit is contained in:
@@ -16,10 +16,10 @@ namespace Twig;
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class Markup implements \Countable
|
||||
class Markup implements \Countable, \JsonSerializable
|
||||
{
|
||||
protected $content;
|
||||
protected $charset;
|
||||
private $content;
|
||||
private $charset;
|
||||
|
||||
public function __construct($content, $charset)
|
||||
{
|
||||
@@ -32,9 +32,22 @@ class Markup implements \Countable
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function count()
|
||||
{
|
||||
return \function_exists('mb_get_info') ? mb_strlen($this->content, $this->charset) : \strlen($this->content);
|
||||
return mb_strlen($this->content, $this->charset);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return $this->content;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user