| 1 | <?php  | 
            ||
| 5 | class Counter implements \Serializable, \JsonSerializable, \Countable  | 
            ||
| 6 | { | 
            ||
| 7 | /**  | 
            ||
| 8 | * @var float  | 
            ||
| 9 | */  | 
            ||
| 10 | private $expiresIn;  | 
            ||
| 11 | |||
| 12 | /**  | 
            ||
| 13 | * @var float  | 
            ||
| 14 | */  | 
            ||
| 15 | private $expiresAt;  | 
            ||
| 16 | |||
| 17 | /**  | 
            ||
| 18 | * @var int  | 
            ||
| 19 | */  | 
            ||
| 20 | private $counter;  | 
            ||
| 21 | |||
| 22 | /**  | 
            ||
| 23 | * Counter constructor.  | 
            ||
| 24 | * @param float $startTime  | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 25 | * @param int $nbRequests  | 
            ||
| 26 | */  | 
            ||
| 27 | public function __construct(float $expiresIn)  | 
            ||
| 32 | |||
| 33 | private function reset()  | 
            ||
| 38 | |||
| 39 | /**  | 
            ||
| 40 | * Increment counter.  | 
            ||
| 41 | */  | 
            ||
| 42 | public function increment()  | 
            ||
| 50 | |||
| 51 | /**  | 
            ||
| 52 | * @return int  | 
            ||
| 53 | */  | 
            ||
| 54 | public function count(): int  | 
            ||
| 61 | |||
| 62 | /**  | 
            ||
| 63 | * @return float  | 
            ||
| 64 | */  | 
            ||
| 65 | public function getRemainingTime()  | 
            ||
| 69 | |||
| 70 | /**  | 
            ||
| 71 | * @return bool  | 
            ||
| 72 | */  | 
            ||
| 73 | public function isExpired()  | 
            ||
| 77 | |||
| 78 | /**  | 
            ||
| 79 | * @inheritDoc  | 
            ||
| 80 | */  | 
            ||
| 81 | public function serialize()  | 
            ||
| 85 | |||
| 86 | /**  | 
            ||
| 87 | * @inheritDoc  | 
            ||
| 88 | */  | 
            ||
| 89 | public function unserialize($serialized)  | 
            ||
| 96 | |||
| 97 | /**  | 
            ||
| 98 | * @inheritDoc  | 
            ||
| 99 | */  | 
            ||
| 100 | public function jsonSerialize()  | 
            ||
| 108 | }  | 
            ||
| 109 | 
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.