Code Duplication    Length = 10-11 lines in 2 locations

projects/plugins/jetpack/class.jetpack-modules-list-table.php 1 location

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

projects/plugins/jetpack/class.jetpack-admin.php 1 location

@@ 103-113 (lines=11) @@
100
		wp_add_inline_style( 'admin-bar', $style );
101
	}
102
103
	static function sort_requires_connection_last( $module1, $module2 ) {
104
		if ( $module1['requires_connection'] == $module2['requires_connection'] ) {
105
			return 0;
106
		} elseif ( $module1['requires_connection'] ) {
107
			return 1;
108
		} elseif ( $module2['requires_connection'] ) {
109
			return -1;
110
		}
111
112
		return 0;
113
	}
114
115
	// Produce JS understandable objects of modules containing information for
116
	// presentation like description, name, configuration url, etc.