Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 6 | ||
Bugs | 2 | Features | 0 |
1 | <?php |
||
27 | public function collect() |
||
28 | { |
||
29 | $timeNow = microtime(true); |
||
30 | |||
31 | if(isset($this->keyList[$this->key]) && $this->keyList[$this->key]['expired'] > $timeNow) { |
||
32 | $this->keyList[$this->key]['requestNum']++; |
||
33 | } else { |
||
34 | $this->keyList[$this->key] = array('expired' => $timeNow + $this->timeInterval, 'requestNum' => 1); |
||
35 | } |
||
36 | } |
||
37 | } |