| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function apply(Recurrence $recurrence, \Datetime $datetime) |
||
| 20 | { |
||
| 21 | if ($this->isWeekend($datetime)) { |
||
| 22 | // Add 1 or 2 days to skip weekend (we didn't use `next monday` pattern of \Datetime::format cause it remove time) |
||
| 23 | $days = (7 - (int) $datetime->format('N') + 1); |
||
| 24 | $datetime->modify(sprintf('+%d days', $days)); |
||
| 25 | } |
||
| 26 | |||
| 27 | return $datetime; |
||
| 28 | } |
||
| 29 | |||
| 38 |
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.