for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* XOOPS year Smarty plug-in -- returns the current year
*
* @copyright XOOPS Project (http://xoops.org)
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @author Richard Griffith <[email protected]>
*/
* Insert the current year
* @param $params
* @param $smarty
* @return null
function smarty_function_year($params, &$smarty)
$smarty
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
function smarty_function_year($params, /** @scrutinizer ignore-unused */ &$smarty)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$params
function smarty_function_year(/** @scrutinizer ignore-unused */ $params, &$smarty)
{
$time = new DateTime();
echo $time->format('Y');
}
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.