e107inc/e107

View on GitHub
e107_core/shortcodes/single/nextprev.php

Summary

Maintainability
A
1 hr
Test Coverage
F
42%

Avoid too many return statements within this method.
Open

        return $caption.$ret;
Severity: Major
Found in e107_core/shortcodes/single/nextprev.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                return $caption.$nppage;
    Severity: Major
    Found in e107_core/shortcodes/single/nextprev.php - About 30 mins to fix

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

                  return null;

      Argument 2 (replace) is int but \str_replace() takes array|string
      Open

                      $urlParms[2] = str_replace('[FROM]', $newstart, $urlParms[2]);

      Argument 2 (replace) is int but \str_replace() takes array|string
      Open

                                  $link = str_replace("[FROM]", ($perpage * ($c + $index_add)), $url);

      Argument 2 (replace) is int but \str_replace() takes array|string
      Open

                      $urlParms[2] = str_replace('[FROM]', $prevstart, $urlParms[2]);

      Argument 2 (replace) is int but \str_replace() takes array|string
      Open

                      $urlParms[2] = str_replace('[FROM]', $nextstart, $urlParms[2]);

      Argument 2 (replace) is 0|1 but \str_replace() takes array|string
      Open

                      $e_vars->url = str_replace('[FROM]', $first_page, $url);

      Argument 2 (replace) is int but \str_replace() takes array|string
      Open

                      $link = str_replace('[FROM]', $nextstart, $url);

      Argument 2 (replace) is int but \str_replace() takes array|string
      Open

                              $link = str_replace("[FROM]", ($perpage * ($c + $index_add)), $url);

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

                      $LAN_NP_FIRST         = $tp->toGlyph("icon-fast-backward.glyph",false);

      Argument 2 (replace) is float|int but \str_replace() takes array|string
      Open

                  $e_vars_loop->url = str_replace('[FROM]', ($perpage * ($c + $index_add)), $url);

      Argument 2 (replace) is float|int but \str_replace() takes array|string
      Open

                              $link = str_replace("[FROM]", ($perpage * ($c + $index_add)), $url);

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

                      $LAN_NP_PREVIOUS     = $tp->toGlyph("icon-backward.glyph",false);

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

                      $LAN_NP_LAST         = $tp->toGlyph("icon-fast-forward",false);

      Argument 2 (replace) is int but \str_replace() takes array|string
      Open

                      $e_vars->url = str_replace('[FROM]', $prev_page, $url);

      Argument 2 (replace) is float|int but \str_replace() takes array|string
      Open

                      $e_vars->url = str_replace('[FROM]', $last_page, $url);//$last_page

      Reference to undeclared constant \NEXTPREV_NOSTYLE
      Open

                  if(!defined('NEXTPREV_NOSTYLE') || NEXTPREV_NOSTYLE==FALSE){

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

              $np_parm['template'] = "<span class='form-group form-inline'>[PREV]&nbsp;&nbsp;[DROPDOWN]&nbsp;&nbsp;[NEXT]<span>";

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

              $np_parms['prev'] = '&nbsp;&nbsp;&lt;&lt;&nbsp;&nbsp;';

      Argument 2 (replace) is float|int but \str_replace() takes array|string
      Open

                      $e_vars_loop->url_label = str_replace("[x]", ($c + 1), $e_vars_loop->url_label);

      Argument 2 (replace) is int but \str_replace() takes array|string
      Open

                      $link = str_replace('[FROM]', $newstart, $url);

      Argument 2 (replace) is int but \str_replace() takes array|string
      Open

                      $link = str_replace('[FROM]', $prevstart, $url);

      Argument 2 (replace) is int but \str_replace() takes array|string
      Open

                      $e_vars->url = str_replace('[FROM]', $next_page, $url);

      Argument 2 (replace) is int but \str_replace() takes array|string
      Open

                                  $link = str_replace("[FROM]", ($perpage * ($c + $index_add)), $url);

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

                      $LAN_NP_NEXT         = $tp->toGlyph("icon-forward.glyph",false);

      Argument 2 (replace) is int but \str_replace() takes array|string
      Open

                              $link = str_replace("[FROM]", ($perpage * ($c + $index_add)), $url);

      There are no issues that match your filters.

      Category
      Status