1 | <?php |
||
5 | class MultiResultSetAdapter implements \Foolz\SphinxQL\Drivers\MultiResultSetAdapterInterface |
||
6 | { |
||
7 | /** |
||
8 | * @var bool |
||
9 | */ |
||
10 | protected $valid = true; |
||
11 | |||
12 | /** |
||
13 | * @var Connection|null |
||
14 | */ |
||
15 | protected $connection = null; |
||
16 | |||
17 | public function __construct(Connection $connection) |
||
21 | |||
22 | /** |
||
23 | * @throws \Foolz\SphinxQL\Exception\ConnectionException |
||
24 | */ |
||
25 | public function getNext() |
||
36 | |||
37 | /** |
||
38 | * @return ResultSet |
||
39 | * @throws \Foolz\SphinxQL\Exception\ConnectionException |
||
40 | */ |
||
41 | public function current() |
||
45 | |||
46 | /** |
||
47 | * @return bool |
||
48 | * @throws \Foolz\SphinxQL\Exception\ConnectionException |
||
49 | */ |
||
50 | public function valid() |
||
54 | } |
||
55 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: