mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-08 08:13:11 +08:00
Replaced all FQ global function and constants by explicit imports
This commit is contained in:
@@ -3,6 +3,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Shlinkio\Shlink\Common\Util;
|
||||
|
||||
use finfo;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Zend\Diactoros\Response;
|
||||
use Zend\Diactoros\Stream;
|
||||
@@ -31,7 +32,7 @@ trait ResponseUtilsTrait
|
||||
{
|
||||
$body = new Stream($path);
|
||||
return new Response($body, 200, ArrayUtils::merge([
|
||||
'Content-Type' => (new \finfo(FILEINFO_MIME))->file($path),
|
||||
'Content-Type' => (new finfo(FILEINFO_MIME))->file($path),
|
||||
'Content-Length' => (string) $body->getSize(),
|
||||
], $extraHeaders));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user