mambax7/extcal

View on GitHub

Showing 691 of 1,163 total issues

Function wrapperMouseHandler has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

        wrapperMouseHandler: function (e) {
            try {
                if (!e) e = window.event;
                var over = /mouseover/i.test(e.type);
                if (!e.target) e.target = e.srcElement; // ie
Severity: Minor
Found in assets/js/highslide.js - About 2 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 extcal_getDefautminicalOption has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

function extcal_getDefautminicalOption(&$options)
{
    // 0|0|150|225|1|3|10|0|1|1,2|| |120|120
    for ($h = 0; $h <= 13; ++$h) {
        if (!isset($options[$h])) {
Severity: Minor
Found in blocks/minical.php - About 2 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 PclTarHandleReadHeader has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    function PclTarHandleReadHeader($v_binary_data, &$v_header)
    {
        TrFctStart(__FILE__, __LINE__, 'PclTarHandleReadHeader', '');
        $v_result = 1;

Severity: Minor
Found in class/pcltar.lib.php - About 2 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 deleteDirectory has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    public static function deleteDirectory($src)
    {
        // Only continue if user is a 'global' Admin
        if (!($GLOBALS['xoopsUser'] instanceof \XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
            return false;
Severity: Minor
Found in class/Common/FilesManagement.php - About 2 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 contentLoaded has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        contentLoaded: function () {
            try {
                if (!this.content) return;
                this.content.onload = null;
                if (this.onLoadStarted) return;
Severity: Major
Found in assets/js/highslide-with-gallery.js - About 2 hrs to fix

    Method getSearchEvent3 has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getSearchEvent3(
            $queryarray,
            $andor,
            $limit,
            $offset,
    Severity: Major
    Found in class/EventHandler.php - About 2 hrs to fix

      Function mouseClickHandler has 59 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              mouseClickHandler: function (e) {
                  if (!e) e = window.event;
                  if (e.button > 1) return true;
                  if (!e.target) e.target = e.srcElement;
      
      
      Severity: Major
      Found in assets/js/highslide-full.js - About 2 hrs to fix

        Function changeSize has 59 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                changeSize: function (up, to, dur) {
                    // transition
                    var trans = this.transitions,
                        other = up ? (this.last ? this.last.a : null) : hs.upcoming,
                        t = (trans[1] && other
        Severity: Major
        Found in assets/js/highslide-with-gallery.js - About 2 hrs to fix

          Method agenda_getCanevas has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function agenda_getCanevas($ts, $hStart, $hEnd, $mPlage = 15, $nbJours = 1, $formatDate = '', $formatJour = 'H:i')
          {
              $helper = Helper::getInstance();
              $jour   = date('d', $ts);
              $mois   = date('m', $ts);
          Severity: Major
          Found in include/agenda_fnc.php - About 2 hrs to fix

            Function init has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    init: function () {
                        if (!hs.container) {
            
                            hs.ieLt7 = hs.ie && hs.uaVersion < 7;
                            hs.ieLt9 = hs.ie && hs.uaVersion < 9;
            Severity: Major
            Found in assets/js/highslide-full.js - About 2 hrs to fix

              File pcltrace.lib.php has 262 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              // --------------------------------------------------------------------------------
              // PhpConcept Library (PCL) Trace 1.0
              // --------------------------------------------------------------------------------
              // License GNU/GPL - Vincent Blavet - Janvier 2001
              Severity: Minor
              Found in class/pcltrace.lib.php - About 2 hrs to fix

                Function DetectFlashVer has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                Open

                function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) {
                    versionStr = GetSwfVer();
                    if (versionStr == -1) {
                        return false;
                    } else if (versionStr != 0) {
                Severity: Minor
                Found in assets/js/AC_RunActiveContent.js - About 2 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 getSearchEvent3 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function getSearchEvent3(
                        $queryarray,
                        $andor,
                        $limit,
                        $offset,
                Severity: Minor
                Found in class/EventHandler.php - About 2 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 56 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        positionOverlay: function (overlay) {
                            var p = overlay.position || 'middle center',
                                offX = overlay.offsetX,
                                offY = overlay.offsetY;
                            if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay);
                Severity: Major
                Found in assets/js/highslide.js - About 2 hrs to fix

                  Method isBlockCloned has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options)
                      {
                          xoops_loadLanguage('admin', 'system');
                          xoops_loadLanguage('admin/blocksadmin', 'system');
                          xoops_loadLanguage('admin/groups', 'system');
                  Severity: Major
                  Found in admin/blocksadmin.php - About 2 hrs to fix

                    Method getEventsUniques has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getEventsUniques($criteres)
                        {
                            $cat = 0;
                            //        while (list($k, $v) = each($criteres)) {
                            foreach ($criteres as $k => $v) {
                    Severity: Major
                    Found in class/EventHandler.php - About 2 hrs to fix

                      Function init has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              init: function () {
                                  if (!hs.container) {
                      
                                      hs.ieLt7 = hs.ie && hs.uaVersion < 7;
                                      hs.ieLt9 = hs.ie && hs.uaVersion < 9;
                      Severity: Major
                      Found in assets/js/highslide-with-gallery.js - About 2 hrs to fix

                        Method objectToArray has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function objectToArray($objects, $externalKeys = [], $format = 's')
                            {
                                static $cache;
                                if (!\is_array($externalKeys)) {
                                    $externalKeys = [$externalKeys];
                        Severity: Major
                        Found in class/ExtcalPersistableObjectHandler.php - About 2 hrs to fix

                          File Utility.php has 254 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          
                          namespace XoopsModules\Extcal;
                          
                          /**
                          Severity: Minor
                          Found in class/Utility.php - About 2 hrs to fix

                            Function close has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                            Open

                                    close: function () {
                                        if (this.isClosing || !this.isExpanded) return;
                                        if (this.transitions[1] == 'crossfade' && hs.upcoming) {
                                            hs.getExpander(hs.upcoming).cancelLoading();
                                            hs.upcoming = null;
                            Severity: Minor
                            Found in assets/js/highslide-full.js - About 2 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