404labfr / 404labfr/laravel-impersonate

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

Aperta
#228 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
PHP
Stelle
2.3k
Fork
235
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**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`.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.