mirror of
https://github.com/smarty-php/smarty.git
synced 2025-10-10 19:15:21 +02:00
Internal compiler classes always return a string (#918)
* Internal compiler classes always return a string (the internal has_code flag has been removed for simplicity) * Add :string method signature to compile method everywhere.
This commit is contained in:
@@ -41,8 +41,8 @@ class smarty_compiler_getparamsshort extends Base
|
||||
*/
|
||||
public $shorttag_order = array('s1', 's2', 's3');
|
||||
|
||||
public function compile($args, \Smarty\Compiler\Template $compiler, $parameter = [], $tag = null, $function = null)
|
||||
{
|
||||
public function compile($args, \Smarty\Compiler\Template $compiler, $parameter = [], $tag = null, $function = null): string
|
||||
{
|
||||
$_attr = $this->getAttributes($compiler, $args);
|
||||
$output = '<?php echo "array(';
|
||||
foreach ($_attr as $key => $value) {
|
||||
|
Reference in New Issue
Block a user