Code Duplication    Length = 10-11 lines in 2 locations

projects/plugins/jetpack/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
	}

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

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