Skip to content

Commit

Permalink
chore(directive): Remove unnecessary str_replace on implode
Browse files Browse the repository at this point in the history
  • Loading branch information
Log1x committed Jul 29, 2023
1 parent 78a9531 commit c063bbf
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/Directives/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,8 @@

'implode' => function ($expression) {
if (Str::contains($expression, ',')) {
$expression = str_replace(['\', \'', '\',\''], ['\'*\'', '\'* \''], $expression);
$expression = Util::parse($expression);

$expression->put(0, str_replace(['\'*\'', '\'* \''], ['\', \'', '\',\''], $expression->get(0)));

return "<?php echo implode({$expression->get(0)}, {$expression->get(1)}); ?>";
}
},
Expand Down

0 comments on commit c063bbf

Please sign in to comment.