optimize sprintf calls
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user