Code Duplication    Length = 10-11 lines in 2 locations

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(

class.jetpack-admin.php 1 location

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