XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Method OutputThumbnail has 82 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function OutputThumbnail()
    {
        $this->purgeTempFiles();

        if (!$this->useRawIMoutput && !is_resource($this->gdimg_output)) {
Severity: Major
Found in thumbs/phpthumb.class.php - About 3 hrs to fix

    Function crossfade has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

            crossfade: function (up, to, from) {
                if (!up) return;
                var exp = this,
                    last = this.last,
                    x = this.x,
    Severity: Minor
    Found in assets/images/js/highslide/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

    Function getTemplateContent has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

            public function getTemplateContent($name)
            {
                $name  = strtoupper($name);
                $index = $this->iteration[$name];
    
    
    Severity: Minor
    Found in include/patTemplate.php - 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 get_coming_schedule has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

            public function get_coming_schedule($get_target = '', $num = 5)
            {
                // if( $get_target == '' ) $get_target = $_SERVER['SCRIPT_NAME'] ;
    
                $ret = '';
    Severity: Minor
    Found in class/APCal.php - 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 applyPathSegment has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

        public function applyPathSegment(&$segments, $segment)
        {
            if ($segment == '.') {
                return; // always remove
            }
    Severity: Minor
    Found in thumbs/phpthumb.class.php - 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 setOutputFormat has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

        public function setOutputFormat()
        {
            static $alreadyCalled = false;
            if ($this->thumbnailFormat && $alreadyCalled) {
                return true;
    Severity: Minor
    Found in thumbs/phpthumb.class.php - 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

    Method CalculateThumbnailDimensions has 81 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function CalculateThumbnailDimensions()
        {
            $this->DebugMessage('CalculateThumbnailDimensions() starting with [W,H,sx,sy,sw,sh] initially set to ['
                                . $this->source_width
                                . ','
    Severity: Major
    Found in thumbs/phpthumb.class.php - About 3 hrs to fix

      File categories.php has 299 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 admin/categories.php - About 3 hrs to fix

        Function Expander has 79 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            hs.Expander = function (a, params, custom, contentType) {
                if (document.readyState && hs.ie && !hs.isReady) {
                    hs.addEventListener(document, 'ready', function () {
                        new hs.Expander(a, params, custom, contentType);
                    });
        Severity: Major
        Found in assets/images/js/highslide/highslide-with-gallery.js - About 3 hrs to fix

          Method get_blockarray_date_event has 78 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public function get_blockarray_date_event($get_target = '')
                  {
                      // if( $get_target == '' ) $get_target = $_SERVER['SCRIPT_NAME'] ;
          
                      // ������׻����Ĥġ�WHERE��δ�֤˴ؤ���������
          Severity: Major
          Found in class/APCal_xoops.php - About 3 hrs to fix

            Function initSlideshow has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
            Open

                    initSlideshow: function () {
                        if (!this.last) {
                            for (var i = 0; i < hs.slideshows.length; i++) {
                                var ss = hs.slideshows[i], sg = ss.slideshowGroup;
                                if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup)
            Severity: Minor
            Found in assets/images/js/highslide/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 correctRatio has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
            Open

                    correctRatio: function (ratio) {
                        var x = this.x,
                            y = this.y,
                            changed = false,
                            xSize = Math.min(x.full, x.size),
            Severity: Minor
            Found in assets/images/js/highslide/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 correctRatio has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
            Open

                    correctRatio: function (ratio) {
                        var x = this.x,
                            y = this.y,
                            changed = false,
                            xSize = Math.min(x.full, x.size),
            Severity: Minor
            Found in assets/images/js/highslide/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 correctRatio has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
            Open

                    correctRatio: function (ratio) {
                        var x = this.x,
                            y = this.y,
                            changed = false,
                            xSize = Math.min(x.full, x.size),
            Severity: Minor
            Found in assets/images/js/highslide/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

            Function initSlideshow has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
            Open

                    initSlideshow: function () {
                        if (!this.last) {
                            for (var i = 0; i < hs.slideshows.length; i++) {
                                var ss = hs.slideshows[i], sg = ss.slideshowGroup;
                                if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup)
            Severity: Minor
            Found in assets/images/js/highslide/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

            Function correctRatio has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
            Open

                    correctRatio: function (ratio) {
                        var x = this.x,
                            y = this.y,
                            changed = false,
                            xSize = Math.min(x.full, x.size),
            Severity: Minor
            Found in assets/images/js/highslide/highslide-with-html.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 get_sql_set has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
            Open

                    public function get_sql_set($cols)
                    {
                        $ret = '';
            
                        foreach ($cols as $col => $types) {
            Severity: Minor
            Found in class/APCal.php - 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 convertmycontacts has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
            Open

            function convertmycontacts($strcontact)
            {
                // Ermitteln aller einzelnen Wörter von Kontakt aus Termin piCal
                // Umwandeln der einzelnen Namen in Link auf Benutzerkonto, wenn Name ein Mitgliedsname ist
                $strsearch    = ' ';
            Severity: Minor
            Found in include/ro_contacthandler.php - 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 applyUnsharpMask has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
            Open

                public static function applyUnsharpMask(&$img, $amount, $radius, $threshold)
                {
            
                    // $img is an image that is already created within php using
                    // imgcreatetruecolor. No url! $img must be a truecolor image.
            Severity: Minor
            Found in thumbs/phpthumb.unsharp.php - 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

            Method makeShort has 77 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public function makeShort($str)
                    {
                        $replacements = array(
                            'Ä' => 'Ae',
                            'Ü' => 'Ue',
            Severity: Major
            Found in class/APCal.php - About 3 hrs to fix
              Severity
              Category
              Status
              Source
              Language