Showing 283 of 379 total issues
File class.phpmailer-bmh.php
has 374 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/* class.phpmailer-bmh.php
.---------------------------------------------------------------------------.
| Software: PHPMailer-BMH (Bounce Mail Handler) |
| Version: 5.0.0rc1 |
File import.php
has 373 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* ****************************************************************************
* - A Project by Developers TEAM For Xoops - ( https://xoops.org )
* ****************************************************************************
Function subscribingMLHandler
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
function subscribingMLHandler($type, $subscr_id, $mailinglist_id)
{
global $xoopsUser, $xoopsConfig;
$helper = XoopsModules\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 xnewsletter_plugin_getdata_csv
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
function xnewsletter_plugin_getdata_csv(
$cat_id,
$action_after_read,
$limitCheck,
$skipCatsubscrExist,
- 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 createBody
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function createBody()
{
$body = '';
//Create unique IDs and preset boundaries
$this->uniqueid = $this->generateId();
- 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 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getForm($action = false)
{
global $xoopsDB;
/** @var \XoopsGroupPermHandler $grouppermHandler */
File letter.php
has 360 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* ****************************************************************************
* - A Project by Developers TEAM For Xoops - ( https://xoops.org )
* ****************************************************************************
Method getForm
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getForm($action = false)
{
global $xoopsDB;
if (false === $action) {
Function xnewsletter_emailSize
has a Cognitive Complexity of 31 (exceeds 5 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();
- 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 processMailbox
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function processMailbox($max = false)
{
if (empty($this->action_function) || !function_exists($this->action_function)) {
$this->error_msg = 'Action function not found!';
$this->output();
Method _mime_types
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function _mime_types($ext = '')
{
$mimes = [
'xl' => 'application/excel',
'js' => 'application/javascript',
Function createHeader
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function createHeader()
{
$result = '';
$result .= $this->headerLine('Date', '' == $this->MessageDate ? self::rfcDate() : $this->MessageDate);
- 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 xnewsletter_getUserPermissionsByLetter
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
function xnewsletter_getUserPermissionsByLetter($letter_id = 0)
{
global $xoopsUser;
/** @var \XoopsGroupPermHandler $grouppermHandler */
$grouppermHandler = xoops_getHandler('groupperm');
- 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 class.html2text.php
has 329 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*************************************************************************
* *
* Converts HTML to formatted plain text *
* *
Method tln_sanitize
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
function tln_sanitize(
$body,
$tag_list,
$rm_tags_with_content,
$self_closing_tags,
Method xoops_module_update_xnewsletter_130
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoops_module_update_xnewsletter_130()
{
// change module dirname to lowercase
$path = dirname(__DIR__);
$dirname = basename(dirname(__DIR__));
Method HTMLFilter
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
function HTMLFilter($body, $trans_image_path, $block_external_images = false)
{
$tag_list = [
false,
'object',
Method processBounce
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function processBounce($pos, $type, $totalFetched)
{
$header = imap_headerinfo($this->_mailbox_link, $pos);
$subject = strip_tags($header->subject);
if ('DSN' === $type) {
Method xnewsletter_createTasks
has 96 lines of code (exceeds 25 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();
Method tln_fixstyle
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
{
// workaround for </style> in between comments
$content = '';
$sToken = '';