Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Celemas\Core\Factory; |
| 6 | |
| 7 | use Psr\Http\Message\RequestFactoryInterface as RequestFactory; |
| 8 | use Psr\Http\Message\RequestInterface as Request; |
| 9 | use Psr\Http\Message\ResponseFactoryInterface as ResponseFactory; |
| 10 | use Psr\Http\Message\ResponseInterface as Response; |
| 11 | use Psr\Http\Message\ServerRequestFactoryInterface as ServerRequestFactory; |
| 12 | use Psr\Http\Message\ServerRequestInterface as ServerRequest; |
| 13 | use Psr\Http\Message\StreamFactoryInterface as StreamFactory; |
| 14 | use Psr\Http\Message\StreamInterface as Stream; |
| 15 | use Psr\Http\Message\UploadedFileFactoryInterface as UploadedFileFactory; |
| 16 | use Psr\Http\Message\UploadedFileInterface as UploadedFile; |
| 17 | use Psr\Http\Message\UriFactoryInterface as UriFactory; |
| 18 | use Psr\Http\Message\UriInterface as Uri; |
| 19 | |
| 20 | /** @api */ |
| 21 | interface Factory |
| 22 | { |
| 23 | public function serverRequest(): ServerRequest; |
| 24 | |
| 25 | public function request(string $method, Uri|string $uri): Request; |
| 26 | |
| 27 | public function response(int $code = 200, string $reasonPhrase = ''): Response; |
| 28 | |
| 29 | public function stream(string $content = ''): Stream; |
| 30 | |
| 31 | public function streamFromFile(string $filename, string $mode = 'r'): Stream; |
| 32 | |
| 33 | public function streamFromResource(mixed $resource): Stream; |
| 34 | |
| 35 | public function uploadedFile( |
| 36 | Stream $stream, |
| 37 | ?int $size = null, |
| 38 | int $error = \UPLOAD_ERR_OK, |
| 39 | ?string $clientFilename = null, |
| 40 | ?string $clientMediaType = null, |
| 41 | ): UploadedFile; |
| 42 | |
| 43 | public function uri(string $uri = ''): Uri; |
| 44 | |
| 45 | public function requestFactory(): RequestFactory; |
| 46 | |
| 47 | public function responseFactory(): ResponseFactory; |
| 48 | |
| 49 | public function serverRequestFactory(): ServerRequestFactory; |
| 50 | |
| 51 | public function streamFactory(): StreamFactory; |
| 52 | |
| 53 | public function uploadedFileFactory(): UploadedFileFactory; |
| 54 | |
| 55 | public function uriFactory(): UriFactory; |
| 56 | } |
Below are the source code lines that represent each code branch as identified by Xdebug. Please note a branch is not
necessarily coterminous with a line, a line may contain multiple branches and therefore show up more than once.
Please also be aware that some branches may be implicit rather than explicit, e.g. an if statement
always has an else as part of its logical flow even if you didn't write one.