Skip to content

Commit 9a27aa0

Browse files
authored
Merge pull request #2 from ibpavlov/patch-1
Fix Type Casing
2 parents b1b013c + 7943c48 commit 9a27aa0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/File.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class File
2828
*
2929
* @param string $content the tmp file content
3030
* @param string|null $suffix the optional suffix for the tmp file
31-
* @param string|null $suffix the optional prefix for the tmp file. If null 'php_tmpfile_' is used.
31+
* @param string|null $prefix the optional prefix for the tmp file. If null 'php_tmpfile_' is used.
3232
* @param string|null $directory directory where the file should be created. Autodetected if not provided.
3333
*/
3434
public function __construct($content, $suffix = null, $prefix = null, $directory = null)
@@ -64,10 +64,10 @@ public function __destruct()
6464
* Send tmp file to client, either inline or as download
6565
*
6666
* @param string|null $filename the filename to send. If empty, the file is streamed inline.
67-
* @param string the Content-Type header
67+
* @param string $contentType the Content-Type header
6868
* @param bool $inline whether to force inline display of the file, even if filename is present.
6969
*/
70-
public function send($name = null, $contentType, $inline = false)
70+
public function send($filename = null, $contentType, $inline = false)
7171
{
7272
header('Pragma: public');
7373
header('Expires: 0');
@@ -76,9 +76,9 @@ public function send($name = null, $contentType, $inline = false)
7676
header('Content-Transfer-Encoding: binary');
7777
header('Content-Length: '.filesize($this->_fileName));
7878

79-
if ($name!==null || $inline) {
79+
if ($filename!==null || $inline) {
8080
$disposition = $inline ? 'inline' : 'attachment';
81-
header("Content-Disposition: $disposition; filename=\"$name\"");
81+
header("Content-Disposition: $disposition; filename=\"$filename\"");
8282
}
8383

8484
readfile($this->_fileName);

0 commit comments

Comments
 (0)