Skip to content

Commit

Permalink
♻️ Rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnitto committed Jun 22, 2018
1 parent a24c047 commit ec14c4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Classes/ArrayHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ public function values(array $array): array
* @param string $separator
* @return string
*/
public function joinRecursive(array $array, string $separator = ','): string
public function join(array $array, string $separator = ','): string
{
$result = '';

foreach ($array as $item) {
if (is_array($item)) {
$result .= $this->joinRecursive($item, $separator) . $separator;
$result .= $this->join($item, $separator) . $separator;
} else {
$result .= $item . $separator;
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ [email protected] = ${Carbon.Array.values(value)}

**Return** An indexed array of values.

### `Carbon.Array.joinRecursive(array, separator)`
### `Carbon.Array.join(array, separator)`

Join the given array recursively using the given separator.

Expand Down

0 comments on commit ec14c4d

Please sign in to comment.