mambax7/publisher

View on GitHub

Showing 355 of 3,032 total issues

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

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

    protected function convertForJapanese($str)
    {
        // no action, if not flag
        if (!\defined('_PUBLISHER_FLAG_JP_CONVERT')) {
            return $str;
Severity: Minor
Found in class/Item.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 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

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

                easeOutQuint: 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 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 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 easeOutCirc has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          easeOutCirc: 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 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 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 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 easeInOutElastic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    easeInOutElastic: 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 easeInCubic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                        easeInCubic: 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 easeInExpo has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                            easeInExpo: 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