Update Twig to v2.15.4

This commit is contained in:
slawkens
2023-02-02 10:37:45 +01:00
parent e552bcfe82
commit 130f7ba405
309 changed files with 3802 additions and 4005 deletions

View File

@@ -14,11 +14,9 @@ namespace Twig;
/**
* Holds information about a non-compiled Twig template.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Source
final class Source
{
private $code;
private $name;
@@ -29,14 +27,14 @@ class Source
* @param string $name The template logical name
* @param string $path The filesystem path of the template if any
*/
public function __construct($code, $name, $path = '')
public function __construct(string $code, string $name, string $path = '')
{
$this->code = $code;
$this->name = $name;
$this->path = $path;
}
public function getCode()
public function getCode(): string
{
return $this->code;
}
@@ -46,7 +44,7 @@ class Source
return $this->name;
}
public function getPath()
public function getPath(): string
{
return $this->path;
}