diff --git a/lib/Alchemy/Phrasea/Application/Helper/DelivererAware.php b/lib/Alchemy/Phrasea/Application/Helper/DelivererAware.php index f5d3f68dce..797e9b41d3 100644 --- a/lib/Alchemy/Phrasea/Application/Helper/DelivererAware.php +++ b/lib/Alchemy/Phrasea/Application/Helper/DelivererAware.php @@ -10,6 +10,7 @@ namespace Alchemy\Phrasea\Application\Helper; use Alchemy\Phrasea\Http\DeliverDataInterface; +use Symfony\Component\HttpFoundation\Response; trait DelivererAware { @@ -57,11 +58,12 @@ trait DelivererAware /** * Returns a HTTP Response ready to deliver a binary file * - * @param string $file - * @param string $filename - * @param string $disposition + * @param string $file + * @param string $filename + * @param string $disposition * @param string|null $mimeType - * @param integer $cacheDuration + * @param integer $cacheDuration + * @return Response */ public function deliverFile($file, $filename = null, $disposition = DeliverDataInterface::DISPOSITION_INLINE, $mimeType = null, $cacheDuration = null) { @@ -71,11 +73,12 @@ trait DelivererAware /** * Return a HTTP Response ready to deliver data * - * @param string $data - * @param string $filename - * @param string $mimeType - * @param string $disposition + * @param string $data + * @param string $filename + * @param string $mimeType + * @param string $disposition * @param integer $cacheDuration + * @return Response */ public function deliverData($data, $filename, $mimeType, $disposition = DeliverDataInterface::DISPOSITION_INLINE, $cacheDuration = null) { diff --git a/lib/Alchemy/Phrasea/Http/DeliverDataInterface.php b/lib/Alchemy/Phrasea/Http/DeliverDataInterface.php index af37b05a13..e8bee8e08c 100644 --- a/lib/Alchemy/Phrasea/Http/DeliverDataInterface.php +++ b/lib/Alchemy/Phrasea/Http/DeliverDataInterface.php @@ -11,6 +11,7 @@ namespace Alchemy\Phrasea\Http; +use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\ResponseHeaderBag; interface DeliverDataInterface @@ -26,6 +27,7 @@ interface DeliverDataInterface * @param string $disposition * @param string|null $mimeType * @param integer $cacheDuration + * @return Response */ public function deliverFile($file, $filename = null, $disposition = self::DISPOSITION_INLINE, $mimeType = null, $cacheDuration = null); @@ -37,6 +39,7 @@ interface DeliverDataInterface * @param string $mimeType * @param string $disposition * @param integer $cacheDuration + * @return Response */ public function deliverData($data, $filename, $mimeType, $disposition = self::DISPOSITION_INLINE, $cacheDuration = null); } diff --git a/lib/Alchemy/Phrasea/Http/ServeFileResponseFactory.php b/lib/Alchemy/Phrasea/Http/ServeFileResponseFactory.php index 51ab34c399..c84c4ceaf6 100644 --- a/lib/Alchemy/Phrasea/Http/ServeFileResponseFactory.php +++ b/lib/Alchemy/Phrasea/Http/ServeFileResponseFactory.php @@ -23,9 +23,6 @@ class ServeFileResponseFactory implements DeliverDataInterface $this->unicode = $unicode; } - /** - * {@inheritdoc} - */ public function deliverFile($file, $filename = '', $disposition = self::DISPOSITION_INLINE, $mimeType = null, $cacheDuration = null) { $response = new BinaryFileResponse($file); @@ -41,9 +38,6 @@ class ServeFileResponseFactory implements DeliverDataInterface return $response; } - /** - * {@inheritdoc} - */ public function deliverData($data, $filename, $mimeType, $disposition = self::DISPOSITION_INLINE, $cacheDuration = null) { $response = new Response($data);