|
10 | 10 | use Psr\Http\Message\ServerRequestInterface; |
11 | 11 | use Psr\Http\Message\StreamFactoryInterface; |
12 | 12 | use Psr\Http\Message\StreamInterface; |
| 13 | +use Psr\Http\Message\UploadedFileFactoryInterface; |
| 14 | +use Psr\Http\Message\UploadedFileInterface; |
13 | 15 | use Psr\Http\Message\UriFactoryInterface; |
14 | 16 | use Psr\Http\Message\UriInterface; |
15 | 17 |
|
|
19 | 21 | */ |
20 | 22 | final class Psr17Factory implements ServerRequestFactoryInterface, |
21 | 23 | UriFactoryInterface, StreamFactoryInterface, ResponseFactoryInterface, |
22 | | - RequestFactoryInterface,UploadedFileFactoryInterface |
| 24 | + RequestFactoryInterface, UploadedFileFactoryInterface |
23 | 25 | { |
24 | 26 | private ?UriFactoryInterface $uriFactory = null; |
25 | 27 | private ?StreamFactoryInterface $streamFactory = null; |
@@ -155,11 +157,11 @@ public function createRequest(string $method, $uri): RequestInterface |
155 | 157 | */ |
156 | 158 | public function createUploadedFile(StreamInterface $stream, int $size = null, int $error = \UPLOAD_ERR_OK, string $clientFilename = null, string $clientMediaType = null): UploadedFileInterface |
157 | 159 | { |
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 | + } |
162 | 164 |
|
163 | | - throw new \RuntimeException('No available PSR-7 Uploaded file implementation'); |
164 | | - } |
| 165 | + throw new \RuntimeException('No available PSR-7 Uploaded file implementation'); |
| 166 | + } |
165 | 167 | } |
0 commit comments