Skip to content

PHPLIB-1596 Fully describe $search, $searchMeta and $vectorSearch stages #2112

PHPLIB-1596 Fully describe $search, $searchMeta and $vectorSearch stages

PHPLIB-1596 Fully describe $search, $searchMeta and $vectorSearch stages #2112

Triggered via pull request November 26, 2024 18:13
Status Failure
Total duration 36s
Artifacts

static-analysis.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

6 errors
MixedArgument: src/Builder/Encoder/OperatorEncoder.php#L131
src/Builder/Encoder/OperatorEncoder.php:131:42: MixedArgument: Argument 1 of get_object_vars cannot be array<array-key, mixed>|mixed|stdClass, expecting object (see https://psalm.dev/030)
PossiblyInvalidArgument: src/Builder/Encoder/OperatorEncoder.php#L131
src/Builder/Encoder/OperatorEncoder.php:131:42: PossiblyInvalidArgument: Argument 1 of get_object_vars expects object, but possibly different type array<array-key, mixed>|mixed|stdClass provided (see https://psalm.dev/092)
MixedAssignment: src/Builder/Encoder/OperatorEncoder.php#L131
src/Builder/Encoder/OperatorEncoder.php:131:86: MixedAssignment: Unable to determine the type that $subval is being assigned to (see https://psalm.dev/032)
MixedAssignment: src/Builder/Encoder/OperatorEncoder.php#L166
src/Builder/Encoder/OperatorEncoder.php:166:45: MixedAssignment: Unable to determine the type that $val is being assigned to (see https://psalm.dev/032)
MixedArgumentTypeCoercion: src/Builder/Stage/VectorSearchStage.php#L82
src/Builder/Stage/VectorSearchStage.php:82:43: MixedArgumentTypeCoercion: Argument 1 of MongoDB\Builder\Type\QueryObject::create expects array<array-key, MongoDB\BSON\Type|MongoDB\Builder\Type\FieldQueryInterface|MongoDB\Builder\Type\QueryInterface|array<array-key, mixed>|null|scalar|stdClass>, but parent type array<array-key, mixed> provided (see https://psalm.dev/194)
Psalm
Process completed with exit code 2.