Total Complexity | 6 |
Total Lines | 57 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class Statement implements StatementInterface |
||
16 | { |
||
17 | /** |
||
18 | * The query result |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $results; |
||
23 | |||
24 | /** |
||
25 | * The constructor |
||
26 | * |
||
27 | * @param array $results |
||
28 | */ |
||
29 | public function __construct(array $results) |
||
30 | { |
||
31 | $this->results = $results; |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * @return array |
||
36 | */ |
||
37 | public function rows(): array |
||
38 | { |
||
39 | return $this->results; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @inheritDoc |
||
44 | */ |
||
45 | public function rowCount() |
||
46 | { |
||
47 | return count($this->results); |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @inheritDoc |
||
52 | */ |
||
53 | public function fetchAssoc() |
||
54 | { |
||
55 | return array_pop($this->results); |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * @inheritDoc |
||
60 | */ |
||
61 | public function fetchRow() |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * @inheritDoc |
||
68 | */ |
||
69 | public function fetchField() |
||
72 | // return new StatementFieldEntity(); |
||
73 | } |
||
75 |