Variables must be set null
instead of using (unset)
casting.
--- Original
+++ New
<?php
-$a = (unset) $b;
+$a = null;
The rule is part of the following rule sets:
- @PHP80Migration
- Using the @PHP80Migration rule set will enable the
no_unset_cast
rule. - @PHP81Migration
- Using the @PHP81Migration rule set will enable the
no_unset_cast
rule. - @PHP82Migration
- Using the @PHP82Migration rule set will enable the
no_unset_cast
rule. - @PhpCsFixer
- Using the @PhpCsFixer rule set will enable the
no_unset_cast
rule. - @Symfony
- Using the @Symfony rule set will enable the
no_unset_cast
rule.