Showing 181 of 181 total issues
Function rrmdir
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function rrmdir($src)
{
// Only continue if user is a 'global' Admin
if (!($GLOBALS['xoopsUser'] instanceof \XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
return false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function b_gwiki_linkshere_show
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function b_gwiki_linkshere_show($options)
{
global $xoTheme, $xoopsDB;
$block = false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function b_gwiki_recentblock_show
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function b_gwiki_recentblock_show($options)
{
global $xoopsDB, $xoTheme;
$block = false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method b_gwiki_pagesettoc_show
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_gwiki_pagesettoc_show($options)
{
global $xoTheme;
$block = false;
Method showPage
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function showPage($page, $id)
{
global $xoopsDB, $wikiPage, $xoTheme;
$helper = Helper::getInstance();
Method resetPage
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function resetPage()
{
$this->gwiki_id = null;
$this->keyword = '';
$this->display_keyword = '';
Method loadTableFromArrayWithReplace
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function loadTableFromArrayWithReplace($table, $data, $search, $replace)
{
/** @var \XoopsMySQLDatabase $db */
$db = \XoopsDatabaseFactory::getDatabaseConnection();
Method galleryForm
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function galleryForm()
{
global $wikiPage, $xoopsTpl;
$helper = Helper::getInstance();
Method b_gwiki_teaserblock_edit
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_gwiki_teaserblock_edit($options)
{
$form = '';
$form .= _MB_GWIKI_SHOW_FULL_PAGE . ' <input type="radio" name="options[0]" value="1" ';
if ($options[0]) {
Method getServerStats
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getServerStats()
{
//mb $wfdownloads = WfdownloadsWfdownloads::getInstance();
$moduleDirName = \basename(\dirname(__DIR__, 2));
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
Method getPlain
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getPlain($count, $loremipsum, $returnStr = true)
{
$words = [];
$this->getWords($words, $count, $loremipsum);
//print_r($words);
Method doImportText
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function doImportText($page, $dir)
{
$import = '';
$pathname = XOOPS_ROOT_PATH . '/uploads/' . $dir . '/';
if (isset($_POST['xoops_upload_file'][0])) {
Method prefixForm
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function prefixForm($row, $action)
{
if (empty($row)) {
return false;
}
Method convertEntities
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function convertEntities($body)
{
// convert some entites
$sym = [];
$ent = [];
Method renderBox
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function renderBox($matches)
{
$type = $matches[1];
$title = $matches[2];
$body = $matches[3];
Function adminTableEnd
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function adminTableEnd($links)
{
echo '</table>';
if (!empty($links)) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _printDiff
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function _printDiff($c, $s1, $s2, $i, $j)
{
$diff = '';
if ($i >= 0 && $j >= 0 && $s1[$i] === $s2[$j]) {
$diff .= $this->_printDiff($c, $s1, $s2, $i - 1, $j - 1);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _lsm
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function _lsm($s1, $s2)
{
$mStart = 0;
$mEnd = \count($s1) - 1;
$nStart = 0;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function fetchPageSet
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function fetchPageSet($page)
{
global $xoopsDB, $wikiPage, $page_set_home, $display_keyword;
$q_page = $wikiPage->escapeForDB($page);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function gwiki_search
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function gwiki_search($queryarray, $andor, $limit, $offset, $userid, $prefix = null)
{
global $xoopsDB;
$dir = \basename(\dirname(__DIR__));
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"