Showing 272 of 370 total issues
Method xoops_module_update_mylinks_base
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoops_module_update_mylinks_base(XoopsModule $xoopsModule, $prev_version)
{
$minUpgradeFrom = '0.0.0'; //minimum version of module supported for upgrade
$success = false;
Method b_system_notification_show
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_system_notification_show()
{
global $xoopsConfig, $xoopsUser, $xoopsModule;
include_once XOOPS_ROOT_PATH . '/include/notification_functions.php';
include_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/notification.php';
Function MakeFontDescriptor
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function MakeFontDescriptor($fm,$symbolic)
{
//Ascent
$asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000);
$fd="array('Ascent'=>".$asc;
- 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 extract_post_recursive
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function extract_post_recursive($key_name, $tmp_array)
{
$table = '';
$form = '';
foreach ($tmp_array as $key => $val) {
- 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 MakeFontDescriptor
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MakeFontDescriptor($fm,$symbolic)
{
//Ascent
$asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000);
$fd="array('Ascent'=>".$asc;
Method xoops_module_pre_install_mylinks_base
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoops_module_pre_install_mylinks_base(&$xoopsModule)
{
global $xoopsDB;
$retVal = true;
Method b_system_main_show
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_system_main_show()
{
global $xoopsUser, $xoopsModule;
$block = array();
$block['lang_home'] = _MB_SYSTEM_HOME;
Method GetCode
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function GetCode(&$data, $bInit)
{
if($bInit) {
$this->CurBit = 0;
$this->LastBit = 0;
Method WriteHTML
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function WriteHTML($html,$scale)
{
// $html=strip_tags($html,"<b><u><i><a><img><p><br><strong><em><font><tr><blockquote>"); //remove all unsupported tags
$html=str_replace("\n",' ',$html); //replace carriage returns by spaces
$a=preg_split('/<(.*)>/U',$html,-1,PREG_SPLIT_DELIM_CAPTURE); //explodes the string
Method importCats
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function importCats()
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts;
$ok = MylinksUtility::mylinks_cleanVars($_POST, 'ok', 0, 'int', array('min' => 0, 'max' => 1));
Method myblocksadmin_update_blockinstance
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function myblocksadmin_update_blockinstance(
$id,
$bside,
$bweight,
$bvisible,
Method approve
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function approve()
{
global $xoopsDB, $myts, $xoopsModule;
$lid = MylinksUtility::mylinks_cleanVars($_POST, 'lid', 0, 'int', array('min' => 0));
Method renderImageNav
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function renderImageNav($offset = 5)
{
if ($this->total < $this->perpage) {
return;
}
Method listNewLinks
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function listNewLinks()
{
global $xoopsDB, $myts, $myCatTree, $xoopsModule;
// List links waiting for validation
$linkimg_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/images/shots/');
Function _beginpage
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function _beginpage($orientation)
{
$this->page++;
$this->pages[$this->page]='';
$this->state=2;
- 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_system_comments_show
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function b_system_comments_show($options)
{
$block = array();
include_once XOOPS_ROOT_PATH . '/include/comment_constants.php';
$commentHandler = xoops_getHandler('comment');
- 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 PutImage
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function PutImage($url,$scale)
{
if($scale<0) $scale=0;
//$scale<=0: put NO image inside the pdf!
if($scale>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 setShotSize
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function setShotSize($sz)
{
if (isset($sz)) {
if (is_array($sz)) {
if (array_key_exists('width', $sz)) {
- 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 render
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function render()
{
$ret = '';
if (count($this->_appendix) > 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 render
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function render()
{
global $xoopsGTicket;
// load all child ids for javascript codes
- 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"