| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 38 | 3 | public function seconds() |
|
| 39 | { |
||
| 40 | // interval duration [next month, next month +1) |
||
| 41 | 3 | $offset_time = $this->time->modify('first day of this month')->modify('+1 month')->setTime(0, 0, 0); |
|
| 42 | |||
| 43 | 3 | $limit_time = $offset_time->modify('+1 month'); |
|
| 44 | 3 | $limit = $limit_time->getTimestamp() - $offset_time->getTimestamp(); |
|
| 45 | |||
| 46 | // offset to next month |
||
| 47 | 3 | $offset = $offset_time->getTimestamp() - $this->time->getTimestamp(); |
|
| 48 | |||
| 49 | 3 | return $offset + rand(0, $limit); |
|
| 50 | } |
||
| 51 | } |
||
| 52 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..