Code Duplication    Length = 10-11 lines in 2 locations

class.jetpack-admin.php 1 location

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

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

@@ 110-119 (lines=10) @@
107
		return true;
108
	}
109
110
	static function sort_requires_connection_last( $module1, $module2 ) {
111
		if ( $module1['requires_connection'] == $module2['requires_connection'] )
112
			return 0;
113
		if ( $module1['requires_connection'] )
114
			return 1;
115
		if ( $module2['requires_connection'] )
116
			return -1;
117
118
		return 0;
119
	}
120
121
	function get_columns() {
122
		return array( 'name' => __( 'Name', 'jetpack' ) );