| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function respond($callbackOrStatusCode = 200, $callbackOrHeaders = []) |
||
| 31 | { |
||
| 32 | if (is_callable($callbackOrStatusCode)) { |
||
| 33 | $callbackOrStatusCode($this->response); |
||
| 34 | } else { |
||
| 35 | $this->response->code($callbackOrStatusCode); |
||
| 36 | |||
| 37 | if (is_callable($callbackOrHeaders)) { |
||
| 38 | $callbackOrHeaders($this->response); |
||
| 39 | } else { |
||
| 40 | $this->response->headers($callbackOrHeaders); |
||
| 41 | } |
||
| 42 | } |
||
| 43 | |||
| 44 | return new JsonResponse($this->createData()->toArray(), $this->response->statusCode(), $this->response->getHeaders()); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$irelandis not defined by the methodfinale(...).The most likely cause is that the parameter was changed, but the annotation was not.