Code Duplication    Length = 10-11 lines in 2 locations

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

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

class.jetpack-admin.php 1 location

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