vimeo/psalm
GitHub で見るArgumentTypeCoercion instead of MixedArgumentTypeCoercion emitted
Open
#4,991 opened on 2021年1月12日
Help wantedbugeasy problemsgood first issue
Repository metrics
- Stars
- (5,369 stars)
- PR merge metrics
- (平均マージ 3d 12h) (30d で 5 merged PRs)
説明
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.