Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 2 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | 2 | public function createUploadedFile( |
|
19 | StreamInterface $stream, |
||
20 | ?int $size = null, |
||
21 | int $error = UPLOAD_ERR_OK, |
||
22 | ?string $clientFilename = null, |
||
23 | ?string $clientMediaType = null |
||
24 | ): UploadedFileInterface { |
||
25 | 2 | $size = (int) ($size === null ? $stream->getSize() : $size); |
|
26 | 2 | return new UploadedFile($stream, $size, $error, $clientFilename, $clientMediaType); |
|
27 | } |
||
29 |