| Conditions | 8 |
| Paths | 8 |
| Total Lines | 32 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function export($value) |
||
| 18 | { |
||
| 19 | if ($value instanceof ServerRequestInterface) { |
||
| 20 | return 'ServerRequest instance'; |
||
| 21 | } |
||
| 22 | |||
| 23 | if ($value instanceof RequestInterface) { |
||
| 24 | return 'Request instance'; |
||
| 25 | } |
||
| 26 | |||
| 27 | if ($value instanceof ResponseInterface) { |
||
| 28 | return 'Response instance'; |
||
| 29 | } |
||
| 30 | |||
| 31 | if ($value instanceof StreamInterface) { |
||
| 32 | return 'Stream instance'; |
||
| 33 | } |
||
| 34 | |||
| 35 | if ($value instanceof UriInterface) { |
||
| 36 | return 'Uri instance'; |
||
| 37 | } |
||
| 38 | |||
| 39 | if ($value instanceof Crawler) { |
||
| 40 | return 'Html content'; |
||
| 41 | } |
||
| 42 | |||
| 43 | if (is_object($value)) { |
||
| 44 | return get_class($value); |
||
| 45 | } |
||
| 46 | |||
| 47 | return gettype($value); |
||
| 48 | } |
||
| 49 | } |
||
| 50 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.