1 | <?php |
||
15 | class CursorRecordSet implements RecordSetInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var Cursor |
||
19 | */ |
||
20 | private $cursor; |
||
21 | |||
22 | /** |
||
23 | * @var Hydrator |
||
24 | */ |
||
25 | private $hydrator; |
||
26 | |||
27 | /** |
||
28 | * @var EntityMetadata |
||
29 | */ |
||
30 | private $metadata; |
||
31 | |||
32 | /** |
||
33 | * @var Store |
||
34 | */ |
||
35 | private $store; |
||
36 | |||
37 | /** |
||
38 | * Constructor. |
||
39 | * |
||
40 | * @param EntityMetadata $metadata |
||
41 | * @param Cursor $cursor |
||
42 | * @param Store $store |
||
43 | * @param Hydrator $hydrator |
||
44 | */ |
||
45 | public function __construct(EntityMetadata $metadata, Cursor $cursor, Store $store, Hydrator $hydrator) |
||
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | public function count() |
||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | public function current() |
||
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | public function key() |
||
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | */ |
||
81 | public function getSingleResult() |
||
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | public function next() |
||
97 | |||
98 | /** |
||
99 | * {@inheritdoc} |
||
100 | */ |
||
101 | public function rewind() |
||
105 | |||
106 | /** |
||
107 | * {@inheritdoc} |
||
108 | */ |
||
109 | public function totalCount() |
||
113 | |||
114 | /** |
||
115 | * {@inheritdoc} |
||
116 | */ |
||
117 | public function valid() |
||
121 | } |
||
122 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.