Showing 283 of 379 total issues
Function attachAll
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
protected function attachAll($disposition_type, $boundary)
{
// Return text of body
$mime = [];
$cidUniq = [];
- 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 admin.php
has 479 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* ****************************************************************************
* XNEWSLETTER - MODULE FOR XOOPS
* Copyright (c) 2007 - 2012
File admin.php
has 478 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* ****************************************************************************
* XNEWSLETTER - MODULE FOR XOOPS
* Copyright (c) 2007 - 2012
File maintenance.php
has 475 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* ****************************************************************************
* - A Project by Developers TEAM For Xoops - ( https://xoops.org )
* ****************************************************************************
Function xnewsletter_createTasks
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
function xnewsletter_createTasks($op, $letter_id, $xn_send_in_packages, $xn_send_in_packages_time)
{
global $xoopsUser, $xoopsDB;
$helper = Xnewsletter\Helper::getInstance();
- 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 smtpConnect
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
public function smtpConnect($options = null)
{
if (null === $this->smtp) {
$this->smtp = $this->getSMTPInstance();
}
- 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 createBody
has 168 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createBody()
{
$body = '';
//Create unique IDs and preset boundaries
$this->uniqueid = $this->generateId();
Function tln_fixurl
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
function tln_fixurl($attname, &$attvalue, $trans_image_path, $block_external_images)
{
$sQuote = '"';
$attvalue = trim($attvalue);
if ($attvalue && ('"' == $attvalue[0] || "'" == $attvalue[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 getForm
has 148 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getForm($action = false, $admin_aerea = false)
{
global $xoopsDB, $xoopsUser, $pathImageIcon;
if (false === $action) {
Function getSearchForm
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function getSearchForm($plugin, $action_after_read = 1, $limitcheck = 0, $action = false)
{
global $xoopsDB;
if (false === $action) {
- 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 xoops_version.php
has 410 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* ****************************************************************************
* - A Project by Developers TEAM For Xoops - ( https://xoops.org )
* ****************************************************************************
File task.inc.php
has 408 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* ****************************************************************************
* - A Project by Developers TEAM For Xoops - ( https://xoops.org )
* ****************************************************************************
Function tln_fixstyle
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
{
// workaround for </style> in between comments
$content = '';
$sToken = '';
- 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 tln_getnxtag
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
function tln_getnxtag($body, $offset)
{
if ($offset > mb_strlen($body)) {
return false;
}
Method xnewsletter_emailSize
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xnewsletter_emailSize($letter_id = 0)
{
// require_once XNEWSLETTER_ROOT_PATH . '/class/class.xnewslettermailer.php';
global $XoopsTpl;
$helper = Xnewsletter\Helper::getInstance();
Method xnewsletter_printPage
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xnewsletter_printPage($content)
{
global $xoopsConfig, $xoops_meta_keywords, $xoops_meta_description;
$myts = \MyTextSanitizer::getInstance(); ?>
<!DOCTYPE html>
Function msgHTML
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function msgHTML($message, $basedir = '', $advanced = false)
{
preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images);
if (array_key_exists(2, $images)) {
if (mb_strlen($basedir) > 1 && '/' != mb_substr($basedir, -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
Method subscribingMLHandler
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
function subscribingMLHandler($type, $subscr_id, $mailinglist_id)
{
global $xoopsUser, $xoopsConfig;
$helper = XoopsModules\Xnewsletter\Helper::getInstance();
Function authenticate
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function authenticate(
$username,
$password,
$authtype = null,
$realm = '',
- 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
SMTP
has 38 functions (exceeds 20 allowed). Consider refactoring. Open
class SMTP
{
/**
* The PHPMailer SMTP version number.
* @var string