for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
<?php
class Jetpack_Sync {
static function sync_options() {
_deprecated_function( __METHOD__, '4.1.0', 'jetpack_whitelist_options filter' );
$options = func_get_args();
// first argument is the file but we don't care about that any more.
$file = array_shift( $options );
$file
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
$myVar = 'Value'; $higher = false; if (rand(1, 6) > 3) { $higher = true; } else { $higher = false; }
Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.
$myVar
$higher
if ( is_array( $options ) ) {
$client_sync = Jetpack_Sync_Client::getInstance();
$client_sync->set_options_whitelist( array_merge( $options, $client_sync->get_options_whitelist() ) );
}
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.