Typehint the function, filter and test names as string

This commit is contained in:
Christophe Coevoet
2017-01-09 17:16:00 +01:00
parent 9a311813d1
commit 2b4642c3ec
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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
View File
@@ -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;