RequestFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 15
ccs 2
cts 2
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A createRequest() 0 3 1
1
<?php
2
3
namespace DMT\Aura\Psr\Factory;
4
5
use DMT\Aura\Psr\Message\Request;
6
use Psr\Http\Message\RequestFactoryInterface;
7
use Psr\Http\Message\RequestInterface;
8
use Psr\Http\Message\UriInterface;
9
10
/**
11
 * Class RequestFactory
12
 *
13
 * @package DMT\Aura\Psr\Factory
14
 */
15
class RequestFactory implements RequestFactoryInterface
16
{
17
    /**
18
     * Create a new request.
19
     *
20
     * @param string $method The HTTP method associated with the request.
21
     * @param UriInterface|string $uri The URI associated with the request. If
22
     *     the value is a string, the factory MUST create a UriInterface
23
     *     instance based on it.
24
     *
25
     * @return RequestInterface
26
     */
27 38
    public function createRequest(string $method, $uri): RequestInterface
28
    {
29 38
        return new Request($method, $uri);
30
    }
31
}