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;
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;
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;
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.
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;
Method getProperties
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getProperties()
{
$res = array(
$this->dtstamp,
$this->uid,
Method getProperties
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getProperties()
{
$res = array (
$this->dtstamp,
$this->uid,
Method getProperties
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getProperties()
{
$res = array(
$this->dtstamp,
$this->uid,
Function getValue
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getValue()
{
if (empty($this->values)) {
return null;
} else {
- Read upRead up
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';
- Read upRead up
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)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$weeks = 0,
$days = 0,
$hours = 0,
$minutes = 0,
$seconds = 0
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 '';
- Read upRead up
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 '';
}
- Read upRead up
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"