Code Duplication    Length = 10-11 lines in 2 locations

class.jetpack-admin.php 1 location

@@ 46-56 (lines=11) @@
43
		add_action( 'jetpack_unrecognized_action',   array( $this, 'handle_unrecognized_action' ) );
44
	}
45
46
	static function sort_requires_connection_last( $module1, $module2 ) {
47
		if ( $module1['requires_connection'] == $module2['requires_connection'] ) {
48
			return 0;
49
		} elseif ( $module1['requires_connection'] ) {
50
			return 1;
51
		} elseif ( $module2['requires_connection'] ) {
52
			return -1;
53
		}
54
55
		return 0;
56
	}
57
58
	// Produce JS understandable objects of modules containing information for
59
	// presentation like description, name, configuration url, etc.

class.jetpack-modules-list-table.php 1 location

@@ 166-175 (lines=10) @@
163
		return true;
164
	}
165
166
	static function sort_requires_connection_last( $module1, $module2 ) {
167
		if ( $module1['requires_connection'] == $module2['requires_connection'] )
168
			return 0;
169
		if ( $module1['requires_connection'] )
170
			return 1;
171
		if ( $module2['requires_connection'] )
172
			return -1;
173
174
		return 0;
175
	}
176
177
	function get_columns() {
178
		$columns = array(