mambax7/xnewsletter

View on GitHub

Showing 283 of 379 total issues

Function getServerExt has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function getServerExt($name)
    {
        if (!$this->server_caps) {
            $this->setError('No HELO/EHLO was sent');

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

Avoid too many return statements within this method.
Open

            return [false, false, false, $lt, $gt];
Severity: Major
Found in include/phpmailer/extras/htmlfilter.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                    return (bool)preg_match('/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' . '[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD', $address);
    Severity: Major
    Found in include/phpmailer/class.phpmailer.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                                  return [false, false, false, $lt, mb_strlen($body)];
      Severity: Major
      Found in include/phpmailer/extras/htmlfilter.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

            return [false, false, false, $lt, mb_strlen($body)];
        Severity: Major
        Found in include/phpmailer/extras/htmlfilter.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return (bool)filter_var($address, FILTER_VALIDATE_EMAIL);
          Severity: Major
          Found in include/phpmailer/class.phpmailer.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return [false, false, false, $lt, $gt];
            Severity: Major
            Found in include/phpmailer/extras/htmlfilter.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                                  return [false, false, false, $lt, $gt];
              Severity: Major
              Found in include/phpmailer/extras/htmlfilter.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                return $retary;
                Severity: Major
                Found in include/phpmailer/extras/htmlfilter.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                              return [$tagname, false, $tagtype, $lt, $pos];
                  Severity: Major
                  Found in include/phpmailer/extras/htmlfilter.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                return [$tagname, $attary, $tagtype, $lt, $pos];
                    Severity: Major
                    Found in include/phpmailer/extras/htmlfilter.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                              return $display . ' [' . $url . ']';
                      Severity: Major
                      Found in include/phpmailer/extras/class.html2text.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                return '';
                        Severity: Major
                        Found in include/phpmailer/extras/class.html2text.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                              return $output;
                          Severity: Major
                          Found in include/html2text/html2text.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                        return '';
                            Severity: Major
                            Found in include/html2text/html2text.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                              return [$tagname, $attary, $tagtype, $lt, $pos];
                              Severity: Major
                              Found in include/phpmailer/extras/htmlfilter.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                                            return [false, false, false, $lt, mb_strlen($body)];
                                Severity: Major
                                Found in include/phpmailer/extras/htmlfilter.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                          return call_user_func_array([$this, 'addAnAddress'], $params);
                                  Severity: Major
                                  Found in include/phpmailer/class.phpmailer.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                            return false;
                                    Severity: Major
                                    Found in include/phpmailer/class.phpmailer.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                              return [false, false, false, $lt, mb_strlen($body)];
                                      Severity: Major
                                      Found in include/phpmailer/extras/htmlfilter.php - About 30 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language