Conditions | 3 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
74 | 1 | public function valid() |
|
75 | { |
||
76 | 1 | if (!isset($this->result[$this->offset]) && $this->offset < $this->max) { |
|
77 | 1 | ++$this->current; |
|
78 | 1 | $url = preg_replace('/page=[0-9]+/', 'page=' . $this->current, $this->url); |
|
79 | 1 | $result = $this->client->request($this->method, $url, $this->params); |
|
80 | |||
81 | 1 | $this->result = array_merge($this->result, $result[$this->key]); |
|
82 | |||
83 | 1 | return true; |
|
84 | } |
||
85 | |||
86 | 1 | return $this->offset < $this->max; |
|
87 | } |
||
88 | |||
96 |