diff --git a/src/Form/Type/PhoneNumberType.php b/src/Form/Type/PhoneNumberType.php index 332817b2..e5274a99 100644 --- a/src/Form/Type/PhoneNumberType.php +++ b/src/Form/Type/PhoneNumberType.php @@ -170,9 +170,9 @@ public function getBlockPrefix(): string private function formatDisplayChoice(string $displayType, string $regionName, string $regionCode, string $countryCode, bool $displayEmojiFlag): string { - $formattedDisplay = sprintf('%s (+%s)', $regionName, $countryCode); + $formattedDisplay = \sprintf('%s (+%s)', $regionName, $countryCode); if (self::DISPLAY_COUNTRY_SHORT === $displayType) { - $formattedDisplay = sprintf('%s +%s', $regionCode, $countryCode); + $formattedDisplay = \sprintf('%s +%s', $regionCode, $countryCode); } if ($displayEmojiFlag) { diff --git a/src/Validator/Constraints/PhoneNumberValidator.php b/src/Validator/Constraints/PhoneNumberValidator.php index d98ea966..9224ad57 100644 --- a/src/Validator/Constraints/PhoneNumberValidator.php +++ b/src/Validator/Constraints/PhoneNumberValidator.php @@ -144,7 +144,7 @@ private function getRegion(PhoneNumberConstraint $constraint): string try { $defaultRegion = $this->getPropertyAccessor()->getValue($object, $path); } catch (NoSuchPropertyException $e) { - throw new ConstraintDefinitionException(sprintf('Invalid property path "%s" provided to "%s" constraint: ', $path, get_debug_type($constraint)).$e->getMessage(), 0, $e); + throw new ConstraintDefinitionException(\sprintf('Invalid property path "%s" provided to "%s" constraint: ', $path, get_debug_type($constraint)).$e->getMessage(), 0, $e); } }