Skip to content

Commit 2b4765f

Browse files
authored
Merge pull request #17 from alexandre-daubois/explicit-nullable-type
Add explicit nullable type and bump minimal PHP version to 7.1
2 parents 7037f4b + 2e735aa commit 2b4765f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"source": "https://github.com/php-fig/http-factory"
2323
},
2424
"require": {
25-
"php": ">=7.0.0",
25+
"php": ">=7.1",
2626
"psr/http-message": "^1.0 || ^2.0"
2727
},
2828
"autoload": {

src/UploadedFileFactoryInterface.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ interface UploadedFileFactoryInterface
1515
*
1616
* @param StreamInterface $stream Underlying stream representing the
1717
* uploaded file content.
18-
* @param int $size in bytes
18+
* @param int|null $size in bytes
1919
* @param int $error PHP file upload error
20-
* @param string $clientFilename Filename as provided by the client, if any.
21-
* @param string $clientMediaType Media type as provided by the client, if any.
20+
* @param string|null $clientFilename Filename as provided by the client, if any.
21+
* @param string|null $clientMediaType Media type as provided by the client, if any.
2222
*
2323
* @return UploadedFileInterface
2424
*
2525
* @throws \InvalidArgumentException If the file resource is not readable.
2626
*/
2727
public function createUploadedFile(
2828
StreamInterface $stream,
29-
int $size = null,
29+
?int $size = null,
3030
int $error = \UPLOAD_ERR_OK,
31-
string $clientFilename = null,
32-
string $clientMediaType = null
31+
?string $clientFilename = null,
32+
?string $clientMediaType = null
3333
): UploadedFileInterface;
3434
}

0 commit comments

Comments
 (0)