X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fsymfony%2Fhttp-foundation%2FStreamedResponse.php;fp=vendor%2Fsymfony%2Fhttp-foundation%2FStreamedResponse.php;h=928531309ad0a5bcf7beaa6da9dc4639b320d327;hp=8be624436c1ba6e2b02da0b6cdf5faf5221383a3;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/vendor/symfony/http-foundation/StreamedResponse.php b/vendor/symfony/http-foundation/StreamedResponse.php index 8be624436..928531309 100644 --- a/vendor/symfony/http-foundation/StreamedResponse.php +++ b/vendor/symfony/http-foundation/StreamedResponse.php @@ -37,7 +37,7 @@ class StreamedResponse extends Response * @param int $status The response status code * @param array $headers An array of response headers */ - public function __construct($callback = null, $status = 200, $headers = array()) + public function __construct(callable $callback = null, $status = 200, $headers = array()) { parent::__construct(null, $status, $headers); @@ -66,14 +66,9 @@ class StreamedResponse extends Response * Sets the PHP callback associated with this Response. * * @param callable $callback A valid PHP callback - * - * @throws \LogicException */ - public function setCallback($callback) + public function setCallback(callable $callback) { - if (!is_callable($callback)) { - throw new \LogicException('The Response callback must be a valid PHP callable.'); - } $this->callback = $callback; }