Showing 272 of 370 total issues
Function AddFont
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
function AddFont($family,$style='',$file='')
{
//Add a TrueType or Type1 font
$family=strtolower($family);
if($file=='')
- 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 29 (exceeds 5 allowed). Consider refactoring. Open
public function render($diff)
{
$xi = $yi = 1;
$block = false;
$context = array();
- 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 MultiCell
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MultiCell($w,$h,$txt,$border=0,$align='J',$fill=0)
{
//Output text with automatic or explicit line breaks
$cw=&$this->CurrentFont['cw'];
if($w==0)
Method _putfonts
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _putfonts()
{
$nf=$this->n;
foreach($this->diffs as $diff)
{
Function _putpages
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
function _putpages()
{
$nb=$this->page;
if(!empty($this->AliasNbPages))
{
- 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 getPng
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
function getPng($bgColor)
{
$out = '';
if(!$this->m_bLoaded) {
- 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_waiting_show
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
function b_system_waiting_show()
{
global $xoopsUser;
$xoopsDB = XoopsDatabaseFactory::getDatabaseConnection();
$moduleHandler = xoops_getHandler('module');
- 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 SJISMultiCell
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
function SJISMultiCell($w,$h,$txt,$border=0,$align='L',$fill=0)
{
//Output text with automatic or explicit line breaks
$cw=&$this->CurrentFont['cw'];
if($w==0)
Function _putimages
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
function _putimages()
{
$filter= $this->compress ? '/Filter /FlateDecode ' : '';
reset($this->images);
while(list($file,$info)=each($this->images))
- 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 WriteHTML
has a Cognitive Complexity of 26 (exceeds 5 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
- 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 ReadAFM
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ReadAFM($file,&$map)
{
//Read a font metric file
$a=file($file);
if(empty($a))
Method SJISWrite
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
function SJISWrite($h,$txt,$link)
{
//SJIS version of Write()
$cw=&$this->CurrentFont['cw'];
$w=$this->w-$this->rMargin-$this->x;
Function importCats
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
function importCats()
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts;
$ok = MylinksUtility::mylinks_cleanVars($_POST, 'ok', 0, 'int', array('min' => 0, 'max' => 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 xoops_module_update_mylinks_base
has a Cognitive Complexity of 25 (exceeds 5 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;
- 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 FPDF
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
function FPDF($orientation='P',$unit='mm',$format='A4')
{
//Some checks
$this->_dochecks();
//Initialization of properties
Method LZWCommand
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
function LZWCommand(&$data, $bInit)
{
if($bInit) {
$this->SetCodeSize = ord($data{0});
$data = substr($data, 1);
Method MBMultiCell
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MBMultiCell($w,$h,$txt,$border=0,$align='L',$fill=0)
{
//Multi-byte version of MultiCell()
$cw=&$this->CurrentFont['cw'];
if($w==0)
Method MBMultiCell
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MBMultiCell($w,$h,$txt,$border=0,$align='L',$fill=0)
{
//Multi-byte version of MultiCell()
$cw=&$this->CurrentFont['cw'];
if($w==0)
Method _putfonts
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _putfonts()
{
$nf=$this->n;
foreach($this->diffs as $diff)
{
Method _putfonts
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _putfonts()
{
$nf=$this->n;
foreach($this->diffs as $diff)
{