Skip to content

Commit e44b8ba

Browse files
committed
made some cosmetic changes
1 parent 0038d1b commit e44b8ba

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/Symfony/Bundle/FrameworkBundle/HttpKernel.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ public function render($controller, array $options = array())
147147
throw new \RuntimeException(sprintf('Error when rendering "%s" (Status code is %s).', $request->getUri(), $response->getStatusCode()));
148148
}
149149

150-
if ($response instanceof StreamedResponse) {
151-
$response->sendContent();
152-
} else {
150+
if (!$response instanceof StreamedResponse) {
153151
return $response->getContent();
154152
}
153+
154+
$response->sendContent();
155155
} catch (\Exception $e) {
156156
if ($options['alt']) {
157157
$alt = $options['alt'];

src/Symfony/Component/HttpFoundation/StreamedResponse.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/**
1515
* StreamedResponse represents a streamed HTTP response.
1616
*
17-
* A StreamedResponse uses a callback for its the content.
17+
* A StreamedResponse uses a callback for its content.
1818
*
1919
* The callback should use the standard PHP functions like echo
2020
* to stream the response back to the client. The flush() method

src/Symfony/Component/Templating/EngineInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function render($name, array $parameters = array());
4949
/**
5050
* Streams a template.
5151
*
52-
* The implementation should outputs the content directly to the client.
52+
* The implementation should output the content directly to the client.
5353
*
5454
* @param mixed $name A template name or a TemplateReferenceInterface instance
5555
* @param array $parameters An array of parameters to pass to the template

tests/Symfony/Tests/Component/HttpFoundation/StreamedResponseTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@ public function testSetContent()
8484
public function testGetContent()
8585
{
8686
$response = new StreamedResponse(function () { echo 'foo'; });
87-
$this->assertEquals(false, $response->getContent());
87+
$this->assertFalse($response->getContent());
8888
}
8989
}

0 commit comments

Comments
 (0)