Showing 283 of 379 total issues
Method getFormFeedback
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getFormFeedback($action = false)
{
if (false === $action) {
$action = $_SERVER['REQUEST_URI'];
}
Method typeMsg3
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function typeMsg3($ntlm_response, $user, $domain, $workstation)
{
$domain_unicode = $this->ASCIIToUnicode($domain);
$domain_length = mb_strlen($domain_unicode);
$domain_offset = 64;
Function b_xnewsletter_catsubscr
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function b_xnewsletter_catsubscr($options)
{
global $xoopsUser;
$helper = Xnewsletter\Helper::getInstance();
$myts = \MyTextSanitizer::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 xoops_module_update_xnewsletter_130
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function xoops_module_update_xnewsletter_130()
{
// change module dirname to lowercase
$path = dirname(__DIR__);
$dirname = basename(dirname(__DIR__));
- 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 xcopy
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static function xcopy($source, $dest)
{
// Check for symlinks
if (is_link($source)) {
return symlink(readlink($source), $dest);
- 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 smtpSend
has 42 lines of code (exceeds 25 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);
Method xnewsletter_plugin_getdata_simplenewsletter
has 42 lines of code (exceeds 25 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;
Method checkVerModule
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function checkVerModule($helper, $source = 'github', $default = 'master')
{
$moduleDirName = basename(dirname(dirname(__DIR__)));
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
$update = '';
Method connect
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function connect($host, $port = null, $timeout = 30, $options = [])
{
static $streamok;
//This is enabled by default since 5.0.0 but some providers disable it
//Check this once and cache the result
Method getFormAdmin
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getFormAdmin($action = false)
{
global $xoopsDB;
if (false === $action) {
Method data
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function data($msg_data)
{
//This will use the standard timelimit
if (!$this->sendCommand('DATA', 'DATA', 354)) {
return false;
Method encodeHeader
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function encodeHeader($str, $position = 'text')
{
$matchcount = 0;
switch (mb_strtolower($position)) {
case 'phrase':
Method sendmailSend
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function sendmailSend($header, $body)
{
// CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
if (!empty($this->Sender) and self::isShellSafe($this->Sender)) {
if ('qmail' == $this->Mailer) {
Function utf8CharBoundary
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function utf8CharBoundary($encodedText, $maxLength)
{
$foundSplitPos = false;
$lookBack = 3;
while (!$foundSplitPos) {
- 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 getMailMIME
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getMailMIME()
{
$result = '';
$ismultipart = true;
switch ($this->message_type) {
- 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 addOrEnqueueAnAddress
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected function addOrEnqueueAnAddress($kind, $address, $name)
{
$address = trim($address);
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
if (false === ($pos = mb_strrpos($address, '@'))) {
- 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 DKIM_Add
has a Cognitive Complexity of 13 (exceeds 5 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
- 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 encodeHeader
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function encodeHeader($str, $position = 'text')
{
$matchcount = 0;
switch (mb_strtolower($position)) {
case 'phrase':
- 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 get_lines
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected function get_lines()
{
// If the connection is bad, give up straight away
if (!is_resource($this->smtp_conn)) {
return '';
- 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_CleanVars
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function xnewsletter_CleanVars($global, $key, $default = '', $type = 'int', $notset = false)
{
require_once XOOPS_ROOT_PATH . '/include/functions.php';
switch ($type) {
case '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"