Showing 283 of 379 total issues
Method addAttachment
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addAttachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment')
{
try {
if (!@is_file($path)) {
throw new phpmailerException($this->lang('file_access') . $path, self::STOP_CONTINUE);
Method addAnAddress
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addAnAddress($kind, $address, $name = '')
{
if (!in_array($kind, ['to', 'cc', 'bcc', 'Reply-To'], true)) {
$error_message = $this->lang('Invalid recipient kind: ') . $kind;
$this->setError($error_message);
Method tln_body2div
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function tln_body2div($attary, $trans_image_path)
{
$divattary = ['class' => "'bodyclass'"];
$text = '#000000';
$has_bgc_stl = $has_txt_stl = false;
Method DKIM_Sign
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function DKIM_Sign($signHeader)
{
if (!defined('PKCS7_TEXT')) {
if ($this->exceptions) {
throw new phpmailerException($this->lang('extension_missing') . 'openssl');
Method xnewsletter_plugin_getform_xoopsuser
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xnewsletter_plugin_getform_xoopsuser($cat_id, $action_after_read, $limitCheck, $skipCatsubscrExist)
{
global $xoopsDB;
$helper = Xnewsletter\Helper::getInstance();
$memberHandler = xoops_getHandler('member');
Method getServerStats
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getServerStats()
{
$moduleDirName = basename(dirname(dirname(__DIR__)));
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
xoops_loadLanguage('common', $moduleDirName);
Method parseHelloFields
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function parseHelloFields($type)
{
$this->server_caps = [];
$lines = explode("\n", $this->helo_rply);
Method render
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render($output = true)
{
//Add header
$ics = 'BEGIN:VCALENDAR
METHOD:PUBLISH
Method callbackAction
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
$msgnum,
$bounce_type,
$email,
$subject,
$xheader,
Method connect
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function connect($host, $port = false, $tval = 30)
{
// Are we already connected?
if ($this->connected) {
return true;
Method get_lines
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_lines()
{
// If the connection is bad, give up straight away
if (!is_resource($this->smtp_conn)) {
return '';
Method globalDelete
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function globalDelete()
{
$dateArr = explode('-', $this->deleteMsgDate); // date format is yyyy-mm-dd
$delDate = mktime(0, 0, 0, $dateArr[1], $dateArr[2], $dateArr[0]);
Method sendCommand
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function sendCommand($command, $commandstring, $expect)
{
if (!$this->connected()) {
$this->setError("Called $command without being connected");
Method xnewsletter_search
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xnewsletter_search($queryarray, $andor, $limit, $offset, $userid)
{
global $xoopsDB;
$sql = 'SELECT cat_id, cat_name, cat_submitter, cat_created';
Function encodeFile
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function encodeFile($path, $encoding = 'base64')
{
try {
if (!is_readable($path)) {
throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE);
- 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 _build_link_list
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function _build_link_list($link, $display, $link_override = null)
{
$link_method = $link_override ?: $this->_options['do_links'];
if ('none' === $link_method) {
return $display;
- 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_tagprint
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function tln_tagprint($tagname, $attary, $tagtype)
{
if (2 == $tagtype) {
$fulltag = '</' . $tagname . '>';
} else {
- 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 mb_pathinfo
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function mb_pathinfo($path, $options = null)
{
$ret = ['dirname' => '', 'basename' => '', 'extension' => '', 'filename' => ''];
$pathinfo = [];
if (preg_match('%^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^\.\\\\/]+?)|))[\\\\/\.]*$%im', $path, $pathinfo)) {
- 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_141
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function xoops_module_update_xnewsletter_141()
{
global $xoopsDB;
$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 connect
has a Cognitive Complexity of 10 (exceeds 5 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
- 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"