mambax7/extcal

View on GitHub
class/EventHandler.php

Summary

Maintainability
F
1 mo
Test Coverage

File EventHandler.php has 1695 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace XoopsModules\Extcal;

/*
Severity: Major
Found in class/EventHandler.php - About 4 days to fix

    Method getOccurTS has 410 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getOccurTS($month, $year, $dayCode)
        {
            if (0 === mb_strpos($dayCode, 'MD')) {
                if ('' != mb_substr($dayCode, 2)) {
                    return \mktime(0, 0, 0, $month, mb_substr($dayCode, 2), $year);
    Severity: Major
    Found in class/EventHandler.php - About 2 days to fix

      Function getOccurTS has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring.
      Open

          public function getOccurTS($month, $year, $dayCode)
          {
              if (0 === mb_strpos($dayCode, 'MD')) {
                  if ('' != mb_substr($dayCode, 2)) {
                      return \mktime(0, 0, 0, $month, mb_substr($dayCode, 2), $year);
      Severity: Minor
      Found in class/EventHandler.php - About 1 day 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 getEventForm has 326 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getEventForm($siteSide = 'user', $mode = 'new', $data = null)
          {
              /** @var Helper $helper */
              $helper          = Helper::getInstance();
              $categoryHandler = $helper->getHandler(\_EXTCAL_CLN_CAT);
      Severity: Major
      Found in class/EventHandler.php - About 1 day to fix

        Function getEventForm has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring.
        Open

            public function getEventForm($siteSide = 'user', $mode = 'new', $data = null)
            {
                /** @var Helper $helper */
                $helper          = Helper::getInstance();
                $categoryHandler = $helper->getHandler(\_EXTCAL_CLN_CAT);
        Severity: Minor
        Found in class/EventHandler.php - About 1 day 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 getRecurEventToDisplay has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
        Open

            public function getRecurEventToDisplay($event, $periodStart, $periodEnd)
            {
                $recuEvents   = [];
                $eventOptions = \explode('|', $event['event_recur_rules']);
        
        
        Severity: Minor
        Found in class/EventHandler.php - About 7 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 addEventToCalArray has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
        Open

            public function addEventToCalArray(&$event, &$eventsArray, $startPeriod, $endPeriod)
            {
                global $timeHandler, $xoopsUser, $month, $year;
        
                // Calculating the start and the end of the event
        Severity: Minor
        Found in class/EventHandler.php - About 6 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

        EventHandler has 47 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class EventHandler extends ExtcalPersistableObjectHandler
        {
            private $extcalPerm;
            private $extcalTime;
        
        
        Severity: Minor
        Found in class/EventHandler.php - About 6 hrs to fix

          Method getRecurEventToDisplay has 145 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getRecurEventToDisplay($event, $periodStart, $periodEnd)
              {
                  $recuEvents   = [];
                  $eventOptions = \explode('|', $event['event_recur_rules']);
          
          
          Severity: Major
          Found in class/EventHandler.php - About 5 hrs to fix

            Function getSearchEvents has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getSearchEvents(
                    $year = 0,
                    $month = 0,
                    $day = 0,
                    $cat = 0,
            Severity: Minor
            Found in class/EventHandler.php - About 2 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 getSearchEvents has 67 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getSearchEvents(
                    $year = 0,
                    $month = 0,
                    $day = 0,
                    $cat = 0,
            Severity: Major
            Found in class/EventHandler.php - About 2 hrs to fix

              Method getSearchEvent3 has 60 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getSearchEvent3(
                      $queryarray,
                      $andor,
                      $limit,
                      $offset,
              Severity: Major
              Found in class/EventHandler.php - About 2 hrs to fix

                Function getSearchEvent3 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function getSearchEvent3(
                        $queryarray,
                        $andor,
                        $limit,
                        $offset,
                Severity: Minor
                Found in class/EventHandler.php - About 2 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 getEventsUniques has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getEventsUniques($criteres)
                    {
                        $cat = 0;
                        //        while (list($k, $v) = each($criteres)) {
                        foreach ($criteres as $k => $v) {
                Severity: Major
                Found in class/EventHandler.php - About 2 hrs to fix

                  Function getEventsUniques has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function getEventsUniques($criteres)
                      {
                          $cat = 0;
                          //        while (list($k, $v) = each($criteres)) {
                          foreach ($criteres as $k => $v) {
                  Severity: Minor
                  Found in class/EventHandler.php - About 2 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 getRecurRules has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function getRecurRules($parm)
                      {
                          //Utility::echoArray($parm);exit;
                  
                          // If this isn't a reccuring event
                  Severity: Major
                  Found in class/EventHandler.php - About 2 hrs to fix

                    Method getEventsRecurents has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getEventsRecurents($criteres)
                        {
                            //        while (list($k, $v) = each($criteres)) {
                            foreach ($criteres as $k => $v) {
                                ${$k} = $v;
                    Severity: Major
                    Found in class/EventHandler.php - About 2 hrs to fix

                      Function getRecurRules has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function getRecurRules($parm)
                          {
                              //Utility::echoArray($parm);exit;
                      
                              // If this isn't a reccuring event
                      Severity: Minor
                      Found in class/EventHandler.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 addEventToCalArray has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function addEventToCalArray(&$event, &$eventsArray, $startPeriod, $endPeriod)
                          {
                              global $timeHandler, $xoopsUser, $month, $year;
                      
                              // Calculating the start and the end of the event
                      Severity: Minor
                      Found in class/EventHandler.php - About 1 hr to fix

                        Function getEventsRecurents has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function getEventsRecurents($criteres)
                            {
                                //        while (list($k, $v) = each($criteres)) {
                                foreach ($criteres as $k => $v) {
                                    ${$k} = $v;
                        Severity: Minor
                        Found in class/EventHandler.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 getSearchEvents has 11 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                $year = 0,
                                $month = 0,
                                $day = 0,
                                $cat = 0,
                                $queryarray = null,
                        Severity: Major
                        Found in class/EventHandler.php - About 1 hr to fix

                          Method getSearchEvent3 has 8 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  $queryarray,
                                  $andor,
                                  $limit,
                                  $offset,
                                  $userId,
                          Severity: Major
                          Found in class/EventHandler.php - About 1 hr to fix

                            Method getSearchEvent2 has 7 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                public function getSearchEvent2($year, $month, $day, $cat, $searchExp, $andor, $orderBy)
                            Severity: Major
                            Found in class/EventHandler.php - About 50 mins to fix

                              Method getSearchEvent has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  public function getSearchEvent($queryarray, $andor, $limit, $offset, $userId, $user)
                              Severity: Minor
                              Found in class/EventHandler.php - About 45 mins to fix

                                Function addCatSelectCriteria has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public function addCatSelectCriteria($criteria, $cats = null)
                                    {
                                        if (!\is_array($cats) && $cats > 0) {
                                            $criteria->add(new \Criteria('cat_id', $cats));
                                        }
                                Severity: Minor
                                Found in class/EventHandler.php - About 45 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 getSearchEvent2 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public function getSearchEvent2($year, $month, $day, $cat, $searchExp, $andor, $orderBy)
                                    {
                                        global $xoopsDB, $xoopsUser;
                                
                                        if (isset($xoopsUser)) {
                                Severity: Minor
                                Found in class/EventHandler.php - About 45 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

                                Method getEventWeekCriteria has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    public function getEventWeekCriteria($day, $month, $year, $cat = 0, $nbDays = 7)
                                Severity: Minor
                                Found in class/EventHandler.php - About 35 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                                  return $ts + (\_EXTCAL_TS_DAY * $i);
                                  Severity: Major
                                  Found in class/EventHandler.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                    return $ts + (\_EXTCAL_TS_DAY * ($i - 7));
                                    Severity: Major
                                    Found in class/EventHandler.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                                      return $ts + (\_EXTCAL_TS_DAY * $i);
                                      Severity: Major
                                      Found in class/EventHandler.php - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                            return $ts;
                                        Severity: Major
                                        Found in class/EventHandler.php - About 30 mins to fix

                                          Avoid too many return statements within this method.
                                          Open

                                                              return $ts;
                                          Severity: Major
                                          Found in class/EventHandler.php - About 30 mins to fix

                                            Avoid too many return statements within this method.
                                            Open

                                                            return $ts + (\_EXTCAL_TS_DAY * $i);
                                            Severity: Major
                                            Found in class/EventHandler.php - About 30 mins to fix

                                              Avoid too many return statements within this method.
                                              Open

                                                                  return $ts;
                                              Severity: Major
                                              Found in class/EventHandler.php - About 30 mins to fix

                                                Avoid too many return statements within this method.
                                                Open

                                                                    return $ts;
                                                Severity: Major
                                                Found in class/EventHandler.php - About 30 mins to fix

                                                  Avoid too many return statements within this method.
                                                  Open

                                                                      return $ts;
                                                  Severity: Major
                                                  Found in class/EventHandler.php - About 30 mins to fix

                                                    Avoid too many return statements within this method.
                                                    Open

                                                                    return $ts + (\_EXTCAL_TS_DAY * $i);
                                                    Severity: Major
                                                    Found in class/EventHandler.php - About 30 mins to fix

                                                      Avoid too many return statements within this method.
                                                      Open

                                                                      return $ts + (\_EXTCAL_TS_DAY * $i);
                                                      Severity: Major
                                                      Found in class/EventHandler.php - About 30 mins to fix

                                                        Avoid too many return statements within this method.
                                                        Open

                                                                        return $ts + (\_EXTCAL_TS_DAY * ($i - 7));
                                                        Severity: Major
                                                        Found in class/EventHandler.php - About 30 mins to fix

                                                          Avoid too many return statements within this method.
                                                          Open

                                                                          return $ts + (\_EXTCAL_TS_DAY * ($i - 7));
                                                          Severity: Major
                                                          Found in class/EventHandler.php - About 30 mins to fix

                                                            Avoid too many return statements within this method.
                                                            Open

                                                                            return $ts + (\_EXTCAL_TS_DAY * $i);
                                                            Severity: Major
                                                            Found in class/EventHandler.php - About 30 mins to fix

                                                              Avoid too many return statements within this method.
                                                              Open

                                                                              return $ts + (\_EXTCAL_TS_DAY * $i);
                                                              Severity: Major
                                                              Found in class/EventHandler.php - About 30 mins to fix

                                                                Avoid too many return statements within this method.
                                                                Open

                                                                                return $ts + (\_EXTCAL_TS_DAY * ($i - 7));
                                                                Severity: Major
                                                                Found in class/EventHandler.php - About 30 mins to fix

                                                                  Avoid too many return statements within this method.
                                                                  Open

                                                                                  return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                  Severity: Major
                                                                  Found in class/EventHandler.php - About 30 mins to fix

                                                                    Avoid too many return statements within this method.
                                                                    Open

                                                                                    return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                    Severity: Major
                                                                    Found in class/EventHandler.php - About 30 mins to fix

                                                                      Avoid too many return statements within this method.
                                                                      Open

                                                                                      return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                      Severity: Major
                                                                      Found in class/EventHandler.php - About 30 mins to fix

                                                                        Avoid too many return statements within this method.
                                                                        Open

                                                                                        return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                        Severity: Major
                                                                        Found in class/EventHandler.php - About 30 mins to fix

                                                                          Avoid too many return statements within this method.
                                                                          Open

                                                                                          return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                          Severity: Major
                                                                          Found in class/EventHandler.php - About 30 mins to fix

                                                                            Avoid too many return statements within this method.
                                                                            Open

                                                                                            return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                            Severity: Major
                                                                            Found in class/EventHandler.php - About 30 mins to fix

                                                                              Avoid too many return statements within this method.
                                                                              Open

                                                                                              return 0;
                                                                              Severity: Major
                                                                              Found in class/EventHandler.php - About 30 mins to fix

                                                                                Avoid too many return statements within this method.
                                                                                Open

                                                                                                return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                                Severity: Major
                                                                                Found in class/EventHandler.php - About 30 mins to fix

                                                                                  Avoid too many return statements within this method.
                                                                                  Open

                                                                                                  return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                                  Severity: Major
                                                                                  Found in class/EventHandler.php - About 30 mins to fix

                                                                                    Avoid too many return statements within this method.
                                                                                    Open

                                                                                                    return $ts + (\_EXTCAL_TS_DAY * ($i - 7));
                                                                                    Severity: Major
                                                                                    Found in class/EventHandler.php - About 30 mins to fix

                                                                                      Avoid too many return statements within this method.
                                                                                      Open

                                                                                                          return $ts;
                                                                                      Severity: Major
                                                                                      Found in class/EventHandler.php - About 30 mins to fix

                                                                                        Avoid too many return statements within this method.
                                                                                        Open

                                                                                                        return $ts + (\_EXTCAL_TS_DAY * ($i - 7));
                                                                                        Severity: Major
                                                                                        Found in class/EventHandler.php - About 30 mins to fix

                                                                                          Avoid too many return statements within this method.
                                                                                          Open

                                                                                                          return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                                          Severity: Major
                                                                                          Found in class/EventHandler.php - About 30 mins to fix

                                                                                            Avoid too many return statements within this method.
                                                                                            Open

                                                                                                            return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                                            Severity: Major
                                                                                            Found in class/EventHandler.php - About 30 mins to fix

                                                                                              Avoid too many return statements within this method.
                                                                                              Open

                                                                                                              return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                                              Severity: Major
                                                                                              Found in class/EventHandler.php - About 30 mins to fix

                                                                                                Avoid too many return statements within this method.
                                                                                                Open

                                                                                                                return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                                                Severity: Major
                                                                                                Found in class/EventHandler.php - About 30 mins to fix

                                                                                                  Avoid too many return statements within this method.
                                                                                                  Open

                                                                                                                  return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                                                  Severity: Major
                                                                                                  Found in class/EventHandler.php - About 30 mins to fix

                                                                                                    Avoid too many return statements within this method.
                                                                                                    Open

                                                                                                                    return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                                                    Severity: Major
                                                                                                    Found in class/EventHandler.php - About 30 mins to fix

                                                                                                      Avoid too many return statements within this method.
                                                                                                      Open

                                                                                                                      return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                                                      Severity: Major
                                                                                                      Found in class/EventHandler.php - About 30 mins to fix

                                                                                                        Avoid too many return statements within this method.
                                                                                                        Open

                                                                                                                            return $ts;
                                                                                                        Severity: Major
                                                                                                        Found in class/EventHandler.php - About 30 mins to fix

                                                                                                          Avoid too many return statements within this method.
                                                                                                          Open

                                                                                                                          return $ts + (\_EXTCAL_TS_DAY * ($i - 7));
                                                                                                          Severity: Major
                                                                                                          Found in class/EventHandler.php - About 30 mins to fix

                                                                                                            Avoid too many return statements within this method.
                                                                                                            Open

                                                                                                                            return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                                                            Severity: Major
                                                                                                            Found in class/EventHandler.php - About 30 mins to fix

                                                                                                              Avoid too many return statements within this method.
                                                                                                              Open

                                                                                                                              return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                                                              Severity: Major
                                                                                                              Found in class/EventHandler.php - About 30 mins to fix

                                                                                                                Avoid too many return statements within this method.
                                                                                                                Open

                                                                                                                                return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                                                                Severity: Major
                                                                                                                Found in class/EventHandler.php - About 30 mins to fix

                                                                                                                  Avoid too many return statements within this method.
                                                                                                                  Open

                                                                                                                                  return $ts + (\_EXTCAL_TS_DAY * $i);
                                                                                                                  Severity: Major
                                                                                                                  Found in class/EventHandler.php - About 30 mins to fix

                                                                                                                    Function getRecurEnd has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        public function getRecurEnd($data, $parm)
                                                                                                                        {
                                                                                                                            if (!$this->getIsRecur($parm)) {
                                                                                                                                return 0;
                                                                                                                            }
                                                                                                                    Severity: Minor
                                                                                                                    Found in class/EventHandler.php - About 25 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

                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                switch ($reccurMode) {
                                                                                                                                    case 'daily':
                                                                                                                    
                                                                                                                                        $reccurOptions['rrule_freq']           = 'daily';
                                                                                                                                        $reccurOptions['rrule_daily_interval'] = $eventOptions[0];
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 1 other location - About 1 day to fix
                                                                                                                    class/EventHandler.php on lines 953..990

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 271.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                switch ($reccurMode) {
                                                                                                                                    case 'daily':
                                                                                                                    
                                                                                                                                        $reccurOptions['rrule_freq']           = 'daily';
                                                                                                                                        $reccurOptions['rrule_daily_interval'] = $eventOptions[0];
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 1 other location - About 1 day to fix
                                                                                                                    class/EventHandler.php on lines 1019..1056

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 271.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                if (\class_exists('XoopsFormEditor')) {
                                                                                                                                    $options['name']   = 'event_address';
                                                                                                                                    $options['value']  = $event_address;
                                                                                                                                    $options['rows']   = 5;
                                                                                                                                    $options['cols']   = '100%';
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 1 other location - About 6 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1145..1159

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 210.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                            if (\class_exists('XoopsFormEditor')) {
                                                                                                                                $options['name']   = 'event_desc';
                                                                                                                                $options['value']  = $desc;
                                                                                                                                $options['rows']   = 5;
                                                                                                                                $options['cols']   = '100%';
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 1 other location - About 6 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1206..1220

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 210.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 7 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '-1MO':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, \date('t', \mktime(0, 0, 0, $month, 1, $year)), $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $i         = 0;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 6 other locations - About 3 hrs to fix
                                                                                                                    class/EventHandler.php on lines 2059..2073
                                                                                                                    class/EventHandler.php on lines 2089..2103
                                                                                                                    class/EventHandler.php on lines 2104..2118
                                                                                                                    class/EventHandler.php on lines 2119..2133
                                                                                                                    class/EventHandler.php on lines 2134..2148
                                                                                                                    class/EventHandler.php on lines 2149..2163

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 142.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 7 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '-1SU':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, \date('t', \mktime(0, 0, 0, $month, 1, $year)), $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $i         = 0;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 6 other locations - About 3 hrs to fix
                                                                                                                    class/EventHandler.php on lines 2074..2088
                                                                                                                    class/EventHandler.php on lines 2089..2103
                                                                                                                    class/EventHandler.php on lines 2104..2118
                                                                                                                    class/EventHandler.php on lines 2119..2133
                                                                                                                    class/EventHandler.php on lines 2134..2148
                                                                                                                    class/EventHandler.php on lines 2149..2163

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 142.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 7 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '-1TU':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, \date('t', \mktime(0, 0, 0, $month, 1, $year)), $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $i         = 0;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 6 other locations - About 3 hrs to fix
                                                                                                                    class/EventHandler.php on lines 2059..2073
                                                                                                                    class/EventHandler.php on lines 2074..2088
                                                                                                                    class/EventHandler.php on lines 2104..2118
                                                                                                                    class/EventHandler.php on lines 2119..2133
                                                                                                                    class/EventHandler.php on lines 2134..2148
                                                                                                                    class/EventHandler.php on lines 2149..2163

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 142.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 7 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '-1WE':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, \date('t', \mktime(0, 0, 0, $month, 1, $year)), $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $i         = 0;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 6 other locations - About 3 hrs to fix
                                                                                                                    class/EventHandler.php on lines 2059..2073
                                                                                                                    class/EventHandler.php on lines 2074..2088
                                                                                                                    class/EventHandler.php on lines 2089..2103
                                                                                                                    class/EventHandler.php on lines 2119..2133
                                                                                                                    class/EventHandler.php on lines 2134..2148
                                                                                                                    class/EventHandler.php on lines 2149..2163

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 142.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 7 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '-1TH':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, \date('t', \mktime(0, 0, 0, $month, 1, $year)), $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $i         = 0;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 6 other locations - About 3 hrs to fix
                                                                                                                    class/EventHandler.php on lines 2059..2073
                                                                                                                    class/EventHandler.php on lines 2074..2088
                                                                                                                    class/EventHandler.php on lines 2089..2103
                                                                                                                    class/EventHandler.php on lines 2104..2118
                                                                                                                    class/EventHandler.php on lines 2134..2148
                                                                                                                    class/EventHandler.php on lines 2149..2163

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 142.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 7 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '-1SA':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, \date('t', \mktime(0, 0, 0, $month, 1, $year)), $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $i         = 0;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 6 other locations - About 3 hrs to fix
                                                                                                                    class/EventHandler.php on lines 2059..2073
                                                                                                                    class/EventHandler.php on lines 2074..2088
                                                                                                                    class/EventHandler.php on lines 2089..2103
                                                                                                                    class/EventHandler.php on lines 2104..2118
                                                                                                                    class/EventHandler.php on lines 2119..2133
                                                                                                                    class/EventHandler.php on lines 2134..2148

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 142.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 7 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '-1FR':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, \date('t', \mktime(0, 0, 0, $month, 1, $year)), $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $i         = 0;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 6 other locations - About 3 hrs to fix
                                                                                                                    class/EventHandler.php on lines 2059..2073
                                                                                                                    class/EventHandler.php on lines 2074..2088
                                                                                                                    class/EventHandler.php on lines 2089..2103
                                                                                                                    class/EventHandler.php on lines 2104..2118
                                                                                                                    class/EventHandler.php on lines 2119..2133
                                                                                                                    class/EventHandler.php on lines 2149..2163

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 142.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                        public function addCatPermCriteria(\CriteriaCompo $criteria, $user)
                                                                                                                        {
                                                                                                                            $authorizedAccessCats = $this->extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
                                                                                                                            $count                = \count($authorizedAccessCats);
                                                                                                                            if ($count > 0) {
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 1 other location - About 2 hrs to fix
                                                                                                                    class/CategoryHandler.php on lines 183..198

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 138.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                if (!empty($event_picture1)) {
                                                                                                                                    $file_tray->addElement(new \XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture1 . "' name='image' id='image' alt=''><br><br>"));
                                                                                                                                    $check_del_img = new \XoopsFormCheckBox('', 'delimg_1');
                                                                                                                                    $check_del_img->addOption(1, \_MD_EXTCAL_DEL_IMG);
                                                                                                                                    $file_tray->addElement($check_del_img);
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 1 other location - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1274..1283

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 137.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                if (!empty($event_picture2)) {
                                                                                                                                    $file_tray->addElement(new \XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture2 . "' name='image' id='image' alt=''><br><br>"));
                                                                                                                                    $check_del_img = new \XoopsFormCheckBox('', 'delimg_2');
                                                                                                                                    $check_del_img->addOption(1, \_MD_EXTCAL_DEL_IMG);
                                                                                                                                    $file_tray->addElement($check_del_img);
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 1 other location - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1254..1263

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 137.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '2SU':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 7, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (0 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '2TU':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 7, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (2 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '3MO':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 14, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (1 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '2TH':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 7, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (4 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '3FR':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 14, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (5 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '1FR':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 1, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (5 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '3SA':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 14, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (6 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '2FR':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 7, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (5 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '1SA':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 1, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (6 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '2SA':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 7, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (6 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '2MO':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 7, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (1 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '2WE':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 7, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (3 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '3WE':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 14, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (3 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '4SU':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 21, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (0 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '1TH':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 1, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (4 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '3TH':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 14, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (4 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '3TU':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 14, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (2 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '1TU':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 1, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (2 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '3SU':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 14, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (0 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '1SU':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 1, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (0 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '1MO':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 1, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (1 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '1WE':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 1, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (3 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '4TU':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 21, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (2 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '4SA':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 21, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (6 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '4WE':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 21, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (3 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '4MO':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 21, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (1 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '4TH':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 21, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (4 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2033..2045
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 28 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                case '4FR':
                                                                                                                    
                                                                                                                                    $ts        = \mktime(0, 0, 0, $month, 21, $year);
                                                                                                                                    $dayOfWeek = \date('w', $ts);
                                                                                                                                    $ts        = (5 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 1695..1707
                                                                                                                    class/EventHandler.php on lines 1708..1720
                                                                                                                    class/EventHandler.php on lines 1721..1733
                                                                                                                    class/EventHandler.php on lines 1734..1746
                                                                                                                    class/EventHandler.php on lines 1747..1759
                                                                                                                    class/EventHandler.php on lines 1760..1772
                                                                                                                    class/EventHandler.php on lines 1773..1785
                                                                                                                    class/EventHandler.php on lines 1786..1798
                                                                                                                    class/EventHandler.php on lines 1799..1811
                                                                                                                    class/EventHandler.php on lines 1812..1824
                                                                                                                    class/EventHandler.php on lines 1825..1837
                                                                                                                    class/EventHandler.php on lines 1838..1850
                                                                                                                    class/EventHandler.php on lines 1851..1863
                                                                                                                    class/EventHandler.php on lines 1864..1876
                                                                                                                    class/EventHandler.php on lines 1877..1889
                                                                                                                    class/EventHandler.php on lines 1890..1902
                                                                                                                    class/EventHandler.php on lines 1903..1915
                                                                                                                    class/EventHandler.php on lines 1916..1928
                                                                                                                    class/EventHandler.php on lines 1929..1941
                                                                                                                    class/EventHandler.php on lines 1942..1954
                                                                                                                    class/EventHandler.php on lines 1955..1967
                                                                                                                    class/EventHandler.php on lines 1968..1980
                                                                                                                    class/EventHandler.php on lines 1981..1993
                                                                                                                    class/EventHandler.php on lines 1994..2006
                                                                                                                    class/EventHandler.php on lines 2007..2019
                                                                                                                    class/EventHandler.php on lines 2020..2032
                                                                                                                    class/EventHandler.php on lines 2046..2058

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 132.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                                while (false !== ($myrow = $xoopsDB->fetchArray($result))) {
                                                                                                                                    $ret[$i]['image'] = 'assets/images/icons/extcal.gif';
                                                                                                                                    $ret[$i]['link']  = 'event.php?event=' . $myrow['event_id'];
                                                                                                                                    $ret[$i]['title'] = $myrow['event_title'];
                                                                                                                                    $ret[$i]['time']  = $myrow['event_submitdate'];
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 1 other location - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 2347..2354

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 121.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                            while (false !== ($myrow = $xoopsDB->fetchArray($result))) {
                                                                                                                                $ret[$i]['image'] = 'assets/images/icons/extcal.gif';
                                                                                                                                $ret[$i]['link']  = 'event.php?event=' . $myrow['event_id'];
                                                                                                                                $ret[$i]['title'] = $myrow['event_title'];
                                                                                                                                $ret[$i]['time']  = $myrow['event_submitdate'];
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 1 other location - About 2 hrs to fix
                                                                                                                    class/EventHandler.php on lines 2446..2453

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 121.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                        public function getEventWithNotApprove($eventId, $skipPerm = false)
                                                                                                                        {
                                                                                                                            $user = $GLOBALS['xoopsUser'];
                                                                                                                    
                                                                                                                            $criteriaCompo = new \CriteriaCompo();
                                                                                                                    Severity: Major
                                                                                                                    Found in class/EventHandler.php and 1 other location - About 1 hr to fix
                                                                                                                    class/LocationHandler.php on lines 49..61

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 104.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                        public function getCalendarCriteriaCompo($start, $end, $cat = 0, $user = null)
                                                                                                                        {
                                                                                                                            $criteriaCompo = $this->getCriteriaCompo($start, $end, $cat, $user);
                                                                                                                            if (!Helper::getInstance()->getConfig('diplay_past_event_cal')) {
                                                                                                                                $criteriaCompo->add(new \Criteria('event_end', \time(), '>'));
                                                                                                                    Severity: Minor
                                                                                                                    Found in class/EventHandler.php and 1 other location - About 45 mins to fix
                                                                                                                    class/EventHandler.php on lines 692..700

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 95.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                        public function getListCriteriaCompo($start, $end, $cat = 0, $user = null)
                                                                                                                        {
                                                                                                                            $criteriaCompo = $this->getCriteriaCompo($start, $end, $cat, $user);
                                                                                                                            if (!Helper::getInstance()->getConfig('diplay_past_event_list')) {
                                                                                                                                $criteriaCompo->add(new \Criteria('event_end', \time(), '>'));
                                                                                                                    Severity: Minor
                                                                                                                    Found in class/EventHandler.php and 1 other location - About 45 mins to fix
                                                                                                                    class/EventHandler.php on lines 674..682

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 95.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    There are no issues that match your filters.

                                                                                                                    Category
                                                                                                                    Status