PHP 7.2 compatibility
This commit is contained in:
parent
55689caa1d
commit
4635d39b4a
|
@ -100,7 +100,7 @@ $series2 = new DataSeries(
|
||||||
DataSeries::GROUPING_STANDARD, // plotGrouping
|
DataSeries::GROUPING_STANDARD, // plotGrouping
|
||||||
range(0, count($dataSeriesValues2) - 1), // plotOrder
|
range(0, count($dataSeriesValues2) - 1), // plotOrder
|
||||||
$dataSeriesLabels2, // plotLabel
|
$dataSeriesLabels2, // plotLabel
|
||||||
null, // plotCategory
|
[], // plotCategory
|
||||||
$dataSeriesValues2 // plotValues
|
$dataSeriesValues2 // plotValues
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ $series3 = new DataSeries(
|
||||||
DataSeries::GROUPING_STANDARD, // plotGrouping
|
DataSeries::GROUPING_STANDARD, // plotGrouping
|
||||||
range(0, count($dataSeriesValues2) - 1), // plotOrder
|
range(0, count($dataSeriesValues2) - 1), // plotOrder
|
||||||
$dataSeriesLabels3, // plotLabel
|
$dataSeriesLabels3, // plotLabel
|
||||||
null, // plotCategory
|
[], // plotCategory
|
||||||
$dataSeriesValues3 // plotValues
|
$dataSeriesValues3 // plotValues
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ class DataSeries
|
||||||
/**
|
/**
|
||||||
* Plot Style.
|
* Plot Style.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var null|string
|
||||||
*/
|
*/
|
||||||
private $plotStyle;
|
private $plotStyle;
|
||||||
|
|
||||||
|
@ -108,15 +108,15 @@ class DataSeries
|
||||||
*
|
*
|
||||||
* @param null|mixed $plotType
|
* @param null|mixed $plotType
|
||||||
* @param null|mixed $plotGrouping
|
* @param null|mixed $plotGrouping
|
||||||
* @param mixed $plotOrder
|
* @param int[] $plotOrder
|
||||||
* @param mixed $plotLabel
|
* @param DataSeriesValues[] $plotLabel
|
||||||
* @param mixed $plotCategory
|
* @param DataSeriesValues[] $plotCategory
|
||||||
* @param mixed $plotValues
|
* @param DataSeriesValues[] $plotValues
|
||||||
* @param null|mixed $plotDirection
|
* @param null|string $plotDirection
|
||||||
* @param null|mixed $smoothLine
|
* @param bool $smoothLine
|
||||||
* @param null|mixed $plotStyle
|
* @param null|string $plotStyle
|
||||||
*/
|
*/
|
||||||
public function __construct($plotType = null, $plotGrouping = null, $plotOrder = [], $plotLabel = [], $plotCategory = [], $plotValues = [], $plotDirection = null, $smoothLine = null, $plotStyle = null)
|
public function __construct($plotType = null, $plotGrouping = null, array $plotOrder = [], array $plotLabel = [], array $plotCategory = [], array $plotValues = [], $plotDirection = null, $smoothLine = false, $plotStyle = null)
|
||||||
{
|
{
|
||||||
$this->plotType = $plotType;
|
$this->plotType = $plotType;
|
||||||
$this->plotGrouping = $plotGrouping;
|
$this->plotGrouping = $plotGrouping;
|
||||||
|
@ -126,12 +126,13 @@ class DataSeries
|
||||||
if ((count($plotLabel) == 0) || ($plotLabel[$keys[0]] === null)) {
|
if ((count($plotLabel) == 0) || ($plotLabel[$keys[0]] === null)) {
|
||||||
$plotLabel[$keys[0]] = new DataSeriesValues();
|
$plotLabel[$keys[0]] = new DataSeriesValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->plotLabel = $plotLabel;
|
$this->plotLabel = $plotLabel;
|
||||||
|
|
||||||
if ((count($plotCategory) == 0) || ($plotCategory[$keys[0]] === null)) {
|
if ((count($plotCategory) == 0) || ($plotCategory[$keys[0]] === null)) {
|
||||||
$plotCategory[$keys[0]] = new DataSeriesValues();
|
$plotCategory[$keys[0]] = new DataSeriesValues();
|
||||||
}
|
}
|
||||||
$this->plotCategory = $plotCategory;
|
$this->plotCategory = $plotCategory;
|
||||||
|
|
||||||
$this->smoothLine = $smoothLine;
|
$this->smoothLine = $smoothLine;
|
||||||
$this->plotStyle = $plotStyle;
|
$this->plotStyle = $plotStyle;
|
||||||
|
|
||||||
|
@ -284,7 +285,7 @@ class DataSeries
|
||||||
/**
|
/**
|
||||||
* Get Plot Style.
|
* Get Plot Style.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return null|string
|
||||||
*/
|
*/
|
||||||
public function getPlotStyle()
|
public function getPlotStyle()
|
||||||
{
|
{
|
||||||
|
@ -294,7 +295,7 @@ class DataSeries
|
||||||
/**
|
/**
|
||||||
* Set Plot Style.
|
* Set Plot Style.
|
||||||
*
|
*
|
||||||
* @param string $plotStyle
|
* @param null|string $plotStyle
|
||||||
*
|
*
|
||||||
* @return DataSeries
|
* @return DataSeries
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue