From f41819cd6fd0be1cf7c6265c38e670324ab0b197 Mon Sep 17 00:00:00 2001 From: Nyholm Date: Mon, 16 Dec 2019 22:19:23 +0100 Subject: [PATCH] Fix CS --- src/Authentication/Chain.php | 4 +--- src/Builder/ResponseBuilder.php | 16 +++------------- src/CookieUtil.php | 5 +---- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/src/Authentication/Chain.php b/src/Authentication/Chain.php index 71002bb..f7ab885 100644 --- a/src/Authentication/Chain.php +++ b/src/Authentication/Chain.php @@ -24,9 +24,7 @@ public function __construct(array $authenticationChain = []) { foreach ($authenticationChain as $authentication) { if (!$authentication instanceof Authentication) { - throw new \InvalidArgumentException( - 'Members of the authentication chain must be of type Http\Message\Authentication' - ); + throw new \InvalidArgumentException('Members of the authentication chain must be of type Http\Message\Authentication'); } } diff --git a/src/Builder/ResponseBuilder.php b/src/Builder/ResponseBuilder.php index de2e882..feffdf1 100644 --- a/src/Builder/ResponseBuilder.php +++ b/src/Builder/ResponseBuilder.php @@ -78,13 +78,7 @@ public function setHeadersFromString($headers) if (!(is_string($headers) || (is_object($headers) && method_exists($headers, '__toString'))) ) { - throw new \InvalidArgumentException( - sprintf( - '%s expects parameter 1 to be a string, %s given', - __METHOD__, - is_object($headers) ? get_class($headers) : gettype($headers) - ) - ); + throw new \InvalidArgumentException(sprintf('%s expects parameter 1 to be a string, %s given', __METHOD__, is_object($headers) ? get_class($headers) : gettype($headers))); } $this->setHeadersFromArray(explode("\r\n", $headers)); @@ -105,9 +99,7 @@ public function setStatus($statusLine) { $parts = explode(' ', $statusLine, 3); if (count($parts) < 2 || 0 !== strpos(strtolower($parts[0]), 'http/')) { - throw new \InvalidArgumentException( - sprintf('"%s" is not a valid HTTP status line', $statusLine) - ); + throw new \InvalidArgumentException(sprintf('"%s" is not a valid HTTP status line', $statusLine)); } $reasonPhrase = count($parts) > 2 ? $parts[2] : ''; @@ -131,9 +123,7 @@ public function addHeader($headerLine) { $parts = explode(':', $headerLine, 2); if (2 !== count($parts)) { - throw new \InvalidArgumentException( - sprintf('"%s" is not a valid HTTP header line', $headerLine) - ); + throw new \InvalidArgumentException(sprintf('"%s" is not a valid HTTP header line', $headerLine)); } $name = trim($parts[0]); $value = trim($parts[1]); diff --git a/src/CookieUtil.php b/src/CookieUtil.php index 5c670d4..6f15d97 100644 --- a/src/CookieUtil.php +++ b/src/CookieUtil.php @@ -45,9 +45,6 @@ public static function parseDate($dateValue) return $date; } - throw new UnexpectedValueException(sprintf( - 'Unparseable cookie date string "%s"', - $dateValue - )); + throw new UnexpectedValueException(sprintf('Unparseable cookie date string "%s"', $dateValue)); } }