summaryrefslogtreecommitdiff
path: root/includes/helper/graph_helper.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-09-29 09:49:25 +0200
committermsquare <msquare@notrademark.de>2016-09-29 09:49:25 +0200
commit5170fd7f6ecc90955cc7b32049f9ef9546d425a8 (patch)
treea6c59aa31bffbd51a0f372fc0f6afcbd586af933 /includes/helper/graph_helper.php
parentbd9003f5d54bbf733fafc3359349127e18a8a1a1 (diff)
prohibit inline control structures on helpers
Diffstat (limited to 'includes/helper/graph_helper.php')
-rw-r--r--includes/helper/graph_helper.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/helper/graph_helper.php b/includes/helper/graph_helper.php
index 17473634..180d1ef9 100644
--- a/includes/helper/graph_helper.php
+++ b/includes/helper/graph_helper.php
@@ -9,14 +9,16 @@
*/
function bargraph($id, $key, $row_names, $colors, $data) {
$labels = [];
- foreach ($data as $dataset)
+ foreach ($data as $dataset) {
$labels[] = $dataset[$key];
+ }
$datasets = [];
foreach ($row_names as $row_key => $name) {
$values = [];
- foreach ($data as $dataset)
+ foreach ($data as $dataset) {
$values[] = $dataset[$row_key];
+ }
$datasets[] = [
'label' => $name,
'fillColor' => $colors[$row_key],