format/casts/short-scalar
In the format-laravel and format-psr12 presets. Safe fix.
What it does
Cast (boolean) and (integer) should be written as (bool) and (int), (double) and (real) as (float), (binary) as (string).
Configuration
[format.rules]
"casts/short-scalar" = true
To skip it in some files, add a @pun-ignore-file comment.
Replaces
short_scalar_cast(php-cs-fixer)DeprecatedCastRule(phpstan-classes)deprecated-cast(mago-linter)cast.deprecated(phpstan)