Skip to content

Fix assertions with empty lists #858

Fix assertions with empty lists

Fix assertions with empty lists #858

Triggered via pull request March 1, 2025 17:37
Status Failure
Total duration 1m 59s
Artifacts

macos-scan.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors
ArgumentTypeCoercion: src/Psalm/Internal/Codebase/Analyzer.php#L320
src/Psalm/Internal/Codebase/Analyzer.php:320:70: ArgumentTypeCoercion: Argument 3 of Psalm\Internal\Fork\Pool::run expects Closure(int):void|null, but parent type impure-Closure(int):void provided (see https://psalm.dev/193)
ArgumentTypeCoercion: src/Psalm/Internal/Codebase/Scanner.php#L318
src/Psalm/Internal/Codebase/Scanner.php:318:60: ArgumentTypeCoercion: Argument 3 of Psalm\Internal\Fork\Pool::run expects Closure(null):void|null, but parent type impure-Closure():void provided (see https://psalm.dev/193)
MismatchingDocblockParamType: src/Psalm/Internal/Diff/AstDiffer.php#L27
src/Psalm/Internal/Diff/AstDiffer.php:27:15: MismatchingDocblockParamType: Parameter $is_equal has wrong type 'Closure(PhpParser\Node\Stmt, PhpParser\Node\Stmt, string, string, bool=):bool', should be 'Closure' (see https://psalm.dev/141)
ArgumentTypeCoercion: src/Psalm/Internal/Diff/ClassStatementsDiffer.php#L40
src/Psalm/Internal/Diff/ClassStatementsDiffer.php:40:13: ArgumentTypeCoercion: Argument 1 of Psalm\Internal\Diff\ClassStatementsDiffer::calculateTrace expects Closure(PhpParser\Node\Stmt, PhpParser\Node\Stmt, string, string, bool=):bool, but parent type impure-Closure(PhpParser\Node\Stmt, PhpParser\Node\Stmt, string, string, bool=):bool provided (see https://psalm.dev/193)
ArgumentTypeCoercion: src/Psalm/Internal/Diff/FileStatementsDiffer.php#L34
src/Psalm/Internal/Diff/FileStatementsDiffer.php:34:13: ArgumentTypeCoercion: Argument 1 of Psalm\Internal\Diff\FileStatementsDiffer::calculateTrace expects Closure(PhpParser\Node\Stmt, PhpParser\Node\Stmt, string, string, bool=):bool, but parent type impure-Closure(PhpParser\Node\Stmt, PhpParser\Node\Stmt, string, string):bool provided (see https://psalm.dev/193)
ArgumentTypeCoercion: src/Psalm/Internal/Diff/NamespaceStatementsDiffer.php#L34
src/Psalm/Internal/Diff/NamespaceStatementsDiffer.php:34:13: ArgumentTypeCoercion: Argument 1 of Psalm\Internal\Diff\NamespaceStatementsDiffer::calculateTrace expects Closure(PhpParser\Node\Stmt, PhpParser\Node\Stmt, string, string, bool=):bool, but parent type impure-Closure(PhpParser\Node\Stmt, PhpParser\Node\Stmt, string, string):bool provided (see https://psalm.dev/193)
MethodSignatureMismatch: src/Psalm/Internal/Fork/ForkContext.php#L61
src/Psalm/Internal/Fork/ForkContext.php:61:13: MethodSignatureMismatch: Argument 1 of Amp\Parallel\Context\Internal\AbstractContext::onClose has wrong type 'Closure', expecting 'Closure' as defined by Amp\Closable::onClose (see https://psalm.dev/042)
MismatchingDocblockParamType: src/Psalm/Internal/Fork/Pool.php#L85
src/Psalm/Internal/Fork/Pool.php:85:15: MismatchingDocblockParamType: Parameter $task_done_closure has wrong type 'Closure(TResult:fn-psalm\internal\fork\pool::run as mixed):void|null', should be 'Closure|null' (see https://psalm.dev/141)
ArgumentTypeCoercion: src/Psalm/Internal/Fork/Pool.php#L101
src/Psalm/Internal/Fork/Pool.php:101:25: ArgumentTypeCoercion: Argument 1 of Amp\Future::map expects Closure(TResult:fn-psalm\internal\fork\pool::run as mixed):void, but parent type Closure(TResult:fn-psalm\internal\fork\pool::run as mixed):void provided (see https://psalm.dev/193)
ArgumentTypeCoercion: src/Psalm/Internal/Fork/Pool.php#L103
src/Psalm/Internal/Fork/Pool.php:103:55: ArgumentTypeCoercion: Argument 2 of Revolt\EventLoop::repeat expects Closure(string):void, but parent type impure-Closure():void provided (see https://psalm.dev/193)