Skip to content

Commit 4fd9f57

Browse files
authored
Update Psr17Factory.php
1 parent 765430f commit 4fd9f57

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/Psr17Factory.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
use Psr\Http\Message\ServerRequestInterface;
1111
use Psr\Http\Message\StreamFactoryInterface;
1212
use Psr\Http\Message\StreamInterface;
13+
use Psr\Http\Message\UploadedFileFactoryInterface;
14+
use Psr\Http\Message\UploadedFileInterface;
1315
use Psr\Http\Message\UriFactoryInterface;
1416
use Psr\Http\Message\UriInterface;
1517

@@ -19,7 +21,7 @@
1921
*/
2022
final class Psr17Factory implements ServerRequestFactoryInterface,
2123
UriFactoryInterface, StreamFactoryInterface, ResponseFactoryInterface,
22-
RequestFactoryInterface,UploadedFileFactoryInterface
24+
RequestFactoryInterface, UploadedFileFactoryInterface
2325
{
2426
private ?UriFactoryInterface $uriFactory = null;
2527
private ?StreamFactoryInterface $streamFactory = null;
@@ -155,11 +157,11 @@ public function createRequest(string $method, $uri): RequestInterface
155157
*/
156158
public function createUploadedFile(StreamInterface $stream, int $size = null, int $error = \UPLOAD_ERR_OK, string $clientFilename = null, string $clientMediaType = null): UploadedFileInterface
157159
{
158-
if ($this->uploadedFileFactory)
159-
{
160-
return $this->uploadedFileFactory->createUploadedFile($stream, $size, $error, $clientFilename, $clientMediaType);
161-
}
160+
if ($this->uploadedFileFactory)
161+
{
162+
return $this->uploadedFileFactory->createUploadedFile($stream, $size, $error, $clientFilename, $clientMediaType);
163+
}
162164

163-
throw new \RuntimeException('No available PSR-7 Uploaded file implementation');
164-
}
165+
throw new \RuntimeException('No available PSR-7 Uploaded file implementation');
166+
}
165167
}

0 commit comments

Comments
 (0)