Showing 283 of 379 total issues
Method addEvent
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addEvent($start, $end, $summary = '', $description = '', $url = '', $uid = '')
Method popBeforeSmtp
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$host,
$port = false,
$timeout = false,
$username = '',
$password = '',
Method addEmbeddedImage
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = '', $disposition = 'inline')
Method authenticate
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$username,
$password,
$authtype = null,
$realm = '',
$workstation = '',
Function xnewsletter_download
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function xnewsletter_download($filePath, $isBinary = true, $retBytes = true)
{
// how many bytes per chunk
//$chunkSize = 1 * (1024 * 1024);
$chunkSize = 8 * (1024 * 1024); //8MB (highest possible fread length)
- 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 xnewsletter_plugin_getdata_xoopsuser
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$cat_id,
$action_after_read,
$limitCheck,
$skipCatsubscrExist,
$arr_groups)
Method mailPassthru
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private function mailPassthru($to, $subject, $body, $header, $params)
Method addAttachment
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addAttachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment')
Method addStringAttachment
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$string,
$filename,
$encoding = 'base64',
$type = '',
$disposition = 'attachment')
Method xnewsletter_plugin_getform_csv
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$cat_id,
$action_after_read,
$limitCheck,
$skipCatsubscrExist,
$action = false)
Method xnewsletter_search
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function xnewsletter_search($queryarray, $andor, $limit, $offset, $userid)
Method xnewsletter_CleanVars
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function xnewsletter_CleanVars($global, $key, $default = '', $type = 'int', $notset = false)
Function setLanguage
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function setLanguage($langcode = 'en', $lang_path = '')
{
// Backwards compatibility for renamed language codes
$renamed_langcodes = [
'br' => 'pt_br',
- 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 encodeString
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function encodeString($str, $encoding = 'base64')
{
$encoded = '';
switch (mb_strtolower($encoding)) {
case 'base64':
- 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_QP
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function DKIM_QP($txt)
{
$line = '';
for ($i = 0; $i < mb_strlen($txt); $i++) {
$ord = ord($txt[$i]);
- 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 tln_deent
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function tln_deent(&$attvalue, $regex, $hex = false)
{
preg_match_all($regex, $attvalue, $matches);
if (is_array($matches) && count($matches[0]) > 0) {
$repl = [];
- 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 set_base_url
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function set_base_url($url = '')
{
if (empty($url)) {
if (\Xmf\Request::hasVar('HTTP_HOST', 'SERVER')) {
$this->url = 'http://' . $_SERVER['HTTP_HOST'];
- 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 authorise
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function authorise($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0)
{
$this->host = $host;
// If no port value provided, use default
if (false === $port) {
- 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 getForm
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getForm($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
Function recordLastTransactionID
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function recordLastTransactionID()
{
$reply = $this->getLastReply();
if (empty($reply)) {
- 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"