Showing 6,805 of 6,805 total issues
Method FilledRectangle2
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function FilledRectangle2($xl, $yu, $xr, $yl, $color1, $color2, $style = 1)
{
// Fill a rectangle with lines of two colors
if ($style === 1) {
// Horizontal stripe
Method Stroke
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke()
{
$n = strlen($this->iData);
if ($n == 0) {
return false;
Method SetupGraph
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function SetupGraph($graph)
{
// graph
/*
$img = $graph->img;
Method GetTicksFromMinMax
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function GetTicksFromMinMax($aMin, $aMax, $aType, $aMinor = false, $aEndPoints = false)
{
self::$starthour = date('G', $aMin);
self::$startmonth = date('n', $aMin);
self::$startday = date('j', $aMin);
Method GetHeaderHeight
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function GetHeaderHeight()
{
$img = $this->iImg;
$height = 1;
if ($this->minute->iShowLabels) {
Similar blocks of code found in 3 locations. Consider refactoring. Open
case DSUTILS_MONTH3:
if ($aMinor) {
// Set minor tick at start of each month
self::$minTickPositions[$j++] = mktime(0, 0, 0, $m, 1, $y);
}
- Read upRead up
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 102.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
case DSUTILS_MONTH6:
if ($aMinor) {
// Set minor tick at start of each month
self::$minTickPositions[$j++] = mktime(0, 0, 0, $m, 1, $y);
}
- Read upRead up
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 102.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
case DSUTILS_MONTH2:
if ($aMinor) {
// Set minor tick at start of each month
self::$minTickPositions[$j++] = mktime(0, 0, 0, $m, 1, $y);
}
- Read upRead up
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 102.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Method getHeight
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getHeight($aImg)
{
$scaling = 1; //$this->iAntiAlias ? 2 : 1 ;
if ($this->iSize > 0 && $this->iSize < 1) {
$this->iSize *= min($aImg->width, $aImg->height);
Method Min
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Min()
{
$nmax = 0;
list($xmin, $ysetmin) = $this->plots[0]->Min();
for ($i = 0; $i < safe_count($this->plots); ++$i) {
Method CakeSlice
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function CakeSlice($xc, $yc, $w, $h, $s, $e, $fillcolor = '', $arccolor = '')
{
$s = round($s);
$e = round($e);
$w = round($w);
Method SetupGraph
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function SetupGraph($graph)
{
// graph
/*
$img = $graph->img;
Method SetupGraph
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function SetupGraph($graph)
{
// graph
/*
$img = $graph->img;
Method SetupGraph
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function SetupGraph($graph)
{
// graph
/*
$img = $graph->img;
Method __construct
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($xdata, $ydata)
{
$this->y2 = [];
$this->xdata = $xdata;
$this->ydata = $ydata;
Method _autoSizeTable
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _autoSizeTable($aImg)
{
// Get maximum column width and row height
$m = $this->iSize[0];
$n = $this->iSize[1];
Method SetupGraph
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function SetupGraph($graph)
{
// graph
/*
$img = $graph->img;
Method SetupGraph
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function SetupGraph($graph)
{
// graph
/*
$img = $graph->img;
Method SetupGraph
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function SetupGraph($graph)
{
// graph
/*
$img = $graph->img;
Method SetupGraph
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function SetupGraph($graph)
{
// graph
/*
$img = $graph->img;