Code Duplication    Length = 10-11 lines in 2 locations

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

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

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
	}