mambax7/extcal

View on GitHub

Showing 691 of 1,163 total issues

Method getNavBarTabs has 115 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function getNavBarTabs($currentTab = '')
{
    /** @var Helper $helper */
    $helper = Helper::getInstance();

Severity: Major
Found in include/agenda_fnc.php - About 4 hrs to fix

    Function setSize has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
    Open

            setSize: function (i) {
                var exp = this.exp;
                if (exp.isImage && (exp.useBox || hs.padToMinWidth)) {
                    this.imgSize = i;
                    this.size = Math.max(this.size, this.imgSize);
    Severity: Minor
    Found in assets/js/highslide-full.js - About 4 hrs 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 createOverlay has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
    Open

            createOverlay: function (o) {
                var el = o.overlayId,
                    relToVP = (o.relativeTo == 'viewport' && !/panel$/.test(o.position));
                if (typeof el == 'string') el = hs.getNode(el);
                if (o.html) el = hs.createElement('div', {innerHTML: o.html});
    Severity: Minor
    Found in assets/js/highslide-full.js - About 4 hrs 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 focus has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
    Open

            focus: function () {
                this.wrapper.style.zIndex = hs.zIndexCounter += 2;
                // blur others
                for (var i = 0; i < hs.expanders.length; i++) {
                    if (hs.expanders[i] && i == hs.focusKey) {
    Severity: Minor
    Found in assets/js/highslide-full.js - About 4 hrs 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

    prototype has 35 functions (exceeds 20 allowed). Consider refactoring.
    Open

        hs.Expander.prototype = {
            error: function (e) {
                if (hs.debug) alert('Line ' + e.lineNumber + ': ' + e.message);
                else window.location.href = this.src;
            },
    Severity: Minor
    Found in assets/js/highslide.js - About 4 hrs to fix

      Function getOverlays has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

              getOverlays: function () {
                  this.getInline(['heading', 'caption'], true);
                  this.getNumber();
                  if (this.caption) hs.fireEvent(this, 'onAfterGetCaption');
                  if (this.heading) hs.fireEvent(this, 'onAfterGetHeading');
      Severity: Minor
      Found in assets/js/highslide-full.js - About 4 hrs 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 positionOverlay has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

              positionOverlay: function (overlay) {
                  var p = overlay.position || 'middle center',
                      relToVP = (overlay.relativeTo == 'viewport'),
                      offX = overlay.offsetX,
                      offY = overlay.offsetY;
      Severity: Minor
      Found in assets/js/highslide-full.js - About 4 hrs 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 run has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

              run: function () {
                  var xhr;
                  if (!this.src) this.src = hs.getSrc(this.a);
                  if (this.src.match('#')) {
                      var arr = this.src.split('#');
      Severity: Minor
      Found in assets/js/highslide-full.js - About 4 hrs 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 keyHandler has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

              keyHandler: function (e) {
                  if (!e) e = window.event;
                  if (!e.target) e.target = e.srcElement; // ie
                  if (typeof e.target.form != 'undefined') return true; // form element has focus
                  var exp = hs.getExpander();
      Severity: Minor
      Found in assets/js/highslide.js - About 4 hrs 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 positionOverlay has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

              positionOverlay: function (overlay) {
                  var p = overlay.position || 'middle center',
                      relToVP = (overlay.relativeTo == 'viewport'),
                      offX = overlay.offsetX,
                      offY = overlay.offsetY;
      Severity: Minor
      Found in assets/js/highslide-with-gallery.js - About 4 hrs 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

      File minical.php has 349 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /*
       * You may not change or alter any portion of this comment or credits
       * of supporting developers from this source code or any supporting source code
       * which is considered copyrighted (c) material of the original comment or credit authors.
      Severity: Minor
      Found in blocks/minical.php - About 4 hrs to fix

        Function getWrapperKey has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
        Open

                getWrapperKey: function (element, expOnly) {
                    var el, re = /^highslide-wrapper-([0-9]+)$/;
                    // 1. look in open expanders
                    el = element;
                    while (el.parentNode) {
        Severity: Minor
        Found in assets/js/highslide-full.js - About 4 hrs 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 getWrapperKey has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
        Open

                getWrapperKey: function (element, expOnly) {
                    var el, re = /^highslide-wrapper-([0-9]+)$/;
                    // 1. look in open expanders
                    el = element;
                    while (el.parentNode) {
        Severity: Minor
        Found in assets/js/highslide-with-gallery.js - About 4 hrs 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 htmlCreate has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
        Open

                htmlCreate: function () {
                    if (!hs.fireEvent(this, 'onBeforeGetContent')) return;
        
                    this.content = hs.getCacheBinding(this.a);
                    if (!this.content)
        Severity: Minor
        Found in assets/js/highslide-full.js - About 4 hrs 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 createOverlay has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
        Open

                createOverlay: function (o) {
                    var el = o.overlayId,
                        relToVP = (o.relativeTo == 'viewport' && !/panel$/.test(o.position));
                    if (typeof el == 'string') el = hs.getNode(el);
                    if (o.html) el = hs.createElement('div', {innerHTML: o.html});
        Severity: Minor
        Found in assets/js/highslide-with-gallery.js - About 4 hrs 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 getNavBarTabs has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
        Open

        function getNavBarTabs($currentTab = '')
        {
            /** @var Helper $helper */
            $helper = Helper::getInstance();
        
        
        Severity: Minor
        Found in include/agenda_fnc.php - About 4 hrs 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 sizeOverlayBox has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
        Open

                sizeOverlayBox: function (doWrapper, doPanels) {
                    var overlayBox = this.overlayBox,
                        x = this.x,
                        y = this.y;
                    hs.setStyles(overlayBox, {
        Severity: Minor
        Found in assets/js/highslide-full.js - About 3 hrs 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 onGraphicLoad has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
        Open

                onGraphicLoad: function () {
                    var o = this.offset = this.graphic.width / 4,
                        pos = [[0, 0], [0, -4], [-2, 0], [0, -8], 0, [-2, -8], [0, -2], [0, -6], [-2, -2]],
                        dim = {height: (2 * o) + 'px', width: (2 * o) + 'px'};
                    for (var i = 0; i <= 8; i++) {
        Severity: Minor
        Found in assets/js/highslide-full.js - About 3 hrs 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 onGraphicLoad has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
        Open

                onGraphicLoad: function () {
                    var o = this.offset = this.graphic.width / 4,
                        pos = [[0, 0], [0, -4], [-2, 0], [0, -8], 0, [-2, -8], [0, -2], [0, -6], [-2, -2]],
                        dim = {height: (2 * o) + 'px', width: (2 * o) + 'px'};
                    for (var i = 0; i <= 8; i++) {
        Severity: Minor
        Found in assets/js/highslide.js - About 3 hrs 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 onGraphicLoad has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
        Open

                onGraphicLoad: function () {
                    var o = this.offset = this.graphic.width / 4,
                        pos = [[0, 0], [0, -4], [-2, 0], [0, -8], 0, [-2, -8], [0, -2], [0, -6], [-2, -2]],
                        dim = {height: (2 * o) + 'px', width: (2 * o) + 'px'};
                    for (var i = 0; i <= 8; i++) {
        Severity: Minor
        Found in assets/js/highslide-with-gallery.js - About 3 hrs 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

        Severity
        Category
        Status
        Source
        Language