Code Duplication    Length = 10-11 lines in 2 locations

class.jetpack-admin.php 1 location

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

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

@@ 204-213 (lines=10) @@
201
		return true;
202
	}
203
204
	static function sort_requires_connection_last( $module1, $module2 ) {
205
		if ( $module1['requires_connection'] == $module2['requires_connection'] )
206
			return 0;
207
		if ( $module1['requires_connection'] )
208
			return 1;
209
		if ( $module2['requires_connection'] )
210
			return -1;
211
212
		return 0;
213
	}
214
215
	function get_columns() {
216
		$columns = array(