Fixed some sorting.

This commit is contained in:
James Cole
2015-07-08 13:05:33 +02:00
parent c00bcd78cc
commit 6900392e43
3 changed files with 26 additions and 16 deletions

View File

@@ -44,9 +44,7 @@ class Wizard implements WizardInterface
/*
* Make each one unique.
*/
foreach ($values as $column => $found) {
$values[$column] = array_unique($found);
}
$values = $this->uniqueRecursive($values);
return $values;
}
@@ -176,4 +174,18 @@ class Wizard implements WizardInterface
{
return ($hasHeaders && $index > 1) || !$hasHeaders;
}
/**
* @param array $array
*
* @return array
*/
protected function uniqueRecursive(array $array)
{
foreach ($array as $column => $found) {
$array[$column] = array_unique($found);
}
return $array;
}
}