Automatic pass to convert with php-cs-fixer

This commit is contained in:
2023-04-13 21:33:52 +02:00
parent 63b150a493
commit 0111c96f1d
105 changed files with 10478 additions and 8273 deletions

View File

@@ -1,35 +1,43 @@
<?php
/** DomFramework
* @package domframework
* @author Dominique Fournier <dominique@fournier38.fr>
* @license BSD
*/
/**
* DomFramework
* @package domframework
* @author Dominique Fournier <dominique@fournier38.fr>
* @license BSD
*/
namespace Domframework;
/** Manage the vertical axis */
/**
* Manage the vertical axis
*/
class GraphAxisVertical extends GraphAxisGeneral
{
/** The angle choosed to draw the graph
*/
/**
* The angle choosed to draw the graph
*/
private $angle;
/** The padding between the label and the axis
*/
/**
* The padding between the label and the axis
*/
protected $padding = 7;
/** The width of the labels + padding (it is the base of the graph) in pixels
*/
/**
* The width of the labels + padding (it is the base of the graph) in pixels
*/
protected $width;
/** The number of chars to be displayed in one label
*/
/**
* The number of chars to be displayed in one label
*/
protected $nbcharsLabel = 0;
/** Look for the width of the Y axis
* @param resource $gd The resource to modify
*/
/**
* Look for the width of the Y axis
* @param resource $gd The resource to modify
*/
public function getWidth($gd)
{
if ($this->numerical) {
@@ -73,10 +81,11 @@ class GraphAxisVertical extends GraphAxisGeneral
}
}
/** Calculate the position in pixels for a value
* If the value is out of range, return null to not draw the point
* @param string|float|integer $value The value to position
*/
/**
* Calculate the position in pixels for a value
* If the value is out of range, return null to not draw the point
* @param string|float|integer $value The value to position
*/
public function position($value)
{
if ($value === null) {
@@ -111,7 +120,7 @@ class GraphAxisVertical extends GraphAxisGeneral
"No data defined for Axis"
) . " " . get_class($this), 406);
}
$pos = array_search($value, $this->data);
$pos = array_search($value, $this->data, true);
if ($pos === false) {
return null;
}
@@ -121,10 +130,11 @@ class GraphAxisVertical extends GraphAxisGeneral
}
}
/** Calculate the positionMin, used for labeled axies
* If the value is out of range, return null to not draw the point
* @param string|float|integer $value The value to position
*/
/**
* Calculate the positionMin, used for labeled axies
* If the value is out of range, return null to not draw the point
* @param string|float|integer $value The value to position
*/
public function positionMin($value)
{
if ($this->numerical) {
@@ -136,7 +146,7 @@ class GraphAxisVertical extends GraphAxisGeneral
"No data defined for Axis"
) . " " . get_class($this), 406);
}
$pos = array_search($value, $this->data);
$pos = array_search($value, $this->data, true);
if ($pos === false) {
return null;
}
@@ -144,10 +154,11 @@ class GraphAxisVertical extends GraphAxisGeneral
return intval($this->bottom + $width * $pos);
}
/** Calculate the positionMax, used for labeled axies
* If the value is out of range, return null to not draw the point
* @param string|float|integer $value The value to position
*/
/**
* Calculate the positionMax, used for labeled axies
* If the value is out of range, return null to not draw the point
* @param string|float|integer $value The value to position
*/
public function positionMax($value)
{
$posCenter = $this->position($value);
@@ -160,7 +171,7 @@ class GraphAxisVertical extends GraphAxisGeneral
"No data defined for Axis"
) . " " . get_class($this), 406);
}
$pos = array_search($value, $this->data);
$pos = array_search($value, $this->data, true);
if ($pos === false) {
return null;
}
@@ -168,9 +179,10 @@ class GraphAxisVertical extends GraphAxisGeneral
return intval($this->bottom + $width * $pos + $width);
}
/** Draw the axis labels and lines
* @param resource $gd The resource to modify
*/
/**
* Draw the axis labels and lines
* @param resource $gd The resource to modify
*/
public function draw($gd)
{
$axisColor = Color::allocateFromText($gd, $this->axisColor);