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
File makepdf_class.php
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// $Id: makepdf_class.php 8112 2011-11-06 13:41:14Z beckmi $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
Method OpenTag
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function OpenTag($tag,$attr,$scale)
{
//Opening tag
switch($tag){
case 'STRONG':
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 _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;
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 _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
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
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 CloseTag
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function CloseTag($tag)
{
//Closing tag
if($tag=='STRONG')
$tag='B';
- 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"