| 1 | <?php |
||
| 13 | class Year implements Entity, IteratorAggregate |
||
| 14 | { |
||
| 15 | /** @var int */ |
||
| 16 | private $yearNumber; |
||
| 17 | |||
| 18 | /** @var array */ |
||
| 19 | private $weeks = []; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Year constructor. |
||
| 23 | * @param int|null $yearNumber |
||
| 24 | */ |
||
| 25 | public function __construct(int $yearNumber = null) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param string $jsonString |
||
|
|
|||
| 36 | * @return Year |
||
| 37 | */ |
||
| 38 | public static function fromJson(\stdClass $jsonObject): self |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return mixed |
||
| 45 | */ |
||
| 46 | public function getYearNumber(): int |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @param Week $week |
||
| 53 | */ |
||
| 54 | public function addWeek(Week $week): void |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @param int $weekNumber |
||
| 61 | * @return Week |
||
| 62 | */ |
||
| 63 | public function getWeek(int $weekNumber): Week |
||
| 71 | |||
| 72 | /** |
||
| 73 | * Retrieve an external iterator |
||
| 74 | * @link http://php.net/manual/en/iteratoraggregate.getiterator.php |
||
| 75 | * @return Traversable An instance of an object implementing <b>Iterator</b> or |
||
| 76 | * <b>Traversable</b> |
||
| 77 | * @since 5.0.0 |
||
| 78 | */ |
||
| 79 | public function getIterator(): Traversable |
||
| 83 | } |
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.