Cast (boolean)
and (integer)
should be written as (bool)
and
(int)
, (double)
and (real)
as (float)
, (binary)
as
(string)
.
--- Original
+++ New
<?php
-$a = (boolean) $b;
-$a = (integer) $b;
-$a = (double) $b;
+$a = (bool) $b;
+$a = (int) $b;
+$a = (float) $b;
-$a = (binary) $b;
+$a = (string) $b;
The rule is part of the following rule sets:
- @PER
- @PER-CS
- @PER-CS1.0
- @PER-CS2.0
- @PHP74Migration
- @PHP80Migration
- @PHP81Migration
- @PHP82Migration
- @PHP83Migration
- @PSR12
- @PhpCsFixer
- @Symfony