Checks if the types of returned expressions are compatible with the documented types.
1 | <?php |
||
2 | |||
3 | namespace Elgg\Http; |
||
4 | |||
5 | use Elgg\Http\ResponseTransport; |
||
6 | use Symfony\Component\HttpFoundation\Response; |
||
7 | |||
8 | /** |
||
9 | * Transport for sending responses to HTTP clients via HTTP protocol |
||
10 | * |
||
11 | * @since 2.3 |
||
12 | * @access private |
||
13 | */ |
||
14 | class HttpProtocolTransport implements ResponseTransport { |
||
15 | |||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | */ |
||
19 | public function send(Response $response) { |
||
20 | return $response->send(); |
||
0 ignored issues
–
show
|
|||
21 | } |
||
22 | |||
23 | } |
||
24 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: