@@ -66,24 +66,21 @@ public function __construct($file, int $status = 200, array $headers = [], bool
66
66
*
67
67
* @return static
68
68
*/
69
- public static function create ($ file = null , $ status = 200 , $ headers = [], $ public = true , $ contentDisposition = null , $ autoEtag = false , $ autoLastModified = true )
69
+ public static function create ($ file = null , int $ status = 200 , array $ headers = [], bool $ public = true , string $ contentDisposition = null , bool $ autoEtag = false ,
10000
bool $ autoLastModified = true )
70
70
{
71
71
return new static ($ file , $ status , $ headers , $ public , $ contentDisposition , $ autoEtag , $ autoLastModified );
72
72
}
73
73
74
74
/**
75
75
* Sets the file to stream.
76
76
*
77
- * @param \SplFileInfo|string $file The file to stream
78
- * @param string $contentDisposition
79
- * @param bool $autoEtag
80
- * @param bool $autoLastModified
77
+ * @param \SplFileInfo|string $file The file to stream
81
78
*
82
79
* @return $this
83
80
*
84
81
* @throws FileException
85
82
*/
86
- public function setFile ($ file , $ contentDisposition = null , $ autoEtag = false , $ autoLastModified = true )
83
+ public function setFile ($ file , string $ contentDisposition = null , bool $ autoEtag = false , bool $ autoLastModified = true )
87
84
{
88
85
if (!$ file instanceof File) {
89
86
if ($ file instanceof \SplFileInfo) {
@@ -153,7 +150,7 @@ public function setAutoEtag()
153
150
*
154
151
* @return $this
155
152
*/
156
- public function setContentDisposition ($ disposition , $ filename = '' , $ filenameFallback = '' )
153
+ public function setContentDisposition (string $ disposition , string $ filename = '' , string $ filenameFallback = '' )
157
154
{
158
155
if ('' === $ filename ) {
159
156
$ filename = $ this ->file ->getFilename ();
@@ -346,11 +343,9 @@ public static function trustXSendfileTypeHeader()
346
343
* If this is set to true, the file will be unlinked after the request is send
347
344
* Note: If the X-Sendfile header is used, the deleteFileAfterSend setting will not be used.
348
345
*
349
- * @param bool $shouldDelete
350
- *
351
346
* @return $this
352
347
*/
353
- public function deleteFileAfterSend ($ shouldDelete = true )
348
+ public function deleteFileAfterSend (bool $ shouldDelete = true )
354
349
{
355
350
$ this ->deleteFileAfterSend = $ shouldDelete ;
356
351
0 commit comments