Skip to content

Commit d39e298

Browse files
committed
Psalm stubs for PHPC BulkWriteCommand classes
1 parent ee242a4 commit d39e298

File tree

4 files changed

+117
-0
lines changed

4 files changed

+117
-0
lines changed

psalm.xml.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
</projectFiles>
2121

2222
<stubs>
23+
<file name="stubs/Driver/BulkWriteCommand.stub.php"/>
24+
<file name="stubs/Driver/BulkWriteCommandException.stub.php"/>
25+
<file name="stubs/Driver/BulkWriteCommandResult.stub.php"/>
2326
<file name="stubs/Driver/Cursor.stub.php"/>
2427
<file name="stubs/Driver/CursorInterface.stub.php"/>
2528
<file name="stubs/Driver/WriteResult.stub.php"/>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
namespace MongoDB\Driver;
4+
5+
use Countable;
6+
7+
final class BulkWriteCommand implements Countable
8+
{
9+
final public function __construct(?array $options = null)
10+
{
11+
}
12+
13+
public function count(): int
14+
{
15+
}
16+
17+
final public function deleteOne(string $namespace, array|object $filter, ?array $options = null): void
18+
{
19+
}
20+
21+
final public function deleteMany(string $namespace, array|object $filter, ?array $options = null): void
22+
{
23+
}
24+
25+
final public function insertOne(string $namespace, array|object $document): mixed
26+
{
27+
}
28+
29+
final public function replaceOne(string $namespace, array|object $filter, array|object $replacement, ?array $options = null): void
30+
{
31+
}
32+
33+
final public function updateOne(string $namespace, array|object $filter, array|object $update, ?array $options = null): void
34+
{
35+
}
36+
37+
final public function updateMany(string $namespace, array|object $filter, array|object $update, ?array $options = null): void
38+
{
39+
}
40+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace MongoDB\Driver\Exception;
4+
5+
use MongoDB\Driver\BulkWriteCommandResult;
6+
7+
class BulkWriteCommandException extends ServerException
8+
{
9+
protected BulkWriteCommandResult $bulkWriteCommandResult;
10+
11+
final public function getBulkWriteCommandResult(): BulkWriteCommandResult
12+
{
13+
}
14+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?php
2+
3+
namespace MongoDB\Driver;
4+
5+
use MongoDB\BSON\Document;
6+
7+
final class BulkWriteCommandResult
8+
{
9+
final private function __construct()
10+
{
11+
}
12+
13+
final public function getInsertedCount(): int
14+
{
15+
}
16+
17+
final public function getMatchedCount(): int
18+
{
19+
}
20+
21+
final public function getModifiedCount(): int
22+
{
23+
}
24+
25+
final public function getUpsertedCount(): int
26+
{
27+
}
28+
29+
final public function getDeletedCount(): int
30+
{
31+
}
32+
33+
final public function getInsertResults(): ?Document
34+
{
35+
}
36+
37+
final public function getUpdateResults(): ?Document
38+
{
39+
}
40+
41+
final public function getDeleteResults(): ?Document
42+
{
43+
}
44+
45+
final public function getWriteErrors(): array
46+
{
47+
}
48+
49+
final public function getWriteConcernErrors(): array
50+
{
51+
}
52+
53+
final public function getErrorReply(): ?Document
54+
{
55+
}
56+
57+
final public function isAcknowledged(): bool
58+
{
59+
}
60+
}

0 commit comments

Comments
 (0)