Showing 283 of 379 total issues
Function getForm
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function getForm($action = false)
{
global $xoopsDB;
/** @var \XoopsGroupPermHandler $grouppermHandler */
- 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 DKIM_Add
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function DKIM_Add($headers_line, $subject, $body)
{
$DKIMsignatureType = 'rsa-sha256'; // Signature & hash algorithms
$DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body
$DKIMquery = 'dns/txt'; // Query method
Method attachAll
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function attachAll($disposition_type, $boundary)
{
// Return text of body
$mime = [];
$cidUniq = [];
Function data
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function data($msg_data)
{
//This will use the standard timelimit
if (!$this->sendCommand('DATA', 'DATA', 354)) {
return 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 xoops_module_install_xnewsletter
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoops_module_install_xnewsletter(\XoopsModule $module)
{
require_once dirname(__DIR__) . '/preloads/autoloader.php';
// get module config values
Method preSend
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function preSend()
{
try {
$this->error_count = 0; // Reset errors
$this->mailHeader = '';
Method xnewsletter_largeDownload
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xnewsletter_largeDownload($filePath, $fileMimetype)
{
/* You may need these ini settings too */
set_time_limit(0);
ini_set('memory_limit', '512M');
Function b_xnewsletter_letter
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function b_xnewsletter_letter($options)
{
global $xoopsUser;
$myts = \MyTextSanitizer::getInstance();
/** @var \XoopsGroupPermHandler $grouppermHandler */
- 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 createHeader
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createHeader()
{
$result = '';
$result .= $this->headerLine('Date', '' == $this->MessageDate ? self::rfcDate() : $this->MessageDate);
File subscr.php
has 262 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* ****************************************************************************
* - A Project by Developers TEAM For Xoops - ( https://xoops.org )
* ****************************************************************************
Function validateAddress
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public static function validateAddress($address, $patternselect = null)
{
if (null === $patternselect) {
$patternselect = self::$validator;
}
- 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 smtpSend
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
protected function smtpSend($header, $body)
{
$bad_rcpt = [];
if (!$this->smtpConnect($this->SMTPOptions)) {
throw new phpmailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL);
- 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 parseHelloFields
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
protected function parseHelloFields($type)
{
$this->server_caps = [];
$lines = explode("\n", $this->helo_rply);
- 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 validateAddress
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function validateAddress($address, $patternselect = null)
{
if (null === $patternselect) {
$patternselect = self::$validator;
}
Method tln_fixurl
has 55 lines of code (exceeds 25 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])) {
Method b_xnewsletter_letter
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_xnewsletter_letter($options)
{
global $xoopsUser;
$myts = \MyTextSanitizer::getInstance();
/** @var \XoopsGroupPermHandler $grouppermHandler */
Method xoops_module_update_xnewsletter_141
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoops_module_update_xnewsletter_141()
{
global $xoopsDB;
$helper = \XoopsModules\Xnewsletter\Helper::getInstance();
Function xnewsletter_plugin_getdata_simplenewsletter
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function xnewsletter_plugin_getdata_simplenewsletter($cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist) {
global $xoopsDB;
$helper = \XoopsModules\Xnewsletter\Helper::getInstance();
$import_status = (0 == $action_after_read) ? 1 : 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 tln_fixatts
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function tln_fixatts(
$tagname,
$attary,
$rm_attnames,
$bad_attvals,
Method xnewsletter_getUserPermissionsByLetter
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xnewsletter_getUserPermissionsByLetter($letter_id = 0)
{
global $xoopsUser;
/** @var \XoopsGroupPermHandler $grouppermHandler */
$grouppermHandler = xoops_getHandler('groupperm');