diff --git a/src/Symfony/Component/BrowserKit/Response.php b/src/Symfony/Component/BrowserKit/Response.php index e8179f1532..7e425155a9 100644 --- a/src/Symfony/Component/BrowserKit/Response.php +++ b/src/Symfony/Component/BrowserKit/Response.php @@ -118,9 +118,9 @@ class Response if (str_replace('-', '_', strtolower($key)) == str_replace('-', '_', strtolower($header))) { if ($first) { return is_array($value) ? (count($value) ? $value[0] : '') : $value; - } else { - return is_array($value) ? $value : array($value); } + + return is_array($value) ? $value : array($value); } } diff --git a/tests/Symfony/Tests/Component/BrowserKit/ClientTest.php b/tests/Symfony/Tests/Component/BrowserKit/ClientTest.php index 42f45569de..dfecf05596 100644 --- a/tests/Symfony/Tests/Component/BrowserKit/ClientTest.php +++ b/tests/Symfony/Tests/Component/BrowserKit/ClientTest.php @@ -36,12 +36,12 @@ class TestClient extends Client { if (null === $this->nextResponse) { return new Response(); - } else { - $response = $this->nextResponse; - $this->nextResponse = null; - - return $response; } + + $response = $this->nextResponse; + $this->nextResponse = null; + + return $response; } protected function getScript($request)