类型提示: bool 或 boolean

作者: VijitCoder创建于 2018年1月25日更新于 2026年3月9日
标签Type: enhancement

sniffer 有一个很奇怪的要求。他总是希望将 `boolean` 视为类型提示。但是,同时 PHP 7.1 只支持 `bool` 作为类型提示。因此,为了让所有人都满意,我需要用两种版本来写类型提示:

内容来源: squizlabs/PHP_CodeSniffer