mambax7/extcal

View on GitHub

Showing 691 of 1,163 total issues

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

function xoops_module_install_extcal(\XoopsModule $xoopsModule)
{
    // Create eXtCal upload directory
    $dir = XOOPS_ROOT_PATH . '/uploads/extcal';
    if (!is_dir($dir)) {
Severity: Minor
Found in include/install_function.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 setSelection has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function setSelection($sDates)
    {
        foreach ($sDates as $sDate) {
            foreach ($this->children as $key => $child) {
                if ($child->thisDay() == $sDate->thisDay() && $child->thisMonth() == $sDate->thisMonth()
Severity: Minor
Found in class/pear/Calendar/Week.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 setSelection has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function setSelection($sDates)
    {
        foreach ($sDates as $sDate) {
            if ($this->year == $sDate->thisYear()
                && $this->month == $sDate->thisMonth()
Severity: Minor
Found in class/pear/Calendar/Minute.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 bExtcalUpcomingByCategoryShow has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function bExtcalUpcomingByCategoryShow($options)
{
    global $xoopsUser;

    /** @var Helper $helper */
Severity: Minor
Found in blocks/category_events.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 getEditor has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public static function getEditor($helper = null, $options = null)
    {
        /** @var Helper $helper */
        if (null === $options) {
            $options           = [];
Severity: Minor
Found in class/Common/SysUtility.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 setSelection has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function setSelection($sDates)
    {
        foreach ($sDates as $sDate) {
            if ($this->year == $sDate->thisYear() && $this->month == $sDate->thisMonth()
                && $this->day == $sDate->thisDay()
Severity: Minor
Found in class/pear/Calendar/Hour.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 TrFctEnd has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function TrFctEnd($p_file, $p_line, $p_return = 1, $p_message = '')
    {
        global $g_pcl_trace_level;
        global $g_pcl_trace_mode;
        global $g_pcl_trace_filename;
Severity: Minor
Found in class/pcltrace.lib.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 TrFctStart has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function TrFctStart($p_file, $p_line, $p_name, $p_param = '', $p_message = '')
    {
        global $g_pcl_trace_level;
        global $g_pcl_trace_mode;
        global $g_pcl_trace_filename;
Severity: Minor
Found in class/pcltrace.lib.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 foncer has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function foncer($colorHexa, $plancher = 0, $plafond = 255)
    {
        $tMin = ['', $plancher, $plancher, $plancher];
        $tMax = ['', $plafond, $plafond, $plafond];

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

    public function deleteById($id, $force = false) //delete(\XoopsObject $object, $force = false)
    {
        if (\is_array($this->keyName)) {
            $clause = [];
            for ($i = 0, $iMax = \count($this->keyName); $i < $iMax; ++$i) {
Severity: Minor
Found in class/ExtcalPersistableObjectHandler.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 eclaircir has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public static function eclaircir($colorHexa, $plancher = 0, $plafond = 255)
    {
        $tMin = ['', $plancher, $plancher, $plancher];
        $tMax = ['', $plafond, $plafond, $plafond];

Severity: Minor
Found in class/ColorTools.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 true;
Severity: Major
Found in assets/js/highslide-full.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

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

      Avoid too many return statements within this function.
      Open

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

        Avoid too many return statements within this function.
        Open

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

          Avoid too many return statements within this function.
          Open

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

            Avoid too many return statements within this function.
            Open

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

              Avoid too many return statements within this function.
              Open

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

                Avoid too many return statements within this function.
                Open

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

                  Avoid too many return statements within this method.
                  Open

                          return $v_result;
                  Severity: Major
                  Found in class/pcltar.lib.php - About 30 mins to fix
                    Severity
                    Category
                    Status
                    Source
                    Language