Skip to content

Commit

Permalink
chore: simplified slugify function
Browse files Browse the repository at this point in the history
  • Loading branch information
COil committed Apr 12, 2024
1 parent 327c1fc commit 1af4aaf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Helper/StringHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

use Symfony\Component\String\Slugger\SluggerInterface;

use function Symfony\Component\String\u;

/**
* This is a simple service just to create a unit test example.
*
Expand All @@ -22,6 +20,6 @@ public function __construct(

public function slugify(?string $string): string
{
return $this->slugger->slug(u($string)->lower()->toString())->toString();
return $this->slugger->slug((string) $string)->lower()->toString();
}
}

0 comments on commit 1af4aaf

Please sign in to comment.