Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 85-96 (lines=12) @@
82
	function get_services( $filter = 'all' ) {
83
		$services = array();
84
85
		if ( 'all' === $filter ) {
86
			return $services;
87
		} else {
88
			$connected_services = array();
89
			foreach ( $services as $service => $empty ) {
90
				$connections = $this->get_connections( $service );
91
				if ( $connections ) {
92
					$connected_services[ $service ] = $connections;
93
				}
94
			}
95
			return $connected_services;
96
		}
97
	}
98
99
	/**

projects/plugins/jetpack/modules/publicize/publicize-jetpack.php 1 location

@@ 305-316 (lines=12) @@
302
			'tumblr'      => array(),
303
		);
304
305
		if ( 'all' == $filter ) {
306
			return $services;
307
		} else {
308
			$connected_services = array();
309
			foreach ( $services as $service_name => $empty ) {
310
				$connections = $this->get_connections( $service_name, $_blog_id, $_user_id );
311
				if ( $connections ) {
312
					$connected_services[ $service_name ] = $connections;
313
				}
314
			}
315
			return $connected_services;
316
		}
317
	}
318
319
	function get_connection( $service_name, $id, $_blog_id = false, $_user_id = false ) {