Conditions | 1 |
Paths | 1 |
Total Lines | 27 |
Lines | 0 |
Ratio | 0 % |
Tests | 15 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
18 | 3 | public function apply(Injector $injector) |
|
19 | { |
||
20 | 3 | $injector->alias( |
|
21 | 3 | RequestInterface::class, |
|
22 | // It should not be necessary to force all requests to be server |
||
23 | // requests, except that Relay uses the wrong type hint: |
||
24 | // https://github.com/relayphp/Relay.Relay/issues/25 |
||
25 | // |
||
26 | // 'Zend\Diactoros\Request' |
||
27 | ServerRequest::class |
||
28 | 3 | ); |
|
29 | |||
30 | 3 | $injector->alias( |
|
31 | 3 | ResponseInterface::class, |
|
32 | Response::class |
||
33 | 3 | ); |
|
34 | |||
35 | 3 | $injector->alias( |
|
36 | 3 | ServerRequestInterface::class, |
|
37 | ServerRequest::class |
||
38 | 3 | ); |
|
39 | |||
40 | 3 | $injector->delegate( |
|
41 | 3 | ServerRequest::class, |
|
42 | 3 | [ServerRequestFactory::class, 'fromGlobals'] |
|
43 | 3 | ); |
|
44 | 3 | } |
|
45 | } |
||
46 |