mambax7/extcal

View on GitHub

Showing 691 of 1,163 total issues

Function fitOverlayBox has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

        fitOverlayBox: function (ratio, changed) {
            var x = this.x, y = this.y;
            if (this.overlayBox) {
                while (y.size > this.minHeight && x.size > this.minWidth
                && y.get('wsize') > y.get('fitsize')) {
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 showLoading has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

        showLoading: function () {
            if (this.onLoadStarted || this.loading) return;

            this.loading = hs.loading;
            var exp = 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 doFullExpand has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

        doFullExpand: function () {
            try {
                if (!hs.fireEvent(this, 'onDoFullExpand')) return;
                if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel);

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 animate has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

        animate: function (el, prop, opt) {
            var start,
                end,
                unit;
            if (typeof opt != 'object' || opt === null) {
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 imageCreate has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

        imageCreate: function () {
            var exp = this;

            var img = document.createElement('img');
            this.content = img;
Severity: Minor
Found in assets/js/highslide.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 fitOverlayBox has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

        fitOverlayBox: function (ratio, changed) {
            var x = this.x, y = this.y;
            if (this.overlayBox) {
                while (y.size > this.minHeight && x.size > this.minWidth
                && y.get('wsize') > y.get('fitsize')) {
Severity: Minor
Found in assets/js/highslide.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 addSlideshow has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

        addSlideshow: function (options) {
            var sg = options.slideshowGroup;
            if (typeof sg == 'object') {
                for (var i = 0; i < sg.length; i++) {
                    var o = {};
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 __construct has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function __construct($values)
    {
        if (isset($values['rrule_freq'])) {
            $this->_rrule_freq = $values['rrule_freq'];
        }
Severity: Minor
Found in class/Form/FormRecurRules.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 orderedWeekdays has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public static function orderedWeekdays($Calendar, $format = 'long')
    {
        $days = self::weekdayNames($format);

        if (isset($Calendar->tableHelper)) {
Severity: Minor
Found in class/pear/Calendar/Util/Textual.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 bExtcalMinicalAddEventToArray has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

function bExtcalMinicalAddEventToArray($event, &$eventsArray, $timeHandler, $startMonth, $endMonth, $cats)
{
    // Utility::echoArray($event);
    // exit;
    // $d1 = date("j, m, Y", $startMonth);
Severity: Minor
Found in blocks/minical.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 getMax has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function getMax(\CriteriaCompo $criteria = null, $max = '*')
    {
        $field   = '';
        $groupby = false;
        if (isset($criteria) && null !== $criteria) {
Severity: Minor
Found in class/ExtcalPersistableObjectHandler.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 getList has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function getList(\CriteriaElement $criteria = null, $limit = 0, $start = 0)
    {
        $ret = [];
        if (null === $criteria) {
            $criteria = new \CriteriaCompo();
Severity: Minor
Found in class/ExtcalPersistableObjectHandler.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 getCount has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function getCount(\CriteriaElement $criteria = null)
    {
        $field   = '';
        $groupby = false;
        if (isset($criteria) && null !== $criteria) {
Severity: Minor
Found in class/ExtcalPersistableObjectHandler.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 getSum has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function getSum(\CriteriaCompo $criteria = null, $sum = '*')
    {
        $field   = '';
        $groupby = false;
        if (isset($criteria) && null !== $criteria) {
Severity: Minor
Found in class/ExtcalPersistableObjectHandler.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

Method getList has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getList(\CriteriaElement $criteria = null, $limit = 0, $start = 0)
    {
        $ret = [];
        if (null === $criteria) {
            $criteria = new \CriteriaCompo();
Severity: Minor
Found in class/ExtcalPersistableObjectHandler.php - About 1 hr to fix

    Method createCategory has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function createCategory($data)
        {
            $cat = $this->create();
            $cat->setVars($data);
            $this->insert($cat);
    Severity: Minor
    Found in class/CategoryHandler.php - About 1 hr to fix

      Function focus has 26 lines of code (exceeds 25 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 1 hr to fix

        Method monthNames has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function monthNames($format = 'long')
            {
                $formats = [
                    'one'   => 'b',
                    'two'   => 'b',
        Severity: Minor
        Found in class/pear/Calendar/Util/Textual.php - About 1 hr to fix

          Method orderedWeekdays has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function orderedWeekdays($Calendar, $format = 'long')
              {
                  $days = self::weekdayNames($format);
          
                  if (isset($Calendar->tableHelper)) {
          Severity: Minor
          Found in class/pear/Calendar/Util/Textual.php - About 1 hr to fix

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