Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#623 Static return type in docblocks; for better IDE support chaining #627

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 11 additions & 11 deletions libs/Smarty.class.php
Expand Up @@ -730,7 +730,7 @@ public function templateExists($resource_name)
*
* @param string|Smarty_Security $security_class if a string is used, it must be class-name
*
* @return Smarty current Smarty instance for chaining
* @return static current Smarty instance for chaining
* @throws \SmartyException
*/
public function enableSecurity($security_class = null)
Expand All @@ -742,7 +742,7 @@ public function enableSecurity($security_class = null)
/**
* Disable security
*
* @return Smarty current Smarty instance for chaining
* @return static current Smarty instance for chaining
*/
public function disableSecurity()
{
Expand All @@ -757,7 +757,7 @@ public function disableSecurity()
* @param string $key of the array element to assign the template dir to
* @param bool $isConfig true for config_dir
*
* @return Smarty current Smarty instance for chaining
* @return static current Smarty instance for chaining
*/
public function addTemplateDir($template_dir, $key = null, $isConfig = false)
{
Expand Down Expand Up @@ -824,7 +824,7 @@ public function getTemplateDir($index = null, $isConfig = false)
* @param string|array $template_dir directory(s) of template sources
* @param bool $isConfig true for config_dir
*
* @return \Smarty current Smarty instance for chaining
* @return static current Smarty instance for chaining
*/
public function setTemplateDir($template_dir, $isConfig = false)
{
Expand All @@ -845,7 +845,7 @@ public function setTemplateDir($template_dir, $isConfig = false)
* @param string|array $config_dir directory(s) of config sources
* @param mixed $key key of the array element to assign the config dir to
*
* @return Smarty current Smarty instance for chaining
* @return static current Smarty instance for chaining
*/
public function addConfigDir($config_dir, $key = null)
{
Expand All @@ -869,7 +869,7 @@ public function getConfigDir($index = null)
*
* @param $config_dir
*
* @return Smarty current Smarty instance for chaining
* @return static current Smarty instance for chaining
*/
public function setConfigDir($config_dir)
{
Expand All @@ -881,7 +881,7 @@ public function setConfigDir($config_dir)
*
* @param null|array|string $plugins_dir
*
* @return Smarty current Smarty instance for chaining
* @return static current Smarty instance for chaining
*/
public function addPluginsDir($plugins_dir)
{
Expand Down Expand Up @@ -922,7 +922,7 @@ public function getPluginsDir()
*
* @param string|array $plugins_dir directory(s) of plugins
*
* @return Smarty current Smarty instance for chaining
* @return static current Smarty instance for chaining
*/
public function setPluginsDir($plugins_dir)
{
Expand All @@ -949,7 +949,7 @@ public function getCompileDir()
*
* @param string $compile_dir directory to store compiled templates in
*
* @return Smarty current Smarty instance for chaining
* @return static current Smarty instance for chaining
*/
public function setCompileDir($compile_dir)
{
Expand Down Expand Up @@ -977,7 +977,7 @@ public function getCacheDir()
*
* @param string $cache_dir directory to store cached templates in
*
* @return Smarty current Smarty instance for chaining
* @return static current Smarty instance for chaining
*/
public function setCacheDir($cache_dir)
{
Expand Down Expand Up @@ -1325,7 +1325,7 @@ public function testInstall(&$errors = null)
/**
* Get Smarty object
*
* @return Smarty
* @return static
*/
public function _getSmartyObj()
{
Expand Down
10 changes: 5 additions & 5 deletions libs/sysplugins/smarty_internal_data.php
Expand Up @@ -91,7 +91,7 @@ public function __construct()
* @param mixed $value the value to assign
* @param boolean $nocache if true any output of this variable will be not cached
*
* @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for
* @return static current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for
* chaining
*/
public function assign($tpl_var, $value = null, $nocache = false)
Expand Down Expand Up @@ -129,7 +129,7 @@ public function assign($tpl_var, $value = null, $nocache = false)
* @param bool $nocache if true any output of this variable will
* be not cached
*
* @return \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty
* @return static
*/
public function append($tpl_var, $value = null, $merge = false, $nocache = false)
{
Expand All @@ -143,7 +143,7 @@ public function append($tpl_var, $value = null, $merge = false, $nocache = false
* @param mixed $value the value to assign
* @param boolean $nocache if true any output of this variable will be not cached
*
* @return \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty
* @return static
*/
public function assignGlobal($varName, $value = null, $nocache = false)
{
Expand All @@ -157,7 +157,7 @@ public function assignGlobal($varName, $value = null, $nocache = false)
* @param mixed &$value the referenced value to append
* @param boolean $merge flag if array elements shall be merged
*
* @return \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty
* @return static
*/
public function appendByRef($tpl_var, &$value, $merge = false)
{
Expand All @@ -171,7 +171,7 @@ public function appendByRef($tpl_var, &$value, $merge = false)
* @param $value
* @param boolean $nocache if true any output of this variable will be not cached
*
* @return \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty
* @return static
*/
public function assignByRef($tpl_var, &$value, $nocache = false)
{
Expand Down