diff --git a/src/Smarty.php b/src/Smarty.php index 18ff52624..5a9654b69 100644 --- a/src/Smarty.php +++ b/src/Smarty.php @@ -535,8 +535,6 @@ public function __construct() { /** * Load an additional extension. * - * @param Base $extension - * * @return void */ public function addExtension(ExtensionInterface $extension) { @@ -582,7 +580,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 \Smarty\Exception */ public function enableSecurity($security_class = null) { @@ -593,7 +591,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() { $this->security_policy = null; @@ -607,7 +605,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) { if ($isConfig) { @@ -672,7 +670,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) { if ($isConfig) { @@ -692,7 +690,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) { return $this->addTemplateDir($config_dir, $key, true); @@ -714,7 +712,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) { return $this->setTemplateDir($config_dir, true); @@ -788,7 +786,7 @@ public function unregisterPlugin($type, $name) { * * @param null|array|string $plugins_dir * - * @return Smarty current Smarty instance for chaining + * @return static current Smarty instance for chaining * @deprecated since 5.0 */ public function addPluginsDir($plugins_dir) { @@ -821,7 +819,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 * @deprecated since 5.0 */ public function setPluginsDir($plugins_dir) { @@ -882,7 +880,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) { $this->_normalizeDir('compile_dir', $compile_dir); @@ -908,7 +906,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) { $this->_normalizeDir('cache_dir', $cache_dir); @@ -1171,7 +1169,7 @@ public function testInstall(&$errors = null) { /** * Get Smarty object * - * @return Smarty + * @return static */ public function getSmarty() { return $this; @@ -1844,7 +1842,7 @@ public function loadFilter($type, $name) { * @param string $type filter type * @param string $name filter name * - * @return TemplateBase + * @return static * @throws \Smarty\Exception * @api Smarty::unloadFilter() * @@ -1890,7 +1888,7 @@ public function getCachingType(): string { * @param string $name name of resource type * @param Base $resource_handler * - * @return Smarty + * @return static * * @api Smarty::registerCacheResource() * @@ -1911,7 +1909,7 @@ public function registerCacheResource($name, \Smarty\Cacheresource\Base $resourc * * @param $name * - * @return Smarty + * @return static * @api Smarty::unregisterCacheResource() * * @deprecated since 5.0 @@ -1944,7 +1942,7 @@ private function activateBCCacheResource() { * @param callable $callback * @param string|null $name optional filter name * - * @return TemplateBase + * @return static * @throws \Smarty\Exception * * @api Smarty::registerFilter() @@ -2003,7 +2001,7 @@ private function _getFilterName($callable) { * @param string $type filter type * @param callback|string $name the name previously used in ::registerFilter * - * @return TemplateBase + * @return static * @throws \Smarty\Exception * @api Smarty::unregisterFilter() * @@ -2040,7 +2038,7 @@ public function unregisterFilter($type, $name) { * @param array|string $modifiers modifier or list of modifiers * to add * - * @return Smarty + * @return static * @api Smarty::addDefaultModifiers() * */ @@ -2070,7 +2068,7 @@ public function getDefaultModifiers() { * @param array|string $modifiers modifier or list of modifiers * to set * - * @return TemplateBase + * @return static * @api Smarty::setDefaultModifiers() * */ diff --git a/src/TemplateBase.php b/src/TemplateBase.php index 0b7f212c1..3674edf7c 100644 --- a/src/TemplateBase.php +++ b/src/TemplateBase.php @@ -73,7 +73,7 @@ abstract class TemplateBase extends Data { * @param bool $format smarty argument format, else traditional * @param array $block_methods list of block-methods * - * @return \Smarty|\Smarty\Template + * @return static * @throws \Smarty\Exception * * @api Smarty::registerObject() @@ -113,7 +113,7 @@ public function registerObject( * * @param string $object_name name of object * - * @return TemplateBase + * @return static * @api Smarty::unregisterObject() * */ @@ -251,7 +251,7 @@ public function getLiterals() { * @param array|string $literals literal or list of literals * to addto add * - * @return TemplateBase + * @return static * @throws \Smarty\Exception * @api Smarty::addLiterals() * @@ -269,7 +269,7 @@ public function addLiterals($literals = null) { * @param array|string $literals literal or list of literals * to setto set * - * @return TemplateBase + * @return static * @throws \Smarty\Exception * @api Smarty::setLiterals() * @@ -312,7 +312,7 @@ private function _setLiterals(Smarty $smarty, $literals) { * @param string $class_impl the referenced PHP class to * register * - * @return TemplateBase + * @return static * @throws \Smarty\Exception * @api Smarty::registerClass() * @@ -333,7 +333,7 @@ public function registerClass($class_name, $class_impl) { * * @param callable $callback class/method name * - * @return TemplateBase + * @return static * @throws Exception if $callback is not callable * @api Smarty::registerDefaultConfigHandler() * @@ -353,7 +353,7 @@ public function registerDefaultConfigHandler($callback) { * * @param callable $callback class/method name * - * @return TemplateBase + * @return static * @throws Exception if $callback is not callable * @api Smarty::registerDefaultTemplateHandler() * @@ -374,7 +374,7 @@ public function registerDefaultTemplateHandler($callback) { * @param string $name name of resource type * @param \Smarty\Resource\BasePlugin $resource_handler instance of Smarty\Resource\BasePlugin * - * @return \Smarty\Smarty|\Smarty\Template + * @return static * * @api Smarty::registerResource() */ @@ -389,7 +389,7 @@ public function registerResource($name, \Smarty\Resource\BasePlugin $resource_ha * * @param string $type name of resource type * - * @return TemplateBase + * @return static * @api Smarty::unregisterResource() * */ @@ -406,7 +406,7 @@ public function unregisterResource($type) { * * @param string $tpl_name * - * @return TemplateBase + * @return static * @throws Exception if file is not readable * @api Smarty::setDebugTemplate() *