| 1 | <?php |
||
| 9 | class PropertyOperationUnary extends PropertyOperation |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $file; |
||
| 15 | /** |
||
| 16 | * @var \PhpParser\Node\Stmt |
||
| 17 | */ |
||
| 18 | protected $propertyContext; |
||
| 19 | /** |
||
| 20 | * @var \PhpParser\Node\Stmt\Property |
||
| 21 | */ |
||
| 22 | protected $property; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param string $context |
||
| 26 | * @param string $file |
||
| 27 | * @param \PhpParser\Node\Stmt $propertyContex |
||
|
|
|||
| 28 | * @param \PhpParser\Node\Stmt\Property $property |
||
| 29 | */ |
||
| 30 | 4 | public function __construct($context, $file, Stmt $propertyContext, Property $property) |
|
| 38 | |||
| 39 | /** |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | public function getLocation() |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return int |
||
| 49 | */ |
||
| 50 | public function getLine() |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return string |
||
| 57 | */ |
||
| 58 | 4 | public function getTarget() |
|
| 62 | } |
||
| 63 |
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.