From 48c120ab019dbeef67a44f9c0a74e2c6f4a5ea7c Mon Sep 17 00:00:00 2001 From: Pier Paolo MAMMI Date: Wed, 22 Jul 2026 15:57:32 +0200 Subject: [PATCH] optimize sprintf calls --- src/ElixForms/Auth/ElixFormsApiClient.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ElixForms/Auth/ElixFormsApiClient.php b/src/ElixForms/Auth/ElixFormsApiClient.php index 914d3e1..e14cf55 100644 --- a/src/ElixForms/Auth/ElixFormsApiClient.php +++ b/src/ElixForms/Auth/ElixFormsApiClient.php @@ -64,7 +64,7 @@ class ElixFormsApiClient throw new \InvalidArgumentException('exportGroup deve essere una stringa non vuota.'); } - $url = sprintf( + $url = \sprintf( '%s/eF/services/api/request/%s/view/_DEFAULT/exportTags/get/v1?moduleTag=%s&exportGroup=%s', $this->baseUrl, rawurlencode((string) $requestId), @@ -96,7 +96,7 @@ class ElixFormsApiClient $status = $response['status'] ?? 500; if ($status !== 200) { - throw new ElixFormsException(sprintf( + throw new ElixFormsException(\sprintf( 'Errore durante %s. HTTP Status: %d', $operation, $status @@ -111,7 +111,7 @@ class ElixFormsApiClient } if (!is_array($payload) || $jsonError !== JSON_ERROR_NONE) { - throw new ElixFormsException(sprintf( + throw new ElixFormsException(\sprintf( 'Risposta non valida da %s: atteso JSON.', $operation )); @@ -120,7 +120,7 @@ class ElixFormsApiClient $globalStatus = $payload['value']['globalStatus'] ?? null; if ($globalStatus === 'ERROR') { $description = $payload['value']['description'] ?? 'errore non specificato'; - throw new ElixFormsException(sprintf( + throw new ElixFormsException(\sprintf( '%s ha restituito un errore: %s', $operation, $description