mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-12 02:16:41 +00:00
Typehint the function, filter and test names as string
This commit is contained in:
+1
-1
@@ -32,7 +32,7 @@ class Twig_Filter
|
||||
* @param callable|null $callable A callable implementing the filter. If null, you need to overwrite the "node_class" option to customize compilation.
|
||||
* @param array $options Options array
|
||||
*/
|
||||
public function __construct($name, $callable = null, array $options = array())
|
||||
public function __construct(string $name, $callable = null, array $options = array())
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->callable = $callable;
|
||||
|
||||
@@ -32,7 +32,7 @@ class Twig_Function
|
||||
* @param callable|null $callable A callable implementing the function. If null, you need to overwrite the "node_class" option to customize compilation.
|
||||
* @param array $options Options array
|
||||
*/
|
||||
public function __construct($name, $callable = null, array $options = array())
|
||||
public function __construct(string $name, $callable = null, array $options = array())
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->callable = $callable;
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ class Twig_Test
|
||||
* @param callable|null $callable A callable implementing the test. If null, you need to overwrite the "node_class" option to customize compilation.
|
||||
* @param array $options Options array
|
||||
*/
|
||||
public function __construct($name, $callable = null, array $options = array())
|
||||
public function __construct(string $name, $callable = null, array $options = array())
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->callable = $callable;
|
||||
|
||||
Reference in New Issue
Block a user