jihoun/calendar

View on GitHub

Showing 14 of 14 total issues

ToDo has 35 functions (exceeds 20 allowed). Consider refactoring.
Open

class ToDo extends IComponent
{
    // The following are REQUIRED,
    // but MUST NOT occur more than once.
    protected $dtstamp;
Severity: Minor
Found in src/Component/ToDo.php - About 4 hrs to fix

    Event has 34 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Event extends IComponent
    {
        // The following are REQUIRED,
        // but MUST NOT occur more than once.
        protected $dtstamp;
    Severity: Minor
    Found in src/Component/Event.php - About 4 hrs to fix

      Journal has 27 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class Journal extends IComponent
      {
          // The following are REQUIRED,
          // but MUST NOT occur more than once.
          protected $dtstamp;
      Severity: Minor
      Found in src/Component/Journal.php - About 3 hrs to fix

        File ToDo.php has 258 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        namespace Jihoun\Calendar\Component;
        
        /**
         * Provide a grouping of calendar properties that describe a to-do.
        Severity: Minor
        Found in src/Component/ToDo.php - About 2 hrs to fix

          File Event.php has 252 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          namespace Jihoun\Calendar\Component;
          
          use \Jihoun\Calendar\Property as Property;
          
          
          Severity: Minor
          Found in src/Component/Event.php - About 2 hrs to fix

            Method getProperties has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function getProperties()
                {
                    $res = array(
                        $this->dtstamp,
                        $this->uid,
            Severity: Minor
            Found in src/Component/ToDo.php - About 1 hr to fix

              Method getProperties has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function getProperties()
                  {
                      $res = array (
                          $this->dtstamp,
                          $this->uid,
              Severity: Minor
              Found in src/Component/Event.php - About 1 hr to fix

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

                    private function getProperties()
                    {
                        $res = array(
                            $this->dtstamp,
                            $this->uid,
                Severity: Minor
                Found in src/Component/Journal.php - About 1 hr to fix

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

                      public function getValue()
                      {
                          if (empty($this->values)) {
                              return null;
                          } else {
                  Severity: Minor
                  Found in src/Property/ExceptionDateTimes.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 getValue has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function getValue()
                      {
                          $res = null;
                          if ($this->weeks!==0) {
                              $res = $this->weeks.'W';
                  Severity: Minor
                  Found in src/Property/Duration.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 __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public function __construct($statdesc, $code1, $code2 = 0, $code3 = null, $extData = null)
                  Severity: Minor
                  Found in src/Property/RequestStatus.php - About 35 mins to fix

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

                            $weeks = 0,
                            $days = 0,
                            $hours = 0,
                            $minutes = 0,
                            $seconds = 0
                    Severity: Minor
                    Found in src/Property/Duration.php - About 35 mins to fix

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

                          public function toString()
                          {
                              $value = $this->getValue();
                              if (is_null($value)) {
                                  return '';
                      Severity: Minor
                      Found in src/Property/IProperty.php - About 35 mins to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

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

                          public function toString()
                          {
                              if (empty($this->standardcList) && empty($this->daylightcList)) {
                                  return '';
                              }
                      Severity: Minor
                      Found in src/Component/TimeZone.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

                      Severity
                      Category
                      Status
                      Source
                      Language