for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* NewBB 5.0x, the forum module for XOOPS project
*
* @copyright XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @author Taiwen Jiang (phppp or D.J.) <[email protected]>
* @since 4.00
* @package module::newbb
*/
defined('NEWBB_FUNCTIONS_INI') || require __DIR__ . '/functions.ini.php';
define('NEWBB_FUNCTIONS_TOPIC_LOADED', true);
if (!defined('NEWBB_FUNCTIONS_TOPIC')) {
define('NEWBB_FUNCTIONS_TOPIC', 1);
* Create full title of a topic
* the title is composed of [type_name] if type_id is greater than 0 plus topic Title
* @param $topicTitle
* @param null $prefixName
$prefixName
null
* @param null $prefixColor
$prefixColor
* @return string
function newbbGetTopicTitle($topicTitle, $prefixName = null, $prefixColor = null)
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
function newbbGetTopicTitle($topicTitle, $prefixName = null, /** @scrutinizer ignore-unused */ $prefixColor = null)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
function newbbGetTopicTitle($topicTitle, /** @scrutinizer ignore-unused */ $prefixName = null, $prefixColor = null)
{
return getTopicTitle($topicTitle, $prefixName = null, $prefixColor = null);
}
function getTopicTitle($topicTitle, $prefixName = null, $prefixColor = null)
if (empty($prefixName)) {
return $topicTitle;
$topicPrefix = $prefixColor ? '<em style="font-style: normal; color: ' . $prefixColor . ';">[' . $prefixName . ']</em> ' : '[' . $prefixName . '] ';
false
return $topicPrefix . $topicTitle;