Code Duplication    Length = 10-11 lines in 2 locations

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
		}
195
		if ( $module1['requires_connection'] ) {
196
			return 1;
197
		}
198
		if ( $module2['requires_connection'] ) {
199
			return -1;
200
		}
201
202
		return 0;
203
	}

class.jetpack-admin.php 1 location

@@ 94-104 (lines=11) @@
91
		wp_add_inline_style( 'admin-bar', $style );
92
	}
93
94
	static function sort_requires_connection_last( $module1, $module2 ) {
95
		if ( $module1['requires_connection'] == $module2['requires_connection'] ) {
96
			return 0;
97
		} elseif ( $module1['requires_connection'] ) {
98
			return 1;
99
		} elseif ( $module2['requires_connection'] ) {
100
			return -1;
101
		}
102
103
		return 0;
104
	}
105
106
	// Produce JS understandable objects of modules containing information for
107
	// presentation like description, name, configuration url, etc.