Skip to content

Commit

Permalink
override min/max
Browse files Browse the repository at this point in the history
  • Loading branch information
vearutop committed Dec 13, 2016
1 parent 9053960 commit ecff7f3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Spark.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@

class Spark
{
public static function getString(array $items)
public static function getString(array $items, $min = null, $max = null)
{
$min = min($items);
$max = max($items);
if (null === $min) {
$min = min($items);
}
if (null === $max) {
$max = max($items);
}
$delta = $max - $min;

if (!$delta) {
Expand Down

0 comments on commit ecff7f3

Please sign in to comment.