Skip to content

PHPLIB-1419 Encode Agg builder objects in Collection methods #1642

PHPLIB-1419 Encode Agg builder objects in Collection methods

PHPLIB-1419 Encode Agg builder objects in Collection methods #1642

Triggered via pull request September 10, 2024 19:40
Status Failure
Total duration 1m 48s
Artifacts

static-analysis.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors
PossiblyInvalidArgument: src/Collection.php#L228
src/Collection.php:228:58: PossiblyInvalidArgument: Argument 1 of MongoDB\is_last_pipeline_operator_write expects array<array-key, mixed>, but possibly different type MongoDB\BSON\Document|MongoDB\BSON\PackedArray|array<array-key, mixed>|stdClass provided (see https://psalm.dev/092)
PossiblyInvalidArgument: src/Collection.php#L249
src/Collection.php:249:80: PossiblyInvalidArgument: Argument 3 of MongoDB\Operation\Aggregate::__construct expects array<array-key, mixed>, but possibly different type MongoDB\BSON\Document|MongoDB\BSON\PackedArray|array<array-key, mixed>|stdClass provided (see https://psalm.dev/092)
PossiblyInvalidArgument: src/Collection.php#L1107
src/Collection.php:1107:92: PossiblyInvalidArgument: Argument 4 of MongoDB\Operation\Watch::__construct expects array<array-key, mixed>, but possibly different type MongoDB\BSON\Document|MongoDB\BSON\PackedArray|array<array-key, mixed>|stdClass provided (see https://psalm.dev/092)
MixedAssignment: src/Operation/BulkWrite.php#L200
src/Operation/BulkWrite.php:200:9: MixedAssignment: Unable to determine the type that $builderEncoder is being assigned to (see https://psalm.dev/032)
UndefinedVariable: src/Operation/BulkWrite.php#L200
src/Operation/BulkWrite.php:200:27: UndefinedVariable: Cannot find referenced variable $operation (see https://psalm.dev/024)
MixedAssignment: src/Operation/BulkWrite.php#L212
src/Operation/BulkWrite.php:212:21: MixedAssignment: Unable to determine the type of this assignment (see https://psalm.dev/032)
MixedArrayAssignment: src/Operation/BulkWrite.php#L212
src/Operation/BulkWrite.php:212:21: MixedArrayAssignment: Cannot access array value on mixed variable $args[0] (see https://psalm.dev/117)
MixedMethodCall: src/Operation/BulkWrite.php#L212
src/Operation/BulkWrite.php:212:49: MixedMethodCall: Cannot determine the type of $builderEncoder when calling method encode (see https://psalm.dev/015)
PossiblyInvalidArgument: src/Operation/BulkWrite.php#L213
src/Operation/BulkWrite.php:213:35: PossiblyInvalidArgument: Argument 1 of MongoDB\Driver\BulkWrite::delete expects array<array-key, mixed>|object, but possibly different type array<array-key, mixed>|int|mixed|stdClass|string provided (see https://psalm.dev/092)
MixedAssignment: src/Operation/BulkWrite.php#L223
src/Operation/BulkWrite.php:223:21: MixedAssignment: Unable to determine the type of this assignment (see https://psalm.dev/032)