From 4d2ddab9c2e79a229ab74f67b80a9fc00bfb0713 Mon Sep 17 00:00:00 2001 From: Joshua Seigler Date: Tue, 28 Jun 2016 00:17:49 -0400 Subject: [PATCH] avoid coalesce operator --- SVGChartBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SVGChartBuilder.php b/SVGChartBuilder.php index 7f3dc5c..d2bf19c 100644 --- a/SVGChartBuilder.php +++ b/SVGChartBuilder.php @@ -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));