diff --git a/src/Captcha/GoogleRecaptcha.php b/src/Captcha/GoogleRecaptcha.php index 4fa9d76..16f3e25 100644 --- a/src/Captcha/GoogleRecaptcha.php +++ b/src/Captcha/GoogleRecaptcha.php @@ -79,7 +79,7 @@ public function getElements(Element $element, Form $form): array $element->attributes->set('hidden'); // Placeholder Element that actually displays the captcha - $placeholderId = sprintf('%s_placeholder', $controlId); + $placeholderId = \sprintf('%s_placeholder', $controlId); $placeholder = new Element('div.palmtree-form-control.g-recaptcha'); @@ -96,7 +96,7 @@ public function getElements(Element $element, Form $form): array $placeholder->attributes->setData('site_key', $this->siteKey); $placeholder->attributes->setData('form_control', $controlId); - $onloadCallback = sprintf('%s_onload', str_replace('-', '_', $controlId)); + $onloadCallback = \sprintf('%s_onload', str_replace('-', '_', $controlId)); $placeholder->attributes->setData('script_url', $this->getScriptSrc($onloadCallback)); $placeholder->attributes->setData('onload', $onloadCallback); @@ -133,7 +133,7 @@ private function getScriptSrc(string $onloadCallbackName): string $queryArgs['onload'] = $onloadCallbackName; $queryArgs['render'] = 'explicit'; - return sprintf('%s?%s', strtok($url, '?'), http_build_query($queryArgs)); + return \sprintf('%s?%s', strtok($url, '?'), http_build_query($queryArgs)); } /** diff --git a/src/Exception/InaccessiblePropertyException.php b/src/Exception/InaccessiblePropertyException.php index 34146c8..2d22d9a 100644 --- a/src/Exception/InaccessiblePropertyException.php +++ b/src/Exception/InaccessiblePropertyException.php @@ -8,6 +8,6 @@ class InaccessiblePropertyException extends OutOfBoundsException { public function __construct(string $property, object $object) { - parent::__construct(sprintf("Property %s is not accessible on object of type '%s'", $property, $object::class)); + parent::__construct(\sprintf("Property %s is not accessible on object of type '%s'", $property, $object::class)); } } diff --git a/src/Exception/UnsettablePropertyException.php b/src/Exception/UnsettablePropertyException.php index 217782b..95e60e5 100644 --- a/src/Exception/UnsettablePropertyException.php +++ b/src/Exception/UnsettablePropertyException.php @@ -8,6 +8,6 @@ class UnsettablePropertyException extends OutOfBoundsException { public function __construct(string $property, object $object) { - parent::__construct(sprintf("Property %s is not settable on object of type '%s'", $property, $object::class)); + parent::__construct(\sprintf("Property %s is not settable on object of type '%s'", $property, $object::class)); } } diff --git a/src/TypeLocator.php b/src/TypeLocator.php index 273a26c..4b20f24 100644 --- a/src/TypeLocator.php +++ b/src/TypeLocator.php @@ -67,7 +67,7 @@ public function getTypeObject(TypeInterface|string $type, array $args): TypeInte if ($class === null) { throw new InvalidTypeException('Type could not be found'); } elseif (!is_subclass_of($class, TypeInterface::class, true)) { - throw new InvalidTypeException(sprintf("Type must be an instance of '%s'. '%s' given", TypeInterface::class, $type)); + throw new InvalidTypeException(\sprintf("Type must be an instance of '%s'. '%s' given", TypeInterface::class, $type)); } foreach ($args as $key => $value) {