Skip to content

PHPLIB-1518 WriteResult::get*Count() always return an int on acknowledged result #1867

PHPLIB-1518 WriteResult::get*Count() always return an int on acknowledged result

PHPLIB-1518 WriteResult::get*Count() always return an int on acknowledged result #1867

Triggered via pull request September 25, 2024 10:11
Status Failure
Total duration 1m 41s
Artifacts
This run and associated checks have been archived and are scheduled for deletion. Learn more about checks retention

static-analysis.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors
InvalidNullableReturnType: src/BulkWriteResult.php#L40
src/BulkWriteResult.php:40:40: InvalidNullableReturnType: The declared return type 'int' for MongoDB\BulkWriteResult::getDeletedCount is not nullable, but 'int|null' contains null (see https://psalm.dev/144)
NullableReturnStatement: src/BulkWriteResult.php#L42
src/BulkWriteResult.php:42:16: NullableReturnStatement: The declared return type 'int' for MongoDB\BulkWriteResult::getDeletedCount is not nullable, but the function returns 'int|null' (see https://psalm.dev/139)
InvalidNullableReturnType: src/BulkWriteResult.php#L53
src/BulkWriteResult.php:53:41: InvalidNullableReturnType: The declared return type 'int' for MongoDB\BulkWriteResult::getInsertedCount is not nullable, but 'int|null' contains null (see https://psalm.dev/144)
NullableReturnStatement: src/BulkWriteResult.php#L55
src/BulkWriteResult.php:55:16: NullableReturnStatement: The declared return type 'int' for MongoDB\BulkWriteResult::getInsertedCount is not nullable, but the function returns 'int|null' (see https://psalm.dev/139)
InvalidNullableReturnType: src/BulkWriteResult.php#L80
src/BulkWriteResult.php:80:40: InvalidNullableReturnType: The declared return type 'int' for MongoDB\BulkWriteResult::getMatchedCount is not nullable, but 'int|null' contains null (see https://psalm.dev/144)
NullableReturnStatement: src/BulkWriteResult.php#L82
src/BulkWriteResult.php:82:16: NullableReturnStatement: The declared return type 'int' for MongoDB\BulkWriteResult::getMatchedCount is not nullable, but the function returns 'int|null' (see https://psalm.dev/139)
InvalidNullableReturnType: src/BulkWriteResult.php#L96
src/BulkWriteResult.php:96:41: InvalidNullableReturnType: The declared return type 'int' for MongoDB\BulkWriteResult::getModifiedCount is not nullable, but 'int|null' contains null (see https://psalm.dev/144)
NullableReturnStatement: src/BulkWriteResult.php#L98
src/BulkWriteResult.php:98:16: NullableReturnStatement: The declared return type 'int' for MongoDB\BulkWriteResult::getModifiedCount is not nullable, but the function returns 'int|null' (see https://psalm.dev/139)
InvalidNullableReturnType: src/BulkWriteResult.php#L109
src/BulkWriteResult.php:109:41: InvalidNullableReturnType: The declared return type 'int' for MongoDB\BulkWriteResult::getUpsertedCount is not nullable, but 'int|null' contains null (see https://psalm.dev/144)
NullableReturnStatement: src/BulkWriteResult.php#L111
src/BulkWriteResult.php:111:16: NullableReturnStatement: The declared return type 'int' for MongoDB\BulkWriteResult::getUpsertedCount is not nullable, but the function returns 'int|null' (see https://psalm.dev/139)