mambax7/xnewsletter

View on GitHub

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'];
        }
Severity: Minor
Found in class/Common/ModuleFeedback.php - About 1 hr to fix

    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;
    Severity: Minor
    Found in include/phpmailer/extras/ntlm_sasl_client.php - About 1 hr to fix

      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();
      Severity: Minor
      Found in blocks/blocks_catsubscr.php - About 1 hr 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 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__));
      Severity: Minor
      Found in include/onupdate.php - About 1 hr 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 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);
      Severity: Minor
      Found in class/Common/FilesManagement.php - About 1 hr 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 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);
      Severity: Minor
      Found in include/phpmailer/class.phpmailer.php - About 1 hr to fix

        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;
        Severity: Minor
        Found in plugins/simplenewsletter.php - About 1 hr to fix

          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             = '';
          Severity: Minor
          Found in class/Common/VersionChecks.php - About 1 hr to fix

            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
            Severity: Minor
            Found in include/phpmailer/class.smtp.php - About 1 hr to fix

              Method getFormAdmin has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getFormAdmin($action = false)
                  {
                      global $xoopsDB;
              
                      if (false === $action) {
              Severity: Minor
              Found in class/Subscr.php - About 1 hr to fix

                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;
                Severity: Minor
                Found in include/phpmailer/class.smtp.php - About 1 hr to fix

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

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

                      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) {
                      Severity: Minor
                      Found in include/phpmailer/class.phpmailer.php - About 1 hr 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 getMailMIME has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function getMailMIME()
                          {
                              $result      = '';
                              $ismultipart = true;
                              switch ($this->message_type) {
                      Severity: Minor
                      Found in include/phpmailer/class.phpmailer.php - About 1 hr 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 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, '@'))) {
                      Severity: Minor
                      Found in include/phpmailer/class.phpmailer.php - About 1 hr 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_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
                      Severity: Minor
                      Found in include/phpmailer/class.phpmailer.php - About 1 hr 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 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':
                      Severity: Minor
                      Found in include/phpmailer/class.phpmailer.php - About 1 hr 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 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 '';
                      Severity: Minor
                      Found in include/phpmailer/class.smtp.php - About 1 hr 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 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':
                      Severity: Minor
                      Found in include/functions.php - About 1 hr 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