| 1 | <?php |
||
| 28 | class CannotBindHeader extends RuntimeException implements Exception |
||
| 29 | { |
||
| 30 | /** |
||
| 31 | * The header submitted for binding |
||
| 32 | * |
||
| 33 | * @var array |
||
| 34 | */ |
||
| 35 | protected $header; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Create an Exception from a record insertion into a stream |
||
| 39 | * |
||
| 40 | * @param string[] $record |
||
|
|
|||
| 41 | * @param array $header |
||
| 42 | * |
||
| 43 | * @return self |
||
| 44 | */ |
||
| 45 | 2 | public static function createFromHeader(array $header): self |
|
| 52 | |||
| 53 | /** |
||
| 54 | * return the invalid header submitted |
||
| 55 | * |
||
| 56 | * @return array |
||
| 57 | */ |
||
| 58 | 2 | public function getHeader(): array |
|
| 62 | } |
||
| 63 |
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.