Skip to content

Commit

Permalink
Remove else statement as indicated by Codacy
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-martinez-interactiv4 committed Oct 14, 2017
1 parent 018c111 commit 1a1637a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ protected function formatData($data, $comments, $prefix = '')
$elements[] = $prefix . " */";
}

$elements[] = $prefix . var_export($key, true) . ' => ' .
(!is_array($value) ? var_export($value, true) . ',' : '');

if (is_array($value)) {
$elements[] = $prefix . var_export($key, true) . ' => ';
$elements[] = $prefix . 'array (';
$elements[] = $this->formatData($value, [], ' ' . $prefix);
$elements[] = $prefix . '),';
} else {
$elements[] = $prefix . var_export($key, true) . ' => ' . var_export($value, true) . ',';
}
}
return implode("\n", $elements);
Expand Down

0 comments on commit 1a1637a

Please sign in to comment.