Skip to content

Commit

Permalink
Replace concat (#1629)
Browse files Browse the repository at this point in the history
* Removed the concatenation since there is already a sprintf function

* Changed the comment of the example message
  • Loading branch information
gmponos authored and sagikazarmark committed Oct 23, 2016
1 parent 56ed0ef commit eede767
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Exception/RequestException.php
Expand Up @@ -93,13 +93,15 @@ public static function create(
$uri = $request->getUri();
$uri = static::obfuscateUri($uri);

// Server Error: `GET /` resulted in a `404 Not Found` response:
// Client Error: `GET /` resulted in a `404 Not Found` response:
// <html> ... (truncated)
$message = sprintf(
'%s: `%s` resulted in a `%s` response',
'%s: `%s %s` resulted in a `%s %s` response',
$label,
$request->getMethod() . ' ' . $uri,
$response->getStatusCode() . ' ' . $response->getReasonPhrase()
$request->getMethod(),
$uri,
$response->getStatusCode(),
$response->getReasonPhrase()
);

$summary = static::getResponseBodySummary($response);
Expand Down

0 comments on commit eede767

Please sign in to comment.