e107inc/e107

View on GitHub
e107_handlers/mail_manager_class.php

Summary

Maintainability
B
4 hrs
Test Coverage
F
2%

Avoid deeply nested control flow statements.
Open

                                if (e107::callMethod($cls, 'bounce', $bounceInfo) === false)
                                {
                                    e107::getLog()->add($plug . ' bounce process failed', $bounceInfo, E_LOG_FATAL, 'BOUNCE', LOG_TO_ROLLING);
                                }
Severity: Major
Found in e107_handlers/mail_manager_class.php - About 45 mins to fix

    Avoid too many return statements within this method.
    Open

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

      Avoid too many return statements within this method.
      Open

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

        Avoid too many return statements within this method.
        Open

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

          Avoid too many return statements within this method.
          Open

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

            Avoid too many return statements within this method.
            Open

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

              Avoid too many return statements within this method.
              Open

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

                Avoid too many return statements within this method.
                Open

                        return LAN_MAILOUT_216 . ' (' . $status . ')';        // General coding error
                Severity: Major
                Found in e107_handlers/mail_manager_class.php - About 30 mins to fix

                  Return type of selectEmails() is undeclared type \handle
                  Open

                      public function selectEmails($count = 1)
                  Severity: Minor
                  Found in e107_handlers/mail_manager_class.php by phan

                  Suspicious array access to bool
                  Open

                          if ($counters['add'] == 0)
                  Severity: Minor
                  Found in e107_handlers/mail_manager_class.php by phan

                  Invalid operator: left operand of - is null (expected number)
                  Open

                                  $targetData['mail_status'] = max($targetData['mail_status'] - 1, MAIL_STATUS_PENDING);        // One off retry count
                  Severity: Minor
                  Found in e107_handlers/mail_manager_class.php by phan

                  Return type of saveEmail() is undeclared type \mail
                  Open

                      public function saveEmail($emailData, $isNew = false)
                  Severity: Minor
                  Found in e107_handlers/mail_manager_class.php by phan

                  Saw a token Phan may have failed to parse after '* @return bool|array| - TRUE on success, FALSE on failure': after bool|array, saw '|'
                  Open

                       * @return bool|array| - TRUE on success, FALSE on failure
                  Severity: Info
                  Found in e107_handlers/mail_manager_class.php by phan

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

                              if ($this->currentBatchInfo['mail_source_id'] != $email['mail_source_id'])
                  Severity: Minor
                  Found in e107_handlers/mail_manager_class.php by phan

                  Returning type bool|int but selectTargetStatus() is declared to return \Returns
                  Open

                          return $result;
                  Severity: Minor
                  Found in e107_handlers/mail_manager_class.php by phan

                  Reference to undeclared property \e107Email->AltBody
                  Open

                              print_a($this->mailer->AltBody);
                  Severity: Minor
                  Found in e107_handlers/mail_manager_class.php by phan

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

                                  $targetData['mail_status'] = max($targetData['mail_status'] - 1, MAIL_STATUS_PENDING);        // One off retry count
                  Severity: Minor
                  Found in e107_handlers/mail_manager_class.php by phan

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

                              if ($targetData['mail_status'] > MAIL_STATUS_PENDING)
                  Severity: Minor
                  Found in e107_handlers/mail_manager_class.php by phan

                  Invalid operator: unary operand of (expr)-- is \handle|true (expected int or string or float)
                  Open

                                  $count--;
                  Severity: Minor
                  Found in e107_handlers/mail_manager_class.php by phan

                  Return type of selectTargetStatus() is undeclared type \Returns
                  Open

                      public function selectTargetStatus($handle, $start = 0, $count = 0, $fields = '*', $filters = false, $orderField = 'mail_target_id', $sortOrder = 'asc')
                  Severity: Minor
                  Found in e107_handlers/mail_manager_class.php by phan

                  Assigning array to property but \e107MailManager->mailOverrides is false
                  Open

                          $this->mailOverrides = $overrides;
                  Severity: Minor
                  Found in e107_handlers/mail_manager_class.php by phan

                  Invalid operator: unary operand of (expr)-- is false (expected int or string or float)
                  Open

                              $this->queryActive--;
                  Severity: Minor
                  Found in e107_handlers/mail_manager_class.php by phan

                  Return type of selectEmailStatus() is undeclared type \Returns
                  Open

                      public function selectEmailStatus($start = 0, $count = 0, $fields = '*', $filters = false, $orderField = 'mail_source_id', $sortOrder = 'asc')
                  Severity: Minor
                  Found in e107_handlers/mail_manager_class.php by phan

                  Assigning array{mailer:mixed} to property but \e107MailManager->mailOverrides is false
                  Open

                          $this->mailOverrides = $overrides;
                  Severity: Minor
                  Found in e107_handlers/mail_manager_class.php by phan

                  Reference to undeclared property \e107Email->Body
                  Open

                              print_a($this->mailer->Body);
                  Severity: Minor
                  Found in e107_handlers/mail_manager_class.php by phan

                  Returning type bool|int but selectEmailStatus() is declared to return \Returns
                  Open

                          return $result;
                  Severity: Minor
                  Found in e107_handlers/mail_manager_class.php by phan

                  Returning type array<string></string> but mailRetrieveCounters() is declared to return bool
                  Open

                              return $this->mailCounters[$handle];
                  Severity: Minor
                  Found in e107_handlers/mail_manager_class.php by phan

                  There are no issues that match your filters.

                  Category
                  Status