Code Duplication    Length = 10-11 lines in 2 locations

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.

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

@@ 191-200 (lines=10) @@
188
		return true;
189
	}
190
191
	static function sort_requires_connection_last( $module1, $module2 ) {
192
		if ( $module1['requires_connection'] == $module2['requires_connection'] )
193
			return 0;
194
		if ( $module1['requires_connection'] )
195
			return 1;
196
		if ( $module2['requires_connection'] )
197
			return -1;
198
199
		return 0;
200
	}
201
202
	function get_columns() {
203
		$columns = array(