Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
90 | public function expiresAfter($time) |
||
91 | { |
||
92 | if (is_null($time)) { |
||
93 | $this->expiration = new \DateTime('now +1 year'); |
||
94 | } elseif (is_numeric($time)) { |
||
95 | $this->expiration = new \DateTime('now +' . $time . ' seconds'); |
||
96 | } else { |
||
97 | assert('$time instanceof DateInterval'); |
||
98 | $expiration = new \DateTime(); |
||
99 | $expiration->add($time); |
||
100 | $this->expiration = $expiration; |
||
101 | } |
||
102 | return $this; |
||
103 | } |
||
104 | |||
118 |
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..