Conditions | 6 |
Paths | 6 |
Total Lines | 22 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
23 | public static function create($object) |
||
24 | { |
||
25 | if ($object instanceof ServerRequestInterface) { |
||
26 | return new ServerRequest($object); |
||
27 | } |
||
28 | |||
29 | if ($object instanceof RequestInterface) { |
||
30 | return new Request($object); |
||
31 | } |
||
32 | |||
33 | if ($object instanceof ResponseInterface) { |
||
34 | return new Response($object); |
||
35 | } |
||
36 | |||
37 | if ($object instanceof UriInterface) { |
||
38 | return new Uri($object); |
||
39 | } |
||
40 | |||
41 | if ($object instanceof StreamInterface) { |
||
42 | return new Stream($object); |
||
43 | } |
||
44 | } |
||
45 | } |