summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--change_log.txt2
-rw-r--r--libs/Smarty.class.php33
-rw-r--r--libs/SmartyBC.class.php23
-rw-r--r--libs/plugins/function.html_checkboxes.php16
-rw-r--r--libs/plugins/function.html_options.php22
-rw-r--r--libs/plugins/function.html_radios.php16
-rw-r--r--libs/plugins/function.html_table.php8
-rw-r--r--libs/plugins/modifier.capitalize.php23
-rw-r--r--libs/plugins/modifier.escape.php1
-rw-r--r--libs/plugins/modifiercompiler.wordwrap.php6
-rw-r--r--libs/plugins/shared.mb_str_replace.php14
-rw-r--r--libs/sysplugins/smarty_cacheresource_custom.php3
-rw-r--r--libs/sysplugins/smarty_cacheresource_keyvaluestore.php3
-rw-r--r--libs/sysplugins/smarty_internal_cacheresource_file.php3
-rw-r--r--libs/sysplugins/smarty_internal_compile_append.php1
-rw-r--r--libs/sysplugins/smarty_internal_compile_block.php15
-rw-r--r--libs/sysplugins/smarty_internal_compile_break.php8
-rw-r--r--libs/sysplugins/smarty_internal_compile_continue.php9
-rw-r--r--libs/sysplugins/smarty_internal_compile_extends.php6
-rw-r--r--libs/sysplugins/smarty_internal_compile_foreach.php25
-rw-r--r--libs/sysplugins/smarty_internal_compile_function.php14
-rw-r--r--libs/sysplugins/smarty_internal_compile_if.php16
-rw-r--r--libs/sysplugins/smarty_internal_compile_include.php15
-rw-r--r--libs/sysplugins/smarty_internal_compile_insert.php1
-rw-r--r--libs/sysplugins/smarty_internal_compile_make_nocache.php10
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_block_plugin.php2
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_foreachsection.php4
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_function_plugin.php2
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_modifier.php2
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_object_function.php2
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_php.php6
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_print_expression.php1
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_registered_function.php2
-rw-r--r--libs/sysplugins/smarty_internal_compile_section.php1
-rw-r--r--libs/sysplugins/smarty_internal_config_file_compiler.php1
-rw-r--r--libs/sysplugins/smarty_internal_configfilelexer.php62
-rw-r--r--libs/sysplugins/smarty_internal_configfileparser.php91
-rw-r--r--libs/sysplugins/smarty_internal_data.php3
-rw-r--r--libs/sysplugins/smarty_internal_debug.php3
-rw-r--r--libs/sysplugins/smarty_internal_errorhandler.php2
-rw-r--r--libs/sysplugins/smarty_internal_method_addautoloadfilters.php2
-rw-r--r--libs/sysplugins/smarty_internal_method_clearallcache.php3
-rw-r--r--libs/sysplugins/smarty_internal_method_clearcache.php3
-rw-r--r--libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php3
-rw-r--r--libs/sysplugins/smarty_internal_method_configload.php5
-rw-r--r--libs/sysplugins/smarty_internal_method_getautoloadfilters.php4
-rw-r--r--libs/sysplugins/smarty_internal_method_getglobal.php4
-rw-r--r--libs/sysplugins/smarty_internal_method_gettags.php1
-rw-r--r--libs/sysplugins/smarty_internal_method_literals.php2
-rw-r--r--libs/sysplugins/smarty_internal_method_setautoloadfilters.php1
-rw-r--r--libs/sysplugins/smarty_internal_method_unloadfilter.php3
-rw-r--r--libs/sysplugins/smarty_internal_method_unregisterfilter.php1
-rw-r--r--libs/sysplugins/smarty_internal_parsetree.php4
-rw-r--r--libs/sysplugins/smarty_internal_resource_extends.php3
-rw-r--r--libs/sysplugins/smarty_internal_resource_file.php2
-rw-r--r--libs/sysplugins/smarty_internal_resource_stream.php1
-rw-r--r--libs/sysplugins/smarty_internal_resource_string.php3
-rw-r--r--libs/sysplugins/smarty_internal_runtime_cachemodify.php3
-rw-r--r--libs/sysplugins/smarty_internal_runtime_codeframe.php2
-rw-r--r--libs/sysplugins/smarty_internal_runtime_getincludepath.php2
-rw-r--r--libs/sysplugins/smarty_internal_runtime_inheritance.php8
-rw-r--r--libs/sysplugins/smarty_internal_template.php10
-rw-r--r--libs/sysplugins/smarty_internal_templatebase.php7
-rw-r--r--libs/sysplugins/smarty_internal_templatecompilerbase.php11
-rw-r--r--libs/sysplugins/smarty_internal_templatelexer.php45
-rw-r--r--libs/sysplugins/smarty_internal_templateparser.php91
-rw-r--r--libs/sysplugins/smarty_resource.php7
-rw-r--r--libs/sysplugins/smarty_resource_recompiled.php3
-rw-r--r--libs/sysplugins/smarty_security.php4
-rw-r--r--libs/sysplugins/smarty_template_cached.php2
-rw-r--r--libs/sysplugins/smarty_template_compiled.php3
-rw-r--r--libs/sysplugins/smarty_template_resource_base.php6
-rw-r--r--libs/sysplugins/smarty_template_source.php12
-rw-r--r--libs/sysplugins/smarty_undefined_variable.php10
-rw-r--r--libs/sysplugins/smartycompilerexception.php3
-rw-r--r--libs/sysplugins/smartyexception.php3
76 files changed, 613 insertions, 141 deletions
diff --git a/change_log.txt b/change_log.txt
index 812953e8..22d62960 100644
--- a/change_log.txt
+++ b/change_log.txt
@@ -6,6 +6,8 @@
as Smarty does no longer use error suppression like @filemtime().
for backward compatibility code is moved from Smarty class to an external class and still can be
called.
+ - correction of PHPDoc blocks
+ - minor code cleanup
21.10.2017
- bugfix custom delimiters could fail since modification of version 3.1.32-dev-23
diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php
index bb7879a5..a0ad2d18 100644
--- a/libs/Smarty.class.php
+++ b/libs/Smarty.class.php
@@ -34,6 +34,9 @@
* Sets SMARTY_DIR only if user application has not already defined it.
*/
if (!defined('SMARTY_DIR')) {
+ /**
+ *
+ */
define('SMARTY_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR);
}
/**
@@ -41,12 +44,21 @@ if (!defined('SMARTY_DIR')) {
* Sets SMARTY_SYSPLUGINS_DIR only if user application has not already defined it.
*/
if (!defined('SMARTY_SYSPLUGINS_DIR')) {
+ /**
+ *
+ */
define('SMARTY_SYSPLUGINS_DIR', SMARTY_DIR . 'sysplugins' . DIRECTORY_SEPARATOR);
}
if (!defined('SMARTY_PLUGINS_DIR')) {
+ /**
+ *
+ */
define('SMARTY_PLUGINS_DIR', SMARTY_DIR . 'plugins' . DIRECTORY_SEPARATOR);
}
if (!defined('SMARTY_MBSTRING')) {
+ /**
+ *
+ */
define('SMARTY_MBSTRING', function_exists('mb_get_info'));
}
if (!defined('SMARTY_RESOURCE_CHAR_SET')) {
@@ -100,7 +112,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/**
* smarty version
*/
- const SMARTY_VERSION = '3.1.32-dev-30';
+ const SMARTY_VERSION = '3.1.32-dev-31';
/**
* define variable scopes
*/
@@ -620,7 +632,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/**
* Enable error handler to mute expected messages
*
- * @return void
+ * @return boolean
* @deprecated
*/
public static function muteExpectedErrors()
@@ -643,7 +655,8 @@ class Smarty extends Smarty_Internal_TemplateBase
*
* @param string $resource_name template name
*
- * @return boolean status
+ * @return bool status
+ * @throws \SmartyException
*/
public function templateExists($resource_name)
{
@@ -922,7 +935,8 @@ class Smarty extends Smarty_Internal_TemplateBase
* @param object $parent next higher level of Smarty variables
* @param boolean $do_clone flag is Smarty object shall be cloned
*
- * @return object template object
+ * @return object template object
+ * @throws \SmartyException
*/
public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null, $do_clone = true)
{
@@ -1002,6 +1016,7 @@ class Smarty extends Smarty_Internal_TemplateBase
* @param \Smarty_Internal_Template $template
*
* @return string
+ * @throws \SmartyException
*/
public function _getTemplateId($template_name,
$cache_id = null,
@@ -1260,6 +1275,16 @@ class Smarty extends Smarty_Internal_TemplateBase
}
/**
+ * Get Smarty object
+ *
+ * @return Smarty
+ */
+ public function _getSmartyObj()
+ {
+ return $this;
+ }
+
+ /**
* <<magic>> Generic getter.
* Calls the appropriate getter function.
* Issues an E_USER_NOTICE if no valid getter is found.
diff --git a/libs/SmartyBC.class.php b/libs/SmartyBC.class.php
index 3955e4f2..f2230fc9 100644
--- a/libs/SmartyBC.class.php
+++ b/libs/SmartyBC.class.php
@@ -100,6 +100,8 @@ class SmartyBC extends Smarty
* @param string $function_impl the name of the PHP function to register
* @param bool $cacheable
* @param mixed $cache_attrs
+ *
+ * @throws \SmartyException
*/
public function register_function($function, $function_impl, $cacheable = true, $cache_attrs = null)
{
@@ -153,6 +155,8 @@ class SmartyBC extends Smarty
* @param string $block_impl PHP function to register
* @param bool $cacheable
* @param mixed $cache_attrs
+ *
+ * @throws \SmartyException
*/
public function register_block($block, $block_impl, $cacheable = true, $cache_attrs = null)
{
@@ -175,6 +179,8 @@ class SmartyBC extends Smarty
* @param string $function name of template function
* @param string $function_impl name of PHP function to register
* @param bool $cacheable
+ *
+ * @throws \SmartyException
*/
public function register_compiler_function($function, $function_impl, $cacheable = true)
{
@@ -196,6 +202,8 @@ class SmartyBC extends Smarty
*
* @param string $modifier name of template modifier
* @param string $modifier_impl name of PHP function to register
+ *
+ * @throws \SmartyException
*/
public function register_modifier($modifier, $modifier_impl)
{
@@ -238,6 +246,8 @@ class SmartyBC extends Smarty
* to a template before compiling
*
* @param callable $function
+ *
+ * @throws \SmartyException
*/
public function register_prefilter($function)
{
@@ -259,6 +269,8 @@ class SmartyBC extends Smarty
* to a compiled template after compilation
*
* @param callable $function
+ *
+ * @throws \SmartyException
*/
public function register_postfilter($function)
{
@@ -280,6 +292,8 @@ class SmartyBC extends Smarty
* to a template output
*
* @param callable $function
+ *
+ * @throws \SmartyException
*/
public function register_outputfilter($function)
{
@@ -301,6 +315,8 @@ class SmartyBC extends Smarty
*
* @param string $type filter type
* @param string $name filter name
+ *
+ * @throws \SmartyException
*/
public function load_filter($type, $name)
{
@@ -341,7 +357,9 @@ class SmartyBC extends Smarty
* @param string $cache_id
* @param string $compile_id
*
- * @return boolean
+ * @return bool
+ * @throws \Exception
+ * @throws \SmartyException
*/
public function is_cached($tpl_file, $cache_id = null, $compile_id = null)
{
@@ -377,7 +395,8 @@ class SmartyBC extends Smarty
*
* @param string $tpl_file
*
- * @return boolean
+ * @return bool
+ * @throws \SmartyException
*/
public function template_exists($tpl_file)
{
diff --git a/libs/plugins/function.html_checkboxes.php b/libs/plugins/function.html_checkboxes.php
index 84b8456d..e7a3f725 100644
--- a/libs/plugins/function.html_checkboxes.php
+++ b/libs/plugins/function.html_checkboxes.php
@@ -179,9 +179,21 @@ function smarty_function_html_checkboxes($params, $template)
return implode("\n", $_html_result);
}
}
-
+/**
+ * @param $name
+ * @param $value
+ * @param $output
+ * @param $selected
+ * @param $extra
+ * @param $separator
+ * @param $labels
+ * @param $label_ids
+ * @param bool $escape
+ *
+ * @return string
+ */
function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels,
- $label_ids, $escape = true)
+ $label_ids, $escape = true)
{
$_output = '';
diff --git a/libs/plugins/function.html_options.php b/libs/plugins/function.html_options.php
index fd67d81b..d0e79452 100644
--- a/libs/plugins/function.html_options.php
+++ b/libs/plugins/function.html_options.php
@@ -157,7 +157,16 @@ function smarty_function_html_options($params, Smarty_Internal_Template $templat
return $_html_result;
}
-
+/**
+ * @param $key
+ * @param $value
+ * @param $selected
+ * @param $id
+ * @param $class
+ * @param $idx
+ *
+ * @return string
+ */
function smarty_function_html_options_optoutput($key, $value, $selected, $id, $class, &$idx)
{
if (!is_array($value)) {
@@ -196,7 +205,16 @@ function smarty_function_html_options_optoutput($key, $value, $selected, $id, $c
return $_html_result;
}
-
+/**
+ * @param $key
+ * @param $values
+ * @param $selected
+ * @param $id
+ * @param $class
+ * @param $idx
+ *
+ * @return string
+ */
function smarty_function_html_options_optgroup($key, $values, $selected, $id, $class, &$idx)
{
$optgroup_html = '<optgroup label="' . smarty_function_escape_special_chars($key) . '">' . "\n";
diff --git a/libs/plugins/function.html_radios.php b/libs/plugins/function.html_radios.php
index ac12ad71..2d71b1c3 100644
--- a/libs/plugins/function.html_radios.php
+++ b/libs/plugins/function.html_radios.php
@@ -166,9 +166,21 @@ function smarty_function_html_radios($params, $template)
return implode("\n", $_html_result);
}
}
-
+/**
+ * @param $name
+ * @param $value
+ * @param $output
+ * @param $selected
+ * @param $extra
+ * @param $separator
+ * @param $labels
+ * @param $label_ids
+ * @param $escape
+ *
+ * @return string
+ */
function smarty_function_html_radios_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids,
- $escape)
+ $escape)
{
$_output = '';
diff --git a/libs/plugins/function.html_table.php b/libs/plugins/function.html_table.php
index 42e23e72..7efcdbd2 100644
--- a/libs/plugins/function.html_table.php
+++ b/libs/plugins/function.html_table.php
@@ -163,7 +163,13 @@ function smarty_function_html_table($params)
return $output;
}
-
+/**
+ * @param $name
+ * @param $var
+ * @param $no
+ *
+ * @return string
+ */
function smarty_function_html_table_cycle($name, $var, $no)
{
if (!is_array($var)) {
diff --git a/libs/plugins/modifier.capitalize.php b/libs/plugins/modifier.capitalize.php
index 6513a049..79c1a4fe 100644
--- a/libs/plugins/modifier.capitalize.php
+++ b/libs/plugins/modifier.capitalize.php
@@ -80,21 +80,38 @@ function smarty_modifier_capitalize($string, $uc_digits = false, $lc_rest = fals
*
* @author Kyle Renfrow
*/
+/**
+ * @param $matches
+ *
+ * @return string
+ */
function smarty_mod_cap_mbconvert_cb($matches)
{
return stripslashes($matches[ 1 ]) . mb_convert_case(stripslashes($matches[ 2 ]), MB_CASE_UPPER, Smarty::$_CHARSET);
}
-
+/**
+ * @param $matches
+ *
+ * @return string
+ */
function smarty_mod_cap_mbconvert2_cb($matches)
{
return stripslashes($matches[ 1 ]) . mb_convert_case(stripslashes($matches[ 3 ]), MB_CASE_UPPER, Smarty::$_CHARSET);
}
-
+/**
+ * @param $matches
+ *
+ * @return string
+ */
function smarty_mod_cap_ucfirst_cb($matches)
{
return stripslashes($matches[ 1 ]) . ucfirst(stripslashes($matches[ 2 ]));
}
-
+/**
+ * @param $matches
+ *
+ * @return string
+ */
function smarty_mod_cap_ucfirst2_cb($matches)
{
return stripslashes($matches[ 1 ]) . ucfirst(stripslashes($matches[ 3 ]));
diff --git a/libs/plugins/modifier.escape.php b/libs/plugins/modifier.escape.php
index 0bb37705..2124e507 100644
--- a/libs/plugins/modifier.escape.php
+++ b/libs/plugins/modifier.escape.php
@@ -26,7 +26,6 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $
{
static $_double_encode = null;
static $is_loaded1 = false;
- static $is_loaded2 = false;
if ($_double_encode === null) {
$_double_encode = version_compare(PHP_VERSION, '5.2.3', '>=');
}
diff --git a/libs/plugins/modifiercompiler.wordwrap.php b/libs/plugins/modifiercompiler.wordwrap.php
index f518d14a..f5fb239c 100644
--- a/libs/plugins/modifiercompiler.wordwrap.php
+++ b/libs/plugins/modifiercompiler.wordwrap.php
@@ -5,7 +5,6 @@
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
-
/**
* Smarty wordwrap modifier plugin
* Type: modifier<br>
@@ -15,10 +14,11 @@
* @link http://smarty.php.net/manual/en/language.modifier.wordwrap.php wordwrap (Smarty online manual)
* @author Uwe Tews
*
- * @param array $params parameters
- * @param $compiler
+ * @param array $params parameters
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler
*
* @return string with compiled code
+ * @throws \SmartyException
*/
function smarty_modifiercompiler_wordwrap($params, Smarty_Internal_TemplateCompilerBase $compiler)
{
diff --git a/libs/plugins/shared.mb_str_replace.php b/libs/plugins/shared.mb_str_replace.php
index 0c3ffe25..30070293 100644
--- a/libs/plugins/shared.mb_str_replace.php
+++ b/libs/plugins/shared.mb_str_replace.php
@@ -6,14 +6,13 @@
* @subpackage PluginsShared
*/
if (!function_exists('smarty_mb_str_replace')) {
-
/**
* Multibyte string replace
*
- * @param string $search the string to be searched
- * @param string $replace the replacement string
- * @param string $subject the source string
- * @param int &$count number of matches found
+ * @param string|string[] $search the string to be searched
+ * @param string|string[] $replace the replacement string
+ * @param string $subject the source string
+ * @param int &$count number of matches found
*
* @return string replaced string
* @author Rodney Rehm
@@ -29,7 +28,7 @@ if (!function_exists('smarty_mb_str_replace')) {
$string = smarty_mb_str_replace($search, $replace, $string, $c);
$count += $c;
}
- } elseif (is_array($search)) {
+ } else if (is_array($search)) {
if (!is_array($replace)) {
foreach ($search as &$string) {
$subject = smarty_mb_str_replace($string, $replace, $subject, $c);
@@ -37,7 +36,7 @@ if (!function_exists('smarty_mb_str_replace')) {
}
} else {
$n = max(count($search), count($replace));
- while ($n --) {
+ while ($n--) {
$subject = smarty_mb_str_replace(current($search), current($replace), $subject, $c);
$count += $c;
next($search);
@@ -49,7 +48,6 @@ if (!function_exists('smarty_mb_str_replace')) {
$count = count($parts) - 1;
$subject = implode($replace, $parts);
}
-
return $subject;
}
}
diff --git a/libs/sysplugins/smarty_cacheresource_custom.php b/libs/sysplugins/smarty_cacheresource_custom.php
index 8f1290e4..b3f4c1b2 100644
--- a/libs/sysplugins/smarty_cacheresource_custom.php
+++ b/libs/sysplugins/smarty_cacheresource_custom.php
@@ -204,7 +204,8 @@ abstract class Smarty_CacheResource_Custom extends Smarty_CacheResource
* @param string $compile_id compile id
* @param integer $exp_time expiration time (number of seconds, not timestamp)
*
- * @return integer number of cache files deleted
+ * @return int number of cache files deleted
+ * @throws \SmartyException
*/
public function clear(Smarty $smarty, $resource_name, $cache_id, $compile_id, $exp_time)
{
diff --git a/libs/sysplugins/smarty_cacheresource_keyvaluestore.php b/libs/sysplugins/smarty_cacheresource_keyvaluestore.php
index bab1b5c0..47e010a7 100644
--- a/libs/sysplugins/smarty_cacheresource_keyvaluestore.php
+++ b/libs/sysplugins/smarty_cacheresource_keyvaluestore.php
@@ -180,7 +180,8 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
* @param string $compile_id compile id
* @param integer $exp_time expiration time [being ignored]
*
- * @return integer number of cache files deleted [always -1]
+ * @return int number of cache files deleted [always -1]
+ * @throws \SmartyException
* @uses buildCachedFilepath() to generate the CacheID
* @uses invalidate() to mark CacheIDs parent chain as outdated
* @uses delete() to remove CacheID from cache
diff --git a/libs/sysplugins/smarty_internal_cacheresource_file.php b/libs/sysplugins/smarty_internal_cacheresource_file.php
index 372e8cf4..942c003c 100644
--- a/libs/sysplugins/smarty_internal_cacheresource_file.php
+++ b/libs/sysplugins/smarty_internal_cacheresource_file.php
@@ -106,7 +106,8 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
* @param Smarty_Internal_Template $_template template object
* @param string $content content to cache
*
- * @return boolean success
+ * @return bool success
+ * @throws \SmartyException
*/
public function writeCachedContent(Smarty_Internal_Template $_template, $content)
{
diff --git a/libs/sysplugins/smarty_internal_compile_append.php b/libs/sysplugins/smarty_internal_compile_append.php
index 8539d6b2..b3689e91 100644
--- a/libs/sysplugins/smarty_internal_compile_append.php
+++ b/libs/sysplugins/smarty_internal_compile_append.php
@@ -24,6 +24,7 @@ class Smarty_Internal_Compile_Append extends Smarty_Internal_Compile_Assign
* @param array $parameter array with compilation parameter
*
* @return string compiled code
+ * @throws \SmartyCompilerException
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
{
diff --git a/libs/sysplugins/smarty_internal_compile_block.php b/libs/sysplugins/smarty_internal_compile_block.php
index 7a245e76..e3239031 100644
--- a/libs/sysplugins/smarty_internal_compile_block.php
+++ b/libs/sysplugins/smarty_internal_compile_block.php
@@ -57,13 +57,12 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_Compile_Shared_Inher
/**
* Compiles code for the {block} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
*/
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
if (!isset($compiler->_cache['blockNesting'])) {
$compiler->_cache['blockNesting'] = 0;
@@ -151,13 +150,13 @@ class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_Compile_Shared_
/**
* Compiles code for the {/block} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
+ * @internal param array $parameter array with compilation parameter
*/
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
list($_attr, $_nocache, $_buffer, $_has_nocache_code, $_caching) = $this->closeTag($compiler, array('block'));
// init block parameter
diff --git a/libs/sysplugins/smarty_internal_compile_break.php b/libs/sysplugins/smarty_internal_compile_break.php
index 50157382..ce162cb5 100644
--- a/libs/sysplugins/smarty_internal_compile_break.php
+++ b/libs/sysplugins/smarty_internal_compile_break.php
@@ -35,13 +35,13 @@ class Smarty_Internal_Compile_Break extends Smarty_Internal_CompileBase
/**
* Compiles code for the {break} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
+ * @throws \SmartyCompilerException
*/
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
list($levels, $foreachLevels) = $this->checkLevels($args, $compiler);
$output = "<?php\n";
diff --git a/libs/sysplugins/smarty_internal_compile_continue.php b/libs/sysplugins/smarty_internal_compile_continue.php
index 7492c7df..ac8efdc6 100644
--- a/libs/sysplugins/smarty_internal_compile_continue.php
+++ b/libs/sysplugins/smarty_internal_compile_continue.php
@@ -16,18 +16,17 @@
*/
class Smarty_Internal_Compile_Continue extends Smarty_Internal_Compile_Break
{
-
/**
* Compiles code for the {continue} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
* @throws \SmartyCompilerException
+ * @internal param array $parameter array with compilation parameter
*/
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
list($levels, $foreachLevels) = $this->checkLevels($args, $compiler, 'continue');
$output = "<?php\n";
diff --git a/libs/sysplugins/smarty_internal_compile_extends.php b/libs/sysplugins/smarty_internal_compile_extends.php
index 83cb8050..5e0b5899 100644
--- a/libs/sysplugins/smarty_internal_compile_extends.php
+++ b/libs/sysplugins/smarty_internal_compile_extends.php
@@ -95,6 +95,9 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_Compile_Shared_Inh
*
* @param \Smarty_Internal_TemplateCompilerBase $compiler
* @param null|string $template optional inheritance parent template
+ *
+ * @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
private function compileEndChild(Smarty_Internal_TemplateCompilerBase $compiler, $template = null)
{
@@ -117,6 +120,9 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_Compile_Shared_Inh
*
* @param \Smarty_Internal_TemplateCompilerBase $compiler
* @param string $template subtemplate name
+ *
+ * @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
private function compileInclude(Smarty_Internal_TemplateCompilerBase $compiler, $template)
{
diff --git a/libs/sysplugins/smarty_internal_compile_foreach.php b/libs/sysplugins/smarty_internal_compile_foreach.php
index 5ddd42d8..932d1b03 100644
--- a/libs/sysplugins/smarty_internal_compile_foreach.php
+++ b/libs/sysplugins/smarty_internal_compile_foreach.php
@@ -78,14 +78,14 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_Compile_Private_Fo
/**
* Compiles code for the {foreach} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
* @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
$compiler->loopNesting ++;
// init
@@ -277,13 +277,12 @@ class Smarty_Internal_Compile_Foreachelse extends Smarty_Internal_CompileBase
/**
* Compiles code for the {foreachelse} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
*/
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
@@ -310,13 +309,13 @@ class Smarty_Internal_Compile_Foreachclose extends Smarty_Internal_CompileBase
/**
* Compiles code for the {/foreach} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
- */
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ * @throws \SmartyCompilerException
+ */
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
$compiler->loopNesting --;
// must endblock be nocache?
diff --git a/libs/sysplugins/smarty_internal_compile_function.php b/libs/sysplugins/smarty_internal_compile_function.php
index b7cd9e1c..3badf8ce 100644
--- a/libs/sysplugins/smarty_internal_compile_function.php
+++ b/libs/sysplugins/smarty_internal_compile_function.php
@@ -44,14 +44,13 @@ class Smarty_Internal_Compile_Function extends Smarty_Internal_CompileBase
/**
* Compiles code for the {function} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return bool true
* @throws \SmartyCompilerException
*/
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
@@ -91,13 +90,12 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
/**
* Compiles code for the {/function} tag
*
- * @param array $args array with attributes from parser
- * @param object|\Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param object|\Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return bool true
*/
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
$this->compiler = $compiler;
$saved_data = $this->closeTag($compiler, array('function'));
diff --git a/libs/sysplugins/smarty_internal_compile_if.php b/libs/sysplugins/smarty_internal_compile_if.php
index 14db55d4..bf4e04e3 100644
--- a/libs/sysplugins/smarty_internal_compile_if.php
+++ b/libs/sysplugins/smarty_internal_compile_if.php
@@ -80,13 +80,12 @@ class Smarty_Internal_Compile_Else extends Smarty_Internal_CompileBase
/**
* Compiles code for the {else} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
- */
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ */
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
list($nesting, $compiler->tag_nocache) = $this->closeTag($compiler, array('if', 'elseif'));
$this->openTag($compiler, 'else', array($nesting, $compiler->tag_nocache));
@@ -188,13 +187,12 @@ class Smarty_Internal_Compile_Ifclose extends Smarty_Internal_CompileBase
/**
* Compiles code for the {/if} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
*/
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
// must endblock be nocache?
if ($compiler->nocache) {
diff --git a/libs/sysplugins/smarty_internal_compile_include.php b/libs/sysplugins/smarty_internal_compile_include.php
index 5fbbdac8..02b09f7a 100644
--- a/libs/sysplugins/smarty_internal_compile_include.php
+++ b/libs/sysplugins/smarty_internal_compile_include.php
@@ -59,14 +59,15 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
/**
* Compiles code for the {include} tag
*
- * @param array $args array with attributes from parser
- * @param Smarty_Internal_SmartyTemplateCompiler $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param Smarty_Internal_SmartyTemplateCompiler $compiler compiler object
*
- * @throws SmartyCompilerException
- * @return string compiled code
+ * @return string
+ * @throws \Exception
+ * @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
- public function compile($args, Smarty_Internal_SmartyTemplateCompiler $compiler, $parameter)
+ public function compile($args, Smarty_Internal_SmartyTemplateCompiler $compiler)
{
$uid = $t_hash = null;
// check and get attributes
@@ -271,6 +272,8 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
* @param string $t_hash
*
* @return bool
+ * @throws \Exception
+ * @throws \SmartyException
*/
public function compileInlineTemplate(Smarty_Internal_SmartyTemplateCompiler $compiler,
Smarty_Internal_Template $tpl,
diff --git a/libs/sysplugins/smarty_internal_compile_insert.php b/libs/sysplugins/smarty_internal_compile_insert.php
index 117ec4ef..bcab8a81 100644
--- a/libs/sysplugins/smarty_internal_compile_insert.php
+++ b/libs/sysplugins/smarty_internal_compile_insert.php
@@ -46,6 +46,7 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase
*
* @return string compiled code
* @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
diff --git a/libs/sysplugins/smarty_internal_compile_make_nocache.php b/libs/sysplugins/smarty_internal_compile_make_nocache.php
index fd816239..84225b5d 100644
--- a/libs/sysplugins/smarty_internal_compile_make_nocache.php
+++ b/libs/sysplugins/smarty_internal_compile_make_nocache.php
@@ -41,14 +41,12 @@ class Smarty_Internal_Compile_Make_Nocache extends Smarty_Internal_CompileBase
/**
* Compiles code for the {make_nocache} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
- * @throws \SmartyCompilerException
- */
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ */
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
diff --git a/libs/sysplugins/smarty_internal_compile_private_block_plugin.php b/libs/sysplugins/smarty_internal_compile_private_block_plugin.php
index 61756427..49837e66 100644
--- a/libs/sysplugins/smarty_internal_compile_private_block_plugin.php
+++ b/libs/sysplugins/smarty_internal_compile_private_block_plugin.php
@@ -41,6 +41,8 @@ class Smarty_Internal_Compile_Private_Block_Plugin extends Smarty_Internal_Compi
* @param string $function PHP function name
*
* @return string compiled code
+ * @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter, $tag, $function = null)
{
diff --git a/libs/sysplugins/smarty_internal_compile_private_foreachsection.php b/libs/sysplugins/smarty_internal_compile_private_foreachsection.php
index bf569be3..2fcd8578 100644
--- a/libs/sysplugins/smarty_internal_compile_private_foreachsection.php
+++ b/libs/sysplugins/smarty_internal_compile_private_foreachsection.php
@@ -76,6 +76,8 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com
*
* @param array $attributes
* @param \Smarty_Internal_TemplateCompilerBase $compiler
+ *
+ * @throws \SmartyException
*/
public function scanForProperties($attributes, Smarty_Internal_TemplateCompilerBase $compiler)
{
@@ -161,6 +163,8 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com
* Find matches in all parent template source
*
* @param \Smarty_Internal_TemplateCompilerBase $compiler
+ *
+ * @throws \SmartyException
*/
public function matchParentTemplateSource(Smarty_Internal_TemplateCompilerBase $compiler)
{
diff --git a/libs/sysplugins/smarty_internal_compile_private_function_plugin.php b/libs/sysplugins/smarty_internal_compile_private_function_plugin.php
index 26529bb6..7ecf61d2 100644
--- a/libs/sysplugins/smarty_internal_compile_private_function_plugin.php
+++ b/libs/sysplugins/smarty_internal_compile_private_function_plugin.php
@@ -42,6 +42,8 @@ class Smarty_Internal_Compile_Private_Function_Plugin extends Smarty_Internal_Co
* @param string $function PHP function name
*
* @return string compiled code
+ * @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter, $tag, $function)
{
diff --git a/libs/sysplugins/smarty_internal_compile_private_modifier.php b/libs/sysplugins/smarty_internal_compile_private_modifier.php
index 5f8130b9..3a39c2ba 100644
--- a/libs/sysplugins/smarty_internal_compile_private_modifier.php
+++ b/libs/sysplugins/smarty_internal_compile_private_modifier.php
@@ -26,6 +26,7 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa
*
* @return string compiled code
* @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
{
@@ -34,6 +35,7 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa
$output = $parameter[ 'value' ];
// loop over list of modifiers
foreach ($parameter[ 'modifierlist' ] as $single_modifier) {
+ /* @var string $modifier */
$modifier = $single_modifier[ 0 ];
$single_modifier[ 0 ] = $output;
$params = implode(',', $single_modifier);
diff --git a/libs/sysplugins/smarty_internal_compile_private_object_function.php b/libs/sysplugins/smarty_internal_compile_private_object_function.php
index 7f78a421..4ef108fb 100644
--- a/libs/sysplugins/smarty_internal_compile_private_object_function.php
+++ b/libs/sysplugins/smarty_internal_compile_private_object_function.php
@@ -34,6 +34,8 @@ class Smarty_Internal_Compile_Private_Object_Function extends Smarty_Internal_Co
* @param string $method name of method to call
*
* @return string compiled code
+ * @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter, $tag, $method)
{
diff --git a/libs/sysplugins/smarty_internal_compile_private_php.php b/libs/sysplugins/smarty_internal_compile_private_php.php
index 8bff8499..9080c487 100644
--- a/libs/sysplugins/smarty_internal_compile_private_php.php
+++ b/libs/sysplugins/smarty_internal_compile_private_php.php
@@ -107,9 +107,11 @@ class Smarty_Internal_Compile_Private_Php extends Smarty_Internal_CompileBase
*
* This code has been moved from lexer here fo easier debugging and maintenance
*
- * @param $lex
+ * @param Smarty_Internal_Templatelexer $lex
+ *
+ * @throws \SmartyCompilerException
*/
- public function parsePhp($lex)
+ public function parsePhp(Smarty_Internal_Templatelexer $lex)
{
$lex->token = Smarty_Internal_Templateparser::TP_PHP;
$close = 0;
diff --git a/libs/sysplugins/smarty_internal_compile_private_print_expression.php b/libs/sysplugins/smarty_internal_compile_private_print_expression.php
index 811996bc..55d70915 100644
--- a/libs/sysplugins/smarty_internal_compile_private_print_expression.php
+++ b/libs/sysplugins/smarty_internal_compile_private_print_expression.php
@@ -134,6 +134,7 @@ class Smarty_Internal_Compile_Private_Print_Expression extends Smarty_Internal_C
* @param string $output embedded output
*
* @return string
+ * @throws \SmartyException
*/
private function compile_output_filter(Smarty_Internal_TemplateCompilerBase $compiler, $name, $output)
{
diff --git a/libs/sysplugins/smarty_internal_compile_private_registered_function.php b/libs/sysplugins/smarty_internal_compile_private_registered_function.php
index 3754f2b0..48c719e0 100644
--- a/libs/sysplugins/smarty_internal_compile_private_registered_function.php
+++ b/libs/sysplugins/smarty_internal_compile_private_registered_function.php
@@ -33,6 +33,8 @@ class Smarty_Internal_Compile_Private_Registered_Function extends Smarty_Interna
* @param string $tag name of function
*
* @return string compiled code
+ * @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter, $tag)
{
diff --git a/libs/sysplugins/smarty_internal_compile_section.php b/libs/sysplugins/smarty_internal_compile_section.php
index c3701fc6..c530cc76 100644
--- a/libs/sysplugins/smarty_internal_compile_section.php
+++ b/libs/sysplugins/smarty_internal_compile_section.php
@@ -84,6 +84,7 @@ class Smarty_Internal_Compile_Section extends Smarty_Internal_Compile_Private_Fo
*
* @return string compiled code
* @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
diff --git a/libs/sysplugins/smarty_internal_config_file_compiler.php b/libs/sysplugins/smarty_internal_config_file_compiler.php
index ec1cb2be..6b5d1e75 100644
--- a/libs/sysplugins/smarty_internal_config_file_compiler.php
+++ b/libs/sysplugins/smarty_internal_config_file_compiler.php
@@ -97,6 +97,7 @@ class Smarty_Internal_Config_File_Compiler
* @param Smarty_Internal_Template $template
*
* @return bool true if compiling succeeded, false if it failed
+ * @throws \SmartyException
*/
public function compileTemplate(Smarty_Internal_Template $template)
{
diff --git a/libs/sysplugins/smarty_internal_configfilelexer.php b/libs/sysplugins/smarty_internal_configfilelexer.php
index d22b5146..374d4492 100644
--- a/libs/sysplugins/smarty_internal_configfilelexer.php
+++ b/libs/sysplugins/smarty_internal_configfilelexer.php
@@ -153,6 +153,9 @@ class Smarty_Internal_Configfilelexer
$this->yyTracePrompt = '<br>';
} // end function
+ /**
+ * @param $state
+ */
public function yybegin($state)
{
$this->_yy_state = $state;
@@ -165,7 +168,11 @@ class Smarty_Internal_Configfilelexer
}
}
-public function yylex1()
+ /**
+ * @return bool
+ * @throws \Exception
+ */
+ public function yylex1()
{
if (!isset($this->yy_global_pattern1)) {
$this->yy_global_pattern1 =
@@ -221,11 +228,19 @@ public function yylex1()
}
+ /**
+ * @param $input
+ *
+ * @return mixed
+ */
public function replace($input)
{
return $input;
}
+ /**
+ * @return mixed
+ */
public function yylex()
{
return $this->{'yylex' . $this->_yy_state}();
@@ -238,6 +253,9 @@ public function yylex1()
$this->yypushstate(self::COMMENT);
}
+ /**
+ * @param $state
+ */
public function yypushstate($state)
{
if ($this->yyTraceFILE) {
@@ -278,6 +296,9 @@ public function yylex1()
$this->yypushstate(self::VALUE);
}
+ /**
+ * @return bool
+ */
function yy_r1_5()
{
@@ -302,7 +323,11 @@ public function yylex1()
$this->token = Smarty_Internal_Configfileparser::TPC_OTHER;
}
-public function yylex2()
+ /**
+ * @return bool
+ * @throws \Exception
+ */
+ public function yylex2()
{
if (!isset($this->yy_global_pattern2)) {
$this->yy_global_pattern2 =
@@ -358,6 +383,9 @@ public function yylex2()
}
+ /**
+ * @return bool
+ */
function yy_r2_1()
{
@@ -419,6 +447,9 @@ public function yylex2()
$this->yypopstate();
} // end function
+ /**
+ * @return bool
+ */
function yy_r2_7()
{
@@ -448,7 +479,11 @@ public function yylex2()
$this->yypopstate();
} // end function
-public function yylex3()
+ /**
+ * @return bool
+ * @throws \Exception
+ */
+ public function yylex3()
{
if (!isset($this->yy_global_pattern3)) {
$this->yy_global_pattern3 = $this->replace("/\G([^\n]+?(?=[ \t\r]*\n))/isS");
@@ -510,7 +545,11 @@ public function yylex3()
$this->yypopstate();
}
-public function yylex4()
+ /**
+ * @return bool
+ * @throws \Exception
+ */
+ public function yylex4()
{
if (!isset($this->yy_global_pattern4)) {
$this->yy_global_pattern4 = $this->replace("/\G([ \t\r]+)|\G([^\n]+?(?=[ \t\r]*\n))|\G(\n)/isS");
@@ -565,6 +604,9 @@ public function yylex4()
}
+ /**
+ * @return bool
+ */
function yy_r4_1()
{
@@ -584,7 +626,11 @@ public function yylex4()
$this->yypopstate();
}
-public function yylex5()
+ /**
+ * @return bool
+ * @throws \Exception
+ */
+ public function yylex5()
{
if (!isset($this->yy_global_pattern5)) {
$this->yy_global_pattern5 = $this->replace("/\G(\\.)|\G(.*?(?=[\.=[\]\r\n]))/isS");
@@ -652,7 +698,11 @@ public function yylex5()
$this->yypopstate();
} // end function
-public function yylex6()
+ /**
+ * @return bool
+ * @throws \Exception
+ */
+ public function yylex6()
{
if (!isset($this->yy_global_pattern6)) {
$this->yy_global_pattern6 = $this->replace("/\G(\"\"\"(?=[ \t\r]*[\n#;]))|\G([\S\s])/isS");
diff --git a/libs/sysplugins/smarty_internal_configfileparser.php b/libs/sysplugins/smarty_internal_configfileparser.php
index 4ffc854a..aa0d6d4b 100644
--- a/libs/sysplugins/smarty_internal_configfileparser.php
+++ b/libs/sysplugins/smarty_internal_configfileparser.php
@@ -1,10 +1,19 @@
<?php
+/**
+ * Class TPC_yyToken
+ */
class TPC_yyToken implements ArrayAccess
{
public $string = '';
public $metadata = array();
+ /**
+ * TPC_yyToken constructor.
+ *
+ * @param $s
+ * @param array $m
+ */
public function __construct($s, $m = array())
{
if ($s instanceof TPC_yyToken) {
@@ -20,21 +29,38 @@ class TPC_yyToken implements ArrayAccess
}
}
+ /**
+ * @return string
+ */
public function __toString()
{
return $this->string;
}
+ /**
+ * @param mixed $offset
+ *
+ * @return bool
+ */
public function offsetExists($offset)
{
return isset($this->metadata[ $offset ]);
}
+ /**
+ * @param mixed $offset
+ *
+ * @return mixed
+ */
public function offsetGet($offset)
{
return $this->metadata[ $offset ];
}
+ /**
+ * @param mixed $offset
+ * @param mixed $value
+ */
public function offsetSet($offset, $value)
{
if ($offset === null) {
@@ -58,12 +84,18 @@ class TPC_yyToken implements ArrayAccess
}
}
+ /**
+ * @param mixed $offset
+ */
public function offsetUnset($offset)
{
unset($this->metadata[ $offset ]);
}
}
+/**
+ * Class TPC_yyStackEntry
+ */
class TPC_yyStackEntry
{
public $stateno; /* The state-number */
@@ -247,6 +279,10 @@ public $yystack = array();
$this->configReadHidden = $this->smarty->config_read_hidden;
}
+ /**
+ * @param $TraceFILE
+ * @param $zTracePrompt
+ */
public function Trace($TraceFILE, $zTracePrompt)
{
if (!$TraceFILE) {
@@ -263,7 +299,11 @@ public $yystack = array();
$this->yyTraceFILE = fopen('php://output', 'w');
$this->yyTracePrompt = '<br>';
} /* Index of top element in stack */
-
+ /**
+ * @param $tokenType
+ *
+ * @return mixed|string
+ */
public function tokenName($tokenType)
{
if ($tokenType === 0) {
@@ -303,6 +343,10 @@ public $yystack = array();
return $yymajor;
}
+ /**
+ * @param $yymajor
+ * @param $yypminor
+ */
public static function yy_destructor($yymajor, $yypminor)
{
switch ($yymajor) {
@@ -311,6 +355,11 @@ public $yystack = array();
}
}
+ /**
+ * @param $token
+ *
+ * @return array|mixed
+ */
public function yy_get_expected_tokens($token)
{
static $res3 = array();
@@ -395,6 +444,11 @@ public $yystack = array();
return array_unique($expected);
}
+ /**
+ * @param $iLookAhead
+ *
+ * @return int|mixed
+ */
public function yy_find_shift_action($iLookAhead)
{
$stateno = $this->yystack[ $this->yyidx ]->stateno;
@@ -430,6 +484,12 @@ public $yystack = array();
}
}
+ /**
+ * @param $stateno
+ * @param $iLookAhead
+ *
+ * @return int|mixed
+ */
public function yy_find_reduce_action($stateno, $iLookAhead)
{
/* $stateno = $this->yystack[$this->yyidx]->stateno; */
@@ -692,6 +752,12 @@ public $yystack = array();
#line 324 "../smarty/lexer/smarty_internal_configfileparser.y"
+ /**
+ * @param $yymajor
+ * @param $yytokenvalue
+ *
+ * @throws \SmartyCompilerException
+ */
public function doParse($yymajor, $yytokenvalue)
{
$yyerrorhit = 0; /* True if yymajor has invoked an error */
@@ -784,6 +850,11 @@ public $yystack = array();
} while ($yymajor != self::YYNOCODE && $this->yyidx >= 0);
}
+ /**
+ * @param $token
+ *
+ * @return bool
+ */
public function yy_is_expected_token($token)
{
static $res = array();
@@ -873,6 +944,13 @@ public $yystack = array();
return true;
}
+ /**
+ * @param $yyNewState
+ * @param $yyMajor
+ * @param $yypMinor
+ *
+ * @throws \SmartyCompilerException
+ */
public function yy_shift($yyNewState, $yyMajor, $yypMinor)
{
$this->yyidx++;
@@ -911,6 +989,11 @@ public $yystack = array();
}
}
+ /**
+ * @param $yyruleno
+ *
+ * @throws \SmartyCompilerException
+ */
public function yy_reduce($yyruleno)
{
if ($this->yyTraceFILE && $yyruleno >= 0 && $yyruleno < count(self::$yyRuleName)) {
@@ -967,6 +1050,12 @@ public $yystack = array();
$this->retvalue = $this->_retvalue;
}
+ /**
+ * @param $yymajor
+ * @param $TOKEN
+ *
+ * @throws \SmartyCompilerException
+ */
public function yy_syntax_error($yymajor, $TOKEN)
{
#line 232 "../smarty/lexer/smarty_internal_configfileparser.y"
diff --git a/libs/sysplugins/smarty_internal_data.php b/libs/sysplugins/smarty_internal_data.php
index e1724f14..58febbf2 100644
--- a/libs/sysplugins/smarty_internal_data.php
+++ b/libs/sysplugins/smarty_internal_data.php
@@ -19,6 +19,7 @@
* The following methods will be dynamically loaded by the extension handler when they are called.
* They are located in a corresponding Smarty_Internal_Method_xxxx class
*
+ * @method mixed _getConfigVariable(string $varName, bool $errorEnable = true)
* @method mixed getConfigVariable(string $varName, bool $errorEnable = true)
* @method mixed getConfigVars(string $varName = null, bool $searchParents = true)
* @method mixed getGlobal(string $varName = null)
@@ -266,7 +267,7 @@ class Smarty_Internal_Data
*/
public function _getSmartyObj()
{
- return $this->_objType === 1 ? $this : $this->smarty;
+ return $this->smarty;
}
/**
diff --git a/libs/sysplugins/smarty_internal_debug.php b/libs/sysplugins/smarty_internal_debug.php
index f16bd3fb..20d72381 100644
--- a/libs/sysplugins/smarty_internal_debug.php
+++ b/libs/sysplugins/smarty_internal_debug.php
@@ -193,6 +193,9 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
*
* @param Smarty_Internal_Template|Smarty $obj object to debug
* @param bool $full
+ *
+ * @throws \Exception
+ * @throws \SmartyException
*/
public function display_debug($obj, $full = false)
{
diff --git a/libs/sysplugins/smarty_internal_errorhandler.php b/libs/sysplugins/smarty_internal_errorhandler.php
index 96087720..83142183 100644
--- a/libs/sysplugins/smarty_internal_errorhandler.php
+++ b/libs/sysplugins/smarty_internal_errorhandler.php
@@ -25,7 +25,7 @@ class Smarty_Internal_ErrorHandler
/**
* Enable error handler to mute expected messages
*
- * @return void
+ * @return boolean
*/
public static function muteExpectedErrors()
{
diff --git a/libs/sysplugins/smarty_internal_method_addautoloadfilters.php b/libs/sysplugins/smarty_internal_method_addautoloadfilters.php
index 3eef8a28..7bd75bfb 100644
--- a/libs/sysplugins/smarty_internal_method_addautoloadfilters.php
+++ b/libs/sysplugins/smarty_internal_method_addautoloadfilters.php
@@ -11,7 +11,6 @@
*/
class Smarty_Internal_Method_AddAutoloadFilters extends Smarty_Internal_Method_SetAutoloadFilters
{
-
/**
* Add autoload filters
*
@@ -25,6 +24,7 @@ class Smarty_Internal_Method_AddAutoloadFilters extends Smarty_Internal_Method_S
* the appropriate types
*
* @return \Smarty|\Smarty_Internal_Template
+ * @throws \SmartyException
*/
public function addAutoloadFilters(Smarty_Internal_TemplateBase $obj, $filters, $type = null)
{
diff --git a/libs/sysplugins/smarty_internal_method_clearallcache.php b/libs/sysplugins/smarty_internal_method_clearallcache.php
index 5879f9a0..9641e2ba 100644
--- a/libs/sysplugins/smarty_internal_method_clearallcache.php
+++ b/libs/sysplugins/smarty_internal_method_clearallcache.php
@@ -28,7 +28,8 @@ class Smarty_Internal_Method_ClearAllCache
* @param integer $exp_time expiration time
* @param string $type resource type
*
- * @return integer number of cache files deleted
+ * @return int number of cache files deleted
+ * @throws \SmartyException
*/
public function clearAllCache(Smarty $smarty, $exp_time = null, $type = null)
{
diff --git a/libs/sysplugins/smarty_internal_method_clearcache.php b/libs/sysplugins/smarty_internal_method_clearcache.php
index 95649a77..6d56c13d 100644
--- a/libs/sysplugins/smarty_internal_method_clearcache.php
+++ b/libs/sysplugins/smarty_internal_method_clearcache.php
@@ -31,7 +31,8 @@ class Smarty_Internal_Method_ClearCache
* @param integer $exp_time expiration time
* @param string $type resource type
*
- * @return integer number of cache files deleted
+ * @return int number of cache files deleted
+ * @throws \SmartyException
*/
public function clearCache(Smarty $smarty, $template_name, $cache_id = null, $compile_id = null, $exp_time = null,
$type = null)
diff --git a/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php b/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php
index 1d448e5f..6a3292d0 100644
--- a/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php
+++ b/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php
@@ -29,7 +29,8 @@ class Smarty_Internal_Method_ClearCompiledTemplate
* @param string $compile_id compile id
* @param integer $exp_time expiration time
*
- * @return integer number of template files deleted
+ * @return int number of template files deleted
+ * @throws \SmartyException
*/
public function clearCompiledTemplate(Smarty $smarty, $resource_name = null, $compile_id = null, $exp_time = null)
{
diff --git a/libs/sysplugins/smarty_internal_method_configload.php b/libs/sysplugins/smarty_internal_method_configload.php
index 6113eaf9..d33c3d15 100644
--- a/libs/sysplugins/smarty_internal_method_configload.php
+++ b/libs/sysplugins/smarty_internal_method_configload.php
@@ -30,7 +30,7 @@ class Smarty_Internal_Method_ConfigLoad
* section or null
*
* @return \Smarty|\Smarty_Internal_Data|\Smarty_Internal_Template
- * @throws \SmartyException
+ * @throws \Exception
*/
public function configLoad(Smarty_Internal_Data $data, $config_file, $sections = null)
{
@@ -52,7 +52,7 @@ class Smarty_Internal_Method_ConfigLoad
* shall be loaded
*
* @return \Smarty|\Smarty_Internal_Data|\Smarty_Internal_Template
- * @throws \SmartyException
+ * @throws \Exception
*/
public function _loadConfigFile(Smarty_Internal_Data $data, $config_file, $sections = null, $scope = 0)
{
@@ -94,6 +94,7 @@ class Smarty_Internal_Method_ConfigLoad
$mergedScope = $tagScope | $tpl->scope;
if ($mergedScope) {
// update scopes
+ /* @var \Smarty_Internal_Template|\Smarty|\Smarty_Internal_Data $ptr */
foreach ($tpl->smarty->ext->_updateScope->_getAffectedScopes($tpl->parent, $mergedScope) as $ptr) {
$this->_assignConfigVars($ptr->config_vars, $tpl, $new_config_vars);
if ($tagScope && $ptr->_isTplObj() && isset($tpl->_cache[ 'varStack' ])) {
diff --git a/libs/sysplugins/smarty_internal_method_getautoloadfilters.php b/libs/sysplugins/smarty_internal_method_getautoloadfilters.php
index d945a01e..b957b60d 100644
--- a/libs/sysplugins/smarty_internal_method_getautoloadfilters.php
+++ b/libs/sysplugins/smarty_internal_method_getautoloadfilters.php
@@ -11,7 +11,6 @@
*/
class Smarty_Internal_Method_GetAutoloadFilters extends Smarty_Internal_Method_SetAutoloadFilters
{
-
/**
* Get autoload filters
*
@@ -22,8 +21,9 @@ class Smarty_Internal_Method_GetAutoloadFilters extends Smarty_Internal_Method_S
* for. Defaults to all autoload
* filters
*
- * @return array array( 'type1' => array( 'filter1', 'filter2', … ) ) or array( 'filter1', 'filter2', …) if $type
+ * @return array array( 'type1' => array( 'filter1', 'filter2', … ) ) or array( 'filter1', 'filter2', …) if $type
* was specified
+ * @throws \SmartyException
*/
public function getAutoloadFilters(Smarty_Internal_TemplateBase $obj, $type = null)
{
diff --git a/libs/sysplugins/smarty_internal_method_getglobal.php b/libs/sysplugins/smarty_internal_method_getglobal.php
index 7a8a9bc7..0f00da53 100644
--- a/libs/sysplugins/smarty_internal_method_getglobal.php
+++ b/libs/sysplugins/smarty_internal_method_getglobal.php
@@ -24,9 +24,9 @@ class Smarty_Internal_Method_GetGlobal
* @api Smarty::getGlobal()
*
* @param \Smarty_Internal_Data $data
- * @param string $varName variable name or null
+ * @param string $varName variable name or null
*
- * @return string variable value or or array of variables
+ * @return string|array variable value or or array of variables
*/
public function getGlobal(Smarty_Internal_Data $data, $varName = null)
{
diff --git a/libs/sysplugins/smarty_internal_method_gettags.php b/libs/sysplugins/smarty_internal_method_gettags.php
index 5718b69e..f195fc46 100644
--- a/libs/sysplugins/smarty_internal_method_gettags.php
+++ b/libs/sysplugins/smarty_internal_method_gettags.php
@@ -28,6 +28,7 @@ class Smarty_Internal_Method_GetTags
* @param null|string|Smarty_Internal_Template $template
*
* @return array of tag/attributes
+ * @throws \Exception
* @throws \SmartyException
*/
public function getTags(Smarty_Internal_TemplateBase $obj, $template = null)
diff --git a/libs/sysplugins/smarty_internal_method_literals.php b/libs/sysplugins/smarty_internal_method_literals.php
index 6dd4e26d..08e1a473 100644
--- a/libs/sysplugins/smarty_internal_method_literals.php
+++ b/libs/sysplugins/smarty_internal_method_literals.php
@@ -43,6 +43,7 @@ class Smarty_Internal_Method_Literals
* to add
*
* @return \Smarty|\Smarty_Internal_Template
+ * @throws \SmartyException
*/
public function addLiterals(Smarty_Internal_TemplateBase $obj, $literals = null)
{
@@ -62,6 +63,7 @@ class Smarty_Internal_Method_Literals
* to set
*
* @return \Smarty|\Smarty_Internal_Template
+ * @throws \SmartyException
*/
public function setLiterals(Smarty_Internal_TemplateBase $obj, $literals = null)
{
diff --git a/libs/sysplugins/smarty_internal_method_setautoloadfilters.php b/libs/sysplugins/smarty_internal_method_setautoloadfilters.php
index df5ca640..ebcfe727 100644
--- a/libs/sysplugins/smarty_internal_method_setautoloadfilters.php
+++ b/libs/sysplugins/smarty_internal_method_setautoloadfilters.php
@@ -38,6 +38,7 @@ class Smarty_Internal_Method_SetAutoloadFilters
* the appropriate types
*
* @return \Smarty|\Smarty_Internal_Template
+ * @throws \SmartyException
*/
public function setAutoloadFilters(Smarty_Internal_TemplateBase $obj, $filters, $type = null)
{
diff --git a/libs/sysplugins/smarty_internal_method_unloadfilter.php b/libs/sysplugins/smarty_internal_method_unloadfilter.php
index 9aa1d229..1a5fdf19 100644
--- a/libs/sysplugins/smarty_internal_method_unloadfilter.php
+++ b/libs/sysplugins/smarty_internal_method_unloadfilter.php
@@ -22,7 +22,8 @@ class Smarty_Internal_Method_UnloadFilter extends Smarty_Internal_Method_LoadFil
* @param string $type filter type
* @param string $name filter name
*
- * @return bool
+ * @return Smarty_Internal_TemplateBase
+ * @throws \SmartyException
*/
public function unloadFilter(Smarty_Internal_TemplateBase $obj, $type, $name)
{
diff --git a/libs/sysplugins/smarty_internal_method_unregisterfilter.php b/libs/sysplugins/smarty_internal_method_unregisterfilter.php
index c5b88f57..fcc4e5d8 100644
--- a/libs/sysplugins/smarty_internal_method_unregisterfilter.php
+++ b/libs/sysplugins/smarty_internal_method_unregisterfilter.php
@@ -23,6 +23,7 @@ class Smarty_Internal_Method_UnregisterFilter extends Smarty_Internal_Method_Reg
* @param callback|string $callback
*
* @return \Smarty|\Smarty_Internal_Template
+ * @throws \SmartyException
*/
public function unregisterFilter(Smarty_Internal_TemplateBase $obj, $type, $callback)
{
diff --git a/libs/sysplugins/smarty_internal_parsetree.php b/libs/sysplugins/smarty_internal_parsetree.php
index 32c9df09..b3e202ef 100644
--- a/libs/sysplugins/smarty_internal_parsetree.php
+++ b/libs/sysplugins/smarty_internal_parsetree.php
@@ -1,7 +1,7 @@
<?php
/**
- * Smarty Internal Plugin Templateparser Parsetrees
- * These are classes to build parsetrees in the template parser
+ * Smarty Internal Plugin Templateparser Parsetree
+ * These are classes to build parsetree in the template parser
*
* @package Smarty
* @subpackage Compiler
diff --git a/libs/sysplugins/smarty_internal_resource_extends.php b/libs/sysplugins/smarty_internal_resource_extends.php
index 4f1f09ea..147b5851 100644
--- a/libs/sysplugins/smarty_internal_resource_extends.php
+++ b/libs/sysplugins/smarty_internal_resource_extends.php
@@ -118,6 +118,9 @@ class Smarty_Internal_Resource_Extends extends Smarty_Resource
*
* @return bool
*/
+ /**
+ * @return bool
+ */
public function checkTimestamps()
{
return false;
diff --git a/libs/sysplugins/smarty_internal_resource_file.php b/libs/sysplugins/smarty_internal_resource_file.php
index f8b361a9..9dcda7fc 100644
--- a/libs/sysplugins/smarty_internal_resource_file.php
+++ b/libs/sysplugins/smarty_internal_resource_file.php
@@ -112,6 +112,8 @@ class Smarty_Internal_Resource_File extends Smarty_Resource
*
* @param Smarty_Template_Source $source source object
* @param Smarty_Internal_Template $_template template object
+ *
+ * @throws \SmartyException
*/
public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template = null)
{
diff --git a/libs/sysplugins/smarty_internal_resource_stream.php b/libs/sysplugins/smarty_internal_resource_stream.php
index b4248fbb..f358db01 100644
--- a/libs/sysplugins/smarty_internal_resource_stream.php
+++ b/libs/sysplugins/smarty_internal_resource_stream.php
@@ -26,6 +26,7 @@ class Smarty_Internal_Resource_Stream extends Smarty_Resource_Recompiled
* @param Smarty_Internal_Template $_template template object
*
* @return void
+ * @throws \SmartyException
*/
public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template = null)
{
diff --git a/libs/sysplugins/smarty_internal_resource_string.php b/libs/sysplugins/smarty_internal_resource_string.php
index f2610d9d..0175d518 100644
--- a/libs/sysplugins/smarty_internal_resource_string.php
+++ b/libs/sysplugins/smarty_internal_resource_string.php
@@ -99,6 +99,9 @@ class Smarty_Internal_Resource_String extends Smarty_Resource
*
* @return bool
*/
+ /**
+ * @return bool
+ */
public function checkTimestamps()
{
return false;
diff --git a/libs/sysplugins/smarty_internal_runtime_cachemodify.php b/libs/sysplugins/smarty_internal_runtime_cachemodify.php
index a91874a9..dfbf7115 100644
--- a/libs/sysplugins/smarty_internal_runtime_cachemodify.php
+++ b/libs/sysplugins/smarty_internal_runtime_cachemodify.php
@@ -16,6 +16,9 @@ class Smarty_Internal_Runtime_CacheModify
* @param \Smarty_Template_Cached $cached
* @param \Smarty_Internal_Template $_template
* @param string $content
+ *
+ * @throws \Exception
+ * @throws \SmartyException
*/
public function cacheModifiedCheck(Smarty_Template_Cached $cached, Smarty_Internal_Template $_template, $content)
{
diff --git a/libs/sysplugins/smarty_internal_runtime_codeframe.php b/libs/sysplugins/smarty_internal_runtime_codeframe.php
index ceb386ff..fb1e9510 100644
--- a/libs/sysplugins/smarty_internal_runtime_codeframe.php
+++ b/libs/sysplugins/smarty_internal_runtime_codeframe.php
@@ -41,7 +41,7 @@ class Smarty_Internal_Runtime_CodeFrame
$properties[ 'cache_lifetime' ] = $_template->cache_lifetime;
}
$output = "<?php\n";
- $output .= "/* Smarty version {Smarty::SMARTY_VERSION}, created on " . strftime("%Y-%m-%d %H:%M:%S") .
+ $output .= "/* Smarty version {$properties[ 'version' ]}, created on " . strftime("%Y-%m-%d %H:%M:%S") .
"\n from \"" . str_replace('*/','* /',$_template->source->filepath) . "\" */\n\n";
$output .= "/* @var Smarty_Internal_Template \$_smarty_tpl */\n";
$dec = "\$_smarty_tpl->_decodeProperties(\$_smarty_tpl, " . var_export($properties, true) . ',' .
diff --git a/libs/sysplugins/smarty_internal_runtime_getincludepath.php b/libs/sysplugins/smarty_internal_runtime_getincludepath.php
index 00dbf7b5..54b1bb3d 100644
--- a/libs/sysplugins/smarty_internal_runtime_getincludepath.php
+++ b/libs/sysplugins/smarty_internal_runtime_getincludepath.php
@@ -36,7 +36,7 @@ class Smarty_Internal_Runtime_GetIncludePath
/**
* stream cache
*
- * @var string[]
+ * @var string[][]
*/
public $isFile = array();
/**
diff --git a/libs/sysplugins/smarty_internal_runtime_inheritance.php b/libs/sysplugins/smarty_internal_runtime_inheritance.php
index 289e3ba0..cca2c74a 100644
--- a/libs/sysplugins/smarty_internal_runtime_inheritance.php
+++ b/libs/sysplugins/smarty_internal_runtime_inheritance.php
@@ -103,6 +103,9 @@ class Smarty_Internal_Runtime_Inheritance
* @param null|string $template optional name of inheritance parent template
* @param null|string $uid uid of inline template
* @param null|string $func function call name of inline template
+ *
+ * @throws \Exception
+ * @throws \SmartyException
*/
public function endChild(Smarty_Internal_Template $tpl, $template = null, $uid = null, $func = null)
{
@@ -135,6 +138,8 @@ class Smarty_Internal_Runtime_Inheritance
* @param $className
* @param string $name
* @param int|null $tplIndex index of outer level {block} if nested
+ *
+ * @throws \SmartyException
*/
public function instanceBlock(Smarty_Internal_Template $tpl, $className, $name, $tplIndex = null)
{
@@ -203,7 +208,8 @@ class Smarty_Internal_Runtime_Inheritance
* @param \Smarty_Internal_Block $block
* @param boolean $returnContent flag if content shall be returned
*
- * @return null|string null or block content dependent on $returnContent
+ * @return null|string null or block content dependent on $returnContent
+ * @throws \SmartyException
*/
public function callChild(Smarty_Internal_Template $tpl, Smarty_Internal_Block $block, $returnContent = false)
{
diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php
index f950606d..15c79f6a 100644
--- a/libs/sysplugins/smarty_internal_template.php
+++ b/libs/sysplugins/smarty_internal_template.php
@@ -117,9 +117,11 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
public static $isCacheTplObj = array();
/**
- * Subtemplate Info Cache
+ * Sub template Info Cache
+ * - index name
+ * - value use count
*
- * @var string[]int[]
+ * @var int[]
*/
public static $subTplInfo = array();
@@ -170,6 +172,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
* @param null|bool $display true: display, false: fetch null: sub-template
*
* @return string
+ * @throws \Exception
* @throws \SmartyException
*/
public function render($no_output_filter = true, $display = null)
@@ -269,6 +272,8 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
* @param string $uid file dependency uid
* @param string $content_func function name
*
+ * @throws \Exception
+ * @throws \SmartyException
*/
public function _subTemplateRender($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $scope,
$forceTplCache, $uid = null, $content_func = null)
@@ -528,6 +533,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
* Get unique template id
*
* @return string
+ * @throws \SmartyException
*/
public function _getTemplateId()
{
diff --git a/libs/sysplugins/smarty_internal_templatebase.php b/libs/sysplugins/smarty_internal_templatebase.php
index 463c4b39..ca2b4496 100644
--- a/libs/sysplugins/smarty_internal_templatebase.php
+++ b/libs/sysplugins/smarty_internal_templatebase.php
@@ -117,6 +117,9 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data
* @param mixed $cache_id cache id to be used with this template
* @param mixed $compile_id compile id to be used with this template
* @param object $parent next higher level of Smarty variables
+ *
+ * @throws \Exception
+ * @throws \SmartyException
*/
public function display($template = null, $cache_id = null, $compile_id = null, $parent = null)
{
@@ -135,7 +138,9 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data
* @param mixed $compile_id compile id to be used with this template
* @param object $parent next higher level of Smarty variables
*
- * @return boolean cache status
+ * @return bool cache status
+ * @throws \Exception
+ * @throws \SmartyException
*/
public function isCached($template = null, $cache_id = null, $compile_id = null, $parent = null)
{
diff --git a/libs/sysplugins/smarty_internal_templatecompilerbase.php b/libs/sysplugins/smarty_internal_templatecompilerbase.php
index 8a38bb87..f34ce4ac 100644
--- a/libs/sysplugins/smarty_internal_templatecompilerbase.php
+++ b/libs/sysplugins/smarty_internal_templatecompilerbase.php
@@ -534,6 +534,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
* @param array $parameter
*
* @return string
+ * @throws \SmartyCompilerException
*/
public function compilePHPFunctionCall($name, $parameter)
{
@@ -662,7 +663,8 @@ abstract class Smarty_Internal_TemplateCompilerBase
* @param mixed $param2 optional parameter
* @param mixed $param3 optional parameter
*
- * @return string|bool compiled code or false
+ * @return bool|string compiled code or false
+ * @throws \SmartyCompilerException
*/
public function callTagCompiler($tag, $args, $param1 = null, $param2 = null, $param3 = null)
{
@@ -680,7 +682,8 @@ abstract class Smarty_Internal_TemplateCompilerBase
*
* @param string $tag tag name
*
- * @return Smarty_Internal_CompileBase|bool tag compiler object or false if not found
+ * @return bool|\Smarty_Internal_CompileBase tag compiler object or false if not found
+ * @throws \SmartyCompilerException
*/
public function getTagCompiler($tag)
{
@@ -708,6 +711,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
* @param string $plugin_type type of plugin
*
* @return string call name of function
+ * @throws \SmartyException
*/
public function getPlugin($plugin_name, $plugin_type)
{
@@ -772,7 +776,8 @@ abstract class Smarty_Internal_TemplateCompilerBase
* @param string $tag name of tag
* @param string $plugin_type type of plugin
*
- * @return boolean true if found
+ * @return bool true if found
+ * @throws \SmartyCompilerException
*/
public function getPluginFromDefaultHandler($tag, $plugin_type)
{
diff --git a/libs/sysplugins/smarty_internal_templatelexer.php b/libs/sysplugins/smarty_internal_templatelexer.php
index 06317c82..3da1a2da 100644
--- a/libs/sysplugins/smarty_internal_templatelexer.php
+++ b/libs/sysplugins/smarty_internal_templatelexer.php
@@ -250,11 +250,17 @@ class Smarty_Internal_Templatelexer
strpos(" \n\t\r", $this->value[ $this->compiler->getLdelLength() ]) !== false : false;
} // end function
+ /**
+ * @return mixed
+ */
public function yylex()
{
return $this->{'yylex' . $this->_yy_state}();
}
+ /**
+ * @param $state
+ */
public function yypushstate($state)
{
if ($this->yyTraceFILE) {
@@ -294,6 +300,9 @@ class Smarty_Internal_Templatelexer
}
}
+ /**
+ * @param $state
+ */
public function yybegin($state)
{
$this->_yy_state = $state;
@@ -306,6 +315,10 @@ class Smarty_Internal_Templatelexer
}
}
+ /**
+ * @return bool
+ * @throws \Exception
+ */
public function yylex1()
{
if (!isset($this->yy_global_pattern1)) {
@@ -366,6 +379,10 @@ class Smarty_Internal_Templatelexer
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
}
+ /**
+ * @return bool
+ * @throws \SmartyCompilerException
+ */
function yy_r1_2()
{
preg_match("/[*]{$this->compiler->getRdelPreg()}/", $this->data, $match, PREG_OFFSET_CAPTURE, $this->counter);
@@ -400,6 +417,9 @@ class Smarty_Internal_Templatelexer
$this->yypushstate(self::LITERAL);
} // end function
+ /**
+ * @return bool
+ */
function yy_r1_14()
{
$this->yypushstate(self::TAG);
@@ -416,6 +436,10 @@ class Smarty_Internal_Templatelexer
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
}
+ /**
+ * @return bool
+ * @throws \Exception
+ */
public function yylex2()
{
if (!isset($this->yy_global_pattern2)) {
@@ -548,6 +572,10 @@ class Smarty_Internal_Templatelexer
$this->taglineno = $this->line;
}
+ /**
+ * @return bool
+ * @throws \Exception
+ */
public function yylex3()
{
if (!isset($this->yy_global_pattern3)) {
@@ -609,6 +637,9 @@ class Smarty_Internal_Templatelexer
$this->yypopstate();
}
+ /**
+ * @return bool
+ */
function yy_r3_2()
{
$this->yypushstate(self::TAG);
@@ -836,6 +867,10 @@ class Smarty_Internal_Templatelexer
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
}
+ /**
+ * @return bool
+ * @throws \Exception
+ */
public function yylex4()
{
if (!isset($this->yy_global_pattern4)) {
@@ -913,6 +948,10 @@ class Smarty_Internal_Templatelexer
$this->token = Smarty_Internal_Templateparser::TP_LITERAL;
} // end function
+ /**
+ * @return bool
+ * @throws \Exception
+ */
public function yylex5()
{
if (!isset($this->yy_global_pattern5)) {
@@ -983,12 +1022,18 @@ class Smarty_Internal_Templatelexer
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
}
+ /**
+ * @return bool
+ */
function yy_r5_7()
{
$this->yypushstate(self::TAG);
return true;
}
+ /**
+ * @return bool
+ */
function yy_r5_9()
{
$this->yypushstate(self::TAG);
diff --git a/libs/sysplugins/smarty_internal_templateparser.php b/libs/sysplugins/smarty_internal_templateparser.php
index 65697f84..7f2bb322 100644
--- a/libs/sysplugins/smarty_internal_templateparser.php
+++ b/libs/sysplugins/smarty_internal_templateparser.php
@@ -1,10 +1,19 @@
<?php
+/**
+ * Class TP_yyToken
+ */
class TP_yyToken implements ArrayAccess
{
public $string = '';
public $metadata = array();
+ /**
+ * TP_yyToken constructor.
+ *
+ * @param $s
+ * @param array $m
+ */
public function __construct($s, $m = array())
{
if ($s instanceof TP_yyToken) {
@@ -20,21 +29,38 @@ class TP_yyToken implements ArrayAccess
}
}
+ /**
+ * @return string
+ */
public function __toString()
{
return $this->string;
}
+ /**
+ * @param mixed $offset
+ *
+ * @return bool
+ */
public function offsetExists($offset)
{
return isset($this->metadata[ $offset ]);
}
+ /**
+ * @param mixed $offset
+ *
+ * @return mixed
+ */
public function offsetGet($offset)
{
return $this->metadata[ $offset ];
}
+ /**
+ * @param mixed $offset
+ * @param mixed $value
+ */
public function offsetSet($offset, $value)
{
if ($offset === null) {
@@ -58,12 +84,18 @@ class TP_yyToken implements ArrayAccess
}
}
+ /**
+ * @param mixed $offset
+ */
public function offsetUnset($offset)
{
unset($this->metadata[ $offset ]);
}
}
+/**
+ * Class TP_yyStackEntry
+ */
class TP_yyStackEntry
{
public $stateno; /* The state-number */
@@ -1727,6 +1759,10 @@ class Smarty_Internal_Templateparser
$this->security = isset($this->smarty->security_policy) ? $this->smarty->security_policy : false;
$this->current_buffer = $this->root_buffer = new Smarty_Internal_ParseTree_Template();
} /* The parser's stack */
+ /**
+ * @param $yymajor
+ * @param $yypminor
+ */
public static function yy_destructor($yymajor, $yypminor)
{
switch ($yymajor) {
@@ -1777,6 +1813,10 @@ class Smarty_Internal_Templateparser
return new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp, true));
}
+ /**
+ * @param $TraceFILE
+ * @param $zTracePrompt
+ */
public function Trace($TraceFILE, $zTracePrompt)
{
if (!$TraceFILE) {
@@ -1794,6 +1834,11 @@ class Smarty_Internal_Templateparser
$this->yyTracePrompt = '<br>';
}
+ /**
+ * @param $tokenType
+ *
+ * @return mixed|string
+ */
public function tokenName($tokenType)
{
if ($tokenType === 0) {
@@ -1833,6 +1878,11 @@ class Smarty_Internal_Templateparser
}
}
+ /**
+ * @param $token
+ *
+ * @return array|mixed
+ */
public function yy_get_expected_tokens($token)
{
static $res3 = array();
@@ -1917,6 +1967,11 @@ class Smarty_Internal_Templateparser
return array_unique($expected);
}
+ /**
+ * @param $token
+ *
+ * @return bool
+ */
public function yy_is_expected_token($token)
{
static $res = array();
@@ -2006,6 +2061,11 @@ class Smarty_Internal_Templateparser
return true;
}
+ /**
+ * @param $iLookAhead
+ *
+ * @return int|mixed
+ */
public function yy_find_shift_action($iLookAhead)
{
$stateno = $this->yystack[ $this->yyidx ]->stateno;
@@ -2040,6 +2100,12 @@ class Smarty_Internal_Templateparser
}
}
+ /**
+ * @param $stateno
+ * @param $iLookAhead
+ *
+ * @return int|mixed
+ */
public function yy_find_reduce_action($stateno, $iLookAhead)
{
/* $stateno = $this->yystack[$this->yyidx]->stateno; */
@@ -2063,6 +2129,14 @@ class Smarty_Internal_Templateparser
}
#line 234 "../smarty/lexer/smarty_internal_templateparser.y"
+
+ /**
+ * @param $yyNewState
+ * @param $yyMajor
+ * @param $yypMinor
+ *
+ * @throws \SmartyCompilerException
+ */
public function yy_shift($yyNewState, $yyMajor, $yypMinor)
{
$this->yyidx++;
@@ -3356,6 +3430,11 @@ class Smarty_Internal_Templateparser
$this->_retvalue = new Smarty_Internal_ParseTree_DqContent($this->yystack[ $this->yyidx + 0 ]->minor);
}
+ /**
+ * @param $yyruleno
+ *
+ * @throws \SmartyCompilerException
+ */
public function yy_reduce($yyruleno)
{
if ($this->yyTraceFILE && $yyruleno >= 0
@@ -3407,6 +3486,12 @@ class Smarty_Internal_Templateparser
}
}
+ /**
+ * @param $yymajor
+ * @param $TOKEN
+ *
+ * @throws \SmartyCompilerException
+ */
public function yy_syntax_error($yymajor, $TOKEN)
{
#line 214 "../smarty/lexer/smarty_internal_templateparser.y"
@@ -3429,6 +3514,12 @@ class Smarty_Internal_Templateparser
$this->retvalue = $this->_retvalue;
}
+ /**
+ * @param $yymajor
+ * @param $yytokenvalue
+ *
+ * @throws \SmartyCompilerException
+ */
public function doParse($yymajor, $yytokenvalue)
{
$yyerrorhit = 0; /* True if yymajor has invoked an error */
diff --git a/libs/sysplugins/smarty_resource.php b/libs/sysplugins/smarty_resource.php
index 4aaafa4d..b76b9c78 100644
--- a/libs/sysplugins/smarty_resource.php
+++ b/libs/sysplugins/smarty_resource.php
@@ -133,6 +133,7 @@ abstract class Smarty_Resource
* @param string $template_resource template_resource to extract resource handler and name of
*
* @return string unique resource name
+ * @throws \SmartyException
*/
public static function getUniqueTemplateName($obj, $template_resource)
{
@@ -159,7 +160,8 @@ abstract class Smarty_Resource
* @param Smarty $smarty smarty object
* @param string $template_resource resource identifier
*
- * @return Smarty_Template_Source Source Object
+ * @return \Smarty_Template_Source Source Object
+ * @throws \SmartyException
*/
public static function source(Smarty_Internal_Template $_template = null,
Smarty $smarty = null,
@@ -239,6 +241,9 @@ abstract class Smarty_Resource
return basename(preg_replace('![^\w]+!', '_', $source->name));
}
+ /**
+ * @return bool
+ */
public function checkTimestamps()
{
return true;
diff --git a/libs/sysplugins/smarty_resource_recompiled.php b/libs/sysplugins/smarty_resource_recompiled.php
index 7e51d1b1..1465124c 100644
--- a/libs/sysplugins/smarty_resource_recompiled.php
+++ b/libs/sysplugins/smarty_resource_recompiled.php
@@ -85,6 +85,9 @@ abstract class Smarty_Resource_Recompiled extends Smarty_Resource
*
* @return bool
*/
+ /**
+ * @return bool
+ */
public function checkTimestamps()
{
return false;
diff --git a/libs/sysplugins/smarty_security.php b/libs/sysplugins/smarty_security.php
index 4f75f752..60abd2ef 100644
--- a/libs/sysplugins/smarty_security.php
+++ b/libs/sysplugins/smarty_security.php
@@ -676,7 +676,7 @@ class Smarty_Security
{
if ($security_class instanceof Smarty_Security) {
$smarty->security_policy = $security_class;
- return;
+ return $smarty;
} elseif (is_object($security_class)) {
throw new SmartyException("Class '" . get_class($security_class) . "' must extend Smarty_Security.");
}
@@ -690,7 +690,7 @@ class Smarty_Security
} else {
$smarty->security_policy = new $security_class($smarty);
}
- return;
+ return $smarty;
}
/**
* Start template processing
diff --git a/libs/sysplugins/smarty_template_cached.php b/libs/sysplugins/smarty_template_cached.php
index 58f0daf2..59eb09ad 100644
--- a/libs/sysplugins/smarty_template_cached.php
+++ b/libs/sysplugins/smarty_template_cached.php
@@ -83,6 +83,8 @@ class Smarty_Template_Cached extends Smarty_Template_Resource_Base
* create Cached Object container
*
* @param Smarty_Internal_Template $_template template object
+ *
+ * @throws \SmartyException
*/
public function __construct(Smarty_Internal_Template $_template)
{
diff --git a/libs/sysplugins/smarty_template_compiled.php b/libs/sysplugins/smarty_template_compiled.php
index b45cd8b1..d82d23b1 100644
--- a/libs/sysplugins/smarty_template_compiled.php
+++ b/libs/sysplugins/smarty_template_compiled.php
@@ -201,7 +201,8 @@ class Smarty_Template_Compiled extends Smarty_Template_Resource_Base
* @param Smarty_Internal_Template $_template template object
* @param string $code compiled code
*
- * @return boolean success
+ * @return bool success
+ * @throws \SmartyException
*/
public function write(Smarty_Internal_Template $_template, $code)
{
diff --git a/libs/sysplugins/smarty_template_resource_base.php b/libs/sysplugins/smarty_template_resource_base.php
index 6cc008a1..eb262ab0 100644
--- a/libs/sysplugins/smarty_template_resource_base.php
+++ b/libs/sysplugins/smarty_template_resource_base.php
@@ -80,9 +80,11 @@ abstract class Smarty_Template_Resource_Base
public $required_plugins = array();
/**
- * Included subtemplates
+ * Included sub templates
+ * - index name
+ * - value use count
*
- * @var array
+ * @var int[]
*/
public $includes = array();
diff --git a/libs/sysplugins/smarty_template_source.php b/libs/sysplugins/smarty_template_source.php
index fdb3deaa..4868706c 100644
--- a/libs/sysplugins/smarty_template_source.php
+++ b/libs/sysplugins/smarty_template_source.php
@@ -126,12 +126,13 @@ class Smarty_Template_Source
/**
* create Source Object container
*
- * @param Smarty_Resource $handler Resource Handler this source object communicates with
- * @param Smarty $smarty Smarty instance this source object belongs to
- * @param string $resource full template_resource
- * @param string $type type of resource
- * @param string $name resource name
+ * @param Smarty $smarty Smarty instance this source object belongs to
+ * @param string $resource full template_resource
+ * @param string $type type of resource
+ * @param string $name resource name
*
+ * @throws \SmartyException
+ * @internal param \Smarty_Resource $handler Resource Handler this source object communicates with
*/
public function __construct(Smarty $smarty, $resource, $type, $name)
{
@@ -202,6 +203,7 @@ class Smarty_Template_Source
* Get source content
*
* @return string
+ * @throws \SmartyException
*/
public function getContent()
{
diff --git a/libs/sysplugins/smarty_undefined_variable.php b/libs/sysplugins/smarty_undefined_variable.php
index 88bc6f68..67e8714f 100644
--- a/libs/sysplugins/smarty_undefined_variable.php
+++ b/libs/sysplugins/smarty_undefined_variable.php
@@ -7,22 +7,18 @@
* @package Smarty
* @subpackage Template
*/
-class Smarty_Undefined_Variable
+class Smarty_Undefined_Variable extends Smarty_Variable
{
/**
- * Returns FALSE for 'nocache' and NULL otherwise.
+ * Returns null for not existing properties
*
* @param string $name
*
- * @return bool
+ * @return null
*/
public function __get($name)
{
- if ($name == 'nocache') {
- return false;
- } else {
return null;
- }
}
/**
diff --git a/libs/sysplugins/smartycompilerexception.php b/libs/sysplugins/smartycompilerexception.php
index 763bab15..f7ad39b9 100644
--- a/libs/sysplugins/smartycompilerexception.php
+++ b/libs/sysplugins/smartycompilerexception.php
@@ -7,6 +7,9 @@
*/
class SmartyCompilerException extends SmartyException
{
+ /**
+ * @return string
+ */
public function __toString()
{
return ' --> Smarty Compiler: ' . $this->message . ' <-- ';
diff --git a/libs/sysplugins/smartyexception.php b/libs/sysplugins/smartyexception.php
index 431d8f8e..7f7b9aa4 100644
--- a/libs/sysplugins/smartyexception.php
+++ b/libs/sysplugins/smartyexception.php
@@ -9,6 +9,9 @@ class SmartyException extends Exception
{
public static $escape = false;
+ /**
+ * @return string
+ */
public function __toString()
{
return ' --> Smarty: ' . (self::$escape ? htmlentities($this->message) : $this->message) . ' <-- ';