e107inc/e107

View on GitHub
e107_plugins/pm/pm.php

Summary

Maintainability
A
2 hrs
Test Coverage
F
0%

Avoid too many return statements within this method.
Open

                return $msg . $this->add($_POST);
Severity: Major
Found in e107_plugins/pm/pm.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                                return LAN_PM_21;
    Severity: Major
    Found in e107_plugins/pm/pm.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                                  return LAN_PM_18 . $to_info['user_name'];
      Severity: Major
      Found in e107_plugins/pm/pm.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                                    return LAN_PM_19;
        Severity: Major
        Found in e107_plugins/pm/pm.php - About 30 mins to fix

          Variable $PM_OUTBOX_HEADER is undeclared
          Open

                          $PM_OUTBOX['start'] = $this->updateTemplate($PM_OUTBOX_HEADER);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $tp is undeclared
          Open

                  $pmSource = $tp->toDB($_POST['pm_come_from']);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Method \pm_extended::__construct is declared to return \none but has no return value
          Open

                  public function __construct($prefs, $manager)
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $PM_OUTBOX_EMPTY is undeclared
          Open

                          $PM_OUTBOX['empty'] = $this->updateTemplate($PM_OUTBOX_EMPTY);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Argument 2 (pluginName) is true but \e107::getScBatch() takes string defined at /code/e107_handlers/e107_class.php:1608
          Open

                      $sc = e107::getScBatch('pm', true, 'pm');
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $PM_INBOX_HEADER is undeclared
          Open

                          $PM_INBOX['start'] = $this->updateTemplate($PM_INBOX_HEADER);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $PM_OUTBOX_FOOTER is undeclared
          Open

                          $PM_OUTBOX['end'] = $this->updateTemplate($PM_OUTBOX_FOOTER);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $tp is undeclared
          Open

                  $pmSource = $tp->toDB($qs[2]);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Argument 2 (pluginName) is true but \e107::getScBatch() takes string defined at /code/e107_handlers/e107_class.php:1608
          Open

                      $sc = e107::getScBatch('pm', true, 'pm');
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $PM_INBOX_EMPTY is undeclared
          Open

                          $PM_INBOX['empty'] = $this->updateTemplate($PM_INBOX_EMPTY);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $PM_BLOCKED_TABLE is undeclared
          Open

                          $PM_BLOCKED['item'] = $this->updateTemplate($PM_BLOCKED_TABLE);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $ns is undeclared
          Open

                  $ns->tablerender(LAN_PM, LAN_PM_12);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Return type of __construct() is undeclared type \none
          Open

                  public function __construct($prefs, $manager)
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $sql is undeclared
          Open

                      $delList = $sql->db_getList();
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $PM_INBOX_FOOTER is undeclared
          Open

                          $PM_INBOX['end'] = $this->updateTemplate($PM_INBOX_FOOTER);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Argument 2 (pluginName) is true but \e107::getScBatch() takes string defined at /code/e107_handlers/e107_class.php:1608
          Open

                      $sc = e107::getScBatch('pm', true, 'pm');
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

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

              $retrieve_prefs[] = 'pm_prefs';
          Severity: Info
          Found in e107_plugins/pm/pm.php by phan

          Argument 2 (pluginName) is true but \e107::getScBatch() takes string defined at /code/e107_handlers/e107_class.php:1608
          Open

                      $sc = e107::getScBatch('pm', true, 'pm');
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $ns is undeclared
          Open

                      $ns->tablerender(LAN_PM, $pm->breadcrumb(LAN_PLUGIN_PM_NEW) . $mes->render() . $pm->show_send($pm_proc_id));
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $ns is undeclared
          Open

                              $ns->tablerender(LAN_PM, $pm->breadcrumb(LAN_PM_55) . $mes->render() . $pm->show_send($pm_info));
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $tp is undeclared
          Open

                  define('PM_DELETE_ICON', $tp->toGlyph('fa-trash', 'fw=1'));
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $PM_BLOCKED_HEADER is undeclared
          Open

                          $PM_BLOCKED['start'] = $this->updateTemplate($PM_BLOCKED_HEADER);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $PM_BLOCKED_EMPTY is undeclared
          Open

                          $PM_BLOCKED['empty'] = $this->updateTemplate($PM_BLOCKED_EMPTY);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

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

                          $u[] = "{\"caption\":\"" . $row['user_name'] . "\",\"value\":" . $row['user_id'] . "}";
          Severity: Info
          Found in e107_plugins/pm/pm.php by phan

          Variable $ns is undeclared
          Open

                          $ns->tablerender(LAN_PM, $pm->breadcrumb(LAN_PM_55) . $mes->render() . LAN_PM_57);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $ns is undeclared
          Open

                      $ns->tablerender($caption, $pm->breadcrumb(LAN_PLUGIN_PM_OUTBOX) . $mes->render() . $pm->show_outbox($pm_proc_id), 'PM');
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $tp is undeclared
          Open

                      define('ATTACHMENT_ICON', $tp->toGlyph('fa-paperclip'));
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Argument 2 (filenum) is int but \pm_extended::send_file() takes string defined at /code/e107_plugins/pm/pm_class.php:805
          Open

                  $pm->send_file($pm_proc_id, intval($qs[2]));
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $ns is undeclared
          Open

                      $ns->tablerender($caption, $pm->breadcrumb(LAN_PLUGIN_PM_INBOX) . $mes->render() . $pm->show_inbox($pm_proc_id), 'PM');
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Argument 2 (pluginName) is true but \e107::getScBatch() takes string defined at /code/e107_handlers/e107_class.php:1608
          Open

                      $sc = e107::getScBatch('pm', true, 'pm');
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Returning type null but show_pm() is declared to return string
          Open

                          return null;
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $ns is undeclared
          Open

                              $ns->tablerender(LAN_PM, $pm->breadcrumb(LAN_PM_55) . $mes->render() . LAN_PM_56);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $tp is undeclared
          Open

                  $action = $tp->filter($_GET['mode']);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $PM_OUTBOX_TABLE is undeclared
          Open

                          $PM_OUTBOX['item'] = $this->updateTemplate($PM_OUTBOX_TABLE);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $PM_BLOCKED_FOOTER is undeclared
          Open

                          $PM_BLOCKED['end'] = $this->updateTemplate($PM_BLOCKED_FOOTER);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $PM_SEND_PM is undeclared
          Open

                          $PM_SEND_PM = $this->updateTemplate($PM_SEND_PM);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $PM_INBOX_TABLE is undeclared
          Open

                          $PM_INBOX['item'] = $this->updateTemplate($PM_INBOX_TABLE);
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $sql is undeclared
          Open

                  if($sql->select('private_msg', 'pm_id', $qry))
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          Variable $ns is undeclared
          Open

                      $ns->tablerender($caption, $pm->breadcrumb('blocked') . $mes->render() . $pm->showBlocked($pm_proc_id), 'PM');
          Severity: Minor
          Found in e107_plugins/pm/pm.php by phan

          There are no issues that match your filters.

          Category
          Status