mambax7/extcal

View on GitHub

Showing 691 of 1,163 total issues

Function destroyOverlays has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

        destroyOverlays: function () {
            if (!this.overlays.length) return;
            if (this.slideshow) {
                var c = this.slideshow.controls;
                if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c);
Severity: Minor
Found in assets/js/highslide-full.js - About 1 hr 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 calcExpanded has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

        calcExpanded: function () {
            var exp = this.exp;
            this.justify = 'auto';

            // get alignment
Severity: Minor
Found in assets/js/highslide-full.js - About 1 hr 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 awake has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

        awake: function () {
            try {

                hs.expanders[this.key] = this;

Severity: Minor
Found in assets/js/highslide-full.js - About 1 hr 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 init has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

        init: function () {
            if (!hs.container) {

                hs.ieLt7 = hs.ie && hs.uaVersion < 7;
                hs.ieLt9 = hs.ie && hs.uaVersion < 9;
Severity: Minor
Found in assets/js/highslide-with-gallery.js - About 1 hr 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 calcExpanded has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

        calcExpanded: function () {
            var exp = this.exp;
            this.justify = 'auto';

            // get alignment
Severity: Minor
Found in assets/js/highslide-with-gallery.js - About 1 hr 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 xoops_module_update_extcal has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function xoops_module_update_extcal(\XoopsModule $xoopsModule, $previousVersion = null)
{
    $helper     = Helper::getInstance();
    $newVersion = $helper->getModule()->getVar('version') * 100;
    if ($newVersion == $previousVersion) {
Severity: Minor
Found in include/update_function.php - About 1 hr 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 getRecurRules has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    public function getRecurRules($parm)
    {
        //Utility::echoArray($parm);exit;

        // If this isn't a reccuring event
Severity: Minor
Found in class/EventHandler.php - About 1 hr 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 htmlSizeOperations has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        htmlSizeOperations: function () {

            this.setObjContainerSize(this.innerContent);


Severity: Minor
Found in assets/js/highslide-full.js - About 1 hr to fix

    Function justify has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            justify: function (p, moveOnly) {
                var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
    
                if (tgt && tgt.match(/ /)) {
                    tgtArr = tgt.split(' ');
    Severity: Minor
    Found in assets/js/highslide-full.js - About 1 hr to fix

      Function justify has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              justify: function (p, moveOnly) {
                  var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
      
                  if (tgt && tgt.match(/ /)) {
                      tgtArr = tgt.split(' ');
      Severity: Minor
      Found in assets/js/highslide-with-gallery.js - About 1 hr to fix

        Function keyHandler has 46 lines of code (exceeds 25 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
                    if (!hs.fireEvent(hs, 'onKeyDown', e)) return true;
        Severity: Minor
        Found in assets/js/highslide-full.js - About 1 hr to fix

          Method adjustDate has 46 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function adjustDate(&$y, &$m, &$d, &$h, &$i, &$s)
              {
                  if ($s < 0) {
                      $m -= floor($s / _EXTCAL_TS_MINUTE);
                      $s = -$s % _EXTCAL_TS_MINUTE;
          Severity: Minor
          Found in class/pear/Calendar/Engine/PearDate.php - About 1 hr to fix

            Method addEventToCalArray has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function addEventToCalArray(&$event, &$eventsArray, $startPeriod, $endPeriod)
                {
                    global $timeHandler, $xoopsUser, $month, $year;
            
                    // Calculating the start and the end of the event
            Severity: Minor
            Found in class/EventHandler.php - About 1 hr to fix

              Method getForm has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getForm($action = false)
                  {
                      global $xoopsDB;
              
                      if (false === $action) {
              Severity: Minor
              Found in class/Location.php - About 1 hr to fix

                Method render has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function render()
                    {
                        $addBaliseTable = $this->_addBaliseTable;
                        $title          = $this->getTitle();
                        $ret            = '';
                Severity: Minor
                Found in class/TableForm.php - About 1 hr to fix

                  Function keyHandler has 45 lines of code (exceeds 25 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-with-gallery.js - About 1 hr to fix

                    Function init has 45 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: Minor
                    Found in assets/js/highslide.js - About 1 hr to fix

                      Method xoops_module_update_extcal has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function xoops_module_update_extcal(\XoopsModule $xoopsModule, $previousVersion = null)
                      {
                          $helper     = Helper::getInstance();
                          $newVersion = $helper->getModule()->getVar('version') * 100;
                          if ($newVersion == $previousVersion) {
                      Severity: Minor
                      Found in include/update_function.php - About 1 hr to fix

                        Method create has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public static function create($type, $y = 2000, $m = 1, $d = 1, $h = 0, $i = 0, $s = 0)
                            {
                                $firstDay = defined('CALENDAR_FIRST_DAY_OF_WEEK') ? CALENDAR_FIRST_DAY_OF_WEEK : 1;
                                switch ($type) {
                                    case 'Day':
                        Severity: Minor
                        Found in class/pear/Calendar/Factory.php - About 1 hr to fix

                          Function run has 44 lines of code (exceeds 25 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 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language