| 1 | <?php |
||
| 13 | class AsyncHttpGenericService implements AsyncHttpService |
||
| 14 | { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | private $method; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | private $url; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | private $content; |
||
| 30 | |||
| 31 | 1 | /** |
|
| 32 | * @var callable |
||
| 33 | 1 | */ |
|
| 34 | 1 | private $callback; |
|
| 35 | 1 | ||
| 36 | 1 | ||
| 37 | public function __construct($method, $url, $content, callable $callback = null) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public function getMethod() |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return string |
||
| 55 | */ |
||
| 56 | public function getUrl() |
||
| 60 | 1 | ||
| 61 | /** |
||
| 62 | 1 | * @return string |
|
|
|
|||
| 63 | 1 | */ |
|
| 64 | 1 | public function getContent() |
|
| 72 | |||
| 73 | /** |
||
| 74 | * @return array |
||
| 75 | */ |
||
| 76 | public function getHeaders() |
||
| 88 | |||
| 89 | /** |
||
| 90 | * @param $data |
||
| 91 | * @param Response $response |
||
| 92 | * |
||
| 93 | * @return void |
||
| 94 | */ |
||
| 95 | public function execute($data, Response $response) |
||
| 102 | } |
||
| 103 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.