Code Duplication    Length = 10-11 lines in 2 locations

class.jetpack-admin.php 1 location

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

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

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