File tree 3 files changed +75
-0
lines changed
3 files changed +75
-0
lines changed Original file line number Diff line number Diff line change 21
21
<file name =" stubs/BSON/Document.stub.php" />
22
22
<file name =" stubs/BSON/Iterator.stub.php" />
23
23
<file name =" stubs/BSON/PackedArray.stub.php" />
24
+ <file name =" stubs/Driver/Cursor.stub.php" />
25
+ <file name =" stubs/Driver/CursorInterface.stub.php" />
24
26
</stubs >
25
27
26
28
<issueHandlers >
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace MongoDB \Driver ;
4
+
5
+ /**
6
+ * @template-covariant TValue of array|object
7
+ *
8
+ * @template-implements CursorInterface<TValue>
9
+ */
10
+ final class Cursor implements CursorInterface
11
+ {
12
+ /**
13
+ * @return TValue|null
14
+ * @psalm-ignore-nullable-return
15
+ */
16
+ public function current (): array |object |null
17
+ {
18
+ }
19
+
20
+ public function next (): void
21
+ {
22
+ }
23
+
24
+ /** @psalm-ignore-nullable-return */
25
+ public function key (): ?int
26
+ {
27
+ }
28
+
29
+ public function valid (): bool
30
+ {
31
+ }
32
+
33
+ public function rewind (): void
34
+ {
35
+ }
36
+
37
+ /** @return array<TValue> */
38
+ public function toArray (): array
39
+ {
40
+ }
41
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace MongoDB \Driver ;
4
+
5
+ use Iterator ;
6
+
7
+ /**
8
+ * @template TValue of array|object
9
+ * @template-implements Iterator<int, TValue>
10
+ */
11
+ interface CursorInterface extends Iterator
12
+ {
13
+ /**
14
+ * @return TValue|null
15
+ * @psalm-ignore-nullable-return
16
+ */
17
+ public function current (): array |object |null ;
18
+
19
+ public function getId (): \MongoDB \BSON \Int64 ;
20
+
21
+ public function getServer (): Server ;
22
+
23
+ public function isDead (): bool ;
24
+
25
+ /** @psalm-ignore-nullable-return */
26
+ public function key (): ?int ;
27
+
28
+ public function setTypeMap (array $ typemap ): void ;
29
+
30
+ /** @return array<TValue> */
31
+ public function toArray (): array ;
32
+ }
You can’t perform that action at this time.
0 commit comments