Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F804036
D350.id976.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Feb 26, 9:04 AM
Size
13 KB
Mime Type
text/x-diff
Expires
Thu, Feb 27, 9:04 AM (5 h, 4 m)
Engine
blob
Format
Raw Data
Handle
576750
Attached To
D350: INP-1751 - Use PHP5-style constructor names only in LibChart library code
D350.id976.diff
View Options
Index: branches/5.2.x/core/units/general/libchart/classes/model/Point.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/model/Point.php
+++ branches/5.2.x/core/units/general/libchart/classes/model/Point.php
@@ -35,7 +35,7 @@
* @param integer x coordinate (label)
* @param integer y coordinate (value)
*/
- public function LibchartPoint($x, $y) {
+ public function __construct($x, $y) {
$this->x = $x;
$this->y = $y;
}
@@ -57,4 +57,4 @@
public function getY() {
return $this->y;
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/units/general/libchart/classes/model/XYDataSet.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/model/XYDataSet.php
+++ branches/5.2.x/core/units/general/libchart/classes/model/XYDataSet.php
@@ -32,7 +32,7 @@
* Constructor of XYDataSet.
*
*/
- public function LibchartXYDataSet() {
+ public function __construct() {
$this->pointList = array();
}
@@ -54,4 +54,4 @@
public function getPointList() {
return $this->pointList;
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/units/general/libchart/classes/model/XYSeriesDataSet.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/model/XYSeriesDataSet.php
+++ branches/5.2.x/core/units/general/libchart/classes/model/XYSeriesDataSet.php
@@ -41,7 +41,7 @@
* Constructor of XYSeriesDataSet.
*
*/
- public function LibchartXYSeriesDataSet() {
+ public function __construct() {
$this->titleList = array();
$this->serieList = array();
}
@@ -74,4 +74,4 @@
public function getSerieList() {
return $this->serieList;
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/units/general/libchart/classes/view/axis/Axis.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/view/axis/Axis.php
+++ branches/5.2.x/core/units/general/libchart/classes/view/axis/Axis.php
@@ -40,7 +40,7 @@
* @param integer minimum value on the axis
* @param integer maximum value on the axis
*/
- public function LibchartAxis($min, $max) {
+ public function __construct($min, $max) {
$this->min = $min;
$this->max = $max;
@@ -128,4 +128,4 @@
public function getTics() {
return $this->tics;
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/units/general/libchart/classes/view/caption/Caption.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/view/caption/Caption.php
+++ branches/5.2.x/core/units/general/libchart/classes/view/caption/Caption.php
@@ -41,7 +41,7 @@
/**
* Constructor of Caption
*/
- public function LibchartCaption() {
+ public function __construct() {
$this->labelBoxWidth = 15;
$this->labelBoxHeight = 15;
}
@@ -110,4 +110,4 @@
public function setColorSet($colorSet) {
$this->colorSet = $colorSet;
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/units/general/libchart/classes/view/chart/BarChart.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/view/chart/BarChart.php
+++ branches/5.2.x/core/units/general/libchart/classes/view/chart/BarChart.php
@@ -35,8 +35,8 @@
* @param integer width of the image
* @param integer height of the image
*/
- protected function LibchartBarChart($width, $height) {
- parent::LibchartChart($width, $height);
+ protected function __construct($width, $height) {
+ parent::__construct($width, $height);
// Initialize the bounds
$this->bound = new LibchartBound();
@@ -172,4 +172,4 @@
return $pointList;
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/units/general/libchart/classes/view/chart/Chart.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/view/chart/Chart.php
+++ branches/5.2.x/core/units/general/libchart/classes/view/chart/Chart.php
@@ -48,7 +48,7 @@
* @param integer width of the image
* @param integer height of the image
*/
- protected function LibchartChart($width, $height) {
+ protected function __construct($width, $height) {
// Creates the plot
$this->plot = new LibchartPlot($width, $height);
$this->plot->setTitle("Untitled chart");
@@ -100,4 +100,4 @@
public function setTitle($title) {
$this->plot->setTitle($title);
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/units/general/libchart/classes/view/chart/HorizontalBarChart.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/view/chart/HorizontalBarChart.php
+++ branches/5.2.x/core/units/general/libchart/classes/view/chart/HorizontalBarChart.php
@@ -34,8 +34,8 @@
* @param integer width of the image
* @param integer height of the image
*/
- public function LibchartHorizontalBarChart($width = 600, $height = 250) {
- parent::BarChart($width, $height);
+ public function __construct($width = 600, $height = 250) {
+ parent::__construct($width, $height);
$this->emptyToFullRatio = 1 / 5;
$this->plot->setGraphPadding(new Padding(5, 30, 30, 50));
@@ -209,4 +209,4 @@
$this->plot->render($fileName);
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/units/general/libchart/classes/view/chart/LineChart.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/view/chart/LineChart.php
+++ branches/5.2.x/core/units/general/libchart/classes/view/chart/LineChart.php
@@ -32,8 +32,8 @@
* @param integer width of the image
* @param integer height of the image
*/
- public function LibchartLineChart($width = 600, $height = 250) {
- parent::LibchartBarChart($width, $height);
+ public function __construct($width = 600, $height = 250) {
+ parent::__construct($width, $height);
$this->plot->setGraphPadding(new LibchartPadding(5, 30, 50, 50));
}
@@ -198,4 +198,4 @@
$this->plot->render($fileName);
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/units/general/libchart/classes/view/chart/PieChart.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/view/chart/PieChart.php
+++ branches/5.2.x/core/units/general/libchart/classes/view/chart/PieChart.php
@@ -34,8 +34,8 @@
* @param integer width of the image
* @param integer height of the image
*/
- public function LibchartPieChart($width = 600, $height = 250) {
- parent::LibchartChart($width, $height);
+ public function __construct($width = 600, $height = 250) {
+ parent::__construct($width, $height);
$this->plot->setGraphPadding(new LibchartPadding(15, 10, 30, 30));
}
@@ -251,4 +251,4 @@
$this->plot->render($fileName);
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/units/general/libchart/classes/view/chart/VerticalBarChart.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/view/chart/VerticalBarChart.php
+++ branches/5.2.x/core/units/general/libchart/classes/view/chart/VerticalBarChart.php
@@ -36,8 +36,8 @@
* @param integer width of the image
* @param integer height of the image
*/
- public function LibchartVerticalBarChart($width = 600, $height = 250) {
- parent::LibchartBarChart($width, $height);
+ public function __construct($width = 600, $height = 250) {
+ parent::__construct($width, $height);
$this->emptyToFullRatio = 1 / 5;
$this->plot->setGraphPadding(new LibchartPadding(5, 30, 50, 50));
@@ -211,4 +211,4 @@
$this->plot->render($fileName);
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/units/general/libchart/classes/view/color/Color.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/view/color/Color.php
+++ branches/5.2.x/core/units/general/libchart/classes/view/color/Color.php
@@ -39,7 +39,7 @@
* @param integer blue [0..255]
* @param integer alpha [0..255]
*/
- public function LibchartColor($red, $green, $blue, $alpha = 0) {
+ public function __construct($red, $green, $blue, $alpha = 0) {
$this->red = (int) $red;
$this->green = (int) $green;
$this->blue = (int) $blue;
@@ -97,4 +97,4 @@
return $shadowColor;
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/units/general/libchart/classes/view/color/ColorSet.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/view/color/ColorSet.php
+++ branches/5.2.x/core/units/general/libchart/classes/view/color/ColorSet.php
@@ -35,7 +35,7 @@
* @param $shadowFactor Shadow factor
* @param $colorArray Colors as an array
*/
- public function LibchartColorSet($colorList, $shadowFactor) {
+ public function __construct($colorList, $shadowFactor) {
$this->colorList = $colorList;
$this->shadowColorList = array();
@@ -81,4 +81,4 @@
public function currentShadowColor() {
return current($this->shadowColorList);
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/units/general/libchart/classes/view/color/Palette.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/view/color/Palette.php
+++ branches/5.2.x/core/units/general/libchart/classes/view/color/Palette.php
@@ -37,7 +37,7 @@
/**
* Palette constructor.
*/
- public function LibchartPalette() {
+ public function __construct() {
$this->red = new LibchartColor(255, 0, 0);
// Colors for the horizontal and vertical axis
@@ -108,4 +108,4 @@
new LibchartColor(93, 129, 1)
), 0.7);
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/units/general/libchart/classes/view/plot/Plot.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/view/plot/Plot.php
+++ branches/5.2.x/core/units/general/libchart/classes/view/plot/Plot.php
@@ -119,7 +119,7 @@
* @param integer width of the image
* @param integer height of the image
*/
- public function LibchartPlot($width, $height) {
+ public function __construct($width, $height) {
$this->width = $width;
$this->height = $height;
@@ -413,4 +413,4 @@
public function getTextColor() {
return $this->textColor;
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/units/general/libchart/classes/view/primitive/Padding.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/view/primitive/Padding.php
+++ branches/5.2.x/core/units/general/libchart/classes/view/primitive/Padding.php
@@ -54,7 +54,7 @@
* @param integer Bottom padding
* @param integer Left padding
*/
- public function LibchartPadding($top, $right = null, $bottom = null, $left = null) {
+ public function __construct($top, $right = null, $bottom = null, $left = null) {
$this->top = $top;
if ($right == null) {
$this->right = $top;
@@ -66,4 +66,4 @@
$this->left = $left;
}
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/units/general/libchart/classes/view/primitive/Primitive.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/view/primitive/Primitive.php
+++ branches/5.2.x/core/units/general/libchart/classes/view/primitive/Primitive.php
@@ -32,7 +32,7 @@
*
* @param resource GD image resource
*/
- public function LibchartPrimitive($img) {
+ public function __construct($img) {
$this->img = $img;
}
@@ -68,4 +68,4 @@
imagerectangle($this->img, $x2 - 1, $y2 - 1, $x2, $y2, $color1->getColor($this->img));
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/units/general/libchart/classes/view/primitive/Rectangle.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/view/primitive/Rectangle.php
+++ branches/5.2.x/core/units/general/libchart/classes/view/primitive/Rectangle.php
@@ -51,7 +51,7 @@
*
* @param resource GD image resource
*/
- public function LibchartRectangle($x1, $y1, $x2, $y2) {
+ public function __construct($x1, $y1, $x2, $y2) {
$this->x1 = $x1;
$this->y1 = $y1;
$this->x2 = $x2;
@@ -74,4 +74,4 @@
//echo "(" . $this->x1 . "," . $this->y1 . ") (" . $this->x2 . "," . $this->y2 . ")<br>";
return $rectangle;
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/units/general/libchart/classes/view/text/Text.php
===================================================================
--- branches/5.2.x/core/units/general/libchart/classes/view/text/Text.php
+++ branches/5.2.x/core/units/general/libchart/classes/view/text/Text.php
@@ -35,7 +35,7 @@
/**
* Creates a new text drawing helper.
*/
- public function LibchartText() {
+ public function __construct() {
$baseDir = dirname(__FILE__) . "/../../../";
// Free low-res fonts based on Bitstream Vera <http://dejavu.sourceforge.net/wiki/>
@@ -127,4 +127,4 @@
imagettftext($img, $fontSize, $angle, $px, $py, $color->getColor($img), $fontFileName, $text);
}
- }
\ No newline at end of file
+ }
Event Timeline
Log In to Comment