diff --git a/src/Routing/RequestContext.php b/src/Routing/RequestContext.php index c12d7e7..321aec9 100644 --- a/src/Routing/RequestContext.php +++ b/src/Routing/RequestContext.php @@ -82,7 +82,7 @@ private function prepareSlug(string $slug): string } // Remove the locale code which is at the beginning of the slug - return (string) preg_replace(sprintf('/^%s\//', $localeCode), '', $slug); + return (string) preg_replace(\sprintf('/^%s\//', $localeCode), '', $slug); } /** @@ -97,6 +97,6 @@ public function __call(string $name, array $arguments) return \call_user_func($callback, ...$arguments); } - throw new Exception(sprintf('Method %s not found for class "%s"', $name, \get_class($this->decorated))); + throw new Exception(\sprintf('Method %s not found for class "%s"', $name, \get_class($this->decorated))); } } diff --git a/src/Validator/Constraints/UniqueSlugByChannelValidator.php b/src/Validator/Constraints/UniqueSlugByChannelValidator.php index 914483a..92cd7d6 100644 --- a/src/Validator/Constraints/UniqueSlugByChannelValidator.php +++ b/src/Validator/Constraints/UniqueSlugByChannelValidator.php @@ -55,7 +55,7 @@ public function validate($value, Constraint $constraint): void '%channel%' => $channel->getCode(), '%locale%' => $translation->getLocale(), ]) - ->atPath(sprintf('translations[%s].slug', $translation->getLocale())) + ->atPath(\sprintf('translations[%s].slug', $translation->getLocale())) ->addViolation() ; }