Open jrfnl opened 6 years ago
PHP 5.0 introduced an (unset) type cast for feature completeness. This type cast has been deprecated as of PHP 7.2 and is slated to be removed in PHP 8.0.
(unset)
NewTypeCasts
DeprecatedTypeCasts
Detect the following code pattern(s):
$a = (unset) $b; $b = (unset) $b;
And fix these to:
$a = null; unset( $b );
Short description
PHP 5.0 introduced an
(unset)
type cast for feature completeness. This type cast has been deprecated as of PHP 7.2 and is slated to be removed in PHP 8.0.Related PHPCompatibility sniff(s):
NewTypeCasts
DeprecatedTypeCasts
PHP manual references:
Example code:
Detect the following code pattern(s):
And fix these to:
Notes for implementation of the sniff: