Showing 272 of 370 total issues
Method SetFont
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function SetFont($family,$style='',$size=0)
{
//Select a font; size given in points
global $fpdf_charwidths;
Method b_system_info_show
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_system_info_show($options)
{
global $xoopsConfig, $xoopsUser;
$xoopsDB = XoopsDatabaseFactory::getDatabaseConnection();
$myts = MyTextSanitizer::getInstance();
Method linksConfigMenu
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function linksConfigMenu()
{
global $xoopsDB, $myts, $myCatTree, $xoopsModule;
$mylinksCatHandler = xoops_getModuleHandler('category', $xoopsModule->getVar('dirname'));
Method render
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
global $xoopsGTicket;
// load all child ids for javascript codes
Function b_system_online_show
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function b_system_online_show()
{
global $xoopsUser, $xoopsModule;
$onlineHandler = xoops_getHandler('online');
mt_srand((double)microtime() * 1000000);
- 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 listBrokenLinks
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function listBrokenLinks()
{
global $xoopsDB, $xoopsModule, $pathIcon16, $myts;
$result = $xoopsDB->query('SELECT * FROM ' . $xoopsDB->prefix('mylinks_broken') . ' GROUP BY lid ORDER BY reportid DESC');
- 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 xoops_module_pre_install_mylinks_base
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function xoops_module_pre_install_mylinks_base(&$xoopsModule)
{
global $xoopsDB;
$retVal = true;
- 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_system_online_show
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_system_online_show()
{
global $xoopsUser, $xoopsModule;
$onlineHandler = xoops_getHandler('online');
mt_srand((double)microtime() * 1000000);
Method PutImage
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function PutImage($url,$scale)
{
if($scale<0) $scale=0;
//$scale<=0: put NO image inside the pdf!
if($scale>0){
Method GoogleCH
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function GoogleCH($url, $length = null, $init = GOOGLE_MAGIC)
{
if (null === $length) {
$length = count($url);
}
Method _parsegif
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _parsegif($file)
{
require_once 'gif.php'; //GIF class in pure PHP from Yamasoft (http://www.yamasoft.com/php-gif.zip)
$h=0;
Method render
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render($diff)
{
$xi = $yi = 1;
$block = false;
$context = array();
Function _parsegif
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function _parsegif($file)
{
require_once 'gif.php'; //GIF class in pure PHP from Yamasoft (http://www.yamasoft.com/php-gif.zip)
$h=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 OpenTag
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function OpenTag($tag,$attr,$scale)
{
//Opening tag
switch($tag){
case 'STRONG':
- 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 GetCode
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function GetCode(&$data, $bInit)
{
if($bInit) {
$this->CurBit = 0;
$this->LastBit = 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 _compareseq
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function _compareseq($xoff, $xlim, $yoff, $ylim)
{
/* Slide down the bottom initial diagonal. */
while ($xoff < $xlim && $yoff < $ylim && $this->xv[$xoff] == $this->yv[$yoff]) {
++$xoff;
- 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 _putimages
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _putimages()
{
$filter= $this->compress ? '/Filter /FlateDecode ' : '';
reset($this->images);
while(list($file,$info)=each($this->images))
Method mylinks_notify_iteminfo
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function mylinks_notify_iteminfo($category, $item_id)
{
global $xoopsModule, $xoopsModuleConfig, $xoopsConfig, $xoopsDB;
$dirname = basename(dirname(__DIR__));
Method AddFont
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function AddFont($family,$style='',$file='')
{
//Add a TrueType or Type1 font
$family=strtolower($family);
if($file=='')
Method Image
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Image($file,$x,$y,$w=0,$h=0,$type='',$link='')
{
//Put an image on the page
if(!isset($this->images[$file]))
{