Tweak the code to avoid fabbot false positives

This commit is contained in:
Fabien Potencier 2020-04-12 19:06:46 +02:00
parent 780b539669
commit 910cc727a0
6 changed files with 7 additions and 7 deletions

View File

@ -313,7 +313,7 @@ class MemcachedAdapter extends AbstractAdapter
return $result;
}
throw new CacheException(sprintf('MemcachedAdapter client error: %s.', strtolower($this->client->getResultMessage())));
throw new CacheException('MemcachedAdapter client error: '.strtolower($this->client->getResultMessage()));
}
private function getClient(): \Memcached

View File

@ -152,7 +152,7 @@ class EntryManager implements EntryManagerInterface
}
if (!@ldap_modify_batch($this->getConnectionResource(), $dn, $operationsMapped)) {
throw new UpdateOperationException(sprintf('Error executing UpdateOperation on "%s": "%s".', $dn, ldap_error($this->getConnectionResource())));
throw new UpdateOperationException(sprintf('Error executing UpdateOperation on "%s": '.ldap_error($this->getConnectionResource()), $dn));
}
}

View File

@ -70,7 +70,7 @@ final class NexmoTransport extends AbstractTransport
$result = $response->toArray(false);
foreach ($result['messages'] as $msg) {
if ($msg['status'] ?? false) {
throw new TransportException(sprintf('Unable to send the SMS: %s (%s).', $msg['error-text'], $msg['status']), $response);
throw new TransportException(sprintf('Unable to send the SMS: '.$msg['error-text'].' (%s).', $msg['status']), $response);
}
}
}

View File

@ -79,12 +79,12 @@ final class SlackTransport extends AbstractTransport
]);
if (200 !== $response->getStatusCode()) {
throw new TransportException(sprintf('Unable to post the Slack message: %s.', $response->getContent(false)), $response);
throw new TransportException('Unable to post the Slack message: '.$response->getContent(false), $response);
}
$result = $response->toArray(false);
if (!$result['ok']) {
throw new TransportException(sprintf('Unable to post the Slack message: %s.', $result['error']), $response);
throw new TransportException('Unable to post the Slack message: '.$result['error'], $response);
}
}
}

View File

@ -80,7 +80,7 @@ final class TelegramTransport extends AbstractTransport
if (200 !== $response->getStatusCode()) {
$result = $response->toArray(false);
throw new TransportException(sprintf('Unable to post the Telegram message: %s (%s).', $result['description'], $result['error_code']), $response);
throw new TransportException(sprintf('Unable to post the Telegram message: '.$result['description'].' (%s).', $result['error_code']), $response);
}
}
}

View File

@ -70,7 +70,7 @@ final class TwilioTransport extends AbstractTransport
if (201 !== $response->getStatusCode()) {
$error = $response->toArray(false);
throw new TransportException(sprintf('Unable to send the SMS: %s (see %s).', $error['message'], $error['more_info']), $response);
throw new TransportException(sprintf('Unable to send the SMS: '.$error['message'].' (see %s).', $error['more_info']), $response);
}
}
}