Skip to content

Commit 8f74c9d

Browse files
author
Karel Wintersky
committed
2.0.0
PHP8 Release
1 parent d7b75fa commit 8f74c9d

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
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": {

src/FileDownload.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
<?php
2-
/**
3-
* Provides the possibility to easily create file downloads in PHP
4-
*
5-
* @author Jannik Zschiesche <[email protected]>
6-
* @author Karel Wintersky <[email protected]>
7-
* @version 1.0
8-
* @license MIT
9-
*/
102

113
namespace 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
/**

0 commit comments

Comments
 (0)