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
3declare(strict_types=1);
4
5namespace Celemas\Core\Factory;
6
7use Psr\Http\Message\RequestFactoryInterface as RequestFactory;
8use Psr\Http\Message\RequestInterface as Request;
9use Psr\Http\Message\ResponseFactoryInterface as ResponseFactory;
10use Psr\Http\Message\ResponseInterface as Response;
11use Psr\Http\Message\ServerRequestFactoryInterface as ServerRequestFactory;
12use Psr\Http\Message\ServerRequestInterface as ServerRequest;
13use Psr\Http\Message\StreamFactoryInterface as StreamFactory;
14use Psr\Http\Message\StreamInterface as Stream;
15use Psr\Http\Message\UploadedFileFactoryInterface as UploadedFileFactory;
16use Psr\Http\Message\UploadedFileInterface as UploadedFile;
17use Psr\Http\Message\UriFactoryInterface as UriFactory;
18use Psr\Http\Message\UriInterface as Uri;
19
20/** @api */
21interface 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}

Branches

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.