| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public function __construct($description, $date = null) |
||
| 34 | { |
||
| 35 | if ($date instanceof Datetime) { |
||
| 36 | $this->date = $date; |
||
| 37 | } elseif ($date === null) { |
||
| 38 | $this->date = new Datetime('NOW'); |
||
| 39 | } else { |
||
| 40 | $this->date = DateTime::createFromFormat('d-m-Y H:i:s', (string) $date); |
||
| 41 | } |
||
| 42 | |||
| 43 | $this->description = $description; |
||
| 44 | } |
||
| 45 | |||
| 66 |
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.