There needs to be a sniff, which allows for detecting usages of deprecated types (i.e. boolean).
If your application supports PHP 8.5 + older versions, you don't want team members using these type casts.
More info:
PHP 8.5: Non-canonical scalar type casts (boolean|double|integer|binary) deprecated
https://php.watch/versions/8.5/boolean-double-integer-binary-casts-deprecated