From c88fc6edcab6797b152a09f3ef405861b9942430 Mon Sep 17 00:00:00 2001 From: Antonio de la Vega Date: Mon, 12 Jun 2023 16:06:29 +0200 Subject: [PATCH] fix: Add types to avoid PHP 8.2 deprecation warning --- src/Slugify.php | 2 +- src/SlugifyInterface.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Slugify.php b/src/Slugify.php index 712cea37..efb79888 100644 --- a/src/Slugify.php +++ b/src/Slugify.php @@ -97,7 +97,7 @@ public function __construct(array $options = [], RuleProviderInterface $provider * * @return string Slugified version of the string */ - public function slugify($string, $options = null) + public function slugify(string $string, $options = null): string { // BC: the second argument used to be the separator if (is_string($options)) { diff --git a/src/SlugifyInterface.php b/src/SlugifyInterface.php index 2160bc16..4ba873ee 100644 --- a/src/SlugifyInterface.php +++ b/src/SlugifyInterface.php @@ -32,5 +32,5 @@ interface SlugifyInterface * * @api */ - public function slugify($string, $options = null); + public function slugify(string $string, $options = null): string; }