mambax7/publisher

View on GitHub

Showing 355 of 3,032 total issues

Function displayFlash has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    public function displayFlash($url, $width = false, $height = false)
    {
        if (!$width || !$height) {
            if (!$dimension = @\getimagesize($url)) {
                return "<a href='{$url}' target='_blank'>{$url}</a>";
Severity: Minor
Found in class/MyTextSanitizerExtension.php - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function highlight has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    public function highlight($text, $needle)
    {
        // Select pattern to use
        if ($this->simple) {
            $pattern   = '#(%s)#';
Severity: Minor
Found in class/Highlighter.php - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Consider simplifying this complex logical expression.
Open

            if ($oldtitle[$i] !== $title[$i]
                || $oldweight[$i] !== $weight[$i]
                || $oldvisible[$i] !== $visible[$i]
                || $oldside[$i] !== $side[$i]
                || $oldbcachetime[$i] !== $bcachetime[$i]
Severity: Major
Found in class/Common/Blocksadmin.php - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

    if (is_object($xoopsModule) && $xoopsModule->dirname() == $modversion['dirname'] && $xoopsModule->isactive()) {
        $isAdmin = false;
        if (is_object($GLOBALS['xoopsUser'])) {
            $isAdmin = $GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->getVar('mid'));
        }
    Severity: Major
    Found in xoops_version.php - About 40 mins to fix

      Function easeOutQuad has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              easeOutQuad: function (x, t, b, c, d) {
      Severity: Minor
      Found in assets/js/jquery.easing.js - About 35 mins to fix

        Function easeInBounce has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                easeInBounce: function (x, t, b, c, d) {
        Severity: Minor
        Found in assets/js/jquery.easing.js - About 35 mins to fix

          Function easeOutBounce has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  easeOutBounce: function (x, t, b, c, d) {
          Severity: Minor
          Found in assets/js/jquery.easing.js - About 35 mins to fix

            Function easeInOutBounce has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    easeInOutBounce: function (x, t, b, c, d) {
            Severity: Minor
            Found in assets/js/jquery.easing.js - About 35 mins to fix

              Function easeInOutQuint has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      easeInOutQuint: function (x, t, b, c, d) {
              Severity: Minor
              Found in assets/js/jquery.easing.js - About 35 mins to fix

                Function easeInSine has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        easeInSine: function (x, t, b, c, d) {
                Severity: Minor
                Found in assets/js/jquery.easing.js - About 35 mins to fix

                  Function easeInOutCirc has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          easeInOutCirc: function (x, t, b, c, d) {
                  Severity: Minor
                  Found in assets/js/jquery.easing.js - About 35 mins to fix

                    Function easeOutExpo has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            easeOutExpo: function (x, t, b, c, d) {
                    Severity: Minor
                    Found in assets/js/jquery.easing.js - About 35 mins to fix

                      Function easeOutQuart has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              easeOutQuart: function (x, t, b, c, d) {
                      Severity: Minor
                      Found in assets/js/jquery.easing.js - About 35 mins to fix

                        Function easeInOutQuart has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                easeInOutQuart: function (x, t, b, c, d) {
                        Severity: Minor
                        Found in assets/js/jquery.easing.js - About 35 mins to fix

                          Function easeInElastic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  easeInElastic: function (x, t, b, c, d) {
                          Severity: Minor
                          Found in assets/js/jquery.easing.js - About 35 mins to fix

                            Function easeInOutExpo has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    easeInOutExpo: function (x, t, b, c, d) {
                            Severity: Minor
                            Found in assets/js/jquery.easing.js - About 35 mins to fix

                              Function easeOutElastic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      easeOutElastic: function (x, t, b, c, d) {
                              Severity: Minor
                              Found in assets/js/jquery.easing.js - About 35 mins to fix

                                Function swing has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                        swing: function (x, t, b, c, d) {
                                Severity: Minor
                                Found in assets/js/jquery.easing.js - About 35 mins to fix

                                  Function easeInQuart has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                          easeInQuart: function (x, t, b, c, d) {
                                  Severity: Minor
                                  Found in assets/js/jquery.easing.js - About 35 mins to fix

                                    Function easeInQuad has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                            easeInQuad: function (x, t, b, c, d) {
                                    Severity: Minor
                                    Found in assets/js/jquery.easing.js - About 35 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language