mambax7/extcal

View on GitHub

Showing 691 of 1,163 total issues

Function setSelection has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function setSelection($events)
    {
        $daysInMonth = $this->cE->getDaysInMonth($this->year, $this->month);
        for ($i = 1; $i <= $daysInMonth; ++$i) {
            $stamp1 = $this->cE->dateToStamp($this->year, $this->month, $i);
Severity: Minor
Found in class/pear/Calendar/docs/examples/20.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 modifierCouleur has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

        $colorHexa,
        $incrementRouge,
        $incrementVert,
        $incrementBleu,
        $plancherRouge = 0,
Severity: Major
Found in class/ColorTools.php - About 1 hr to fix

    Function sizeOverlayBox has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            sizeOverlayBox: function (doWrapper, doPanels) {
                var overlayBox = this.overlayBox,
                    x = this.x,
                    y = this.y;
                hs.setStyles(overlayBox, {
    Severity: Minor
    Found in assets/js/highslide-with-gallery.js - About 1 hr to fix

      Function sizeOverlayBox has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              sizeOverlayBox: function (doWrapper, doPanels) {
                  var overlayBox = this.overlayBox,
                      x = this.x,
                      y = this.y;
                  hs.setStyles(overlayBox, {
      Severity: Minor
      Found in assets/js/highslide-full.js - About 1 hr to fix

        Function close has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                close: function () {
                    if (this.isClosing || !this.isExpanded) return;
                    if (this.transitions[1] == 'crossfade' && hs.upcoming) {
                        hs.getExpander(hs.upcoming).cancelLoading();
                        hs.upcoming = null;
        Severity: Minor
        Found in assets/js/highslide-full.js - About 1 hr to fix

          Function Outline has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              hs.Outline = function (outlineType, onLoad) {
                  this.onLoad = onLoad;
                  this.outlineType = outlineType;
                  var v = hs.uaVersion, tr;
          
          
          Severity: Minor
          Found in assets/js/highslide-with-gallery.js - About 1 hr to fix

            Function Outline has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                hs.Outline = function (outlineType, onLoad) {
                    this.onLoad = onLoad;
                    this.outlineType = outlineType;
                    var v = hs.uaVersion, tr;
            
            
            Severity: Minor
            Found in assets/js/highslide-full.js - About 1 hr to fix

              Function GetSwfVer has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function GetSwfVer() {
                  // NS/Opera version >= 3 check for Flash plugin in plugin array
                  var flashVer = -1;
              
                  if (navigator.plugins != null && navigator.plugins.length > 0) {
              Severity: Minor
              Found in assets/js/AC_RunActiveContent.js - About 1 hr to fix

                Function justify has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        justify: function (p, moveOnly) {
                            var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
                
                            var hasMovedMin = false;
                
                
                Severity: Minor
                Found in assets/js/highslide.js - About 1 hr to fix

                  Method bExtcalUpcomingEdit has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function bExtcalUpcomingEdit($options)
                  {
                      global $xoopsUser;
                  
                      /** @var Helper $helper */
                  Severity: Minor
                  Found in blocks/upcoming.php - About 1 hr to fix

                    Function sizeOverlayBox has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            sizeOverlayBox: function (doWrapper, doPanels) {
                                var overlayBox = this.overlayBox,
                                    x = this.x,
                                    y = this.y;
                                hs.setStyles(overlayBox, {
                    Severity: Minor
                    Found in assets/js/highslide.js - About 1 hr to fix

                      Function Outline has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          hs.Outline = function (outlineType, onLoad) {
                              this.onLoad = onLoad;
                              this.outlineType = outlineType;
                              var v = hs.uaVersion, tr;
                      
                      
                      Severity: Minor
                      Found in assets/js/highslide.js - About 1 hr to fix

                        Method __construct has 30 lines of code (exceeds 25 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

                          Method xoops_module_install_extcal has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function xoops_module_install_extcal(\XoopsModule $xoopsModule)
                          {
                              require_once \dirname(__DIR__) . '/preloads/autoloader.php';
                          
                              $moduleDirName = \basename(\dirname(__DIR__));
                          Severity: Minor
                          Found in include/oninstall.php - About 1 hr to fix

                            Method loadTableFromArrayWithReplace has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function loadTableFromArrayWithReplace($table, $data, $search, $replace)
                            {
                                /** @var \XoopsMySQLDatabase $db */
                                $db = \XoopsDatabaseFactory::getDatabaseConnection();
                            
                            
                            Severity: Minor
                            Found in testdata/index.php - About 1 hr to fix

                              Method PclTarExtractList has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function PclTarExtractList($p_tarname, $p_filelist, $p_path = './', $p_remove_path = '', $p_mode = '')
                                  {
                                      TrFctStart(__FILE__, __LINE__, 'PclTarExtractList', "tar=$p_tarname, list, path=$p_path, remove_path='$p_remove_path', mode='$p_mode'");
                                      $v_result = 1;
                              
                              
                              Severity: Minor
                              Found in class/pcltar.lib.php - About 1 hr to fix

                                Method PclTarDelete has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function PclTarDelete($p_tarname, $p_filelist, $p_mode = '')
                                    {
                                        TrFctStart(__FILE__, __LINE__, 'PclTarDelete', "tar='$p_tarname', list='$p_filelist', mode='$p_mode'");
                                        $v_result = 1;
                                
                                
                                Severity: Minor
                                Found in class/pcltar.lib.php - About 1 hr to fix

                                  Method PclTarUpdate has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function PclTarUpdate($p_tarname, $p_filelist, $p_mode = '', $p_add_dir = '', $p_remove_dir = '')
                                      {
                                          TrFctStart(__FILE__, __LINE__, 'PclTarUpdate', "tar='$p_tarname', list='$p_filelist', mode='$p_mode'");
                                          $v_result = 1;
                                  
                                  
                                  Severity: Minor
                                  Found in class/pcltar.lib.php - About 1 hr to fix

                                    Method convertResultSet has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function convertResultSet($result, $idAsKey = false, $asObject = true)
                                        {
                                            $ret = [];
                                            while (false !== ($myrow = $this->db->fetchArray($result))) {
                                                $obj = $this->create(false);
                                    Severity: Minor
                                    Found in class/ExtcalPersistableObjectHandler.php - About 1 hr to fix

                                      Function close has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              close: function () {
                                                  if (this.isClosing || !this.isExpanded) return;
                                                  if (this.transitions[1] == 'crossfade' && hs.upcoming) {
                                                      hs.getExpander(hs.upcoming).cancelLoading();
                                                      hs.upcoming = null;
                                      Severity: Minor
                                      Found in assets/js/highslide-with-gallery.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language