ServerRequestFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 7
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A createServerRequest() 0 2 1
1
<?php
2
/**
3
 * Class ServerRequestFactory
4
 *
5
 * @created      27.08.2018
6
 * @author       smiley <[email protected]>
7
 * @copyright    2018 smiley
8
 * @license      MIT
9
 */
10
11
namespace chillerlan\HTTP\Psr17;
12
13
use chillerlan\HTTP\Psr7\ServerRequest;
14
use Fig\Http\Message\RequestMethodInterface;
15
use Psr\Http\Message\{ServerRequestFactoryInterface, ServerRequestInterface};
16
17
class ServerRequestFactory implements ServerRequestFactoryInterface, RequestMethodInterface{
18
19
	/**
20
	 * @inheritDoc
21
	 */
22
	public function createServerRequest(string $method, $uri, array $serverParams = []):ServerRequestInterface{
23
		return new ServerRequest($method, $uri, $serverParams);
24
	}
25
26
}
27