Skip to content

Commit da039cf

Browse files
grunt
1 parent 9775ab3 commit da039cf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

classes/Visualizer/Gutenberg/Block.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -329,13 +329,13 @@ public function get_visualizer_data( $post ) {
329329
if ( isset( $settings['series'] ) ) {
330330
foreach ( $settings['series'] as $index => $serie ) {
331331
// skip X axis data.
332-
if( $index === 0) {
332+
if ( $index === 0 ) {
333333
continue;
334334
}
335335
if ( ! empty( $serie['role'] ) ) {
336336
// this series is some kind of annotation, so let's collect its index.
337337
// the index will be +1 because the X axis value is index 0, which is being ignored.
338-
$annotations['role' . ( intval( $index ) + 1 )] = $serie['role'];
338+
$annotations[ 'role' . ( intval( $index ) + 1 ) ] = $serie['role'];
339339
}
340340
}
341341
}
@@ -344,18 +344,18 @@ public function get_visualizer_data( $post ) {
344344
$series_names = array();
345345
foreach ( $series as $index => $serie ) {
346346
// skip X axis data.
347-
if( $index === 0) {
347+
if ( $index === 0 ) {
348348
continue;
349349
}
350350
if ( array_key_exists( 'role' . $index, $annotations ) ) {
351-
$series_names[] = (object) array( 'role' => $annotations['role' . $index], 'type' => $serie['type'] );
351+
$series_names[] = (object) array( 'role' => $annotations[ 'role' . $index ], 'type' => $serie['type'] );
352352
} else {
353353
$series_names[] = $serie['label'];
354354
}
355355
}
356356
$exploded_data[] = $series_names;
357357

358-
foreach( $data['visualizer-data'] as $datum ) {
358+
foreach ( $data['visualizer-data'] as $datum ) {
359359
// skip X axis data.
360360
unset( $datum[0] );
361361
$exploded_data[] = $datum;

0 commit comments

Comments
 (0)