e107inc/e107

View on GitHub
e107_handlers/bounce_handler.php

Summary

Maintainability
C
1 day
Test Coverage
F
1%

Consider simplifying this complex logical expression.
Open

                if(stripos($line, 'no such address') !== false
                    || stripos($line, 'Recipient address rejected') !== false
                    || stripos($line, 'User unknown in virtual alias table') !== false)
                {
                    return '5.1.1';
Severity: Critical
Found in e107_handlers/bounce_handler.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

                        return '5.1.2'; // Not sure if this is right code. Just copied from above.
    Severity: Major
    Found in e107_handlers/bounce_handler.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                          return '4.2.2';
      Severity: Major
      Found in e107_handlers/bounce_handler.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                            return '4.4.7';
        Severity: Major
        Found in e107_handlers/bounce_handler.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                              return '4.2.0';
          Severity: Major
          Found in e107_handlers/bounce_handler.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                                return '4.2.0'; // I'm not sure why Symantec delayed this message, but x.2.x means something to do with the mailbox, which seemed appropriate. x.5.x (protocol) or x.7.x (security) also seem possibly appropriate. It seems a lot of times it's x.5.x when it seems to me it should be x.7.x, so maybe x.5.x is standard when mail is rejected due to spam-like characteristics instead of x.7.x like I think it should be.
            Severity: Major
            Found in e107_handlers/bounce_handler.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                                  return implode('.', $mycode['code']);
              Severity: Major
              Found in e107_handlers/bounce_handler.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                    return '4.4.1';
                Severity: Major
                Found in e107_handlers/bounce_handler.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                      return '5.5.0'; // Again, why isn't this 5.7.1 instead?
                  Severity: Major
                  Found in e107_handlers/bounce_handler.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

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

                      Avoid too many return statements within this method.
                      Open

                                          return '5.2.0';
                      Severity: Major
                      Found in e107_handlers/bounce_handler.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                            return '5.2.0'; // I guess.... seems like 5.1.1, 5.1.2, or 5.4.4 would fit too, but 5.2.0 seemed most generic
                        Severity: Major
                        Found in e107_handlers/bounce_handler.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                              return '5.5.4'; // rogers.com
                          Severity: Major
                          Found in e107_handlers/bounce_handler.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                                return '5.4.4';
                            Severity: Major
                            Found in e107_handlers/bounce_handler.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                                  return implode('.', $mycode['code']);
                              Severity: Major
                              Found in e107_handlers/bounce_handler.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                                    return '5.5.4'; // I think this should be 5.7.1. "SMTP error from remote mail server after end of data: ... (HVU:B1) http://postmaster.info.aol.com/errors/554hvub1.html" -- AOL rejects messages that have links to certain sites in them.
                                Severity: Major
                                Found in e107_handlers/bounce_handler.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                                      return '5.1.1'; // Or should it be 5.5.0?
                                  Severity: Major
                                  Found in e107_handlers/bounce_handler.php - About 30 mins to fix

                                    Variable $output was undeclared, but array fields are being added to it.
                                    Open

                                                $output[0]['recipient'] = "";
                                    Severity: Info
                                    Found in e107_handlers/bounce_handler.php by phan

                                    Variable $mime_sections was undeclared, but array fields are being added to it.
                                    Open

                                                $mime_sections['first_body_part'] = $body[1];
                                    Severity: Info
                                    Found in e107_handlers/bounce_handler.php by phan

                                    When fetching an array index from a value of type array{2:array{descr:'Success specifies that the DSN is reporting a positive delivery action. Detail sub-codes may provide notification of transformations required for delivery.'}}|array{2:array{title:'Success'}}|array{4:array{descr:'A persistent transient failure is one in which the message as sent is valid, but some temporary event prevents the successful sending of the message. Sending in the future may be successful.'}}|array{4:array{title:'Persistent Transient Failure'}}|array{5:array{descr:'A permanent failure is one which is not likely to be resolved by resending the message in the current form. Some change to the message or the destination must be made for successful delivery.'}}|array{5:array{title:'Permanent Failure'}}|array{}, found an array index of type string, but expected the index to be of type int
                                    Open

                                                $str = "<p><b>" . $status_code_classes[$arr[0]]['title'] . "</b> - " . $status_code_classes[$arr[0]]['descr'] . "  <B>" . $status_code_subclasses[$arr[1] . "." . $arr[2]]['title'] . "</B> - " . $status_code_subclasses[$arr[1] . "." . $arr[2]]['descr'] . "</p>";
                                    Severity: Minor
                                    Found in e107_handlers/bounce_handler.php by phan

                                    Argument 2 (Data) is int but \ecache::set() takes string defined at /code/e107_handlers/cache_handler.php:235
                                    Open

                                                e107::getCache()->set('emailLastBounce', time(), true, false, true);
                                    Severity: Minor
                                    Found in e107_handlers/bounce_handler.php by phan

                                    Argument 1 (filename) is false but \file_get_contents() takes string
                                    Open

                                                $strEmail = ($this->source === false) ? $this->mailRead(-1) : file_get_contents($this->source);
                                    Severity: Minor
                                    Found in e107_handlers/bounce_handler.php by phan

                                    Invalid offset "Received" of array type array{}
                                    Open

                                                        elseif($hash['Received'])
                                    Severity: Minor
                                    Found in e107_handlers/bounce_handler.php by phan

                                    There are no issues that match your filters.

                                    Category
                                    Status