Skip to content

Add StubCsrfToken

Add StubCsrfToken #375

Triggered via pull request February 7, 2024 15:13
Status Failure
Total duration 36s
Artifacts

static.yml

on: pull_request
Matrix: psalm / psalm
Fit to window
Zoom out
Zoom in

Annotations

13 errors
InvalidNullableReturnType: src/StubCsrfToken.php#L27
src/StubCsrfToken.php:27:33: InvalidNullableReturnType: The declared return type 'string' for Yiisoft\Csrf\StubCsrfToken::getValue is not nullable, but 'null|string' contains null (see https://psalm.dev/144)
NullableReturnStatement: src/StubCsrfToken.php#L29
src/StubCsrfToken.php:29:16: NullableReturnStatement: The declared return type 'string' for Yiisoft\Csrf\StubCsrfToken::getValue is not nullable, but the function returns 'null|string' (see https://psalm.dev/139)
psalm / PHP 7.4-ubuntu-latest
Process completed with exit code 2.
psalm / PHP 8.0-ubuntu-latest
The job was canceled because "ubuntu-latest_7_4" failed.
InvalidNullableReturnType: src/StubCsrfToken.php#L27
src/StubCsrfToken.php:27:33: InvalidNullableReturnType: The declared return type 'string' for Yiisoft\Csrf\StubCsrfToken::getValue is not nullable, but 'null|string' contains null (see https://psalm.dev/144)
NullableReturnStatement: src/StubCsrfToken.php#L29
src/StubCsrfToken.php:29:16: NullableReturnStatement: The declared return type 'string' for Yiisoft\Csrf\StubCsrfToken::getValue is not nullable, but the function returns 'null|string' (see https://psalm.dev/139)
psalm / PHP 8.0-ubuntu-latest
Process completed with exit code 2.
psalm / PHP 8.1-ubuntu-latest
The job was canceled because "ubuntu-latest_7_4" failed.
RiskyTruthyFalsyComparison: src/CsrfMiddleware.php#L94
src/CsrfMiddleware.php:94:17: RiskyTruthyFalsyComparison: Operand of type null|string contains type string, which can be falsy and truthy. This can cause possibly unexpected behavior. Use strict comparison instead. (see https://psalm.dev/356)
InvalidNullableReturnType: src/StubCsrfToken.php#L27
src/StubCsrfToken.php:27:33: InvalidNullableReturnType: The declared return type 'string' for Yiisoft\Csrf\StubCsrfToken::getValue is not nullable, but 'null|string' contains null (see https://psalm.dev/144)
NullableReturnStatement: src/StubCsrfToken.php#L29
src/StubCsrfToken.php:29:16: NullableReturnStatement: The declared return type 'string' for Yiisoft\Csrf\StubCsrfToken::getValue is not nullable, but the function returns 'null|string' (see https://psalm.dev/139)
RiskyTruthyFalsyComparison: src/Synchronizer/SynchronizerCsrfToken.php#L38
src/Synchronizer/SynchronizerCsrfToken.php:38:13: RiskyTruthyFalsyComparison: Operand of type null|string contains type string, which can be falsy and truthy. This can cause possibly unexpected behavior. Use strict comparison instead. (see https://psalm.dev/356)
psalm / PHP 8.1-ubuntu-latest
Process completed with exit code 2.