Completed
Push — feature/videopress-uploader ( 58b703...e9e1f9 )
by
unknown
104:20 queued 95:05
created

Jetpack_Sync   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 2
Metric Value
c 2
b 0
f 2
dl 0
loc 12
rs 10
wmc 2
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A sync_options() 0 10 2
1
<?php
2
3
class Jetpack_Sync {
4
	static function sync_options() {
5
		_deprecated_function( __METHOD__, '4.1.0', 'jetpack_whitelist_options filter' );
6
		$options = func_get_args();
7
		// first argument is the file but we don't care about that any more.
8
		$file = array_shift( $options );
0 ignored issues
show
Unused Code introduced by
$file is not used, you could remove the assignment.

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.

Loading history...
9
		if ( is_array( $options ) ) {
10
			$client_sync = Jetpack_Sync_Client::getInstance();
11
			$client_sync->set_options_whitelist( array_merge( $options, $client_sync->get_options_whitelist() ) );
12
		}
13
	}
14
}
15