HuasoFoundries/jpgraph

View on GitHub

Showing 6,805 of 6,805 total issues

The class MGraph has 34 fields. Consider redesigning MGraph to keep the number of fields under 15.
Open

class MGraph
{
    public $title;
    public $subtitle;
    public $subsubtitle;
Severity: Minor
Found in src/graph/MGraph.php by phpmd

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

The class PolarAxis has 19 fields. Consider redesigning PolarAxis to keep the number of fields under 15.
Open

class PolarAxis extends Axis
{
    private $angle_step        = 15;
    private $angle_color       = 'lightgray';
    private $angle_label_color = 'black';
Severity: Minor
Found in src/graph/PolarAxis.php by phpmd

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

The class HeaderProperty has 16 fields. Consider redesigning HeaderProperty to keep the number of fields under 15.
Open

class HeaderProperty
{
    public $grid;
    public $iShowLabels             = true;
    public $iShowGrid               = true;
Severity: Minor
Found in src/graph/HeaderProperty.php by phpmd

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

The class Legend has 32 fields. Consider redesigning Legend to keep the number of fields under 15.
Open

class Legend
{
    public $txtcol          = [];
    public $font_family     = FF_DEFAULT;
    public $font_style      = FS_NORMAL;
Severity: Minor
Found in src/graph/Legend.php by phpmd

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

The class LinearScale has 17 fields. Consider redesigning LinearScale to keep the number of fields under 15.
Open

class LinearScale
{
    public $textscale = false; // Just a flag to let the Plot class find out if
    // we are a textscale or not. This is a cludge since
    // this information is available in Graph::axtype but
Severity: Minor
Found in src/graph/LinearScale.php by phpmd

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

The class GanttBar has 17 fields. Consider redesigning GanttBar to keep the number of fields under 15.
Open

class GanttBar extends GanttPlotObject
{
    public $progress;
    public $leftMark;
    public $rightMark;
Severity: Minor
Found in src/plot/GanttBar.php by phpmd

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

The class BarPlot has 22 fields. Consider redesigning BarPlot to keep the number of fields under 15.
Open

class BarPlot extends Plot
{
    public $fill                = false;
    public $fill_color          = 'lightblue'; // Default is to fill with light blue
    public $iPattern            = -1;
Severity: Minor
Found in src/plot/BarPlot.php by phpmd

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

The class LegendStyle has 23 fields. Consider redesigning LegendStyle to keep the number of fields under 15.
Open

class LegendStyle
{
    public $iLength           = 40;
    public $iMargin           = 20;
    public $iBottomMargin     = 5;
Severity: Minor
Found in src/plot/LegendStyle.php by phpmd

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

The class PiePlot has 42 fields. Consider redesigning PiePlot to keep the number of fields under 15.
Open

class PiePlot
{
    public $posx                     = 0.5;
    public $posy                     = 0.5;
    public $is_using_plot_theme      = false;
Severity: Minor
Found in src/plot/PiePlot.php by phpmd

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

The class Plot has 18 fields. Consider redesigning Plot to keep the number of fields under 15.
Open

class Plot
{
    public $numpoints = 0;
    public $value;
    public $legend         = '';
Severity: Minor
Found in src/plot/Plot.php by phpmd

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

The class WindrosePlot has 36 fields. Consider redesigning WindrosePlot to keep the number of fields under 15.
Open

class WindrosePlot
{
    private $iAntiAlias          = true;
    private $iData               = [];
    public $iX                   = 0.5;
Severity: Minor
Found in src/plot/WindrosePlot.php by phpmd

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

The class PlotMark has 25 fields. Consider redesigning PlotMark to keep the number of fields under 15.
Open

class PlotMark
{
    public $title;
    public $show = true;
    public $type;
Severity: Minor
Found in src/plot/PlotMark.php by phpmd

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

The class GTextTableCell has 30 fields. Consider redesigning GTextTableCell to keep the number of fields under 15.
Open

class GTextTableCell
{
    public $iColSpan      = 1;
    public $iRowSpan      = 1;
    public $iMarginLeft   = 5;
Severity: Minor
Found in src/text/GTextTableCell.php by phpmd

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

The class GTextTable has 17 fields. Consider redesigning GTextTable to keep the number of fields under 15.
Open

class GTextTable
{
    public $iCells   = [];
    public $iSize    = [0, 0]; // Need to be public since they are used by the cell
    private $iWidth  = 0;
Severity: Minor
Found in src/text/GTextTable.php by phpmd

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

The class Text has 27 fields. Consider redesigning Text to keep the number of fields under 15.
Open

class Text //extends Graph
{
    public $t;
    public $x      = 0;
    public $y      = 0;
Severity: Minor
Found in src/text/Text.php by phpmd

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

Method ShadowRectangle has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function ShadowRectangle($xl, $yu, $xr, $yl, $fcolor = false, $shadow_width = 4, $shadow_color = 'darkgray', $useAlpha = true)
    {
        // This is complicated by the fact that we must also handle the case where
        // the reactangle has no fill color
        $xl = floor($xl);
Severity: Minor
Found in src/image/Image.php - About 1 hr to fix

    Method SetFont has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function SetFont()
        {
            $numargs = func_num_args();
            if ($numargs == 2 || $numargs == 3) {
                $aFF = func_get_arg(0);
    Severity: Minor
    Found in src/text/GTextTable.php - About 1 hr to fix

      Method ApplyPlot has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function ApplyPlot($plot)
          {
              switch (get_class($plot)) {
                  case 'BarPlot':
                          $plot->Clear();
      Severity: Minor
      Found in src/themes/SoftyTheme.php - About 1 hr to fix

        Method File has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function File($family, $style = FS_NORMAL, $font_path = null)
            {
                $fam = @$this->font_files[$family];
                if (!$fam) {
                    Util\JpGraphError::RaiseL(25046, $family); //("Specified TTF font family (id=$family) is unknown or does not exist. Please note that TTF fonts are not distributed with JpGraph for copyright reasons. You can find the MS TTF WEB-fonts (arial, courier etc) for download at http://corefonts.sourceforge.net/");
        Severity: Minor
        Found in src/text/TTF.php - About 1 hr to fix

          Method GetPlotsYMinMax has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function GetPlotsYMinMax($bPlots)
              {
                  $aPlots = array_filter($bPlots, function ($plot) {
                      //\Kint::dump($plot, $plot instanceof Plot\Plot);
                      return $plot instanceof Plot\Plot;
          Severity: Minor
          Found in src/graph/Graph.php - About 1 hr to fix
            Severity
            Category
            Status
            Source
            Language