codeigniter4/CodeIgniter4

Dev: replace type `mixed` with more specific types

クローズ

#6,310 opened on 2022/07/29

 (11 件のコメント) (0 件のリアクション) (0 人の担当者)PHP (1,707 件のフォーク)batch import
devgood first issuehelp wanted

Repository metrics

Stars
 (4,492 個のスター)
PR merge metrics
 (平均マージ 4d 15h) (30d で 68 merged PRs)

説明

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.

コントリビューターガイド