avoid coalesce operator

This commit is contained in:
Joshua Seigler 2016-06-28 00:17:49 -04:00
parent 29a36eb63f
commit 4d2ddab9c2

View file

@ -88,7 +88,7 @@ class SVGChartBuilder {
http://vis4.net/blog/posts/doing-the-line-charts-right/
*/
$aspectRatio = max(0.25, min(0.75, 1 / $averageAbsSlope));
$height = $height ?? floor($aspectRatio * $width);
$height = (is_null($height) ? floor($aspectRatio * $width) : $height);
function labelFormat($float, $places, $minPlaces = 0) {
$value = number_format($float, max($minPlaces, $places));