mambax7/xnewsletter

View on GitHub

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 = '')
Severity: Minor
Found in include/phpmailer/extras/EasyPeasyICS.php - About 45 mins to fix

    Method popBeforeSmtp has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            $host,
            $port = false,
            $timeout = false,
            $username = '',
            $password = '',
    Severity: Minor
    Found in include/phpmailer/class.pop3.php - About 45 mins to fix

      Method addEmbeddedImage has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function addEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = '', $disposition = 'inline')
      Severity: Minor
      Found in include/phpmailer/class.phpmailer.php - About 45 mins to fix

        Method authenticate has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                $username,
                $password,
                $authtype = null,
                $realm = '',
                $workstation = '',
        Severity: Minor
        Found in include/phpmailer/class.smtp.php - About 45 mins to fix

          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)
          Severity: Minor
          Found in include/functions.php - About 45 mins to fix

          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)
          Severity: Minor
          Found in plugins/xoopsuser.php - About 35 mins to fix

            Method mailPassthru has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                private function mailPassthru($to, $subject, $body, $header, $params)
            Severity: Minor
            Found in include/phpmailer/class.phpmailer.php - About 35 mins to fix

              Method addAttachment has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public function addAttachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment')
              Severity: Minor
              Found in include/phpmailer/class.phpmailer.php - About 35 mins to fix

                Method addStringAttachment has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        $string,
                        $filename,
                        $encoding = 'base64',
                        $type = '',
                        $disposition = 'attachment')
                Severity: Minor
                Found in include/phpmailer/class.phpmailer.php - About 35 mins to fix

                  Method xnewsletter_plugin_getform_csv has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      $cat_id,
                      $action_after_read,
                      $limitCheck,
                      $skipCatsubscrExist,
                      $action = false)
                  Severity: Minor
                  Found in plugins/csv.php - About 35 mins to fix

                    Method xnewsletter_search has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    function xnewsletter_search($queryarray, $andor, $limit, $offset, $userid)
                    Severity: Minor
                    Found in include/search.inc.php - About 35 mins to fix

                      Method xnewsletter_CleanVars has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      function xnewsletter_CleanVars($global, $key, $default = '', $type = 'int', $notset = false)
                      Severity: Minor
                      Found in include/functions.php - About 35 mins to fix

                        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',
                        Severity: Minor
                        Found in include/phpmailer/class.phpmailer.php - About 35 mins to fix

                        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':
                        Severity: Minor
                        Found in include/phpmailer/class.phpmailer.php - About 35 mins to fix

                        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]);
                        Severity: Minor
                        Found in include/phpmailer/class.phpmailer.php - About 35 mins to fix

                        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 = [];
                        Severity: Minor
                        Found in include/phpmailer/extras/htmlfilter.php - About 35 mins to fix

                        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'];
                        Severity: Minor
                        Found in include/phpmailer/extras/class.html2text.php - About 35 mins to fix

                        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) {
                        Severity: Minor
                        Found in include/phpmailer/class.pop3.php - About 35 mins to fix

                        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) {
                        Severity: Minor
                        Found in class/Template.php - About 35 mins to fix

                        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)) {
                        Severity: Minor
                        Found in include/phpmailer/class.smtp.php - About 35 mins to fix

                        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

                        Severity
                        Category
                        Status
                        Source
                        Language