Skip to content

Commit

Permalink
remove oxford separator
Browse files Browse the repository at this point in the history
  • Loading branch information
stepanenko3 committed Oct 5, 2022
1 parent 22c1308 commit c71853d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -1013,11 +1013,10 @@ function uuid(
if (!function_exists('natural_language_join')) {
function natural_language_join(array $list, $conjunction = 'and'): string
{
$oxford_separator = count($list) == 2 ? ' ' : ', ';
$last = array_pop($list);

if ($list) {
return implode(', ', $list) . $oxford_separator . $conjunction . ' ' . $last;
return implode(', ', $list) . ' ' . $conjunction . ' ' . $last;
}

return $last;
Expand Down

0 comments on commit c71853d

Please sign in to comment.