XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Function import_ics_via_upload has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        public function import_ics_via_upload($userfile)
        {
            // ics�ե�����򥯥饤����ȥޥ��󤫤饢�åץ?�ɤ����ɹ���
            require_once "$this->base_path/class/iCal_parser.php";
            $ical           = new iCal_parser();
Severity: Minor
Found in class/APCal.php - About 35 mins 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_formtextdateselect has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        public function get_formtextdateselect($name, $ymd, $long_ymdn = '')
        {
            require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';

            // day of week starting
Severity: Minor
Found in class/APCal_xoops.php - About 35 mins 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 load has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function load($lpData, &$hdrLen)
    {
        $hdrLen = 0;

        $this->m_lpVer = substr($lpData, 0, 6);
Severity: Minor
Found in thumbs/phpthumb.gif.php - About 35 mins 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 setSourceData has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function setSourceData($rawImageData, $sourceFilename = '')
    {
        //$this->resetObject();
        //$this->sourceFilename = null;
        $this->rawImageData = $rawImageData;
Severity: Minor
Found in thumbs/phpthumb.class.php - About 35 mins 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 isInOpenBasedir has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function isInOpenBasedir($path)
    {
        static $open_basedirs = null;
        if (is_null($open_basedirs)) {
            $ini_text = ini_get('open_basedir');
Severity: Minor
Found in thumbs/phpthumb.class.php - About 35 mins 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 ProportionalResize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public static function ProportionalResize($old_width, $old_height, $new_width = false, $new_height = false)
    {
        $old_aspect_ratio = $old_width / $old_height;
        if (($new_width === false) && ($new_height === false)) {
            return false;
Severity: Minor
Found in thumbs/phpthumb.functions.php - About 35 mins 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 FunctionIsDisabled has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public static function FunctionIsDisabled($function)
    {
        static $DisabledFunctions = null;
        if (is_null($DisabledFunctions)) {
            $disable_functions_local  = explode(',', strtolower(@ini_get('disable_functions')));
Severity: Minor
Found in thumbs/phpthumb.functions.php - About 35 mins 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 Threshold has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function Threshold(&$gdimg, $cutoff)
    {
        $width  = imagesx($gdimg);
        $height = imagesy($gdimg);
        $cutoff = min(255, max(0, ($cutoff ?: 128)));
Severity: Minor
Found in thumbs/phpthumb.filters.php - About 35 mins 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 ImageCopyResampleBicubic has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public static function ImageCopyResampleBicubic(
        $dst_img,
        $src_img,
        $dst_x,
        $dst_y,
Severity: Minor
Found in thumbs/phpthumb.functions.php - About 35 mins 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 Negative has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function Negative(&$gdimg)
    {
        if (phpthumb_functions::version_compare_replacement(PHP_VERSION, '5.0.0', '>=')
            && phpthumb_functions::gd_is_bundled()
        ) {
Severity: Minor
Found in thumbs/phpthumb.filters.php - About 35 mins 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

Avoid too many return statements within this function.
Open

                    return false;
Severity: Major
Found in assets/js/jscalendar/calendar.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return false;
    Severity: Major
    Found in assets/images/js/highslide/highslide-full.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return true;
      Severity: Major
      Found in assets/images/js/highslide/highslide.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                            return false;
        Severity: Major
        Found in assets/images/js/highslide/highslide-full.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return false;
          Severity: Major
          Found in assets/images/js/highslide/highslide-with-gallery.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                        return true;
            Severity: Major
            Found in assets/images/js/highslide/highslide-with-gallery.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return true;
              Severity: Major
              Found in assets/images/js/highslide/highslide-full.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return false;
                Severity: Major
                Found in assets/images/js/highslide/highslide.js - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                      return $arr;
                  Severity: Major
                  Found in include/patTemplate.php - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return true;
                    Severity: Major
                    Found in assets/images/js/highslide/highslide-with-html.js - About 30 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language