Skip to content

Commit

Permalink
made some cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Dec 21, 2011
1 parent 0038d1b commit e44b8ba
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Symfony/Bundle/FrameworkBundle/HttpKernel.php
Expand Up @@ -147,11 +147,11 @@ public function render($controller, array $options = array())
throw new \RuntimeException(sprintf('Error when rendering "%s" (Status code is %s).', $request->getUri(), $response->getStatusCode()));
}

if ($response instanceof StreamedResponse) {
$response->sendContent();
} else {
if (!$response instanceof StreamedResponse) {
return $response->getContent();
}

$response->sendContent();
} catch (\Exception $e) {
if ($options['alt']) {
$alt = $options['alt'];
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpFoundation/StreamedResponse.php
Expand Up @@ -14,7 +14,7 @@
/**
* StreamedResponse represents a streamed HTTP response.
*
* A StreamedResponse uses a callback for its the content.
* A StreamedResponse uses a callback for its content.
*
* The callback should use the standard PHP functions like echo
* to stream the response back to the client. The flush() method
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Templating/EngineInterface.php
Expand Up @@ -49,7 +49,7 @@ function render($name, array $parameters = array());
/**
* Streams a template.
*
* The implementation should outputs the content directly to the client.
* The implementation should output the content directly to the client.
*
* @param mixed $name A template name or a TemplateReferenceInterface instance
* @param array $parameters An array of parameters to pass to the template
Expand Down
Expand Up @@ -84,6 +84,6 @@ public function testSetContent()
public function testGetContent()
{
$response = new StreamedResponse(function () { echo 'foo'; });
$this->assertEquals(false, $response->getContent());
$this->assertFalse($response->getContent());
}
}

0 comments on commit e44b8ba

Please sign in to comment.