Code Duplication    Length = 12-12 lines in 2 locations

_inc/lib/class.jetpack-keyring-service-helper.php 1 location

@@ 36-47 (lines=12) @@
33
34
		);
35
36
		if ( 'all' == $filter ) {
37
			return $services;
38
		} else {
39
			$connected_services = array();
40
			foreach ( $services as $service => $empty ) {
41
				$connections = $this->get_connections( $service );
42
				if ( $connections ) {
43
					$connected_services[ $service ] = $connections;
44
				}
45
			}
46
			return $connected_services;
47
		}
48
	}
49
50
	/**

modules/publicize/publicize-jetpack.php 1 location

@@ 284-295 (lines=12) @@
281
			'google_plus' => array(),
282
		);
283
284
		if ( 'all' == $filter ) {
285
			return $services;
286
		} else {
287
			$connected_services = array();
288
			foreach ( $services as $service => $empty ) {
289
				$connections = $this->get_connections( $service );
290
				if ( $connections ) {
291
					$connected_services[ $service ] = $connections;
292
				}
293
			}
294
			return $connected_services;
295
		}
296
	}
297
298
	function get_connection( $service, $id, $_blog_id = false, $_user_id = false ) {