Code Duplication    Length = 10-11 lines in 2 locations

class.jetpack-admin.php 1 location

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

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

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