Skip to content

Commit

Permalink
refactor: remove endsWith() in Utils class in favor of str_ends_with (#…
Browse files Browse the repository at this point in the history
…375)

PHP 8.0 tiene
str_ends_with() y str_starts_with().

Co-authored-by: Javier Ferrer González <[email protected]>
  • Loading branch information
joanhey and JavierCane authored Dec 11, 2023
1 parent 06249af commit c4d2f25
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/Shared/Domain/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@

final class Utils
{
public static function endsWith(string $needle, string $haystack): bool
{
$length = strlen($needle);
if ($length === 0) {
return true;
}

return substr($haystack, -$length) === $needle;
}

public static function dateToString(DateTimeInterface $date): string
{
return $date->format(DateTimeInterface::ATOM);
Expand Down

0 comments on commit c4d2f25

Please sign in to comment.