404labfr / 404labfr/laravel-impersonate

Wrong PHPDoc type for id (int instead of int|string or mixed) causes PHPStan errors

未关闭
#228 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
PHP
星标
2.3k
派生
235
PR 合并指标
30 天内没有已合并 PR

描述

**Description:**
In the code, the PHPDoc for `id` is hardcoded as `int`.
Since our project also uses UUIDs as IDs, this results in PHPStan errors.

**Example:**
https://github.com/404labfr/laravel-impersonate/blob/5033f3433a55ca8bb2cc3e4a018a39dd8a327a9f/src/Services/ImpersonateManager.php#L28C15-L28C19

**Expected behavior:**
The PHPDoc type should allow UUIDs (e.g. `string|int` or a more suitable type) so PHPStan does not report errors. Laravel uses the type `mixed`.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。