Skip to content

Commit

Permalink
Refactoring the Arr Helper
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanedev-maroc committed Jan 6, 2016
1 parent ce255b6 commit bfee892
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Helpers/Arr.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ public static function dot($array, $prepend = '')
if (is_array($value)) {
if (self::isAssoc($value)) {
$results = array_merge($results, self::dot($value, $prepend.$key.'.'));

continue;
}
}
else {
$results[$prepend.$key] = $value;
}

$results[$prepend.$key] = $value;
}

return $results;
Expand Down

0 comments on commit bfee892

Please sign in to comment.