Compatible to PHP 8
As of PHP 8, Name aliases for scalar types (bool, int, float, string) are not supported. Instead, they are treated as class or interface names. For example, using boolean as a type declaration will require the value to be an instanceof the class or interface boolean, rather than of type bool:
We used boolean and we should change it to bool: