| 1 | <?php  | 
            ||
| 7 | class Money implements CurrencyAwareInterface  | 
            ||
| 8 | { | 
            ||
| 9 | use CurrencyAwareTrait;  | 
            ||
| 10 | |||
| 11 | /**  | 
            ||
| 12 | * @var \Money\Money  | 
            ||
| 13 | */  | 
            ||
| 14 | protected $money;  | 
            ||
| 15 | |||
| 16 | /**  | 
            ||
| 17 | * Constructor.  | 
            ||
| 18 | *  | 
            ||
| 19 | * @param integer $total  | 
            ||
| 20 | * @param Money $money  | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 21 | */  | 
            ||
| 22 | public function __construct($total = 0, MoneyPHP\Currency $currency)  | 
            ||
| 26 | |||
| 27 | /**  | 
            ||
| 28 | * @return \Money\Money  | 
            ||
| 29 | */  | 
            ||
| 30 | public function getMoney()  | 
            ||
| 34 | }  | 
            ||
| 35 | 
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.