Skip to content

Commit

Permalink
Merge pull request #41 from Luoti/master
Browse files Browse the repository at this point in the history
Replace snake_case functions with Str::snake
  • Loading branch information
adamwathan authored Sep 19, 2019
2 parents 5ed76bb + c4ae183 commit f8a2118
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Svg.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Support\Collection;
use Illuminate\Support\HtmlString;
use Illuminate\Support\Str;
use Illuminate\Contracts\Support\Htmlable;

class Svg implements Htmlable
Expand Down Expand Up @@ -32,9 +33,9 @@ public function toHtml()
public function __call($method, $args)
{
if (count($args) === 0) {
$this->attrs[] = snake_case($method, '-');
$this->attrs[] = Str::snake($method, '-');
} else {
$this->attrs[snake_case($method, '-')] = $args[0];
$this->attrs[Str::snake($method, '-')] = $args[0];
}
return $this;
}
Expand Down

0 comments on commit f8a2118

Please sign in to comment.