e107inc/e107

View on GitHub
e107_handlers/rate_class.php

Summary

Maintainability
A
2 hrs
Test Coverage
F
15%

Avoid too many return statements within this method.
Open

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

    Avoid too many return statements within this method.
    Open

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

      Avoid too many return statements within this method.
      Open

                  return $this->processRow($rowgr,$userid);
      Severity: Major
      Found in e107_handlers/rate_class.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

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

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

                              $rateuserinfo[$i] = explode($sep, $rateusers[$i]);
          Severity: Info
          Found in e107_handlers/rate_class.php by phan

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

                  $TEMPLATE['STATUS'] = "&nbsp;<span class='e-rate-status e-rate-status-{$table}' id='e-rate-{$identifier}' style='display:none'>".$label."</span>";
          Severity: Info
          Found in e107_handlers/rate_class.php by phan

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

                      $rating[0] = $rowgr['rate_votes']; // $rating[0] == number of votes
          Severity: Info
          Found in e107_handlers/rate_class.php by phan

          Argument 2 (str) is float|int but \explode() takes string
          Open

                      $tmp = (strpos($tmp, ",")) ? explode(",", $tmp) : explode(".", $tmp);
          Severity: Minor
          Found in e107_handlers/rate_class.php by phan

          Argument 2 (options) is false but \e_parse::toGlyph() takes array|string defined at /code/e107_handlers/e_parse_class.php:3973
          Open

                      $upDown = $tp->toGlyph('fa-thumbs-down',false); // "<i class='icon-thumbs-down'></i>";
          Severity: Minor
          Found in e107_handlers/rate_class.php by phan

          Call to deprecated function \getperms() defined at /code/class2.php:1322
          Open

                      elseif(getperms('0'))
          Severity: Minor
          Found in e107_handlers/rate_class.php by phan

          Argument 2 (options) is false but \e_parse::toGlyph() takes array|string defined at /code/e107_handlers/e_parse_class.php:3973
          Open

                      $upImg = $tp->toGlyph('fa-thumbs-up',false); // "<i class='icon-thumbs-up'></i>";
          Severity: Minor
          Found in e107_handlers/rate_class.php by phan

          Argument 1 (haystack) is float|int but \strpos() takes string
          Open

                      $tmp = (strpos($tmp, ",")) ? explode(",", $tmp) : explode(".", $tmp);
          Severity: Minor
          Found in e107_handlers/rate_class.php by phan

          There are no issues that match your filters.

          Category
          Status