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

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