vimeo/psalm

ArgumentTypeCoercion instead of MixedArgumentTypeCoercion emitted

Open

#4,991 创建于 2021年1月12日

在 GitHub 查看
 (5 评论) (0 反应) (0 负责人)PHP (668 fork)batch import
Help wantedbugeasy problemsgood first issue

仓库指标

Star
 (5,369 star)
PR 合并指标
 (平均合并 3天 12小时) (30 天内合并 5 个 PR)

描述

If I understand correctly, MixedArgumentTypeCoercion is emitted when it's an iterable-specific issue, and ArgumentTypeCoercion is emitted in any other case. There are two ways to transform stdClass to an array: (array) $obj and get_object_vars($obj). In first case it will be a MixedArgumentTypeCoercion info, in the second case it will be ArgumentTypeCoercion error. https://psalm.dev/r/66737b481d

Looks like some inconsistency for me, or I can't understand some underlying logic.

贡献者指南