| 1 | <?php |
||
| 11 | class StatusResponder implements ResponderInterface |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var Httpstatus |
||
| 15 | */ |
||
| 16 | private $http_status; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param Httpstatus $http_status |
||
| 20 | */ |
||
| 21 | 5 | public function __construct(Httpstatus $http_status) |
|
| 25 | |||
| 26 | /** |
||
| 27 | * @inheritDoc |
||
| 28 | */ |
||
| 29 | 5 | public function __invoke( |
|
| 40 | |||
| 41 | /** |
||
| 42 | * Determine if the payload has a status. |
||
| 43 | * |
||
| 44 | * @param PayloadInterface $payload |
||
| 45 | * |
||
| 46 | * @return boolean |
||
| 47 | */ |
||
| 48 | 5 | private function hasStatus(PayloadInterface $payload) |
|
| 52 | |||
| 53 | /** |
||
| 54 | * Get the response status from the payload. |
||
| 55 | * |
||
| 56 | * @param PayloadInterface $payload |
||
| 57 | * |
||
| 58 | * @return integer |
||
|
1 ignored issue
–
show
|
|||
| 59 | */ |
||
| 60 | 2 | private function status(PayloadInterface $payload) |
|
| 66 | } |
||
| 67 |
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.