XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

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/images/js/highslide/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 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/images/js/highslide/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 check_browser_can_use_spaw has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

function check_browser_can_use_spaw()
{
    $browser = $_SERVER['HTTP_USER_AGENT'];
    // check if msie
    if (preg_match('/MSIE[^;]*/i', $browser, $msie)) {
Severity: Minor
Found in admin/myblockform.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 getVar has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

        public function getVar($template, $var)
        {
            //  should the var from a different template be used
            if (stristr($var, '.')) {
                list($template, $var) = explode('.', $var);
Severity: Minor
Found in include/patTemplate.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 _loadAllChildItemIds has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function _loadAllChildItemIds($itemId, &$childIds)
    {
        if (!empty($this->_itemTree[$itemId]['children'])) {
            $first_child = $this->_itemTree[$itemId]['children'];
            foreach ($first_child as $fcid) {
Severity: Minor
Found in admin/mygrouppermform.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 copy_templates_db2db has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

function copy_templates_db2db($tplset_from, $tplset_to, $whr_append = '1')
{
    global $db;

    // get tplfile and tplsource
Severity: Minor
Found in admin/mytplsadmin.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 addMenuTopArray has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function addMenuTopArray($options, $multi = true)
    {
        if (is_array($options)) {
            if ($multi === true) {
                foreach ($options as $k => $v) {
Severity: Minor
Found in class/adminMenu.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 get_submitter_info has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

        public function get_submitter_info($uid)
        {
            if ($uid <= 0) {
                return _GUESTS;
            }
Severity: Minor
Found in class/APCal_xoops.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 addMenuTabsArray has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function addMenuTabsArray($options, $multi = true)
    {
        if (is_array($options)) {
            if ($multi === true) {
                foreach ($options as $k => $v) {
Severity: Minor
Found in class/adminMenu.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 b_sitemap_APCal_base has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    function b_sitemap_APCal_base($moduleDirName)
    {
        global $xoopsConfig, $xoopsDB, $xoopsUser;
        $myts = MyTextSanitizer::getInstance();

Severity: Minor
Found in include/sitemap.plugin.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 get_sql_set has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function get_sql_set($event, $cols)
    {
        $ret = '';

        foreach ($cols as $col => $types) {
Severity: Minor
Found in class/iCal_parser.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 phpThumb has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function phpThumb()
    {
        $this->DebugTimingMessage('phpThumb() constructor', __FILE__, __LINE__);
        $this->DebugMessage('phpThumb() v' . $this->phpthumb_version, __FILE__, __LINE__);

Severity: Minor
Found in thumbs/phpthumb.class.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 CleanUpURLencoding has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public static function CleanUpURLencoding($url, $queryseperator = '&')
    {
        if (!preg_match('#^http#i', $url)) {
            return $url;
        }
Severity: Minor
Found in thumbs/phpthumb.functions.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 exif_info has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public static function exif_info()
    {
        static $exif_info = array();
        if (empty($exif_info)) {
            // based on code by johnschaefer at gmx dot de
Severity: Minor
Found in thumbs/phpthumb.functions.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 version_compare_replacement_sub has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public static function version_compare_replacement_sub($version1, $version2, $operator = '')
    {
        // If you specify the third optional operator argument, you can test for a particular relationship.
        // The possible operators are: <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne respectively.
        // Using this argument, the function will return 1 if the relationship is the one specified by the operator, 0 otherwise.
Severity: Minor
Found in thumbs/phpthumb.functions.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 showMonthsCombo has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Calendar.showMonthsCombo = function () {
    var cal = Calendar._C;
    if (!cal) {
        return false;
    }
Severity: Minor
Found in assets/js/jscalendar/calendar.js - About 1 hr to fix

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

            public function issue($salt = '', $timeout = 1800, $area = '')
            {
                global $xoopsModule;
                if ('' === $salt) {
                    if (function_exists('mcrypt_create_iv') && !defined('PHALANGER')) {
    Severity: Minor
    Found in include/gtickets.php - About 1 hr to fix

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

          public function deInterlace()
          {
              $data = $this->m_data;
      
              for ($i = 0; $i < 4; $i++) {
      Severity: Minor
      Found in thumbs/phpthumb.gif.php - About 1 hr to fix

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

                public function set_date($setdate)
                {
                    if (!(preg_match("/^([0-9][0-9]+)[-.\/]?([0-1]?[0-9])[-.\/]?([0-3]?[0-9])$/", $setdate, $regs)
                          && checkdate($regs[2], $regs[3], $regs[1]))
                    ) {
        Severity: Minor
        Found in class/APCal.php - About 1 hr to fix

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

              public function phpThumb()
              {
                  $this->DebugTimingMessage('phpThumb() constructor', __FILE__, __LINE__);
                  $this->DebugMessage('phpThumb() v' . $this->phpthumb_version, __FILE__, __LINE__);
          
          
          Severity: Minor
          Found in thumbs/phpthumb.class.php - About 1 hr to fix
            Severity
            Category
            Status
            Source
            Language