codeigniter4/CodeIgniter4

Dev: replace type `mixed` with more specific types

Geschlossen

#6.310 geöffnet am 29.07.2022

 (11 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)PHP (1.707 Forks)batch import
devgood first issuehelp wanted

Repository-Metriken

Stars
 (4.492 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 4T 15h) (68 gemergte PRs in 30 T)

Beschreibung

Type mixed means object|resource|array|string|int|float|bool|null. https://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.mixed

The current code base has a lot of type mixed in PHPDocs, But I think all of them are not correct.

And mixed prevents PHPStan level from increasing.

PHPStan’s rule level 6 isn’t satisfied with implicit mixed https://phpstan.org/writing-php-code/phpdoc-types#mixed

We need to replace type mixed with more specific types.

Contributor Guide