File tree Expand file tree Collapse file tree 2 files changed +4
-12
lines changed
Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change 1010 }
1111 ],
1212 "require" : {
13- "php" : " ^7.4 | ^ 8.0" ,
14- "karelwintersky/arris.toolkit.mimetypes" : " ^1 "
13+ "php" : " ^8.0" ,
14+ "karelwintersky/arris.toolkit.mimetypes" : " ^2 "
1515 },
1616 "autoload" : {
1717 "psr-4" : {
Original file line number Diff line number Diff line change 11<?php
2- /**
3- * Provides the possibility to easily create file downloads in PHP
4- *
5- * @author Jannik Zschiesche <hello@apfelbox.net>
6- * @author Karel Wintersky <karel.wintersky@gmail.com>
7- * @version 1.0
8- * @license MIT
9- */
102
113namespace Arris \Toolkit ;
124
@@ -25,7 +17,7 @@ class FileDownload implements FileDownloadInterface
2517 /**
2618 * @var string
2719 */
28- private $ fileName ;
20+ private string $ fileName ;
2921
3022 /**
3123 * Constructs a new file download
@@ -88,7 +80,7 @@ private function getMimeType(string $fileName): string
8880
8981 $ mimeType = MimeTypes::fromExtension ( $ fileExtension );
9082
91- return empty ($ mimeType ) ? "application/force-download " : $ mimeType ;
83+ return ($ mimeType === MimeTypes:: UNKNOWN_MIME_TYPE ) ? "application/force-download " : $ mimeType ;
9284 }
9385
9486 /**
You can’t perform that action at this time.
0 commit comments